区域内前缀LSA(Intra-Area-Prefix-LSA)
该类型LSA在本区域内传播,具有以下两种功能之一:通过参考网络LSA把IPv6地址前缀与转递网络(transit network)相关联;或者通过参考路由器LSA把IPv6地址前缀与路由器相关联。一台路由器可以为给定的区域产生多个该类型的LSA,这些LSA使用链路状态ID字段(Link State ID)区分。DR为它所代表的链路产生一个或多个该类型的LSA,向整个区域内通告该链路的地址前缀。
Intra Area Prefix LSA描述了Router LSA和Network LSA所携带的路由信息,因此在Intra Area Prefix LSA中需要标明该LSA引用的Router LSA或Network LSA,这是通过Referenced LS Type、Referenced Link State ID和Referenced AdvertisingRouter字段来联合标识的。
主要字段的解释如下:
# Prefixes:包含的IPv6 地址前缀的个数。
Referenced LS Type:引用LSA 的类型,取值为1 表明该LSA 与RouterLSA 相关,取值为2 表明该LSA 与Network LSA 相关。
Referenced Link State ID:引用LSA 的Link State ID。如果引用的是Router LSA,此字段值为0;如果引用的是Network LSA,此字段值为DR在该条链路上的Interface ID。
Referenced Advertising Router:引用LSA 的发布路由器。如果引用的是Router LSA,此字段值为产生该LSA 路由器的Router ID;如果引用的是Network LSA,此字段值为DR 的Router ID。
如下图所示:
3.1.3 OSPFv3路由协议工作机制
OSPFv3协议的工作原理与OSPFv2的工作原理是一样的,因为OSPFv3是在OSPFv2的基础之上修改而成的。在路由器上可以使用show ipv6 ospf adj来了解其邻居、邻接之间形成的工作过程,如下所示:
R1#debug ipv6 ospf adj
OSPFv3 adjacency events debugging is on
R1#clear ipv6 ospf process
Reset ALL OSPF processes? [no]: yes
R1#
*Sep 5 11:56:57.747: OSPFv3: Interface Loopback0 going Down
*Sep 5 11:56:57.747: OSPFv3: Interface Ethernet1/0 going Down
*Sep 5 11:56:57.747: OSPFv3: Neighbor change Event on interface Ethernet1/0
*Sep 5 11:56:57.751: OSPFv3: DR/BDR election on Ethernet1/0
*Sep 5 11:56:57.751: OSPFv3: Elect BDR 0.0.0.0
*Sep 5 11:56:57.751: OSPFv3: Elect DR 2.2.2.2
*Sep 5 11:56:57.751: OSPFv3: Elect BDR 0.0.0.0
*Sep 5 11:56:57.751: OSPFv3: Elect DR 2.2.2.2
*Sep 5 11:56:57.751: DR: 2.2.2.2 (Id) BDR: none
*Sep 5 11:56:57.755: OSPFv3: 2.2.2.2 address FE80::C800:4CFF:FE18:1C on Ethernet1/0 is dead, state DOWN
*Sep 5 11:56:57.755: %OSPFv3-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Ethernet1/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Sep 5 11:56:57.759: OSPFv3: Neighbor change Event on interface Ethernet1/0
*Sep 5 11:56:57.759: OSPFv3: DR/BDR election on Ethernet1/0
*Sep 5 11:56:57.759: OSPFv3: Elect BDR 0.0.0.0
*Sep 5 11:56:57.763: OSPFv3: Elect DR 0.0.0.0
*Sep 5 11:56:57.763: DR: none BDR: none
*Sep 5 11:56:57.763: OSPFv3: Remember old DR 2.2.2.2 (id)
*Sep 5 11:56:57.767: OSPFv3: Interface Loopback0 going Up
*Sep 5 11:56:57.767: OSPFv3: Interface Ethernet1/0 going Up
*Sep 5 11:56:57.787: OSPFv3: 2 Way Communication to 2.2.2.2 on Ethernet1/0, state 2WAY
*Sep 5 11:56:57.787: OSPFv3: Backup seen Event before WAIT timer on Ethernet1/0
*Sep 5 11:56:57.791: OSPFv3: DR/BDR election on Ethernet1/0
*Sep 5 11:56:57.791: OSPFv3: Elect BDR 1.1.1.1
*Sep 5 11:56:57.791: OSPFv3: Elect DR 2.2.2.2
*Sep 5 11:56:57.791: OSPFv3: Elect BDR 1.1.1.1
*Sep 5 11:56:57.791: OSPFv3: Elect DR 2.2.2.2
*Sep 5 11:56:57.795: DR: 2.2.2.2 (Id) BDR: 1.1.1.1 (Id)
*Sep 5 11:56:57.795: OSPFv3: Send DBD to 2.2.2.2 on Ethernet1/0 seq 0x13E3 opt 0x0013 flag 0x7 len 28
*Sep 5 11:56:57.855: OSPFv3: Rcv DBD from 2.2.2.2 on Ethernet1/0 seq 0xA36 opt 0x0013 flag 0x7 len 28 mtu 1500 state EXSTART
*Sep 5 11:56:57.859: OSPFv3: NBR Negotiation Done. We are the SLAVE
*Sep 5 11:56:57.859: OSPFv3: Send DBD to 2.2.2.2 on Ethernet1/0 seq 0xA36 opt 0x0013 flag 0x0 len 28
*Sep 5 11:56:57.879: OSPFv3: Rcv DBD from 2.2.2.2 on Ethernet1/0 seq 0xA37 opt 0x0013 flag 0x3 len 188 mtu 1500 state EXCHANGE
*Sep 5 11:56:57.883: OSPFv3: Send DBD to 2.2.2.2 on Ethernet1/0 seq 0xA37 opt 0x0013 flag 0x0 len 28
*Sep 5 11:56:57.883: OSPFv3: Database request to 2.2.2.2
*Sep 5 11:56:57.887: OSPFv3: sent LS REQ packet to FE80::C800:4CFF:FE18:1C, length 96
*Sep 5 11:56:58.131: OSPFv3: Rcv DBD from 2.2.2.2 on Ethernet1/0 seq 0xA38 opt 0x0013 flag 0x1 len 28 mtu 1500 state EXCHANGE
*Sep 5 11:56:58.131: OSPFv3: Exchange Done with 2.2.2.2 on Ethernet1/0
*Sep 5 11:56:58.131: OSPFv3: Send DBD to 2.2.2.2 on Ethernet1/0 seq 0xA38 opt 0x0013 flag 0x0 len 28
*Sep 5 11:56:58.139: OSPFv3: Synchronized with 2.2.2.2 on Ethernet1/0, state FULL
*Sep 5 11:56:58.139: %OSPFv3-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Ethernet1/0 from LOADING to FULL, Loading Done
*Sep 5 11:57:00.691: OSPFv3: Neighbor change Event on interface Ethernet1/0
*Sep 5 11:57:00.691: OSPFv3: DR/BDR election on Ethernet1/0
*Sep 5 11:57:00.691: OSPFv3: Elect BDR 1.1.1.1
*Sep 5 11:57:00.695: OSPFv3: Elect DR 2.2.2.2
*Sep 5 11:57:00.695: DR: 2.2.2.2 (Id) BDR: 1.1.1.1 (Id)
3.1.3 OSPFv3多区域配置
在配置OSPFv3路由协议之前,需要注意到以下几点:
接口要参与OSPFv3运行,必须在接口配置模式下明确启动。而在OSPFv2中,这是通过在OSPF路由配置模式下,通过network命令间接启动。
如果配置接口参与OSPFv3运行,那么接口上所有的地址都将参与IPv6运行。而在OSPFv2中,所有地址都必须通过network命令启动。
在运行OSPFv3的环境中,在同一个链路上能够允许运行多个OSPF实体,该链路所连的不同设备可以选择参与运行某一个OSPF实体。OSPFv2并不支持该功能。
每台运行OSPFv3进程的设备都必须使用一个router ID来标识,router ID使用IPv4地址格式。不同于OSPFv2,OSPFv2进程将自动获取IPv4地址作为router ID,设备在启动OSPFv3进程后,用户必须使用router-id命令为OSPFv3进程配置router ID,否则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
路由器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 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 - 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
OI 2001:3::/64 [110/30]
via FE80::C800:4CFF:FE18:1C, Ethernet1/0
OI 2001:4::/64 [110/30]
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
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
R3#sh ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 1 FULL/DR 00:00:35 6 Ethernet1/0
4.4.4.4 1 FULL/DR 00:00:33 6 Ethernet1/1
3.1.4 OSPFv3与RIP重分发配置
本实验拓扑,如下图所示:
具体配置如下:
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
!
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
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
!
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
3.1.7 OSPFv3 虚链路配置
具体配置如下:
ipv6 unicast-routing
!
interface Loopback0
no ip address
ipv6 address 2001:10::1/64
ipv6 rip ripng enable
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:1::1/64
ipv6 enable
ipv6 ospf 10 area 0
!
interface Ethernet1/1
no ip address
duplex full
ipv6 address 2001:5::1/64
ipv6 enable
ipv6 rip ripng enable
!
ipv6 router ospf 10
router-id 1.1.1.1
log-adjacency-changes
redistribute connected metric 50
redistribute rip ripng metric 50
!
ipv6 router rip ripng
路由器R2配置
ipv6 unicast-routing
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:1::2/64
ipv6 enable
ipv6 ospf 10 area 0
!
interface Ethernet1/1
no ip address
duplex full
ipv6 address 2001:2::1/64
ipv6 enable
ipv6 ospf 10 area 10
!
ipv6 router ospf 10
router-id 2.2.2.2
log-adjacency-changes
area 10 virtual-link 3.3.3.3
!
路由器R3配置
ipv6 unicast-routing
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:2::2/64
ipv6 enable
ipv6 ospf 10 area 10
!
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
area 10 virtual-link 2.2.2.2
路由器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 router ospf 10
router-id 4.4.4.4
log-adjacency-changes
可以使用show命令来查看其路由信息。
R3#sh ipv6 ospf virtual-links
Virtual Link OSPFv3_VL0 to router 2.2.2.2 is up
Interface ID 11, IPv6 address 2001:1::2
Run as demand circuit
DoNotAge LSA allowed.
Transit area 10, via interface Ethernet1/0, Cost of using 10
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Adjacency State FULL (Hello suppressed)
Index 1/1/3, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec
R2#sh ipv6 ospf virtual-links
Virtual Link OSPFv3_VL0 to router 3.3.3.3 is up
Interface ID 11, IPv6 address 2001:3::1
Run as demand circuit
DoNotAge LSA allowed.
Transit area 10, via interface Ethernet1/1, Cost of using 10
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Adjacency State FULL (Hello suppressed)
Index 1/2/3, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec
R4#sh ipv6 route
IPv6 Routing Table - 14 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 2001:1::/64 [110/30]
via FE80::C800:73FF:FE68:1D, Ethernet1/0
OI 2001:1::2/128 [110/20]
via FE80::C800:73FF:FE68:1D, Ethernet1/0
OI 2001:2::/64 [110/20]
via FE80::C800:73FF:FE68:1D, Ethernet1/0
C 2001:3::/64 [0/0]
via ::, Ethernet1/0
OI 2001:3::1/128 [110/10]
via FE80::C800:73FF:FE68:1D, 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
OE2 2001:5::/64 [110/50]
via FE80::C800:73FF:FE68:1D, Ethernet1/0
OE2 2001:10::/64 [110/50]
via FE80::C800:73FF:FE68: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
R2#sh ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
3.3.3.3 1 FULL/ - - 11 OSPFv3_VL0
1.1.1.1 1 FULL/BDR 00:00:35 5 Ethernet1/0
3.3.3.3 1 FULL/DR 00:00:14 5 Ethernet1/1
3.1.8 OSPFv3 身份验证配置
本实验拓扑图,如下所示:
具体配置如下所示:
路由器R1配置
ipv6 unicast-routing
!
interface Loopback0
no ip address
ipv6 address 2001:10::1/64
ipv6 rip ripng enable
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:1::1/64
ipv6 enable
ipv6 ospf 10 area 0
!
interface Ethernet1/1
no ip address
duplex full
ipv6 address 2001:5::1/64
ipv6 enable
ipv6 rip ripng enable
!
ipv6 router ospf 10
router-id 1.1.1.1
log-adjacency-changes
redistribute connected metric 50
redistribute rip ripng metric 50
!
ipv6 router rip ripng
路由器R2配置
ipv6 unicast-routing
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:1::2/64
ipv6 enable
ipv6 ospf 10 area 0
!
interface Ethernet1/1
no ip address
duplex full
ipv6 address 2001:2::1/64
ipv6 enable
ipv6 ospf 10 area 10
!
ipv6 router ospf 10
router-id 2.2.2.2
log-adjacency-changes
area 10 authentication ipsec spi 10111 md5 1234567890ABCDEF1234567890ABCDEF
area 10 virtual-link 3.3.3.3
!
路由器R3配置
ipv6 unicast-routing
!
interface Ethernet1/0
no ip address
duplex full
ipv6 address 2001:2::2/64
ipv6 enable
ipv6 ospf 10 area 10
!
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
area 10 authentication ipsec spi 10111 md5 1234567890ABCDEF1234567890ABCDEF
area 10 virtual-link 2.2.2.2
路由器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 router ospf 10
router-id 4.4.4.4
log-adjacency-changes
可以使用show命令来查看其路由信息。
R2#sh ipv6 ospf
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 4. Checksum Sum 0x0201A8
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 2
SPF algorithm executed 21 times
Number of LSA 15. Checksum Sum 0x086F59
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 6
Flood list length 0
Area 10
Number of interfaces in this area is 1
MD5 Authentication, SPI 10111
SPF algorithm executed 15 times
Number of LSA 16. Checksum Sum 0x09D294
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
R2#sh ipv6 ospf interface ethernet 1/1
Ethernet1/1 is up, line protocol is up
Link Local Address FE80::C800:73FF:FE6C:1D, Interface ID 6
Area 10, Process ID 10, Instance ID 0, Router ID 2.2.2.2
Network Type BROADCAST, Cost: 10
MD5 Authentication (Area) SPI 10111, secure socket state UP (errors: 0)
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 3.3.3.3, local address FE80::C800:73FF:FE68:1C
Backup Designated router (ID) 2.2.2.2, local address FE80::C800:73FF:FE6C:1D
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
Index 1/1/2, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 2, maximum is 5
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 3.3.3.3 (Designated Router)
Suppress hello for 0 neighbor(s)
可以使用ethereal抓取其认证的报文,如下图所示:
根据下图所示,当路由器启用身份验证时,不论是Hello报文、DBD报文、LSR报文和LSU还是LSAck报文,都会在其OSPF报文的头之前加上一个认证的报头(AH),这只不过是对接收和发送OSPFv3报文进行一个身份验证,MD5加密的只是进行身份验证的口令,并不是对OSFPv3协议传输的报文的内容进行加密。
因为OSPFv3路由协议本身是不提供安全机制的,所以只能在OSPFv3报文的前边加上一个验证报头。
这只是对接收和发送OSPFv3各种报文的路由器进行合法身份的验证,如果想对报文进行加密或更好的提高其安全,可以使用IPSec协议。关于OSPFv3使用IPSec协议提高安全性,会在下篇博文中详细讲述。
3.1.9 OSPFv3 网络类型的配置 3.1.9.1 OSPFv3 point-to-point环境下配置
具体配置如下所示:
路由器R1配置
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex half
ipv6 address 2001:DB:1::1/64
ipv6 ospf 10 area 0
!
interface Serial1/0
no ip address
encapsulation frame-relay
ipv6 enable
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/0.1 point-to-point
ipv6 address 2001:DB2:1::1/64
ipv6 ospf 10 area 0
frame-relay interface-dlci 100 CISCO
!
interface Serial1/0.2 point-to-point
ipv6 address 2001:DB2:2::1/64
ipv6 ospf 10 area 0
frame-relay interface-dlci 110 CISCO
!
interface Serial1/0.3 point-to-point
ipv6 address 2001:DB2:3::1/64
ipv6 ospf 10 area 0
frame-relay interface-dlci 120 CISCO
!
logging alarm informational
ipv6 router ospf 10
router-id 1.1.1.1
log-adjacency-changes
路由器R2配置
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex half
ipv6 address 2001:DB:2::1/64
ipv6 ospf 10 area 0
!
interface Serial1/0
no ip address
encapsulation frame-relay
ipv6 enable
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/0.1 point-to-point
ipv6 address 2001:DB2:1::2/64
ipv6 ospf 10 area 0
frame-relay interface-dlci 200 CISCO
!
logging alarm informational
ipv6 router ospf 10
router-id 2.2.2.2
log-adjacency-changes
!
路由器R3配置
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex half
ipv6 address 2001:DB:3::1/64
ipv6 ospf 10 area 0
!
interface Serial1/0
no ip address
encapsulation frame-relay
ipv6 enable
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/0.1 point-to-point
ipv6 address 2001:DB2:2::2/64
ipv6 ospf 10 area 0
frame-relay interface-dlci 300
!
logging alarm informational
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:DB:4::1/64
ipv6 ospf 10 area 0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
no ip address
encapsulation frame-relay
ipv6 enable
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/0.1 point-to-point
ipv6 address 2001:DB2:3::2/64
ipv6 ospf 10 area 0
frame-relay interface-dlci 400 CISCO
!
logging alarm informational
ipv6 router ospf 10
router-id 4.4.4.4
log-adjacency-changes
!
使用show命令查看状态信息
R1#sh ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
4.4.4.4 1 FULL/ - 00:00:36 17 Serial1/0.3
3.3.3.3 1 FULL/ - 00:00:37 16 Serial1/0.2
2.2.2.2 1 FULL/ - 00:00:31 16 Serial1/0.1
R1#sh ipv6 ospf interface serial 1/0.1
Serial1/0.1 is up, line protocol is up
Link Local Address FE80::C800:84FF:FE6C:0, Interface ID 16
Area 0, Process ID 10, Instance ID 0, Router ID 1.1.1.1
Network Type POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:02
Index 1/2/2, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 2
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 2.2.2.2
Suppress hello for 0 neighbor(s)
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
O 2001:DB:1::/64 [110/65]
via FE80::C800:84FF:FE6C:0, Serial1/0.1
O 2001:DB:2::/64 [110/129]
via FE80::C800:84FF:FE6C:0, Serial1/0.1
O 2001:DB:3::/64 [110/129]
via FE80::C800:84FF:FE6C:0, Serial1/0.1
C 2001:DB:4::/64 [0/0]
via ::, Loopback0
L 2001:DB:4::1/128 [0/0]
via ::, Loopback0
O 2001:DB2:1::/64 [110/128]
via FE80::C800:84FF:FE6C:0, Serial1/0.1
O 2001:DB2:2::/64 [110/128]
via FE80::C800:84FF:FE6C:0, Serial1/0.1
C 2001:DB2:3::/64 [0/0]
via ::, Serial1/0.1
L 2001:DB2:3::2/128 [0/0]
via ::, Serial1/0.1
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
3.1.9.2 OSPFv3 point-to-multipoint环境下配置
本实验拓扑图,如下图所示:
在本配置本实验之前需要注意以下几点:
1、在配置帧中继链路时,需要使用命令:
frame-relay map ipv6 ipv6-address dlci broadcast
这里ipv6-address是对端接口的本地链路地址。
2、在配置OSPF时,需要在接口下配置OSPF的网络类型
ipv6 ospf network point-to-multipoint
3、在此环境下可以指定邻居,也可以不指定邻居
ipv6 ospf neighbor ipv6-address
具体配置如下:
路由器R1配置
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex half
ipv6 address 2001:DB:1::1/64
ipv6 ospf 10 area 10
!
interface Serial1/0
no ip address
encapsulation frame-relay
ipv6 enable
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/0.10 multipoint
ipv6 address 2001:DB2:1::1/64
ipv6 ospf network point-to-multipoint
ipv6 ospf 10 area 0
frame-relay map ipv6 FE80::C800:4CFF:FE78:0 100 broadcast
frame-relay map ipv6 FE80::C800:80FF:FED4:0 110 broadcast
frame-relay map ipv6 FE80::C800:80FF:FE70:0 120 broadcast
!
logging alarm informational
ipv6 router ospf 10
router-id 1.1.1.1
log-adjacency-changes
路由器R2配置
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex half
ipv6 address 2001:DB:2::1/64
ipv6 ospf 10 area 20
!
interface Serial1/0
no ip address
encapsulation frame-relay
ipv6 enable
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/0.10 multipoint
ipv6 address 2001:DB2:1::2/64
ipv6 ospf network point-to-multipoint
ipv6 ospf 10 area 0
frame-relay map ipv6 FE80::C800:80FF:FED4:0 210 broadcast
frame-relay map ipv6 FE80::C800:80FF:FE70:0 220 broadcast
frame-relay map ipv6 FE80::C800:84FF:FE6C:0 200 broadcast
!
logging alarm informational
ipv6 router ospf 10
router-id 2.2.2.2
log-adjacency-changes
路由器R3配置
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex half
ipv6 address 2001:DB:3::1/64
ipv6 ospf 10 area 30
!
interface Serial1/0
no ip address
encapsulation frame-relay
ipv6 enable
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/0.10 multipoint
ipv6 address 2001:DB2:1::3/64
ipv6 ospf network point-to-multipoint
ipv6 ospf 10 area 0
frame-relay map ipv6 FE80::C800:4CFF:FE78:0 310 broadcast
frame-relay map ipv6 FE80::C800:80FF:FE70:0 320 broadcast
frame-relay map ipv6 FE80::C800:84FF:FE6C:0 300 broadcast
!
logging alarm informational
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:DB:4::1/64
ipv6 ospf 10 area 40
!
interface Serial1/0
no ip address
encapsulation frame-relay
ipv6 enable
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/0.10 multipoint
ipv6 address 2001:DB2:1::4/64
ipv6 ospf network point-to-multipoint
ipv6 ospf 10 area 0
frame-relay map ipv6 FE80::C800:4CFF:FE78:0 410 broadcast
frame-relay map ipv6 FE80::C800:80FF:FED4:0 420 broadcast
frame-relay map ipv6 FE80::C800:84FF:FE6C:0 400 broadcast
!
logging alarm informational
ipv6 router ospf 10
router-id 4.4.4.4
log-adjacency-changes
使用show命令查看状态信息,如下所示:
R1#sh ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
4.4.4.4 1 FULL/ - 00:01:33 18 Serial1/0.10
3.3.3.3 1 FULL/ - 00:01:43 17 Serial1/0.10
2.2.2.2 1 FULL/ - 00:01:44 17 Serial1/0.10
R1#sh ipv6 route
IPv6 Routing Table - 12 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:DB:1::/64 [0/0]
via ::, FastEthernet0/0
L 2001:DB:1::1/128 [0/0]
via ::, FastEthernet0/0
OI 2001:DB:2::/64 [110/65]
via FE80::C800:4CFF:FE78:0, Serial1/0.10
OI 2001:DB:3::/64 [110/65]
via FE80::C800:80FF:FED4:0, Serial1/0.10
OI 2001:DB:4::1/128 [110/64]
via FE80::C800:80FF:FE70:0, Serial1/0.10
C 2001:DB2:1::/64 [0/0]
via ::, Serial1/0.10
L 2001:DB2:1::1/128 [0/0]
via ::, Serial1/0.10
O 2001:DB2:1::2/128 [110/64]
via FE80::C800:4CFF:FE78:0, Serial1/0.10
O 2001:DB2:1::3/128 [110/64]
via FE80::C800:80FF:FED4:0, Serial1/0.10
O 2001:DB2:1::4/128 [110/64]
via FE80::C800:80FF:FE70:0, Serial1/0.10
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
R1#sh ipv6 ospf interface serial 1/0.10
Serial1/0.10 is up, line protocol is up
Link Local Address FE80::C800:84FF:FE6C:0, Interface ID 19
Area 0, Process ID 10, Instance ID 0, Router ID 1.1.1.1
Network Type POINT_TO_MULTIPOINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:17
Index 1/1/2, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 3
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 3, Adjacent neighbor count is 3
Adjacent with neighbor 4.4.4.4
Adjacent with neighbor 3.3.3.3
Adjacent with neighbor 2.2.2.2
Suppress hello for 0 neighbor(s)
3.1.9.3 OSPFv3 point-to-multipoint non-broadcast环境下配置
本实验拓扑图,如下图所示:
在本配置本实验之前需要注意以下几点:
1、在配置帧中继链路时,需要使用命令:
frame-relay map ipv6 ipv6-address dlci broadcast
——这里ipv6-address是对端接口的本地链路地址。
2、在配置OSPF时,需要在接口下配置OSPF的网络类型
ipv6 ospf network point-to-multipoint non-broadcast
3、在此环境下可以指定邻居,也可以不指定邻居
ipv6 ospf neighbor ipv6-address
——这里ipv6-address是对端接口的本地链路地址。
具体配置如下:
路由器R1配置
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex half
ipv6 address 2001:DB:1::1/64
ipv6 ospf 10 area 10
!
interface Serial1/0
no ip address
encapsulation frame-relay
ipv6 enable
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/0.10 multipoint
ipv6 address 2001:DB2:1::1/64
ipv6 ospf network point-to-multipoint non-broadcast
ipv6 ospf neighbor FE80::C800:80FF:FED4:0
ipv6 ospf neighbor FE80::C800:4CFF:FE78:0
ipv6 ospf neighbor FE80::C800:80FF:FE70:0
ipv6 ospf 10 area 0
frame-relay map ipv6 FE80::C800:4CFF:FE78:0 100 broadcast
frame-relay map ipv6 FE80::C800:80FF:FED4:0 110 broadcast
frame-relay map ipv6 FE80::C800:80FF:FE70:0 120 broadcast
!
logging alarm informational
ipv6 router ospf 10
router-id 1.1.1.1
log-adjacency-changes
路由器R2配置
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex half
ipv6 address 2001:DB:2::1/64
ipv6 ospf 10 area 20
!
interface Serial1/0
no ip address
encapsulation frame-relay
ipv6 enable
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/0.10 multipoint
ipv6 address 2001:DB2:1::2/64
ipv6 ospf network point-to-multipoint non-broadcast
ipv6 ospf 10 area 0
frame-relay map ipv6 FE80::C800:80FF:FED4:0 210 broadcast
frame-relay map ipv6 FE80::C800:80FF:FE70:0 220 broadcast
frame-relay map ipv6 FE80::C800:84FF:FE6C:0 200 broadcast
!
logging alarm informational
ipv6 router ospf 10
router-id 2.2.2.2
log-adjacency-changes
路由器R3配置
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex half
ipv6 address 2001:DB:3::1/64
ipv6 ospf 10 area 30
!
interface Serial1/0
no ip address
encapsulation frame-relay
ipv6 enable
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/0.10 multipoint
ipv6 address 2001:DB2:1::3/64
ipv6 ospf network point-to-multipoint non-broadcast
ipv6 ospf 10 area 0
frame-relay map ipv6 FE80::C800:4CFF:FE78:0 310 broadcast
frame-relay map ipv6 FE80::C800:80FF:FE70:0 320 broadcast
frame-relay map ipv6 FE80::C800:84FF:FE6C:0 300 broadcast
!
logging alarm informational
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:DB:4::1/64
ipv6 ospf 10 area 40
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
no ip address
encapsulation frame-relay
ipv6 enable
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial1/0.10 multipoint
ipv6 address 2001:DB2:1::4/64
ipv6 ospf network point-to-multipoint non-broadcast
ipv6 ospf 10 area 0
frame-relay map ipv6 FE80::C800:4CFF:FE78:0 410 broadcast
frame-relay map ipv6 FE80::C800:80FF:FED4:0 420 broadcast
frame-relay map ipv6 FE80::C800:84FF:FE6C:0 400 broadcast
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
no dce-terminal-timing-enable
!
logging alarm informational
ipv6 router ospf 10
router-id 4.4.4.4
log-adjacency-changes
使用show命令查看状态信息
R1#sh ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
3.3.3.3 1 FULL/ - 00:01:49 17 Serial1/0.10
2.2.2.2 1 FULL/ - 00:01:49 17 Serial1/0.10
4.4.4.4 1 FULL/ - 00:01:49 18 Serial1/0.10
R2#sh ipv6 ospf interface s1/0.10
Serial1/0.10 is up, line protocol is up
Link Local Address FE80::C800:4CFF:FE78:0, Interface ID 17
Area 0, Process ID 10, Instance ID 0, Router ID 2.2.2.2
Network Type POINT_TO_MULTIPOINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:26
Index 1/1/1, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 3
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 1.1.1.1
Suppress hello for 0 neighbor(s)
R4#sh ipv6 route
IPv6 Routing Table - 12 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 2001:DB:1::/64 [110/65]
via FE80::C800:84FF:FE6C:0, Serial1/0.10
OI 2001:DB:2::/64 [110/129]
via FE80::C800:84FF:FE6C:0, Serial1/0.10
OI 2001:DB:3::/64 [110/129]
via FE80::C800:84FF:FE6C:0, Serial1/0.10
C 2001:DB:4::/64 [0/0]
via ::, Loopback0
L 2001:DB:4::1/128 [0/0]
via ::, Loopback0
C 2001:DB2:1::/64 [0/0]
via ::, Serial1/0.10
O 2001:DB2:1::1/128 [110/64]
via FE80::C800:84FF:FE6C:0, Serial1/0.10
O 2001:DB2:1::2/128 [110/128]
via FE80::C800:84FF:FE6C:0, Serial1/0.10
O 2001:DB2:1::3/128 [110/128]
via FE80::C800:84FF:FE6C:0, Serial1/0.10
L 2001:DB2:1::4/128 [0/0]
via ::, Serial1/0.10
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0