PPPoE Packet Format - HCNA

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

12.1.

1 PPPoE Packet Format

Figure 12.23 shows the format of PPPoE packets. If the value of the Type field of
an Ethernet frame is 0x8863 or 0x8864, the payload of the Ethernet frame is a
PPPoE packet.
PPPoE packets consist of a PPPoE header and a PPPoE payload. In the PPPoE
header, the VER (version) and Type fields are always set to 0x1, the Code field
indicates the PPPoE packet type, the Length field indicates the length of the PPPoE
packets, and the Session-ID field identifies PPPoE sessions.
The PPP frame is in PPPoE payload.

12.1.2 Phases in PPPoE

PPPoE involves two phases: Discovery and PPP Session.


Discovery Phase
Figure 12.24 illustrates how during the PPPoE Discovery phase, the host and AC
exchange four types of PPPoE packets:
• PPPoE Active Discovery Initiation (PADI), with the Code field in the header
being set to 0x09;
• PPPoE Active Discovery Offer (PADO), with the Code field being set to 0x07;
318 12 PPP and PPPoE

Fig. 12.24 PPPoE Discovery phase

• PPPoE Active Discovery Request (PADR), with the Code field being set to 0x19;
• PPPoE Active Discovery Session-Confirmation (PADS), with the Code field
being set to 0x65.
During the Discovery phase seen in Fig. 12.25, the host broadcasts a PADI to
search the network for the AC and tell the AC the desired service type. The payload
of the PADI packet contains several Type-Length-Value tags, which indicate the
desired service types.

Destination MAC
address VER (0x1)
(ff-ff-ff-ff-ff-ff)
Type (0x1)
Tag_Type
Source MAC address Code (0x09) PADI Header
(Host MAC address) Tag_Length
Session-ID (0x0000)
Tag_Value
Type (0x8863) Length (16 bits)
......
Payload (PPPoE
packet) Payload PADI Payload

CRC
(32 bits)

Ethernet frame PADI packet


format format

Fig. 12.25 PADI packet format


12.2 PPPoE 319

Upon receiving the PADI packet, the AC compares the requested service types
in the PADI packet with the services it can provide. If the AC can provide the
services requested by the host, the AC will reply with a unicast PADO packet. If the
AC cannot provide the requested service, the AC does not reply. Figure 12.26 shows
the format of PADO packets.
If there are multiple ACs on the network, the host may receive multiple PADO
packets. Generally the host selects the AC whose PADO packet is the first to arrive
on the host as the PPPoE server, and unicasts a PADR packet to that AC. Figure
12.27 shows the format of PADR packets.

Destination MAC
address VER (0x1)
(Host MAC address)
Type (0x1)
Tag_Type
Source MAC address Code (0x07) PADO
(AC MAC address) Header Tag_Length
Session-ID (0x0000)
Tag_Value
Type (0x8863) Length (16 bits)
......
Payload (PPPoE
packet) Payload PADO
Payload

CRC
(32 bits)

Ethernet frame format PADO packet format

Fig. 12.26 PADO packet format

Destination MAC
address VER (0x1)
(AC MAC address)
Type (0x1)
Tag_Type
Source MAC address Code (0x19) PADR
(Host MAC address) Header Tag_Length
Session-ID (0x0000)
Tag_Value
Type (0x8863) Length (16 bits)
......
Payload (PPPoE
packet) Payload PADR
Payload
CRC
(32 bits)

Ethernet frame PADR packet


format format

Fig. 12.27 PADR packet format


320 12 PPP and PPPoE

Destination MAC
address VER (0x1)
(Host MAC address)
Type (0x1)
Tag_Type
Source MAC address Code (0x65) PADS
(AC MAC address) Header Tag_Length
Session-ID (0xXXXX)
Tag_Value
Type (0x8863) Length (16 bits)
......
Payload (PPPoE
packet) Payload PADS
Payload
CRC
(32 bits)

Ethernet frame format PADS packet format

Fig. 12.28 PADS packet format

After receiving the PADR packet, the AC determines the PPPoE session ID, and
sends a unicast PADS packet containing the PPPoE session ID in the PPPoE
Session_ID field. Figure 12.28 shows the format of PADS packets.
After the host receives the PADS and obtains the PPPoE session ID, the PPPoE
session between the host and AC is established. The host and AC then enter the PPP
Session phase.
PPP Session Phase
In the PPP Session phase, the host and AC exchange Ethernet frames containing
PPP frames. Figure 12.29 shows how the Type field of the Ethernet frame is set to
0x8864 (in the Discovery phase, the field is always set to 0x8863), indicating that
the payload of the Ethernet frame is a PPPoE frame. In PPPoE frames, the Code
field is set to 0x00, and the Session-ID field is the value determined during the
Discovery phase. Now the payload of the PPPoE packet is a PPP frame. However,
the PPP frame is incomplete and contains only the Protocol and Information fields
of the PPP frame, because other fields of PPP frames are unnecessary on virtual PPP
links.
By using PPPoE, the host and AC can exchange PPP frames during the PPP
Session phase. The exchange of PPP frames allows the host and AC to go through
the Link Establishment, Authentication, and Network Layer Protocol phases, and
will enable the host and AC to exchange IP packets.
12.3 Review Questions 321

01111110 11111111 00000011


Flag Address Control
Destination MAC
address (Host or AC
MAC address)

Source MAC address PPPoE


(AC or Host MAC Header
address)

Protocol
16 bits
Type (0x8864)

Payload (PPPoE
packet)

Information
CRC
(32 bits)

16 bits
FCS
Ethernet frame format PPPoE packet format

Fig. 12.29 Ethernet frame carrying a PPP frame

You might also like