When configuring multiple static IP addresses on a Windows Server 2008 NIC, the system doesn't provide a straightforward GUI method to specify which IP should be used as the default source address for outbound connections. The routing table automatically uses the first bound IP (lowest in the binding order) as the default source address, which causes NAT translation issues when this isn't the desired public-facing IP.
As shown in your ipconfig output, all IPs are marked as "(Preferred)" with no hierarchy. The routing table reveals the actual behavior:
route print
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.99.1 192.168.99.49 261
This demonstrates how 192.168.99.49 becomes the de facto source IP despite having higher-numbered IPs configured.
We need to modify the routing table to enforce our preferred source IP (192.168.99.100 in your case):
route delete 0.0.0.0 mask 0.0.0.0 192.168.99.1
route add 0.0.0.0 mask 0.0.0.0 192.168.99.1 if 192.168.99.100 -p
The -p
flag makes this change persistent across reboots. Verify with:
route print | find "0.0.0.0"
For modern management, use this PowerShell command sequence:
Remove-NetRoute -DestinationPrefix "0.0.0.0/0" -Confirm:$false
New-NetRoute -DestinationPrefix "0.0.0.0/0" -NextHop 192.168.99.1 -InterfaceAlias "Ethernet" -PreferredSource "192.168.99.100"
Test your outgoing IP with:
Test-NetConnection -ComputerName google.com -TraceRoute
Or alternatively:
curl ifconfig.me --interface 192.168.99.100
For absolute certainty, create this registry entry:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"DefaultOutboundSource"=dword:64806400
Where the DWORD value represents your IP in hex (192.168.99.100 = C0.A8.63.64 = 0x64806400).
When multiple IP addresses are bound to a single NIC in Windows Server 2008, the system automatically selects the first configured IP as the default source address for outbound traffic. This becomes problematic when:
- You need NAT to consistently use a specific public IP
- Applications require predictable source IP binding
- Security policies mandate fixed outbound IPs
Windows follows these rules for source IP selection:
1. Uses the first IP bound to the interface (by configuration order)
2. Follows the routing table's interface binding
3. Ignores the "preferred" flag in ipconfig output
The definitive way to control source IP selection is through route metrics:
route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 192.168.99.1 if [interface_index] -p
To find your interface index:
netsh interface ipv4 show interfaces
For permanent configuration:
1. Open Network Connections
2. Advanced → Advanced Settings
3. Under "Adapters and Bindings", reorder connections
4. Move desired NIC to top position
Test your configuration with:
tracert -d 8.8.8.8
pathping 8.8.8.8
netsh interface ipv4 show route
For scripted deployment:
# Set default route to use specific IP
$gw = "192.168.99.1"
$ip = "192.168.99.100"
$ifIndex = (Get-NetAdapter -Name "Ethernet").ifIndex
Remove-NetRoute -DestinationPrefix "0.0.0.0/0" -Confirm:$false
New-NetRoute -DestinationPrefix "0.0.0.0/0" -InterfaceIndex $ifIndex -NextHop $gw -PolicyStore ActiveStore
# Force source IP binding
Set-NetIPInterface -InterfaceIndex $ifIndex -AddressFamily IPv4 -WeakHostSend Enabled
- Clear ARP cache:
arp -d *
- Reset TCP/IP stack:
netsh int ip reset
- Check for IP conflicts in Event Viewer