实验32:帧中继上的RIP
1. 实验目的:
帧中继上运行路由协议
2. 实验拓扑
如图。
 
3. 实验步骤
配置如下:
 
r0(config)#int loo 1
r0(config-if)#ip add 1.1.
*Mar  1 00:03:29.827: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
r0(config-if)#ip add 1.1.1.1 255.255.255.0
r0(config-if)#int s0/0
r0(config-if)#ip add 172.16.1.1 255.255.255.0
r0(config-if)#enc fra
r0(config-if)#no sh
r0(config-if)#exit
r0(config)#route
*Mar  1 00:03:55.571: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
r0(config)#router rip
r0(config-router)#v 2
% Ambiguous command:  "v 2"
r0(config-router)#ve 2
r0(config-router)#n
*Mar  1 00:04:06.571: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r0(config-router)#net 1.1.1.0
r0(config-router)#net 172.16.1.0
r0(config-router)#do ping 172.16.1.3
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/44/64 ms
r0(config-router)#do ping 3.3.3.3 source 1.1.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/44/80 ms
r0(config-router)#do ping 2.2.2.2 source 1.1.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/49/84 ms
r0(config-router)#do ping 3.3.3.3
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/45/76 ms
r0(config-router)#do ping 2.2.2.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/57/116 ms
r0(config-router)#do sh ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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
 
     1.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       1.1.1.0/24 is directly connected, Loopback1
R       1.0.0.0/8 [120/2] via 172.16.1.3, 00:00:04, Serial0/0
                  [120/2] via 172.16.1.2, 00:00:02, Serial0/0
R    2.0.0.0/8 [120/1] via 172.16.1.2, 00:00:02, Serial0/0
R    3.0.0.0/8 [120/1] via 172.16.1.3, 00:00:04, Serial0/0
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Serial0/0
r0(config-router)#do sh ip int s0/0
Serial0/0 is up, line protocol is up
  Internet address is 172.16.1.1/24
  Broadcast address is 255.255.255.255
  Address determined by setup command
  MTU is 1500 bytes
  Helper address is not set
  Directed broadcast forwarding is disabled
  Multicast reserved groups joined: 224.0.0.9
  Outgoing access list is not set
  Inbound  access list is not set
  Proxy ARP is enabled
  Local Proxy ARP is disabled
  Security level is default
  Split horizon is disabled//接口封装了帧中继后,水平分割被自动关闭
 
  ICMP redirects are always sent
  ICMP unreachables are always sent
  ICMP mask replies are never sent
  IP fast switching is enabled
  IP fast switching on the same interface is enabled
  IP Flow switching is disabled
  IP CEF switching is enabled
  IP CEF Fast switching turbo vector
  IP multicast fast switching is enabled
  IP multicast distributed fast switching is disabled
  IP route-cache flags are Fast, CEF
  Router Discovery is disabled
  IP output packet accounting is disabled
  IP access violation accounting is disabled
  TCP/IP header compression is disabled
  RTP/IP header compression is disabled
  Policy routing is disabled
  Network address translation is disabled
  BGP Policy Mapping is disabled
  WCCP Redirect outbound is disabled
  WCCP Redirect inbound is disabled
  WCCP Redirect exclude is disabled
 
 
 
 
r1(config-line)#exit
r1(config)#int loo 1
r1(config-if)#ip add
*Mar  1 00:01:46.711: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
r1(config-if)#ip add 2.2.2.2. 255.255.255.0]
                            ^
% Invalid input detected at '^' marker.
 
r1(config-if)#ip add 2.2.2.2 255.255.255.0  
r1(config-if)#int s0/0
r1(config-if)#ip add 172.16.1.2 255.255.255.0
r1(config-if)#no sh
r1(config-if)#enc
*Mar  1 00:02:25.139: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
*Mar  1 00:02:26.139: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r1(config-if)#enc fra
r1(config-if)#
*Mar  1 00:03:09.595: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
r1(config-if)#
*Mar  1 00:03:29.595: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r1(config-if)#exit
r1(config)#router rip
r1(config-router)#ve 2
r1(config-router)#net 2.2.2.0
r1(config-router)#net 172.16.1.0
r1(config-router)#do ping 3.3.3.3 source 2.2.2.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/84/108 ms
r1(config-router)#do ping 3.3.3.3
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
//这里ping 命令没指明源地址,则认为ICMP 数据包的源IP 172.16.1.2,目标为3.3.3.3
R1 路由表查询路由表得知该数据包应该发送给172.16.1.1,而172.16.1.1 的帧中继
映射DLCI 201;数据包到达R0R0 路由表查询路由表得知该数据包应该发送给
172.16.1.3,而172.16.1.3的帧中继映射DLCI 102R2 收到数据包,进行响应,
ICMP 数据包的源IP 4.4.4.4,目标为172.16.1.2R2 172.16.1.0/24 的直连路
由,然而却没有172.16.1.2 的帧中继映射,因此无法进行封装。为了解决该问题,可以
R2中增加映射:r2(config-if)#frame-relay map ip 172.16.1.2 302.
 
 
 
r1(config-router)#do ping 3.3.3.3
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/88/128 ms
r1(config-router)#exit
r1(config)#int s0/0
r1(config-if)#frme-relay map ip 172.16.1.3 201
                ^
% Invalid input detected at '^' marker.
 
r1(config-if)#frame-relay map ip 172.16.1.3 201
r1(config-if)#
 
 
 
 
r2(config-if)#int s0/0
r2(config-if)#ip add 172.16.1.3 255.255.255.0
r2(config-if)#enc fra
r2(config-if)#no sh
r2(config-if)#
*Mar  1 00:03:23.515: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
r2(config-if)#
*Mar  1 00:03:34.515: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r2(config-if)#exit
r2(config)#router rip
r2(config-router)#ve 2
r2(config-router)#net 3.3.3.0
r2(config-router)#net 172.16.1.0
r2(config-router)#exit
r2(config)#int s0/0
r2(config-if)#frame-relay map ip 172.16.1.2 302
r2(config-if)#do ping 2.2.2.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
r2(config-if)#do ping 2.2.2.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/75/112 ms
r2(config-if)#