The format of the Ethernet frame is as follows: 802.3 Ethernet frame structure forward code frame start character MAC destination address MAC source address 802.1Q label (optional) ethernet type or length load redundancy verification frame spacing 10101010 7 octet 10101011 1 octet 6 octets 6 octets (4 octets) 2 octets 46-1500 octets 4 octets 12 octets 64-1522 octets 72-1530 octets 84-1542 octets 1, forward code and frame start character: A frame starts with a 7-byte forward code and a 1-byte frame start character. Before fast Ethernet, the bitwise mode of the online frame is 10101010 10101010 10101010 10101010 10101010 10101010 10101010. Because the least important bit is first transmitted when a byte is transmitted (that is, the lowest Bit is first transmitted ), therefore, the corresponding hexadecimal representation is 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0xD5. The 10/100 m nic (mii phy) transmits four bits at a time (one half word ). Therefore, the front character will be 7 groups of 0x5 + 0x5, and the frame start character will be 0x5 + 0xD. M nic (GMII) transmits 8 bits at a time, while 10 Gbit/s (XGMII) PHY transmits 32 bits at a time. Note that when it is described as octet, first transmit 7 01010101 and then transmit 11010101. Because the 8-bit data is sent at least 4 bits, 0101 of the frame start character is sent first, and 1101 is then sent. 2. Destination Address: 6 bytes 3. Source Address: 6 bytes 4. Type/length: 2 bytes, 0 ~ 1500 reserved as the length field value, 1536 ~ 65535 reserved as the type field value (0x0600 ~ 0 xFFFF) 5. Data: 46 ~ 1500 bytes 6. Frame verification sequence (FCS): 4 bytes. The Checksum obtained from the target MAC to the data domain is calculated using CRC. When a data frame arrives at the network card, the network card on the physical layer must first remove the leading synchronization code and the starting delimiters of the frame, and then perform CRC checks on the frame. If the frame checksum is incorrect, the frame is discarded. If the checksum is correct, check whether the target hardware address of the frame meets your receiving conditions (the destination address is your own physical hardware address, broadcast address, and the available multicast hardware address ), if yes, send the frame to the "device driver" for further processing. At this time, our packet capture software can capture data. According to Ethernet rules, the minimum part of the Ethernet frame data domain is 46 bytes, and the minimum part of the Ethernet frame is 6 + 6 + 2 + 46 + 4 = 64.