Example for Configuring PPPoE Dialup Access in Easy IP Mode
Networking Requirements
The command output is as follows: As shown in Figure 5-21, the router obtains an IP address from the PPPoE server. The IP address of Eth2/0/1 on the router is 192.168.0.1/24 and the IP address of the PPPoE server is 2.2.2.2/16. Internal hosts connect to the network using routers. The router obtains a public IP address from the PPPoE server in PPPoE dialup mode. Users hope that internal hosts can access external networks.
Configuration Roadmap
The configuration roadmap is as follows:
Create a dialer interface and set parameters of the dialer port, establish a PPPoE session, configure a static route on the router, and configure Easy IP on the dialer interface to implement external network access by configuring PPPoE dialup in Easy IP mode.
Procedure
- Configure a PPPoE server.
Configure the authentication mode, IP address allocation mode, and IP address or IP address pool for the PPPoE client. For details about the configuration procedure, see the documentation of the PPPoE server. If the router functions as a PPPoE server, see Example for Configuring the PPPoE Server.
- Configure a dialer port.
<Huawei> system-view [Huawei] sysname Router [Router] dialer-rule [Router-dialer-rule] dialer-rule 1 ip permit [Router-dialer-rule] quit [Router] interface dialer 1 [Router-Dialer1] dialer user user2 [Router-Dialer1] dialer-group 1 [Router-Dialer1] dialer bundle 1 [Router-Dialer1] dialer timer idle 300 INFO: The configuration will become effective after link reset. [Router-Dialer1] dialer queue-length 8 [Router-Dialer1] ppp chap user user1@system [Router-Dialer1] ppp chap password cipher huawei123 [Router-Dialer1] ip address ppp-negotiate [Router-Dialer1] quit
- Create a PPPoE session.
[Router] interface gigabitethernet 1/0/0 [Router-GigabitEthernet1/0/0] undo portswitch [Router-GigabitEthernet1/0/0] pppoe-client dial-bundle-number 1 on-demand [Router-GigabitEthernet1/0/0] quit
- Configure a static route on the router.
[Router] ip route-static 0.0.0.0 0 dialer 1
- Configure outbound NAT on the dialer interface in Easy
IP mode.
[Router] acl 2000 [Router-acl-basic-2000] rule 5 permit source 192.168.0.0 0.0.0.255 [Router-acl-basic-2000] quit [Router] interface dialer 1 [Router-Dialer1] nat outbound 2000 [Router-Dialer1] quit
- Verify the configuration.
# Run the display pppoe-client session summary command to check the PPPoE session status and configuration. Check whether the session status is Up and whether the configuration is consistent with the data plan and networking according to command output.
<Router> display pppoe-client session summary PPPoE Client Session: ID Bundle Dialer Intf Client-MAC Server-MAC State 1 1 1 GE1/0/0 00e0fc030201 00e0fc030206 PPPUP
# Run the display nat outbound command on the router. The command output is as follows:
<Router> display nat outbound NAT Outbound Information: --------------------------------------------------------------------------- Interface Acl Address-group/IP/Interface Type --------------------------------------------------------------------------- Dialer1 2000 1.1.1.1 easyip --------------------------------------------------------------------------- Total : 1
Configuration Files
Configuration file of the router
# sysname Router # acl number 2000 rule 5 permit source 192.168.0.0 0.0.0.255 # dialer-rule dialer-rule 1 ip permit # interface Dialer1 link-protocol ppp ppp chap user user1@system ppp chap password cipher %^%#R=>NT8A-8KmWU38WOZq(s%MsRSg>3,}l9b%K.%!S%^%# ip address ppp-negotiate dialer user user2 dialer bundle 1 dialer queue-length 8 dialer timer idle 300 dialer-group 1 nat outbound 2000 # interface GigabitEthernet1/0/0 undo portswitch pppoe-client dial-bundle-number 1 on-demand # ip route-static 0.0.0.0 0.0.0.0 Dialer1 # return