Layer 3 Switching — Introducing the Router

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.

Relaying packets and hop counts

Routers maintain information about other routers in the network. A router that is on the same network segment as another router is said to be a routing neighbor. A distance metric is assigned to the neighbor router. This distance metric is called a hop.

Neighboring routers are said to be one hop away from the local router. Figure 6-3 reflects the upgraded Sprocket’s LAN with routers connected to the corporate Fast Ethernet backbone. A TCP/IP packet from a host on the manufacturing segment is being sent to the IBM front end processor on a token ring segment in the Sprockets data center.

The manufacturing router examines its routing table and sees that the IBM router is one hop count away on interface Fast Ethernet 0. No other paths are available in the table. The packet is then forwarded out the manufacturing router Fast Ethernet interface and sent to the IBM router.

A packet from a manufacturing host will hop once to get to the IBM FEP.
Figure 3. A packet from a manufacturing host will hop once to get to the IBM FEP.

In a more hierarchical topology, where there are significantly more routers, the server farm router may have reported a hop count of 2. The IBM router may have reported a hop count of 3 and the WAN router a hop count of 3. In this circumstance, the packet would have been forwarded on to the server farm router, which reported a better path of only two hops to the destination network segment.

In complex routing environments, such as the Internet, the packet is relayed incrementally, hop by hop (router by router) until it reaches its destination segment. How is this accomplished? The IP packet has a header field that contains the source and destination IP address. This is a network layer process; the destination IP address in the header is examined each time it enters the interface of a router. The routing table is consulted for which interface to forward the packet out to.

Autonomous networks

Nanna has her work cut out for her. She must now design an autonomous system (AS) for the new Sprocket’s WAN-LAN strategy. There are ATM-WAN routers that connect Uncle Fred’s network. There are redundant routers connecting the manufacturing LAN to the data center. All these routers will be exchanging routing information using the same routing protocol.

Nanna must assign this autonomous system a unique number and she must select an interior routing protocol. Nanna selects IGRP as her interior routing protocol. An interior routing protocol manages an autonomous system, such as her corporate network. Her service provider uses an exterior routing protocol, such as BGP, to manage all their customers’ autonomous systems. Nanna will have to incorporate a strategy to redistribute her IGRP autonomous system routes into the service provider’s BGP routes. BGP and IGRP are different routing protocols and don’t explicitly communicate with each other. This route redistribution will allow Nanna the capability of accessing her network via her cable modem in her retirement home. Obviously, security risks exist with this topology, but we are using it for demonstrative purposes.

Next installment we’ll delve into the realm of routing and routed protocols. We’ll also take a closer look at how Nanna implements her autonomous network. Until then…


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: