I have this in my interfaces file:
auto eth1 iface eth1 inet static address 126.96.36.199 netmask 255.255.255.252 up route add default gw 188.8.131.52 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?