[ILUG] DHCP server in Perl?

Braun Brelin bbrelin at gmail.com
Mon Feb 2 12:31:37 GMT 2009


Gavin, et. al,

Here's what my relevant entry in the dhcpd.conf file looks like:


group laptops {
  filename "pxelinux.0";
  next-server 192.9.200.1;
  option domain-name "example.org";
  option domain-name-servers 192.9.200.20, 192.9.200.21;
  host laptop1 {hardware ethernet 00:22:64:67:E7:C0; }
}


Note that this is a one time thing as it's only being used to install Ubuntu
on the laptops via the network.  Once they're installed, then they'll use
their ISP's DHCP
server to actually get real IP addresses.

What'd I'd like is not to have to add

laptop2:  <MAC Address>
laptop3:  <MAC Address>
.
.
.
laptop575 <MAC Address>

to the dhcpd.conf file manually, instead, I'd like the DHCP server to

a.  Receive the DHCP request packet
b.  Check the dhcpd.conf file to see if it already has this mac address
listed.
c.  If not, add a laptopx <MAC Address> line into the file
d.  serve the DHCP request.

Braun

On Mon, Feb 2, 2009 at 12:23 PM, Gavin McCullagh <gmccullagh at gmail.com>wrote:

> Hi,
>
> On Mon, 02 Feb 2009, Braun Brelin wrote:
>
> > I've been designing a network installation using PXEBoot and a preseed
> > configuration file.
>
> > i've mostly got that bit working, but the largest hurdle remaining is
> that
> > in order for the DHCP server to work, it seems to require the MAC
> addresses
> > of the laptops.
>
> This seems hard to believe so I presume I don't understand yet.  What
> exactly doesn't work?  Do you want different info served depending on
> whether the DHCP server has seen the host before or something?
>
> > I haven't got them, so either I have to enter all 575
> > addresses to the dhcpd.conf file manually, or, somehow hack some code to
> > create a DHCP
> > server with an extra bit that reads the MAC addresses and automatically
> > sticks them into the dhcpd.conf file i.e. an "auto discovery" mechanism.
>
> This is the dhcpd leases file, no?
>
> Gavin
>
> --
> Irish Linux Users' Group mailing list
> About this list : http://mail.linux.ie/mailman/listinfo/ilug
> Who we are : http://www.linux.ie/
> Where we are : http://www.linux.ie/map/
>



More information about the ILUG mailing list