5 - IPv6 OSPFv3路由协议(续四)
http://xuanbo.blog.51cto.com/499334/200785
3.1.4 OSPFv3与RIP重分发配置
本实验拓扑,如下图所示:
具体配置如下:
路由器R1配置
R1#
ipv6 unicast-routing
!
interface Loopback0
no ip address
ipv6 address 2001:10::1/64
ipv6 ospf 10 area 10
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:1::1/64
ipv6 enable
ipv6 ospf 10 area 10
!
interface Ethernet1/1
no ip address
duplex full
ipv6 address 2001:5::1/64
ipv6 enable
!
ipv6 router ospf 10
router-id 1.1.1.1
log-adjacency-changes
!
路由器R2配置
ipv6 unicast-routing
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:1::2/64
ipv6 enable
ipv6 ospf 10 area 10
!
interface Ethernet1/1
no ip address
duplex full
ipv6 address 2001:2::1/64
ipv6 enable
ipv6 ospf 10 area 0
!
ipv6 router ospf 10
router-id 2.2.2.2
log-adjacency-changes
路由器R3配置
ipv6 unicast-routing
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:2::2/64
ipv6 enable
ipv6 ospf 10 area 0
!
interface Ethernet1/1
no ip address
duplex full
ipv6 address 2001:3::1/64
ipv6 enable
ipv6 rip ripng enable
!
ipv6 router ospf 10
router-id 3.3.3.3
log-adjacency-changes
redistribute connected metric 60
redistribute rip ripng metric 50
!
ipv6 router rip ripng
redistribute connected metric 3
redistribute ospf 10 metric 2
!
路由器R4配置
ipv6 unicast-routing
!
interface Loopback0
no ip address
ipv6 address 2001:11::1/64
ipv6 rip ripng enable
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:3::2/64
ipv6 enable
ipv6 rip ripng enable
!
interface Ethernet1/1
no ip address
duplex full
ipv6 address 2001:4::1/64
ipv6 enable
!
ipv6 router rip ripng
配置完成后,可以使用show命令来查看其路由表:
R1#sh ipv6 route
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
C 2001:1::/64 [0/0]
via ::, Ethernet1/0
L 2001:1::1/128 [0/0]
via ::, Ethernet1/0
OI 2001:2::/64 [110/20]
via FE80::C800:4CFF:FE18:1C, Ethernet1/0
OE2 2001:3::/64 [110/60]
via FE80::C800:4CFF:FE18:1C, Ethernet1/0
C 2001:5::/64 [0/0]
via ::, Ethernet1/1
L 2001:5::1/128 [0/0]
via ::, Ethernet1/1
C 2001:10::/64 [0/0]
via ::, Loopback0
L 2001:10::1/128 [0/0]
via ::, Loopback0
OE2 2001:11::/64 [110/50]
via FE80::C800:4CFF:FE18:1C, Ethernet1/0
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
R4#sh ipv6 route
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
R 2001:1::/64 [120/3]
via FE80::C800:45FF:FEF4:1D, Ethernet1/0
R 2001:2::/64 [120/4]
via FE80::C800:45FF:FEF4:1D, Ethernet1/0
C 2001:3::/64 [0/0]
via ::, Ethernet1/0
L 2001:3::2/128 [0/0]
via ::, Ethernet1/0
C 2001:4::/64 [0/0]
via ::, Ethernet1/1
L 2001:4::1/128 [0/0]
via ::, Ethernet1/1
R 2001:10::1/128 [120/3]
via FE80::C800:45FF:FEF4:1D, Ethernet1/0
C 2001:11::/64 [0/0]
via ::, Loopback0
L 2001:11::1/128 [0/0]
via ::, Loopback0
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
也可以使用show命令来查看其邻居关系
R2#sh ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
3.3.3.3 1 FULL/BDR 00:00:36 5 Ethernet1/1
1.1.1.1 1 FULL/BDR 00:00:38 5 Ethernet1/0
R2#sh ipv6 ospf neighbor detail
Neighbor 3.3.3.3
In the area 0 via interface Ethernet1/1
Neighbor: interface-id 5, link-local address FE80::C800:45FF:FEF4:1C
Neighbor priority is 1, State is FULL, 12 state changes
DR is 2.2.2.2 BDR is 3.3.3.3
Options is 0x6415D0CD
Dead timer due in 00:00:35
Neighbor is up for 01:32:04
Index 1/1/2, retransmission queue length 0, number of retransmission 2
First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
Last retransmission scan length is 4, maximum is 4
Last retransmission scan time is 0 msec, maximum is 0 msec
Neighbor 1.1.1.1
In the area 10 via interface Ethernet1/0
Neighbor: interface-id 5, link-local address FE80::C800:48FF:FE28:1C
Neighbor priority is 1, State is FULL, 18 state changes
DR is 2.2.2.2 BDR is 1.1.1.1
Options is 0x65605031
Dead timer due in 00:00:37
Neighbor is up for 00:59:52
Index 1/1/1, retransmission queue length 0, number of retransmission 3
First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
Last retransmission scan length is 3, maximum is 5
Last retransmission scan time is 0 msec, maximum is 0 msec
还可以使用show命令来查看OSPFv3路由协议更详细的信息。
R2#sh ipv6 ospf 10
Routing Process "ospfv3 10" with ID 2.2.2.2
It is an area border router
SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 2. Checksum Sum 0x00BEFE
Number of areas in this router is 2. 2 normal 0 stub 0 nssa
Reference bandwidth unit is 100 mbps
Area BACKBONE(0)
Number of interfaces in this area is 1
SPF algorithm executed 6 times
Number of LSA 8. Checksum Sum 0x042AA1
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Area 10
Number of interfaces in this area is 1
SPF algorithm executed 6 times
Number of LSA 9. Checksum Sum 0x057BF3
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
3.1.5 OSPFv3末节区域配置
本实验拓扑图如下所示:
具体配置如下:
路由器R1配置
ipv6 unicast-routing
!
interface Loopback0
no ip address
ipv6 address 2001:10::1/64
ipv6 ospf 10 area 10
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:1::1/64
ipv6 enable
ipv6 ospf 10 area 10
!
interface Ethernet1/1
no ip address
duplex full
ipv6 address 2001:5::1/64
ipv6 enable
!
ipv6 router ospf 10
router-id 1.1.1.1
log-adjacency-changes
area 10 stub
路由器R2配置
ipv6 unicast-routing
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:1::2/64
ipv6 enable
ipv6 ospf 10 area 10
!
interface Ethernet1/1
no ip address
duplex full
ipv6 address 2001:2::1/64
ipv6 enable
ipv6 ospf 10 area 0
!
ipv6 router ospf 10
router-id 2.2.2.2
log-adjacency-changes
area 10 stub no-summary
!
路由器R3配置
ipv6 unicast-routing
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:2::2/64
ipv6 enable
ipv6 ospf 10 area 0
!
interface Ethernet1/1
no ip address
duplex full
ipv6 address 2001:3::1/64
ipv6 enable
ipv6 ospf 10 area 20
!
ipv6 router ospf 10
router-id 3.3.3.3
log-adjacency-changes
路收器R4配置
ipv6 unicast-routing
!
interface Loopback0
no ip address
ipv6 address 2001:11::1/64
ipv6 ospf 10 area 20
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:3::2/64
ipv6 enable
ipv6 ospf 10 area 20
!
interface Ethernet1/1
no ip address
duplex full
ipv6 address 2001:4::1/64
ipv6 enable
ipv6 ospf 10 area 20
!
ipv6 router ospf 10
router-id 4.4.4.4
log-adjacency-changes
可以使用show命令来查看其路由信息。
R1#sh ipv6 route
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
OI ::/0 [110/11]
via FE80::C800:4CFF:FE18:1C, Ethernet1/0
C 2001:1::/64 [0/0]
via ::, Ethernet1/0
L 2001:1::1/128 [0/0]
via ::, Ethernet1/0
C 2001:5::/64 [0/0]
via ::, Ethernet1/1
L 2001:5::1/128 [0/0]
via ::, Ethernet1/1
C 2001:10::/64 [0/0]
via ::, Loopback0
L 2001:10::1/128 [0/0]
via ::, Loopback0
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通