IPv6实验 OSPFv3
TOP.
配置R1:
ipv6 unicast-routing
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Ethernet0/0
ipv6 address 2001:1:1:1::1/64
ipv6 ospf 1 area 0
no sh
!
interface Serial0/0
ipv6 address 2001:A:A:A::1/64
ipv6 ospf 1 area 0
clock rate 4000000
!
interface Serial1/0
ipv6 address 2001:B:B:B::1/64
ipv6 ospf 1 area 0
clock rate 4000000
ipv6 router ospf 1
router-id 1.1.1.1
配置R2:
ipv6 unicast-routing
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Ethernet0/0
ipv6 address 2001:2:2:2::2/64
ipv6 ospf 2 area 0
no keepalive
!
interface Serial0/0
ipv6 address 2001:A:A:A::2/64
ipv6 ospf 2 area 0
!
ipv6 router ospf 2
router-id 2.2.2.2
配置R3:
ipv6 unicast-routing
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Ethernet0/0
ipv6 address 2001:3:3:3::3/64
ipv6 ospf 3 area 1 //设置E0/0接口运行在OSPF区域1
no keepalive
!
interface Serial0/0
ipv6 address 2001:B:B:B::3/64
ipv6 ospf 3 area 0
!
ipv6 router ospf 3
router-id 3.3.3.3
验证R1,R2,R3的邻居状态:
R1#show ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
3.3.3.3 1 FULL/ - 00:00:32 4 Serial1/0
2.2.2.2 1 FULL/ - 00:00:33 4 Serial0/0
R2#sho ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
1.1.1.1 1 FULL/ - 00:00:28 4 Serial0/0
R2#
R3#show ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
1.1.1.1 1 FULL/ - 00:00:34 6 Serial0/0
R3#
查看各路由表:
R1#show ipv6 route ospf
IPv6 Routing Table - 10 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
O 2001:2:2:2::/64 [110/74]
via FE80::250:73FF:FE15:F261, Serial0/0
OI 2001:3:3::/48 [110/74]
via FE80::210:7BFF:FE5B:6C1, Serial1/0
R1#
R2#show ipv6 route ospf
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
O 2001:1:1:1::/64 [110/74]
via FE80::201:42FF:FE9D:2981, Serial0/0
OI 2001:3:3::/48 [110/138]
via FE80::201:42FF:FE9D:2981, Serial0/0
O 2001:B:B:B::/64 [110/128]
via FE80::201:42FF:FE9D:2981, Serial0/0
R2#
R3#sho ipv6 route ospf
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
O 2001:1:1:1::/64 [110/74]
via FE80::201:42FF:FE9D:2981, Serial0/0
O 2001:2:2:2::/64 [110/138]
via FE80::201:42FF:FE9D:2981, Serial0/0
O 2001:A:A:A::/64 [110/128]
via FE80::201:42FF:FE9D:2981, Serial0/0
R3#
在R3的E0/0上增加一个IPV6地址来验证路由汇总:
R3(config)#int e0/0
R3(config-if)#ipv6 address 2001:3:3:4::3/64
R3(config)#ipv6 router ospf 3
R3(config-rtr)#area 1 range 2001:3:3::/48 //汇总
R3(config-rtr)#end
在R2上查看汇总路由:
R2#show ipv6 route ospf
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
O 2001:1:1:1::/64 [110/74]
via FE80::201:42FF:FE9D:2981, Serial0/0
OI 2001:3:3::/48 [110/138]
via FE80::201:42FF:FE9D:2981, Serial0/0
O 2001:B:B:B::/64 [110/128]
via FE80::201:42FF:FE9D:2981, Serial0/0
R2#