The Process of IP Routing
– There is a characteristic feature of this process that it does not changes with the size of the network.
– The way it is implemented is same throughout all types and sizes of the network.
For example :
– There are 2 networks namely A and B.
– There is a router R that connects these two networks.
– Also, this router has 2 interfaces namely E0 and E1 similar to the network interface of a network card.
– The only difference is that they are built in to the router.
– A host A in network A wants to communicate with a host B in network B.
– It opens the command prompt and enter the following:
– By this it requests for a remote host, implying that the data packet must be routed to the host and so it should be sent to the router.
– The ARP or the address resolution protocol can be used along with IP for determining which network packet is meant for which host.
– Now for sending the packet to the router, the host A must have knowledge about the hardware address of the interface of the router R.
– This hardware address is nothing but the MAC address of E0 interface.
– For this address, the host looks up in the ARP cache.
– The MAC address is available in this memory for just a few seconds.
– If the MAC address is not there it implies one of the following things:
1. Either there has been a long time since last connection between the host and the router.
2. Or it might not have resolved the router’s IP address in to the MAC address.
– In such a situation, the host broadcasts and ARP request which seeks to obtain the MAC address of that router stating by stating the IP address.
– The router identifies this IP address as being its own and responds back to the host with its hardware address.
– This also explains why there occurs a timeout during the first ping.
– Sending an ARP and getting a response back is a time consuming process.
– By the time, your system gets a response back; the Time to Live (TTL) of the ping expires.
– Now, the host has the address, it has everything that it requires for transmitting the packet.
– When the packet is transmitted to the router, it is handed over to the network layer which in turn passes it to the data link layer.
– The source as well as the destination IP addresses along with the ICMP echo request are contained within this data packet.
– A frame is created by the data link layer of the network A for encapsulating the packet information such as the addresses and the type field.
– At the end in the FCS part, A CRC process is carried out by the data link layer in order to ensure that any corruption in the data packet can be recognized by the receiving host.
– This frame is handed over to the physical layer that encodes it into a digital signal and transmits it across the network in to network B.
– This signal is received by the router which again carries out a CRC check.
– After this the destination address contained in the frame is checked against the addresses of various hosts.
– When a match is found, the original packet (stripped off its frame) is stored in the buffer of the router.
– The IP protocol checks the destination address and creates a frame and sends it to the host B.
– Here the decapsulation process takes place.