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.

PPPoE

PPPoE

PPPoE is an extension of PPP. It provides methods for establishing PPPoE sessions and encapsulating PPP frames over Ethernet.

Frame Format

Figure 1-23 Format of a PPPoE frame
            +-----------+-----------+-------------+--------------------+-----------
            |   DMAC    |   SMAC    | Type/Length |    Payload Data    |   FCS    |
            |  6 bytes  |  6 bytes  |   2 bytes   |  Variable length   | 4 bytes  |
            +-----------+-----------+-------------+--------------------+-----------
                                                  |                    |
                                        |                                |
                               |                                            |
                     |                                                         |
            |                                                                     |
            +----------+----------+--------+------------+----------+---------------
            |   Ver    |   Type   |  Code  | Session ID |  Length  | Payload Data1|
            |  4 bits  |  4 bits  | 1 byte |  2 bytes   | 2 bytes  |              |
            +----------+----------+--------+------------+----------+---------------
Table 1-13 Fields in a PPPoE frame

Field

Length

Description

DMAC

6 bytes

This field contains either a unicast Ethernet destination address or the Ethernet broadcast address (0xffffffff). In a Discovery packet, the value of this field is the Ethernet broadcast address. In the PPPoE session stage, the value of this field must be the unicast address of the peer end determined in the Discovery stage.

SMAC

6 bytes

This field contains the MAC address of the source device that sent the frame.

Type/Length

2 bytes

This field has two meanings:

  • Length: If the value of this field is less than or equal to 1500 in decimal format (or 0x05DC in hexadecimal format), this field indicates the length of the subsequent data, excluding the FCS field.
  • Type: If the value of this field is greater than or equal to 1536 in decimal format (or 0x0600 in hexadecimal format), this field indicates the type of the upper-layer protocol directly encapsulated on the link.

For PPPoE, this field indicates "Type", and is set to either 0x8863 (discovery stage) or 0x8864 (PPP session stage).

Payload Data

Variable

This field indicates the Ethernet payload.

FCS

4 bytes

This field provides a method for the receiving network adapter to determine whether a transmission error occurs. If errors are detected, involved frames are discarded.

FCS is a general name for multiple verification methods. In an Ethernet frame, CRC is usually used as the FCS.

Ver

4 bits

This field indicates the PPPoE version and must be set to 0x01.

Type

4 bits

This field indicates the PPPoE type and must be set to 0x01.

Code

1 byte

This field is defined in the Discovery and PPPoE session stages. Different types of PPPoE frames correspond to different code values.

Session ID

2 bytes

This field is an unsigned value in network byte order (low-order bytes are placed first). Its value is defined in Discovery packets. The value is fixed for a given PPP session and defines a PPP session along with the Ethernet source and destination MAC addresses. A value of 0xffff is reserved for future use and must not be used.

Length

2 bytes

This field indicates the length of the PPPoE payload (excluding the Ethernet or PPPoE headers).

Payload Data1

Variable

PPPoE consists of two stages: PPPoE discovery stage and PPPoE session stage. In the discovery stage, the Payload Data field is filled with tags (described later). In the session stage, this field carries PPP packets.

A tag is a type-length-value (TLV) construct, as follows:

+------------------------+
|   Tag_Type (2 bytes)   |
+------------------------+
|  Tag_Length (2 bytes)  |
+------------------------+
|  Tag_Value (variable)  |
+------------------------+
  • Tag_Type: 2 bytes, in network byte order. Table 1-14 describes the values of various Tag_Types.
  • Tag_Length: 2 bytes, in network byte order. It is an unsigned value that indicates the number of bytes of Tag_Value. If a Discovery packet with an unknown Tag_Type is received, the tag is ignored.
  • Tag_Value: data field of a tag. The length is variable.

Tag_Types and Their Values

Table 1-14 Tag_Types and their values

Value

Tag_Type

Description

0x0000

End-Of-List

This tag indicates that there are no further tags in the list. The Tag_Length field of this tag is always 0. Use of this tag is not required, but remains for backwards compatibility.

0x0101

