Local Area Network (LAN) technology has made a significant impact on almost every industry. The operations of these industries depend on computers and networking. The data is stored on computers rather than on paper, and the dependence on networking is so great that banks, airlines, insurance companies, and many government organizations would stop functioning if there were a network failure. Since, the reliance on networks is so great and the network traffic is increasing, we have to address some of the bandwidth problems this has caused and find ways to tackle them. LAN switching is a form of packet switching used in local area networks; it is a technology that promises to increase the efficiency of local area networks and solve the current bandwidth problems. In this article we are going to see how LAN switching works. Why we have used a switch, not a bridge?

CCNA Training – Resources (Intense)

A LAN switch is a device that provides much higher port density at a lower cost than traditional bridges. For this reason, LAN switches can accommodate network designs featuring fewer users per segment, thereby increasing the average available bandwidth per user.

Each user receives instant access to the full bandwidth and does not have to contend for available bandwidth with other users. As a result, collisions (a normal phenomenon in shared-medium networks employing hubs) do not occur, as long as the equipment operates in full-duplex mode. A LAN switch forwards frames based on either the frame’s Layer 2 address (Layer 2 LAN switch) or, in some cases, the frame’s Layer 3 address (multilayer LAN switch).

Previously, a switch was used in only L2, but now an L3 switch has the capability of routing, too. So we are going to investigate details about the two different switches, L2 and L3.

L2 Switching

Layer 2 switching uses the media access control address (MAC address) from the host’s network interface cards (NICs) to decide where to forward frames. Layer 2 switching is hardware-based, which means that switches use application-specific integrated circuit (ASICs) to build and maintain filter tables (also known as MAC address tables or CAM tables). One way to think of a Layer 2 switch is as a multiport bridge.

Layer 2 switching provides the following

  • Hardware-based bridging (MAC)
  • Wire speed
  • High speed
  • Low latency

Layer 2 switching is highly efficient because there is no modification to the data packet, only to the frame encapsulation of the packet, and only when the data packet is passing through dissimilar media (such as from Ethernet to FDDI). Layer 2 switching is used for workgroup connectivity and network segmentation (breaking up collision domains). This allows a flatter network design with more network segments than traditional 10BaseT shared networks. Layer 2 switching has helped develop new components in the network infrastructure.

Layer 2 switches have the same limitations as if a network were designed based on the 80/20 rule: users spend 80 percent of their time on their local segment. Bridged networks break up collision domains, but the network remains one large broadcast domain. Similarly, Layer 2 switches (bridges) cannot break up broadcast domains, which can cause performance issues and also limits the size of your network. Broadcast and multicasts, along with the slow convergence of spanning tree, can cause major problems as the network grows. Because of these problems, Layer 2 switches cannot completely replace routers in the internetwork.

L3 Switching

The only difference between a Layer 3 switch and a router is the way the administrator creates the physical implementation. Also, traditional routers use microprocessors to make forwarding decisions, and the switch performs only hardware-based packet switching. However, some traditional routers can have other hardware functions in some of the higher-end models. Layer 3 switches can be placed anywhere in the network because they handle high-performance LAN traffic and can cost-effectively replace routers. Layer 3 switching is all hardware-based packet forwarding, and all packet forwarding is handled by hardware ASICs.

Layer 4 switching is considered a hardware-based layer 3 switching technology that can also consider the application used (for example, Telnet or FTP). Layer 4 switching provides additional routing above Layer 3 by using the port number found in the transport layer header to make routing decisions.

Multi-Layer Switching

Multi-layer switching combines Layer 2, 3, and 4 switching technologies and provides high-speed scalability with low latency. It accomplishes this high combination of high-speed scalability with low latency by using huge filter tables based on the criteria designed by the network administrator.

Multi-layer switching can move traffic at wire speed and also provide Layer 3 routing, which can remove the bottleneck from the network routers. This technology is based on the idea of “route once, switch many”.

Multi-layer switching can make routing/switching decisions based on the following

  • MAC source/destination address in a data link frame
  • IP source/destination address in the network layer header
  • Protocol field in the network layer header
  • Port source/destination numbers in the transport layer header

There is no performance difference between a Layer 3 and a Layer 4 switch because the routing/switching is all hardware-based.

Bridging vs. LAN Switching

It’s true—Layer 2 switches really are pretty much just bridges that give us a lot more ports, but there are some important differences you should always keep in mind: Bridges are software-based, while switches are hardware-based because they use ASIC chips to help make filtering decisions. A switch can be viewed as a multiport bridge.

There can be only one spanning-tree instance per bridge, while switches can have many. (We will discuss all about spanning trees in a bit.) Most switches have a higher number of ports than most bridges. Both bridges and switches flood Layer 2 broadcasts. Bridges and switches learn MAC addresses by examining the source address of each frame received. Both bridges and switches make forwarding decisions based on Layer 2 addresses.

Three Switch Functions at Layer 2

There are three distinct functions of layer 2 switching: address learning, forward/filter decisions, and loop avoidance.

Address learning—Layer 2 switches and bridges remember the source hardware address of each frame received on an interface, and they enter this information into a MAC database called a forward/filter table.

