Switches Concepts
Almost any wiring closet has one or more ethernet switches, connecting several devices in the same floor, building or campus. It is the most common network device and its function is to forward frames between hosts, servers and any infrastructure device connected to it.
MAC address
A media access control or MAC address, also referred to burned-IN-address, is a unique identifier assigned by a device manufacturer to a network interface controller. MAC is used by networks devices on the same network segment, to communicate.
MAC are 48 bits and represented by 6 groups of 2 Hexs, separated by either colons, points or hyphens. for example: 00c1.6441.f723
Frames learning & Forwarding
For devices on the same segment to communicate, they must be able to send and receive frames to each other. A switch will ensure frames received from device on a given port are forwarded to the intended device on another port.
A switch listens and learns on which ports frames are sent from and builds a MAC address table. Once it has this table populated, it will simply forward frames through the right ports.
The following section shows this listening, learning and forwarding process. In this example, 2 users and a printer are connected to an Ethernet switch.
Phase 1:
User 1 wants to communicate with the printer, so it sends a frame for the printer. At this point, the switch does not know on which port it can reach the printer’s MAC cccc.cccc.cccc, so it transmits this frame to all of its ports, apart from the one it was received from (GE1). User 2 received this frame and drops it, as it is not its MAC address.
Phase 2:
The printer responds back to user 1. The switch then receives a new frame from the printer on GE3, and forwards it through GE1, since it already knows that is where user 1 (MAC aaaa.aaaa.aaaa) is connected. The switch uses this information to build its MAC address table, mapping MAC addresses to ports.
Phase 3:
When user 2 wants to reach the printer, the switch will learn that MAC bbbb.bbbb.bbbb is connected to GE2. Using it already populated MAC table, will immediately forward the frame through GE3. By this point, the switch has learnt all connected MAC addresses and which parts to reach them on.
Leave A Comment