Wednesday 17 August 2016

Ordering/Ranking Multiple IP Addresses on the Same NIC

Problem:
Your add a second IP Address to the network card on your server. Suddenly things which involve the outbound connection are either misbehaving or not working at all (e.g. RDP, telnet).

Cause:
After 2008, Windows Server started to assign its ranking of IP Addresses based on whichever has the lowest numerical value. The order the IP Addresses were added onto the NIC no longer matters, so if you first added 182.168.1.20 and then added 192.168.1.10 you'd find that any outbound connections were made from the x.x.x.10 address.

You can confirm this by viewing the ranking of the IP Addresses. Open an elevated command prompt and type in:

netsh int ipv4 show ipaddresses level=verbose

Fix:
You must manually remove the new ip address and then add the new ip address back onto the NIC using


netsh int ipv4 add address "Ethernet" 192.168.1.10 SkipAsSource=True

Thus the new ip address will be added to the NIC but it will not take precidence over the old IP Address, even though it is numerically lower.