pppoe服务器配置(PPPoe Server路由器配置)
<Huawei>sys
[Huawei]sysname Server//更改设备名称为Server
[Server]aaa
[Server-aaa]authentication-scheme 163.com
[Server-aaa]domain 163.com
[Server-aaa-domain-163.com]authentication-scheme 163.com
[Server-aaa-domain-163.com]quit
[Server-aaa]local-user 1000@163.com password cipher 123456 //创建一个账号0757@163.com密码123456
[Server-aaa]local-user 1000@163.com service-type ppp//配置账户的认证类型为ppp
[Server-aaa]quit
[Server]ip pool pool1
[Server-ip-pool-pool1]gateway-list 209.10.1.254 //创建网关地址
[Server-ip-pool-pool1]network 209.10.10.0 mask 255.255.255.0 //指定地址池分配网段
[Server-ip-pool-pool1]quit
[Server]interface Virtual-Template1//创建认证模板
[Server-Virtual-Template1]ppp authentication-mode chap domain 163.com
[Server-Virtual-Template1]remote address pool pool1//关联认证成功后分配的地址池
[Server-Virtual-Template1]ip add 209.10.1.254 255.255.255.0//为模板配置IP地址
[Server-Virtual-Template1]quit
[Server]interface g0/0/0
[Server-GigabitEthernet0/0/0]pppoe-server bind Virtual-Template 1//在端口上应用认证模板
[Server-GigabitEthernet0/0/0]quit
[Server]interface LoopBack 0
[Server-LoopBack0]ip add 9.9.9.9 24//利用这个IP验证PC机在PPPoe连接后能否上公网
pppoe客户端配置和dhcp客户端配置(PPPoe-Client路由器配置)
<Huawei>sys
[client]acl number 2001 //设置NAT的规则
[client-acl-basic-2001] rule 5 permit source 192.168.2.0 0.0.0.255
[client-acl-basic-2001]quit
[client]interface Dialer0//配置拨号接口
[client-Dialer0]link-protocol ppp
[client-Dialer0] ppp chap user 1000@163.com //配置chap认证账号
[client-Dialer0] ppp chap password simple 123456 //配置chap认证密码
[client-Dialer0] mtu 1492//修改MTU为1500-8=1492 ,1500是以太网最大传输单元,8是PPP头部长度
[client-Dialer0] ip address ppp-negotiate//设置地址获取方式为ppp协商,即通过pppoeserver获取ip地址
[client-Dialer0] dialer user 0757@163.com
[client-Dialer0] dialer bundle 1//配置拨号捆绑编号,此编号要与路由器拨号接口的编号一致
[client-Dialer0] nat outbound 2001//启用NAT功能
[client-Dialer0]quit
[client]dialer-rule //设置拨号规则为ip流量出发ppp拨号
[client-dialer-rule]dialer-rule 1 ip permit
[client-dialer-rule]quit
[client]interface g0/0/0
[client-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1
[client-GigabitEthernet0/0/0]quit