广域网技术实现--思科路由器PPP封装PAP验证

PAP认证协议简介:
PAP 验证为两次握手验证,口令为明文,PAP 验证的过程如下: 被验证方发送用户名和口令到验证方; 验证方根据用户配置查看是否有此用户以及口令是否正确,然后返回不同的响应(Acknowledge or Not Acknowledge)。 如正确则会给对端发送ACK 报文,通告对端已被允许进入下一阶段协商;否则发送NAK 报文,通告对端验证失败。此时,并不会直接将链路关闭。只有当验证不通过次数达到一定值(缺省为4)时,才会关闭链路,来防止因误传、网络干扰等造成不必要的LCP 重新协商过程。 PAP 的特点是在网络上以明文的方式传递用户名及口令,如在传输过程中被截获,便有可能对网络安全造成极大的威胁

网络设备结构图:
在这里插入图片描述

说明:由于配置好PAP协议后可以用路由器ping功能验证结果,可以将设备简化为两台Cisco2911路由器。
设备配置:

接口IP配置:
Router0:

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int s0/0/0
Router(config-if)#clock rate 64000 
Router(config-if)#ip add 202.1.1.1 255.255.255.0 
Router(config-if)#encapsulation ppp
Router(config-if)#no shutdown 
Router(config-if)#end
Router#w
Building configuration...
[OK]

Router1:

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int s0/0/0
Router(config-if)#ip add 202.1.1.2 255.255.255.0 
Router(config-if)#encapsulation ppp
Router(config-if)#no shutdown 
Router(config-if)#end
Router#w
Building configuration...
[OK]

配置PAP验证协议:
Router0(验证端):

Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#username cisco password 123456
Router(config)#int s0/0/0
Router(config-if)#ppp authentication pap 
Router(config-if)#end
Router#w
Building configuration...
[OK]

Router1(被验证端):

Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int s0/0/0
Router(config-if)#ppp pap sent-username cisco password 123456 
Router(config-if)#end
Router#w
Building configuration...
[OK]

配置结果测试(第一次测试,可能出错):

在这里插入图片描述
说明:上图是使用验证方路由器去ping被验证方路由器,发现ping测试数据包没有一个被返回,返回五个点,就代表ping测试失败。

排除错误:
我们首先分别在各自路由器上特权模式下执行命令:show int s0/0/0 查看接口详细信息。

验证端:
在这里插入图片描述
被验证端:
在这里插入图片描述
说明:根据上面两张图片发现,验证方接口出现了假死状况(被红色矩形圈中部分。假死解释:接口物理层是打开的,但是协议是被关闭的),因为思科路由器本身具备自我保护,当发现验证方和被验证方协议不平衡时,就会启动自我保护机制。

修复错误:
解决方法:如果设置好PAP验证后出现此状况,则需要先取消验证方接口封装协议,之后重新封装,封装完成后,接口协议会被自动重启。

被验证方操作:

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int s0/0/0
Router(config-if)#no encapsulation ppp
Router(config-if)#encapsulation ppp
Router(config-if)#end
Router#w
Building configuration...
[OK]



第二次ping验证是否配置成功:
在这里插入图片描述
说明:如上图所示,返回五个感叹号,就代表ping测试数据包全部返回验证端,则配置成功,否则失败!

  • 8
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值