I have this in my interfaces file:
auto eth1 iface eth1 inet static address 220.127.116.11 netmask 255.255.255.252 up route add default gw 18.104.22.168 dev eth1 metric 1
If I run
ifconfig eth1 down, the default gateway is removed from the routing table. But when I do
ifconfig eth1 up, the default gateway is not added to the routing table. I have two default gateways with different metric, so only the other gateway appears in the routing table. I have set gc_timeout as
10. I'm trying implemet a solution mentioned in the answer to this question. how can I automatically add the default gateway when I bring up the interface?