1-2
Generally, the majority of MAC address entries are created and maintained through MAC address
learning. The following describes the MAC address learning process of a switch:
1) As shown in Figure 1-1, User A and User B are both in VLAN 1. When User A communicates with
User B, the packet from User A comes into the switch on GigabitEthernet 1/0/1. At this time, the
switch records the source MAC address of the packet, that is, the address MAC-A of User A to the
MAC address table of the switch, forming an entry shown in Figure 1-2.
Figure 1-1 MAC address learning diagram (1)
Figure 1-2 MAC address table entry of the switch (1)
2) After learning the MAC address of User A, the switch starts to forward the packet. Because there is
no MAC address and port information of User B in the existing MAC address table, the switch
forwards the packet to all ports except GigabitEthernet 1/0/1 to ensure that User B can receive the
packet.
Figure 1-3 MAC address learning diagram (2)
3) Because the switch broadcasts the packet, both User B and User C can receive the packet.
However, User C is not the destination device of the packet, and therefore does not process the
packet. Normally, User B will respond to User A, as shown in Figure 1-4. When the response
packet from User B comes into the switch on GigabitEthernet 1/0/4, the switch records the
association between the MAC address of User B and the corresponding port to the MAC address
table of the switch.