MAC address
The MAC address of the network device is unique worldwide. The MAC address is 48 bits long, usually in hexadecimal notation. The MAC address consists of two parts: the first 24 bits are the organization unique identifier (OUI,ORGANIZATIONALLYUNIQUEIDENTIFIER), which is distributed by IEEE to the device manufacturer uniformly.
For example, the first 24 bits of Huawei's network product's MAC address are 0X00E0FC. The latter 24-bit serial number is the unique value that the vendor assigns to each product, which is assigned by each vendor (the product can be a network card or other device that requires a MAC address).
Unicast
Frames on a local area network can be sent in three different ways. The first is unicast, which means sending from a single source to a single destination. Each host interface is uniquely identified by a MAC address, the Oui of the MAC address, and the 8th bit in the first byte represents the address type. For the host MAC address, this bit is fixed to 0, and the frame that represents the destination MAC address for this MAC address is sent to a unique destination. In a conflict domain, all hosts can receive a unicast frame sent by the source host, but other hosts will discard the received frame when the destination address does not match the local MAC address, and only the true destination host will receive and process the received frame.
Broadcasting
The second type of transmission is broadcast, which indicates that frames are sent from a single source to all hosts on a shared Ethernet network. The destination MAC address of the broadcast frame is a 16-ffffffffffff, and all hosts receiving the broadcast frame receive and process the frame.
Broadcast mode generates a large amount of traffic, resulting in reduced bandwidth utilization, which in turn affects the performance of the entire network.
Broadcast is typically used when all hosts in the network are required to receive the same information and to process it.
Multicast
The third type of transmission is multicast, which is more efficient than broadcast. Multicast forwarding can be understood as selective broadcasts, where the host listens on a specific multicast address and receives and processes the destination MAC address for that multicast MAC address frame.
The multicast MAC address and unicast MAC address are differentiated by the 8th bit in the first byte. The 8th bit of the multicast MAC address is 1, while the 8th bit of the unicast MAC address is 0.
Multicast is typically used when a group of hosts on the network (not all hosts) are required to receive the same information, and other hosts are unaffected.
Receiving and sending of data frames
After the frame is sent from the physical interface of the host, it is transmitted to the destination via the transfer media. In a shared network, this frame may reach multiple hosts. The host checks the destination MAC address in the frame header, and if the destination MAC address is not a native MAC address, nor is the native listening multicast or broadcast MAC address, then the main opportunity discards the received frame.
If the destination MAC address is a native MAC address, it receives the frame, examines the frame check sequence (FCS) field, and compares it to the native computed value to determine whether the frame remains intact during transmission. If the FCS value of the frame differs from the value of the native calculation, the host considers the frame to be corrupted and discards the frame. If the frame passes the FCS check, the host determines which protocol processing the frame is sent to the upper layer, based on the Type field in the frame header. In this example, the value of the Type field is 0x0800, which indicates that the frame needs to be sent to the IP protocol for processing. The head and tail of the frame are stripped off before being sent to the IP protocol.
MAC Address (unicast, broadcast, multicast, data send and receive)