Ethernet frame format
The data packets on the Ethernet link are called Ethernet frames. The beginning part of an Ethernet frame consists of a preamble and a frame start symbol. This is followed by an Ethernet header specifying the destination and source addresses in terms of MAC addresses. The middle part of the frame is the packet that contains headers of other protocols (such as IP protocol) that the frame pays. The Ethernet frame ends with a 32-bit redundancy check code, which is used to check whether the data transmission is damaged.
Structure
The binary data packet coming from the line is called a frame. The frame seen from the physical line shows, among other information, the preamble and frame start character. Any physical hardware will require this information.
The table below shows the complete frame format when transmitted with an MTU of 1500 octets (some Gigabit Ethernet and even higher-speed Ethernet support larger frames, called jumbo frames). An octet is eight bits of data (that is, a byte in modern computers).
Preamble | Frame start character | MAC destination address | MAC source address | 802.1Q label (optional) | Ethertype | Load | Redundancy check | Frame spacing |
---|---|---|---|---|---|---|---|---|
10101011 1 octets | 6 octets | 6 octets | (4 octets) | 2 octets | 46–1500 octets | 4 octets | 12 octets | |
Preamble and frame start character
See: SyncwordA frame starts with a 7-byte preamble and a 1-byte frame start symbol. Before Fast Ethernet, the bit pattern for this part of the frame on the line was 10101010 10101010 10101010 10101010 10101010 10101010 10101010 10101011. Since the lowest bit is transmitted first (LSB) when transmitting a byte, its corresponding hexadecimal representation is 0x55 0x55 0x55 0x55 0x55 0x55 0x55 0xD5. 10/100M network card (MIIPHY) transmits 4 bits (one half word) at a time. Therefore, the preamble will become 7 groups of 0x5 0x5, and the frame start symbol will become 0x5 0xD. The 1000M network card (GMII) transmits 8 bits at a time, while the 10Gbit/s (XGMII) PHY chip transmits 32 bits at a time. Note that when described in octets, 7 01010101s are transmitted first and then 11010101. Since the lower 4 bits of the 8-bit data are sent first, the frame start symbol 0101 is sent first, and then 1101 is sent.Header
The header contains the MAC address of the source and destination addresses, an Ethertype field and optional IEEE 802.1 to describe VLAN membership and transmission priority. QVLAN tag.Frame check code
The frame check code is a 32-bit cyclic redundancy check code to verify whether the frame data is damaged.Frame gap
Main entry: en:Interframe gapAfter a frame is sent, the sender needs to re- Send an idle line status code of at least 12 octets. For more related knowledge, please visit:PHP Chinese website!
The above is the detailed content of What is the Ethernet frame format?. For more information, please follow other related articles on the PHP Chinese website!