Chinaunix首页 | 论坛 | 博客
  • 博客访问: 802278
  • 博文数量: 102
  • 博客积分: 10011
  • 博客等级: 上将
  • 技术积分: 2301
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-08 13:00
文章存档

2011年(2)

2010年(30)

2009年(25)

2008年(45)

我的朋友

分类: 系统运维

2010-11-15 10:49:26

IPv6 的RIP,和IPv4下的RIPv2基本上同,不同的是IPv4 RIPv2使用UDP 端口520,RIPng使用的是UDP 521,IPv4 RIPv2数据包更新使用地址224.0.0.9 ,RIPng使用的地址为FF02::9
在配置RIPng的时候,方法和Ipv4是由区别的,RIPng采用先配置进程,然后在相应的接口下配置。
下面是用一个例子来说明如何配置RIPng
1 网络连接图形为
设备名称  接口  接口IP  备注  
 R1  Fa0/0  2012:1:1:11::1/64          
   loopback1   3001:1:1:11::1/64    
   loopback2  3002:1:1:11::1/64    
   loopback3  3003:1:11:11::1/64    
 R2  Fa0/0  2012:1:1:11::2/64
 
   loopback0  2022:2:2:22::2/64    
         

2 R1的初始化配置
R1(config)#ipv6 unicast-routing
R1(config)#interface fa0/0
R1(config-if)#ipv6 address 2012:1:1:11::1/64
R1(config)#interface loopback1
R1(config-if)#ipv6 address 3001:1:1:11::1/64
R1(config)#interface loopback3
R1(config-if)#ipv6 address 3002:1:1:11::1/64
R1(config)#interface loopback3
R1(config-if)#ipv6 address 3003:1:1:11::1/64
 R2初始化配置
R2(config)#ipv6 unicast-routing
R2(config)#interface fa0/0
R2(config-if)#ipv6 address 2012:1:1:11::2/64
R2(config)#interface loopback0
R2(config-if)#ipv6 address 2022:2:2:22::2/64
3 启动RIPng进程
Cisco IOS最多同时支持4个RIPng进程,不同进程使用不同的名字处理
3.1 R1/R2上启动RIPng进程
R1(config)#ipv6 router rip ccie
R2(config)#ipv6 router rip ccie
4 在接口上启用RIPng进程
R1(config)#interface fa0/0
R1(config-if)#ipv6 rip ccie enable
R1(config)#interface loopback1
R1(config-if)#ipv6 rip ccie enable
R2(config)#interface fa0/0
R2(config-if)#ipv6 rip ccie enable
R2(config)#interface loopback0
R2(config-if)#ipv6 rip ccie enable
5 查看RIPng路由
5.1 查看R1上的RIPng路由
R1#show ipv6 router rip

IPv6 Routing Table - 11 entries

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

       U - Per-user Static route

       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   2022:2:2:22::/64 [120/2]

     via FE80::C200:DFF:FEC4:0, FastEthernet0/0

5.2 查看R2 上的RIPng路由

R2#show ipv6 route rip

IPv6 Routing Table - 7 entries

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

       U - Per-user Static route

       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   3001:1:1:11::/64 [120/2]

     via FE80::C200:BFF:FE48:0, FastEthernet0/0

5.3 测试连通性质

测试R1到对段链路本地地址的连通性

R1#ping FE80::C200:DEF:FEC4:0

Output Interface: FastEthernet0/0          

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to FE80::C200:DFF:FEC4:0, timeout is 2 seconds:

Packet sent with a source address of FE80::C200:DFF:FEC4:0

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 32/70/184 ms

测试R1到对端IPv6网络的连通性

R1#ping 2022:2:2:22::2

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 2022:2:2:22::2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 12/75/240 ms

同样可以测试R2

6 重发布IPv6

6.1 将R1中剩余网段重发布到RIPng中

R1中进行再发布工作

R1(config)#route-map conn permit 10

R1(config-route-map)#match interface loopback2

R1(config)#route-map conn permit 20

R1(config-route-map)#match interface loopback3

R1(config)#ipv6 router rip ccie

R1(config)#redistribute connected route-map con

6.2 在R2行查看重发布的RIPng剩余网段

R2#show ipv6 route rip

IPv6 Routing Table - 9 entries

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

       U - Per-user Static route

       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   3001:1:1:11::/64 [120/2]

     via FE80::C200:BFF:FE48:0, FastEthernet0/0

R   3002:1:1:11::/64 [120/2]

     via FE80::C200:BFF:FE48:0, FastEthernet0/0

R   3003:1:1:11::/64 [120/2]

     via FE80::C200:BFF:FE48:0, FastEthernet0/0

7 过滤IPv6路由

在R2中过滤掉不想要的路由,使用distribute-list 

7.1 配置只保留3002:1:1:11::/64 网段

R2(config)#ipv6 prefix-list abc permit 3002:1:1:11::/64

R2(config)#ipv6 router rip ccie

R2(config-rtr)#distribute-list prefix-list abc in fa0/0

7.2 查看过滤后的路由结果

R2#show ipv6 route rip

r2#show ipv6 route rip

IPv6 Routing Table - 7 entries

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

       U - Per-user Static route

       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   3002:1:1:11::/64 [120/2]

     via FE80::C200:BFF:FE48:0, FastEthernet0/0


阅读(1037) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-11-15 15:16:15

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com