background image
34
Chapter 2
Routing Principles
If a network is directly connected, it will always use the interface con-
nected to the network. If an administrator configures a static route, the
router will believe that route over any other learned routes. However, you
can change the administrative distance of static routes, but, by default, they
have an administrative distance of 1.
Packet Switching
After a router is started up, the routing protocol tries to establish neighbor
relationships in order to understand the network topology and build the
routing table. All routing protocols perform this differently; for example,
some use broadcast addresses to find the neighbors and some use multicast
addresses.
Once the neighbors are found, the routing protocol creates a peer rela-
tionship at Layers 4 through 7 of the OSI model. Routing protocols either
send periodic routing updates or exchange Hello messages to maintain the
relationship.
Only after the topology is completely understood and the best paths to all
remote networks are decided and put in the routing table can the forwarding
of packets begin. This forwarding of packets received on an interface to an
exit interface is known as packet-switching.
There are four basic steps for a router to packet switch:
1.
The router receives a frame on an interface, runs a CRC (cyclic redun-
dancy check), and if it is okay, checks the hardware destination
address. If it matches, the packet is pulled from the frame. The frame
is discarded and the packet is buffered in main memory.
2.
The packet's destination logical address is checked. This address is
looked up in the routing table for a match. If there is no match, the
packet is immediately discarded and an ICMP message is sent back to
the originating device. If there is a match, the packet is switched to the
forwarding interface buffer.
3.
The hardware address of the next-hop device must be known. The
ARP cache is checked first and if it is not found, an ARP broadcast is
sent to the device. The remote device will respond with its hardware
address.
4.
A new frame is created on that interface and the packet is placed in this
frame. The destination hardware address is the address of the next-
hop device. Notice that the packet was not altered in any way.
Copyright ©2001 SYBEX , Inc., Alameda, CA
www.sybex.com