46. Configuring RIPng and Manual Summary

1、掌握基于 IPv6 的 RIPng 配置方法。

2、掌握 RIPng 的手工汇总配置。

3、掌握 RIPng 度量计算及修改方法。

4、掌握调试 RIPng 配置命令。

 

实验拓扑图:

image.png


在所有路由器上配置IPv6地址,测试互连可达。

 

在三台路由器上配置RIPng路由协议:

R1(config)#ipv6 router rip xiaoyang-rip   ---->全局启用RIPng协议,后面那个类似于进程标识符

R1(config-rtr)#exit

R1(config)#int lo0

R1(config-if)#ipv6 rip xiaoyang-rip enable   ---->在接口下针对xiaoyang-rip进程启用RIPng路由协议

R1(config-if)#exit

R1(config)#int s1/0

R1(config-if)#ipv6 rip xiaoyang-rip enable

R1(config-if)#exit

 

R2(config)#ipv6 unicast

R2(config)#ipv6 router rip xiaoyang-rip

R2(config-rtr)#int s1/0

R2(config-if)#ipv6 rip xiaoyang-rip en

R2(config-if)#exit

R2(config)#int s1/1

R2(config-if)#ipv6 rip xiaoyang-rip en

R2(config-if)#exit

 

R3(config)#ipv6 uni

R3(config)#ipv6 router rip xiaoyang-rip

R3(config-rtr)#exit

R3(config)#int s1/0

R3(config-if)#ipv6 rip xiaoyang-rip en

R3(config-if)#exit

R3(config)#int lo0

R3(config-if)#ipv6 rip xiaoyang-rip en

R3(config-if)#exit

 

查看R3路由表:

R3#show ipv6 route

IPv6 Routing Table - 10 entries

Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP

       U - Per-user Static route, M - MIPv6

       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary

       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2

       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2

       D - EIGRP, EX - EIGRP external

R   2001:AB1:0:2::/64 [120/2]            ---->管理距离是120

     via FE80::C801:2FF:FE04:0, Serial1/0

C   2001:AB1:0:3::/64 [0/0]

     via ::, Serial1/0

L   2001:AB1:0:3::2/128 [0/0]

     via ::, Serial1/0

C   2001:AB1:0:4::/64 [0/0]

     via ::, Loopback0

L   2001:AB1:0:4::1/128 [0/0]

     via ::, Loopback0

R   2001:AB1:0:8::/64 [120/3]            ---->RIPng的度量与RIP协议不同的是

     via FE80::C801:2FF:FE04:0, Serial1/0     路由在进入路由表时加1,而RIP

R   2001:AB1:0:9::/64 [120/3]            路由协议在路由向外通告时加1

     via FE80::C801:2FF:FE04:0, Serial1/0

R   2001:AB1:0:A::/64 [120/3]

     via FE80::C801:2FF:FE04:0, Serial1/0

R   2001:AB1:0:B::/64 [120/3]

     via FE80::C801:2FF:FE04:0, Serial1/0  

L   FF00::/8 [0/0]

     via ::, Null0

 

查看RIPng的路由协议参数:

R3#show ipv6 rip

RIP process "xiaoyang-rip", port 521, multicast-group FF02::9, pid 237

     Administrative distance is 120. Maximum paths is 16

     Updates every 30 seconds, expire after 180

     Holddown lasts 0 seconds, garbage collect after 120

     Split horizon is on; poison reverse is off

     Default routes are not generated

     Periodic updates 19, trigger updates 2

  Interfaces:

    Loopback0

    Serial1/0

  Redistribution:

    None

 

查看负载均衡路径数量:

R3(config)#ipv6 router rip xiaoyang-rip

R3(config-rtr)#maximum-paths ?

  <1-64>  Number of paths   ----->默认支持16条路径负载均衡,最大支持64条

 

在R3上用debug查看RIPng的通告:

R3#debug ipv6 rip

RIP Routing Protocol debugging is on

R3#

*Apr 16 15:59:40.755: RIPng: response received from FE80::C801:2FF:FE04:0 on Serial1/0 for xiaoyang-rip

*Apr 16 15:59:40.759:        src=FE80::C801:2FF:FE04:0 (Serial1/0)  --->默认使用链路本地地址通告路由

*Apr 16 15:59:40.763:        dst=FF02::9   --->通告的目标为组播地址FF02,其范围与v4的一致

*Apr 16 15:59:40.763:        sport=521, dport=521, length=132

*Apr 16 15:59:40.767:        command=2, version=1, mbz=0, #rte=6

*Apr 16 15:59:40.767:        tag=0, metric=1, prefix=2001:AB1:0:2::/64

*Apr 16 15:59:40.771:        tag=0, metric=1, prefix=2001:AB1:0:3::/64

