Type 1 LSA定義一個OSPF路由器本身,和直接接在他身上的所有"網路物件"的連結.
"網路物件"指的是: (1) OSPF 路由器,和 (2) OSPF 設定中定義的網段.
附圖中可以看得出來,R1接了三個物件: (1) R2, (2)10.12.12.0/24網段, 和 (3) 10.1.1.0/24網段.
不過, 100.100.100.0/24網段,就不在其中之一, 這是因為100.100.100.0/24並沒有在OSPF設定中被宣告, 所以不算!
我們可以用這個命令 show ip ospf database router 0.0.0.1 ,來印出定義R1的Type 1 Router LSA. 其中"0.0.0.1"是 R1的Router ID, 也就是R1的在OSPF協定中,被稱呼的名字.
R1>show ip ospf database router 0.0.0.1
OSPF Router with ID (0.0.0.1) (Process ID 1)
Router Link States (Area 0)
LS age: 1724
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 0.0.0.1
Advertising Router: 0.0.0.1
LS Seq Number: 80000003
Checksum: 0x54DC
Length: 60
AS Boundary Router
Number of Links: 3
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 0.0.0.2
(Link Data) Router Interface address: 10.12.12.1
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.12.12.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.1.1.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 10
R1>
相同的方式,我們也可以列出定義R2的Type 1 Router LSA.我們使用相同的命令 "show ip ospf database router 0.0.0.2"
大家應該有注意到,R2事實上接上了不只三個網路物件.怎麼會只有印出三個? 這是因為OSPF協定的每一個區域(Area)當中,都有自己的連線狀態資料集合(Link State Database). 列出來的這三個,正是含在R1和R2共同連接的零號區域(Area 0)中.
R1>show ip ospf database router 0.0.0.2
OSPF Router with ID (0.0.0.1) (Process ID 1)
Router Link States (Area 0)
Routing Bit Set on this LSA
LS age: 1508
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 0.0.0.2
Advertising Router: 0.0.0.2
LS Seq Number: 80000004
Checksum: 0x84A8
Length: 60
Area Border Router
Number of Links: 3
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 0.0.0.1
(Link Data) Router Interface address: 10.12.12.2
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.12.12.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 64
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.2.2.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 10
R1>
(待續)