SCTP COOKIE ECHO报文格式
SCTP COOKIE ECHO数据块只在启动偶联时使用,它由偶联的发起者发送到对端点,用来完成启动过程。这个数据块必须在该偶联上发送的DATA数据块前发送,但可以同其他的DATA数据块捆绑到同一个SCTP分组中。
一、 SCTP COOKIE ECHO数据块格式
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 = 10 | Chunk Flags | Length |
+---------------+---------------+-------------------------------+
/ Cookie /
\ \
+---------------------------------------------------------------+
二、 SCTP COOKIE ECHO数据块格式解释
字段 | 长度 | 描述 |
---|---|---|
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 = 10:状态Cookie(COOKIE ECHO) |
Chunk Flags | 8比特 | 在发送方设置为全0,在接收方忽略。 |
Length | 16比特 | 设置为该数据块长度的字节数,包括4字节的数据块头和COOKIE的长度。 |
Cookie | 变长 | 该字段必须包含从前一个INIT ACK数据块的状态COOKIE参数中收到的准确的COOKIE,使用COOKIE时应尽可能的小从而保证互操作性。 |
三、SCTP COOKIE ECHO报文示例
Frame 1: 226 bytes on wire (1808 bits), 226 bytes captured (1808 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Aug 18, 2011 16:09:25.808664000
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1313654965.808664000 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: 226 bytes (1808 bits)
Capture Length: 226 bytes (1808 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ip:sctp]
Ethernet II, Src: 00:0f:e2:d5:c5:29 (00:0f:e2:d5:c5:29), Dst: 00:0f:e2:2f:d7:18 (00:0f:e2:2f:d7:18)
Destination: 00:0f:e2:2f:d7:18 (00:0f:e2:2f:d7:18)
Address: 00:0f:e2:2f:d7:18 (00:0f:e2:2f:d7:18)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: 00:0f:e2:d5:c5:29 (00:0f:e2:d5:c5:29)
Address: 00:0f:e2:d5:c5:29 (00:0f:e2:d5:c5:29)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IP (0x0800)
Frame check sequence: 0x23e5ce84 [correct]
[FCS Good: True]
[FCS Bad: False]
Internet Protocol Version 4, Src: 10.21.112.2 (10.21.112.2), Dst: 10.168.168.9 (10.168.168.9)
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: 208
Identification: 0xc72f (50991)
Flags: 0x00
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 63
Protocol: SCTP (132)
Header checksum: 0x2dd1 [validation disabled]
[Good: False]
[Bad: False]
Source: 10.21.112.2 (10.21.112.2)
Destination: 10.168.168.9 (10.168.168.9)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Stream Control Transmission Protocol, Src Port: 3876 (3876), Dst Port: diameter (3868)
Source port: 3876
Destination port: 3868
Verification tag: 0x08313969
[Assocation index: 0]
Checksum: 0x809936cc (not verified)
COOKIE_ECHO chunk (Cookie length: 172 bytes)
Chunk type: COOKIE_ECHO (10)
0... .... = Bit: Stop processing of the packet
.0.. .... = Bit: Do not report
Chunk flags: 0x00
Chunk length: 176
Cookie: 4e4f4b494120534354500800381100003c00000000000000...
发表评论