LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 02-24-2014, 03:15 PM   #1
lukasbradley
LQ Newbie
 
Registered: Aug 2005
Posts: 5

Rep: Reputation: 0
PXE Boot Using DNSMasq


I'm attempting to boot machines from a server (192.168.1.45) over a network using PXE boot and DNSMasq. My network presently utilizes a DHCP server on a VPN/Firewall, so I don't want to run a DHCP server on the server itself.

When I start the client computer, it seems to connect to the server, but doesn't proceed with a boot. The remote computer just hangs showing "Start PXE over IPv4".

The /var/log/messages on the server shows the following.

Code:
Feb 24 15:10:45 localhost dnsmasq[14487]: started, version 2.48 DNS disabled
Feb 24 15:10:45 localhost dnsmasq[14487]: compile time options: IPv6 GNU-getopt DBus no-I18N DHCP TFTP "--bind-interfaces with SO_BIN
DTODEVICE"
Feb 24 15:10:45 localhost dnsmasq-dhcp[14487]: DHCP, proxy on subnet 192.168.1.255
Feb 24 15:11:20 localhost dnsmasq-dhcp[14487]: 3423833039 Available DHCP subnet: 192.168.1.255/255.255.255.0
Feb 24 15:11:20 localhost dnsmasq-dhcp[14487]: 3423833039 Vendor class: PXEClient:Arch:00007:UNDI:003016
Feb 24 15:11:20 localhost dnsmasq-dhcp[14487]: 3423833039 PXE(eth0) bc:5f:f4:97:be:ab proxy
Feb 24 15:11:20 localhost dnsmasq-dhcp[14487]: 3423833039 tags: eth0
Feb 24 15:11:20 localhost dnsmasq-dhcp[14487]: 3423833039 bootfile name: pxelinux.0
Feb 24 15:11:20 localhost dnsmasq-dhcp[14487]: 3423833039 next server: 192.168.1.45
Feb 24 15:11:20 localhost dnsmasq-dhcp[14487]: 3423833039 sent size:  1 option: 53:message-type  02
Feb 24 15:11:20 localhost dnsmasq-dhcp[14487]: 3423833039 sent size:  4 option: 54:server-identifier  192.168.1.45
Feb 24 15:11:20 localhost dnsmasq-dhcp[14487]: 3423833039 sent size:  9 option: 60:vendor-class  50:58:45:43:6c:69:65:6e:74
Feb 24 15:11:20 localhost dnsmasq-dhcp[14487]: 3423833039 sent size: 17 option: 97:client-machine-id  00:00:02:00:03:00:04:00:05:00:0
6:00:07...
Feb 24 15:11:20 localhost dnsmasq-dhcp[14487]: 3423833039 sent size: 10 option: 43:vendor-encap  06:01:08:0a:04:00:50:58:45:ff
Feb 24 15:11:24 localhost dnsmasq-dhcp[14487]: 3423833039 Available DHCP subnet: 192.168.1.255/255.255.255.0
Feb 24 15:11:24 localhost dnsmasq-dhcp[14487]: 3423833039 Vendor class: PXEClient:Arch:00007:UNDI:003016
Feb 24 15:11:24 localhost dnsmasq-dhcp[14487]: 3423833039 PXE(eth0) bc:5f:f4:97:be:ab proxy
Feb 24 15:11:24 localhost dnsmasq-dhcp[14487]: 3423833039 tags: eth0
Feb 24 15:11:24 localhost dnsmasq-dhcp[14487]: 3423833039 bootfile name: pxelinux.0
Feb 24 15:11:24 localhost dnsmasq-dhcp[14487]: 3423833039 next server: 192.168.1.45
Feb 24 15:11:24 localhost dnsmasq-dhcp[14487]: 3423833039 sent size:  1 option: 53:message-type  02
Feb 24 15:11:24 localhost dnsmasq-dhcp[14487]: 3423833039 sent size:  4 option: 54:server-identifier  192.168.1.45
Feb 24 15:11:24 localhost dnsmasq-dhcp[14487]: 3423833039 sent size:  9 option: 60:vendor-class  50:58:45:43:6c:69:65:6e:74
Feb 24 15:11:24 localhost dnsmasq-dhcp[14487]: 3423833039 sent size: 17 option: 97:client-machine-id  00:00:02:00:03:00:04:00:05:00:0
6:00:07...
Feb 24 15:11:24 localhost dnsmasq-dhcp[14487]: 3423833039 sent size: 10 option: 43:vendor-encap  06:01:08:0a:04:00:50:58:45:ff
The DNSMasq config is the following:

