advertisement

Print
Networking as a 2nd Language

Layer 3 Switching -- Introducing the Router

04/13/2001

In this installment of Networking as a 2nd Language, we're going to take a look at the network device that helped catapult the Internet phenomenon, the router.

We’ll examine the technology that our fictitious Sprockets corporation must implement to connect to the World Wide Web. In earlier installments of this series, we watched as the Sprockets corporation grew, and with their success, they developed a complicated layer 2 switching topology comprised of ATM, to Uncle Fred’s manufacturing robots, a token ring for finance and purchasing, and Fast Ethernet for the server farm.

Since Sprockets is a family-run business, they have now decided to solicit the help of Nanna Spacely, who is preparing for her network engineer certification. Her background will be instrumental in helping them decide if they can continue to grow with a layer 2 switching architecture, of if they need to add routers to their topology.

Network layer switching

What's the difference between a switch and router? A switch is a layer 2 device with physical ports. A layer 2 switch communicates using frames on the wire at layer 1.

A router is a layer 3 device, which communicates with packets. A packet is encapsulated inside of a frame. A router has interfaces for connection into the network medium. For a router to route over Ethernet, it requires an Ethernet interface. A token ring interface is required for token ring, a frame relay interface for frame relay and so forth.

A simple network comprised of two network segments is shown in Figure 6-1. The router has two Ethernet interfaces, labeled E0 and E1.

Diagram of a simple two-segment network with a layer 3 router.
Figure 1. Diagram of a simple two-segment network with a layer 3 router.

The true function of the router is not clearly depicted in our simple network diagram. The primary function of the router is to determine the best network path in a complex network. The router achieves this with routing algorithms and routing protocols. Commonly used routing protocols include Routing Information Protocol (RIP), Open Shortest Path First (OSPF), Interior Gateway Routing Protocol (IGRP) and Border Gateway Protocol (BGP). Routing protocols transmit information about the network.

Packet delivery in layer 3

Information in layer 3 is transmitted through the network in quantized packets. This method of transport is called packet switching. Figure 6-2 shows how a packet is delivered in the Sprocket’s network. Host A is on the manufacturing Ethernet segment and Host B is on the purchasing token ring segment. Host A places an Ethernet frame onto the wire. The frame encapsulates an Internet Protocol (IP) packet.

Packet switching on between an Ethernet and token ring network.
Figure 2. Packet switching between an Ethernet and token ring network.

The Ethernet frame contains a source layer 2 MAC address and a destination layer 2 MAC address. The IP packet contains a source layer 3 IP address and a destination layer 3 IP address. The router maintains a routing table of network paths it has discovered. The router will examine the layer 3 IP destination address of the packet. It will examine the routing table and determine if a path exists.

In this case, Host B is on a token ring network segment directly connected to the router. The router will forward the packet from interface Ethernet 0 and place it on interface token ring 0. Host B will then see a token ring frame that contains its MAC address and process it. Notice that the original frame was Ethernet and the final frame is token ring encapsulating an IP packet. This is one of the powerful features of a network router. When the packet arrives on one interface and is forwarded to another, this is called layer 3 switching.

Pages: 1, 2

Next Pagearrow