Problem with multiple network interfaces

Hi .. we have two AIX 5.3 systems with a small client server app communicating over a TCP socket.

Box A has a single network interface where the server app (in Java) opens a well known port and waits for connections from Box B.

Box B has two network interfaces, X and Y. Interface X has the box name assigned to it but we need the two boxes to communicate via interface Y as it is on the same sub-net as A. So, the app on B binds it's socket to Y.

When the Client app (C++) on A contacts server B, all goes well from a B standpoint and B responds with a message on the new socket created by the 'accept' call. However, when received in box A, the message comes in on interface X rather than Y so the app on A never sees the message from B (as it is bound to interface Y).

Is there some inbound network routing configuration option that I need to set up to make this work ? Is so, where and how.

Thanks
Ron

How are the two boxes connected? I mean the all 3 network cards are in the same switch?
If so, the ip's on the interfaces are on different subnets?
For me it seems more like a routing problem...

Thanks for the reply. Box A has an IP address of 198.235.82.78 and Box B Interface X is 10.10.22.46 and Interface Y is 198.235.82.81. I'm not actually on the customer site but I believe that he has two completely separate networks 10. and 198. It seems that the message from B must be getting into A via interface Y but for some reason AIX is routing the message to the main box interface i.e. the one to which the name is assigned. As I said, I'm not actually on the site so I'm just trying to figure out what is wrong from what the customer has told me.

So, to repeat the question, is there anything in AIX's network input routing logic which could make a message which arrives on a secondary network interface appear on the primary interface ?

Sounds like your dealing with a default route, you may need to setup an interface route for the box with two adapters.... for the second adapter:
smitty mkroute
dest type - net
dest address - 198.235.82.0
default gateway - 198.235.82.? ( whatever default route for that subnet is )
network mask - 255.255.255.0 ( a guess on your mask - whatever it is )
network interface - ( en0 or en1 whatever your interface number for the 192.235.82.0 network )
Take defaults for the rest. Should see the new route on a netstat -rn Once up may have to restart your app first then your problem may be solved.

As is now all traffic is directed to your default route on the 10.10.22.0 subnet. Nice thing about the smitty mkroute is that if you do it that way the route wil survive a reboot. If you just use the "route add" command....you will loose the route on reboot.

Correct. The reason being that (persistent) routing information is stored in the ODM. Using a chdev like smitty does changes the ODM as well as the actual configuration, while route add only changes the configuration but not the ODM. At reboot the ODM is read to create a configuration, which is why the route commands effects don't survive reboots.

Notice that some admins who don't know this end up putting "route add"-commands in rc.net and this will of course override any changes in the ODM, so watch out for this sort of problems if you change anything.

I hope this helps.

bakunin