LAN switching is a form of packet switching used in Local Area Networks. LAN switching is performed using hardware at the Data Link Layer. Because LAN switching is hardware-based, it uses MAC addresses, which are used by LAN switches to forward frames.
LAN switches provide much higher port density at a lower cost than traditional bridges, which allows LAN switches to accommodate network designs featuring fewer users per segment (microsegmentation), thereby increasing the average available bandwidth per user. Switches can use three main forwarding techniques, as follows:
- Store-and-Forward Switching
- Cut-Through Switching
- Fragment-Free Switching
Store-and-Forward Switching
This LAN switch forwarding method copies the entire frame into the switch buffer and performs a Cyclic Redundancy Check (CRC) for errors within the frame. Because of the CRC, this method of forwarding is the slowest and most processor-intensive.
However, the plus side to this method is that it is also the most efficient because it avoids forwarding frames with errors. For example, if a received frame is less than 64 bytes in length (which is considered a runt) or more than 1518 bytes in length (which is considered a giant), then the switch will discard the frame.
Cut-Through Switching
In cut-through switching, the frame header is inspected and the Destination Address (DA) of the frame is copied into the internal memory of the switch before the frame is forwarded.
Because only the frame header is inspected before the switch begins to forward the frame, once it reads the destination MAC address, this forwarding method is very fast and reduces latency, which is the amount of time it takes a packet to travel from source to destination.
This is the fastest switching method and is sometimes referred to as Fast Forward or Real Time switching. However, with speed comes some consequence in that the switch also forwards frames with errors. It is up to the destination switch to discard received frames with errors.
Fragment-Free Switching
Fragment-free switching waits for the collision window, which is the first 64 bytes of a frame, to be accepted before forwarding the frame to its destination. The fragment-free switching method holds the packet in memory until the data portion reaches the switch.
This switching method was developed primarily to address and solve the problem encountered with late collisions, which occur when another system attempts to transmit a frame after a host has transmitted at least the first 60 bytes of its frame.
Any network device will create some latency, and switches are no exception. The cut-through and fragment-free switching methods were used primarily in older switches to reduce latency when forwarding frames. However, as faster processors and ASICs were developed and introduced into newer switches, latency became a non-factor. Instead, greater emphasis was placed on efficiency and data integrity, and, as a result, all new Cisco Catalyst switches utilize store-and-forward switching.
Symmetric and Asymmetric LAN Switching
LAN switching can be characterized based on the proportion of bandwidth that is allocated to each port. LAN switching can therefore be classified into one of two categories, as follows:
- Symmetric LAN Switching
- Asymmetric LAN Switching
Symmetric switching provides evenly distributed bandwidth to each port on the switch. A symmetric LAN switch provides switched connections between ports with the same bandwidth, such as all FastEthernet ports, for example. Symmetric switching is therefore optimized for a reasonably distributed traffic load, such as one found in a peer-to-peer desktop environment. This concept is illustrated in Figure 1-11 below:
The diagram above illustrates a typical peer-to-peer LAN using symmetric switching. The symmetric LAN switch provides switched connections between the 100Mbps ports.
Asymmetric switching provides unequal bandwidth between ports on a switch. An asymmetric LAN switch provides switched connections between ports of different bandwidths, such as a combination of Ethernet, FastEthernet, and even GigabitEthernet ports, for example. This type of switching is also called 10/100/1000 switching in that some hosts may be using 10Mbps connections, others 100Mbps connections, and others 1000Mbps connections. This is the most common type of switching.
Asymmetric switching is optimized for client-server environments in which multiple clients simultaneously communicate with a server, which requires that more bandwidth be dedicated to the server port to prevent a bottleneck at that port. The asymmetric switching concept is illustrated in Figure 1-12 below:
In the diagram illustrated above, asymmetric switching is being used in a client-server environment. The client machines are all connected using FastEthernet links, while the server is connected using a GigabitEthernet link. The asymmetric LAN switch provides switched connections between the different bandwidth ports.
An internetwork consists of different types of media, such as Ethernet, Token Ring, and FDDI, connected together by routers, enabling these different standards to communicate in a manner that is transparent to the end user. The term ‘internetworking’ refers to the industry, products, and procedures that meet the challenge of creating and administering internetworks.
A switched internetworking solution is comprised of both routers and switches. The routers and switches used within the internetwork are responsible for the following:
- The switching of data frames
- The maintenance of switching operations
The switching of data frames typically is performed in a store-and-forward operation in which a frame arrives on an input media and is transmitted to an output media. The two most common methods of switching data frames are Layer 2 switching and Layer 3 switching.
As described in the previous section, the primary difference between Layer 2 switching and Layer 3 switching is the information used to determine the output interface. In Layer 2 switching, the destination Layer 2 address (MAC address) is used to determine the egress interface of the frame, while in Layer 3 switching, the Layer 3 address (Network address) is used to determine the egress interface of the frame.
Switches maintain switching operations by building and maintaining switching tables, as well as by preventing loops within the switched network. Routers support switching operations by building and maintaining routing tables and service tables, such as ARP tables, for example. Within the switched internetwork, switches offer the following benefits:
- High bandwidth
- Quality of Service (QoS)
- Low cost
- Easy configuration
Routers (or Multilayer switches) also provide several benefits, which include the following:
- Broadcast prevention
- Hierarchical network addressing
- Internetworking
- Fast convergence
- Policy routing
- Quality of Service routing
- Security
- Redundancy and load balancing
- Traffic flow management
- Multimedia group membership
When designing a switched LAN, it is important to be familiar with the following:
- The differences between LAN switches and routers
- The advantages of using LAN switches
- The advantages of using routers
- The benefits of VLANs
- How to implement VLANs
- General network design principles
- Switched LAN network design principles
The Differences between Switches and Routers
In modern-day networks, Multilayer switches, such as the Cisco Catalyst 6500 series switches, merge router and switch functionality. Because of this blurred line, it becomes even more important for network engineers to have a solid understanding of the differences between LAN switches and network routers when it comes to addressing the following design concerns:
- Network loops
- Network convergence
- Broadcast traffic
- Inter-subnet communication
- Network security
- Media dependence
LAN switches use the Spanning Tree Protocol (STP) to prevent Layer 2 loops. This is performed by the Spanning Tree Algorithm (STA), which places redundant links in a blocked state. Although this does prevent network loops, it also means that only a subset of the network topology is used for forwarding data. Routers, on the other hand, do not block redundant network paths; instead, they rely on routing protocols in order to use the optimum path and to prevent loops.
A switched network is said to be converged when all ports are in a forwarding or blocking state, while a routed network is said to be converged when all routers have the same view of the network. Depending on the size of the switched network, convergence might take a very long time. Routers have the advantage of using advanced routing protocols, such as OSPF, that maintain a topology of the entire network, allowing for rapid convergence.
By default, LAN switches will forward Broadcast Multicast and unknown Unicast frames. In large networks with many of these types of packets, the LAN can become saturated quickly, resulting in poor performance, packet loss, and an unpleasant user experience. Because routers do not forward Broadcasts by default, they can be used to break up Broadcast domains.
Although multiple physical switches can exist on the same LAN, they provide connectivity to hosts on the assumption that they are all on the same logical network. In other words, Layer 2 addressing assumes a flat address space with universally unique addresses. Routers can use a hierarchical addressing structure, which allows them to associate a logical addressing structure to a physical infrastructure so that each network segment has an IP subnet. This provides a routed network a more flexible traffic flow because routers can use the hierarchy to determine optimal paths depending on dynamic factors, such as bandwidth, delay, etc.
Both LAN switches and routers can provide network security, but this is based on different information. Switches can be configured to filter based on many variables pertaining to Data Link Layer frames. Routers can use Network and Transport Layer information. Multilayer switches have the capability of providing both types of filtering.
When designing switched internetworks, it is imperative to ensure that network hosts use the MTU representing the lowest common denominator of all the switched LANs that make up the internetwork. When using switches, however, this results in poor performance and limits throughput, even on fast links. Unlike LAN switches, however, most Layer 3 protocols can fragment packets that are too large for a particular media type, so routed networks can accommodate different MTUs, which allow them to maximize throughput in internetworks.
Table 1-1 below lists the minimum and maximum frame size for common types of media that may be found within internetworks:
Table 1-1. Frame Size for Common Media Types
Media Type |
Minimum Valid Frame Size |
Maximum Valid Frame Size |
---|---|---|
Ethernet |
46 bytes |
1500 bytes |
Token Ring |
32 bytes |
16 KB theoretical, 4 KB normal |
Fast Ethernet |
46 bytes |
1500 bytes |
FDDI |
32 bytes |
4468 bytes |
Serial HDLC |
14 bytes |
No limit, 4.5 KB normal |
The Advantages of Using LAN Switches
LAN switches provide several advantages over bridges. These advantages include increased bandwidth to users via microsegmentation and supporting VLANs, which increase the number of Broadcast domains while reducing their overall size. In addition to these advantages, Cisco Catalyst switches also support Automatic Packet Recognition and Translation (APaRT).
Cisco’s APaRT technology recognizes and converts a variety of Ethernet protocol formats into industry-standard CDDI and FDDI formats. Not all switches can provide these functions.
The Advantages of Using Routers
Even within switched LANs, the importance of routers cannot be ignored. Routers, or Multilayer switches, provide the following critical functions in switched LANs:
- Broadcast and Multicast control
- Media transition
- Network segment services
By default, routers do not forward Broadcast or Multicast packets. Instead, routers control Broadcast and Multicast packets via the following three methods:
- By caching the addresses of remote hosts and responding on behalf of remote hosts
- By caching advertised network services and responding on behalf of those services
- By providing special protocols, such as IGMP and PIM
Both routers and Multilayer switches can be used to connect networks of different media types, such as Fiber, Ethernet, and Token Ring, for example. Therefore, if a requirement for a switched campus network design is to provide high-speed connectivity between different media, these devices play a significant part in the design.
Routers are also responsible for providing Broadcast services, such as Proxy ARP, to a local network segment. When designing the switched LAN, it is important to consider the number of routers that can provide reliable services to a given network segment or segments.
The Benefits of VLANs
VLANs solve some of the scalability problems of large, flat networks by breaking down a single bridged domain into several smaller bridged domains. However, it is important to understand that routing is instrumental in the building of scalable VLANs because it is the only way to impose hierarchy on the switched VLAN internetwork. The advantages provided by implementing VLANs include the following:
- They increase network security by logical segmentation.
- They increase network flexibility and scalability.
- They can be used to enhance or improve network performance.
- They reduce the size of broadcast domains.
- They allow for differentiation between traffic types, such as voice and data.
- They aid in the ease of network administration and management.