3

SOLVED

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.

Here the 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 190.10.1.95 netmask ffff0000 broadcast 190.10.255.255

I have tried to connect the client giving the two addresses I saw there: 10.195.5.53, 190.10.1.95 without success.

EDIT: 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.

2 Answers2

2

Yes, the *.7777 mean it's listening on 'all' interfaces. Try arping from the linux box to the Sun box. If the Sun box does not reply, there is most likely a hardware issue in between.

If you do get a reply, then check:

  • tcpdump on server while trying to connect from linux
  • firewalls on both systems
  • same MTU on all NICs
  • routing is correct on both hosts

Something should turn up.

Server Fault
  • 3,454
  • 7
  • 48
  • 88
2

As they can ping each other, it's possibly a missconfiguration issue on the aplication not accepting outside connections or in the firewall blocking incoming connections. Test it:

Server (shutdown your application first or use a different port):

nc -l 7777 

Client:

nc server 7777

Try typing something. If you can see it on the server's terminal, then you have a missconfiguration on the application. Otherwise, it's a firewall issue.

sysfiend
  • 1,327
  • 1
  • 11
  • 24