Re: hostname

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2003-01-17 at 12:47, Steve Sykes wrote:
> Thanks, now at boot they show the correct hostname, but the ip address
> still doesn't agree with what is set in the hosts file on the dhcp
> server.  I restarted the network so it should have picked up the correct
> ip shouldn't it?

No. The hosts file is only used for name resolution on the local host,
not client IP assignment.

If you want to assign a specific IP address to a specific machine
(regardless of hostname), then you need to configure your DHCP server to
do that -- usually, it is based on the MAC address of the network card
in the client machine. Depending on the DHCP server's capabilities, you
can assign an IP address based on the hostname passed to it by the
client.

Example 1:
I was my laptop to always have the IP 172.16.20.35. My PCMCIA card's MAC
address is 04:00:A2:36:BA:F0. I need to tell my DHCP server to reserve
the IP address 172.16.20.35 for MAC address 04:00:A2:36:BA:F0. In the
DHCP server, I can also assign the hostname based on the same MAC
address, or I can tell my laptop to use the hostname I want.

Example 2:
I have a DHCP server that allows me to assign an IP according the the
client hostname. In this case, I configure my laptop with a specific
hostname, Dedannshae. I tell my DHCP server to reserver the IP address
172.16.20.35 for hostname Dedannshae. When my laptop requests a DHCP
configuration, it sends its hostname with the request. Then the DHCP
server checks its list of known hostnames, and if it finds a match, it
will give my laptop the reserved IP (and any other configuration
specifics).

There are other issues to be aware of if you really want name resolution
to work correctly, but there's plenty of online documentation available.

-- 
Dave Sherman
MCSE, MCSA, CCNA
"If we wanted you to understand it, we wouldn't call it code."

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux