OSPF LSR报文
两台路由器互相交换过DD报文之后,知道对端的路由器有哪些LSA是本地的LSDB所缺少的和哪些LSA是已经失效的,这时需要发送LSR(Link State Request)报文向对方请求所需的LSA。
OSPF LSR报文的内容包括所需要的LSA的摘要,其中LS type、Link State ID和Advertising Router可以唯一标识出一个LSA,当两个LSA一样时,需要根据LSA中的LS sequence number、LS checksum和LS age来判断出所需要LSA的新旧。
一、OSPF LSR报文格式
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
+---------------+---------------+-------------------------------+
| Version | 3 | Packet length |
+---------------+---------------+-------------------------------+
| Router ID |
+---------------------------------------------------------------+
| Area ID |
+-------------------------------+-------------------------------+
| Checksum | AuType |
+-------------------------------+-------------------------------+
| Authentication |
+---------------------------------------------------------------+
| Authentication |
+---------------------------------------------------------------+
| LS type |
+---------------------------------------------------------------+
| Link State ID |
+---------------------------------------------------------------+
| Advertising Router |
+---------------------------------------------------------------+
| ... |
二、OSPF LSR报文格式解释
字段 |
长度 |
含义 |
---|---|---|
Version |
1字节 |
版本,OSPF的版本号。对于OSPFv2来说,其值为2。 |
Packet length |
2字节 |
OSPF报文的总长度,包括报文头在内,单位为字节。 |
Router ID |
4字节 |
发送该报文的路由器标识。 |
Area ID |
4字节 |
发送该报文的所属区域。 |
Checksum |
2字节 |
校验和,包含除了认证字段的整个报文的校验和。 |
AuType |
2字节 |
验证类型,值有如下几种表示:
|
Authentication |
8字节 |
鉴定字段,其数值根据验证类型而定:
MD5验证数据添加在OSPF报文后面,不包含在Authenticaiton字段中。 |
LS type |
32比特 |
LSA的类型号。 |
Link State ID |
32比特 |
与LSA中的LS Type和Advertising Router一起在路由域中描述一个LSA。 |
Advertising Router |
32比特 |
产生此LSA的路由器的Router ID。 |
三、OSPF LSR报文示例
Frame 1: 106 bytes on wire (848 bits), 106 bytes captured (848 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Mar 24, 2005 14:21:26.067019999
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1111645286.067019999 seconds
[Time delta from previous captured frame: 0.000000000 seconds]
[Time delta from previous displayed frame: 0.000000000 seconds]
[Time since reference or first frame: 0.000000000 seconds]
Frame Number: 1
Frame Length: 106 bytes (848 bits)
Capture Length: 106 bytes (848 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: 00:e0:fc:48:90:4e (00:e0:fc:48:90:4e), Dst: 00:e0:fc:48:07:a0 (00:e0:fc:48:07:a0)
Destination: 00:e0:fc:48:07:a0 (00:e0:fc:48:07:a0)
Address: 00:e0:fc:48:07:a0 (00:e0:fc:48:07:a0)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: 00:e0:fc:48:90:4e (00:e0:fc:48:90:4e)
Address: 00:e0:fc:48:90:4e (00:e0:fc:48:90:4e)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 10.4.4.1 (10.4.4.1), Dst: 10.4.4.2 (10.4.4.2)
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: 92
Identification: 0x0f33 (3891)
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
[Expert Info (Note/Sequence): "Time To Live" only 1]
["Time To Live" only 1]
[Severity level: Note]
[Group: Sequence]
Protocol: OSPF IGP (89)
Header checksum: 0x994c [validation disabled]
[Good: False]
[Bad: False]
Source: 10.4.4.1 (10.4.4.1)
Destination: 10.4.4.2 (10.4.4.2)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Open Shortest Path First
OSPF Header
Version: 2
Message Type: LS Request (3)
Packet Length: 722
Source OSPF Router: 1.1.1.1 (1.1.1.1)
Area ID: 0.0.0.0 (0.0.0.0) (Backbone)
Checksum: 0xd384 [correct]
Auth Type: Null (0)
Auth Data (none): 0000000000000000
Link State Request
LS Type: Summary-LSA (IP network) (3)
Link State ID: 5.5.5.0
Advertising Router: 2.2.2.2 (2.2.2.2)
Link State Request
LS Type: Summary-LSA (IP network) (3)
Link State ID: 3.3.3.3
Advertising Router: 2.2.2.2 (2.2.2.2)
Link State Request
LS Type: Router-LSA (1)
Link State ID: 2.2.2.2
Advertising Router: 2.2.2.2 (2.2.2.2)
Link State Request
LS Type: Summary-LSA (IP network) (3)
Link State ID: 2.2.2.3
Advertising Router: 2.2.2.2 (2.2.2.2)
发表评论