华为ENSP配置广域网封装PPP、HDLC、FR协议
广域网中经常会使用串行链路来提供远距离的数据传输,高级链路控制HDLC(High-Level Data Link Control)和点对点协议PPP(Point to Point Protocol)是两种典型的串口封装协议。
广域网链路:二层封装PPP、HDLC、FR。
PPP可以对二层链路做认证。有两种认证方式:一是PAP认证,二是CHAP认证。
PAP认证:两次握手,明文传输;CPAP认证:三次握手,密码是密文发送。
只有串行接口(扁口)才可以更改封装方式,以太网接口不能更改封装方式,只能封装MAC地址。
一、接口地址配置
[R1]int s4/0/0
[R1-Serial4/0/0]ip address 12.1.1.1 24
[R1-Serial4/0/0]dis this
[V200R003C00]
interface Serial4/0/0
link-protocol ppp #默认的穿行接口
ip address 12.1.1.1 255.255.255.0
return
[R2]interface s4/0/0
[R2-Serial4/0/0]ip address 12.1.1.2 24
二、PAP认证
(一)服务端R2配置
[R2]aaa #标准认证方式,认证授权和审计
[R2-aaa]local-user apple password cipher 123456 #用户名apple,密码123456
Info: Add a new user.
[R2-aaa]local-user apple service-type ppp #指明服务类型PPP
[R2]int s4/0/0
[R2-Serial4/0/0]ppp authentication-mode pap #开启接口认证
shutdown 端口,然后undo shutdown检测
Jan 22 2021 21:14:16-08:00 R2 %%01PPP/4/PEERNOPAP(l)[11]:On the interface Serial
4/0/0, authentication failed and PPP link was closed because PAP was disabled on
the peer.