Service-Name

This tag indicates that a service name follows (used mainly to indicate the service that the network side can provide for users).

  • Tag_Value is a string that does not end with NULL.
  • When Tag_Length is 0, this tag is used to indicate that any service is accepted.

For example, this tag can be used to indicate an ISP name or a class or quality of service.

0x0102

AC-Name

This tag indicates that a string follows. The string is used to uniquely identify an Access Concentrator (AC).

It may be a combination of trademark, model, and serial ID information, or simply a representation of the MAC address of the AC. It is not NULL terminated.

0x0103

Host-Uniq

This tag is used by a host to associate an AC response (PADO or PADS packet) with a unique host request. The Tag_Value is binary data of any value and length that the host chooses. It is not interpreted by the AC.

The host may include a Host-Uniq tag in a PADI or PADR packet. Upon receiving such a tag, the AC must include it unmodified in the associated PADO or PADS response.

0x0104

AC-Cookie

This tag is used by the AC to aid in protecting against denial of service (DoS) attacks. The AC may include this tag in a PADO packet. Upon receiving such a tag, a host must return it unmodified in the associated PADR packet.

The Tag_Value is binary data of any value and length.

0x0105

Vendor-Specific

This tag is used to pass vendor proprietary information. The first 4 bytes of the Tag_Value field contain the vendor ID and the remaining bytes are unspecified.

The high-order byte of the vendor ID is 0 and the low-order 3 bytes are the SMI network management private enterprise code of the vendor in network byte order.

It is recommended not to use this tag. To ensure interoperability, the vendor-specific tag can be ignored during implementation.

0x0110

Relay-Session-Id

This tag indicates a relay session ID. PPPoE data packets, like DHCP packets, can be terminated on another AC. This tag is used to maintain the connection to another AC. This tag can be added to a Discovery packet by an intermediate agent that is relaying traffic.

All PADI packets must have sufficient room for the addition of this tag with a Tag_Value length of 12 bytes.

If a Discovery packet already contains a Relay-Session-Id tag, another one must not be added. In this case, the intermediate agent should use the existing one.

If the existing tag cannot be used or there is insufficient room to add a new one, the intermediate agent should return a Generic-Error tag to the sender.

0x0201

Service-Name-Error

This tag indicates that the requested Service-Name is ignored.

Service-Name-Error is carried in the response from the peer end when the peer end does not support the requested service. If this tag contains data and the first byte is non-zero, it must be a printable string explaining why the request was denied.

This string may not be NULL terminated.

0x0202

AC-System-Error

This tag indicates that the AC experienced some error in performing the host request (for example, there are insufficient resources to create a virtual circuit). It may be included in PADS packets.

If this tag contains data and the first byte is non-zero, it must be a printable string explaining the nature of the error.

This string may not be NULL terminated.

0x0203

Generic-Error

This tag indicates that a generic error occurs.

It can be added to PADO, PADR, or PADS packets when an unrecoverable error occurs and no other error tag is appropriate.

If this tag contains data, it must be a string explaining the nature of the error.

This string must not be NULL terminated.

Frame Example

Figure 1-24 PPPoE PADI frame (discovery stage)
Frame 1: 24 bytes on wire (192 bits), 24 bytes captured (192 bits)
    Arrival Time: Jul 28, 2015 01:24:27.745022000 
    Epoch Time: 1438017867.745022000 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: eth:pppoed]
    [Coloring Rule Name: Broadcast]
    [Coloring Rule String: eth[0] & 1]
Ethernet II, Src: 20:28:18:a0:a9:d2 (20:28:18:a0:a9:d2), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
    Destination: Broadcast (ff:ff:ff:ff:ff:ff)
        Address: Broadcast (ff:ff:ff:ff:ff:ff)
        .... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
        .... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
    Source: 20:28:18:a0:a9:d2 (20:28:18:a0:a9:d2)
        Address: 20:28:18:a0:a9:d2 (20:28:18:a0:a9:d2)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
    Type: PPPoE Discovery (0x8863)
