localhost or LAN addresses in /etc/hosts

Bart Silverstrim bsilver at chrononomicon.com
Mon Dec 15 19:35:49 UTC 2008


Karl F. Larsen wrote:
> Bart Silverstrim wrote:
>> Derek Broughton wrote:
>>   
>>> Chris G wrote:
>>>
>>>     
>>>> On Mon, Dec 15, 2008 at 09:54:13AM -0400, Derek Broughton wrote:
>>>>       
>>>>> Chris G wrote:
>>>>>
>>>>>         
>>>>>> The whole point is to make things easy to configure, my router
>>>>>> certainly *doesn't* know the names/addresses of machines on my LAN
>>>>>> and I don't really see how it could.
>>>>>>           
>>>>> The usual way is by the machine asking for DHCP to send its name, and
>>>>> the router sends back an IP - and updates its local DNS.  This is not
>>>>> implemented in every router, but it's _really_ common.
>>>>>
>>>>>         
>>>> So the *router* decides what the machine's name is?
>>>>       
>>> No, "the machine asking for DHCP" (ie, your computer) "sends"  its own 
>>> name to the DHCP server.
>>>     
>> Sorry, this also can be a way to name a device.
>>
>> I was thinking of situations where you can update the DNS records to a 
>> fixed name for a given IP.
>>
>>
>>   
>     The reason someone invented networking was because his/her network 
> got too large to guess were things are. 

How does a network get too large before networking was invented?

>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.





More information about the ubuntu-users mailing list