Network devices can be categorized based on their function relative to the OSI model. The main devices are the following:
•
Hubs and repeaters•
Bridges and Layer-2 switches•
Routers and Layer-3 switchesCore
(high-speed switching)
Distribution
(route policies, access lists)
Access
(local/remote)
Hubs and Repeaters
Repeaters operate in the physical layer of the OSI model. They basically repeat the data (bits) from one port to all other ports. Hubs are repeaters with many ports that were created to concentrate the wiring into a communication closet. These devices are not aware of frames or packets; they amplify the signal and send out all ports. Repeaters do not delineate broadcast or collision domains. Figure 2-5 shows that all devices connected to a repeater are in the same collision domain; they all compete for the same bandwidth. Repeaters are said to be protocol transparent because they are not aware of upper-layer protocols, such as IP, IPX, DECnet, and so on.
Figure 2-5 Repeaters
Bridges and Layer-2 Switches
Bridges operate in the data-link layer of the OSI model. Bridges learn the MAC layer addresses of each node of the segments and remember off which port the MAC addresses are located. The bridge builds a table of MAC addresses and ports. If the destination MAC address of an incoming frame is not in the table, bridges forward the frame to all ports (minus the port from which the frame came). If the destination MAC address is in the table, bridges forward the frame only if the destination MAC address is on another port. Bridges filter the frame if the destination MAC address is located on the same port on which the frame arrived.
Bridges are store-and-forward devices. They store the entire incoming frame and verify the checksum before forwarding the frame. If a checksum error is detected, the frame is discarded. Figure 2-6 shows that bridges define the collision domains; each port off a bridge is a separate collision domain. Collision domains are also referred to as bandwidth domains because all devices in the collision domain share the same bandwidth. Bridges do not control broadcasts. Bridges flood broadcasts out all ports. Bridges are protocol transparent; they are not aware of upper-layer protocols, such as IP and IPX. Bridges are designed to flood all unknown and broadcast traffic.
Repeaters
Collision Domain Broadcast Domain
General Routing Concepts 37
Figure 2-6 Bridges Control Collision Domains
Switches use fast integrated circuits that reduce the latency common to regular bridges. Switches are the evolution of bridges. Some switches have the capability to run in cut-through mode where the switch does not wait for the entire frame to enter its buffer; instead, it begins to forward the frame as soon as it finishes reading the destination MAC address. Cut-through operation increases the probability that error frames are propagated on the network because the frame is forwarded before the entire frame is buffered and checked for errors. Because of these problems, most switches today perform store-and-forward operations as bridges do. Switches are exactly the same as bridges with respect to collision domain and broadcast domain characteristics. Each port on a switch is a separate collision domain. All ports in a switch are in the same broadcast domain.
Various types of bridges exist, including transparent, translational, source-route, and so on. These bridging types are covered in Chapter 4.
Routers and Layer-3 Switches
Routers operate in the network layer of the OSI model. They make forwarding decisions based on network layer addresses (e.g., an IP address). Figure 2-7 shows that routers define both colli- sion (bandwidth) and broadcast domains. Each router interface is a separate broadcast domain that is defined by a separate sub-network. Routers are protocol aware, which means that they are capable of forwarding packets of routable protocols such as IP, IPX, DECnet, and AppleTalk. Figure 2-7 Routers Define Collision and Broadcast Domains
Bridges
Collision Domains Broadcast Domain
Routers
Collision and broadcast domains
Routers are configured to run routing protocols to determine the best paths to a destination. Routers exchange information about destination networks and their interface status by using these routing protocols. Routers can also be configured manually with static routes. Some IP routing protocols are the following:
•
Routing Information Protocol (RIP)•
Interior Gateway Routing Protocol (IGRP)•
Open shortest Path First (OSPF)•
Intermediate System-to-Intermediate System (IS-IS)•
Enhanced Interior Gateway Routing Protocol (EIGRP)•
Border Gateway Protocol (BGP)These protocols are discussed in Chapter 7, Chapter 8, and Chapter 9.
LAN switches that are capable of running routing protocols are called Layer-3 switches. They run the full routing protocols and can communicate with routers as peers. Layer-3 switches off-load local traffic from wide-area network (WAN) routers by performing network-layer forwarding within the local-area networks (LANs). Both routers and Layer-3 switches make forwarding decisions based on IP addresses and not MAC addresses. Both participate in the exchange of route information based on the dynamic routing protocol they participate in.
The Difference Between Layer-2 Switching and Routing
The most obvious difference between Layer-2 switching and routing is that switching occurs at Layer 2 of the OSI reference model and routing occurs at Layer 3. Switches forward frames based on MAC address information. Routers forward packets based on logical addresses (IP address).
NOTE Throughout this book, switching means bridging, unless you see the term Layer-3 switching.