One: Detailed explanation of MAC Address Table
When it comes to the MAC address table, you have to say how the switch works, because the switch forwards the data frames based on the MAC address table. There is a table in the switch that records the relationship between the MAC address of the LAN host and the Switch interface, which is responsible for transferring the data frame to the specified host on the basis of this table.
How the Switch works
After receiving the data frame, the switch first records the source MAC address in the data frame and the corresponding interface to the Mac table. Next, will check their own Mac table in the data frame of the target MAC address information, if there will be based on the Mac table records in the corresponding interface to send the data frame (that is, unicast), If not, the data frame is sent out (that is, broadcast) from the non-accept interface.
The following figure: A detailed explanation of the process of transferring data frames in a switch
1 Host A will be a source MAC address for itself, the target MAC address for Host B data frame sent to the switch.
2 After the switch receives this data frame, first the source MAC address in the data frame and the corresponding interface (interface F 0/1) are recorded in the MAC Address table.
3 The switch then checks its MAC address table for information about the target MAC address in the data frame, if it does, it is sent out from the interface recorded in the MAC Address table, and if not, the data frame is sent out from all interfaces of the non-receive interface (that is, except for the F 0/1 interface).
4 at this time, the LAN all the host will receive this data frame, but only Host B received this data frame will respond to this broadcast, and respond to a data frame, this data frame includes the MAC address of Host B.
5 When the switch receives the Host B response data frame, it will also record the source MAC address in the data frame (that is, the MAC address of Host B), then, when the host A and Host B communication, the switch according to the MAC Address table records, the implementation of unicast.
The following figure: When the LAN has multiple switches interconnected, the switch MAC Address table is how to record it?
1 Host A will be a source MAC address for themselves, the target MAC address host C data frame sent to the switch
2 Switch 1 after receiving this data frame, will learn the source MAC address, and check the MAC address table, found that there is no target MAC address records, the data frame will be broadcast, Host B and switch 2 will receive this data frame.
3 Switch 2 after receiving this data frame will also be the data frame of the source MAC address and corresponding interface recorded in the MAC Address table, and check their own MAC Address table, found that there is no target MAC address records, it will broadcast this data frame.
4 when the host C receives the data frame, responds to this data frame and replies to a source MAC address for its own data frame, when switch 1 and switch 1 record the MAC address of host C to its MAC address table and send this data frame to host A as a unicast.
5 at this time, host A and host C communication is a unicast form of transmission data frames, Host B and host C communication, such as the above process, so switch 2 MAC address table recorded host A and Host B MAC address corresponding interface F 0/1.
Summary: From the above two pictures can be seen, the switch has dynamic learning source MAC address function, and a switch interface can correspond to multiple MAC address, but a MAC address can only correspond to one interface.
Note: The MAC address for dynamic learning of the switch is only 300S valid, and if the MAC address in 300S is not communicated, the record will be deleted.