IP range vs Port Numbers (weird)
Posted: Mon Oct 29, 2018 11:07 am
Does anyone reading this know about IP range dependencies on TCP socket behavior? It seems like the kind of thing that shouldn't happen.
I'm working with MOD54417 (dual ethernet). NB IDE is 2.8.2. My customer wants to connect as a TCP client to eth1, on port 10033. They use two address ranges, 192.192.192.xxx and 192.168.198.xxx. Their client runs on Linux but uses some NetBios services, which I have enabled by a call to NetbiosEnableNameService("NAME", false); calling with true or false does not change the behavior.
The problem is that the setup works at 192.192.192.xxx and fails at the other address range, all else equal! Failure usually involves a failure to connect. Sometimes we get a TCP connection but cannot transfer data. These address ranges all fail:
192.1.192.xxx
192.192.1.xxx
10.0.1.xxx
10.10.10.xxx
The behavior is tied to the customer's software. The embedded web page always works. All my sockets are started with INADDR_ANY. Command line telnet usually works, but sometimes I get a "fake" connection that will not transfer data. I am using swap cables to both eth0 and eth1. eth0 is plugged into my laptop ethernet port. eth1 is plugged into a USB-thernet adapter. This same pattern occurs on 2 different PCs at the customer site over HP network switches.
Here is Wireshark showing the failure at 10.10.10.xxx
And the success at 192.192.192.xxx
I'm working with MOD54417 (dual ethernet). NB IDE is 2.8.2. My customer wants to connect as a TCP client to eth1, on port 10033. They use two address ranges, 192.192.192.xxx and 192.168.198.xxx. Their client runs on Linux but uses some NetBios services, which I have enabled by a call to NetbiosEnableNameService("NAME", false); calling with true or false does not change the behavior.
The problem is that the setup works at 192.192.192.xxx and fails at the other address range, all else equal! Failure usually involves a failure to connect. Sometimes we get a TCP connection but cannot transfer data. These address ranges all fail:
192.1.192.xxx
192.192.1.xxx
10.0.1.xxx
10.10.10.xxx
The behavior is tied to the customer's software. The embedded web page always works. All my sockets are started with INADDR_ANY. Command line telnet usually works, but sometimes I get a "fake" connection that will not transfer data. I am using swap cables to both eth0 and eth1. eth0 is plugged into my laptop ethernet port. eth1 is plugged into a USB-thernet adapter. This same pattern occurs on 2 different PCs at the customer site over HP network switches.
Here is Wireshark showing the failure at 10.10.10.xxx
And the success at 192.192.192.xxx