加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

RIP 不连续子网问题以及v2 解决

(2016-03-13 19:39:12)
标签:

ccna

cisco

rip

分类: 思科路由器和交换机
http://s9/mw690/006peA9vzy705nTJl8Id8&690不连续子网问题以及v2 解决" TITLE="RIP 不连续子网问题以及v2 解决" />

连续子网例:
PC1 - RouterA :172.16.1.0/24
RouterA - RouterB:172.16.2/24
RouterB - PC2: 172.16.3.0/24

不连续子网例:
PC1 - RouterA :172.16.1.0/24
RouterA - RouterB:192.168.1.0/24
RouterB - PC2: 172.16.3.0/24

我们针对不连续子网进行构建:


RouterA>
RouterA>en
RouterA#show ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/0                172.16.1.1      YES NVRAM  up                    up 
Ethernet0/1                unassigned      YES NVRAM  administratively down down
Ethernet0/2                unassigned      YES NVRAM  administratively down down
Ethernet0/3                unassigned      YES NVRAM  administratively down down
Serial1/0                  192.168.1.1     YES NVRAM  up                    up 
Serial1/1                  unassigned      YES NVRAM  administratively down down
Serial1/2                  unassigned      YES NVRAM  administratively down down
Serial1/3                  unassigned      YES NVRAM  administratively down down
RouterA#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RouterA(config)#router rip
RouterA(config-router)#network 172.16.0.0
RouterA(config-router)#network 192.168.1.0
RouterA(config-router)#end
RouterA#
*Mar  9 07:23:13.553: %SYS-5-CONFIG_I: Configured from console by console
RouterA#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
      172.16.1.0/24 is directly connected, Ethernet0/0
      172.16.1.1/32 is directly connected, Ethernet0/0
      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
      192.168.1.0/24 is directly connected, Serial1/0
      192.168.1.1/32 is directly connected, Serial1/0


RouterB>
RouterB>en
RouterB#show ip int brief
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/0                172.16.3.1      YES NVRAM  up                    up 
Ethernet0/1                unassigned      YES NVRAM  administratively down down
Ethernet0/2                unassigned      YES NVRAM  administratively down down
Ethernet0/3                unassigned      YES NVRAM  administratively down down
Serial1/0                  192.168.1.2     YES NVRAM  up                    up 
Serial1/1                  unassigned      YES NVRAM  administratively down down
Serial1/2                  unassigned      YES NVRAM  administratively down down
Serial1/3                  unassigned      YES NVRAM  administratively down down
RouterB#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RouterB(config)#router rip
RouterB(config-router)#network 172.16.0.0
RouterB(config-router)#network 192.168.1.1
RouterB(config-router)#end
RouterB#
*Mar  9 07:23:55.464: %SYS-5-CONFIG_I: Configured from console by console
RouterB#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
      172.16.3.0/24 is directly connected, Ethernet0/0
      172.16.3.1/32 is directly connected, Ethernet0/0
      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
      192.168.1.0/24 is directly connected, Serial1/0
      192.168.1.2/32 is directly connected, Serial1/0
RouterB#

我们发现RouterA里没有172.16.3.0/24的路由信息
RouterB里也没有172.16.1.0/24的路由信息。

也就是说RIPv1 不支持不连续子网的路由

我们看看v2如何


RouterA(config)#router rip
RouterA(config-router)#version 2
RouterA(config-router)#exit
RouterA(config)#ip classless
RouterA(config)#end
RouterA#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      172.16.0.0/16 is variably subnetted, 3 subnets, 3 masks
      172.16.0.0/16 [120/1] via 192.168.1.2, 00:00:19, Serial1/0
      172.16.1.0/24 is directly connected, Ethernet0/0
      172.16.1.1/32 is directly connected, Ethernet0/0
      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
      192.168.1.0/24 is directly connected, Serial1/0
      192.168.1.1/32 is directly connected, Serial1/0

RouterB(config)#router rip
RouterB(config-router)#version 2
RouterB(config-router)#exit
RouterB(config)#ip classless
RouterB(config)#end
*Mar  9 07:28:45.504: %SYS-5-CONFIG_I: Configured from console by console
RouterB#show ip route
Codes: L - local, 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, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      172.16.0.0/16 is variably subnetted, 3 subnets, 3 masks
      172.16.0.0/16 [120/1] via 192.168.1.1, 00:00:03, Serial1/0
      172.16.3.0/24 is directly connected, Ethernet0/0
      172.16.3.1/32 is directly connected, Ethernet0/0
      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
      192.168.1.0/24 is directly connected, Serial1/0
      192.168.1.2/32 is directly connected, Serial1/0

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


RIPv1 特性:

1.Update 信息不包含子网掩码。
2.Update信息通过Broadcast给255.255.255.0 来更新
3.没有认证
4.不支持CIDR和VLSM.

RIPv2 特性:

1.Update 信息包含子网掩码
2.Update信息通过Broadcast给224.0.0.9来更新
3.支持认证
5.支持CIFR和VLSM

RIPv1和RIPv2 共同特性:
1.metric的hopcount数不能超过16
2.距离矢量(Distance Vector)型路由协议 

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有