|

[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#10] vsx (2)

    ⏱️ Estimated reading time: Approx. 8 minutes (8 min read) In the previous post, we explored VSX, the virtualization technology of HPE Aruba Networking AOS-CX switches. We explained the components of VSX, the differences from VSF, and its advantages. Today, we would like to cover the practical aspects. We will examine how to actually utilize VSX to perform live software upgrades and look at technologies such as Split Brain… .

  • [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…

  • 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…

  • [ACSA Education #28] MSTP Theory and Regional Structure

    ⏱️ Estimated read time: Approx. 6 minutes (6 min read) A Common Spanning Tree (CST) defines a single Spanning Tree Instance for the entire network, regardless of the number of VLANs. All BPDUs use Untagged VLAN 1, so VLAN details are not considered. Additionally, there is no load balancing, so alternative…

  • [ACSA Training #17] Basic Settings Commands

    ⏱️ Estimated read time: Approx. 5 minutes (5 min read) After purchasing a switch, you must perform a few tasks before connecting it to the network. These include tasks such as setting the switch's name or configuring the interfaces. So today, we will look at the very basic configuration commands for the AOS-CX switch. Hostname configuration Unless you have only one switch…

  • [ACSA Training #37] OSPFv2

    ⏱️ Estimated read time: Approx. 13 minutes (13 min read) OSPF is the most widely used method for routing traffic within an organization. Among them, OSPFv2 is used to route IPv4 packets within an enterprise internetwork. Today, we will learn about OSPF areas, router IDs, various message types, and Neighbor State… .