SCTP HEARTBEAT报文
SCTP端点通过向对端点发送SCTP HEARTBEAT数据块用来检测定义在该偶联上到特定目的地传送地址的可达性。参数字段包含HEARTBEAT信息,它是一个可变长度的非透明数据结构,其信息通常只需要发送方明白即可。
一、SCTP HEARTBEAT报文格式
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 = 4 | Chunk Flags | Heartbeat Length |
+---------------+---------------+-------------------------------+
| Heartbeat Information TLV (Variable-Length) |
+ +
| ... ... |
+---------------------------------------------------------------+
二、SCTP HEARTBEAT报文格式解释
字段 | 长度 | 描述 |
---|---|---|
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=4:Heartbeat请求(HEARTBEAT)。 |
Chunk Flags | 8比特 | 在发送方设置为全0,并在接收方忽略。 |
Heartbeat Length | 16比特 | 设置为数据块长度的字节数,包括数据块头和HEARTBEAT信息字段。 |
HEABTBEAT Information TLV | 变长 | 当该HEARTBEAT数据块发送到目的地传送地址时,发送方特定的HEARTBEAT信息字段通常包括关于发送方当前的时间信息。 |
三、SCTP HEARTBEAT报文示例
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.234214000
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1333004360.234214000 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: 78:1d:ba:43:9c:e2 (78:1d:ba:43:9c:e2), Dst: 00:18:82:88:76:68 (00:18:82:88:76:68)
Destination: 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)
Source: 78:1d:ba:43:9c:e2 (78:1d:ba:43:9c:e2)
Address: 78:1d:ba:43:9c:e2 (78:1d:ba:43:9c:e2)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 10.6.9.2 (10.6.9.2), Dst: 10.11.0.65 (10.11.0.65)
Version: 4
Header Length: 20 bytes
Differentiated Services Field: 0x02 (DSCP 0x00: Default; ECN: 0x02: ECT(0) (ECN-Capable Transport))
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..10 = Explicit Congestion Notification: ECT(0) (ECN-Capable Transport) (0x02)
Total Length: 60
Identification: 0xf48a (62602)
Flags: 0x00
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 254
Protocol: SCTP (132)
Header checksum: 0x3b5c [validation disabled]
[Good: False]
[Bad: False]
Source: 10.6.9.2 (10.6.9.2)
Destination: 10.11.0.65 (10.11.0.65)
[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: 0xe6f68e28
[Assocation index: 0]
Checksum: 0x5282fb7b (not verified)
HEARTBEAT chunk (Information: 24 bytes)
Chunk type: HEARTBEAT (4)
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
发表评论