/etc/network/interfaces strange behaviour

Marius Gedminas marius at pov.lt
Fri Jun 20 19:19:26 UTC 2008


On Fri, Jun 20, 2008 at 09:37:27PM +0300, Mario Spinthiras wrote:
> I recently setup a server which I had originally assigned a DHCP
> address from the interfaces file using the line "iface eth0 inet dhcp"
> . After I had put the machine on the rack I simply changed the
> addressing to static and restarted the networking. This all went well
> for a while. Today the machine had lost its power feed and as a result
> the machine was offline for a while.
> When the machine came back up (power) , it got an address by DHCP
> though the settings in the interfaces file said static with all
> relevant addressing. This is not something new to me , I have dealt
> with Linux machines for almost 10 years now. I just cannot seem to
> understand why it did this.

It does sound strange.  Are you sure it was DHCP rather than, say,
avahi's automatically assigned local IP?  Can we see your
/etc/network/interfaces?

> Checking the interfaces file again , the
> only thing I had seemed to forget is the broadcast 192.168.100.0
> directive which denotes the network number and nothing more.

Nitpick: the broadcast directive specifies the broadcast address, and
not the network address, so it should be 192.168.100.255.  OTOH neither
is necessary, and I never specify them.  All you need is address and
netmask.

> I have played with the way ifup parses this file and cannot seem to
> derive a bug of somekind. Here is a thought though. I believe the
> previously retrieved address from DHCP is cached somewhere (though Ive
> searched high and low for it)

/var/lib/dhcp/dhclient.leases

> and when "something" triggers the
> parsing error , it goes back to that DHCP previously assigned address.

No.

Dhclient will reuse an old lease, if it receives no response from the
DHCP server, but an error in the /etc/network/interfaces shouldn't cause
dhclient to get run... Unless... is network-manager installed on that
machine?

> Can I have your thoughts on this? Its extremely strange behavior and I
> cannot understand how a broadcast directive that was missing would
> cause this problem. Note that the addressing that is static and the
> DHCP assigned address are both in the same subnet.

Then it's not avahi.

> Is there a force
> feature of somekind that tells it to go DHCP in a certain "case" ?
> 
> Possible ifupdown bug?

Unlikely.

Marius Gedminas
-- 
<niemeyer> I'm wondering why we have defineChecker() defined twice with exactly
           the same implementation under zope.security.checker...
<niemeyer> Is it some kind of high-availability system? :-)
		-- #zope3-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080620/b790f6e8/attachment.sig>


More information about the ubuntu-users mailing list