localhost or LAN addresses in /etc/hosts
Karl F. Larsen
klarsen1 at gmail.com
Mon Dec 15 19:09:49 UTC 2008
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. 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.
Enter networking simple. Let's say you have a computer and a printer
and several other things. Call the Router from the Internet 192.168.0.1
and set the computer as
192.168.0.2 and make the printer 192.168.0.3 and set them manually not
DHCP. Now in your /etc/resolv.conf which might look like this:
karl at karl-hardy:/etc$ more resolv.conf
### BEGIN INFO
#
# Modified_by: NetworkManager
# Process: /usr/bin/NetworkManager
# Process_id: 5067
#
### END INFO
nameserver 216.234.192.92
nameserver 216.234.213.130
You will want to add things the computer needs to know. It might look
like this:
192.168.0.3 prnt printer
192.168.0.2 comp
It looks about like this but the main thing to know is that DHCP can not
be trusted! You must give each item connected by the Internet an IP
number. And you must be able to ping everything from the computer.
Karl
--
Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
PGP 4208 4D6E 595F 22B9 FF1C ECB6 4A3C 2C54 FE23 53A7
More information about the ubuntu-users
mailing list