auto eth0 iface eth0 inet static address 198.51.100.87 netmask 255.255.255.0 gateway 198.51.100.1 post-up ip route add 198.51.100.0/24 dev eth0 table 1 post-up ip route add default via 198.51.100.1 table 1 post-up ip rule add from 198.51.100.87/32 table 1 priority 100 post-up ip route flush cache pre-down ip rule del from 198.51.100.87/32 table 1 priority 100 pre-down ip route flush table 1 pre-down ip route flush cache auto eth1 iface eth1 inet static address 203.0.113.144 netmask 255.255.255.0 post-up ip route add 203.0.113.0/24 dev eth0 table 2 post-up ip route add default via 203.0.113.1 table 2 post-up ip rule add from 203.0.113.144/32 table 2 priority 110 post-up ip route flush cache pre-down ip rule del from 203.0.113.144/32 table 2 priority 110 pre-down ip route flush table 2 pre-down ip route flush cache