Problem with network if and static ip
I am having a problem getting the network interfaces to come up with an ip address. This is NOT a problem with figuring out how to assign a static ip to the box! We did this a long time ago, and it's been working fine since ... until now.
Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-38-generic x86_64)
This machine is running on a vmware virtual machine. It is an existing installation that has been running fine for a long time.
The network switch that connects the box hosting the virtual drive to the box hosting the vm went down while the machine was running. Not surprisingly, this hosed the filesystem. I fixed that and got the machine to boot, but the nic would not come up with an ip address.
ifconfig shows the interface is up, but the line showing the ip address (inet addr: nnn.nnn.nnn.nnn ...) was missing. It is configured for a static ip address and like I said has worked fine for a long time. "ifconfig eth0 down" takes it down as expected, "ifconfig eth0 up" brings it up ad expected. But no ip address and no network connectivity.
Eventually I found a sequence of events that fixed it, but it makes no sense:
1) Remove /etc/udev/rules.d/70-persistent-net.rules so that it doesn't try to reserve any macids.
2) Remove nic. Add a new one with a different macid. Power up. Still doesn't work.
3) Power down. Add a second nic. Power up. Configure /etc/network/interfaces to give both nics static ip addresses. Reboot. Works!!! Both nics have an ip, both have network connectivity!
4) Remove config for second nic from /etc/network/interfaces. Power down. Remove second nic. Power up. *Now* the first nic comes up with an ip address. In the end, nothing has changed, only it did not work before, and now it does.
Why, oh why, would adding a second nic get them to both come up with an ip address, and why when I removed the second nic does the first one continue to work? This is too weird - it makes no sense. I'm suspecting this is vmware weirdness and not really an Ubuntu problem.
Anyone seen or heard of this before?
|