Just like hubs and bridges, a switch is used to connect multiple hosts together, but it has many advantages over them. The switch is an OSI Layer 2 device, which means that it can inspect received traffic and make forwarding decisions. Each port on a switch is a separate collision domain and can run in a full duplex mode (photo credit: Wikipedia).
A switch manages the flow of data across a network by inspecting the incoming frame’s destination MAC address and forwarding the frame only to the host for which the data was intended. Each switch has a dynamic table (called the MAC address table) that maps MAC addresses to ports. With this information, a switch can identify which system is sitting on which port and where to send the received frame.
To better understand how a switch works, consider the following example:
As you can see from the example above, Host A is trying to communicate with Host C and sends a packet with Host C’s destination MAC address. The packet arrives at the switch, which looks at the destination MAC address. The switch then searches that MAC address in its MAC address table. If the MAC address is found, the switch then forwards the packet only out of the port connected to the frame’s destination. Hosts connected to other ports will not receive the frame.
Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.
We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training: