卡饭网 > 路由器 > 正文

灵科路由器的PPP认证原理介绍

来源:本站整理 作者:梦在深巷 时间:2013-01-22 15:06:18

灵科路由器的PPP认证原理介绍

一、PAP:密码口令验证协议,全称:Password Authentication Protocol。PAP是两次握手认证协议,在链路首次初始化时,被认证端首先发起认证请求,向认证端发送用户名和密码信息进行身份认证。密码口令以明文发送,所以安全性较低。PAP支持单项和双向认证,认证流程图和单、双向认证。

二、CHAP:挑战握手认证协议,全称:Challenge Handshake Authentication Protocol。CHAP通过三次握手验证被认证端的身份,在初始链路建立时完成,为了提高安全性,在链路建立之后周期性进行验证。CHAP比PAP更安全,因为CHAP不在线路上发送明文,而是发送经过MD5过的随机数序列。CHAP支持单向和双向认证。

三、配置过程:
hostname R_A
interface Serial2/0
ip address 192.168.1.1 255.255.255.0
encapsulation ppp
ppp pap sent-username R_A password 0 123
clock rate 64000
R_A(config-if)#ip address 192.168.1.1 255.255.255.0
R_A(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R_B
R_B(config)#username R_A password 0 123
R_B(config)#interface s3/0
R_B(config-if)#encapsulation ppp
R_B(config-if)#ppp authentication pap
R_B(config-if)#ip address 192.168.1.2 255.255.255.0
R_B(config-if)#no shutdown
在路由器R_A上:
R_A#debug ppp authentication
PPP authentication debugging is on
Serial2/0 Using hostname from interface PAP
Serial2/0 Using password from interface PAP
Serial2/0 PAP: O AUTH-REQ id 17 len 15
Serial2/0 PAP: Phase is FORWARDING, Attempting Forward
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up
在路由器R_B上:
R_B#ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/4/6 ms
最后我们需要注意用户名、密码信息与路由器的对应关系;认证端、被认证端之间的信息对应关系;认证信息大小写敏感;修改配置后,若未生效,尝试重启端口。

相关推荐