在配置PPP验证时有PAP和CHAP的选择,其中PAP为明文传送用户名和口令, 不安全;而CHAP则采用哈希值进行验证,口令不会在网上传送,所以安全性比较高。
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname Router1
Router1(config)#interface ethernet 0/0
Router1(config-if)#ip address 192.168.10.1 255.255.255.0
Router1(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
Router1(config-if)#exit
Router1(config)#interface serial 0/0
Router1(config-if)#ip address 10.10.10.1 255.255.255.252
Router1(config-if)#clock rate 64000
Router1(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Serial0/0, changed state to up
%LINK-3-UPDOWN: Interface Serial0/0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
Router1(config-if)#exit
%LINK-3-UPDOWN: Interface Serial0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
Router1(config)#interface serial 0/0
Router1(config-if)#encapsulation ppp
%LINK-3-UPDOWN: Interface Serial0/0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
Router1(config-if)#ppp authentication chap
Router1(config-if)#exit
Router1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname Router2
Router2(config)#interface ethernet 0/0
Router2(config-if)#ip address 192.168.20.1 255.255.255.0
Router2(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
Router2(config-if)#exit
Router2(config)#interface serial 0/0
Router2(config-if)#ip address 10.10.10.2 255.255.255.252
Router2(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Serial0/0, changed state to up
Router2(config-if)#exit
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
Router2(config)#username Router1 password cisco
Router2(config)#interface serial 0/0
Router2(config-if)#encapsulation ppp
Router2(config-if)#ppp authentication chap
%LINK-3-UPDOWN: Interface Serial0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
Router2(config-if)#exit
Router2(config)#exit
Router2#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
Pinging 192.168.20.2 with 32 bytes of data:
Reply from 192.168.20.2: bytes=32 time=60ms TTL=241
Reply from 192.168.20.2: bytes=32 time=60ms TTL=241
Reply from 192.168.20.2: bytes=32 time=60ms TTL=241
Reply from 192.168.20.2: bytes=32 time=60ms TTL=241
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
Pinging 192.168.10.2 with 32 bytes of data:
Reply from 192.168.10.2: bytes=32 time=60ms TTL=241
Reply from 192.168.10.2: bytes=32 time=60ms TTL=241
Reply from 192.168.10.2: bytes=32 time=60ms TTL=241
Reply from 192.168.10.2: bytes=32 time=60ms TTL=241
Approximate round trip times in milli-seconds:
Minimum = 50ms, Maximum = 60ms, Average = 55ms
Serial0/0 is up, line protocol is up ------ 接口与协议均已开启
Hardware is HD64570
Internet address is 10.10.10.1/30
MTU 1500 bytes, BW 1544 Kbit, DLY 1000 usec, rely 255/255, load 1/255
Encapsulation PPP, loopback not set, keepalive set (10 sec)
LCP Open -----开启
Open: IPCP, CDPCP ------开启
Last input 00:00:00, output 00:00:00, output hang never
Last clearing of show interface counters never
Queueing strategy: fifo
2、Router2#show interfaces serial 0/0
Serial0/0 is up, line protocol is up -----接口与协议均已开启
Hardware is HD64570
Internet address is 10.10.10.2/30
MTU 1500 bytes, BW 1544 Kbit, DLY 1000 usec, rely 255/255, load 1/255
Encapsulation PPP, loopback not set, keepalive set (10 sec)
LCP Open -------开启
Open: IPCP, CDPCP -------开启
Last input 00:00:00, output 00:00:00, output hang never
Last clearing of show interface counters never
466

被折叠的 条评论
为什么被折叠?