*Apr 16 15:59:40.771:        tag=0, metric=2, prefix=2001:AB1:0:8::/64

*Apr 16 15:59:40.775:        tag=0, metric=2, prefix=2001:AB1:0:9::/64

*Apr 16 15:59:40.775:        tag=0, metric=2, prefix=2001:AB1:0:A::/64

*Apr 16 15:59:40.779:        tag=0, metric=2, prefix=2001:AB1:0:B::/64

*Apr 16 15:59:53.031: RIPng: Sending multicast update on Loopback0 for xiaoyang-rip

*Apr 16 15:59:53.035:        src=FE80::C802:2FF:FE04:0

*Apr 16 15:59:53.039:        dst=FF02::9 (Loopback0)

*Apr 16 15:59:53.039:        sport=521, dport=521, length=152

*Apr 16 15:59:53.043:        command=2, version=1, mbz=0, #rte=7

*Apr 16 15:59:53.043:        tag=0, metric=1, prefix=2001:AB1:0:3::/64

*Apr 16 15:59:53.047:        tag=0, metric=1, prefix=2001:AB1:0:4::/64

*Apr 16 15:59:53.047:        tag=0, metric=2, prefix=2001:AB1:0:2::/64

*Apr 16 15:59:53.051:        tag=0, metric=3, prefix=2001:AB1:0:8::/64

*Apr 16 15:59:53.051:        tag=0, metric=3, prefix=2001:AB1:0:9::/64

*Apr 16 15:59:53.051:        tag=0, metric=3, prefix=2001:AB1:0:A::/64  ---->本地路由表中的路由在通告

*Apr 16 15:59:53.051:        tag=0, metric=3, prefix=2001:AB1:0:B::/64     给其它路由器时不会为其度量值加1

 

测试路由有效性:

R3#ping 2001:ab1:0:8::1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 2001:AB1:0:8::1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/23/60 ms

R3#ping 2001:ab1:0:9::1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 2001:AB1:0:9::1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/28/80 ms

 

通过上面的路由表可以看出,RIPng不能自动汇总,因此在R1上实施路由汇总。

 

在R1上实施路由手工汇总,可以优化路由表:

R1(config)#int s1/0

R1(config-if)#ipv6 rip xiaoyang-rip summary-address 2001:ab1:0:8::/62  ---->汇总RIPng发出的路由

R1(config-if)#exit

 

观察R3路由表:

R3#clear ipv6 rip xiaoyang-rip

R3#clear ipv6 rip *    ----->清进程,加快收敛,必要时可以在所有路由器上使用这个命令

R3#show ipv6 route

IPv6 Routing Table - 7 entries

Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP

       U - Per-user Static route, M - MIPv6

       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary

       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2

       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2

       D - EIGRP, EX - EIGRP external

R   2001:AB1:0:2::/64 [120/2]

     via FE80::C801:2FF:FE04:0, Serial1/0

C   2001:AB1:0:3::/64 [0/0]

     via ::, Serial1/0

L   2001:AB1:0:3::2/128 [0/0]

     via ::, Serial1/0

C   2001:AB1:0:4::/64 [0/0]

     via ::, Loopback0

L   2001:AB1:0:4::1/128 [0/0]

     via ::, Loopback0

R   2001:AB1:0:8::/62 [120/3]   ----->度量值,跳数是3

     via FE80::C801:2FF:FE04:0, Serial1/0

L   FF00::/8 [0/0]

     via ::, Null0

 

RIPng还可以手动修改度量值,在路由进入路由表时,确定对度量值如何处理:

R3(config)#int s1/0

R3(config-if)#ipv6 rip xiaoyang-rip metric-offset 10   ---->针对此接口学习到的路由,度量加10,默认是1

R3(config-if)#exit

 

再查看R3路由表:

R3#show ipv6 route

IPv6 Routing Table - 7 entries

Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP

       U - Per-user Static route, M - MIPv6

       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary

       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2

       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2

       D - EIGRP, EX - EIGRP external

R   2001:AB1:0:2::/64 [120/11]

     via FE80::C801:2FF:FE04:0, Serial1/0

C   2001:AB1:0:3::/64 [0/0]

     via ::, Serial1/0

L   2001:AB1:0:3::2/128 [0/0]

     via ::, Serial1/0

C   2001:AB1:0:4::/64 [0/0]

     via ::, Loopback0

L   2001:AB1:0:4::1/128 [0/0]

     via ::, Loopback0

R   2001:AB1:0:8::/62 [120/12]      ----->度量值已经变成12

     via FE80::C801:2FF:FE04:0, Serial1/0

L   FF00::/8 [0/0]

     via ::, Null0

 

实验完成。


发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

桂ICP备19000498号-3