RIP协议及跳数追踪

试验项目:
RIP协议及跳数追踪
实验拓扑:

实验具体实施步骤:
$1__VE_ITEM__ 1.   首先对R1、R2和R3路由配置相应IP地址
$1__VE_ITEM__ a)   配置R1路由IP地址
r1(config)#interface f0/0
r1(config-if)#ip address 192.168.1.1 255.255.255.0
r1(config-if)#no shutdown
   
r1(config-if)#interface f0/1
r1(config-if)#ip address 192.168.2.1 255.255.255.0
r1(config-if)#no shutdown
 
  r1(config-if)#interface f1/0
r1(config-if)#ip address 192.168.3.1 255.255.255.0
r1(config-if)#no shutdown
 
  r1#show ip int b
Interface              IP-Address      OK? Method Status                Protocol
 
FastEthernet0/0        192.168.1.1     YES manual up                    up
 
FastEthernet0/1        192.168.2.1     YES manual up                    up
 
FastEthernet1/0        192.168.3.1     YES manual up                    up
 
r2(config)#interface f0/1
r2(config-if)#ip address 192.168.2.2 255.255.255.0
r2(config-if)#no shutdown
 
r2(config-if)#interface f0/0
r2(config-if)#ip address 192.168.4.1 255.255.255.0
r2(config-if)#no shutdown
r2(config-if)#end
 
r2#show ip int b
Interface              IP-Address      OK? Method Status                Protocol
 
FastEthernet0/0        192.168.4.1     YES manual up                    up
 
FastEthernet0/1        192.168.2.2     YES manual up                    up
 
r3(config)#interface f1/0
r3(config-if)#ip address 192.168.3.2 255.255.255.0
r3(config-if)#no shutdown
 
r3(config-if)#interface f0/0
r3(config-if)#ip address 192.168.4.2 255.255.255.0
r3(config-if)#no shutdown
   
r3(config-if)#interface f0/1
r3(config-if)#ip address 192.168.5.1 255.255.255.0
r3(config-if)#no shutdown
  r3(config-if)#end
r3#show ip int b
Interface              IP-Address      OK? Method Status                Protocol
 
FastEthernet0/0        192.168.4.2     YES manual up                    up
 
FastEthernet0/1        192.168.5.1     YES manual up                    up
 
FastEthernet1/0        192.168.3.2     YES manual up                    up
r3#
$1__VE_ITEM__ d)         配置 PC机 ip地址
Pc1 ip 地址 192.168.1.10 子网掩码 255.255.255.0 默认网关 192.168.1.1
Pc2 ip 地址 192.168.5.20 子网掩码 255.255.255.0 默认网关 192.168.5.1
 
$1__VE_ITEM__ 2.         启动 RIP协议
$1__VE_ITEM__Ø  给 R2开启 RIP协议和查看路由条目
r2>enable
r2#conf t
r2(config)#router rip
r2(config-router)#version 2
r2(config-router)#no auto-summary
r2(config-router)#network 192.168.1.0
r2(config-router)#network 192.168.2.0
r2(config-router)#network 192.168.4.0
r2(config-router)#exit
r2(config)#end
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
 
R    192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:18, FastEthernet0/1
C    192.168.2.0/24 is directly connected, FastEthernet0/1
R    192.168.3.0/24 [120/1] via 192.168.4.2, 00:00:22, FastEthernet0/0
                    [120/1] via 192.168.2.1, 00:00:18, FastEthernet0/1
C    192.168.4.0/24 is directly connected, FastEthernet0/0
R    192.168.5.0/24 [120/1] via 192.168.4.2, 00:00:22, FastEthernet0/0
r2#
$1__VE_ITEM__Ø  R1 开启 RIP协议和查看
r1>enable
r1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r1(config)#router rip
r1(config-router)#version 2
r1(config-router)#no auto-summary
r1(config-router)#network 192.168.1.0
r1(config-router)#network 192.168.2.0
r1(config-router)#network 192.168.3.0
r1(config-router)#exit
r1(config)#exit
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
 
C    192.168.1.0/24 is directly connected, FastEthernet0/0
C    192.168.2.0/24 is directly connected, FastEthernet0/1
C    192.168.3.0/24 is directly connected, FastEthernet1/0
R    192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:06, FastEthernet0/1
R    192.168.5.0/24 [120/2] via 192.168.2.2, 00:00:06, FastEthernet0/1
r1#
$1__VE_ITEM__Ø  R3开启 RIP协议和查看
r3>enable
r3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
r3(config)#router rip
r3(config-router)#version 2
r3(config-router)#no auto-summary
r3(config-router)#network 192.168.4.0
r3(config-router)#network 192.168.3.0
r3(config-router)#network 192.168.5.0
r3(config-router)#exit
r3(config)#exit
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
 
R    192.168.1.0/24 [120/1] via 192.168.3.1, 00:00:21, FastEthernet1/0
R    192.168.2.0/24 [120/1] via 192.168.4.1, 00:00:05, FastEthernet0/0
                    [120/1] via 192.168.3.1, 00:00:21, FastEthernet1/0
C    192.168.3.0/24 is directly connected, FastEthernet1/0
C    192.168.4.0/24 is directly connected, FastEthernet0/0
C    192.168.5.0/24 is directly connected, FastEthernet0/1
r3#
$1__VE_ITEM__Ø  Ping命令测试路由间的联通性
r3#ping 192.168.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/31 ms
 
r1#ping 192.168.5.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 ms
 
r1#ping 192.168.4.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 31/40/63 ms
$1__VE_ITEM__Ø  测试成功!!!
$1__VE_ITEM__ 3.         用 no dug 宣下
r1#no debu ip rip
RIP protocol debugging is off
r1#traceroute 192.168.3.1
Type escape sequence to abort.
Tracing the route to 192.168.3.1
 
  1   192.168.3.1     16 msec   16 msec   0 msec
$1__VE_ITEM__ 4.         在 pc机上 ping命令测试效果
PC>ping 192.168.5.20
 
Pinging 192.168.5.20 with 32 bytes of data:
 
Request timed out.
Reply from 192.168.5.20: bytes=32 time=93ms TTL=126
Reply from 192.168.5.20: bytes=32 time=94ms TTL=126
Reply from 192.168.5.20: bytes=32 time=94ms TTL=126
 
Ping statistics for 192.168.5.20:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 93ms, Maximum = 94ms, Average = 93ms

你可能感兴趣的:(职场,项目,休闲)