IP Packet Format
IP Packets Product Documentation contains the main data transmission protocol used in a variety of packet formats, packet example. By IP Packets Product Documentation, be able to enhance understanding of various protocol packets.
IP Packets Product Documentation contains the main data transmission protocol used in a variety of packet formats, packet example. By IP Packets Product Documentation, be able to enhance understanding of various protocol packets.
PPP
The Point-to-Point Protocol (PPP) specifies how to transmit data over synchronous and asynchronous full-duplex P2P links. It is located on the data link layer of the Open Systems Interconnection (OSI) model and the link layer of the TCP/IP protocol stack. The fields in a PPP frame include the Address, Control, Protocol, and Information fields.
Frame Format
|<-------------------------- 7 - 1508 bytes --------------------------->| +---0x7E---+---0xFF---+---0x03---+----------+---------------+----------+---0x7E---- | Flag | Address | Control | Protocol | Information | FCS | Flag | | 01111110 | 11111111 | 00000011 | 8/16bits | * | 16 bits | 01111110 | +----------+----------+----------+----------+---------------+----------+----------- | 0-1500 bytes | | | | | | | | | +----------+----------+-----------------+------- LCP packet format: | Code |Identifier| Length | Data | | 8 bits | 8 bits | 16 bits | ... | +----------+----------+-----------------+------- | | | | | | | | | | +----------+----------+--------+----------+----------+------+------ LCP packet format: | Type | Length1 | Data1 | Type | Length1 | Data2| ... | Configuration parameters: | 8 bits | 8 bits | ... | 8 bits | 8 bits | ... | | +----------+----------+--------+----------+----------+------+------
Field |
Length |
Description |
---|---|---|
Flag |
1 byte |
This field identifies the start and end of a physical frame. Its value is 0x7E. |
Address |
1 byte |
This field identifies the destination address of the frame. However, because PPP is applied to P2P links, it can uniquely identify the address of the peer, meaning that two communicating devices do not need to know each other's data link layer address. As such, the value of this field is fixed as all 1s, which indicates a broadcast address. |
Control |
1 byte |
This field has no meaning in PPP and is set to 0x03. The Address and Control fields together specify a frame as a PPP frame. That is, a PPP frame header is FF03. |
Protocol |
1 or 2 bytes |
This field identifies the datagram content encapsulated in the Information field of a PPP frame. As described in ISO 3309 in terms of the address extension mechanism, the value of this field must be an odd number. Specifically, the last bit of the low byte is "1", and the last bit of the high byte is "0". If the Protocol field of a PPP frame from a sender does not comply with this requirement, the receiver regards the frame as unknown and rejects it, sending a Protocol-Reject packet that contains the protocol code of the rejected frame in the packet tail to the sender.
|
Information |
0–1500 bytes |
By default, the maximum length of the Information field plus any padding cannot exceed 1500 bytes. The maximum length equals the default maximum receive unit (MRU). In actual application, the maximum length can be negotiated as required. If the length of this field is less than 1500 bytes, padding can be added. When padding is added, two devices can communicate with each other only if they can separate the data content from the padding. |
FCS |
2 bytes |
This field is mainly used to check for errors in the transmission of PPP frames. The calculation scope is other fields except the Flag field. Transmission guarantee mechanisms such as the Frame Check Sequence (FCS) increases costs and delay in application-layer interactions. |
Code |
1 byte |
This field identifies the type of an LCP packet. In the link establishment phase, if a receiver receives an LCP packet with an unknown Code field, the receiver sends a Code-Reject packet to the sender. For an IP packet, the Code field is replaced by the IP data. Common code values are as follows:
|
Identifier |
1 byte |
This field identifies a pair of request and response packets. A request packet and its response packet have the same Identifier field, regardless of the response packet type. Generally, before entering the link establishment phase, the communicating devices consecutively send several Configure-Request packets to their peers. The values of the Data fields in these request packets may be the same, but the Identifier fields in these request packets are different. The Identifier field of a Configure-Request packet usually begins with 0x01 and increments by 1 each time a Configure-Request packet is sent. After receiving a response packet, the communicating device compares it with the sent packet to determine the next operation. |
Length |
2 bytes |
This field indicates the length of the LCP packet (including the Code, Identifier, Length, and Data fields) used for negotiation. Any bytes that exceed the length are regarded as padding and are ignored. The value of the Length field cannot be greater than the MRU. |
Data |
Variable |
This field contains the content of a negotiation packet. The main contents of the Data field are as follows:
|
Frame Example
Frame 1: 16 bytes on wire (128 bits), 16 bytes captured (128 bits) Arrival Time: Apr 24, 2009 06:38:09.600000000 Epoch Time: 1240526289.600000000 seconds [Time delta from previous captured frame: 0.000000000 seconds] [Time delta from previous displayed frame: 0.000000000 seconds] [Time since reference or first frame: 0.000000000 seconds] Frame Number: 1 Frame Length: 16 bytes (128 bits) Capture Length: 16 bytes (128 bits) [Frame is marked: False] [Frame is ignored: False] [Protocols in frame: ppp:lcp] Point-to-Point Direction: Sent (0) Point-to-Point Protocol Address: 0xff Control: 0x03 Protocol: Link Control Protocol (0xc021) [Direction: DTE->DCE (0)] PPP Link Control Protocol Code: Configuration Request (0x01) Identifier: 0x01 Length: 10 Options: (6 bytes) Async Control Character Map: 0x000a0000 (, DC1 (XON)DC3 (XOFF))
Frame 1: 20 bytes on wire (160 bits), 20 bytes captured (160 bits) Arrival Time: Apr 24, 2009 06:38:09.600000000 Epoch Time: 1240526289.600000000 seconds [Time delta from previous captured frame: 0.000000000 seconds] [Time delta from previous displayed frame: 0.000000000 seconds] [Time since reference or first frame: 0.000000000 seconds] Frame Number: 1 Frame Length: 20 bytes (160 bits) Capture Length: 20 bytes (160 bits) [Frame is marked: False] [Frame is ignored: False] [Protocols in frame: ppp:lcp] Point-to-Point Direction: Sent (0) Point-to-Point Protocol Address: 0xff Control: 0x03 Protocol: Link Control Protocol (0xc021) [Direction: DTE->DCE (0)] PPP Link Control Protocol Code: Configuration Reject (0x04) Identifier: 0x00 Length: 14 Options: (10 bytes) Magic number: 0x43acefab Protocol field compression Address/control field compression
Frame 6: 20 bytes on wire (160 bits), 20 bytes captured (160 bits) Arrival Time: Apr 24, 2009 06:38:09.600000000 Epoch Time: 1240526289.600000000 seconds [Time delta from previous captured frame: 0.000000000 seconds] [Time delta from previous displayed frame: 0.000000000 seconds] [Time since reference or first frame: 0.000000000 seconds] Frame Number: 6 Frame Length: 20 bytes (160 bits) Capture Length: 20 bytes (160 bits) [Frame is marked: False] [Frame is ignored: False] [Protocols in frame: ppp:lcp] Point-to-Point Direction: Received (1) Point-to-Point Protocol Address: 0xff Control: 0x03 Protocol: Link Control Protocol (0xc021) [Direction: DCE->DTE (1)] PPP Link Control Protocol Code: Configuration Nak (0x03) Identifier: 0x01 Length: 14 Options: (10 bytes) Magic number: 0x43ace5f9 Protocol field compression Address/control field compression
Frame 1: 16 bytes on wire (128 bits), 16 bytes captured (128 bits) Arrival Time: Apr 24, 2009 06:38:09.600000000 Epoch Time: 1240526289.600000000 seconds [Time delta from previous captured frame: 0.000000000 seconds] [Time delta from previous displayed frame: 0.000000000 seconds] [Time since reference or first frame: 0.000000000 seconds] Frame Number: 1 Frame Length: 16 bytes (128 bits) Capture Length: 16 bytes (128 bits) [Frame is marked: False] [Frame is ignored: False] [Protocols in frame: ppp:lcp] Point-to-Point Direction: Sent (0) Point-to-Point Protocol Address: 0xff Control: 0x03 Protocol: Link Control Protocol (0xc021) [Direction: DTE->DCE (0)] PPP Link Control Protocol Code: Configuration Ack (0x02) Identifier: 0x01 Length: 10 Options: (6 bytes) Async Control Character Map: 0x00000000 (None)
Frame 1: 14 bytes on wire (112 bits), 14 bytes captured (112 bits) Arrival Time: Apr 24, 2009 06:38:09.600000000 Epoch Time: 1240526289.600000000 seconds [Time delta from previous captured frame: 0.000000000 seconds] [Time delta from previous displayed frame: 0.000000000 seconds] [Time since reference or first frame: 0.000000000 seconds] Frame Number: 1 Frame Length: 14 bytes (112 bits) Capture Length: 14 bytes (112 bits) [Frame is marked: False] [Frame is ignored: False] [Protocols in frame: ppp:lcp] Point-to-Point Direction: Received (1) Point-to-Point Protocol Address: 0xff Control: 0x03 Protocol: Link Control Protocol (0xc021) [Direction: DCE->DTE (1)] PPP Link Control Protocol Code: Discard Request (0x0b) Identifier: 0x02 Length: 8 Magic number: 0x43acefab
Frame 1: 24 bytes on wire (192 bits), 24 bytes captured (192 bits) Arrival Time: Apr 24, 2009 06:38:09.600000000 Epoch Time: 1240526289.600000000 seconds [Time delta from previous captured frame: 0.000000000 seconds] [Time delta from previous displayed frame: 0.000000000 seconds] [Time since reference or first frame: 0.000000000 seconds] Frame Number: 1 Frame Length: 24 bytes (192 bits) Capture Length: 24 bytes (192 bits) [Frame is marked: False] [Frame is ignored: False] [Protocols in frame: ppp:lcp:ccp] Point-to-Point Direction: Received (1) Point-to-Point Protocol Address: 0xff Control: 0x03 Protocol: Link Control Protocol (0xc021) [Direction: DCE->DTE (1)] PPP Link Control Protocol Code: Protocol Reject (0x08) Identifier: 0x03 Length: 18 Rejected protocol: Compression Control Protocol (0x80fd) Rejected packet (12 bytes) PPP Compression Control Protocol Code: Configuration Request (0x01) Identifier: 0x01 Length: 12 Options: (8 bytes) Deflate Window: 7 Method: zlib compression (0x08) Sequence number check method: 0 MVRCA (Magnalink) Features: 3 Packet by Packet flag: true History: 32 Number of contexts: 0
Frame 1: 16 bytes on wire (128 bits), 16 bytes captured (128 bits) Arrival Time: Apr 24, 2009 06:38:09.600000000 Epoch Time: 1240526289.600000000 seconds [Time delta from previous captured frame: 0.000000000 seconds] [Time delta from previous displayed frame: 0.000000000 seconds] [Time since reference or first frame: 0.000000000 seconds] Frame Number: 1 Frame Length: 16 bytes (128 bits) Capture Length: 16 bytes (128 bits) [Frame is marked: False] [Frame is ignored: False] [Protocols in frame: ppp:ipcp] Point-to-Point Direction: Received (1) Point-to-Point Protocol Address: 0xff Control: 0x03 Protocol: IP Control Protocol (0x8021) [Direction: DCE->DTE (1)] PPP IP Control Protocol Code: Configuration Request (0x01) Identifier: 0x00 Length: 10 Options: (6 bytes) IP address: 10.28.113.85
Frame 1: 16 bytes on wire (128 bits), 16 bytes captured (128 bits) Arrival Time: Apr 24, 2009 06:38:09.600000000 Epoch Time: 1240526289.600000000 seconds [Time delta from previous captured frame: 0.000000000 seconds] [Time delta from previous displayed frame: 0.000000000 seconds] [Time since reference or first frame: 0.000000000 seconds] Frame Number: 1 Frame Length: 16 bytes (128 bits) Capture Length: 16 bytes (128 bits) [Frame is marked: False] [Frame is ignored: False] [Protocols in frame: ppp:ipcp] Point-to-Point Direction: Sent (0) Point-to-Point Protocol Address: 0xff Control: 0x03 Protocol: IP Control Protocol (0x8021) [Direction: DTE->DCE (0)] PPP IP Control Protocol Code: Configuration Ack (0x02) Identifier: 0x00 Length: 10 Options: (6 bytes) IP address: 10.28.113.85
Frame 1: 28 bytes on wire (224 bits), 28 bytes captured (224 bits) Arrival Time: Apr 24, 2009 06:38:09.600000000 Epoch Time: 1240526289.600000000 seconds [Time delta from previous captured frame: 0.000000000 seconds] [Time delta from previous displayed frame: 0.000000000 seconds] [Time since reference or first frame: 0.000000000 seconds] Frame Number: 1 Frame Length: 28 bytes (224 bits) Capture Length: 28 bytes (224 bits) [Frame is marked: False] [Frame is ignored: False] [Protocols in frame: ppp:ipcp] Point-to-Point Direction: Received (1) Point-to-Point Protocol Address: 0xff Control: 0x03 Protocol: IP Control Protocol (0x8021) [Direction: DCE->DTE (1)] PPP IP Control Protocol Code: Configuration Nak (0x03) Identifier: 0x01 Length: 22 Options: (18 bytes) IP address: 10.160.219.2 Primary DNS server IP address: 10.28.114.91 Secondary DNS server IP address: 10.28.122.93
Frame 15: 18 bytes on wire (144 bits), 18 bytes captured (144 bits) Arrival Time: Apr 24, 2009 06:38:09.600000000 Epoch Time: 1240526289.600000000 seconds [Time delta from previous captured frame: 0.000000000 seconds] [Time delta from previous displayed frame: 0.000000000 seconds] [Time since reference or first frame: 0.000000000 seconds] Frame Number: 15 Frame Length: 18 bytes (144 bits) Capture Length: 18 bytes (144 bits) [Frame is marked: False] [Frame is ignored: False] [Protocols in frame: ppp:ccp] Point-to-Point Direction: Sent (0) Point-to-Point Protocol Address: 0xff Control: 0x03 Protocol: Compression Control Protocol (0x80fd) [Direction: DTE->DCE (0)] PPP Compression Control Protocol Code: Configuration Request (0x01) Identifier: 0x01 Length: 12 Options: (8 bytes) Deflate Window: 7 Method: zlib compression (0x08) Sequence number check method: 0 MVRCA (Magnalink) Features: 3 Packet by Packet flag: true History: 32 Number of contexts: 0
Reference
Standard |
Description |
---|---|
The Point-to-Point Protocol (PPP) |
|
A NONSTANDARD FOR TRANSMISSION OF IP DATAGRAMS OVER SERIAL LINES: SLIP |
|
Compressing TCP/IP headers for low-speed serial links |
|
The PPP Multilink Protocol (MP) |
|
The PPP Internet Protocol Control Protocol (IPCP) |
|
The PPP Compression Control Protocol (CCP) |