MAC address table overview
The MAC (Media Access Control, Media Access Control) address is an identifier that identifies a LAN node. The physical address of the network card is usually the EPROM burned into the network card by the manufacturer of the network card. It stores the addresses of the computer sending the data and the host receiving the data when the data is transmitted. The reason why the switch can send data packets directly to the destination node, instead of sending data packets to all nodes in a broadcast mode like a hub, the most critical technology is that the switch can identify the MAC addresses of the network cards of the nodes connected to the network and place them Go to a place called the MAC address table.
The MAC address table records the correspondence between the MAC address, interface number, and VLAN ID of the device connected to the switch, which is commonly referred to as a CAM (Content Addressable Memory) table. When forwarding data, the device queries the MAC address table according to the destination MAC address in the message to quickly locate the outbound interface, thereby reducing broadcasts.
Each mapping item in the MAC address table is the MAC address table entry. There are several ways to form them, and correspondingly, several MAC address table entry types and aging methods are formed.
MAC address entries are divided into dynamic entries, static entries, and black hole entries. Dynamic entries are dynamically obtained by the interface by learning the source MAC address in the message. Such MAC address entries have an aging time. Static MAC address table entries are manually configured by users, and such MAC address table entries will not be aged. The black hole MAC address table entry is a special static MAC address table entry used to discard data frames that contain a specific source MAC address or destination MAC address.
Generally, after the system is reset, the dynamic MAC address table entries will be lost, but the saved static MAC address table entries and black hole MAC address table entries will not be lost.
Dynamic MAC address table generation method: Generally, MAC address table entries are automatically established by the device through learning the source MAC address in the message. When switch B connected to switch A sends data to switch A, switch A resolves the source MAC address (ie, the MAC address of switch B) from the data frame, and adds it to the MAC address table along with the interface number. Because the network is constantly changing, MAC address table entries need to be constantly updated, so the automatically generated table entries are not permanently valid. Each table entry has a life cycle (also known as “aging time”). Entries that cannot be refreshed after reaching the lifetime will be deleted.
Static MAC address table generation method: The network administrator can manually add static MAC address table entries to the MAC address table, which is equivalent to binding the user’s MAC address with the connected device interface, effectively preventing illegal users from fraudulently obtaining data, thereby improving the interface performance safety. The priority of manually configured MAC entries is higher than that of automatically generated entries.
Data forwarding mode of the switch:
When the device forwards packets, it will first check the MAC address information of the data, and then according to the information in the MAC address table, it will take two methods:
- Unicast forwarding: When the MAC address table contains an entry corresponding to the destination MAC address of the message, the device directly sends the message through the forwarding outbound interface in the entry.
- Broadcast forwarding: When the message received by the device is a broadcast message, a multicast message, or the MAC address table does not contain an entry corresponding to the destination MAC address of the message, the device will broadcast the message to the receiver All interfaces in the same VLAN outside the interface are forwarded.
Get 100% accurate CCIE/ CCNP/CCNA/HCIE dumps in IELAB .
Please follow us if you like our articles.
visit us: http://ielab.network
Facebook : https://www.facebook.com/ielab.network/