Unreliable TCP Failure Detection

I am doing some experiments on an untrustworthy radio network (home brewing) using very rudimentary java socket programming to send messages back and forth between end nodes.

The configuration is as follows:

Node A --- Node Relay --- Node B

One problem that I constantly encounter is that somehow the connection drops out and neither Node A nor B know that the link is dead, and yet it continues to transmit data. TCP connection is also not disconnected. I added a message that causes a timeout after a while, but I still would like to know the reason why TCP is not disconnecting.

Here are the options that I enable when configuring the socket:

channel.socket().setKeepAlive(false);
channel.socket().setTrafficClass(0x08); // for max throughput

This behavior is strange because it is completely different from when I have a wired network. On a wired network, I can simulate a disconnected connection by pulling out the network cable, however, as soon as I plug in the cable again, the connection will be restored and the messages will begin to go through again.

On radio networks, the connection is never restored, and as soon as it dies quietly, messages never resume.

Are there any other unknown java implants or settings for the socket that I can use, also why do I see this behavior in the first place?

And yes, before anyone says anything, I know that TCP is not the preferred choice over an untrusted network, but in this case I did not want to lose the packet.

+3
3

TCP , . RFC 2 . , ( ), .

heartbeat, , RTT. - , .

, .

, Keepalive TRUE, false. Keepalive , , .

+2

7- OSI . , Ethernet, , . , , . TCP -, layer1/2 .

+2

""?

, . , , , . TCP , ACK, . , , , , , , , , , .

: http://www.ietf.org/rfc/rfc2988.txt, : http://msdn.microsoft.com/en-us/library/ms819737.aspx ..

You are used to having a wired network where drivers can notify higher-level layers that the connection is physically broken. If you need to configure a wired network for routing through a router that you then intentionally configured incorrectly, then you will probably see this behavior ....

+1
source

Source: https://habr.com/ru/post/1745862/


All Articles