OSPF LSU报文(二)
OSPF LSU(Link State Update)报文用来向对端路由器发送其所需要的LSA或者泛洪自己更新的LSA,内容是多条LSA(全部内容)的集合。
七、OSPF Network-LSA格式
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-------------------------------+---------------+---------------+
| LS age | Options | 2 |
+-------------------------------+---------------+---------------+
| Link State ID |
+---------------------------------------------------------------+
| Advertising Router |
+---------------------------------------------------------------+
| LS sequence number |
+-------------------------------+-------------------------------+
| LS checksum | length |
+-------------------------------+-------------------------------+
| Network Mask |
+---------------------------------------------------------------+
| Attached Router |
+---------------------------------------------------------------+
| ... |
八、OSPF Network-LSA格式解释
字段 |
长度 |
含义 |
---|---|---|
Link State ID |
32比特 |
DR的接口IP地址。 |
Network Mask |
32比特 |
该广播网或NBMA网络地址的掩码。 |
Attached Router |
32比特 |
连接在同一个网络上的所有路由器的Router ID,也包括DR的Router ID。 |
九、OSPF Summary-LSA格式
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-------------------------------+---------------+---------------+
| LS age | Options | 3 or 4 |
+-------------------------------+---------------+---------------+
| Link State ID |
+---------------------------------------------------------------+
| Advertising Router |
+---------------------------------------------------------------+
| LS sequence number |
+-------------------------------+-------------------------------+
| LS checksum | length |
+-------------------------------+-------------------------------+
| Network Mask |
+---------------+-----------------------------------------------+
| 0 | metric |
+---------------+-----------------------------------------------+
| TOS | TOS metric |
+---------------+-----------------------------------------------+
| ... |
十、OSPF Summary-LSA格式解释
字段 |
长度 |
含义 |
---|---|---|
Link State ID |
32比特 |
通告的网络地址。如果是ASBR Summary LSA,此字段表示ASBR的Router ID。 |
Network Mask |
32比特 |
该广播网或NBMA网络地址的掩码。如果是ASBR Summary LSA,此字段无意义,设置为0.0.0.0。 |
metric |
24比特 |
到目的地址的路由开销。 |
TOS |
8比特 |
服务类型。 |
TOS metric |
24比特 |
和指定TOS值相关联的度量。 |
十一、OSPF AS-External-LSA格式
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-------------------------------+---------------+---------------+
| LS age | Options | 5 |
+-------------------------------+---------------+---------------+
| Link State ID |
+---------------------------------------------------------------+
| Advertising Router |
+---------------------------------------------------------------+
| LS sequence number |
+-------------------------------+-------------------------------+
| LS checksum | length |
+-------------------------------+-------------------------------+
| Network Mask |
+-+-------------+-----------------------------------------------+
|E| 0 | metric |
+-+-------------+-----------------------------------------------+
| Forwarding address |
+---------------------------------------------------------------+
| External Route Tag |
+-+-------------+-----------------------------------------------+
|E| TOS | TOS metric |
+-+-------------+-----------------------------------------------+
| Forwarding address |
+---------------------------------------------------------------+
| External Route Tag |
+---------------------------------------------------------------+
| ... |
十二、OSPF AS-External-LSA格式解释
字段 |
长度 |
含义 |
---|---|---|
Link State ID |
32比特 |
通告的网络地址。 |
Network Mask |
32比特 |
通告的目的地址的掩码。 |
E |
1比特 |
外部度量值类型:
|
metric |
24比特 |
到目的地址的路由开销。 |
Forwarding Address |
32比特 |
到所通告的目的地址的报文将被转发到这个地址。 |
External Route Tag |
32比特 |
添加到外部路由上的标记。OSPF本身并不使用这个字段,它可以用来对外部路由进行管理。 |
TOS |
8比特 |
服务类型。 |
TOS metric |
24比特 |
TOS附加距离信息。 |
十三、OSPF LSU报文(Router-LSA)示例
Frame 53659: 98 bytes on wire (784 bits), 98 bytes captured (784 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Jul 22, 2014 18:12:26.676140000
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1406023946.676140000 seconds
[Time delta from previous captured frame: 2.949733000 seconds]
[Time delta from previous displayed frame: 2.949733000 seconds]
[Time since reference or first frame: 3888366.048799000 seconds]
Frame Number: 53659
Frame Length: 98 bytes (784 bits)
Capture Length: 98 bytes (784 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ip:ospf]
[Coloring Rule Name: OSPF State Change]
[Coloring Rule String: ospf.msg != 1]
Ethernet II, Src: Novell_40:64:00 (1b:00:00:40:64:00), Dst: 00:0b:05:00:ff:ff (00:0b:05:00:ff:ff)
Destination: 00:0b:05:00:ff:ff (00:0b:05:00:ff:ff)
Address: 00:0b:05:00:ff:ff (00:0b:05:00:ff:ff)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: Novell_40:64:00 (1b:00:00:40:64:00)
[Expert Info (Warn/Protocol): Source MAC must not be a group address: IEEE 802.3-2002, Section 3.2.3(b)]
[Source MAC must not be a group address: IEEE 802.3-2002, Section 3.2.3(b)]
[Severity level: Warn]
[Group: Protocol]
Address: Novell_40:64:00 (1b:00:00:40:64:00)
.... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 10.41.11.3 (10.41.11.3), Dst: 224.0.0.6 (224.0.0.6)
Version: 4
Header Length: 20 bytes
Differentiated Services Field: 0xc0 (DSCP 0x30: Class Selector 6; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
1100 00.. = Differentiated Services Codepoint: Class Selector 6 (0x30)
.... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
Total Length: 84
Identification: 0x283c (10300)
Flags: 0x00
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 1
Protocol: OSPF IGP (89)
Header checksum: 0x9b23 [validation disabled]
[Good: False]
[Bad: False]
Source: 10.41.11.3 (10.41.11.3)
Destination: 224.0.0.6 (224.0.0.6)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Open Shortest Path First
OSPF Header
Version: 2
Message Type: LS Update (4)
Packet Length: 64
Source OSPF Router: 10.41.2.2 (10.41.2.2)
Area ID: 0.0.0.0 (0.0.0.0) (Backbone)
Checksum: 0x6f07 [correct]
Auth Type: Null (0)
Auth Data (none): 0000000000000000
LS Update Packet
Number of LSAs: 1
Router-LSA
.000 0000 0000 0001 = LS Age (seconds): 1
0... .... .... .... = Do Not Age Flag: 0
Options: 0x02 (E)
0... .... = DN: Not set
.0.. .... = O: Not set
..0. .... = DC: Demand Circuits are NOT supported
...0 .... = L: The packet does NOT contain LLS data block
.... 0... = NP: NSSA is NOT supported
.... .0.. = MC: NOT Multicast Capable
.... ..1. = E: External Routing Capability
.... ...0 = MT: NO Multi-Topology Routing
LS Type: Router-LSA (1)
Link State ID: 10.41.2.2 (10.41.2.2)
Advertising Router: 10.41.2.2 (10.41.2.2)
Sequence Number: 0x8000000d
Checksum: 0x9da5
Length: 36
Flags: 0x00
.... .0.. = V: NO Virtual link endpoint
.... ..0. = E: NO AS boundary router
.... ...0 = B: NO Area border router
Number of Links: 1
Type: Transit ID: 10.41.11.2 Data: 10.41.11.3 Metric: 1
Link ID: 10.41.11.2 (10.41.11.2) - IP address of Designated Router
Link Data: 10.41.11.3 (10.41.11.3)
Link Type: 2 - Connection to a transit network
Number of Metrics: 0 - TOS
0 Metric: 1
十四、OSPF LSU报文协议栈结构
OSPF LSU报文直接用IP报文封装,协议号为89。
LSU报文在支持组播和广播的链路上是以组播形式将LSA泛洪出去。为了实现Flooding的可靠性传输,需要LSAck报文对其进行确认。对没有收到确认报文的LSA进行重传,重传的LSA是直接发送到邻居的。
+-------------------------------------+
| OSPF |
+-------------------------------------+
| IPv4 Header |
+-------------------------------------+
| L2 |
+-------------------------------------+
| L1 |
+-------------------------------------+
发表评论