14 1-Pppoe
14 1-Pppoe
,
LTD. 2022. All Rights Reserved.
1. Internet technology
2. Key Technologies of Network Interconnection
3. Network Interconnection Case Analysis
4. Exercises
CONTENTS
1. Overview
2. PPPOE principle
3. PPPOE application
4. Exercises
PPPOE Overview
Overview
Development of PPPoE
PPPoE - Point to Point Protocol over Ethernet
PPP is a typical point-to-point link layer protocol, usually used on serial links; Ethernet is a typical
broadcast network. Why mix the two?
This is related to the broadband network development of ISP operators:
In the early days, users mostly used PPP dialing for Internet access, which mainly came from two aspects:
1. The hardware is carried on the PSTN telephone line. These are ready-made network resources does
not need repeated construction;
2. The PPP itself has authentication protocols such as PAP and CHAP, which is convenient for the ISP to
perform user authentication and billing functions
However, this method also has disadvantages:
1. The upper limit of bandwidth is 64k
2. Voice and data cannot be performed simultaneously
5
Overview
Development of PPPoE (continued)
Later, the product, ISDN, called "Integrated Services Digital Network", was introduced to improve the Internet bandwidth
and the simultaneous operation of data and voice
However, the popularization of ISDN in China is not good for many reasons:
1. The upper bandwidth limit is upgraded to 64k * 2, but it does not fundamentally solve
the problem
2. When to use ISDN, they must reapply for lines. The original PSTN line resources cannot
be fully utilized
Ethernet is characterized by high bandwidth and broadcast network: The former helps to meet the increasing
bandwidth requirements; The latter is also conducive to ISP networking. When an end user needs to be added, the
local end network does not need to change
6
Ethernet also has disadvantages: The layer 2 protocol ARP is too simple, and there is no necessary user
Overview
In the current network development process, Ethernet and PPP come together naturally.
1. Transmission on PSTN line through AD modulation and demodulation; But for user
terminal equipment, the network is Ethernet with bandwidth of no more than 2M, which
is widely used at that time
2. Use full Ethernet and optical fiber for networking with PPPoE protocol, the bandwidth
can reach FE, GE or even higher; This mode does not require Modem, but the networking
cost is high. 7
PPPOE principle
PPPOE Principle introduction
Protocol stack
The PPPoE protocol stack is divided into two parts. The first part is about the establishment of point-to-point
virtual connection, which is the Discover discovery stage; The second is about the data stage of carrying PPP
messages. No matter which type, they are carried in the Ethernet standard message structure.
Disc o ve r DATA
Pa ylo a d
Ta g
PPP
PPPo E 9
Eth e rn e t
PPPOE Principle introduction
PPPoE Packet Header
PPPoE header
Regardless of the stage, the content carried by the upper layer of PPPoE is different. The
standard header structure is:
11
PPPOE principle
12
PPPOE principle
AC 1 c lie n t AC 2
13
PPPOE principle
Stage-I : PPPoE Discover Negotiation
PADI, PPPoE Active Discovery Initiation, always initiated by the client
Since the MAC address of the AC concentrator/server is not known, the destination MAC address of the underlying Ethernet
frame is broadcast; the Session_ID must be set to 0, waiting for the other AC to assign
In Payload, common TAGs are Service-Name and Host-Uniq; among them, Service-Name is a mandatory TAG, and the
Length is 0, indicating that any PPPoE service is acceptable
After AC receives the PADI request message, if it has available services, it will send a response to CLient through PADO.
Note that the message is unicast, and the Session_ID remains 0.
In PADO's Payload, common TAGs are Service-Name and AC-Name, both of which are mandatory
Note:
2. 2. In PADO, multiple Service-Name TAGs are usually included to improve the "hit rate" of the Offer.
PPPOE principle
Stage-I : PPPoE Discover Negotiation
PADR, PPPoe Active Discovery Seesion-confirmation.
Since PADI messages are broadcasted, the Client may receive multiple Offers at the same time; since PPPoE needs to establish a virtual point-to-
point connection, one of the multiple Offers must be selected for subsequent negotiation.
The client is selected based on the AC-Name or the Service provided by the AC, and the implementation of each manufacturer may be different.
PADR will be unicast to the selected AC. Note: The Session_ID is still 0, which is designated.
In the Tag of PADR, at least one Service-Name must be included to notify the service selected by the Client; only one Service-Name TAG can be
included.
After AC receives the PADR, it will confirm the PPPoE connection, and prepare for the subsequent PPP connection
AC generates a globally unique Session_ID for the Client, and unicasts it to the Client in the PADS message; it must include the Service-Name
selected by the Bearer Client in the TAG for confirmation.
After that, AC will enable a logical port and trigger PPP negotiation
If the requested Service-Name is abnormal in the received PADR, the AC still responds to the PADS, but the Session_ID is forced to be 0, and the
TAG is Service-Name-error
15
PPPOE principle
Stage-I : PPPoE Discover Negotiation
Among the four packets in the PPPoE discovery phase, establish a virtual point-to-point connection through negotiation and interaction of at least four packets. Among them,
the first two messages are mainly used to select the AC (server), and the last two messages are for application.
Thinking: What are the main differences between the discovery phase of PPPoE and the discovery of the DHCP protocol?
Unlink
The process of unlinking is relatively simple. When the connection needs to be terminated actively or an abnormal situation occurs, the Client or AC can initiate a PADT
message to forcefully terminate the connection.
PADT unicasts to the other host through Ethernet, and the Session_ID must be specified, that is, the number of the PPPoE virtual point-to-point that needs to be
terminated
The initiator of disconnecting the link needs to clear the relevant content of PPPoE after sending the PADT message, and at the same time terminate the transmission of
the upper layer PPP message
After the other party receives the PADT message, it also needs to terminate the transmission of any PPP message, and set the corresponding PPPoE Session (virtual
interface) to down.
AC c lie n t
PADT
16
PPPOE principle
Pa ylo a d
Ta g
PPP
PPPo E
Eth e rn e t (typ e =8864)
17
PPPOE principle
18
PPPOE application
PPPOE application
internet
AC
…
PC Router Router 20
Exercises
Exercises
PPPoE configuration
Command:
vpdn enable //Enable PPPoE function
vpdn-group <number> // Create PPPPoE group
protocol pppoe //Specify the protocol
{request-dialin | accept-dialin} //Specify as Client or AC
port { vt |vn <number> } //Call the upper layer virtual PPP interface
pppoe bind interface <type>/<number>//bind physical Ethernet interface
Command:
show pppoe session
debug pppoe event
debug pppoe packet
debug pppoe error
Usually, the first two commands are used more.
22
Exercises
PPPoE configuration (continued)
Note:
VN is virtual-tunnel, which is a virtual PPPoE interface created by the client to serve for PPP
negotiation;
VT is virtual-template, not a logical interface, but just a template; called by the AC server. Every time
the Client successfully dials in, a virtual interface is generated according to this template, called
Virtual-access, referred to as VA.
When the client unlinks, the corresponding va interface is also deleted immediately
For the AC side of PPPoE, its virtual template VT is not an "interface", and the real virtual interface
VA is unstable, so it cannot be directly used for routing;
In view of the above problems, for the PPPoE server side, when setting the route, either next-hop is
a determined IP address, or use dynamic routes such as RIP and OSPF to learn dynamically.
23
PPPOE experiment
PPPoE experiment
Connect the devices according to the topolog shown in the figure. Two routers act as the AC and Client of
PPPoE respectively. After the dial-up is completed, the Client obtain the IP in the AC address pool. On this
basis, it is required to realize intercommunication between the PC and the Server ( two methods)
Change the topology, in which PC acts as a PPPoE client to dial up directly. What is the difference in the
PPPoE negotiation process? How is the routing setup different?
Server
Client AC
PC 24
Thanks
Copyright ©Shanghai Baud Data Communication Co., LTD.