1

I have a custom network setup. My servers have what I would call "main IP" with gateway for example:

Main IP: 67.166.214.148

Netmask: 255.255.255.0

Gateway: 67.166.214.1

And then I have additional IP addresses which are routed to the server through its main IP, such as:

Additional: 66.249.70.2

Netmask: 255.255.255.255

and then basically my router has a static or BGP route something like ip route 66.249.70.2 255.255.255.255 67.166.214.148)

I can reach outside world through additional IP on my host with no issues, but it is a little tricky when it comes to using additional IP that way on virtual machines inside the host.

On linux vm I can do:

ip ro default via 67.166.214.1

ip ro add 67.166.214.1 dev eth0

(so basically it tells that 67.166.214.1 is reachable through eth0(bridged) device and then the host server forwards it to the router and it works)

I can not recreate this on windows virtual machine. Is there a way I could tell my windows virtual machine to use the NIC device as gateway itself like it is possible on Linux? Or use some workaround.

2
  • route print, and route add does not help in your case ?
    – yagmoth555
    Apr 20, 2018 at 16:14
  • I toyed around with route add in windows, however, it does not allow a route to be added without gateway IP address specified. I can specify default route via 67.166.214.1, but when I try to specify where 67.166.214.1 itself is reachable I still need a gateway IP. Some people suggested using something like gateway as 0.0.0.0 with specified NIC (with "if" option), however, it has no effect. route -p add 67.166.214.1 mask 255.255.255.0 0.0.0.0 if 12
    – A. Smith
    Apr 23, 2018 at 6:22

0

You must log in to answer this question.

Browse other questions tagged .