It then forwards the frame to that specific port.
But this time, when the switch receives the frame (see the diagram below), it first looks up the destination address in the MAC Address Table. Workstation A can now continue its conversation with Workstation D. Now that Workstation A and Workstation D are both identified by their port numbers, the switch can do what switches do. The following diagram shows the new MAC Address Table now that the response to the flood has been received. Notice that the destination MAC address does not match the MAC Address Table above. The following diagram is an example of what an Ethernet frame header might look like. If that device responds, then the switch can learn their MAC address and map it to the port into which the message arrives. The goal of this flood is that the device using the MAC address in the destination of the frame will receive the flood and respond to the message. When the switch receives a frame dedicated for a particular destination but that destination does not have an entry in the MAC Address Table, the switch has no choice but to flood the frame. The following diagram is an example of what an Ethernet frame header might look like as a broadcast.Ģ. Protocols like ARP and DHCP (among others) rely on these broadcasts for their basic function. When the switch receives a broadcast, it has no choice but to continue the broadcast. There are two basic reasons why a switch will flood a frame.ġ.
In essence, flooding is when a switch pretends to be a hub. This second function is called Flooding.įlooding means that the switch sends the incoming frame to all occupied and active ports (except for the one from which it was received). The switch must rely on another function to find the destination. But where is Workstation D? From the switch’s perspective, this is unknown. Workstation A was trying to send a frame to Workstation D. As you can see in the above MAC Address Table, no other device has been identified on our switch. Most switches have a default timer of 300 seconds (5 minutes).īut this is only half of the process. The switch will use the port that has the longest timer, indicating that it is the most recent entry and therefore the most accurate. The same MAC address will appear on both Port 1 and Port 2. Let’s say Workstation A is plugged into Port 1 then quickly switches to Port 2. In fact, MAC address tables have a timer that, once expired, results in the deletion of the entry. The following diagram shows what a MAC Address Table entry looks like if Workstation A is plugged into Port 1 of our switch and sends a frame.īecause the MAC address table is in memory, not persistent storage, the table is also temporary. As the switch receives a data packet, it reads the source address and maps the port number to the MAC address in that source field. We refer to this memory location as the MAC Address Table. At the center of the learning function is a part of the switch’s memory.
Without the learning function, the switch would not know to which port the destination device is connected. Switches need to keep track of the MAC addresses of all connected devices. The switch has the ability to read and process both the destination address and the source address. The destination address will be either a unicast addresses, a multicast address or a broadcast address. The source address is always a unicast MAC address. It’s important to remember that every Ethernet frame contains two MAC addresses. The chart below provides a list of the four workstations and their respective MAC addresses. We’ll call these workstations A, B, C and D and we’ll number the ports 1, 2, 3 and 4. Now, imagine that we have a switch with four ports and four user workstations. These functions are present in a switch by default, right out of the box. The switch accomplishes these requirements by executing four basic functions: Learning, Forwarding, Filtering and Flooding. What the network needed was a more logical device that could make decisions for where to send data and block the traffic flow to irrelevant devices. There was no privacy or security and performance was poor. At its core, the Ethernet is a shared network, each node contending for access to precious bandwidth and dealing with the repercussions of collisions.īefore switches, hubs received Ethernet frames and forwarded them to every connected device. The Ethernet switch has become an integral part of the world’s LAN infrastructure.