Setting up gateway on different subnet than IP address


My provider has a (stupid) setup where the IP address for the gateway is on a totally different IP range than the assigned IP address. They insist on doing this for whatever reason. I'm trying to get Windows Server 2012 R2 configured using a static route but have had no luck. I was able to get the network configured on FreeBSD using the following configuration in /etc/rc.conf:

ifconfig_vtnet0="inet netmask 0xffffffff"
static_routes="net1 net2"
route_net1="-net -iface vtnet0"

Is there anyway to convert this so it will work on Windows Server 2012 R2? I've tried doing route ADD MASK but no luck.

Here's my IP address info:

IP Address:
(Required) subnet mask:
asked on Server Fault May 14, 2014 by ub3rst4r • edited May 14, 2014 by ub3rst4r

3 Answers


OVH hosting does this same thing. the ip block you are assigned does not contain your gateway.

they provide per OS directions which perhaps can help you:

your default route in your post will work, but you must provide a route to that gateway

answered on Server Fault May 14, 2014 by driz

You should not need to setup a static route, setting right netmask should be enough. You seem to have it set to, but you need to set it to

answered on Server Fault May 14, 2014 by phoops

After finally getting a hold of my provider, it turned out the problem was that the MAC address was wrong and thus causing it to not connect. I didn't have to add any static routes or anything to get to work (luckily).

answered on Server Fault May 15, 2014 by ub3rst4r

User contributions licensed under CC BY-SA 3.0