PPP Protocol (Point-to-place protocol) belongs to the network interface layer, which is mainly used for dial-up internet access. PPP has the ability to dynamically assign IP addresses, allows IP addresses to be negotiated at the time of connection, has error detection and correction capability, and supports data compression; in order to establish point-to-point link traffic, each end of the PPP link must first send the LCP packet to set up and test the data link. After the link is established and the optional functions required for LCP are selected, PPP must send an NCP packet to select and set one or more network layer protocols. Once each of the selected network layer protocols is set, datagrams from each network layer protocol can be sent on the link PPP is character-oriented, HDLC is bit-oriented. The PPP frame format is as follows:
650) this.width=650, "alt=" Technology share "src=" Http://s3.51cto.com/wyfs02/M01/87/60/wKiom1feXgPTit7yAAAHOcoo-kg649.png-wh_ 500x0-wm_3-wmp_4-s_3151135178.png "title=" Ppp.png "width=" "height=" 0 "border=" 0 "hspace=" 0 "vspace=" padding:0px;width:500px;height:63px; "/>
The first two 7E is the frame bound flag, the value is fixed to 7E;FF as the Address field, because the endpoint of the point-to-end link is unique, so the field is set to Ff;03 (C) as the control field, including the frame type and serial number, etc. FCS is a Frame check field to detect errors;
The PPP protocol specifies LCP (Link Control Protocol) for establishing, configuring, and testing PPP protocols; packets captured with wireshark such as:
650) this.width=650, "alt=" Technology share "src=" Http://s1.51cto.com/wyfs02/M00/87/60/wKiom1feYFvCg9yPAABBXrXxP7c750.png-wh_ 500x0-wm_3-wmp_4-s_1886662501.png "title=" PPP package. png "Width=" 393 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" padding:0px;width:393px;height:300px; "/>
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. 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.
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 1th or 1th, 2 bits in the control field represent the type of the transfer frame, and the 1th bit is "0" to indicate yesInformation Frame, 1th, 2 bits is "10" is the monitoring frame, "11" is no numbered frame. 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.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 check sequence FSC(frame check Sequence).
650) this.width=650, "alt=" Technology share "src=" Http://s3.51cto.com/wyfs02/M02/87/5E/wKioL1feZEni5LORAABm31GQ9ug263.jpg-wh_ 500x0-wm_3-wmp_4-s_2759118755.jpg "title=" HDL frame format "width=" 397 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" padding:0px;width:397px;height:320px; "/>
with Wireshark capture packets such as:
650) this.width=650, "alt=" Technology share "src=" Http://s5.51cto.com/wyfs02/M00/87/5E/wKioL1feZYnDlZZAAAA-MQar7_Y264.png-wh_ 500x0-wm_3-wmp_4-s_142761545.png "title=" HDLC Packet "width=" 385 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" padding:0px;width:385px;height:350px; "/>
Ethernet II Protocol
Ethernet is the most common communication protocol standard used by current LAN. This protocol defines the cable type and signal processing method used in LAN. It consists of a 6-byte destination MAC address, a 6-byte source MAC address, a 2-byte type field (used to indicate the type of data encapsulated in the frame, the inside) followed by 46-1500-byte data and 4-byte frame checks.
Header 8 Destination Address 6 Source Address 6 ether Type 2 Payload 46-1500 frame Test sequence 4
Header: 8 bytes, the first 7 0,1 alternating bytes (10101010) are used to synchronize the receiving station, and a 1010101011 byte indicates the starting position of the frame. The header provides receiver synchronization and frame demarcation services.
Destination Address: 6 bytes, unicast multicast or broadcast. The unicast address is called a personal, physical, hardware, or MAC address, and the broadcast address is the full 1,0xff FF ff.
Source Address: 6 bytes. Indicates the unicast address of the sending node.
Ether Type: 2 bytes, used to indicate the upper layer protocol contained within the Ethernet frame. The protocol identifier for the frame format. For IP messages, the field value is 0x0800. For ARP information, the value of the Ether Type field is 0x0806.
Payload: A protocol Data unit PDU consisting of an upper layer protocol. The maximum payload that can be sent is 1500 bytes. The payload is at least 46 bytes due to the collision detection feature of Ethernet. If the upper-layer protocol data unit is less than 46 bytes long, it must be added to 46 bytes.
Frame Inspection sequence: 4 bytes. Verify bit integrity.
650) this.width=650, "alt=" Technology share "src=" Http://s2.51cto.com/wyfs02/M00/87/5E/wKioL1fedGLQHY07AABKPc0l30A240.png-wh_ 500x0-wm_3-wmp_4-s_466066755.png "title=" ethernetii "width=" 385 "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style= "padding:0px;width:385px;height:350px;"/>
Destination: Destination address is c4:01:20:e8:00:00
Source: Origin Address is c4:02:21:e8:00:00
Analysis of PPP, HDLC, ethernetii protocol