PPPoE Huawei routing and switching of configuration

The blog by building a small network topology to be familiar with the basic configuration PPPoE, the following is performed Huawei ensp simulator, as shown in FIG
Here Insert Picture Description
Step : build a good topology, the connectors on each device ip address configured, (except G0 / 0/0 on g0 / 0/0 and AR2 on AR1 device) situation now simulation is router AR1 as a PPPoE client initiates a PPPoE (router AR2) by PPPoE way negotiate a PPPoE session, after consultation, AR2 AR1 to distribute a ip address, AR1 use this address to the Internet.

Step Two : Configure the PPPoE server.
In the above experiments, AR2 is used as PPPoE server.
Configuration is as follows:
[PPPoE Server] ip the pool TEK
create a pool of ip address to be assigned to the client address, the address pool named TEK
[PPPoE Server-ip-the pool-TEK] 24-Network 100.1.12.0 mask
will 100.1.12.0 this TEK into the network address pool ip address
[the PPPoE Server-ip-the pool-TEK] quit
[the PPPoE Server] the virtual-Template interface. 1
creates a virtual port, the virtual port will later and AR2 above g0 / 0 / 0 (physical interface) do bind
[PPPoE Server-virtual-Template1] ip address 100.1.12.2 24 ip address configuration for the virtual port
[PPPoE Server-virtual-Template1] ppp authentication-mode chap to this virtual port configuration of ppp the authentication mode is CHAP
[PPPoE Server-virtual-Template1] TEK Remote address the pool will be allocated TEK address pool to the virtual interface
[PPPoE Server-virtual-Template1] quit
[PPPoE Server] int G0 / 0/0
[PPPoE Server-GigabitEthernet0 / 0/ 0] pppoe-server bind virtual-template 1 physical port on the virtual port 1 above and AR2 g0 / 0/0 bound
later, we can enter the router display ip interface brief queries ip address interface, as shown below, we can see the Virtual-Template. 1 the iP addresses.
search result
When conducting negotiation, to authenticate by user name and password, so also configure a simple database on the server
[PPPoE Server] aaa
configuration in a database aaa inside
[PPPoE Server-aaa] local- user cen password cipher 123456 Configuring user name and password
[PPPoE server-aaa] local- user cen service-type ppp service type
after you have configured on the PPPoE server is done, we need to be configured on the client, in this experiment, AR1 is PPPoE client .
The third step : the PPPoE client configuration (AR1)
[PPPoE Client] Dialer-rule condition Dialer-rule into the view, in this view, the configuration may be initiated by dialing rules PPPoE session.
[PPPoE Client-dialer-rule] dialer-rule 1 ip permitOnly ip traffic restrictions can trigger dial conditions
[PPPoE Client-Dialer-rule] quit
[PPPoE Client] interface Dialer 1 Create and enter the Dialer interface.
[PPPoE Client-Dialer1] ip address ppp-negotiate allow interface ip address negotiation
[PPPoE Client-Dialer1] dialer user TEK configure its user name, the user name must be the same for the PPP user name on the end of the server
[PPPoE Client- dialer1] dialer bundle 1 this command is used to specify the interface Dialer bundle Dialer. The physical interface device associated with the dial up through the interface Dialer bundle.
[PPPoE Client-Dialer1] dialer- group 1 This command is used to place the interface in a dialer group
[PPPoE Client-Dialer1] ppp chap user cen to set the PPP chap inside authentication user name, that is, now dial the user name is called CEN
[PPPoE Client-Dialer1] ppp CHAP password 123456 to configure the cipher keyword password
[PPPoE Client-Dialer1] mtu 1492
MTU value server 1492, where 1492 is the effective payload, the payload under normal conditions is 1500, the ip level 1500 is an Ethernet or more payload 1500, for now PPP + PPPoE + ip and 1500 parts of the above is that, now payload, the header bytes need to deduct 2 bytes ppp also need deducted PPPoE header bytes 6 bytes, 1492 is the left and above the MTU ip, so here we need to change. If the value is not transmitted, it can not be modified. If the data transmitted over 1492, so do not modify it, data transmission can be problematic. Ethernet support default maximum payload of 1500 bytes. PPPoE header length of 6 bytes, PPP protocol ID is 2 bytes, so the frame in PPPoE MTU not exceed 1492 bytes.

[The PPPoE Client-Dialer1] quit
[the PPPoE Client] interface of GigabitEthernet 0/0/0
[the PPPoE Client-the GigabitEthernet0 / 0/0] PPPoE Client-Dial-the bundle. 1-Number This command binding is achieved and the physical interface Dialer Bundle , to specify a corresponding PPPoE session dialer Bundle, on-demand represents a PPPoE session works in demand dial mode. If you do not add on-demand So when this command is executed, it has begun consultations of the ppp.
[PPPoE Client] ip route-static 0.0.0.0 0 Dialer 1 configured default route
after finishing the above steps, we can display ip interface brief interface information about the client (AR2 of) view

! Here Insert Picture Description
Here Insert Picture Description
We can see, dialer1 this virtual interface through PPPoE dial-up has been a ip address, and enables communication between the external network.
Next, in the capture g0 / 0/0 port on the client (AR2 of), as shown in FIG.

Here Insert Picture Description
We find that the client will first send a broadcast message, the message is called PADI, when the server receives, will use unicast mode replied a PADO, in this message, you can see the name of the server and mac address Here Insert Picture Descriptionthen the client sends to the server a PADR, reply to the other side, I have chosen you as the server, after receiving the PADR, it will generate a unique session id, sent to the client, as shown below
Here Insert Picture Description
after start into the conversation stage, this stage is the ppp session
Here Insert Picture Description
above is a simple experiment on the PPPoE, hhhhhh. . .

Released nine original articles · won praise 0 · Views 103

Guess you like

Origin blog.csdn.net/weixin_42463871/article/details/105294020