PXE boot might not work with QFX and DHCP relay. This can be resolved by using delete-binding-on-renegotiation
. This article explains the reason for this behavior.
Offers from the proxy DHCP server are dropped and the PXE boot is not completed.
To explain the requirement of delete-binding-on-renegotiation
, we need to understand a few things regarding PXE boot.
For PXE boot to work, it requires two server units:
- A regular DHCP server that gives the IP address.
- A proxy DHCP server that sends details such as TFTP server IP, PXE boot server (in some Microsoft docs, named RIS).
The following briefly describes how PXE works:
A switch receives a DHCP discover from a client, which is relayed to both the DHCP server and the PXE boot server.
Both the DHCP and proxy DHCP servers reply with an offer.
Both offers are relayed to the client by the switch.
Now the client generates one request for each offer:
- To the DHCP server, it requests the IP address. This is acknowledged by the server, and we get the IP address.
- To the proxy server, it requests the PXE boot server. This is acknowledged by the proxy server, and we get the PXE boot server.
At this point, Junos OS has a DHCP relay binding entry.
After this, if a discover comes from the client, the switch forwards this to the servers and they reply with an offer. However, the switch only relays the DHCP offer from the server whose offer was accepted by the client. In the case of a PXE boot, offers from the proxy DHCP server will be dropped, and the PXE boot will not be completed.
To address this, we can use delete-binding-on-renegotiation
:
set forwarding-options dhcp-relay overrides delete-binding-on-renegotiation
With this, the client binding is removed on receiving a new DHCP discover packet from a client that is already in a bound state, and all offer messages in the reply are relayed back to the client.