LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-06-2013, 07:22 PM   #1
RootMason
Member
 
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 123

Rep: Reputation: 5
What is wrong with this DHCP script?


Working on PXE booting I used this script from...

http://eduardo-lago.blogspot.com/201...-diskless.html

... as my test DHCP script. Worked fine for loading (though the test got stuck on my init setup...) the first time I tried it. I had made a backup of my working config & pxeboot config, so I could swap them in and out of dhcpd.conf as needed (until I learn how to put them together into one one working config). When I copied the dhcpd.conf_pxeboot_config back to dhcpd.conf I got the error the service could not be started.

So I was wondering... what is wrong with this script:

vi dhcpd.conf_pxeboot_config
# dhcpd.conf
#
# DHCP configuration file for ISC dhcpd
#

# Use this to enble / disable dynamic dns updates globally.
ddns-update-style none;

# Definition of PXE-specific options
# Code 1: Multicast IP address of boot file server
# Code 2: UDP port that client should monitor for MTFTP responses
# Code 3: UDP port that MTFTP servers are using to listen for MTFTP requests
# Code 4: Number of seconds a client must listen for activity before trying
# to start a new MTFTP transfer
# Code 5: Number of seconds a client must listen before trying to restart
# a MTFTP transfer
option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
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 = ip-address;

subnet 192.168.1.0 netmask 255.255.255.0 {

class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
option vendor-class-identifier "PXEClient";
vendor-option-space PXE;

# At least one of the vendor-specific PXE options must be set in
# order for the client boot ROMs to realize that we are a PXE-compliant
# server. We set the MCAST IP address to 0.0.0.0 to tell the boot ROM
# that we can't provide multicast TFTP (address 0.0.0.0 means no
# address).
option PXE.mtftp-ip 0.0.0.0;

# This is the name of the file the boot ROMs should download.
filename "pxelinux.0";

# This is the name of the server they should get it from.
next-server 192.168.1.5;
}

pool {
max-lease-time 86400;
default-lease-time 86400;
range 192.168.1.50 192.168.1.100;
allow unknown clients;
}

host rambox {
hardware ethernet 14:da:e9:af:02:f3;
fixed-address 192.168.1.201;
hostname rambox.sddomain.local;
}

}

#*************************************************************
#192.1168.1.5 = PXE server
#192.168.1.201 = PXE client

Last edited by RootMason; 07-06-2013 at 07:29 PM.
 
Old 07-06-2013, 07:39 PM   #2
RootMason
Member
 
Registered: Oct 2012
Location: Tucson, AZ
Distribution: Debian/CentOS
Posts: 123

Original Poster
Rep: Reputation: 5
vi /var/log/messages

Jul 5 12:24:12 sdserver dhcpd: WARNING: Host declarations are global. They are not limited to the scope you declared them in.
Jul 5 12:24:12 sdserver dhcpd: /etc/dhcp/dhcpd.conf line 56: expecting a parameter or declaration
Jul 5 12:24:12 sdserver dhcpd: fixed-address 192.168.1.201;
Jul 5 12:24:12 sdserver dhcpd: ^
Jul 5 12:24:12 sdserver dhcpd: Configuration file errors encountered -- exiting


Line 56 appears to have an error:

fixed-address 192.168.1.201;

But I use this same declaration in lots of other scenarios....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] DHCP client in wrong subnet AchimRS Linux - Networking 3 07-20-2010 01:29 PM
wrong dhcp assignment orielgalvez Linux - Newbie 2 02-02-2010 02:17 AM
getting a false/wrong ip address from dhcp groovie1971 Red Hat 6 12-25-2006 09:03 AM
Wrong server IP being sent in DHCP offer Garybtx Linux - Server 2 11-14-2006 11:29 PM
DHCP client gets wrong IP on reboot (SuSE 9.3) csdibiase Linux - Networking 3 08-07-2005 11:15 PM


All times are GMT -5. The time now is 11:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration