CISCO路由器PPP协议配置试验步骤

简介:
试验要求:路由器 R1 和路由器 R2 之间采用 PAP 协议认证
           路由器 R1 和路由器 R3 之间采用 CHAP 协议认证
                 各路由器之间使用 RIPv2 实现全网互通
一:试验拓扑图:
二:详细试验配置步骤:
R1 的配置步骤:  
 
       --- System Configuration Dialog ---
Continue with configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#inter
Router(config)#interface s2/0
Router(config-if)#clock rate ?
Speed (bits per second
  1200          
  2400          
  4800          
  9600          
  19200         
  38400         
  56000         
  64000         
  72000         
  125000        
  128000        
  148000        
  250000        
  500000        
  800000        
  1000000       
  1300000        
  2000000       
  4000000       
  <300-4000000>  Choose clockrate from list above
Router(config-if)#clock rate 9600
Router(config-if)#ip address  3.3.3 .1 255.255.255.252
Router(config-if)#encapsulation ?
  frame-relay  Frame Relay networks
  hdlc         Serial HDLC synchronous
  ppp          Point-to-Point protocol
Router(config-if)#encapsulation ppp
Router(config-if)#ppp ?
  authentication  Set PPP link authentication method
  pap             Set PAP authentication parameters
Router(config-if)#ppp authentication ?
  chap  Challenge Handshake Authentication Protocol <CHAP>
  pap   Password Authentication Protocol <PAP>
Router(config-if)#ppp authentication pap
Router(config-if)#no shutdown
 
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
Router(config-if)#exit
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip address 172.16.1.1 255.255.255.0
Router(config-if)#no shutdown
 
Router(config-if)#
%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)#username R2 password 0 123
Router(config)#
Router(config)#interface serial 3/0
Router(config-if)#clock rate 9600
Router(config-if)#ip address  4.4.4 .1 255.255.255.252
Router(config-if)#encapsulation ?
  frame-relay  Frame Relay networks
  hdlc         Serial HDLC synchronous
  ppp          Point-to-Point protocol
Router(config-if)#encapsulation p
Router(config-if)#encapsulation ppp
Router(config-if)#ppp ?
  authentication  Set PPP link authentication method
  pap             Set PAP authentication parameters
Router(config-if)#ppp authentication ?
  chap  Challenge Handshake Authentication Protocol <CHAP>
  pap   Password Authentication Protocol <PAP>
Router(config-if)#ppp authentication cha
Router(config-if)#ppp authentication chap
Router(config-if)#no shut
Router(config-if)#no shutdown
 
%LINK-5-CHANGED: Interface Serial3/0, changed state to down
Router(config-if)#exit
Router(config)#username R3 password 0 456
Router(config)#
 
Router(config)#hostname R1
R1(config)#
 
R2 的配置步骤:
         --- System Configuration Dialog ---
 
Continue with configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#hostname R2
R2(config)#username R1 password 0 123
R2(config)#interface serial 2/0
R2(config-if)#encapsulation ?
  frame-relay  Frame Relay networks
  hdlc         Serial HDLC synchronous
  ppp          Point-to-Point protocol
R2(config-if)#encapsulation ppp
R2(config-if)#ip address  3.3.3 .2 255.255.255.252
R2(config-if)#no shut
 
R2(config-if)#
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
R2(config-if)#ppp pap sent-username R2 password 0 123
R2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 192.168.1.1 255.255.255.0
R2(config-if)#no shut
 
R2(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R2(config-if)#exit
R2(config)#
 
 
R3 的配置
         --- System Configuration Dialog ---
 
Continue with configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host
Router(config)#hostname R3
R3(config)#interface s3/0
R3(config-if)#ip address  4.4.4 .2 255.255.255.252
R3(config-if)#encapsulation ?
  frame-relay  Frame Relay networks
  hdlc         Serial HDLC synchronous
  ppp          Point-to-Point protocol
R3(config-if)#encapsulation ppp ?
  <cr>
R3(config-if)#encapsulation ppp
R3(config-if)#ppp ?
  authentication  Set PPP link authentication method
  pap             Set PAP authentication parameters
R3(config-if)#ppp authentication ?
  chap  Challenge Handshake Authentication Protocol <CHAP>
  pap   Password Authentication Protocol <PAP>
R3(config-if)#ppp authentication chap ?
  pap  Password Authentication Protocol <PAP>
  <cr>
R3(config-if)#ppp authentication chap
R3(config-if)#no shutdown
 
R3(config-if)#
%LINK-5-CHANGED: Interface Serial3/0, changed state to up
R3(config-if)#exit
R3(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial3/0, changed state to up
R3(config)#username R1 password 0 456
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 192.168.2.1 255.255.255.0
R3(config-if)#no shut
 
R3(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R3(config-if)#exit
R3(config)#
 
三、配置RIP协议实现全网互通
R1 的配置:
R1(config)#router rip
R1(config-router)#version ?
  <1-2>  version
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#net
R1(config-router)#network  3.3.3 .0
R1(config-router)#network  4.4.4 .0
R1(config-router)#network 172.16.1.0
R1(config-router)#
 
R2 的配置:
R2(config)#router rip
R2(config-router)#?
  auto-summary         Enter Address Family command mode
  default-information  Control distribution of default information
  distance             Define an administrative distance
  exit                 Exit from routing protocol configuration mode
  network              Enable routing on an IP network
  no                   Negate a command or set its defaults
  passive-interface    Suppress routing updates on an interface
  redistribute         Redistribute information from another routing protocol
  timers               Adjust routing timers
  version              Set routing protocol version
R2(config-router)#version ?
  <1-2>  version
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#netwo
R2(config-router)#network  3.3.3 .0
R2(config-router)#network 192.168.1.0
R2(config-router)#
 
R3 的配置:
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network  4.4.4 .0
R3(config-router)#network 192.168.2.0
R3(config-router)#
 
四:检查试验配置:
R1 的试验配置:
R1#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
 
      3.0.0 .0/30 is subnetted, 1 subnets
C        3.3.3 .0 is directly connected, Serial2/0
      4.0.0 .0/30 is subnetted, 1 subnets
C        4.4.4 .0 is directly connected, Serial3/0
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, FastEthernet0/0
R    192.168.1.0/24 [120/1] vi a 3.3.3 .2, 00:00:24, Serial2/0
R    192.168.2.0/24 [120/1] vi a 4.4.4 .2, 00:00:17, Serial3/0
R1#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        172.16.1.1      YES manual up                    up
FastEthernet1/0        unassigned      YES manual administratively down down
Serial2/0               3.3.3 .1         YES manual up                    up
Serial3/0               4.4.4 .1         YES manual up                    up
FastEthernet4/0        unassigned      YES manual administratively down down
FastEthernet5/0        unassigned      YES manual administratively down down
 
R2 的试验配置:
R2#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
 
      3.0.0 .0/30 is subnetted, 1 subnets
C        3.3.3 .0 is directly connected, Serial2/0
      4.0.0 .0/30 is subnetted, 1 subnets
R        4.4.4 .0 [120/1] via 3.3.3.1, 00:00:18, Serial2/0
     172.16.0.0/24 is subnetted, 1 subnets
R       172.16.1.0 [120/1] vi a 3.3.3 .1, 00:00:18, Serial2/0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
R    192.168.2.0/24 [120/2] vi a 3.3.3 .1, 00:00:18, Serial2/0
R2#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
 
FastEthernet0/0        192.168.1.1     YES manual up                    up
 
FastEthernet1/0        unassigned      YES manual administratively down down
 
Serial2/0               3.3.3 .2         YES manual up                    up
 
Serial3/0              unassigned      YES manual administratively down down
 
FastEthernet4/0        unassigned      YES manual administratively down down
 
FastEthernet5/0        unassigned      YES manual administratively down down
 
R3 的试验配置:
R3#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
 
      3.0.0 .0/30 is subnetted, 1 subnets
R        3.3.3 .0 [120/1] via 4.4.4.1, 00:00:00, Serial3/0
      4.0.0 .0/30 is subnetted, 1 subnets
C        4.4.4 .0 is directly connected, Serial3/0
     172.16.0.0/24 is subnetted, 1 subnets
R       172.16.1.0 [120/1] vi a 4.4.4 .1, 00:00:00, Serial3/0
R    192.168.1.0/24 [120/2] vi a 4.4.4 .1, 00:00:00, Serial3/0
C    192.168.2.0/24 is directly connected, FastEthernet0/0
R3#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
 
FastEthernet0/0        192.168.2.1     YES manual up                    up
 
FastEthernet1/0        unassigned      YES manual administratively down down
 
Serial2/0              unassigned      YES manual administratively down down
 
Serial3/0               4.4.4 .2         YES manual up                    up
 
FastEthernet4/0        unassigned      YES manual administratively down down
 
FastEthernet5/0        unassigned      YES manual administratively down down
五:在客户端上测试
PC1 上测试:
Packet Tracer PC Command Line 1.0
PC>ipconfig
IP Address......................: 172.16.1.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 172.16.1.1
PC>ping 192.168.1.2
 
Pinging 192.168.1.2 with 32 bytes of data:
 
Reply from 192.168.1.2: bytes=32 time=94ms TTL=126
Reply from 192.168.1.2: bytes=32 time=94ms TTL=126
Reply from 192.168.1.2: bytes=32 time=94ms TTL=126
Reply from 192.168.1.2: bytes=32 time=62ms TTL=126
 
Ping statistics for 192.168.1.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 62ms, Maximum = 94ms, Average = 86ms
 
PC2 上测试:
 
 
Packet Tracer PC Command Line 1.0
PC>ipconfig
 
IP Address......................: 192.168.1.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.1
 
PC>ping 172.16.1.2
 
Pinging 172.16.1.2 with 32 bytes of data:
 
Reply from 172.16.1.2: bytes=32 time=94ms TTL=126
Reply from 172.16.1.2: bytes=32 time=78ms TTL=126
Reply from 172.16.1.2: bytes=32 time=81ms TTL=126
Reply from 172.16.1.2: bytes=32 time=90ms TTL=126
 
Ping statistics for 172.16.1.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 78ms, Maximum = 94ms, Average = 85ms
 
PC>ping 192.168.1.2
 
Pinging 192.168.1.2 with 32 bytes of data:
 
Reply from 192.168.1.2: bytes=32 time=31ms TTL=128
Reply from 192.168.1.2: bytes=32 time=16ms TTL=128
Reply from 192.168.1.2: bytes=32 time=13ms TTL=128
Reply from 192.168.1.2: bytes=32 time=16ms TTL=128
 
Ping statistics for 192.168.1.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 13ms, Maximum = 31ms, Average = 19ms
PC3 上测试:
Packet Tracer PC Command Line 1.0
PC>ipconfig
 
IP Address......................: 192.168.2.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.2.1
 
PC>ping 172.16.1.2
 
Pinging 172.16.1.2 with 32 bytes of data:
 
Reply from 172.16.1.2: bytes=32 time=125ms TTL=126
Reply from 172.16.1.2: bytes=32 time=78ms TTL=126
Reply from 172.16.1.2: bytes=32 time=63ms TTL=126
Reply from 172.16.1.2: bytes=32 time=94ms TTL=126
 
Ping statistics for 172.16.1.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 63ms, Maximum = 125ms, Average = 90ms
 
PC>ping 192.168.1.2
 
Pinging 192.168.1.2 with 32 bytes of data:
 
Reply from 192.168.1.2: bytes=32 time=125ms TTL=125
Reply from 192.168.1.2: bytes=32 time=125ms TTL=125
Reply from 192.168.1.2: bytes=32 time=125ms TTL=125
Reply from 192.168.1.2: bytes=32 time=125ms TTL=125
 
Ping statistics for 192.168.1.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 125ms, Maximum = 125ms, Average = 125ms
 









本文转自 linuxtro 51CTO博客,原文链接:http://blog.51cto.com/linuxtro/307205,如需转载请自行联系原作者
目录
相关文章
|
7月前
|
存储 安全 数据库
ensp中PPP(点对点协议)中的PAP认证 原理和配置命令
ensp中PPP(点对点协议)中的PAP认证 原理和配置命令
266 0
|
7月前
|
安全 物联网 数据安全/隐私保护
ensp中PPPOE (点对点协议)原理和配置命令
ensp中PPPOE (点对点协议)原理和配置命令
234 0
|
网络虚拟化
Cisco——HSRP实验案例一
Cisco——HSRP实验案例一
122 0
|
网络虚拟化 网络架构
思科三层交换机配置步骤
思科三层交换机配置步骤
860 6
思科三层交换机配置步骤
|
安全 算法 网络安全
IPsec小实验:手工方式建立保护IPv4报文的IPsec-ESP隧道(上)
IPsec小实验:手工方式建立保护IPv4报文的IPsec-ESP隧道
IPsec小实验:手工方式建立保护IPv4报文的IPsec-ESP隧道(上)
|
安全 网络安全 网络虚拟化
IPsec小实验:手工方式建立保护IPv4报文的IPsec-ESP隧道(下)
IPsec小实验:手工方式建立保护IPv4报文的IPsec-ESP隧道
IPsec小实验:手工方式建立保护IPv4报文的IPsec-ESP隧道(下)
|
网络协议 数据安全/隐私保护 网络虚拟化
|
网络协议 数据安全/隐私保护 网络架构