DD-WRT DHCP options

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
choman
DD-WRT Novice


Joined: 28 Jul 2006
Posts: 10
Location: Omaha, NE

PostPosted: Tue Sep 19, 2006 14:10    Post subject: DD-WRT DHCP options Reply with quote
I am looking to support PXE installs, which apparently require specific DHCP options....I would really like to keep my DD-WRT as my DHCP server. Which is successfully, resolving hostnames and aliases (A and CNAME).

Can anyone point be to the correct reference. Currently am trying to install ubuntu, fedora and windows (ick) accross the network.

_________________
sparticus
Sponsor
luky37
DD-WRT Novice


Joined: 12 Feb 2007
Posts: 15

PostPosted: Mon Feb 12, 2007 9:44    Post subject: DD-WRT DHCP with external TFTP Server for PXE Boot Reply with quote
U can easily use the dhcp server of DD-WRT (DNSMasq btw).


Enable Use DNSMasq for DHCP in Setup/Basic Basic and go to Administration/Services.

Enable the DNSMasq and add the following line in Additional DNS Options (not Additional DHCPd Options!):


Code:
dhcp-boot=pxelinux.0,,192.168.230.1



This option will load pxelinux.0 from the tftp server at 192.168.230.1 which is my configuration.




btw: you can find the dnsmasq manpages here

from the manpages:
Quote:
dhcp-boot=[net:<network-id>,]<filename>,[<servername>[,<server address>]]
Set BOOTP options to be returned by the DHCP server. Server name and address are optional: if not provided, the name is left empty, and the address set to the address of the machine running dnsmasq. If dnsmasq is providing a TFTP service (see --enable-tftp ) then only the filename is required here to enable network booting. If the optional network-id(s) are given, they must match for this configuration to be sent. Note that network-ids are prefixed by "net:" to distinguish them.



greetings
gondoi
DD-WRT Novice


Joined: 04 Mar 2007
Posts: 5

PostPosted: Sun Mar 04, 2007 17:12    Post subject: Reply with quote
Hi, I have set this up and I do not seem to be getting the correct information sent to my machine, actually, it doesn't look like it's getting any at all.

I started up a VMWare virtual box, and the PXE boot tries to get an IP from DHCP, but just times out. I have it bridged so it should be getting it's information from my dd-wrt router.

I have the option

Code:
dhcp-boot=pxelinux.0,slurms,192.168.1.70


That machine is set to get the same IP everytime. I also have tftp-hpa running with the correct files in place.

Is there anyway to test the DHCP to see if it's handing out the correct pxe information? A debug of sorts?

Or any other suggestions would be great.
luky37
DD-WRT Novice


Joined: 12 Feb 2007
Posts: 15

PostPosted: Sun Mar 04, 2007 18:59    Post subject: DHCP debugging Reply with quote
I suggest you a Sniffer to test the DHCP.


For Windows try Packetyzer or Wireshark.


It looks like this:




for DHCP boot, look at the option 'Next server IP address' and 'Boot file name'.


cheers!
gondoi
DD-WRT Novice


Joined: 04 Mar 2007
Posts: 5

PostPosted: Sun Mar 04, 2007 19:15    Post subject: Reply with quote
Ok, for the next-server, I'm getting 192.168.1.1.

Not sure where to go from here. Any suggestions on how to make the dnsmasq actually hand out the right thing? Is there any way dnsmasq and the default dhcp server could be clashing?
luky37
DD-WRT Novice


Joined: 12 Feb 2007
Posts: 15

PostPosted: Sun Mar 04, 2007 19:18    Post subject: Reply with quote
Are you shure that you are using DNSMasq and not DHCPd and that you add the following line in Additional DNS Options (not Additional DHCPd Options!)?


Goto Status/LAN and look at the line DHCP-Daemon (DHCP Status). It should be DNSMasq.


edit: what about the Boot file name?


cheers!
gondoi
DD-WRT Novice


Joined: 04 Mar 2007
Posts: 5

PostPosted: Sun Mar 04, 2007 19:28    Post subject: Reply with quote
Well, just call me dumb... I was putting it in the wrong options box. I had it in DHCPd options instead of DNS options.

Bit odd, but I guess it makes sense since it's a dnsmasq option.
luky37
DD-WRT Novice


Joined: 12 Feb 2007
Posts: 15

PostPosted: Sun Mar 04, 2007 19:30    Post subject: Reply with quote
yeah, its a bit confusing... adding DHCP option to Additional DNS options...

cheers!
valuequest
DD-WRT Novice


Joined: 04 Dec 2006
Posts: 16
Location: United States : southeastern Virginia

PostPosted: Sun Nov 09, 2008 3:34    Post subject: Reply with quote
OK... I am trying to PXE boot a machine with a BIOS flash file named bflash.2800 through my router running DD-WRT v24-sp1 vpn.

First question:
How can I determine whether this DD-WRT build that I am running does or does not have the 'enable-tftp' option support compiled in?

