开放最短路径优先(OSPF)协议将其链路状态通告(LSA)存储在OSPF数据库中。本文档介绍Cisco IOS®软件如何处理重叠的OSPF外部(第5类)LSA。
您应该熟悉OSPF LSA,因为OSPF LSA在Cisco路由器的Cisco IOS软件中使用。IP编址的基本知识也很有帮助。
OSPF外部LSA包含从其他路由进程导入到OSPF的信息。这是OSPF外部LSA的输出示例。
R1#sh ip ospf database external 192.168.1.0
OSPF Router with ID (10.0.12.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 924
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.0 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000003
Checksum: 0x29D4
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
在本例中,OSPF使用链路状态ID(与外部网络号相同)来区分不同的外部LSA。
可以使用从不同路由协议导入到OSPF的不同掩码使用相同的网络号。也就是说,两个不同的路由可以具有相同的网络号,但掩码不同。
R1#sh ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
The gateway of last resort is not set.
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
O 10.1.23.0/24 [110/20] via 10.1.12.2, 00:24:06, Ethernet0/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
O E2 192.168.1.0/24 [110/1] via 10.1.12.2, 00:20:57, Ethernet0/0
O E2 192.168.1.0/25 [110/1] via 10.1.12.2, 00:00:11, Ethernet0/0
在本例中,OSPF必须在其数据库中安装两个LSA。为此,OSPF会将下一个收到的LSA安装为其广播号,而不是网络号。
R1#sh ip ospf database external
OSPF Router with ID (10.0.12.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 53
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.0 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000003
Checksum: 0x29D4
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 428
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.127 (External Network Number ) <----Broadcast Number
of 192.168.1.0/25
Advertising Router: 10.1.23.2
LS Seq Number: 80000001
Checksum: 0x35CA
Length: 36
Network Mask: /25
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
在本例中,LSA 192.168.1.0/24被撤消。一旦此LSA丢失,其他LSA(192.168.1.0/25)将不安装其网络号,而安装广播号。
R1#sh ip ospf database external
OSPF Router with ID (10.0.12.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 1066
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.127 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000001
Checksum: 0x35CA
Length: 36
Network Mask: /25
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
在本例中,收到新的LSA(192.168.1.0/26)。
R1#sh ip ospf database external
OSPF Router with ID (10.0.12.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 51
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.0 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000001
Checksum: 0x2DD2
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 7
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.63 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000001
Checksum: 0x39C6
Length: 36
Network Mask: /26
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 1198
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.127 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000001
Checksum: 0x35CA
Length: 36
Network Mask: /25
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
在本例中,LSA 192.168.1.0/24被撤销,并且收到新的LSA(192.168.1.0/26)。新的LSA将取代撤消的LSA,OSPF可以使用其网络号安装新的LSA。
R1#sh ip ospf database external
OSPF Router with ID (10.0.12.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 2
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.0 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000003
Checksum: 0xAD8F
Length: 36
Network Mask: /26
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 1362
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 192.168.1.127 (External Network Number )
Advertising Router: 10.1.23.2
LS Seq Number: 80000001
Checksum: 0x35CA
Length: 36
Network Mask: /25
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 1
Forward Address: 10.1.23.3
External Route Tag: 0
Cisco IOS软件尝试将LSA安装为其网络号。例如,如果网络号已使用不同的掩码安装,则可能无法执行此操作。在这种情况下,Cisco IOS软件将新接收的LSA安装为其广播号,而不是网络号。
版本 | 发布日期 | 备注 |
---|---|---|
1.0 |
11-Nov-2013 |
初始版本 |