OSPF的LSA类型 ——连载一路由器LSA
生活随笔
收集整理的這篇文章主要介紹了
OSPF的LSA类型 ——连载一路由器LSA
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
OSPF的LSA類型 ——連載一路由器LSA<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
? ??????深入了解OSPF的LSA會對以后的網(wǎng)絡(luò)故障排錯有很大幫助,這里只介紹常見的LSA集中類型。
?
?? ? 每個LSA類型頭部中都有3個字段來唯一的標(biāo)識一個LSA:類型、鏈路狀態(tài)ID、通告路由器。其中還包括其他3個字段來唯一地識別一個LSA的最新實(shí)例:老化時間、序列號、校驗(yàn)和。?
- 老化時間(Age):是指自從發(fā)出LSA后所經(jīng)歷的時間,以秒為單位。不管是LSA駐留在鏈路狀態(tài)數(shù)據(jù)庫內(nèi),或是在從每一個路由器接口轉(zhuǎn)發(fā)出時,老化時間都會增加。
- 序列號(Sequence Number):當(dāng)LSA有新的報文產(chǎn)生時,這個序列號就會加1。路由器通過比對序列號來識別最新的LSA報文信息。序列號越大即越新。
- 校驗(yàn)和(Checksum):這是一個除了Age字段之外,關(guān)于LSA的全部信息的校驗(yàn)和。因?yàn)槿绻?/span>Age字段,那么這個校驗(yàn)和將會隨著老化時間的增大而每次都需要進(jìn)行重新計(jì)算。
- 類型(Type):即LSA類型。1.路由器LSA ?2.網(wǎng)絡(luò)LSA ?3.網(wǎng)絡(luò)匯總LSA ?4.ASBR匯總LSA ?5.AS外部LSA ?7.NSSA外部LSA
- 鏈路狀態(tài)ID(Link State ID):用來指定LSA所描述的部分OSPF域。根據(jù)LSA類型的不同該字段也會有所不同。
- 通告路由器(Advertising Router):是指始發(fā)LSA的路由器的ID。
?
學(xué)習(xí)LSA類型時,要注意每個LSA的3個特點(diǎn),即;LSA的傳播范圍、LSA由誰通告、LSA包含的內(nèi)容。以下對每類LSA進(jìn)行闡述。?
圖1: <?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /> 實(shí)驗(yàn)基本配置: ================================= R4#sh run ! interface Serial1/1 ?ip address 24.1.1.4 255.255.255.0 ?serial restart-delay 0 ! router ospf 110 ?router-id <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />4.4.4.4 ?log-adjacency-changes ?network 24.1.1.4 0.0.0.0 area 1?
================================= R2#sh run ! interface Ethernet0/0 ?ip address 12.1.1.2 255.255.255.0 ?half-duplex !???????? interface Serial1/1 ?ip address 24.1.1.2 255.255.255.0 ?serial restart-delay 0 ! router ospf 110 ?router-id 2.2.2.2 ?log-adjacency-changes ?network 12.1.1.2 0.0.0.0 area 0 ?network 24.1.1.2 0.0.0.0 area 1?
================================ R1#sh run interface Ethernet0/0 ?ip address 12.1.1.1 255.255.255.0 ?half-duplex ! interface Serial1/0 ?ip address 13.1.1.1 255.255.255.0 ?serial restart-delay 0 ?no fair-queue ! router ospf 110 ?router-id 1.1.1.1 ?log-adjacency-changes ?network 12.1.1.1 0.0.0.0 area 0 ?network 13.1.1.1 0.0.0.0 area 0?
================================ R3#sh run ! interface Serial1/0 ?ip address 13.1.1.3 255.255.255.0 ?serial restart-delay 0 ?no fair-queue !???????? interface Serial1/1 ?ip address 35.1.1.3 255.255.255.0 ?serial restart-delay 0 ! router ospf 110 ?router-id 3.3.3.3 ?log-adjacency-changes ?network 13.1.1.3 0.0.0.0 area 0 ?network 35.1.1.3 0.0.0.0 area 2?
================================= R5#sh run ! interface Loopback0 ?ip address 172.16.1.5 255.255.255.0 ! interface Serial1/1 ?ip address 35.1.1.5 255.255.255.0 ?serial restart-delay 0 ! router ospf 110 ?router-id 5.5.5.5 ?log-adjacency-changes ?network 35.1.1.5 0.0.0.0 area 2 ?? ! ?? router rip network 172.16.0.0 ?? ! ?? ==================================?
1類?? ??路由器LSA?? ? ? ? ?路由器LSA是由每一臺路由器產(chǎn)生,且只在本區(qū)域內(nèi)傳遞,不會穿越ABR。它列出了一臺路由器的鏈路或接口包含本路由器的直連鄰居,同時也列出這些接口的狀態(tài)和每條鏈路信息。
?
?? ? ? ? ?LSA傳播范圍:本域內(nèi)傳遞,不穿越ABR(邊界路由器) ?? ? ? ? ?LSA通告路由器:本路由器的Router ID ?? ? ? ? ?LSA鏈路狀態(tài)ID:本路由器的Router ID ?? ? ? ? ?LSA包含的內(nèi)容:本路由器的直連鄰居,以及直連接口的信息?
?? ? ? ? ?show ip ospf database router ? 查看LSDB中的1類LSA的詳細(xì)信息?
在該命令顯示下,我們可以看到三種信息,分別是“Another neighbor”,“stub network”,“transit network” ??
R4# show ip ospf database router ??//查看area 1區(qū)域中1類LSA的詳細(xì)信息,因?yàn)?/span>1類LSA的特性,將在本區(qū)域內(nèi)傳遞不穿越ABR(圖1中,R2即為ABR) ??????????????????? ???????????????????????????????????? 顯示包含的內(nèi)容包括本路由器直連鄰居,端口信息。?
??????????? OSPF Router with ID (4.4.4.4) (Process ID 110)?
??????????????? Router Link States (Area 1)?
? Routing Bit Set on this LSA ? LS age: 1724?????????????????????? //老化時間 ? Options: (No TOS-capability, DC) ? LS Type: Router Links????????????? //1類路由LSA ? Link State ID: 2.2.2.2????????????? //R2的鏈路狀態(tài)ID,以這臺路由器的Router ID顯示 ? Advertising Router: 2.2.2.2??????? //R2的通告路由器,以這臺路由器的Router ID顯示 ? LS Seq Number: 80000003??????? //序列號,每次更新即加1 ? Checksum: 0x66E4 ? Length: 48 ? Area Border Router??????????????? //表明在該區(qū)域中的身份,ABR ? Number of Links: 2??????????????? //area 1中存在2條鏈路信息?
??? Link connected to: another Router (point-to-point) ???? (Link ID) Neighboring Router ID: 4.4.4.4 ???? (Link Data) Router Interface address: 24.1.1.2 ????? Number of TOS metrics: 0 ?????? TOS 0 Metrics: 64???????????? // Metrics=64,說明這條鏈路是串行鏈路?
??? Link connected to: a Stub Network ???? (Link ID) Network/subnet number: 24.1.1.0 ???? (Link Data) Network Mask: 255.255.255.0 ????? Number of TOS metrics: 0 ?????? TOS 0 Metrics: 64?
?
? LS age: 1799 ? Options: (No TOS-capability, DC) ? LS Type: Router Links ? Link State ID: 4.4.4.4 ? Advertising Router: 4.4.4.4 ? LS Seq Number: 80000005 ? Checksum: 0x9EA1 ? Length: 48 ? Number of Links: 2?
??? Link connected to: another Router (point-to-point) ???? (Link ID) Neighboring Router ID: 2.2.2.2 ???? (Link Data) Router Interface address: 24.1.1.4 ????? Number of TOS metrics: 0 ?????? TOS 0 Metrics: 64?
??? Link connected to: a Stub Network ???? (Link ID) Network/subnet number: 24.1.1.0 ???? (Link Data) Network Mask: 255.255.255.0 ????? Number of TOS metrics: 0 ?????? TOS 0 Metrics: 64?
“show ip ospf database router” 命令還可以這樣用, R4# show ip ospf database router 2.2.2.2??? //只顯示本區(qū)域中指定通告ID的1類LSA信息轉(zhuǎn)載于:https://blog.51cto.com/laogebo/99920
總結(jié)
以上是生活随笔為你收集整理的OSPF的LSA类型 ——连载一路由器LSA的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2008!新的开始!
- 下一篇: 微软奇迹之旅-----天津站