Default Gateway Outside Of The LAN

Home » CentOS » Default Gateway Outside Of The LAN
CentOS 5 Comments

Hello all,

We have a somewhat unique setup whereby our default router is outside of the local network.

Let us say our network is

So we have a route-eth0 file that looks something like this: via dev eth0
default dev eth0

The last definition would simply not take – but it has to for the setup to work. And no, does not operate as a full-fledge router due to our setup.

When we attempt to add it manually we get the following error:

RTNETLINK answers: No such process

When we use ifup we get the following:

Error: either “to” is a duplicate, or “” is a garbage.

A little discussion of this can be found here:

and here:

It does not help us, however. Any tips much appreciated.



5 thoughts on - Default Gateway Outside Of The LAN

  • You need to revisit your networking knowledge … specifically what a gateway is…

    You need a router (gateway) on (presumably in your example). On this you have a default route to the next hop of…

    In terms of routing systems on have no knowledge of and no ability to influence the route other than the next hop on the same local link network as them ( in this example).

  • Hi Boris,

    ‘unique’ is a very mild expression. The word you’re actually looking for was probably ‘wrong’.

    Your gateway *must* be in the network your interfaces are in. You also would not want your living room be built without any doors and a sign on the wall ‘the exit is in the kitchen’.

    Best regards,


  • There does exist one use case that was pointed out on IRC that might be valid … although the OP is somewhat abstract in his original definition so this might not apply…

    In the event an ISP provides new IPs and routes them to your host but these are outside of the pre-existing subnet it is possible to use them with no gateway in the subnet associated with these (it’s essentially a point to point link directing traffic at an interface)…

    This somewhat describes the situation:

    However it is a rather specific use case and may not apply here…

  • That still describes a configuration where the gateway is in a local broadcast domain.

    It’s impossible to create a route via a host that can’t be resolved by ARP (for IPv4).

  • Very true in general – the assumption in IRC was that text is not always the best medium for transmitting ideas – especially when someone is specifically anonymising stuff or does not have english as a first language…

    The only thing we could think of was that sort of scenario that could possibly be valid… but without the original poster coming back and describing more who’s to say?

    You don’t need to resolve like that in the event of a true point to point link where you can direct traffic down it (think serial WAN) and the network layer type of traffic (IP or otherwise… much less specific subnets) doesn’t actually matter… but that didn’t seem to be what the OP was talking about unless in his attempt to generalise and disguise his network layout he hid that inadvertently.

    For an IP packet to be routed though it does indeed require resolving a gateway on the local link for that to be routed through…