Understanding the Role of Routers in Networks

Routers provide physical connectivity between networks by virtue of their physical attachments to either local-area networks (LANs), such as Token Ring or Ethernet, or wide-area networks (WANs), such as Frame Relay or ISDN.

A router can be used to connect only LANs together, only WANs together, or any other combination. The term physical connection should not be taken too literally. Many networks make use of Microwave links for WAN connectivity. This means that no actual physical connection exists between two connected routers communicating over microwave circuits.

The Router Interface

A router's attachment to a LAN or a WAN is usually referred to as an interface but may also be referred to as a port. For example, a connection to a Token Ring LAN is with a Token Ring interface. For consistency, the term interface is used throughout this book.

When discussing a router's connections to a network, it is common to say the following: "We connect the Finance department's Token Ring network to the corporate backbone via Bbone-1's first Token Ring interface." Bbone-1, in this case, is the logical name of a router in a corporate network. Routers are typically assigned names that provide some information about their locations and functions.

When a router is routing IP, each LAN or WAN it is connected to must have a unique IP network or subnetwork assigned to it. (In the case of some serial links, it must borrow an address from another interface. This borrowing, called IP unnumbered, is covered in Chapter 4, "Using IP Unnumbered and VLSM." Each interface on the router must have a valid IP host address for the subnet it is attached to. In most cases, a router can have only one connection to any single subnet. (One exception to this rule is that Cisco routers allow up to four serial links to share the same subnet, provided that they all terminate at the same destination router.)

Network Layer Addresses

In addition to providing physical connectivity between networks, routers also possess the capability to move information across multiple networks by forwarding datagrams based on their network layer addresses. In this case, the network layer is the third layer in the OSI seven-layer model. For IP, the layer three addresses are 32-bit binary numbers.

Datagrams

The term datagramis commonly used to describe any information generated by a higher-layer application or protocol that is being handled at the network layer in the OSI model. One example of a datagram is a Telnet login request from a host to a remote UNIX server.

The users indicate via their Telnet application—Telnet being an application layer function—that they want to log in to a server. The Telnet application passes this request to the next lower layer in the protocol stack—TCP, in this case—and waits for a response from the remote system.

The TCP layer adds its own information to what it received from the Telnet application and hands this combined message to the IP layer—the network layer—of the protocol stack. TCP will hold on to the request it received from Telnet in case the first attempt to contact the remote host fails. The message the IP layer receives from Telnet and TCP is called the datagram. The term packetis often used interchangeably with datagram.

Note

It is important to understand that IP datagrams are connectionless. This means that they are delivered once by the originator's IP layer and then discarded. If the destination host does not receive the datagram, some higher-layer protocol or application on the host that created the datagram must try again or give up.


If the destination host had not received the original IP datagram in the previous example, TCP would have made at least one more attempt to initiate the login. TCP would have handed another copy of its information to the IP layer, and IP would have attempted to deliver the datagram again.

Note

Using the example of users attempting to log in to a remote server with Telnet to explain datagrams necessarily omits many of the actual details involved in establishing a Telnet session. See Network Protocol Handbook by Matthew Naugle, published by McGraw-Hill (ISBN 0-07-046461-8) for more information on this subject.


When routers forward datagrams based on their level three addresses, all layer two information that arrived with the packet is discarded. The router recreates the required layer two information before forwarding the datagram to the next router, which allows routers to connect networks with different layer two frame and addressing formats. Sometimes certain routers are deployed only for the purpose of connecting dissimilar LAN or WAN types because it is usually impossible to bridge routable protocols (protocols with layer three addresses) in these situations.

MAC Addresses

Some routers are also able to move information across networks by forwarding frames based on their layer two addresses, which are more commonly known as MAC(Medium Access Control) addresses.

This activity is really bridging, not routing. Bridges forward frames based on their layer two addresses and leave the layer two packet and addressing formats unchanged. It is usually impossible for a host on an Ethernet network to exchange information with a host on a Token Ring network when one or more routers (acting as bridges) exists between them. The exception is when a bridge or a router acting as a bridge is set up to translate layer two addresses and frame formats between different types of LANs or WANs.

Several years ago, an attempt was made to call devices that performed both routing and bridging functions brouters. This never really took off. However, it is important to distinguish between a protocol being bridged or routed when configuring routers and a protocol being bridged or routed when troubleshooting network problems. Some protocols, such as DEC LAT, IBM SNA, and NetBIOS over 802.2, do not have layer three addresses and thus must be bridged using their layer two addresses. Routable protocols, such as IP and Novell's IPX, can be either bridged or routed.

Note

Many routers are not capable of bridging routable protocols between Ethernet and Token Ring. Ethernet and Token Ring use different bit ordering at the physical layer, which causes the MAC addresses to be ordered in opposite directions. When translating between Token Ring and Ethernet LANs, routers acting as translational bridges would have to modify layer three and higher information in certain datagrams passed between IP, AppleTalk, or IPX hosts to make this connectivity possible. No agreed-upon standard exists for performing this function. In many cases, vendors are unwilling to create proprietary code and instead tell their customers that they need to route protocols in this situation. See Chapter 7, "Bridging IP Between Dissimilar Media," for more information on this subject.


IP Address Formats

IP addresses are typically written in a format known as dotted decimal to avoid working with binary numbers (for example, writing 201.124.76.210 instead of 11001001.01111100. 01001100.11010010). Each of the four sections of the address represents one byte or eight bits. See Chapter 8, "Hexadecimal and Binary Numbering and IP Addressing," for more information on converting IP addresses from dotted decimal to binary format.

IP addresses are broken into two sections: a network section and a host section. Routers make decisions on forwarding datagrams based on the network portion of the IP address. The amount of an IP address allocated to the network portion is determined by the class of IP address in use and the subnet mask applied to it.

Assume, for example, that the address shown previously— 201.124.76.210—has a subnet mask of 255.255.255.0. The subnet mask associated with this address (255.255.255.0) tells the router where the network portion stops and the host portion begins.

The router would only have to know where addresses with the prefix (network portion) 201.124.76.0 exist and forward the datagram accordingly. It is not necessary for the router to keep track of the entire address.

Network prefixes are stored in a router's memory in what is usually referred to as a routing table. The information a routing table contains can be learned by listening to information provided by other routers via a dynamic routing protocol (such as RIP or OSPF) or by information coded directly into it. Don't worry if you don't understand this completely yet. It should become clearer as the chapter progresses.

Network Reference Models

Figure 1-1 shows a representation of the OSI (Open System Interconnection) seven-layer model.

The layers are as follows:

  • Layer 7: Application layer

  • Layer 6: Presentation layer

  • Layer 5: Session layer

  • Layer 4: Transport layer

  • Layer 3: Network layer

  • Layer 2: Data link layer

  • Layer 1: Physical layer

Figure 1-1. A representation of the OSI seven-layer model. All layers are independent of on another.


It is important to note that, with few exceptions, most networks today are not based on the OSI seven-layer model. Instead, they are based on the IEEE LAN reference model or the Ethernet II standard.

Token Ring 802.5 and Ethernet 802.3 are two common IEEE LAN RM network protocols. Neither of these models contains a definition of the network layer or any layer above the network layer. The most common network layer protocols in use today are either proprietary, such as IPX, Appletalk, or part of an open standard, such as IP.

The IEEE LAN reference model consists of two primary layers, with the top layer broken into two sublayers. The bottom layer, called the physical layer, performs roughly the same function as its OSI equivalent. The top layer consists of two sublayers: a MAC sublayer and a logical link control sublayer (802.2), which is on top. These two sublayers combine to make up what the OSI model calls the data link layer, although the functions performed are not exactly the same.Figure 1-2 is a representation of this model.

Figure 1-2. The IEEE LAN reference model.


The Ethernet II (DIX) model is the simplest of the two models. It contains a physical layer and a MAC layer. It was developed by Digital, Intel, and Xerox in the '70s.Figure 1-3 shows a representation of this model and compares it to the 802.5 Token Ring model and the 802.3 Ethernet model.

Note that no (802.2) data link layer is in the Ethernet II model.

Figure 1-3. A comparison of the three most common LAN protocols.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.141.6