华为pppoe配置实战演练
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为pppoe配置实战演练相关的知识,希望对你有一定的参考价值。
一、 配置pppoe服务器
- 1.将AR2配置为pppoe服务器
<Huawei> sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysn SERVER
[SERVER]ip pool pool1 //配置一个地址池pool1
Info: It‘s successful to create an IP address pool.
[SERVER-ip-pool-pool1]network 10.1.12.0 mask 255.255.255.0
[SERVER-ip-pool-pool1]gateway-list 10.1.12.254
[SERVER-ip-pool-pool1]quit
[SERVER]interface Virtual-Template 1 //配置一个虚拟接口
Jul 29 2018 23:44:49-08:00 SERVER %%01IFPDT/4/IF_STATE(l)[0]:Interface Virtual-T
emplate1 has turned into UP state.
[SERVER-Virtual-Template1]ppp authentication-mode chap //配置认证模式为chap
[SERVER-Virtual-Template1]ip add 10.1.12.254 24
[SERVER-Virtual-Template1]remote address pool pool1 //分配ip地址
[SERVER-Virtual-Template1]quit
- 2.在AR2上的g0/0/0接口绑定虚拟模板
[SERVER]int g0/0/0
[SERVER-GigabitEthernet0/0/0]pppoe-server bind virtual-template 1 //绑定virtual-template 1
[SERVER-GigabitEthernet0/0/0]quit
- 3.为pppoE被认证方创建账户和密码
[SERVER]aaa
[SERVER-aaa]local-user zh password cipher huawei
Info: Add a new user.
[SERVER-aaa]local-user zh service-type ppp
[SERVER-aaa]quit
二、配置pppoe客户端
- 4.将AR1配置为pppoe客户端
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1
[AR1]dialer-rule //进入dialer-rule视图
[AR1-dialer-rule]dialer-rule 1 ip permit //允许ip流量触发拨号
[AR1-dialer-rule]quit
[AR1]interface dialer 1 //创建并进入dialer 1接口
[AR1-Dialer1]
Jul 29 2018 23:47:33-08:00 AR1 %%01IFPDT/4/IF_STATE(l)[0]:Interface Dialer1 has
turned into UP state.
[AR1-Dialer1]dialer user zh //配置用户对端用户名,这个用户名需与服务器端的ppp用户名相同
[AR1-Dialer1]dialer-group 1 //将接口置于一个拨号访问组
[AR1-Dialer1]dialer bundle 1
[AR1-Dialer1]ppp chap user zh //指定dialer 1 接口的编号(用于和物理接口绑定)
[AR1-Dialer1]ppp chap password cipher huawei
[AR1-Dialer1]dialer timer idle 300 //设置按需pppoe拨号的空闲时间(300s没有流量就断开)
INFO: The configuration will become effective after link reset.
[AR1-Dialer1]ip address ppp-negotiate //ip地址协商
- 5.将pppoe拨号接口绑定到出接口
[AR1-Dialer1]interface g0/0/0
[AR1-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1
[AR1-GigabitEthernet0/0/0]quit
- 6.配置本端到服务器的缺省静态路由
[AR1]ip route-static 0.0.0.0 0.0.0.0 Dialer 1
三、验证
- 7.在SERVER上执行display pppoe-server session all和display virtual-access命令,查看PPPoE会话的状态和配置信息。
- 8.查看AR1上的拨号接口的信息,并确认拨号接口能够从PPPoE服务器获得IP地址。
<AR1>display ip interface brief
以上是关于华为pppoe配置实战演练的主要内容,如果未能解决你的问题,请参考以下文章