pap和chap交叉:R1启动pap,R2启动chap。
R1上的配置:
>en
Router#config t
Router(config)#enable s ciaco
Router(config)#line c 0
Router(config-line)#pass ciaco
Router(config-line)#login
Router(config-line)#logging sy
Router(config-line)#no domain-lookup
Router(config-line)#exec-t 0 0
Router(config-line)#exit
Router(config)#line aux 0
Router(config-line)#pass ciaco
Router(config-line)#login
Router(config-line)#line vty 0 903
Router(config-line)#pass ciaco
Router(config-line)#login
Router(config-line)#exit
Router(config)#hostname r1
r1(config)#inter s1/0
r1(config-if)#ip add 202.146.0.1 255.255.255.0
r1(config-if)#no shutdown
r1(config-if)#encapsulation ppp
r1(config-if)#ppp authentication pap
r1(config-if)#ppp chap password cisco
r1(config-if)#exit
r1(config)#username cisco password cisco
R2上的配置:
Router>en
Router#config t
Router(config)#enable s cisco
Router(config)#line c 0
Router(config-line)#pass ciaco
Router(config-line)#login
Router(config-line)#logging sy
Router(config-line)#no domain-lookup
Router(config-line)#exec-t 0 0
Router(config-line)#exit
Router(config)#line aux 0
Router(config-line)#pass ciaco
Router(config-line)#login
Router(config-line)#line vty 0 903
Router(config-line)#pass ciaco
Router(config-line)#login
Router(config-line)#exit
Router(config)#hostname r2
r2(config)#inter s1/0
r2(config-if)#ip add 202.146.0.2 255.255.255.0
r2(config-if)#no shutdown
r2(config-if)#encapsulation ppp
r2(config-if)#ppp authentication chap
r2(config-if)#ppp pap sent-username cisco password cisco
r2(config-if)#exit
r2(config)#username r1 password cisco
r2(config)#end
r2#p 202.146.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 202.146.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/36/52 ms
r2#