Switches are at the heart of modern Ethernet networks. Unlike hubs, they do not flood every frame to every port by default. Instead, they learn which devices are connected to which ports and forward traffic intelligently.
In this module you will see how switches learn MAC addresses, how forwarding decisions are made and how ARP helps map IP addresses to MAC addresses.
"A well configured switch is like a good traffic controller. Frames go where they need to go and nowhere else."
π What you will learn
- How switches provide dedicated bandwidth to each connected device
- How forwarding tables map MAC addresses to switch ports
- What happens when the destination is unknown and when frames are flooded
- How ARP maps IP addresses to MAC addresses so that frames reach the right host
π‘ Switches and bandwidth
In a classic hub based network, all devices share the same collision domain and compete for the same bandwidth. A switch creates a separate collision domain for each port, which means each device has access to the full link bandwidth.
- Hubs repeat every bit out of every port.
- Switches forward frames only to the port where the destination is located.
π Forwarding table and MAC learning
Switches maintain a forwarding table that maps MAC addresses to ports. This is sometimes called a MAC address table or CAM table.
- When a frame arrives, the switch looks at the source MAC and records which port it came in on.
- When it sees a frame with a destination MAC that is already in the table, it forwards the frame only to that port.
- If the destination MAC is not in the table, the switch floods the frame out of all ports in that VLAN except the one it arrived on.
π§ Address Resolution Protocol (ARP)
ARP is used to map IP addresses to MAC addresses on a local network. When a device wants to send an IP packet to another host on the same subnet, it needs the destination MAC address.
- The device broadcasts an ARP request asking who has a given IP address.
- The owner of that IP address replies with an ARP response that includes its MAC address.
- Devices store these mappings in an ARP table so that future frames can be sent directly.
Switches see these frames and learn the MAC addresses and ports at the same time, which keeps forwarding decisions accurate.
β Key takeaway
Switches improve performance by giving each device its own collision domain, learning where MAC addresses live and forwarding frames only where they are needed, with ARP helping to link IP addressing to the underlying Ethernet layer.