Routing to Nearby Places
Imagine a sleepy little town with a couple of fellows sitting
around at the only gas station. Because I grew up in a town like that, I'll call
the town Snellville, after my hometown. These guys are just talking, waiting
around for the next customer.
A stranger drives up, rolls down his window, and asks, "Excuse
me. Can you tell me how to get to Snellville?" I'm sure a dozen funny or
sarcastic answers would probably leap to mind, but the fellows at the gas
station would eventually tell the stranger that he had just missed the sign that
told him he was already in Snellville. No need to drive any further!
Interestingly, routers first fill their routing tables based on
a similar concept. Each router knows which of its physical interfaces are up and
working. It knows the IP addresses used on each interface. Each router also
knows what IP networks or subnets exist on the physical networks that are
connected to those interfaces. The router can add a route to the subnet that
exists on the physical networks to which it is attached.
Before a router can add routes to these subnets, it must have
an IP address assigned to each network interface. When you buy a brand new
router, it doesn't know which IP addresses you want it to use. A network
engineer needs to somehow tell the router which IP addresses to use; to do so,
the engineer configures the router.
Configuring a router means that
the engineer connects to the router and types in some information about what the
router should do. For instance, in Figure
12-1, R1 needs to know its IP addresses for interfaces Ethernet1 and
Ethernet2. When the engineer configures the IP address for each interface, he
also (coincidentally) tells the router which subnets or networks are attached to
those two interfaces. Figure 12-1 shows
the basic concepts.