This question already has an answer here:
SOLUTION: I tried the connection with a little server program and it works perfectly fine. I could connected it to
10.195.5.53. My problem is within the software of my client program it has not compiled correctly.
I have a server in UNIX SunOs and a client in a Linux. They are connected to the same network and I have access to both.
When I execute the "client" program also in the UNIX machine I can connect them usign the local address:
127.0.0.1. But when I execut the program from the Linux machine, I am not able to connect the client.
ifconfig -a command on the server machine:
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 aggr2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 10.195.5.53 netmask ffffff00 broadcast 10.195.5.255 igb2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 22.214.171.124 netmask ffff0000 broadcast 126.96.36.199
I have tried to connect the client giving the two addresses I saw there:
188.8.131.52 without success.
ping 10.195.5.53 connects succesfully from the Linux.
Any tip in what should check appart from the IP addresses or how could get more info about the server from the client's point of view is more than welcome.
After create the server socket I tried the command:
netstat -a | egrep "7777". 7777 is the port I am using with the server.
Local Address Remote Address Swind Send-Q Rwind Recv-Q State *.7777 *.* 0 0 49152 0 LISTEN
Does that * mean that it is listening to any IP with that port? If that is correct, then why is not the socket connecting.
EDIT: I have tried the program both from the Linux machine connecting in the localhost and it doesn't connect the client socket either. Most likely I have some problem with the code. Some incompatibility with the OSs.