I have a machine with a built-in NIC (eth0), which serves as a DHCP server for a Raspberry Pi. I also have a USB 3G modem, which shows up as ethernet device eth1. eth0 has the static ip 192.168.100.1 in
When I connect the Pi to the server,
NetworkManager: <info> Policy set 'Ifupdown (eth0)' (eth0) as default for IPv4 routing and DNS.
ip route show gives
default via 192.168.1.100 dev eth0 proto static
I then need to manually
ip route delete default ip route add default via 192.168.1.1
to get it to connect to the internet via the 3G modem again. I am using CrunchBang Linux, based on Debian 7 wheezy, on the server, and the latest Raspbian on the Pi.
How can I choose the default pathway for NetworkManager to prefer?
Edit: here's my
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback allow-hotplug eth0 auto eth0 iface eth0 inet static address 192.168.100.1 netmask 255.255.255.0 allow-hotplug eth1 auto eth1 iface eth1 inet dhcp
Note that I've changed
/etc/NetworkManager/NetworkManager.conf to have
because I want to be able to disconnect eth1, the 3G Modem, using nm-applet.
[main] plugins=ifupdown,keyfile [ifupdown] managed=true