PPP-over-Ethernet Discovery
    0001 .... = Version: 1
    .... 0001 = Type: 1
    Code: Active Discovery Initiation (PADI) (0x09)
    Session ID: 0x0000
    Payload Length: 4
    PPPoE Tags
Figure 1-25 PPPoE PADO frame (discovery stage)
Frame 2: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)
    Arrival Time: Jul 28, 2015 01:24:27.769982000
    Epoch Time: 1438017867.769982000 seconds
    [Time delta from previous captured frame: 0.024960000 seconds]
    [Time delta from previous displayed frame: 0.024960000 seconds]
    [Time since reference or first frame: 0.024960000 seconds]
    Frame Number: 2
    Frame Length: 60 bytes (480 bits)
    Capture Length: 60 bytes (480 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:pppoed]
Ethernet II, Src: Unispher_a4:10:be (00:90:1a:a4:10:be), Dst: 20:28:18:a0:a9:d2 (20:28:18:a0:a9:d2)
    Destination: 20:28:18:a0:a9:d2 (20:28:18:a0:a9:d2)
        Address: 20:28:18:a0:a9:d2 (20:28:18:a0:a9:d2)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
    Source: Unispher_a4:10:be (00:90:1a:a4:10:be)
        Address: Unispher_a4:10:be (00:90:1a:a4:10:be)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
    Type: PPPoE Discovery (0x8863)
PPP-over-Ethernet Discovery
    0001 .... = Version: 1
    .... 0001 = Type: 1
    Code: Active Discovery Offer (PADO) (0x07)
    Session ID: 0x0000
    Payload Length: 35
    PPPoE Tags
        AC-Name: r-al121
        AC-Cookie: bebcb53c10b32769a8661c36a45d8720
Figure 1-26 PPPoE PADR frame (discovery stage)
Frame 3: 44 bytes on wire (352 bits), 44 bytes captured (352 bits)
    Arrival Time: Jul 28, 2015 01:24:27.770082000
    Epoch Time: 1438017867.770082000 seconds
    [Time delta from previous captured frame: 0.000100000 seconds]
    [Time delta from previous displayed frame: 0.000100000 seconds]
    [Time since reference or first frame: 0.025060000 seconds]
    Frame Number: 3
    Frame Length: 44 bytes (352 bits)
    Capture Length: 44 bytes (352 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:pppoed]
Ethernet II, Src: 20:28:18:a0:a9:d2 (20:28:18:a0:a9:d2), Dst: Unispher_a4:10:be (00:90:1a:a4:10:be)
    Destination: Unispher_a4:10:be (00:90:1a:a4:10:be)
        Address: Unispher_a4:10:be (00:90:1a:a4:10:be)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
    Source: 20:28:18:a0:a9:d2 (20:28:18:a0:a9:d2)
        Address: 20:28:18:a0:a9:d2 (20:28:18:a0:a9:d2)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
    Type: PPPoE Discovery (0x8863)
PPP-over-Ethernet Discovery
    0001 .... = Version: 1
    .... 0001 = Type: 1
    Code: Active Discovery Request (PADR) (0x19)
    Session ID: 0x0000
    Payload Length: 24
    PPPoE Tags
        AC-Cookie: bebcb53c10b32769a8661c36a45d8720
Figure 1-27 PPPoE PADS frame (discovery stage)
Frame 4: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)
    Arrival Time: Jul 28, 2015 01:24:27.859184000 
    Epoch Time: 1438017867.859184000 seconds
    [Time delta from previous captured frame: 0.089102000 seconds]
    [Time delta from previous displayed frame: 0.089102000 seconds]
    [Time since reference or first frame: 0.114162000 seconds]
    Frame Number: 4
    Frame Length: 60 bytes (480 bits)
    Capture Length: 60 bytes (480 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:pppoed]
Ethernet II, Src: Unispher_a4:10:be (00:90:1a:a4:10:be), Dst: 20:28:18:a0:a9:d2 (20:28:18:a0:a9:d2)
    Destination: 20:28:18:a0:a9:d2 (20:28:18:a0:a9:d2)
        Address: 20:28:18:a0:a9:d2 (20:28:18:a0:a9:d2)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
    Source: Unispher_a4:10:be (00:90:1a:a4:10:be)
        Address: Unispher_a4:10:be (00:90:1a:a4:10:be)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
    Type: PPPoE Discovery (0x8863)
