On an Ubuntu 14.04 server (3.16.0-30) I'm trying to add a default route and getting error as follows:

ip route add default via dev bond0.11
RTNETLINK answers: Network is unreachable

This box has address on bond0.11. I have the following routes configured statically (edited down to relevant subset): via dev bond0.11 dev bond0.11  proto kernel  scope link  src

I can ping and here is traceroute's output:

traceroute to (, 30 hops max, 60 byte packets
 1  0.126 ms  0.096 ms  0.081 ms
 2  0.149 ms  0.142 ms  0.112 ms

Why is the default route addition being rejected when I clearly have access to that network/host? I'm obviously doing something wrong...

  • 1
    I think the issue is that, the next hope has to be on the same network that you are on. ie you can set your default route to use In turn that system will then know where to go next on the 172.16.x.x network. – grag42 Apr 22 '15 at 21:49
  • You might well be right (I'm an absolute beginner at this stuff). But this feels like it would require routers all over the place (ie: has to be a router...). This may not be relevant but the reason I want to target specifically is that it's a firewall appliance, running inside a VM hosted by – sxc731 Apr 22 '15 at 21:52
  • 1
    There are routes all over the place and the needed routes. There are network protocols that take care of that on the internet. Default route is usually used to get you to the internet. Generally you will only have to add routes if you are connecting to a network that is behind a router that is not along your default route. – grag42 Apr 22 '15 at 21:57
  • I have not tried to configure that kind of setup. but, i would think that you will need on the external box to default route to 11.18, then on 11.18 forward or route (depending on how your vm network is setup) to 111.99. From there the 111.99 can handle the traffic – grag42 Apr 22 '15 at 22:07
  • @grag42 cheers. Your first comment is likely the correct answer to my q. Please post it as a reply so I can accept it. Thanks again! – sxc731 Apr 22 '15 at 22:14

The issue is that the next hop or gateway in routes need to be on the same network as the one you are connected to.

i.e. you can set your default route to use In turn that system will then know how to get to the 172.16.x.x network.

  • I'm confused, and thank you for your answer by the way. Does that mean I have to first add the first hop for my gateway and then now that as you say the system knows how to get to the next network I add the ip to my gateway again? Thanks! – VaTo Jun 6 '17 at 21:58
  • The reason for that is host sends packet to ethernet address of the router and does not change destination ip address of a packet. So router must be in the same ethernet domain. – user3132194 May 5 at 10:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.