Previous Table of Contents Next


Configuring in Comfort

You’ll definitely need to get well acquainted with your router or switch documentation. Although the theory behind routers and switches is the same, the way each switch or router is configured differs as much as a Philip Glass libretto differs from The Magic Flute. This will be particularly true if you have a limited opportunity to play with your device—for example, when you come into the picture after it has been installed and gone into production. (People have no sense of humor about these things. Once any device is in production, for some reason, it’s considered rude to start arbitrarily changing things to see what happens.)


In all seriousness, if you can get a hold of the device before it goes into production, so much the better. Being familiar with the commands, error-reporting facilities, and configuration procedure of a device makes you much more able to handle problems as they come up during production.

One thing is reasonably consistent among routers and switches—they are all usually configurable via the following items:

  Telnet
  The Web
  A dumb terminal

The dumb terminal option is the most universal—it allows you to communicate with the device even if the network is down.


If your switch or router has a dumb terminal mode, you can connect your PC’s serial port to it using a null modem cable (available at most Radio Shacks or computer supply stores). The connection at the device will either be DB-9 (male) or DB-25 (male); if the connection is something else, it’s probably not a dumb terminal port.

After you connect the cable, you can then use just about any modem program (ProComm, HyperTerminal, NetTerm, and so on) to connect to it. The most common settings for dumb terminal mode are as follows: 8 data bits, no parity, one stop bit, 9600bps. This is sometimes written as 9600-8-N-1.



For some crazy reason, most routers and switches don’t allow for backup of their configuration information. So no, you can’t hook up a tape drive to a router or switch, and most of them (though not all) won’t let you download their configurations to a server that does have a tape drive on it. (Were routers and switches invented by Russian Roulette junkies?)

Bottom line: Make sure you have all configuration information well documented. You can usually do a SHOW CONFIGURATION command while logged into the router; if you capture this to a file with your terminal program, you can print it out as a poor man’s backup. Regardless, switches and routers are particularly crucial places to keep good change logs.


Router Theory

Each router listens on each one of its multiple interfaces for route requests. Remember from Hour 1, “The Telephone Analogy: Becoming Familiar with Basic Networking Concepts,” how we discussed that a packet is the smallest unit of communication between two network cards? Well, when a network card gives the router a packet destined for a different network segment, the router must make a decision as to which of its network interfaces that packet must go out of. If the router is connected directly to the destination segment, it just plops it out of the interface that’s connected to that segment; otherwise, it must hand it off to another router that is attached to that segment (or is closer to the directly connected router).

Think of the packet as being like you as a teenager, but without a car. You can walk anywhere you like locally, but to go to your friend’s house on the other side of town, you need to ride the bus. You can pick up your local bus line, but you might have to transfer to one or more different bus lines to reach your final destination.


How does each workstation know the protocol address of its router? Most times, an administrator has entered the address into the workstation’s configuration. But you should know that there’s also something called router discovery, which allows the workstation to search for a router on the subnet.

Routing Tables

Obviously, if the router has a direct connection to a particular segment, it knows how to route the packet there. But what if the router you hand the packet to isn’t directly connected to the destination segment? How does the router know which “bus line” the packet should take?

Each router maintains an internal table of every network that it knows about. This is called a routing table. The routing table consists of a list of network numbers, which interface or router this network number is reachable through, and how costly this route is in terms of time or distance. A routing table for Router 1 in Figure 14.3 is shown in Table 14.1.


Figure 14.3  A sample routed network.

Table 14.1 Routing Table for Router 1

Network Next Hop Metric

192.168.1.0 192.168.1.1 0 (Direct)
192.168.2.0 192.168.2.1 0 (Direct)
192.168.3.0 192.168.2.2 1
192.168.4.0 192.168.2.2 2


Depending on your router, the words next hop in the router table might be replaced with words such as destination or gateway address. The word metric might be listed as cost. In this case, metric refers to how many hops away the network is from the router.

For example, look at the map in Figure 14.3 and count how many other routers you must go through to get from Router 1 to 192.168.1.0. Trick question: You don’t have to go through any other routers, so the hop count is 0. How many from Router 1 to 192.168.3.0? Right, one hop—through Router 2.


The format of this table will differ depending on what type of router Router 1 is, but the content will be similar. Notice that a routing table can list only “next hop” destinations that are directly reachable by that router. In other words, a router only objectively knows about networks that it’s physically connected to, just like a city bus “knows” about only transfer points that exist on streets on its route. All other networks are reachable by routers that are connected to a subnet that this router is connected to.


Previous Table of Contents Next