CCIE SP-RIPv2 小结

0

RIPv1的限制

                 lo0:10.1.0.0/16
                     ---+---
                        |    summary to null0
                      +-+-+  192.168.0.0/16
                      |R2 |
                S1/0  *---* S1/1
                     /     \
 209.165.200.228/30 /       \ 209.165.200.232/30
                   /         \
             S1/0 /           \ S1/1
             +---+             *---+
             |R1 |             |R3 |
             +-+-+             +-+-+
               |                 |
   ------------+-----    --------+--------
    lo0:172.30.1.0/24    lo0:172.30.110.0 /24
    lo1:172.30.2.0/24    lo1:172.30.200.16/28
                         lo2:172.30.200.32/28
                         lo3:172.30.100.0 /24

1. 不连续网络问题

R2#
00:41:20: RIP: received v1 update from 209.165.200.234 on Serial1/1
00:41:20:      172.30.0.0 in 1 hops
!---已经通过R1的边界自动汇总了
00:41:20: RIP: Update contains 1 routes

00:41:24: RIP: received v1 update from 209.165.200.229 on Serial1/0
00:41:24:      172.30.0.0 in 1 hops
!---已经通过R3的边界自动汇总了
00:41:24: RIP: Update contains 1 routes
R2#
R2#
00:41:54: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (209.165.200.230)
00:41:54: RIP: build update entries
00:41:54:       network 10.0.0.0 metric 1
00:41:54:       subnet 209.165.200.232 metric 1
00:41:54: RIP: Update contains 2 routes
00:41:54: RIP: Update queued
00:41:54: RIP: Update sent via Serial1/0
00:41:54: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (209.165.200.233)
00:41:54: RIP: build update entries
00:41:54:       network 10.0.0.0 metric 1
00:41:54:       subnet 209.165.200.228 metric 1
!---R2并没有向R1和R3发送172的路由,这是由于水平分割导致的
00:41:54: RIP: Update contains 2 routes
00:41:54: RIP: Update queued
00:41:54: RIP: Update sent via Serial1/1
R2#
R2#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

R    172.30.0.0/16 [120/1] via 209.165.200.234, 00:00:16, Serial1/1
                   [120/1] via 209.165.200.229, 00:00:07, Serial1/0
     209.165.200.0/30 is subnetted, 2 subnets
C       209.165.200.232 is directly connected, Serial1/1
C       209.165.200.228 is directly connected, Serial1/0
     10.0.0.0/16 is subnetted, 1 subnets
C       10.1.0.0 is directly connected, Loopback0
S    192.168.0.0/16 is directly connected, Null0
---------------------------------------------------------------------
R1#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

     172.30.0.0/24 is subnetted, 2 subnets
C       172.30.2.0 is directly connected, Loopback1
C       172.30.1.0 is directly connected, Loopback0
     209.165.200.0/30 is subnetted, 2 subnets
R       209.165.200.232 [120/1] via 209.165.200.230, 00:00:22, Serial1/0
C       209.165.200.228 is directly connected, Serial1/0
R    10.0.0.0/8 [120/1] via 209.165.200.230, 00:00:22, Serial1/0
---------------------------------------------------------------------
R3#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

     172.30.0.0/16 is variably subnetted, 4 subnets, 2 masks
C       172.30.200.32/28 is directly connected, Loopback2
C       172.30.200.16/28 is directly connected, Loopback1
C       172.30.100.0/24 is directly connected, Loopback3
C       172.30.110.0/24 is directly connected, Loopback0
     209.165.200.0/30 is subnetted, 2 subnets
C       209.165.200.232 is directly connected, Serial1/1
R       209.165.200.228 [120/1] via 209.165.200.233, 00:00:17, Serial1/1
R    10.0.0.0/8 [120/1] via 209.165.200.233, 00:00:17, Serial1/1

如果在R2上ping R1和R3的Lan地址,会发现1个通1个不通,这是由于负载均衡的作用。
注:在较新的IOS中,基于CEF的负载均衡是destination的,要达到1个包通,1个包不通的效果,需要在R2上s1/0和s1/1的端口上配置”ip load-share per-pack”,这样就会基于包的负载均衡了。

配置前:

