開放最短路徑優先(OSPF)協定將其鏈路狀態通告(LSA)儲存在OSPF資料庫中。本文檔介紹Cisco IOS®軟體如何處理重疊的OSPF外部(型別5)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 |
初始版本 |