Addressing


Routing

This section examines how routers work and introduces routing tables and routing protocols.

Routers work at the OSI model network layer. The main functions of a router are first to determine the best path that each packet should take to get to its destination and second to send the packet on its way. Thus, a router's job is much like that of a worker at a post officeshe looks at the address label on the letter (the network layer address on the packet), determines which way the letter (the packet) should be sent, and then sends it. The comparison between the post office and a router is illustrated in Figure B-12.

Figure B-12. A Router Behaves Much Like a Worker at a Post Office


Note

This discussion of routers is concerned with the traditional role of routers in a network, at the OSI model network layer. Routers are now taking on more functions, for example, in QoS and security areas; these other functions are described in the relevant chapters throughout this book.


Routers Work at the Lower Three OSI Layers

The router doesn't care what is in the upper layerswhat kind of data is in the packetthe router is just responsible for sending the packet the correct way. The router does have to be concerned with the data link and physical layers, though, because it might have to receive and send data on different media. For example, a packet received on an Ethernet LAN might have to be sent out on a Frame Relay WAN, requiring the router to know how to communicate on both of these types of media. In terms of layers, therefore, a router decapsulates received data up to the network layer and then encapsulates the data again into the appropriate frame and bit types. This process is illustrated in Figure B-13, where the PC on the left is sending data to the PC on the right. The routers have determined that the path marked with arrows is the best path between the PCs.

Figure B-13. Router Works at the Network Layer


In this figure, notice that only the two PCs care about the upper layers, while all the routers in the path concern themselves with only the lower three layers.

Routing Tables

To determine the best path on which to send a packet, a router must know where the packet's destination network is.

Key Point

Routers learn about networks by being physically connected to them, or by learning about them either from other routers or from a network administrator. Routes configured by network administrators are known as static routes because they are hard-coded in the router and remain therestaticuntil the administrator removes them. Routes to which a router is physically connected are known as directly connected routes. Routers learn routes from other routers by using a routing protocol.


However routes are learned, routers keep the best path (or multiple best paths) to each destination in a routing table. A routing table contains a list of all the networks that a router knows how to reach. For each network, the routing table typically contains the following items:

  • How the route to the network was learned (for example, statically or by using a routing protocol).

  • The network address of the router from which the route to the network was learned (if applicable).

  • The interface (port) through which the network can be reached.

  • The metric of the route. The metric is a measurement, such as the number of other routers that the path goes through, that routing protocols use when determining the best path.

Note

The path that the router determines is the best depends on the routing protocol in use. For example, some routing protocols define best as the path that goes through the least number of other routers (the least number of hops), while others define best as the path with the highest bandwidth.


For example, in the network shown in Figure B-14, the metric used is hopsthe number of other routers between this router and the destination network. Both routers know about all three networks. Router X, on the left, knows about networks A and B because it is connected to them (hence the metric of 0) and about network C from Router Y (hence the metric of 1). Router Y, on the right, knows about networks B and C because it is connected to them (hence the metric of 0) and about network A from Router X (hence the metric of 1).

Figure B-14. Routers Keep Routing Information in Routing Tables


Routing Protocols

Routers use routing protocols to exchange routing information. Routing protocols allow routers to learn from other routers the networks that are available so that data can be sent in the correct direction. Remember that two routers communicating with each other must use the same routing protocol, or they can't understand each other.

The TCP/IP protocol suite includes the following routing protocols:

  • Routing Information Protocol (RIP), versions 1 and 2 (RIPv1 and RIPv2)

  • Interior Gateway Routing Protocol (IGRP)

  • Enhanced Interior Gateway Routing Protocol (EIGRP)

  • Open Shortest Path First (OSPF)

  • Integrated Intermediate System-to-Intermediate System (IS-IS)

  • Border Gateway Protocol (BGP) Version 4 (BGP4)

Note

These routing protocols are discussed further in Chapter 3.


The previous sections introduced the basics of routing and how routers learn about the networks that are available so that data can be sent along the correct path. Routers look at the destination address of the packet to determine where the packet is going so that they can then select the best route to get the packet there. The following section discusses these addresses.




Campus Network Design Fundamentals
Campus Network Design Fundamentals
ISBN: 1587052229
EAN: 2147483647
Year: 2005
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net