6.1.Basic Routing Processes
Last updated
Was this helpful?
Last updated
Was this helpful?
“How does a packet from a source IP address of 192.168.1.2 get routed to a destination IP address of 192.168.3.2?”
PC1 compares its IP address and subnet mask of 192.168.1.2/24 with the destination IP address and subnet mask of 192.168.3.2/24.
PC1 concludes that the destination IP address resides on a remote subnet. Therefore, PC1 needs to send the packet to its default gateway.
In this example, PC1 has a default gateway of 192.168.1.1 (router R1).
However, to construct a Layer 2 frame, PC1 also needs the MAC address of its default gateway.
PC1 sends an Address Resolution Protocol (ARP) request for router R1’s MAC address.
After PC1 receives an ARP reply from router R1, PC1 adds router R1’s MAC address to its ARP cache.
PC1 now sends its data in a frame destined for Server1, as shown in Figure below .
Router R1 receives the frame sent from PC1 and interrogates the IP header.
An IP header contains a Time To Live (TTL) field, which is decremented once for each router hop.
Therefore, router R1 decrements the packet’s TTL field.
If the value in the TTL field is reduced to 0, the router discards the frame and sends a time exceeded Internet Control Message Protocol (ICMP) message back to the source.
Assuming the TTL is not decremented to 0, router R1 checks its routing table to determine the best path to reach network 192.168.3.0/24.
In this example, router R1’s routing table has an entry stating that network 192.168.3.0/24 is accessible via interface Serial 1/1.
Router R1, therefore, forwards the frame out of its Serial 1/1 interface, as shown in Figure below .
When router R2 receives the frame, it decrements the TTL in the IP header, just as router R1 did.
Again, assuming the TTL did not get decremented to 0, router R2 interrogates the IP header to determine the destination network.
In this case, the destination network of 192.168.3.0/24 is directly attached to router R2’s Fast Ethernet 0/0 interface.
Similar to the way PC1 sent out an ARP request to determine the MAC address of its default gateway, router R2 sends an ARP request to determine the MAC address of Server1.
After an ARP reply is received from Server1, router R2 forwards the frame out of its Fast Ethernet 0/0 interface to Server1, as illustrated in Figure below .