Re: How can I alocate a hostname based on MAC adress and DHCP?



On Thu, 26 Oct 2006 00:56:00 -0700, Andi wrote:

Hi, i have a small network (50 comps) and I want to alocate each
computer a hostname based on the MAC adress. Eg:
comp1.lab1.....etc,etc.... Even if somebody change the hostname, on the
next reboot the computer must take the hostname from the server based
on the MAC adress. Any ideas?
Thanks

The dhcpd server will let you assign an ip address and suggest
a host name based on the machines mac address. The box that
uses dhcpd to get it's ip address and host name may or may not
use the hostname... depends on how that box is configured.

Put an entry like:
host video.some.net {
hardware ethernet 00:0C:6E:4B:1F:70;
fixed-address video.some.net;
}
in your dhcpd.conf file and have the ip address for video.some.net
resolve to the name video.some.net and when the machine with that
mac address requests an ip address, it will get the one you assign
and get the name that goes with the ip address.

jack


--
D.A.M. - Mothers Against Dyslexia

see http://www.jacksnodgrass.com for my contact info.

jack - Grapevine/Richardson
.



Relevant Pages

  • How can I alocate a hostname based on MAC adress and DHCP?
    ... i have a small network and I want to alocate each ... computer a hostname based on the MAC adress. ... next reboot the computer must take the hostname from the server based ...
    (comp.os.linux.networking)
  • Re: /bin/hostname
    ... Find a real news server. ... in /etc/hosts that maps the host and the FQDN to the static IP ... Linux distributions are supposed to follow Linux Standard Base standards, ... hostname -- show or set the system's host name ...
    (comp.os.linux.networking)
  • Re: DBIx::DBH - Perl extension for simplifying database connections
    ... host that it would not connect using the host name and end up using TCP on ... The server name is ... important because I use the localhost name to match up with that, ... matches then don't add in the hostname to the connect string. ...
    (perl.dbi.users)
  • RE: setting host name during install?
    ... statement hostname= to /etc/rc.conf. ... is to build a FBSD gateway server, the name of this PC should be ... registered domain name on the public Internet (unless of course it's ... gateway.fbsdjones.com is a very acceptable fake host name to use. ...
    (freebsd-questions)
  • Compiler matter
    ... I tried to compile a simple hello world C program but the compiler looked ... for the old host name. ... Cannot find the license server ... The lookup for the hostname on the SERVER line in the ...
    (comp.unix.solaris)