配置PPP PAP 认证

配置PPP PAP 认证:
1. 单向认证:R1启动pap R1为主验证方,R2为被验证方。
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 authenticatin pap
r1(config-if)#exit
r1(config)#username cisco password cisco

r2(cinfig)#inter s1/0
r2(config-if)#ip add 202.146.0.2 255.255.255.0
r2(config-if)#no shutdwon
r2(config-if)#encapsulation ppp
r2(config-if)#ppp pap sent-username cisco password cisco
r2(config-if)#exit

2. 双向认证:R1和R2同时启动PAP.
r1上的配置:
Router>
Router>en
Router#config t
Router(config)#enable s cisco
Router(config)#line c 0
Router(config-line)#pass cisco
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 cisco
Router(config-line)#login
Router(config-line)#line vty 0 903
Router(config-line)#pass cisco
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)#n shutdown
r1(config-if)#encap
r1(config-if)#encapsulation ppp
r1(config-if)#ppp authentication pap
r1(config-if)#ppp pap sent-username cisco pass 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 cisco
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 cisco
Router(config-line)#login
Router(config-line)#line vty 0 903
Router(config-line)#pass cisco
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 pap
r2(config-if)#ppp pap sent-username cisco password cisco
r2(config-if)#exit
r2(config)#username cisco 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 = 8/28/84 ms

你可能感兴趣的:(网络,职场,路由,休闲)