adroman
asked on
How to add a persistent static route to Ubuntu 16.04.2 LTS
Dear Colleagues,
I have brand new Ubuntu 16.04.2 LTS and I would like to understand how to add persistent route to it.
For real example I have a default route with metric 100 (see attachment) and I would like to make this route metric to 10.
Please shed some light to undertanding this concept.
default_routing_table.png
I have brand new Ubuntu 16.04.2 LTS and I would like to understand how to add persistent route to it.
For real example I have a default route with metric 100 (see attachment) and I would like to make this route metric to 10.
Please shed some light to undertanding this concept.
default_routing_table.png
ASKER
Thank you for you answer, but how to configure metric in this file?
Find this example below
auto lo
iface lo inet loopback
auto new0
iface new0 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
up route add default gw aaa.aaa.aaa.aaa metric 10
down route del default gw aaa.aaa.aaa.aaa
auto new1
iface new1 inet static
address yyy.yyy.yyy.yyy
netmask yyy.yyy.yyy.yyy
up route add default gw bbb.bbb.bbb.bbb
down route del default gw bbb.bbb.bbb.bbb
auto lo
iface lo inet loopback
auto new0
iface new0 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
up route add default gw aaa.aaa.aaa.aaa metric 10
down route del default gw aaa.aaa.aaa.aaa
auto new1
iface new1 inet static
address yyy.yyy.yyy.yyy
netmask yyy.yyy.yyy.yyy
up route add default gw bbb.bbb.bbb.bbb
down route del default gw bbb.bbb.bbb.bbb
ASKER
Thank you so much!
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Open in new window