华为pppoe拨号配置
server配置:
[hw-server]ip pool pppoe //建立地址pool池
[hw-server-ip-pool-pppoe]network 112.1.1.0 mask 24 //定义地址池范围
[hw-server-ip-pool-pppoe]gateway-list 112.1.1.1 //网关地址=pppoe server 地址
当前pool的配置:
[hw-server-ip-pool-pppoe]display this
[V200R003C00]
#
ip pool pppoe
gateway-list 112.1.1.1
network 112.1.1.0 mask 255.255.255.0
#
return
[hw-server-ip-pool-pppoe]
[hw-server-aaa]local-user pppoe password cipher pppoe //创建用于pppoe-client拨入的账号密码
[hw-server-aaa]local-user pppoe service-type ppp //设置用于pppoe-client拨号的服务类型
[hw-server]interface Virtual-Template 100 //创建虚拟接口模板
[hw-server-Virtual-Template100]ppp authentication-mode chap //定义pppoe-client的ppp的验证方式
[hw-server-Virtual-Template100]remote address pool pppoe //定义为pppoe-client分配的地址池
[hw-server-Virtual-Template100]ip address 112.1.1.1 24 //添加虚拟接口地址(等于pool网关地址)
[hw-server]interface GigabitEthernet 0/0/0 //进入接口
[hw-server-GigabitEthernet0/0/0]pppoe-server bind virtual-template 100 //将虚拟接口模板绑定到物理接口(与Virtual-Template 100 一致)
client配置:
[hw-client]dialer-rule //创建拨号访问规则
[hw-client-dialer-rule]dialer-rule 10 ip permit //定义用于触发pppoe会话建立的流量类型,一般是ip
[hw-client]interface Dialer 0 //创建拨号接口模板
[hw-client-Dialer0]link-protocol ppp //定义链路层协议类型
[hw-client-Dialer0]ppp chap user pppoe //配置用于chap验证的用户名
[hw-client-Dialer0]ppp chap password cipher pppoe //配置用于chap验证的密码
[hw-client-Dialer0]ip address ppp-negotiate //定义地址获取方式
[hw-client-Dialer0]dialer user pppoe //改命令必须配置,否则不能配置后续命令(用户名任意)
[hw-client-Dialer0]dialer bundle 1 //定义拨号接口捆绑编号,用于绑定到物理接口
[hw-client-Dialer0]dialer-group 10 //定义拨号访问规则 (匹配dialer-rule)
[hw-client-Dialer0]mtu 1400 //设置mtu
当前接口配置如下:
[hw-client-Dialer0]display this
[V200R003C00]
#
interface Dialer0
link-protocol ppp
ppp chap user pppoe
ppp chap password cipher %$%$|`6AGem[=V0~{O-{~S[;,&V)%$%$
mtu 1400
ip address ppp-negotiate
dialer user pppoe
dialer bundle 1
dialer-group 10
#
return
[hw-client-Dialer0]
[hw-client]interface GigabitEthernet 0/0/0 //进入接口模式下
[hw-client-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1 //将拨号接口绑定到物理接口(与dialer bundle 1 一致)
当前接口配置信息:
[hw-client-GigabitEthernet0/0/0]display this
[V200R003C00]
#
interface GigabitEthernet0/0/0
pppoe-client dial-bundle-number 1
#
return
[hw-client-GigabitEthernet0/0/0]
验证是否配置成功:
[hw-client]display interface Dialer 0
Dialer0 current state : UP //接口是UP 说明已经启动
Line protocol current state : UP (spoofing)
Description:HUAWEI, AR Series, Dialer0 Interface
Route Port,The Maximum Transmit Unit is 1400, Hold timer is 10(sec)
Internet Address is negotiated, 112.1.1.254/32 //有地址说明已经配置成功
Link layer protocol is PPP
LCP initial
Physical is Dialer
Current system time: 2019-04-28 15:17:03-08:00
Last 300 seconds input rate 0 bits/sec, 0 packets/sec
Last 300 seconds output rate 0 bits/sec, 0 packets/sec
Realtime 0 seconds input rate 0 bits/sec, 0 packets/sec
Realtime 0 seconds output rate 0 bits/sec, 0 packets/sec
Input: 0 bytes
Output:0 bytes
Input bandwidth utilization : 0%
Output bandwidth utilization : 0%
Bound to Dialer0:0:
Dialer0:0 current state : UP ,
Line protocol current state : UP
Link layer protocol is PPP
LCP opened, IPCP opened
Packets statistics:
Input packets:0, 0 bytes
Output packets:0, 0 bytes
FCS error packets:0
Address error packets:0
Control field control error packets:0
[hw-client]
查看接口信息:
[hw-client]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 3
Interface IP Address/Mask Physical Protocol
Dialer0 112.1.1.254/32 up up(s)
GigabitEthernet0/0/0 unassigned up down
GigabitEthernet0/0/1 unassigned down down
NULL0 unassigned up up(s)
Serial1/0/0 unassigned up up
Serial1/0/1 unassigned down down
[hw-client]