前面,我们对PPP协议进行了具体的介绍,相信大家已经对这个协议有所了解了。那么在PPP协议中,比较重要的就是PPP身份认证配置了。那么其中包括PAP、CHAP单双向身份认证。
使用的拓扑:
PAP双向身份认证
R1配置如下:
- config t
- hostname R1
- username R1 password komy
- interface s0/0/0
- ip address 192.168.1.2 255.255.255.252
- encapsulation ppp
- ppp authentication pap
- ppp pap sent-username R2 password komy
- no shutdown
R2配置如下:
- config t
- hostname R2
- username R2 password komy
- int s0/0/0
- clock rate 4000000
- ip address 192.168.1.1 255.255.255.252
- encapsulation ppp
- ppp authentication pap
- ppp pap sent-username R1 password komy
- no shutdown
PAP单向身份认证
R1配置如下(被认证方):
- config t
- hostname R1
- interface s0/0/0
- ip address 192.168.1.2 255.255.255.252
- encapsulation ppp
- ppp pap sent-username R2 password komy
- no shutdown
R2配置如下(主认证方):
- config t
- hostname R2
- username R2 password komy
- int s0/0/0
- clock rate 4000000
- ip address 192.168.1.1 255.255.255.252
- encapsulation ppp
- ppp authentication pap
- no shutdown
CHAP双向身份认证
- config t
- hostname R1
- username R2 password komy
- int s0/0/0
- ip address 192.168.1.2 255.255.255.252
- encapsulation ppp
- ppp authentication chap
- no shutdown
R2:
- config t
- hostname R2
- username R1 password komy
- int s0/0/0
- clock rate 4000000
- ip address 192.168.1.1 255.255.255.252
- encapsulation ppp
- ppp authentication chap
- no shutdown
CHAP单向身份认证
R1(CHAP被认证方):
- config t
- hostname R1
- username R2 password komy
- int s0/0/0
- ip address 192.168.1.2 255.255.255.252
- encapsulation ppp
- no shutdown
R2(CHAP主认证方):
- config t
- hostname R2
- username R1 password komy
- int s0/0/0
- clock rate 4000000
- ip address 192.168.1.1 255.255.255.252
- encapsulation ppp
- ppp authentication chap
- no shutdown
来自:http://hi.baidu.com/51cmdshell