4

How does a DHCP service need to be configured, so that it handles PXE requests while there is still another DHCP server on the network?

I managed to set up a working PXE system in a separate environment (one server for DHCP, TFTP and HTTP, one switch and one client) and I'm currently trying to integrate my system into our large corporate network.

There are existing DHCP appliances in the network and I have to make sure that my DHCP service won't interfere with the existing DHCP processes.

Up until now, my config defined a subnet from 192.168.2.0 to 192.168.2.255/24 with IPs given from 10 to 40. Finally, the machine that was running the services (192.168.2.1) was set as next-server and the filename was set to the iPXE binary I used (undionly.kpxe).

Now I would guess that, when using it only as a PXE server, I don't need to lease IPs anymore and therefore the only two settings that remain are next-server and filename. But I can't think of what I need these setting to encapsulate in (the former subnet definition). Can I write the settings just without any subnet / host block or is there an "accept all"-subnet or something similar?

More information:

  • OS: SLES 11.2
  • Network boot firmware: iPXE 1.0.0
  • Previous DHCP config
  • Network hardware: Mainly Cisco switches

Note: From the discussion with kockiren I gathered that what I want is possible by using a proxy DHCP but that the default DHCP service doesn't support it. I now configured my server according to his link as a proxy DHCP with Dnsmasq (Here) .

1

2 Answers 2

2

You cannot work with two DHCP servers in one network. There are some options to achieve the goal:

  1. You can build a VLAN for your PXE Environment (with PXE/DHCP Server) and a second VLAN for your productive environment.

  2. You can configure your productive DHCP for your PXE Environment, set BOOT address of your PXE Server

  3. You can configure two different Networks (physical) for both environments

UPDATE: You can set your DHCP Proxy with Dnsmasq on your PXE Server

4
  • Interesting, I thought that what Wikipedia describes as a proxy DHCP in its PXE article would mean having 2 DHCPs in a network. Is that not true and what is a proxy DHCP then exactly? Also, from the paragraph about integration, the sentence "it can be used in the same network as an existing DHCP environment without interference" made me think that it should be possible. Am I misinterpreting something here?
    – RikuXan
    Dec 9, 2013 at 12:58
  • Yes you can use a proxy DHCP but if your Client request a DHCP Ticket the lease come from the closest DHCP Server, it is possible that your client get a DHCP Lease from the first DHCP Server and not from your proxy. So you should set a VLAN for your PXE Environment and all your PXE Clients get the right Lease from your proxy (who forward the request to the primary DHCP)
    – kockiren
    Dec 9, 2013 at 13:17
  • From this tutorial (ipxe.org/howto/dhcpd ; the paragraph Speeding up DHCP) it seems that PXE should wait on a possible proxy DHCP answer. Would you see any other problems with a proxy DHCP, except for the ambiguity on who sends the first answer? But my actual problem is basically that even if it should work, I don't quite know how to implement it in a dhcpd config.
    – RikuXan
    Dec 9, 2013 at 13:28
  • To configure DHCPProxy you should use dnsmasq. But the better way is to split into VLANs and then use DHCPproxy, I think.
    – kockiren
    Dec 9, 2013 at 13:43
0

Cisco switches should support DHCP snooping. Check your model manual for details.

With this feature you can control DHCP propagation. If all your PXE environment lives on a separate switch you can set an adjacent port pair on its Uplink as untrusted, thus disabling DHCP communication through this Uplink.

2
  • The final PXE system should supply all the PCs which normally are supplied by the main DHCP as well. The separated environment was only meant as a testing environment for me to play around with settings etc.
    – RikuXan
    Dec 10, 2013 at 14:25
  • @RikuXan Yes, my post was about safe dhcp testbed transparently bound to prodution subnet. For final production I would prefer option N2 from kockiren's answer. I do not see any problem to encapsulate PXE reference parameters into subnet declarations or something else. DHCP proxy setup looks much more cumbersome.
    – Veniamin
    Dec 10, 2013 at 16:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .