I will keep this short and sweet. We have servers in our environment that have multiple IP addresses assigned to a single NIC. That’s normally just fine. However on occasion I will have very strange issues occur where essentially all networking appears to be working and yet web browsing won’t work. I can ping my default gateway, ping other systems in the same subnet, telnet out on port 80 and 443, etc, etc. But the network connectivity still behaves oddly. What’s the issue?

It all has to do with networking logic decisions made many years ago (I believe as far back as Windows Server 2000) by someone at Microsoft. When you have multiple IP addresses assigned on your NIC in windows which also is the NIC with an assigned default gateway, all traffic leaving the server on that NIC will leave via the first IP address assigned on the NIC. This is therefore the source IP address for all traffic on the box or the “primary IP address.” Typically this would be the IP address initially assigned on the first IPv4 configuration page for a given interface.

At some point (Server 2008/Vista?) someone had the idea that the primary IP address should be whatever the lowest number’d IP address on the NIC.

So given a NIC with 3 IP addresses assigned of:

192.168.1.22
192.168.1.5
192.168.1.9

All traffic leaving that server will default to coming from 192.168.1.5 which the system considers the primary IP address.

Fine.

But this seemingly didn’t get fully implemented -or- perhaps the old logic was never completely done away with. Maybe something else is going on. I am not sure. What I have found to be somewhat consistently true though is that if the IP address assigned on that first NIC configuration page is NOT the lowest IP address of all the addresses assigned on that NIC, weird stuff may occur with routing traffic to/from that server.

I have just made it my standard practice that NIC’s with multiple IP addresses assigned to them have the lowest number IP entered on that first configuration page.

I had a really odd problem crop up several nights back regarding routing to/from a server and as soon as I made the change it magically went away.

The article referenced below talks about how to change the behavior of windows using NetSH and set whatever IP address you want as primary but I prefer to avoid changing the default behavior of the OS on an individual system. The reason being is that it becomes one more thing that will now need to be documented and kept track of which can get unwieldy in a large environment.

Reference:
http://www.confusedamused.com/notebook/source-ip-address-preference-with-multiple-ips-on-a-nic

1 of 1

This post has no comments. Be the first to leave one!

Join the discussion

Your email address will not be published. Required fields are marked *