[syslinux] without MAC addr in dhcpd.conf will not get IP addr

myothello myothello myothello2 at yahoo.com
Mon Mar 29 00:20:02 PST 2004


Sorry that I am very new to Linux.  OK.  I have tried
the dhcpd.conf as followed and it gives me lots of
error when I restart the dhcpd service.

My previous /etc/dhcpd.conf - when I commented out the
host client1 and client2, the client will not get the
dynamic ip address from server.
======================================================

allow booting;
allow bootp;
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option domain-name-servers 192.168.1.1;
option domain-name “TESTNUX.COM”;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.15 192.168.1.100;
}
group {
	next-server 192.168.1.1;
        filename “/pxelinux.0”;
#host client1 {
#	hardware Ethernet 00:60:97:d5:eb:41;
#	}
#host client2 {
#	hardware Ethernet 00:30:04:04:9d:5a;
#	}
}

New /etc/dhcpd.conf :
=========================
ddns-update-style ad-hoc;
allow booting;
allow bootp;
not authoritative;
DHCPD_INTERFACE = "eth0";

option space PXE;
option PXE.mtftp-ip code 1 = 192.168.1.1;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option PXE.discovery-control code 6 = unsigned integer
8;
option PXE.discovery-mcast-addr code 7 = 192.168.1.1;

class "PXE" {
match if substring (option vendor-class-identifier, 0,
9) = "PXEClient";
filename "/pxelinux.0";
option vendor-class-identifier "PXEClient";
vendor-option-space PXE;
option PXE.mtftp-ip 0.0.0.0;
next-server 192.168.1.1;
}

class "known" {
match hardware;
one-lease-per-client on;
ddns-updates on;
ddns-domainname = "TESTNUX.COM";
ddns-hostname=TESTNUX;
option fqdn.no-client-update on;
set vendor_class_identifier = option
vendor-class-identifier;
}

shared-network "mynetwork" {
subnet 192.168.1.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option domain-name-servers 192.168.1.1;
option domain-name "TESTNUX.COM";
default-lease-time 600;
max-lease-time 7200;

pool {
   	range 192.168.1.15 192.168.1.100;
	allow members of "PXE";
	deny members of "known";
     }
					}
				}

errors for new dhcpd.conf :
=============================
Starting dhcpd: Internet Software Consortium DHCP
Server 2.0pl5
Copyright 1995, 1996, 1997, 1998, 1999 The Internet
Software Consortium.
All rights reserved.

Please contribute if you find this software useful.
For info, please visit
http://www.isc.org/dhcp-contrib.html

/etc/dhcpd.conf line 1: expecting a parameter or
declaration.
ddns-update-style 
^
/etc/dhcpd.conf line 5: expecting a parameter or
declaration.
DHCPD_INTERFACE 
^
/etc/dhcpd.conf line 7: no option named space
option space PXE;
       ^
/etc/dhcpd.conf line 8: no vendor named PXE.
option PXE.mtftp-ip 
           ^
/etc/dhcpd.conf line 9: no vendor named PXE.
option PXE.mtftp-cport 
           ^
/etc/dhcpd.conf line 10: no vendor named PXE.
option PXE.mtftp-sport 
           ^
/etc/dhcpd.conf line 11: no vendor named PXE.
option PXE.mtftp-tmout 
           ^
/etc/dhcpd.conf line 12: no vendor named PXE.
option PXE.mtftp-delay 
           ^
/etc/dhcpd.conf line 13: no vendor named PXE.
option PXE.discovery-control 
           ^
/etc/dhcpd.conf line 14: no vendor named PXE.
option PXE.discovery-mcast-addr 
           ^
/etc/dhcpd.conf line 16: expecting a parameter or
declaration.
class 
^
/etc/dhcpd.conf line 25: expecting a parameter or
declaration.
class 
^
/etc/dhcpd.conf line 44: expecting a parameter or
declaration.
pool 
^
Configuration file errors encountered -- exiting
exiting.


--- Erwan Velu <erwan at mandrakesoft.com> wrote:
> > I do not wish to key in
> > thousands of MAC address in the dhcpd.conf when I
> > implement this.  Any help?  Thanks. 
> 
> Have a look at
>
http://clic.mandrakesoft.com/documentation/pxe/ch04.html#id2756352
> There is a sample dhcpd.conf that works here :)
> -- 
> Erwan Velu
> Linux Cluster Distribution Project Manager
> Mandrakesoft
> 43 rue d'aboukir 75002 Paris
> Phone Number : +33 (0) 1 40 41 17 94
> Fax Number   : +33 (0) 1 40 41 92 00
> Web site     : http://www.mandrakesoft.com
> OpenPGP key  : http://www.mandrakesecure.net/cks/ 
> 




__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html




More information about the Syslinux mailing list