神州路由器支持IPv6的内部网关路由协议常用的有OPSFv3和RIPng。
实验拓扑图如下所示
配置要求:在两台路由器上启用IPv6 routing, 在接口上配子ipv6协议后,通过配置RIPng和OSPFv3相关命令,观察学习到的路由。
配置步骤:
一、OSPFv3路由的配置
步骤1:在Router-A上启用ipv6 routing,在端口g0/4上配置IPv6 enable:
RouterA_config#ipv6 unicast-routing
RouterA_config_g0/4 #ipv6 enable
验证配置:
RouterA#show ipv6 route
步骤2:在Router-A上创建loopback0端口,并配置ipv4地址;全局启动ospfv3进程。
RouterA_config# router ospfv3 1
RouterA_config_ospfv3_1#router-id 1.1.1.1
RouterA_config#interface loopback 0
RouterA_config_l0#ip address 1.1.1.1 255.255.255.255
RouterA_config_l0#ipv6 router ospf 1
RouterA_config_l0#exit
验证配置:
RouterA_config_ospf6_1#show ipv6 ospf 1
选择最高loopback地址用来做ospfv3进程的router-id
步骤3:在Router-A的端口g0/4上配置启动ospfv3进程,并指定区域号。
RouterA_config#interface g0/4
RouterA_config_g0/4#ipv6 ospf 1 area 0
验证配置:
RouterA_config_ospf6_1#show ipv6 ospf 1
Routing Process "OSPFv3 (1)" with ID 1.1.1.1
SPF schedule delay 5 secs, Hold time between SPFs 10 secs
Minimum LSA interval 5 secs, Minimum LSA arrival 1 secs
Number of external LSA 0. Checksum Sum 0x0000
Number of AS-Scoped Unknown LSA 0
Number of LSA originated 2
Number of LSA received 0
Number of areas in this router is 1
Area BACKBONE(0) //启动骨干域
Number of interfaces in this area is 1
SPF algorithm executed 0 times
Number of LSA 1. Checksum Sum 0xF138
Number of Unknown LSA 0
步骤4:在Router-B上重复上面三步,其中loopback0地址配置为2.2.2.2。
RouterB_config#ipv6 unicast-routing
RouterB_config# router ospfv3 1
RouterB_config_ospfv3_1#router-id 2.2.2.2
RouterB_config#interface g0/4
RouterB_config_G0/4#ipv6 enable
RouterB_config#interface loopback 0
RouterB_config_l0#ip address 2.2.2.2 255.255.255.0
RouterB_config#ipv6 router ospf 1
RouterB_config#interface g0/4
RouterB_config_g0/4#ipv6 ospf 1 area 0
验证配置:
RouterB#show ipv6 ospf neighbor
OSPFv3 Process (1) //邻居状态达到FULL状态
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/- 00:00:29 GigaEthernet0/4 0
步骤5:在Router-A的f0/0端口上配置ipv6 global地址2000::1/64,并在f0/0上启动ospfv3进程。应该可以在Router-B上学习到2000::/64的路由。
RouterA_config#interface f0/1
RouterA_config_f0/1#ipv6 address 2001::1/64
RouterA_config_f0/1# ipv6 ospf 1 area 0
验证配置:
RouterB_config#show ipv6 route
O 2001::/64[1] //学习到的ospf路由
[110,20] via fe80:4::2e0:fff:fe26:2a58(on GigaEthernet 0/4)
C fe80::/10[1]
is directly connected, L,Null0
C fe80::/64[1]
is directly connected, C, GigaEthernet 0/4
C fe80::2e0:fff:fe26:2d98/128[1]
is directly connected, L, GigaEthernet 0/4
C ff00::/8[1]
is directly connected, L,Null0
二、RIPng路由配置:
RouterA:
RouterA_config#router ripng 1
RouterA_config_ripng_1#int F0/0
RouterA_config_f0/0#ipv6 rip 1 enable
RouterA_config_f0/0#int g0/4
RouterA_config_g0/4#ipv6 rip 1 enable
RouterA_config_g0/4# int l0
RouterA_config_l0# ipv6 rip 1 enable
RouterA_config_l0#exi
RouterA_config#
RouterB:
RouterB_config#router ripng 1
RouterB_config_ripng_1#int g0/4
RouterB_config_g0/4#ipv6 rip 1 enable
RouterB_config_g0/4#int l0
RouterB_config_l0#ipv6 rip 1 enable
RouterB_config_l0#exit
RouterB_config#
查看路由表信息:
# RouterA#show ipv6 route
# RouterB2#show ipv6 route