This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
The Internet is a store and forward datagram oriented network. Explain in as much detail as you can how IPv4 packets are processed:
- How packet delivery is achieved locally (direct delivery)
- How packet delivery is achieved remotely (indirect delivery)
You should contrast the two approaches and explain the roles of ARP and the router in your answer.
To answer this question a brief overview of the TCP/IP Protocol Architecture model is necessary to be mentioned which includes encapsulation and de-encapsulation of IP Datagram, as it specifies how the packet is prepared for delivery. After this the explanation discussion on how packet delivery is achieved directly and indirectly by explaining the internet routing processes with the help of roles of ARP and the router. Also the information used to make routing decisions which includes a brief overview of the IP routing Algorithm that is used to send a datagram across multiple physical networks
TCP/IP Protocol Architecture Model
the TCP/IP Architecture Model structure comprises of various layers. These are called protocol stacks or stacks because of being groups of related protocols in a stack. Data (packets) are passed down through one layer to the next. The network access layer packets are processed protocols send the packet over the network. Different layers have been identified to distinguish ways the data is handled in each layer, as it passes down the protocol stacks from the application layer to the physical network. And when the data is received at the remote end, the data is passed up the stack to the receiving application. Each layer is not concerned with the functions of below and above layers; they are only interested in carrying out its task and delivers the data to their neighbouring layers. An address mechanism allows data to be routed through the various layers until it reaches its destination
By using IP, data messages are carried over the internet, they are called IP datagrams. Theoretically, IPv4 datagram is split into 2 parts:
- the header - contains control fields and addressing
- the payload - carries the actual data to be transmitted over the internetwork.
By the time the data is transmitted from the physical network layer, the data is enveloped in a multiple, nested headers by each layer protocol. When data is received at the remote end, header is striped off by each layer from the data as it is passed on the layer above. The process of removing headers from data is called decapsulation.
The application layer in Internet reference model provides functions to user-applications to communicate over the network. This layer resides the user-access network processes which users interact directly and indirectly and includes all applications protocols, to deliver data, for host-to-host transport protocols This layer also provides functions like user data encryption / decryption and compression / decompression.
The data is converted for transmission on to the network by the application-layer and is passed down to the Transport layer. This layer sets up a virtual circuit to the destination. TCP/IP uses the terms "socket" and "port" to describe the path (or virtual circuit) over which cooperating applications communicate. The user-data stream is broken down into segments or packets and a "header control information" is created and attached to the Transport layer header of the data field which is called TCP Header Encapsulation. Each data segments is sequenced in such a way that it can be put back together, exactly as transmitted, on the destination. To provide reliable data delivery, applications requiring the host-to-host transport protocol, use Transmission Control Protocol (TCP) to verify whether the data is accurately delivered across a network and is in the proper sequence.
The packet is received by the internet layer from the TCP Layer. The best known TCP/IP protocol at the internet layer is the Internet Protocol (IP), which provides the basic packet delivery service for all TCP/IP networks. Each segment is passed to the Internet layer for logical addressing and routing via a routed protocols. The core protocols for the IPv4 Internet layer consist of the following:
- IP is basically addresses, routes, fragments, and reassembles packets. IP is used by all protocols in the layers above and below it to deliver data, which means all TCP/IP data flows through IP when it is sent and received, regardless of its final destination.
- The Internet Group Management Protocol (IGMP) manages IP multicast groups.
- Address Resolution Protocol (ARP) enables IP to identify the physical address that matches a given IP address
- Internet Control Message Protocol (ICMP) - protocol used to send control messages and error messages during the transmission of IP-type data packets
This layer's protocol adds a header to the segment which is called IP Header Encapsulation. This data-segment is send down to the Data Link layer.
Data Link layer
Data Link layer is the means to transferdata between network entities and to detect and possibly correct errors that may occur in the Physical Layer. This layer responds to the service requests from the Internet Layer and issues service request to the physical layer. Data Link Layer Functions performs the tasks: Logical Link Control (LLC), Media Access Control (MAC), Addressing - labelling information with a particular destination location, Error Detection and Handling and Data Framing: In the data link layer each packet is encapsulates in a frame and places them on the network media (cable or wireless). This encapsulation is called MAC Header Encapsulation. MAC header contains the source Mac address and destination Mac address. If the device is on a different network, then the frame is sent to a router to be routed through an internetwork
Physical network layer
the physical layer is closely related to the data link layer. As a frame is really a logical group of 1s and 0s. So in order to put the DLL FRAME on the network, it must first be put into a digital signal and the Physical layer encapsulates these digits into a digital signal, which is referred as Physical Layer Encapsulation. Physical layer performs the following functions and services:
- establishment and termination of aconnectionto acommunicationsmedium
- participation in the process whereby the communication resources are effectively shared among multiple users, e.g.,contentionresolution and flow control
- conversion between the representation ofdigital datainuserequipment and the corresponding signals transmitted over a communicationschannel.
When the digital signal is received on the destination side by the receiving devices, they will synchronize on the digital signal and extract the 1s and 0s from the digital signal. Frames will be built, Cyclic Redundancy Check (CRC) will be performed and check their output against the output in the Frame Check Sequence (FCS) field of the data frame. If the information matches then the packet is extracted from the frame. This process is known as de-encapsulation. The packet then transfers to the Internet layer, where the IP address is checked. If the IP address matches then the segment is pulled from the packet and transfers to the transport layer where the data is processed and the data stream is rebuilt and confirms the transmitting station that it received each piece of segment. And transfers the data stream to the upper layer application.
IP Datagram Direct Delivery and Indirect Delivery (Routing)
The delivery of an IP packet to its final destination is accomplished by means of either direct or indirect delivery. This is possible through IP Routing. In this process packets are sent according to the Destination IP Address, which is decided by the "IP layer" at the sending TCP/IP host or at an IP router. For IPv4 instead of the term "routers", the term "gateways" is considered.
HOW PACKET DELIVERY IS ACHIEVED LOCALLY (DIRECT DELIVERY)
If the source and destination of the IP datagram are located on the same physical Network, direct delivery transpires having the same network identifier. Direct Delivery, of an IP datagram, between two machines does not involve routers. The sender host encapsulates the datagram in a physical frame, binds the destination IP address to a physical hardware address (using ARP), and the LAN technology, such as Ethernet or Institute of Electrical and Electronic Engineers (IEEE) 802.11, sends the resulting frame directly to the destination's media access control (MAC) address.
Example: "A" sends IP Datagram to "B"
ARP Protocol: Lets explain the function of ARP in the above example
The Address Resolution Protocol (ARP) conceptually exists between the data-link and Internet layers. ARP assists IP in directing datagrams to the appropriate receiving system by mapping Ethernet addresses (48 bits long) to known IP addresses (32 bits long).
The Illustrated Network: How TCP/IP Works in a Modern Network
Device A does not know the MAC address of the Device B to put in the Destination MAC Address in the Packet. The following steps are taken by ARP to resolve this matter.
- Checks Cache: cache is first checked by the device "A" to decide whether it has the resolution for Device "B" or not. if yes, it skips to last step otherwise the process continues on.
- Generates ARP Request Message: an ARP Request message generated by the device "A" by putting its data link layer address as the Sender MAC Address, which is "AAA" and its IP address as the Sender Protocol Address "10.1.1.1". It fills in the IP address of the destination as the Target Protocol Address as "10.1.1.2".
- Broadcasts ARP Request Message: the ARP Request message is broadcasted on the local network by The device "A"
- Process of ARP Request Message by the Local Devices: Each device on the local network receives the message and processes it. When a match on the Target Protocol Address is not found by the devices the message is ignored
- Destination Device Generates ARP Reply Message: Device B whose IP address matches the contents of the Target Protocol Address of the message will generate an ARP Reply message. It takes the Sender MAC Address and Sender Protocol Address fields from the ARP Request message and uses these as the values for the Target MAC Address and Target Protocol Address of the reply. It then fills in its own layer two address as the Sender MAC Address which is "BBB" and its IP address as the Sender Protocol Address which is "10.1.1.2"
- Destination Device Updates ARP Cache: The device "B" will update its ARP cache by adding an entry of the MAC and IP addresses of the Device "A". This will avoid unnecessary resolution cycle for the Device B
- Destination Device Sends ARP Reply Message: As there is no need to broadcast the reply, Unicast (single destination) ARP reply message is send by the device "B" to the device "A"
- Source Device Processes ARP Reply Message: The device "A" stores the Sender MAC Address as the layer-two address of the destination, for sending its IP datagram.
- Source Device Updates ARP Cache: The device "A" uses the Sender Protocol Address and Sender MAC Address to update its ARP cache for use in the future when transmitting to this device.
- Source Device Updates ARP Cache: The device "A" will update its ARP cache by adding an entry of the Sender Protocol Address and Sender MAC Address to be used in the future when transmitting to this device "B".
How packet delivery is achieved remotely (indirect delivery)
the packet will be delivered indirectly If the destination host is not on the same network as the source host. The packet through intermediate router or number of routers until it reaches one that is connected to the same physical network as its final destination. Thus, the last delivery is always a direct delivery. In an indirect delivery, the sender uses the destination IP address and a routing table "next hop" i.e. to find the IP address of the next router to which the packet should be delivered. The sender then uses the ARP to find the physical address of the next router. based on network prefixes routing decisions are made. The datagram is encapsulated in a frame by the The sender host with the router's physical destination address. This physical destination address is found by the Address Resolution Protocol (ARP).
In direct delivery, the sender uses the senders IP address to find the destination physical address. This mapping process, to find the physical destination address, is done by Address Resolution Protocol (ARP) and the LAN technology, such as Ethernet or Institute of Electrical and Electronic Engineers (IEEE) 802.11, sends the resulting frame to the IP router's MAC address
Example: "A" sends IP Datagram to "Z"
Proxy ARP Role
Lets explain the function of ARP in the above example. Device A does not have the MAC address of the Device B in its cache to put in the Destination MAC Address in the Packet. So it begins an address resolution and broadcasts the ARP Request message to get B's MAC address. As the router is configured to respond to device A's broadcast on behalf of device Z. The router sends Device A its own MAC address which is "RRR". Now Device A will use the router MAC address to send the packet to the router. This is what is called a PROXY ARP.
Device A then sends the packet to the router, the router sees the Destination IP Address which is "126.96.36.199" where the packet needs to go. The router re-builds the Layer 2 information by putting its own MAC address in the source field and MAC address of the receiving device in the destination field and forward the packet to Device Z
Router R replies to ARP requests by giving its MAC address, as the target address, to each network for hosts on the other network.
To make ARP efficient, each machine caches IP-to-physical address bindings. Because internet traffic tends to consist of a sequence of interactions between pairs of machines, the cache eliminates most ARP broadcast requests.
IP Routes and Routing Tables
datagrams is accepted by each router from a variety of sources. After accepting, IP address of the destination is examined by the router and then it decides what is "the next hop" the datagram needs to take to get closer to its final destination. a set of information, called a routing table, provides mapping between different network IDs and the other routers to which it is connected, is maintains by each router.
The routing tables contain the IP addresses of the destination network rather than the individual host to keep the routing tables small, and to make routing efficient Thus, all traffic destined for the same network takes the same path.
IP Routing Decisions
The example internet consists of four networks connected by three routers. In the figure, the routing table gives the routes that router R2 uses. Because R connects directly to networks 188.8.131.52 and 184.108.40.206, it can use direct delivery to send to a host on either of those networks (possibly using ARP to find physical addresses). Given a datagram destined for a host on network 220.127.116.11, R2 routes it to the address of router R3, 18.104.22.168. R3 will then deliver the datagram directly. R2 can reach address 22.214.171.124 because both R2 and R3 attach directly to network 126.96.36.199.
IP Routing Algorithm
- Router receives an IP datagram with network portion N and destination D
- If N is directly connected
- Transmit on that network
- Else If host specific entry for D exists
- Use next hop in that entry
- Else If route entry for N exists
- Use next hop in that entry
- Else If default route for next hop exists
- Use default route for next hop
- Declare error
The fields included in the IP header are used to manage internetwork datagram delivery. This includes key information for delivery such as the address of the destination device, identification of the type of frame, and control bits. The header follows a specific format described in the following topic. After data is encapsulated into an IP datagram, it is passed down to the data link layer for transmission across the current "hop" of the internetwork. There, it is of course further encapsulated, IP header and all, into a data link layer frame such as an Ethernet frame. An IP datagram may be encapsulated into many such data link layer frames as it is routed across the internetwork; on each hop the IP datagram is removed from the data link layer frame and then repackaged into a new one for the next hop. The IP datagram, however, is not changed (except for some control fields) until it reaches its final destination.
Depending on the Options field settings, it should be noted that the original IP datagram, will not be altered with two primary exceptions: the TTL (Time to Live) field and the Cyclic Redundancy Check field. If an IP datagram is received by a router and it has not arrived at its final destination, the router will decrement the TTL field. If TTL > 0, it will forward the packet based on routing table information. The IP datagram's header contents will remain the same (with the exception of an error-detection field known as the Cyclic Redundancy Check, or CRC). Since the TTL field changed, the CRC must be recalculated throughout all the networks and routers that the datagram traverses. Otherwise, the only alterations that are made are to the datalink headers and trailers. The IP addresses in the IP header will remain the same, as the datagram traverses any routers in the path to its destination.
IP routers forward datagrams on a connectionless basis and therefore do not guarantee delivery of any packet. They operate at the network layer, which provides best-effort or connectionless data transfer. Routers do not establish sessions with other routers on the internet. In fact, IP routers do not know of any workstations (nonrouters) on their subnets.
These routers forward packets based on the network address of the packet (in the IP header) and not on the physical address (the 48-bit address for broadcast networks) of the final destination (the receiver). When the router receives the packet, it will look at the final network address (embedded in the IP header of the packet) and determine how to route the packet. Routers only route packets that are directly addressed to them. They do not operate in promiscuous mode (watching all LAN traffic) for forwarding datagrams