Networking Forums

Networking Forums > Computer Networking > Linux Networking > How can I alocate a hostname based on MAC adress and DHCP?

Reply
Thread Tools Display Modes

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

 
 
Andi
Guest
Posts: n/a

 
      10-26-2006, 07:56 AM
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

 
Reply With Quote
 
 
 
 
Jack Snodgrass
Guest
Posts: n/a

 
      10-26-2006, 08:23 AM
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
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Static IP-adress shows as DHCP setting in TCP/IP under the NIC. Morten Wiingreen Windows Networking 1 06-11-2008 12:09 PM
Prevent access to linux server when mac adress does not match ip adress kris houben Linux Networking 8 11-08-2006 06:52 PM
Migrate from DHCP Superscope to VLAN Based DHCP Scopes =?Utf-8?B?QWRyaWFuIE1hcnRpbmV6?= Windows Networking 0 03-17-2005 03:55 AM
My hostname not being registered via DHCP UncleStoner Linux Networking 9 02-03-2005 03:42 AM
DHCP: overriding hostname of clients Stefan Bellon Linux Networking 4 10-24-2004 12:41 PM



1 2 3 4 5 6 7 8 9 10 11