Set up dhcpd as TFTP/BOOTP server only

Alexandre Rames arames at solarflare.com
Tue May 7 13:56:14 UTC 2013


Hello,

I am trying to create a setup with separate DHCP, proxyDHCP, and TFTP servers.

- DHCP server (192.168.128.69) uses dhcpd with /etc/dhcpd.conf:
subnet 192.168.128.0 netmask 255.255.255.0 {
     interface eth1;
     range 192.168.128.5 192.168.128.50;
     next-server 192.168.128.126;
     # Point to the proxy DHCP
     server-identifier 192.168.128.126;
     option vendor-class-identifier "PXEClient";
}

- proxy DHCP server uses dnsmasq with /etc/dnsmasq.conf:
dhcp-no-override
interface=eth1
# Disable DNS.
port=0
log-dhcp
dhcp-range=192.168.128.126,proxy
# proxy DHCP is expected to listen on port 4011, and should still reply on port 68.
dhcp-alternate-port=4011,68
enable-tftp
tftp-root=/var/lib/tftpboot

pxe-prompt="dnsmasq pxe-prompt:"
pxe-service=x86PC, file1, 0, 192.168.128.127
pxe-service=x86PC, file2, 1, <other ip>


With these two the client successfully gets an address, contacts the proxyDHCP, and after an item has been selected from the PXE 
menu emits a DHCP/BOOTP request to 192.168.128.127 on port 4011.

Now I am trying - without success - to configure dhcpd on 192.168.128.127 to answer to the DHCP/BOOTP request emitted by the 
client and provide the filename required.

The attempt /etc/dhcpd.conf looks like:
allow bootp;
allow booting;
subnet 192.168.128.0 netmask 255.255.255.0 {
         interface eth1;
         local-port 4011;
         host host1 {
                 hardware ethernet <client's MAC>;
                 filename "file1";
         }
}

But with this (or without the 'local-port') 192.168.128.127 replies with an 'ICMP port unreachable' error.
Can anyone help me with this? Can dhcpd even do that?

Thanks,

Alexandre


More information about the dhcp-users mailing list