Ospf LSA 類型:
研究LSA 主要看LSA 的下面3 個方面:
1.
傳播範圍
2.
通告者
3.
內容
Show ip ospf database 可以看見簡略的database 資訊,
Show ip ospf database 後接不通的命令可以看見不同類型LSA 的詳細資訊。
如下圖:
1 類Router LSA
One router LSA (type 1) for every router in an area
Includes list of directly attached links
Each link identified by IP prefix assigned to link and link type
Identified by the router ID of the originating router
Floods within its area only; does not cross ABR
***傳播區域:只能在本區域,及不能通過ABR
***通告者:
每台路由器都可以產生1 類LSA
***內容:含有拓撲信息和直連的路由
R1 # show ip ospf database 可以看見一下簡略資訊
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
11.1.1.1 11.1.1.1 1546 0x80000007 0x00FF34 3
22.2.2.2 22.2.2.2 1530 0x80000008 0x00FF20 3
其中link ID 和ADV Router 都是此LSA 的router id 。
在相同區域內1 類LSA 的內容相同。
R1 # show ip ospf database router 可以看見1 類LSA 的詳細資訊
OSPF Router with ID (11.1.1.1) (Process ID 1)
Router Link States (Area 0)
LS age: 793
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 11.1.1.1
Advertising Router: 11.1.1.1
LS Seq Number: 80000007
Checksum: 0xFF34
Length: 60
Number of Links: 3
Link connected to: a Stub Network
(Link ID) Network/subnet number: 1.1.1.1
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1 (這塊為直連路由信息)
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 22.2.2.2
(Link Data) Router Interface address: 12.1.1.1
Number of TOS metrics: 0
TOS 0 Metrics: 64 (這塊為直連拓撲信息)
Link connected to: a Stub Network
(Link ID) Network/subnet number: 12.1.1.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 64 (這塊為直連路由信息)
詳細LSA 資訊過長省略部分。
2 類Network LSA
One network (type 2) LSA for each transit broadcast or NBMA network
In an area
Includes list of attached routers on the transit link
Includes subnet mask of link
Advertised by the DR of the broadcast network
Floods within its area only; does not cross ABR
***傳播區域:只能在本區域,及不能通過ABR
***通告者:
DR 產生2 類LSA
***內容:在這個MA 網路中附屬的路由器和遮罩。
R # show ip ospf database 可以看見一下簡略資訊
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
192.168.1.3 33.3.3.3 349 0x80000001 0x00D586
其中Link ID 為DR 的藉口位址ADVR 為DR 的
Router ID 。
R # show ip ospf database network 可以看見2 類的詳細資訊
OSPF Router with ID (22.2.2.2) (Process ID 1)
Net Link States (Area 0)
Routing Bit Set on this LSA
LS age: 879
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 192.168.1.3 (address of Designated Router)
Advertising Router: 33.3.3.3 (DR’ router id)
LS Seq Number: 80000001
Checksum: 0xD586
Length: 32
Network Mask: /24
Attached Router: 33.3.3.3 (在MA 網路中的路由器router id )
Attached Router: 22.2.2.2 (在MA 網路中的路由器router id )
3 類summary LSA
Type 3 LSAs are used to flood network information to areas outside the
originating area (interarea)
Describes network number and mask of link.
Advertised by the ABR of originating area.
Regenerated by subsequent ABRs to flood throughout the autonomous system.
By default, routes are not summarized, and type 3 LSA is advertised for every subnet.
***傳播區域:整個OSPF 域
***通告者:
ABR 產生3 類LSA
***內容:傳播域間路由
R # show ip ospf database 信息
Summary Net Link States (Area 2)
Link ID ADV Router Age Seq# Checksum
1.1.1.1 33.3.3.3 1365 0x80000001 0x008844
2.2.2.2 33.3.3.3 1365 0x80000001 0x00D731
3.3.3.3 33.3.3.3 36 0x80000001 0x009F66
12.1.1.0 33.3.3.3 1365 0x80000001 0x00F8CA
192.168.1.0 33.3.3.3 1365 0x80000001 0x006D3A
其中link id 為區域的路由資訊,ADV Router 為ABR的Router
ID。
Router # show ip ospf database summary 信息
Summary Net Link States (Area 1)
Routing Bit Set on this LSA
LS age: 1521
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links (Network)
Link State ID: 2.2.2.2 (summary Network Number)
Advertising Router: 22.2.2.2 (ABR Router’ ID )
LS Seq Number: 80000002
Checksum: 0x44D2
Length: 28
Network Mask: /32
TOS: 0 Metric: 1
Routing Bit Set on this LSA
LS age: 656
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 3.3.3.3 (summary Network Number)
Advertising Router: 22.2.2.2
LS Seq Number: 80000001
Checksum: 0x22F0
Length: 28
Network Mask: /32
TOS: 0 Metric: 2
5 類External LSA
External (type 5) LSAs are used to advertise networks from other
autonomous systems.
Type 5 LSAs are advertised and owned by the originating ASBR.
Type 5 LSAs flood throughout the entire autonomous system.
The advertising router ID (ASBR) is unchanged throughout the autonomous system.
Type 4 LSA is needed to find the ASBR.
By default, routes are not summarized
***傳播區域:整個OSPF 域
***通告者:
ASBR
***內容:域外路由
其中5 類的ADV Router 為ASBR 的Router ID
Link ID 為:域外的路由
4 類Summary LSA
Summary (type 4) LSAs are used to advertise an ASBR to all other areas in
the autonomous system.
They are generated by the ABR of the originating area.
They are regenerated by all subsequent ABRs to flood throughout the
autonomous system.
Type 4 LSAs contain the router ID of the ASBR.
***傳播區域:除過ASBR 在的區域的整個OSPF 域(因為1
類LSA 已經告訴了ASBR 在那)
***通告者:
ABR 及在那個區域就是那個區域的ABR
***內容:找ASBR
其中Link ID 為ASBR 的Router ID
ADV Router 為路由器所在區域的ABR 的Router ID
總結:
其中1 ,3 ,
5 類LSA 為路由信息。
1 類為域內路由 (O) Derive from LSA 1,LSA2
2 類為跨域路由 (OIA) Derive from LSA 3
3 類為外部路由 (OEx) Derive from LSA 5
(If NSSA Area (ONx) derive from LSA7