华为ENSP配置广域网封装PPP、HDLC、FR协议

目录 

一、接口地址配置

二、PAP认证

(一)服务端R2配置

(二)客户端R1配置

(三)Wireshark抓包

三、CHAP认证是三次握手,密码是密文发送。(一)CHAP服务端R2配置和PPP一致,认证方式改为chap即可。

(二)客户端R1配置

(三)验证测试

附上截图:​​​​

四、HDLC协议

附上截图: ​​​

五、FR(Frame-relay)帧中继协议

(一)R1和R2设置为帧中继

(二)在R1路由器查看自动学习的映射表

(三)在R2路由器S4/0/0上抓包

附上截图:​ 


广域网中经常会使用串行链路来提供远距离的数据传输,高级链路控制HDLC(High-Level Data Link Control)和点对点协议PPP(Point to Point Protocol)是两种典型的串口封装协议。
广域网链路:二层封装PPP、HDLC、FR。
PPP可以对二层链路做认证。有两种认证方式:一是PAP认证,二是CHAP认证。
PAP认证:两次握手,明文传输;CHAP认证:三次握手,密码是密文发送。
只有串行接口(扁口)才可以更改封装方式,以太网接口不能更改封装方式,只能封装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.
各接口配置地址




(二)客户端R1配置

[R1]interface s4/0/0
[R1-Serial4/0/0]ppp pap local-user apple password simple 123456
#客户端发送的用户名和密码,simple在本地显示为明文




(三)Wireshark抓包

先开启抓包,然后运行如下命令。
[R1]interface s4/0/0
[R1-Serial4/0/0]shutdown #关闭端口
[R1-Serial4/0/0]undo shutdownPAP抓包用户名和密码





三、CHAP认证是三次握手,密码是密文发送。

(一)CHAP服务端R2配置和PPP一致,认证方式改为chap即可。

[R2-Serial4/0/0]ppp authentication-mode chap
[R2-Serial4/0/0]dis this
[V200R003C00]

interface Serial4/0/0
link-protocol ppp
ppp authentication-mode chap
ip address 12.1.1.2 255.255.255.0

return

从头开始配置如下:
PPP链路是广域网链路,传输距离远,穿越运营商和外网。
[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 chap #开启接口认证


(二)客户端R1配置

[R1-Serial4/0/0]undo ppp pap local-user #取消上次的配置
[R1-Serial4/0/0]ppp chap user apple #配置CHAP用户名
[R1-Serial4/0/0]ppp chap password simple 123456 #配置用户密码
[R1-Serial4/0/0]dis this
[V200R003C00]

interface Serial4/0/0
link-protocol ppp
ppp chap user apple
ppp chap password simple 123456
ip address 12.1.1.1 255.255.255.0

return


(三)验证测试

[R1-Serial4/0/0]shutdown #关闭端口
[R1-Serial4/0/0]undo shutdown #启用端口
CHAP认证





附上截图:









四、HDLC协议

华为、H3C串行接口默认的封装方式是PPP;
思科Cisco串行默认封装的是HDLC。
[R1-Serial4/0/0]dis this
[V200R003C00]

interface Serial4/0/0
link-protocol ppp #默认的链路封装协议是PPP协议
ppp chap user apple
ppp chap password simple 123456
ip address 12.1.1.1 255.255.255.0



return

修改路由器R1和R2的链路都为HDLC
[R1-Serial4/0/0]link-protocol hdlc #修改R1链路类型为HDLC
[R2-Serial4/0/0]link-protocol hdlc #修改R2链路类型为HDLC
[R2-Serial4/0/0]dis this
[V200R003C00]

interface Serial4/0/0
link-protocol hdlc
ip address 12.1.1.2 255.255.255.0

return




HDLC联通测试
二层封装HDLC

附上截图: 

 





五、FR(Frame-relay)帧中继协议

FR(Frame-relay)帧中继协议不是很常用,大多被MSTP专线取代。

帧中继(frame relay)是一种面向连接的数据链路层技术。它主要用在公共或专用网上的局域网互联以及广域网连接。
FR拓扑图
帧中继交换机配置




(一)R1和R2设置为帧中继

[R1]interface s4/0/0
[R1-Serial4/0/0]link-protocol fr
[R1-Serial4/0/0]dis this
[V200R003C00]

interface Serial4/0/0
link-protocol fr
ip address 12.1.1.1 255.255.255.0

return

[R2]interface s4/0/0
[R2-Serial4/0/0]link-protocol fr
[R2-Serial4/0/0]dis this
[V200R003C00]

interface Serial4/0/0
link-protocol fr
ip address 12.1.1.2 255.255.255.0

return

(二)在R1路由器查看自动学习的映射表

相当于ARP的缓存表。
FR自动学习



(三)在R2路由器S4/0/0上抓包

广域网抓包

附上截图:

 

 

 

  • 7
    点赞
  • 56
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值