我在建立SCTP连接时遇到问题,我给出了一些代码视图。
SctpChannel.open(address,1,0)
)中,我可以看到INIT客户端和来自ABORT
的{{1}}。我不知道为什么我要堕胎
消息,但至少DRA
在那里发送了一些消息
也是一个问题ipv 4参数丢失我以为
可能是问题所在。当我尝试添加ipv4参数DRA(dynamic agent)
),我看到DRA仅从客户端发送了SctpChannel.open()
的任何确认,而服务器未响应。能够
你帮我,我不知道我在这里做错了。案例1:
INIT
案例2:
InetSocketAddress address = new InetSocketAddress(peer.host(), peer.port());
channel = SctpChannel.open(address, 1, 0);
getSctpChannel(channel).bind(new InetSocketAddress(peer.srcIP, peer.srcPort));
getSctpChannel(channel).connect(address, 1, 0);
Source: 196.88.167.51 (196.88.167.51)
Destination: 172.21.144.154 (172.21.144.154)
Stream Control Transmission Protocol, Src Port: 3870 (3870), Dst Port: 3870 (3870)
Source port: 3870
Destination port: 3870
Verification tag: 0x00000000
Checksum: 0xe19a390a (not verified)
INIT chunk (Outbound streams: 1, inbound streams: 65535)
Chunk type: INIT (1)
0... .... = Bit: Stop processing of the packet
.0.. .... = Bit: Do not report
Chunk flags: 0x00
Chunk length: 36
Initiate tag: 0x666d316e
Advertised receiver window credit (a_rwnd): 1048576
Number of outbound streams: 1
Number of inbound streams: 65535
Initial TSN: 307208471
Supported address types parameter (Supported types: IPv6, IPv4)
Parameter type: Supported address types (0x000c)
0... .... .... .... = Bit: Stop processing of chunk
.0.. .... .... .... = Bit: Do not report
Parameter length: 8
Supported address type: IPv6 address (6)
Supported address type: IPv4 address (5)
Abort-----
Source: 172.21.144.154 (172.21.144.154)
Destination: 196.88.167.51 (196.88.167.51)
Stream Control Transmission Protocol, Src Port: 3870 (3870), Dst Port: 3870 (3870)
Source port: 3870
Destination port: 3870
Verification tag: 0x666d316e
Checksum: 0x7741b683 (not verified)
ABORT chunk
Chunk type: ABORT (6)
0... .... = Bit: Stop processing of the packet
.0.. .... = Bit: Do not report
Chunk flags: 0x00
.... ...0 = T-Bit: Tag not reflected
Chunk length: 4
注意netstat命令中的一件奇怪的事情
DRA(172.21.144.154)正在使用客户端端口(40482)InetSocketAddress address = new InetSocketAddress(peer.host(), peer.port());
channel = SctpChannel.open();
getSctpChannel(channel).bind(new InetSocketAddress(peer.srcIP, peer.srcPort));
getSctpChannel(channel).connect(address, 1, 0);
10 0.730036000 196.88.167.51 -> 172.21.144.154 SCTP 138 INIT
11 1.079963000 196.88.167.51 -> 172.21.144.154 SCTP 138 INIT
16 1.429995000 196.88.167.51 -> 172.21.144.154 SCTP 138 INIT
17 1.780326000 196.88.167.51 -> 172.21.144.154 SCTP 138 INIT
Source: 196.88.167.51 (196.88.167.51)
Destination: 172.21.144.154 (172.21.144.154)
Stream Control Transmission Protocol, Src Port: 40482 (40482), Dst Port: 3870 (3870)
Source port: **40482**
Destination port: 3870
Verification tag: 0x00000000
Checksum: 0x4aeb01dc (not verified)
INIT chunk (Outbound streams: 1, inbound streams: 65535)
Chunk type: INIT (1)
0... .... = Bit: Stop processing of the packet
.0.. .... = Bit: Do not report
Chunk flags: 0x00
Chunk length: 92
Initiate tag: 0x1cc400d6
Advertised receiver window credit (a_rwnd): 1048576
Number of outbound streams: 1
Number of inbound streams: 65535
Initial TSN: 1777277624
IPv4 address parameter (Address: 8.10.127.196)
Parameter type: IPv4 address (0x0005)
0... .... .... .... = Bit: Stop processing of chunk
.0.. .... .... .... = Bit: Do not report
Parameter length: 8
IP Version 4 address: 8.10.127.196 (8.10.127.196)
IPv4 address parameter (Address: 196.88.167.51)
Parameter type: IPv4 address (0x0005)
0... .... .... .... = Bit: Stop processing of chunk
.0.. .... .... .... = Bit: Do not report
Parameter length: 8
IP Version 4 address: 196.88.167.51 (196.88.167.51)
IPv4 address parameter (Address: 8.10.127.187)
Parameter type: IPv4 address (0x0005)
0... .... .... .... = Bit: Stop processing of chunk
.0.. .... .... .... = Bit: Do not report
Parameter length: 8
IP Version 4 address: 8.10.127.187 (8.10.127.187)
IPv4 address parameter (Address: 8.10.127.187)
Parameter type: IPv4 address (0x0005)
0... .... .... .... = Bit: Stop processing of chunk
.0.. .... .... .... = Bit: Do not report
Parameter length: 8
IP Version 4 address: 8.10.127.187 (8.10.127.187)
IPv4 address parameter (Address: 196.88.167.51)
Parameter type: IPv4 address (0x0005)
0... .... .... .... = Bit: Stop processing of chunk
.0.. .... .... .... = Bit: Do not report
Parameter length: 8
IP Version 4 address: 196.88.167.51 (196.88.167.51)
IPv4 address parameter (Address: 10.104.167.185)
Parameter type: IPv4 address (0x0005)
0... .... .... .... = Bit: Stop processing of chunk
.0.. .... .... .... = Bit: Do not report
Parameter length: 8
IP Version 4 address: 10.128.172.185 (10.128.172.185)
IPv4 address parameter (Address: 10.128.172.185)
Parameter type: IPv4 address (0x0005)
0... .... .... .... = Bit: Stop processing of chunk
.0.. .... .... .... = Bit: Do not report
Parameter length: 8
IP Version 4 address: 10.128.172.49 (10.128.172.49)
Supported address types parameter (Supported types: IPv6, IPv4)
Parameter type: Supported address types (0x000c)
0... .... .... .... = Bit: Stop processing of chunk
.0.. .... .... .... = Bit: Do not report