Solved Ununtu 12.04 "Desktop" network-manager and /etc/network/interfaces conflicts
Hi All,
I thought I might espouse some hard-won network wisdom in the hopes it might help out some other people in similar situations.
Hardware: fairly modern 1U server with two 1gbps ethernet ports on motherboard.
*nix: Ubuntu 12.04 Desktop
Environment: mostly unattended remote site.
Network: mix of 1Gbps / 10Gbps internal private non-routable IPs with an Ubuntu server on the boundary doing internal DHCP / DNS.
Purpose: this particular machine isolates a rather poorly behaved custom ethernet "box" from the main network - hence two ethernet ports.
Why Desktop, not server?: Fairly often, I will not be at the machine and need someone who's able to log in and follow simple instructions, to maintain it for me. Desktop is a much easier environment for that.
Out of the box I've found 12.04 Desktop to be pretty good at what it does, as long as you have a single ethernet port, (either copper or wireless) to a fairly regular ISP or University or Company Lan. But with two ethernet ports and fairly custom requirements it can be a bit of a pain working things out. Unfortunately there's a wealth of well-intentioned but mis-informed noise out there on the 'net.
So what I wanted is eth0 to be DHCP, and eth1 to be statically set up.
I may not have arrived here by the best route, but:
I ended up editing /etc/NetworkManager.conf, commented out the dnsmasq line, and changed the ifupdown entry to "managed=true". It took two reboots before this change "took".
Then I edited /etc/network/interfaces, and added
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 172.17.227.100
netmask 255.255.0.0
gateway 127.0.0.1
After a final reboot, everything comes up the way it is intended.
I guess the summary is that I found the "managed=true" to be non-intuitive. To me, it suggests that NetworkManager is looking after those ports, but in reality it means "someone else" has managed the ports.
So, there you go, I hope this helps someone else out.
Cheers,
Dave E.
|