SCTP HEARTBEAT ACK报文格式
SCTP端点在收到对端点发来的HEARTBEAT数据块后,则发送HEARTBEAT ACK数据块作为响应。
HEARTBEAT ACK数据块总是向包含HEARTBEAT数据块的IP数据报中的起源IP地址发送,来作为对该HEARTBEAT数据块的响应。
SCTP可以看作OSI层次结构中的传输层,它的上层作为SCTP用户应用,下层为分组网络IP层。
一、SCTP HEARTBEAT ACK数据块格式
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
+-------------------------------+-------------------------------+ ---
| Source Port Number | Destination Port Number | ^
+-------------------------------+-------------------------------+ |
| Verification Tag | Common Header
+---------------------------------------------------------------+ |
| Checksum | V
+---------------+---------------+-------------------------------+ ---
| Type = 5 | Chunk Flags | Heartbeat Ack Length |
+---------------+---------------+-------------------------------+
| |
| Heartbeat Information TLV (Variable-Length) |
| |
+---------------------------------------------------------------+
二、SCTP HEARTBEAT ACK数据块格式解释
字段 | 长度 | 描述 |
---|---|---|
Source Port Number | 16比特 | 源端口号,识别SCTP发送端点的SCTP端口号。接收方可以使用源端口号、源IP地址、目的端口号和目的IP地址标识该SCTP分组所属的偶联。 |
Destination Port Number | 16比特 | 目的端口号,为目的端点的SCTP端口号。接收主机可以使用目的端口号将SCTP分组复用到正确的端点或应用中。 |
Verification Tag | 32比特 |
验证标签是偶联建立时,本端端点为这个偶联生成一个随机标识。偶联建立过程中,双方会交换这个TAG,到了数据传递时,发送端必须在公共分组头中带上对端的这个TAG,以备校验。
|
Checksum | 32比特 | SCTP通过对用户数据使用ADLER-32算法,计算出一个32位的校验码,带在数据报中,在接收端进行同样的运算,通过检查校验码是否相等来验证用户数据是否遭到破坏。 |
Type | 8比特 | Type = 5:Heartbeat证实(HEARTBEAT ACK) |
Chunk Flags | 8比特 | 块标志位,在发送方设置为全0,并在接收方忽略。 |
Heartbeat Ack Length | 16比特 | 设置为数据块长度的字节数,包括数据块头和HEARTBEAT信息字段。 |
Heartbeat Information TLV | 变长 | HEABTBEAT信息,该字段的内容应当把HEARTBEAT请求数据块中的HEARTBEAT信息参数作为回送的响应,该参数字段包含一个可变长度的非透明的数据结构。 |
三、SCTP HEARTBEAT ACK消息报文示例
Frame 1: 74 bytes on wire (592 bits), 74 bytes captured (592 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Mar 29, 2012 14:59:20.234516000
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1333004360.234516000 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: 74 bytes (592 bits)
Capture Length: 74 bytes (592 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ip:sctp]
Ethernet II, Src: 00:18:82:88:76:68 (00:18:82:88:76:68), Dst: 28:6e:d4:bb:b8:5c (28:6e:d4:bb:b8:5c)
Destination: 28:6e:d4:bb:b8:5c (28:6e:d4:bb:b8:5c)
Address: 28:6e:d4:bb:b8:5c (28:6e:d4:bb:b8:5c)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: 00:18:82:88:76:68 (00:18:82:88:76:68)
Address: 00:18:82:88:76:68 (00:18:82:88:76:68)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 10.11.0.65 (10.11.0.65), Dst: 10.6.9.2 (10.6.9.2)
Version: 4
Header Length: 20 bytes
Differentiated Services Field: 0xe0 (DSCP 0x38: Class Selector 7; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
1110 00.. = Differentiated Services Codepoint: Class Selector 7 (0x38)
.... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
Total Length: 60
Identification: 0x3076 (12406)
Flags: 0x00
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 64
Protocol: SCTP (132)
Header checksum: 0xbc93 [validation disabled]
[Good: False]
[Bad: False]
Source: 10.11.0.65 (10.11.0.65)
Destination: 10.6.9.2 (10.6.9.2)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Stream Control Transmission Protocol, Src Port: m3ua (2905), Dst Port: m3ua (2905)
Source port: 2905
Destination port: 2905
Verification tag: 0x2aaf9bf7
[Assocation index: 0]
Checksum: 0xd9bc8e79 (not verified)
HEARTBEAT_ACK chunk (Information: 24 bytes)
Chunk type: HEARTBEAT_ACK (5)
0... .... = Bit: Stop processing of the packet
.0.. .... = Bit: Do not report
Chunk flags: 0x00
Chunk length: 28
Heartbeat info parameter (Information: 20 bytes)
Parameter type: Heartbeat info (0x0001)
0... .... .... .... = Bit: Stop processing of chunk
.0.. .... .... .... = Bit: Do not report
Parameter length: 24
Heartbeat information: 0000000c000000022be18fc000010008ce0b0041
发表评论