Second question:
A reference tells me that I need to have the DHCP server pass something like this back to the requesting PXE client:
Quote:
option netstation-boot-protocol code 211 = text;
group {
filename "bflash.2800";
next-server tftp-server;
option netstation-boot-protocol "tftp";
host netstation-8364-1
{hardware ethernet de:ad:be:ef:00:01;}}


I've read through the DNSMasq man page but I still don't quite understand what I need to do to translate the above into proper syntax for the DNSMasq options box in DD-WRT's web admin interface. From both the posts above and the DNSMasq man page I got as far as this:
Quote:
dhcp-boot = bflash.2800,,192.168.1.4 (<--static IP of tftp server running on a different machine than DD-WRT)

...but when I boot the machine with that single DNSMasq option it understandably complains that it didn't get the boot protocol data.

Might anyone provide some clue how I can get DNSMasq to send the proper options? I'd appreciate the help... thanks!


Last edited by valuequest on Sun Nov 09, 2008 13:46; edited 10 times in total
luky37
DD-WRT Novice


Joined: 12 Feb 2007
Posts: 15

PostPosted: Sun Nov 09, 2008 3:39    Post subject: Reply with quote
What exactly are you trying to do? Booting an image from another PC i guess?


Do you have a TFTP running on 192.168.1.4 (which is what - a PC or the DD-WRT machine)?

Did you check the log of the TFTP Server?
valuequest
DD-WRT Novice


Joined: 04 Dec 2006
Posts: 16
Location: United States : southeastern Virginia

PostPosted: Sun Nov 09, 2008 3:56    Post subject: Reply with quote
Hello luky37...
OK I've edited my post ^ which I hope clarifies somewhat I'm trying to do here. I am looking to PXE-boot the file named bflash.2800 currently sitting on 192.168.1.4 in /tftpboot. My DD-WRT router is sitting in between the two machines and I'm trying to figure out how to configure it to serve out all the the proper DHCP data for the task...

I am looking around my system for a tftp-server log but I don't see one... Hmmm... should I expect to find one?

Thanks!
luky37
DD-WRT Novice


Joined: 12 Feb 2007
Posts: 15

PostPosted: Sun Nov 09, 2008 14:26    Post subject: Reply with quote
valuequest wrote:
How can I determine whether this DD-WRT build that I am running does or does not have the 'enable-tftp' option support compiled in?


You don't neet to have the 'enable-tftp' option in dnsmasq, because the TFTP-Server will run on the 192.168.1.4, which would be a Linux/Windows machine where a tftp server is installed, and has the bflash.2800 in its root directory.


Quote:
dhcp-boot = bflash.2800,,192.168.1.4 (<--static IP of tftp server running on a different machine than DD-WRT)


this is absolutly enough (apart from activating DNSmasq as DHCP Server - go to Status/LAN and look at the line DHCP-Daemon (DHCP Status). It should be DNSMasq).

The DHCP Server will pass the following information to your boot client:

A TFTP server at 192.168.1.4 has the bootfile bflash.2800 in his TFTP root directory where you can boot from.


Then you need of course a tftp daemon running on that machine.

For Linux i would recommend tftpd-hpa (i think you will able to log verbose) and for windows tftpd32.



Keep in mind that the bootfile bflash.2800 must not be a floppy image! It must be a kernel image where a machine can boot from.


For PXE i would recommend PXELINUX with MEMDISK for booting a floppy image.
s7726
DD-WRT Novice


Joined: 18 Jun 2008
Posts: 5

PostPosted: Tue Nov 25, 2008 23:47    Post subject: Reply with quote
I am having trouble with getting DNSMasq to send back the proper info to the client.
Additional DNSMasq Options:
Code:

strict-order
dhcp-boot=pxelinux.0,192.168.1.147,192.168.1.147
dhcp-option=pxe,66,C0A80193
dhcp-option=pxe,67,pxelinux.0
dhcp-option=pxe,128,C0A80193
dhcp-option=pxe,150,C0A80193
dhcp-option=pxe,193,C0A80193

I have tried all different combinations and the client refuses to attempt connection to anything other than the router address (192.168.1.1). I have tried option 54 Server Identifier and DNSMasq will not send what I put. It will only send the router's address. Should it not take my direct input of options over it's own defaults?[/code]
luky37
DD-WRT Novice


Joined: 12 Feb 2007
Posts: 15

PostPosted: Wed Nov 26, 2008 0:20    Post subject: Reply with quote
like i wrote:

Code:
dhcp-boot=pxelinux.0,,192.168.1.147


delete the other lines!


Enable DNSMasq, check with Sniffer, check TFTP Logs, etc...
s7726
DD-WRT Novice


Joined: 18 Jun 2008
Posts: 5

PostPosted: Wed Nov 26, 2008 0:22    Post subject: Reply with quote
tried that first. Checked with wireshark. It's still trying to connect to the router (192.168.1.1) rather than the tftp server (192.168.1.147)
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum