The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> System Administration
> Networking Help
|
Multiple NICs, same subnet
Discuss Multiple NICs, same subnet in the Networking Help forum on Dev Shed. Multiple NICs, same subnet Networking Help forum discussing issues such as routers, switches, small networks, file sharing etc. Find information for both wired and wireless networks.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 22nd, 2013, 11:19 AM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 4
Time spent in forums: 47 m 51 sec
Reputation Power: 0
|
|
|
Multiple NICs, same subnet
Hello,
I am working on a Java web application deployed in Tomcat 7 in a Windows Server 2008 environment. One requirement we were recently given was to configure the server with multiple NICs, so as to support communication with some legacy applications that require my server to have specific IP addresses (all IPs on the same subnet).
So, currently, my server is set up with NICs with the following addresses: 10.0.0.20, 10.0.0.21, 10.0.0.22. Tomcat is configured to listen on all interfaces, and any web service requests made to my application are handled and given a response. That's good.
However, I am getting some reports that my app is not playing nicely with some of these legacy apps. Specifically, if legacy app A sends a web service request to 10.0.0.21, it expects to get a response from 10.0.0.21. However, according to reports, the responses actually come back over another interface, presumably determined by the Windows network stack. I'm guessing what happens is that since the client and all of the server's IPs are on the same subnet, Windows could use any of the three interfaces and just chooses one based on the routing tables.
I am still in the process of setting up a test server and client to test this behavior. However, it seems to me (and maybe I'm naive) that this is part of the HTTP specification. The server shouldn't open up any new connections - it's supposed to just respond over the same connection initiated by the client. Is this behavior even possible?
If it is possible, how can I configure my server (again, Windows Server 2008) to respond over the same interface on which a request was received?
It doesn't appear to be any sort of Tomcat or Java configuration. I could create a static route in the routing table (not sure it works this way, though) to try to force the use of a specific interface when routing somewhere. However, all of the legacy apps are sitting on the same box, so any static route would only solve the problem for a specific app...
Thanks!
|

January 22nd, 2013, 12:16 PM
|
 |
Lost in code
|
|
|
|
|
Well, from a physical perspective it's possible, but from a software perspective it doesn't seem very likely. It shouldn't really be very hard to test the theory, just install a packet sniffer like WireShark on the server and see what packets it's sending. I'd be interested to learn whether or not it's actually doing that.
|

January 22nd, 2013, 01:02 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 4
Time spent in forums: 47 m 51 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by E-Oreo Well, from a physical perspective it's possible, but from a software perspective it doesn't seem very likely. It shouldn't really be very hard to test the theory, just install a packet sniffer like WireShark on the server and see what packets it's sending. I'd be interested to learn whether or not it's actually doing that. |
Agreed. That's what I'm trying to set up... Only my test machines are currently tied up with something else at the moment. Will be sure to let you know.
|

January 23rd, 2013, 03:51 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 4
Time spent in forums: 47 m 51 sec
Reputation Power: 0
|
|
|
Ok, as an update, I tried to test this in my lab. Specifically, I set up the server with 3 NICs, and deployed the web application. Then, from a client, I made web service SOAP requests (via SoapUI) to each of the 3 IP addresses.
Simultaneously, I had wireshark running, sniffing the packets going back and forth to and from the server. In every case, the SOAP responses were returned over the same interface to which the request was made.
Next, I created a route in the server's routing table such that interface X should always be used when sending a packet to the client's IP address.
Even with this route in place, I could not get the SOAP responses to arrive at the client from a different address than the one where I sent the requests.
So... it looks like something altogether different must be going on.
Thanks!
|

January 23rd, 2013, 06:49 PM
|
 |
Lost in code
|
|
|
|
|
Thanks for posting back.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|