Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to add a route in Linux with the Dynamic flag set? The reason I want to do this is to troubleshoot an issue where there exist identically static and dynamic routes, and what happen if I try to delete the static route.

We suspect that the dynamic route was removed, and not the static route.

I have tried:

route add -net gw dyn

But route -n only show the flags UG.

share|improve this question


ip route add via

could be written as

ip r a via

there's some trace found in my history.

ip route add via scope global dev eth0

You could even add a secondary ip address to same link;

ip a a dev eth0 label eth0:test

ip is a full featured iproute2 tool. But as low level, you may have to ip address add before ip route add... So please, RTFM ;-)

man -Pless\ +/^ip.route ip
share|improve this answer
Thanks for reply, but I do not see how this command add the route with the D flag. – Dog eat cat world Jan 8 '13 at 8:10
I think you misunderstand dynamic route meaning. If I rightly understand you ask, you can't. Did you already browse the linux advanced routing & traffic control documentation? – F. Hauri Jan 8 '13 at 9:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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