Operating System - Linux
1827872 Members
1411 Online
109969 Solutions
New Discussion

Network address changes despite being static

 
Andrew Kaplan
Super Advisor

Network address changes despite being static

Hi there --

I am running Ubuntu 10.04 LTS 64-bit distribution as a virtual server on a host system running Fedora Core 14 64-bit, with the virtual machine software being the VirtualBox application. The virtual machine is set up with a bridged connection.

I am periodically experiencing a situation where the virtual machine's network address changes without warning, and I am forced to run the ifdown and ifup commands to bring the address back to its original state.

I went through the motions of modifying the /etc/network/interfaces file on the virtual machine to have a static address. The syntax that I entered into the file is shown below:

auto eth0
iface eth0 inet static
address 132.183.12.225
netmask 255.255.255.0
network 132.183.12.0
broadcast 132.183.12.255
gateway 132.183.12.1

I disabled the NetworkManager daemon on the host system, but the problem has continued to occur. Is there something else that I should reconfigure to stop the address change from occurring?
A Journey In The Quest Of Knowledge
1 REPLY 1
Matti_Kurkela
Honored Contributor

Re: Network address changes despite being static

Was the eth0 interface still up when you changed /etc/network/interfaces?

When the address changes, what's the address it changes to? Is it some other address in the 132.183.12.* segment, or something like 169.254.*.*?

If the address changes to 169.254.*.*, the cause might be avahi-daemon or similar Zeroconf networking provider daemon. For some reason, it hasn't got the message that the interface is now statically configured.

Otherwise, there might be a DHCP client daemon still running on the interface (typically a process named like dhclient, dhcpcd, or pump). Each time the DHCP client daemon renews its lease, the address would change from the static address to the DHCP-determined value.

The ordering of your actions might have caused the DHCP client daemon to be "orphaned" of sorts: neither disabling the NetworkManager nor ifdown/ifup might not recognize the need to stop the orphaned DHCP client daemon, because according to /etc/network/interfaces, the eth0 interface is statically configured.

It's always best to make sure the interface is down before changing its configuration: this applies in both DHCP <-> static and NetworkManager-controlled <-> manual configuration changes.

MK
MK