Previous | Table of Contents | Next |
Lets follow a concrete example by tracing a packet through the network shown in Figure 14.3. The PC at point A wants to telnet to the UNIX server at point B. Because were talking about routing, we dont care about the specifics of the network conversation; we just want to trace how the call gets from point A to point B. Here are the steps:
If the destination network is not in the routing table, the router drops the packet and sends back a special IP packet saying that this destination is unreachable.
Network | Next Hop | Metric |
---|---|---|
192.168.2.0 | 192.168.2.2 | 0 (Direct) |
192.168.3.0 | 192.168.3.1 | 0 (Direct) |
192.168.1.0 | 192.168.2.1 | 1 |
192.168.4.0 | 192.168.3.2 | 1 |
Network | Next Hop | Metric |
---|---|---|
192.168.3.0 | 192.168.3.2 | 0 (Direct) |
192.168.4.0 | 192.168.4.1 | 0 (Direct) |
192.168.1.0 | 192.168.3.1 | 2 |
192.168.2.0 | 192.168.3.1 | 1 |
Of course, responses from the UNIX host destined for the PC at point A go from the UNIX host to Router 3, to Router 2, to Router 1, and then to the PC. This might seems confusing when you say it like that, but take a look at the map and refer to each routing table, keeping in mind that the destination is 192.168.1 this time, and youll see that each lookup will lead to the next correct router.
In real life, this can be somewhat more complicated. Instead of each routing table having four entries, they can have hundredsor even thousandsof entries. However, the basic principles are unchanged; much of what you need to figure out from a troubleshooting standpoint is how to command your router to show you what its routing table looks like. This way, you can do a sanity check on it. For example, if Router 1s table showed that the next hop to 192.168.4.0 was 192.168.2.10 (the file and print server), youd raise your eyebrows and start to investigate why Router 1 thought that the best way to 192.168.4 was through a server. (Going through a server isnt in itself terribleif the server is a multihomed server acting as a router to the proper network. But in this case, its a dead end.)
I heard you ask about four paragraphs ago, How does the routing table get built? I wasnt ignoring you; its a good question. To begin to answer it, lets discuss basic route entry types.
There are two types of routes that can be established in a routing table:
Theres one special static route youll want to know about called the default route. This is represented by the destination network 0.0.0.0 and is the route used when a packet has a destination that isnt covered by anything else in the routing table.
Routing protocols are based on the concept that each router knows which network it lives on, and that it can communicate which networks it knows about to other routers. Looking at Figure 14.3 again, it makes sense that Router 1 could tell Router 2 about the 192.168.1 network, and that Router 2 could tell Router 1 about the 192.168.3 networkalong with the 192.168.4 network, once Router 3 told Router 2 about it. Whoa. Its a good thing this happens more or less automatically, because in a large network, writing this out could get really hairy. Again, heres how dynamic routes would work in this sample network:
Router 1 | Tells Router 2 about 192.168.1 |
Router 2 | Tells Router 1 about 192.168.3 |
Tells Router 3 about 192.168.1 | |
Tells Router 1 about 192.168.4 | |
Router 3 | Tells Router 2 about 192.168.4 |
Previous | Table of Contents | Next |