Code:
#set port to 0 so that dnsmasq knows its not being used as a dns server
port=0
log-dhcp
dhcp-range=192.168.1.255,proxy
#dhcp-boot=http://192.168.1.45/
enable-tftp
tftp-root=/var/lib/tftpboot
dhcp-boot=pxelinux.0,fileserver,192.168.1.45
The /var/lib/tftpboot directory:

Code:
drwxrwxr-x   3 root root     4096 Feb  4 10:35 .
drwxr-xr-x. 37 root root     4096 Feb 24 11:10 ..
-rw-r--r--   1 root root       97 Feb 24 15:02 boot.txt
drwxrwxr-x   3 root root     4096 Feb  4 10:35 debian-installer
-rw-r--r--   1 root root 24117248 Feb  4 10:35 mini.iso
-rw-r--r--   1 root root 13703974 Feb  4 10:35 netboot.tar.gz
lrwxrwxrwx   1 root root       33 Feb 24 15:07 pxelinux.0 -> debian-installer/amd64/pxelinux.0
lrwxrwxrwx   1 root root       35 Feb 24 15:07 pxelinux.cfg -> debian-installer/amd64/pxelinux.cfg
-rw-rw-r--   1 root root       64 Feb  4 10:35 version.info
My pxelinux.cfg configuration looks as follows:

Code:
# D-I config version 2.0
include debian-installer/amd64/boot-screens/menu.cfg
default debian-installer/amd64/boot-screens/vesamenu.c32
prompt 1
timeout 0
Any comments, suggestions, or insight appreciated.

Last edited by lukasbradley; 02-24-2014 at 03:17 PM. Reason: Clarification
 
Old 02-25-2014, 07:43 PM   #2
boethius
LQ Newbie
 
Registered: Oct 2005
Posts: 18

Rep: Reputation: 1
dnsmasq setup as proxyDHCP

dnsmasq can behave as a proxyDHCP server which sounds like what you want. You can continue to use your existing DHCP server and either have dnsmasq on the same network as the devices you're trying to PXE boot or you can DHCP relay to a dnsmasq server (i.e., ip helper in the Cisco world). Here is an example of a functional dnsmasq server setup to be a proxyDHCP server:

port=0
log-dhcp
dhcp-match=ipxe,175
dhcp-option=175,8:1:1
dhcp-boot=net:ipxe,http://mybootserver.domain.com/boot/ipxeboot/\${net0/mac}
dhcp-boot=tag:!Iipxe,ipxe.0
enable-tftp
tftp-root=/tftpboot
dhcp-range=192.168.0.0,proxy,255.255.0.0
dhcp-range=10.0.0.0,proxy,255.0.0.0
dhcp-range=172.16.0.0,proxy,255.255.0.0
pxe-service=net:#ipxe,x86PC,"Auto OS Deployment",ipxe-native

Dnsmasq's example configuration file details what each of these configuration options means. Note the example like this "dhcp-range=10.0.0.0,proxy,255.0.0.0" doesn't actually supplant or conflict with an existing DHCP server but merely facilitates proxyDHCP on that generic non-routable private network.

I'm showing my strong preference for iPXE here (ipxe.0 and ipxe-native.0, which I am compiling from the iPXE source) but you could just as easily use pxelinux for your network bootstrap.

Anyway, this works quite well in my experience and shows how useful proxyDHCP can be to be facilitate PXE booting without changing an existing DHCP environment (or, as is often the case, not even being able to change the existing DHCP environment).

Try it out and let me know if it works.
 
  


Reply



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
pxe boot "PXE-T01 file not found" ssharma_02 Linux - Networking 16 05-18-2011 03:21 PM
dnsmasq - PXE + redundant TFTP rs232 Linux - Networking 0 11-12-2010 10:29 AM
When I boot with PXE Boot into openSuse, error says 'invalid or corrupt kernel image' rfelsburg SUSE / openSUSE 0 05-13-2010 08:51 PM
starting dnsmasq at boot kola Linux - Software 3 07-17-2004 02:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:37 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration