前几天在一个群里看到PPP的验证实验,两端的enable密码要一样,其实不然,只要在一端配置好后,另一端的username时要对应就行了,两个R的enable密码可以不一样。所以今天做一下实验验证一下,到底可不可以不一样,答案是当然可以不一样滴。
 
ppp with chap authentication的配置_休闲
 
R1的配置:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host R1
R1(config)#enable secret cisco
R1(config)#username R2 password cisco1
R1(config)#int s0
R1(config-if)#ip add 172.16.1.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
R1(config-if)#int e0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up
R1(config-if)#exit
R1(config)#ip route 10.1.1.0 255.255.255.0 172.16.1.2
R1(config)#end
R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#int s0
R1(config-if)#encapsulation ppp
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
R1(config-if)#ppp authentication chap
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up
R1(config-if)#end
 
 
R2的配置:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host R2
R2(config)#enable secret cisco1
R2(config)#username R1 password cisco
R2(config)#int s0
R2(config-if)#ip add 172.16.1.2 255.255.255.0
R2(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
R2(config-if)#int e0
R2(config-if)#ip add 10.1.1.1 255.255.255.0
R2(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
R2(config-if)#exit
R2(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.1
R2(config)#end
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#int s0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication chap
R2(config-if)#end
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up