I have a Crunchbang VM with two interfaces, eth0 and eth1, each of which connects to an OpenWRT VM (eth0 being 10.232.64.20 and eth1 being 10.232.65.20). I'm using Network Manager and DHCP. My overall goal is having multiple ssh connections, and bonding them with ifenslave.By default, eth1 (for some reason) is the default gateway:user@crunchbang:~$ ip rodefault via 10.232.65.1 dev eth1  proto static10.232.64.0/24 dev eth0  proto kernel  scope link  src 10.232.64.2010.232.65.0/24 dev eth1  proto kernel  scope link  src 10.232.65.20I added a route for eth0:user@crunchbang:~$ sudo ip route add default via 10.232.64.1 dev eth0  proto static metric 1Then I have two routes:user@crunchbang:~$ ip rodefault via 10.232.65.1 dev eth1  proto staticdefault via 10.232.64.1 dev eth0  proto static  metric 110.232.64.0/24 dev eth0  proto kernel  scope link  src 10.232.64.2010.232.65.0/24 dev eth1  proto kernel  scope link  src 10.232.65.20However, ssh only gets out via eth1:user@crunchbang:~$ ssh -b 10.232.64.20 user@1.2.3.4ssh: connect to host 1.2.3.4 port 22: Connection timed outuser@crunchbang:~$ ssh -b 10.232.65.20 user@1.2.3.4Enter passphrase for key '/home/user/.ssh/id_rsa': After changing the eth0 metric I have:user@crunchbang:~$ ip rodefault via 10.232.64.1 dev eth0  proto static  metric 1default via 10.232.65.1 dev eth1  proto static  metric 210.232.64.0/24 dev eth0  proto kernel  scope link  src 10.232.64.2010.232.65.0/24 dev eth1  proto kernel  scope link  src 10.232.65.20And now ssh only gets out via eth0:user@crunchbang:~$ ssh -b 10.232.64.20 user@1.2.3.4Enter passphrase for key '/home/user/.ssh/id_rsa': user@crunchbang:~$ ssh -b 10.232.65.20 user@1.2.3.4ssh: connect to host 1.2.3.4 port 22: Connection timed outHow do I force ssh to use an interface with a higher metric?EditI have implemented and tested the configuration in the 4.2. Routing for multiple uplinks/providers section of the Linux Advanced Routing & Traffic Control HOWTO. Given that the configuration is simple, and that I didn't encounter errors, I'll just show code and results, with minimal explanation.root@crunchbang:~# ip route add 10.232.64.0/24 dev eth0 src 10.232.64.20 table T0root@crunchbang:~# ip route add default via 10.232.64.1 table T0root@crunchbang:~# ip route add 10.232.65.0/24 dev eth1 src 10.232.65.20 table T1root@crunchbang:~# ip route add default via 10.232.65.1 table T1root@crunchbang:~# ip route flush table mainroot@crunchbang:~# ip route add 10.232.64.0/24 dev eth0 src 10.232.64.20root@crunchbang:~# ip route add 10.232.65.0/24 dev eth1 src 10.232.65.20root@crunchbang:~# ip rule add from 10.232.64.20 table T0root@crunchbang:~# ip rule add from 10.232.65.20 table T1root@crunchbang:~# ip route add default scope global nexthop via 10.232.64.1 dev eth0 weight 1 nexthop via 10.232.65.1 dev eth1 weight 1Here are the routing tables generated:root@crunchbang:~# ip route show table T0default via 10.232.64.1 dev eth0 10.232.64.0/24 dev eth0  scope link  src 10.232.64.20 root@crunchbang:~# ip route show table T1default via 10.232.65.1 dev eth1 10.232.65.0/24 dev eth1  scope link  src 10.232.65.20 root@crunchbang:~# ip rodefault     nexthop via 10.232.64.1  dev eth0 weight 1    nexthop via 10.232.65.1  dev eth1 weight 110.232.64.0/24 dev eth0  scope link  src 10.232.64.20 10.232.65.0/24 dev eth1  scope link  src 10.232.65.20 With that configuration, ssh connects via both interfaces:user@crunchbang:~$ ssh -b 10.232.64.20 user@1.2.3.4Enter passphrase for key '/home/user/.ssh/id_rsa': user@crunchbang:~$ ssh -b 10.232.65.20 user@1.2.3.4Enter passphrase for key '/home/user/.ssh/id_rsa': However, it does appear that I need to lose Network Manager. If anyone could explain why that's a bad idea, or warn of pitfalls, I would appreciate it.Edit2Removing Network Manager went well. I have just one last question. What is the current standard way to load the configuration at boot?
How do I force ssh to use a second interface with higher metric?
ssh;crunchbang;interface;bonding