路由ppp封装和chap认证  
Router 2 的配置:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Press RETURN to get started!

 

 

Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />1.1.1.1 255.0.0.0
Router(config-if)#no shutdown

 

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#interface serial 0/0
Router(config-if)#ip address 2.2.2.1 255.0.0.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown

 

%LINK-5-CHANGED: Interface Serial0/0, changed state to down
Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
Router(config-if)#exit
Router(config)#ip route 3.3.3.0 255.0.0.0 serial 0/0
Router(config)#end
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

 

Gateway of last resort is not set

 

C    1.0.0.0/8 is directly connected, FastEthernet0/0
C    2.0.0.0/8 is directly connected, Serial0/0
S    3.0.0.0/8 is directly connected, Serial0/0
Router#ping 3.3.3.2

 

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 ms

 

Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface serial 0/0
Router(config-if)#encapsulation ppp

 

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to downRouter(config-if)#ppp ?
  authentication  Set PPP link authentication method
  pap             Set PAP authentication parameters
Router(config-if)#ppp authentication chap
Router(config-if)#no shutdown
Router(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname 1111
1111(config)#enable password 33
1111(config)#username 2222 password 33
1111(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
1111(config)#end
%SYS-5-CONFIG_I: Configured from console by console
1111#ping 3.3.3.2

 

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 ms

 

1111#

 

 

 

 

Router 3 的配置:

Press RETURN to get started!

Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 3.3.3.1 255.0.0.0
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#interface serial 0/0
Router(config-if)#ip address 2.2.2.2 255.0.0.0
Router(config-if)#no shutdown

 

%LINK-5-CHANGED: Interface Serial0/0, changed state to up
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
Router(config-if)#exit
Router(config)#ip route 1.1.1.0 255.0.0.0 serial 0/0
Router(config)#end
%SYS-5-CONFIG_I: Configured from console by console
Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

 

Gateway of last resort is not set

 

S    1.0.0.0/8 is directly connected, Serial0/0
C    2.0.0.0/8 is directly connected, Serial0/0
C    3.0.0.0/8 is directly connected, FastEthernet0/0
Router#ping 1.1.1.2

 

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 47/60/79 ms

 

Router#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface serial 0/0
Router(config-if)#encapsulation ppp
Router(config-if)#ppp authentication chap
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#hostname 2222
2222(config)#enable password 33
2222(config)#username 1111 password 33
2222(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
2222(config)#end
%SYS-5-CONFIG_I: Configured from console by console
2222#ping 1.1.1.2

 

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 46/58/62 ms

 

2222#