r2#sh ip cef 172.30.0.0 internal
172.30.0.0/16, epoch 0, RIB[I], refcount 5, per-destination sharing
  sources: RIB
  feature space:
   IPRM: 0x00038000
  ifnums:
   Serial1/0(4): 209.165.200.229
   Serial1/1(5): 209.165.200.234
   path_list contains at least one resolved destination(s). HW not notified
  path 64293898, path list 64287678, share 1/1, type attached nexthop, for IPv4
  nexthop 209.165.200.229 Serial1/0, adjacency IP adj out of Serial1/0 64509640
  path 64293914, path list 64287678, share 1/1, type attached nexthop, for IPv4
  nexthop 209.165.200.234 Serial1/1, adjacency IP adj out of Serial1/1 645094C0
  output chain:
    loadinfo 64271C7C, per-session, 2 choices, flags 0003, 5 locks
    flags: Per-session, for-rx-IPv4
    16 hash buckets
      < 0 > IP adj out of Serial1/0 64509640
      < 1 > IP adj out of Serial1/1 645094C0
      < 2 > IP adj out of Serial1/0 64509640
      < 3 > IP adj out of Serial1/1 645094C0
      < 4 > IP adj out of Serial1/0 64509640
      < 5 > IP adj out of Serial1/1 645094C0
      < 6 > IP adj out of Serial1/0 64509640
      < 7 > IP adj out of Serial1/1 645094C0
      < 8 > IP adj out of Serial1/0 64509640
      < 9 > IP adj out of Serial1/1 645094C0
      <10 > IP adj out of Serial1/0 64509640
      <11 > IP adj out of Serial1/1 645094C0
      <12 > IP adj out of Serial1/0 64509640
      <13 > IP adj out of Serial1/1 645094C0
      <14 > IP adj out of Serial1/0 64509640
      <15 > IP adj out of Serial1/1 645094C0
    Subblocks:
     None

配置后:

r2#sh ip cef de
IPv4 CEF is enabled and running
......
172.30.0.0/16, epoch 0, per-packet sharing
  nexthop 209.165.200.229 Serial1/0
  nexthop 209.165.200.234 Serial1/1
......

更多详细的CEF负载均衡内容,可以参考我以前的文章《7609 Load Balance Issue and Polarization

3.不支持VLSM

不支持VLSM,所以才会有在不连续网络中的问题。

2.不支持CIDR

R2#sh ip rip da
10.0.0.0/8    auto-summary
10.1.0.0/16    directly connected, Loopback0
172.30.0.0/16    auto-summary
172.30.0.0/16
    [1] via 209.165.200.234, 00:00:29, Serial1/1
    [1] via 209.165.200.229, 00:00:19, Serial1/0
192.168.0.0/16    redistributed
    [1] via 0.0.0.0,
209.165.200.0/24    auto-summary
209.165.200.228/30    directly connected, Serial1/0
209.165.200.232/30    directly connected, Serial1/1

可以看到192.168.0.0/16已经被redistribute进RIP了,但R2却没有发送此路由到R1和R3.
这是由于RIP是有类路由协议,所以不能发送掩码比主类还小的路由。

RIPv2的特性

1.自动汇总、支持CIDR和组播更新

R2#sh ip pro
Routing Protocol is "rip"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Sending updates every 30 seconds, next due in 24 seconds
  Invalid after 180 seconds, hold down 180, flushed after 240
  Redistributing: static, rip
  Default version control: send version 2, receive version 2
    Interface             Send  Recv  Triggered RIP  Key-chain
    Serial1/0             2     2
    Serial1/1             2     2
    Loopback0             2     2
!---RIPv2只能收v2的路由信息;对于RIPv1,可以收v1和v2的路由
  Automatic network summarization is in effect
!---RIPv2虽然是无类路由协议,但是它属于距离矢量路由协议,所以也会在边界汇总
  Maximum path: 4
  Routing for Networks:
    10.0.0.0
    209.165.200.0
  Routing Information Sources:
    Gateway         Distance      Last Update
    209.165.200.234      120      00:00:00
    209.165.200.229      120      00:00:26
  Distance: (default is 120)

R2#
01:43:02: RIP-TIMER: sending timer on Serial1/0 expired
01:43:02: RIP: sending v2 update to 224.0.0.9 via Serial1/0 (209.165.200.230)
!---组播更新
01:43:02: RIP: build update entries
01:43:02:       10.0.0.0/8 via 0.0.0.0, metric 1, tag 0
!---默认是16的,自动汇总成了主类路由
01:43:02:       192.168.0.0/16 via 0.0.0.0, metric 1, tag 0
!---支持CIDR
01:43:02:       209.165.200.232/30 via 0.0.0.0, metric 1, tag 0

