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

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

Figure 1-12 Format of a PPP frame
           |<--------------------------      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  | ...  |     |
                           +----------+----------+--------+----------+----------+------+------
Table 1-12 Fields in a PPP frame

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.

  • 0x0021: Internet Protocol
  • 0x002b: Novell IPX
  • 0x002d: Van Jacobson Compressed TCP/IP
  • 0x002f: Van Jacobson Uncompressed TCP/IP
  • 0x0057: Internet Protocol Version 6
  • 0x8021: Internet Protocol Control Protocol
  • 0x802b: Novell IPX Control Protocol
  • 0x8031: Bridging NC
  • 0x8057: IPv6 Control Protocol
  • 0xC021: Link Control Protocol
  • 0xC023: Password Authentication Protocol
  • 0xC223: Challenge Handshake Authentication Protocol

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:

  • 0x01: Configure-Request
  • 0x02: Configure-Ack
  • 0x03: Configure-Nak
  • 0x04: Configure-Reject
  • 0x05: Terminate-Request
  • 0x06: Terminate-Ack
  • 0x07: Code-Reject
  • 0x08: Protocol-Reject
  • 0x09: Echo-Request
  • 0x0a: Echo-Replyt
  • 0x0b: Discard-Request
  • 0x0c: Reserved

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:

  • Type: indicates the negotiation option type. Common negotiation types are as follows:

    0x01: Maximum-Receive-Unit

    0x02: Async-Control-Character-Map

    0x03: Authentication-Protocol

    0x04: Quality-Protocol

    0x05: Magic-Number

    0x06: Reserved

    0x07: Protocol-Field-Compression

    0x08: Address-and-Control-Field-Compression

  • Length: indicates the total length of the Data field. It includes the Type, Length, and Data.
  • Data: indicates the contents of the Data field.

Frame Example

Figure 1-13 PPP LCP frame (Configure-Request)
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))
Figure 1-14 PPP LCP frame (Configure-Reject)
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
Figure 1-15 PPP LCP frame (Configure-NAK)
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
Figure 1-16 PPP LCP frame (Configure-ACK)
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)
Figure 1-17 PPP LCP frame (Discard-Request)
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
Figure 1-18 PPP LCP frame (Protocol-Reject)
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
Figure 1-19 PPP IPCP frame (Configuration-Request)
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
Figure 1-20 PPP IPCP frame (Configuration-Ack)
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
Figure 1-21 PPP IPCP frame (Configuration-Nak)
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
Figure 1-22 PPP CCP frame (Configuration-Request)
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

RFC 1661

The Point-to-Point Protocol (PPP)

RFC 1055

A NONSTANDARD FOR TRANSMISSION OF IP DATAGRAMS OVER SERIAL LINES: SLIP

RFC 1144

Compressing TCP/IP headers for low-speed serial links

RFC 1717

The PPP Multilink Protocol (MP)

RFC 1332

The PPP Internet Protocol Control Protocol (IPCP)

RFC 1962

The PPP Compression Control Protocol (CCP)

Translation
Favorite
Download
Update Date:2025-08-12
Document ID:EDOC1100174721
Views:251529
Downloads:1062
Average rating:3.0Points

Digital Signature File

digtal sigature tool