I, Ethernet II
Ethernet Type II Ethernet frames have a minimum length of 64 bytes (6+6+2+46+4) and a maximum length of 1518 bytes (6+6+2+1500+4). The first 12 bytes respectively identify the source node MAC address of the sending data frame and the destination node MAC address of the receiving data frame.
The next 2 bytes identify the upper-layer data type that is carried by the Ethernet frame, such as 16 binary 0x0800 representing the IP protocol data, 16 binary 0X86DD representing the IPV6 protocol data, and 16 binary 0x809b representing the AppleTalk protocol data, 16 binary number 0x8138 represents Novell type protocol data.
After an indefinite Long data field is a 4-byte frame check sequence (frame. Check Sequence,fcs), using 32-bit CRC cyclic redundancy checks to verify data from the target MAC address field to the data field.
Ethernet minimum Send frame length of 64 bytes, according to the standard, 10Mbps Ethernet when using a repeater, the maximum length of the connection is 2500 meters, up to 4 repeaters, so the minimum transmission time for 10Mbps Ethernet frame is 51.2 microseconds. The data that can be transmitted during this time is 512 bits, so it is also known as 512-bit time. This time is defined as an Ethernet timeslot, or a collision time slot. 512 bits = 64 bytes, which is the reason for the minimum 64 bytes of Ethernet frames. Now basically the switch or router directly connected to the computer, the hub connection is very rare, when the switch or router directly connected to the computer between each computer and the device is a separate conflict domain, there is no conflict, so it is possible to send a frame with a length less than 64 bytes in theory, However, in order to comply with the original standards, consider that some hub devices are still in use, so keep the minimum frame length of 64 bytes unchanged.
Second, PPP
Point-to-Point Protocol (PPP) provides a standard method for transmitting multiprotocol packets over a point-to-point connection. PPP was originally designed to provide an encapsulation protocol for IP traffic transfer between two peer nodes. In the TCP-IP protocol, it is a Data Link layer protocol (the second layer in the OSI schema) used to synchronize the modulation connection, instead of the original nonstandard second layer protocol, SLIP. In addition to IP, PPP can carry other protocols, including DECnet and Novell's Internet Packet Exchange (IPX).
PPP is a link-layer protocol designed for simple link design that transmits packets between identical units. This link provides full-duplex operation and delivers the packets in sequence. The main purpose of the design is to establish a point-to-point connection via dial-up or leased line to send data, making it a common solution for a simple connection between various hosts, bridges and routers.
Point-to-Point Protocol (PPP) provides a standard method for transmitting multiprotocol packets over a point-to-point connection. PPP was originally designed to provide an encapsulation protocol for IP traffic transfer between two peer nodes. In the TCP-IP protocol, it is a Data Link layer protocol (the second layer in the OSI schema) used to synchronize the modulation connection, instead of the original nonstandard second layer protocol, SLIP. In addition to IP, PPP can carry other protocols, including DECnet and Novell's Internet Packet Exchange (IPX).
Iii. HDLC
hdlc---bit-oriented synchronization protocol: High-level Data link control (Advanced Information link controls procedures). HDLC is a typical representative of the bit-oriented data Link Control protocol, which does not depend on any kind of character encoding set, the data message can be transparently transmitted, the "0-bit insertion method" for transparent transmission is easy to implement; Full duplex communication, high data link transmission efficiency; All frames are CRC tested, Sequential numbering of information frames prevents leakage or retransmission, high transmission reliability, and separation of transmission control functions from processing functions for greater flexibility.
Segmentation of Frame Information
A frame of information for SDLC/HDLC includes the following fields (field), all of which are routed from the least significant bit.
SDLC/HDLC Flag character
The SDLC/HDLC protocol stipulates that all information transmissions must begin with a single marker character and end with the same character. This flag character is 01111110, called the Flag field (F). A complete unit of information, called a frame, is formed between the start sign and the end flag. All information is transmitted as frames, while the marker character provides the bounds of each frame. The receiver can establish frame synchronization by searching for "01111110" to detect the beginning and end of the frame.
Address fields and Control fields
After the Flag field, you can have an address field a (addr) and a control field C (Contro1). The Address field is used to specify the address of the secondary station with which to communicate. A control field can prescribe several commands. The SDLC prescribes a and C fields with a width of 8 bits. HDLC allows the A field to be any length and the C field to be 8-bit or 16-bit. The receiver must check the first bit of each address byte, if "0", followed by another address byte, and if "1", the byte is the last address byte. Similarly, if the first bit of the first byte of the control field is "0", there is also a second control field byte, otherwise there is only one byte.
Information field
Following the control field is the Information field (information). The information field contains the data to be transferred and is also a data field. Not every frame must have an information field. That is, the information field can be 0, and when it is 0 o'clock, this frame is primarily a control command.
Frame Check Field
Immediately after the information field is the two-byte frame check field, the Frame check field is called the FC (Frame check) field, and the checksum sequence FCS (frame check Sequence). The SDLC/HDLC uses a 16-bit cyclic redundancy check code CRC (Cyclic Redundancy Code), which generates a polynomial of ccitt polynomial x^16+x^12+x^5+1. In addition to the Flag field and the automatically inserted "0" bit, all information is taken in the CRC calculation. The CRC encoder adds redundant supervisory code bits to each code group when the code group is sent. The decoder can correct the error code in the error correction range and check the error code in the wrong range, but it cannot be corrected. Multi-bit errors beyond the school and error correction range will not be detected.
This article from "萧焜垚" blog, reproduced please contact the author!
Ethernet II, PPP, HDLC protocol analysis