「Huawei VRP」- PPPoE

  CREATED BY JENKINSBOT

配置命令(Huawei)

PPPoE Server

# 添加认证用户信息
[R2]aaa 	                                                  
[R2-aaa]local-user huawei1 password cipher huawei123
[R2-aaa]local-user huawei1 service-type ppp

# 创建地址池,指定分配的地址和网关
[R2]ip pool pool1	
[R2-ip-pool-pool1]network 192.168.1.0 mask 255.255.255.0
[R2-ip-pool-pool1]gateway-list 192.168.1.254

# 创建虚拟模板接口
[R2]interface Virtual-Template 1         
[R2-Virtual-Template1]ppp authentication-mode chap                  # 配置认证模式
[R2-Virtual-Template1]ip address 192.168.1.254 255.255.255.0        # 地址池 相关配置
[R2-Virtual-Template1]remote address pool pool1                     # 

# 接口 PPPoE Server 绑定
[R2-GigabitEthernet0/0/0]pppoe-server bind virtual-template 1

Client

# 创建拨号接口并配置被认证方用户名和密码
[R1]dialer-rule 
[R1-dialer-rule]dialer-rule 1 ip permit

[R1]interface dialer 1 
[R1-Dialer1] dialer user enterprise
[R1-Dialer1] dialer-group <dialer-rule id>
[R1-Dialer1] dialer bundle 1
[R1-Dialer1] ppp chap user enterprise
[R1-Dialer1] ppp chap password cipher huawei123
[R1-Dialer1] ip address ppp-negotiate

# 拨号接口绑定出接口:
[R1-GigabitEthernet0/0/1]pppoe-client dial-bundle-number 1 

# 配置本端到达服务器端的缺省路由:
[R1]ip route-static 0.0.0.0  0.0.0.0  dialer 1

解释说明:
1)dialer-rule 用于按需拨号(pppoe-client dial-bundle-number 1 on-demand),现在已较少使用