localhost or LAN addresses in /etc/hosts

Bart Silverstrim bsilver at chrononomicon.com
Tue Dec 16 13:52:39 UTC 2008

Derek Broughton wrote:
> Bart Silverstrim wrote:
>>> Now if you let a Router set your
>>> ip numbers it will do it but not the same way all the time. You add
>>> another item and ALL ip numbers can change.
>> Depends on the router. The part that differentiates how it works is
>> the DHCP server software. You CAN tell your DHCP server, if it
>> supports it, to always give a specific MAC address a specific IP
>> address just like you can configure it to hand out an address for a
>> specified period of time, and DNS servers are able to tie a specific
>> record to a specific IP.
>> If your router is bargain basement then yeah, it'll seem random if it
>> lacks features. But it can most certainly be done, and in many cases
>> if the feature is there the user just never bothered to configure it
>> so they're using the defaults.
> Not to mention, most DHCP servers will reassign exactly the same address 
> to a device every time it asks, provided the address pool is large 
> enough that it doesn't need to recycle them.  This isn't guaranteed, but 
> it is extremely likely.

Don't rely on it though!

I've had plenty of cases where DHCP servers will goof with it at an 
inopportune moment. It depends on the implementation.

More information about the ubuntu-users mailing list