[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PXE boot debian-installer



Alok G. Singh wrote:
What I want to do is to deploy a dhcp+tftp server in the network that
people can boot into debian-installer via PXE. The idea is to have an
easy way to install Debian/Ubuntu without having to cart DVDs
around.
The DHCP server running on the router assigns addresses in the
192.168.1.0/24 subnet. I have setup another DHCP server to respond to
PXE in the same subnet. Now, how do I make sure the two DHCP servers
play nice together ? That is, the router's DHCP server should be used
unless DHCPREQUEST is from a PXE client.

The specifics are: dhcp3-server and tftp-hpa from Debian Lenny.


Alok:

On both DHCP servers set up different ranges that do *not* over lap. This will only work if you can set the router to ignore bootp requests and the Lenny DHCP to accept only bootp request (ignore booting requests) or visa versa.

From the documentation (man dhcpd.conf) the default Debian DHCP server will by default ignore "bootp" requests. This can be changed by using the "dynamic-bootp" flag. With this flag set it will accept both "booting" and "bootp" requests. There is no flag or command that I can find to ignore "booting" requests.

So if the router can be set to accept "bootp" and ignore "booting" then this should work.


Example:
Router "bootp" only -         range 192.168.1.50 192.168.1.100
Lenny DHCP "booting" only -   range 192.168.1.101 192.168.1.200


Another solution to this and the one that I use is to use only the default Lenny (Debian) DHCP server and enable "dynamic-bootp".

With this solution both "booting" and "bootp" clients will share the same range/pool of IP addresses. Since the "bootp" clients will become "booting" clients after OS installation then sharing IP addresses in the same range/pool is not an issue.


Here is and example:

# DHCP booting and tftpd bootp for Debian and other OS install

#Declare the subnet
subnet 192.168.1.0 netmask 255.255.255.0
{
	# Declare the range/pool for DHCP and set the "dynamic-bootp"
	# flag to boot bootp/netboot clients as well as booting clients
        range dynamic-bootp 192.168.20.40 192.168.20.200;

	# DHCP broadcast
        option broadcast-address 192.168.1.255;

	# Name of the DHCP server
        server-name netbootp;

	# IP address of the tftpboot server

        next-server 192.168.1.10;

	# Name of the boot file.
        filename "pxelinux.0";
}


Steven.




Reply to: