Koozali.org: home of the SME Server

DHCP lease pool based on MAC addresses

Offline rmclay

  • *
  • 10
  • +0/-0
DHCP lease pool based on MAC addresses
« on: December 28, 2009, 06:09:41 PM »
Hello,

I am currently using SME Server 7.4 to PXE boot various devices from computers to cisco routers.  Based on this I would like to achieve the following:

 Have the DHCP pool give out IP addresses as normal, but based on the first 3 octets of the
 client MAC address, pass the relevant bootfile option to the client PC.  For example, if the
 MAC was in the range 00:0C:29:00:00:00 --> 00:0C:29:FF:FF:FF, it would pass the
 parameter pxelinux.0.  Whereas 00:AA:21:00:00:00 --> 00:AA:21:FF:FF:FF would be given
 the parameter startup-config.

 I am not looking to map certain MAC addresses to a fixed DHCP lease, as the MAC addresses will be constantly changing.  I will however, know the vendor's OUI and can use a MAC address range.  If the standard SME DHCP server does not handle this, I know the open source dualserver from http://dhcp-dns-server.sourceforge.net/ does support this method.

I have also noticed that the contrib at http://wiki.contribs.org/Tftp_server is out of date, but when trying to email the author, I receive an error saying the email address does not exist.  Is the another way to pass this message on...?

Thanks,
Robert

Offline tkibugu

  • *
  • 24
  • +0/-0
Re: DHCP lease pool based on MAC addresses
« Reply #1 on: December 28, 2009, 07:55:04 PM »
Hello, I found something interesting at http://ubuntuforums.org/showthread.php?t=675257. HTH

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: DHCP lease pool based on MAC addresses
« Reply #2 on: December 28, 2009, 10:29:02 PM »
A lot more on configuring dpcpd.conf can be found in the man file:
Code: [Select]
man dhcpd.conf
To make modifications stick you will have to modify copy of original template fragments in the templates-custom tree, more on this can be found in the SME Server Developers Guide linked in the wiki.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)