0

I have a Windows 2008 R2 (or newer, doesn't matter) server with IP 192.168.68.14/24 on interface "Ethernet0" / index 12.

When adding the IP address 192.168.68.222/24 the interface 192.168.68.14 is still used.

But when adding a "lower" IP address than .14 (eg. 192.168.68.4/24) this new IP address is used as interface.

How can I set the 192.168.68.14/24 as interface from command line so that it persists after a reboot, or possibly after adding another "lower" IP address?

Hint: I don't want to change or set the default gateway! Only the interface IP-address which is used for the traffic. It's essential for firewall rules...

IPv4 Route table 
===========================================================================
Active Routes:
Network Destination        Netmask      Gateway          Interface   Metric
          0.0.0.0          0.0.0.0     192.168.68.1     192.168.68.4    261
        127.0.0.0        255.0.0.0      On Link            127.0.0.1    306
        127.0.0.1  255.255.255.255      On Link            127.0.0.1    306
  127.255.255.255  255.255.255.255      On Link            127.0.0.1    306
     192.168.68.0    255.255.255.0      On Link         192.168.68.4    261
     192.168.68.4  255.255.255.255      On Link         192.168.68.4    261
    192.168.68.14  255.255.255.255      On Link         192.168.68.4    261
   192.168.68.222  255.255.255.255      On Link         192.168.68.4    261
   192.168.68.255  255.255.255.255      On Link         192.168.68.4    261
        224.0.0.0        240.0.0.0      On Link            127.0.0.1    306
        224.0.0.0        240.0.0.0      On Link         192.168.68.4    261
  255.255.255.255  255.255.255.255      On Link            127.0.0.1    306
  255.255.255.255  255.255.255.255      On Link         192.168.68.4    261
===========================================================================
StefanK
  • 125
  • 1
  • 2
  • 8

1 Answers1

0

The ip address "closest" to the DG address will be used as the source address by default. To change this behavior you'll need to use the skipassource flag. You can Google it to find out how.

joeqwerty
  • 108,377
  • 6
  • 80
  • 171