Troubleshooting the Network Layer
When troubleshooting, it is often necessary to verify the path to the destination network. Figure 1 shows the reference topology indicating the intended path for packets from PC1 to SRV1.
In Figure 2, the show ip route command is used to examine the IPv4 routing table.
The IPv4 and IPv6 routing tables can be populated by the following methods:
- Directly connected networks
- Local host or local routes
- Static routes
- Dynamic routes
- Default routes
The process of forwarding IPv4 and IPv6 packets is based on the longest bit match or longest prefix match. The routing table process will attempt to forward the packet using an entry in the routing table with the greatest number of far left matching bits. The number of matching bits is indicated by the route’s prefix length.
Figure 3 shows a similar scenario with IPv6. To verify that the current IPv6 path matches the desired path to reach destinations, use the show ipv6 route command on a router to examine the routing table. After examining the IPv6 routing table, R1 does have a path to 2001:DB8:ACAD:4::/64 via R2 at FE80::2.
The following list, along with Figure 4, describes the process for both the IPv4 and IPv6 routing tables. If the destination address in a packet:
- Does not match an entry in the routing table, then the default route is used. If there is not a default route that is configured, the packet is discarded.
- Matches a single entry in the routing table, then the packet is forwarded through the interface that is defined in this route.
- Matches more than one entry in the routing table and the routing entries have the same prefix length, then the packets for this destination can be distributed among the routes that are defined in the routing table.
- Matches more than one entry in the routing table and the routing entries have different prefix lengths, then the packets for this destination are forwarded out of the interface that is associated with the route that has the longer prefix match.
Troubleshooting Example
Devices are unable to connect to the server SRV1 at 172.16.1.100. Using the show ip route command, the administrator should check to see if a routing entry exists to network 172.16.1.0/24. If the routing table does not have a specific route to SRV1’s network, the network administrator must then check for the existence of a default or summary route entry in the direction of the 172.16.1.0/24 network. If none exists, then the problem may be with routing and the administrator must verify that the network is included within the dynamic routing protocol configuration, or add a static route.