Assume PC1 with IP address 192.168.10.10 wants to send a packet to another host on the same network. PC1 would check the IPv4 route table based on the destination IP address. Then, PC1 would discover that the host is on the same network and simply send it out of its interface (On-link).

Note: R1 is not involved in the transfer of the packet. If PC1 forwards a packet to any network other than its local network, then it must use the services of router R1, and forward the packet to its local default route (192.168.10.1).

The following examples illustrate how a host and a router make packet routing decisions by consulting their respective routing tables:

Example 1: PC1 wants to verify connectivity to its local default gateway at 192.168.10.1 (the router interface):

1. PC1 consults the IPv4 route table based on the destination IP address.

2. PC1 discovers that the host is on the same network and simply sends a ping packet out of its interface (On-link).

3. R1 receives the packet on its Gigabit Ethernet 0/0 (G0/0) interface and looks at the destination IP address.

4. R1 consults its routing table.

5. R1 matches the destination IP address to the L 192.168.10.1/32 routing table entry and discovers that this route points to its own local interface, as shown in Figure 1.

6. R1 opens the remainder of the IP packet and responds accordingly.

Example 2: PC1 wants to send a packet to PC2 (192.168.11.10):

1. PC1 consults the IPv4 route table and discovers that there is no exact match.

2. PC1 therefore uses the all route network (0.0.0.0) and sends the packet using the local default route (192.168.10.1).

3. R1 receives the packet on its Gigabit Ethernet 0/0 (G0/0) interface and looks at the destination IP address (192.168.11.10).

4. R1 consults its routing table and matches the destination IP address to the C 192.168.11.0/24 routing table entry, as shown in Figure 2.

5. R1 forwards the packet out of its directly connected Gigabit Ethernet 0/1 interface (G0/1).

6. PC2 receives the packet and consults its host IPv4 routing table.

7. PC2 discovers that the packet is addressed to it, opens the remainder of the packet, and responds accordingly.

Example 3: PC1 wants to send a packet to 209.165.200.226:

1. PC1 consults the IPv4 route table and discover that there is no exact match.

2. PC1 therefore uses the default route (0.0.0.0/0) and sends the packet using the default gateway (192.168.10.1).

3. R1 receives the packet on its Gigabit Ethernet 0/0 (G0/0) interface and looks at the destination IP address (209.165.200.226).

4. R1 consults its routing table and matches the destination IP address to the C 209.165.200.224/30 routing table entry, as shown in Figure 3.

5. R1 forwards the packet out of its directly connected Serial 0/0/0 interface (S0/0/0).

Example 4: PC1 wants to send a packet to the host with IP address 10.1.1.10:

1. PC1 consults the IPv4 route table and discovers that there is no exact match.

2. PC1 therefore uses the all route network (0.0.0.0) and sends it to its local default route (192.168.10.1).

3. R1 receives the packet on its Gigabit Ethernet 0/0 (G0/0) interface and looks at the destination IP address (10.1.1.10).

4. R1 consults its routing table and matches the destination IP address to the D 10.1.1.0/24 routing table entry, as shown in Figure 4.

5. R1 discovers it has to send the packet to the next-hop address 209.165.200.226.

6. R1 again consults its routing table and matches the destination IP address to the C 209.165.200.224/30 routing table entry, as shown in Figure 4.

7. R1 forwards the packet out of its directly connected Serial 0/0/0 interface (S0/0/0).