I have an eth3 interface in a linux router, with an adsl modem. This adsl modem is in bridged mode, so the public IP is assigned to eth3 (say, and the modem is just not seen by my server.

I want to define a static route to a specific IP ( through eth3, but I don't have a nexthop to set:

ip route add dev eth3

is accepted but does not work (packets never make their way out).

ip route add via dev eth3

Does not work either.

If I set the modem in router mode, then I have a NATed address for the linux server (, and IP address for the Adsl router (, and I can do:

ip route add via dev eth3

Does work.

Is it possible to define a static route through my adsl modem in bridged mode (first case), without having an explicit nexthop to give ?

  • 3
    What is the IP of the interface? Is it static or what? When your ISP gave you the static, didn't they also give you the gateway? You need the gateway address. Using the device name as a route target mostly only works on serial links. – Zoredache Jan 24 '13 at 17:20
  • Zoredache: you're right and you have enlightened me and my understanding of network configuration. Wish I could promote your comment as answer, as it really was what I was looking for. Now I have found the gateway address and can use it a 'via' parameter. Works like a charm. – alci Jan 25 '13 at 8:18

The traffic has to go via your ISP's gateway. If eth3 has been assigned your public IP, then the default gateway address should be listed in your routing table:

ip route show table main

You then need to issue

ip route add via <gatewayip> dev eth3

It should then work.

| improve this answer | |

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.