PPP-over-Ethernet Discovery
    0001 .... = Version: 1
    .... 0001 = Type: 1
    Code: Active Discovery Session-confirmation (PADS) (0x65)
    Session ID: 0x18b2
    Payload Length: 4
    PPPoE Tags
Figure 1-28 PPPoE frame (session stage)
Frame 1: 70 bytes on wire (560 bits), 70 bytes captured (560 bits)
    Arrival Time: Jan  2, 2014 16:37:54.073759000
    Epoch Time: 1388651874.073759000 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: 70 bytes (560 bits)
    Capture Length: 70 bytes (560 bits)
    [Frame is marked: False]
    [Frame is ignored: False]
    [Protocols in frame: eth:pppoes:ppp:ip:udp:l2tp]
    [Coloring Rule Name: UDP]
    [Coloring Rule String: udp]
Ethernet II, Src: Sfr_18:c2:73 (e0:a1:d7:18:c2:73), Dst: Sfr_61:00:00 (00:17:33:61:00:00)
    Destination: Sfr_61:00:00 (00:17:33:61:00:00)
        Address: Sfr_61:00:00 (00:17:33:61:00:00)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
    Source: Sfr_18:c2:73 (e0:a1:d7:18:c2:73)
        Address: Sfr_18:c2:73 (e0:a1:d7:18:c2:73)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
    Type: PPPoE Session (0x8864)
PPP-over-Ethernet Session
    0001 .... = Version: 1
    .... 0001 = Type: 1
    Code: Session Data (0x00)
    Session ID: 0x3b1a
    Payload Length: 50
Point-to-Point Protocol
    Protocol: IP (0x0021)
Internet Protocol Version 4, Src: 10.136.242.99 (10.136.242.99), Dst: 10.6.1.72 (10.6.1.72)
    Version: 4
    Header length: 20 bytes
    Differentiated Services Field: 0xb4 (DSCP 0x2d: Unknown DSCP; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
        1011 01.. = Differentiated Services Codepoint: Unknown (0x2d)
        .... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
    Total Length: 48
    Identification: 0x0000 (0)
    Flags: 0x02 (Don't Fragment)
        0... .... = Reserved bit: Not set
        .1.. .... = Don't fragment: Set
        ..0. .... = More fragments: Not set
    Fragment offset: 0
    Time to live: 64
    Protocol: UDP (17)
    Header checksum: 0x79cf [correct]
        [Good: True]
        [Bad: False]
    Source: 10.136.242.99 (10.136.242.99)
    Destination: 10.6.1.72 (10.6.1.72)
User Datagram Protocol, Src Port: l2f (1701), Dst Port: l2f (1701)
    Source port: l2f (1701)
    Destination port: l2f (1701)
    Length: 28
    Checksum: 0x0000 (none)
        [Good Checksum: False]
        [Bad Checksum: False]
Layer 2 Tunneling Protocol
    Packet Type: Control Message Tunnel Id=1527 Session Id=0
        1... .... .... .... = Type: Control Message (1)
        .1.. .... .... .... = Length Bit: Length field is present
        .... 1... .... .... = Sequence Bit: Ns and Nr fields are present
        .... ..0. .... .... = Offset bit: Offset size field is not present
        .... ...0 .... .... = Priority: No priority
        .... .... .... 0010 = Version: 2
    Length: 20
    Tunnel ID: 1527
    Session ID: 0
    Ns: 15
    Nr: 2
    Control Message AVP
        Mandatory: True
        Hidden: False
        Length: 8
        Vendor ID: Reserved (0)
        Type: Control Message (0)
        Control Message Type: (6) Hello

Reference

Standard

Description

RFC 2516

A Method for Transmitting PPP Over Ethernet (PPPoE)

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

Digital Signature File

digtal sigature tool