R2#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

R    172.30.0.0/16 [120/1] via 209.165.200.234, 00:00:27, Serial1/1
                   [120/1] via 209.165.200.229, 00:00:08, Serial1/0
     209.165.200.0/30 is subnetted, 2 subnets
C       209.165.200.232 is directly connected, Serial1/1
C       209.165.200.228 is directly connected, Serial1/0
     10.0.0.0/16 is subnetted, 1 subnets
C       10.1.0.0 is directly connected, Loopback0
S    192.168.0.0/16 is directly connected, Null0

2.关闭自动汇总,验证RIPv2支持VLSM

R2#
01:54:58: RIP: sending v2 update to 224.0.0.9 via Serial1/1 (209.165.200.233)
01:54:58: RIP: build update entries
01:54:58:       10.1.0.0/16 via 0.0.0.0, metric 1, tag 0
01:54:58:       172.30.1.0/24 via 0.0.0.0, metric 2, tag 0
01:54:58:       172.30.2.0/24 via 0.0.0.0, metric 2, tag 0
!---向R3发送带掩码的R1路由更新
01:54:58:       192.168.0.0/16 via 0.0.0.0, metric 1, tag 0
01:54:58:       209.165.200.228/30 via 0.0.0.0, metric 1, tag 0
01:54:58: RIP: Update contains 5 routes
01:54:58: RIP: Update queued
01:54:58: RIP: Update sent via Serial1/1
01:55:03: RIP: sending v2 update to 224.0.0.9 via Serial1/0 (209.165.200.230)
01:55:03: RIP: build update entries
01:55:03:       10.1.0.0/16 via 0.0.0.0, metric 1, tag 0
01:55:03:       172.30.100.0/24 via 0.0.0.0, metric 2, tag 0
01:55:03:       172.30.110.0/24 via 0.0.0.0, metric 2, tag 0
01:55:03:       172.30.200.16/28 via 0.0.0.0, metric 2, tag 0
01:55:03:       172.30.200.32/28 via 0.0.0.0, metric 2, tag 0
!---向R1发送带掩码的R3路由更新
01:55:03:       192.168.0.0/16 via 0.0.0.0, metric 1, tag 0
01:55:03:       209.165.200.232/30 via 0.0.0.0, metric 1, tag 0
01:55:03: RIP: Update contains 7 routes
01:55:03: RIP: Update queued
01:55:03: RIP: Update sent via Serial1/0

R2#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

     172.30.0.0/16 is variably subnetted, 6 subnets, 2 masks
R       172.30.200.32/28 [120/1] via 209.165.200.234, 00:00:15, Serial1/1
R       172.30.200.16/28 [120/1] via 209.165.200.234, 00:00:15, Serial1/1
R       172.30.2.0/24 [120/1] via 209.165.200.229, 00:00:19, Serial1/0
R       172.30.1.0/24 [120/1] via 209.165.200.229, 00:00:19, Serial1/0
R       172.30.100.0/24 [120/1] via 209.165.200.234, 00:00:15, Serial1/1
R       172.30.110.0/24 [120/1] via 209.165.200.234, 00:00:15, Serial1/1
     209.165.200.0/30 is subnetted, 2 subnets
C       209.165.200.232 is directly connected, Serial1/1
C       209.165.200.228 is directly connected, Serial1/0
     10.0.0.0/16 is subnetted, 1 subnets
C       10.1.0.0 is directly connected, Loopback0
S    192.168.0.0/16 is directly connected, Null0

RIPv1和RIPv2主要区别汇总

1.v1是有类路由协议,v2是无类路由协议
2.v1不支持VLSM和CIDR,v2支持VLSM和CIDR
3.v1更新是广播,v2更新是组播
4.v1不支持认证,v2支持认证
5.v1不支持不连续子网,v2支持不连续子网

本文出自 Frank's Blog

版权声明:


本文链接:CCIE SP-RIPv2 小结
版权声明:本文为原创文章,仅代表个人观点,版权归 Frank Zhao 所有,转载时请注明本文出处及文章链接
你可以留言,或者trackback 从你的网站

留言哦

blonde teen swallows load.xxx videos