掌握PPPoE客户端拨号接口的配置方法和PPPoE客户端认证的配置方法
拓扑图:
我们以AR1作为服务器,AR2和AR3作为客户端。
1.按上面拓扑图进行组网。
2.配置PPPoE服务器:
AR1:
<Huawei>undo ter mon
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]ip pool 1
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-1]network 192.168.100.0 mask 24
[Huawei-ip-pool-1]gateway-list 192.168.100.1
[Huawei-ip-pool-1]q
[Huawei]interface Virtual-Template 1
[Huawei-Virtual-Template1]ppp authentication-mode chap
[Huawei-Virtual-Template1]ip address 192.168.100.1 24
[Huawei-Virtual-Template1]remote address pool 1
[Huawei-Virtual-Template1]q
[Huawei]int gi0/0/0 //将上面创建的模板绑定在这个端口上
[Huawei-GigabitEthernet0/0/0]pppoe-server bind virtual-template 1
[Huawei-GigabitEthernet0/0/0]q
[Huawei]aaa //创建aaa认证的上网账号密码
[Huawei-aaa]local-user hh1 password cipher hh123
Info: Add a new user.
[Huawei-aaa]local-user hh1 service-type ppp
[Huawei-aaa]local-user hh2 password cipher hh123
Info: Add a new user
[Huawei-aaa]local-user hh2 service-type ppp
[Huawei-aaa]q
配置客户端AR1:(要在R1上创建拨号接口并开启PPP认证功能。配置PPP被认证方的用户名和密码,和之前服务端所创建的一致)
<Huawei>undo terminal monitor
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]dialer-rule
[Huawei-dialer-rule]dialer-rule 1 ip permit
[Huawei-dialer-rule]q
[Huawei]int dialer 1
[Huawei-Dialer1]dialer user user1
[Huawei-Dialer1]dialer-group 1
[Huawei-Dialer1]dialer bundle 1
[Huawei-Dialer1]ppp chap user hh1
[Huawei-Dialer1]ppp chap password cipher hh123
[Huawei-Dialer1]dialer timer idle 300
INFO: The configuration will become effective after link reset.
[Huawei-Dialer1]dialer queue-length 8
[Huawei-Dialer1]ip address ppp-negotiate
[Huawei-Dialer1]q
[Huawei]int g 0/0/0
[Huawei-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1
[Huawei-GigabitEthernet0/0/0]q
[Huawei]ip route-static 0.0.0.0 0.0.0.0 Dialer 1
配置客户端AR2(和上面配置相同,注意账户密码。)
<Huawei>undo terminal monitor
Info: Current terminal monitor is off.
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]dialer-rule
[Huawei-dialer-rule]dialer-rule 1 ip permit
[Huawei-dialer-rule]q
[Huawei]int dialer 1
[Huawei-Dialer1]dialer user user1
[Huawei-Dialer1]dialer-group 1
[Huawei-Dialer1]dialer bundle 1
[Huawei-Dialer1]ppp chap user hh2
[Huawei-Dialer1]ppp chap password cipher hh123
[Huawei-Dialer1]dialer timer idle 300
INFO: The configuration will become effective after link reset.
[Huawei-Dialer1]dialer queue-length 8
[Huawei-Dialer1]ip address ppp-negotiate
[Huawei-Dialer1]q
[Huawei]int g 0/0/0
[Huawei-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1
[Huawei-GigabitEthernet0/0/0]q
[Huawei]ip route-static 0.0.0.0 0.0.0.0 Dialer 1
验证:
执行 display pppoe-server session all命令,查看PPPoE会话的状态和配置信息
在客户端上display ip interface brief 查看有没有分配到ip地址