|

[ACSA Education #22] Forwarding Table

⏱️ Estimated reading time: Approx. 5 minutes (5 min read)

Layer 2 switches forward data based on MAC addresses. To achieve this, they use a MAC address table. When a device connected to the switch sends a frame, the table is automatically created based on the MAC address of the source frame.

So how does it work?

MAC Address Table

When switch SW1 is powered on and turned on, the MAC address table is initially empty.
“You can check the contents stored in the MAC address table using the command ”show mac-address”.

[ACSA 교육#22] Forwarding Table - image 38

As shown in the figure, Host A sends a frame to Host B.
SW1 receives a frame with source information of MAC address = 90:….:00 from port 1, which is mapped as a member of VLAN 10. It then adds this information to the first entry in the MAC address table, as shown below.

SW1# show mac-address
MAC age-time : 300 seconds Number of MAC addresses : 1 MAC Address VLAN Type Port -------------------------------------------------------
90:20:c2:bc:ee:00	10	dynamic		1/1/1

As you can see, the MAC address, VLAN, and port information are mapped and stored in the MAC address table.

However, since there are no other entries in the table, the switch doesn't yet know where to forward the frame to the destination 00:…:37. Therefore, it floods the frame to all member ports of VLAN 10. All VLAN 10-mapped hosts receive the frame and determine the destination MAC address.

At this time, if it is not your MAC address, the frame is discarded, and if it is your MAC address, a response is made.
That is, Host B responds to Host A with source MAC = 00:….:37 and destination MAC = 90:…:00.

The switch now adds a second entry to the MAC address table with the MAC address 00:0b:86:b4:eb:37.

SW1# show mac-address
MAC age-time: 300 seconds Number of MAC addresses: 2

MAC Address VLAN Type Port --------------------------------------- 90:20:c2:bc:ee:00 10 dynamic 1/1/1
00:0b:86:b4:eb:37	10	dynamic		1/1/2

A similar process occurs on Host C on port 11.

[ACSA 교육#22] Forwarding Table - image 40

In this way, the switch automatically builds a MAC table based on the source MAC address and forwards frames based on the destination MAC address.

By default, table entries are kept for 300 seconds (5 minutes).

Address Resolution Protocol (ARP)

Okay, so let's imagine we're in a conference room with the people we just met.
We don't know everyone's names yet, but then suddenly someone comes in and says, "“Hong Gil-dongHe hands over a note that says, ”Important message to deliver to you.” Who among the people in the conference room Hong Gil-dongI have no choice but to ask because I don't know for sure.

Excuse me. Who is Hong Gil-dong?

Everyone is listening to what I'm saying, but only Hong Gil-dong will answer, "I'm here!" At that moment, I'll map the chair Hong Gil-dong is sitting on to the name Hong Gil-dong. This is very similar to the Address Resolution Protocol (ARP), which links a Layer 3 IP address to a Layer 2 MAC address.

In the following diagram, Host A needs to communicate with a host with IP address 10.1.20.200. To do this, it must construct an Ethernet frame with its own source MAC address (90:..:00) and the MAC address of Host B, which it does not yet know.

[ACSA 교육#22] Forwarding Table - image 42

To find out the MAC address, Host A broadcasts an ARP request (destination MAC address FF:FF:FF:FF:FF:FF).
– The destination IP address in the IP header is 255.255.255.255

We already know that a switch forwards broadcasts to all ports in the same VLAN.
Therefore, all hosts in the VLAN will receive this frame and ignore it except for Host B.

Here, Host B responds with unicast communication to Host A's MAC address.

“I am 10.1.20.200, and my MAC address is 00:…:37.”

Host B

Host A receives this response and creates an entry in its ARP table, also known as the ARP cache.
This ARP table maps the IP address 10.1.20.200 to the MAC address 00:0b:86:b4:eb:37. Therefore, the next time Host A and Host B communicate, they do not need to use ARP.

Additionally, when Host B receives an ARP request from Host A, it learns Host A's IP address and MAC address. Therefore, Host B stores these details in its ARP table.

The contents stored in these ARP tables can be checked using the “arp -a” command in the Command Prompt on Windows.

Similar Posts

  • [ACP-DC Training#8] 2-Tier Design for Small Data Centers

    ⏱️ Estimated read time: Approx. 13 minutes (13 min read) Layer 2 two-tier designs are simple to deploy, operate, and troubleshoot because they use existing traditional protocols. They can be handled without specialized knowledge of overlay protocols or complex designs. This architecture is suitable for small to medium-sized data centers, but in larger environments, at the data center POD level…

  • [ACSA Education #16] Show Command

    ⏱️ Estimated reading time: Approx. 5 minutes (5 min read) In today's post, we will explore the general functions of networking equipment along with very basic commands that help you check networking devices. This information is the most important knowledge you can learn during the entry-level course, and in the future, excellent network engineers and administrators will [regard] network connections’…

  • [ACSA Training #2] OSI 7 Layers

    ⏱️ Estimated reading time: Approx. 7 minutes (7 min read) As computers rapidly advanced in the mid-1980s, all manufacturers attempted to implement their own proprietary communication protocols. As a result, compatibility issues arose between products from different manufacturers, leading to unreliable communication. Therefore, the International Organization for Standardization (ISO) [established] standard communication for computing devices…

  • From Data Center to Center-of-Data

    ⏱️ Estimated read time: Approx. 7 minutes (7 min read) According to Gartner, “Infrastructure strategies for 851 TP3T by 2025 will integrate options for on-premises, colocation, cloud, and edge delivery.” This represents tremendous growth compared to the mere 201 TP3T in 2020. This implies that workloads must be located closer to the edge environments where data is generated…

  • [ACSA Education #24] Redundant Network

    ⏱️ Estimated reading time: Approx. 4 minutes (4 min read) Network communication is very important in IT infrastructure. Often, in critical situations, it can have a significant impact on services. If there is only one path connecting to the Core-1 switch as shown below, and the link connecting the Core-1 switch to one of the two access switches is broken, the network will be disconnected, and ultimately Host A and…

  • HPE Aruba Ethernet-based storage fabric

    ⏱️ Estimated read time: Approx. 4 minutes (4 min read) Deploying next-generation data centers and private clouds requires 100/200/400GbE fabrics to support these new workloads and data-centric applications. Recent storage architectures are rapidly evolving to improve performance and provide cloud-like scalability and efficiency to data centers. Disaggregated Storage is…