Routing problems can occur when either the host's or router's routing tables contain information that does not reflect the correct topology of the internetwork.
During the router routing process, the packets are forwarded in the optimal direction according to the information in the local routing table. If the routing table entries on all the routers are correct, the packet takes the optimal path from the source to the destination. However, if any routing table entries are not correct, either through a misconfiguration or through learned routes that do not accurately reflect the topology of the internetwork, then routing loops can form. A routing loop is a path through the internetwork for a network ID that loops back onto itself.
Figure 1.6 illustrates a routing loop in which:
According to the routing table on Router 1, the optimal route to Network 10 is through Router 2.
According to the routing table on Router 2, the optimal route to Network 10 is through Router 3.
According to the routing table on Router 3, the optimal route to Network 10 is through Router 1.
The hop count in the network layer header is used to prevent the packet from perpetually looping. Each time a router passes the packet from one network to another, it either increases or decreases the hop count. If the hop count reaches its maximum value (when increasing) or is 0 (when decreasing), the packet is discarded by the router.
For example, IPX hosts send IPX packets with a 0 hop count. Each RIP for IPX router increases the hop count by one. When it reaches 17, the packet is silently discarded. When IP hosts send IP packets, they set a maximum link count in the Time-to-Live (TTL) field in the IP header. Each IP router encountered decreases the TTL by one. When the TTL is 0, the IP router discards the packet and sends an ICMP Time Exceeded message back to the sending host. By default, Windows NT version 4.0 and later TCP/IP hosts set the TTL to the value of 128.
Figure 1.6 A Routing Loop
Common internetworking protocols such as IP and IPX are connectionless, datagram-based protocols. They do not guarantee a successful delivery. IP and IPX attempt a best effort, unacknowledged delivery to the next hop or the final destination. This behavior can lead to conditions on the internetwork in which data is lost.
If a downstream router goes down and is not detected by the upstream router, the upstream router still forwards the packets to the downed router. Because the failed downstream router does not receive them, the packets forwarded by the upstream router are dropped from the internetwork. The upstream router is sending packets to a black hole, a condition of an internetwork where packets are lost without an indication of the error. In Figure 1.7, Router 1 has not been informed that Router 2 has failed and continues to forward packets to Router 2. The failed Router 2 creates a black hole.
Figure 1.7 Routing Black Hole
Black holes can form when a link or router fails, and the failure is not yet detected. In a static routing environment, black holes persist until the link or router is brought back up or the static routers are reconfigured by the network administrator. In a dynamic routing environment, routers sense downed links or routers through the expiration of the lifetime of learned routes in their routing tables.
Black holes can also form when an active router discards packets without indicating the reason why the packets are being discarded. A good example is a Path Maximum Transmit Unit (PMTU) black hole router that discards IP packets that must be fragmented without sending a message to the sender indicating the error. PMTU black hole routers can be difficult to detect because packets of smaller sizes are forwarded. For more information about this specific issue, see the "TCP/IP Troubleshooting" chapter in the TCP/IP Core Networking Guide .