Forward/filter decisions—When a frame is received on an interface, the switch looks at the destination hardware address and finds the exit interface in the MAC database. The frame is only forwarded out an appropriate destination port.

Loop avoidance—If multiple connections between switches are created for redundancy purposes, network loops can occur. Spanning Tree Protocol (STP) is used to stop network loops while still permitting redundancy.

Spanning Tree Protocol (STP) is a Layer 2 protocol that runs on bridges and switches. The specification for STP is IEEE 802.1D. The main purpose of STP is to ensure that you do not create loops when you have redundant paths in your network. Loops are deadly to a network because they can cause it to broadcast storm. All the switches exchange information for use in the root switch selection and for subsequent configuration of the network. Bridge protocol data units (BPDUs) carry this information. Each switch compares the parameters in the BPDU that the switch sends to a neighbor with the parameters in the BPDU that the switch receives from the neighbor. In the STP root selection process, less is better. If Switch A advertises a root ID that is a lower number than the root ID that Switch B advertises, the information from Switch A is better. Switch B stops the advertisement of its root ID, and accepts the root ID of Switch A.

Let’s come to LAN switches, which are similar to transparent bridges in functions such as learning the topology, forwarding, and filtering. These switches also support several new and unique features, such as dedicated communication between devices through full-duplex operations, multiple simultaneous conversations.

Full-duplex communication between network devices increases file-transfer throughput. Multiple simultaneous conversations can occur by forwarding, or switching, several packets at the same time, thereby increasing network capacity by the number of conversations supported. Full-duplex communication effectively doubles the throughput while, with media-rate adaption, the LAN switch can translate between 10 and 100 Mbps, allowing bandwidth to be allocated as needed. Deploying LAN switches requires no change to existing hubs, network interface cards (NICs), or cabling.

Switch ports run in either access or trunk mode. In access mode, the interface belongs to one and only one VLAN (a VLAN is a virtual LAN; a broadcast domain created by switches means a switch with four VLANs having four separate broadcast domains). Normally a switch port in access mode attaches to an end user device or a server. The frames transmitted on an access link look like any other Ethernet frame. Trunks, on the other hand, multiplex traffic for multiple VLANs over the same physical link. Trunk links usually interconnect switches, as shown in Fig. 3, and carry multiple VLAN data. However, they may also attach end devices such as servers that have special adapter cards that participate in the multiplexing protocol.

Switch Forwarding:

LAN switches maintain a MAC or CAM Table (as shown in Fig. 3) for making forwarding/filtering decisions. When a switch is powered on, it has nothing in its

MAC/CAM table because the switch only knows the sender’s MAC, so it makes an entry for the sender in its table and for the destination it uses ffff, which means broadcast. Once it received data from a host it broadcasts it to all ports except the sender’s port; when another host receives the broadcast, then only hosts that want to receive data accept it and others drop the data because they did not ask for any. Now the switch makes an entry for the receiver in its MAC table, so next time they can communicate directly; their data will not be broadcast to others. Error checking is also performed and erroneous frames are discarded. With the cut-through switching method, latency is reduced by eliminating error checking. With the store-and-forward switching method, the LAN switch copies the entire frame into its on-board buffers and computes the cyclic redundancy check (CRC). The frame is discarded if it contains a CRC error or if it is a runt (less than 64 bytes, including the CRC) or a giant (more than 1518 bytes, including the CRC). If the frame does not contain any errors, the LAN switch looks up the destination address in its forwarding, or switching, table and determines the outgoing interface. It then forwards the frame toward its destination.

Compared to other network designs, a hierarchical network is easier to manage and expand, and problems are solved more quickly. Each layer provides specific functions that define its role within the overall network. By separating the various functions that exist on a network, not only is the network more manageable, but the network design becomes modular, which facilitates scalability and performance.


I hope you have enjoyed this article, and I hope it gave you a lot of information for your database. As a network engineer you need to have clear ideas about LAN switching, because most of time you will be responsible for configuring and maintaining LAN of an Enterprise. Whether you are working as routing and switching specialist, IPT specialist, or wireless specialist, you need to master this LAN Switching technology very well. I will write more about switching and also look at other resources on switching in this website from my fellow colleague. If you have any query regarding this then use comment box in below. I will try my best to give you a reply.


  • Christensen, K. J., “Local Area Networks-evolving from shared to switched access” IBM Systems Journal v34 n3 (`95) p347-74
  • Edwin Meir, “Buyer’s Guide: LAN switches take it all on” Network World, June’96;
  • Kevin Tolly, “Comparing LAN switch contenders: Beyond Performance” Network World, Jul’97
  • LAN Backbone Switching: An Anixter Technology/Business White Paper http://www.anixter.com/techlib/whiteppr/network/m6317100.htm.
  • Ethernet Switching: An Anixter Technology White Paper http://www.anixter.com/techlib/whiteppr/network/anixeswp.htm
  • Guide to Cisco Certified Network Associate certification by Todd Lamlee, Sybex Press.
  • Guide to Cisco Certified Network Associate by Richard Deal.
  • Cisco Certified Internetwork Expert by Wendell Odom and others, Ciscopress.com
  • Cisco Certified Internetwork Expert Quick reference by Brad Ellis, Ciscopress.com