Automatic configuration update with DHCP Option 66

HP switches are initially booted up with the factory-shipped configuration file. This feature provides a way to automatically download a different configuration file from a TFTP server using DHCP Option 66. The prerequisites for this to function correctly are:

  • One or more DHCP servers with Option 66 are enabled

  • One or more TFTP servers have the desired configuration file


[CAUTION: ]

CAUTION: This feature must use configuration files generated on the switch to function correctly. If you use configuration files that were not generated on the switch and then enable this feature, the switch may reboot continuously.


Enabling configuration file update using Option 66

DHCP Options 66/67 allows an option to include an IP address of a TFTP Server (Option 66) and the name of a configuration file (Option 67) in a DHCP ACK packet. After the switch has completed the DHCP transaction on the Primary VLAN, the two options will cause the switch to download the configuration file from the TFTP server. After the configuration file has been successfully downloaded, the switch compares the contents of the new configuration file with the existing configuration file. If the contents are different, then the existing configuration file is replaced with the new file and the switch initiates a reboot.

To enable the configuration update using Option 66 use the following command:

Syntax

[no]dhcp config-file-update

Default: Enabled with DHCP option values populated by default.

Possible scenarios for updating the configuration file

The following table shows various network configurations and how Option 66 is handled.

Scenario Behavior
Single Server serving Multiple VLANs
  • Each DHCP-enabled VLAN interface initiates DHCPDISCOVER message, receives DHCPOFFER from the server, and send DHCPREQUEST to obtain the offered parameters.

  • If multiple interfaces send DHCPREQUESTs, it’s possible that more than one DHCPACK is returned with a valid Option 66.

  • Evaluating and updating the configuration file occurs only on the primary VLAN.

  • Option 66 is ignored by any interfaces not belonging to the primary VLAN.

Multiple Servers serving a Single VLAN
  • Each DHCP-enabled VLAN interface initiates one DHCPDISCOVER and receives one or more DHCPOFFER messages.

  • Each interface accepts the best offer.

  • Option 66 is processed only for the interface belonging to the primary VLAN.

Multiple Servers serving Multiple VLANs
  • Each DHSP-enabled VLAN interface initiates DHCPDISCOVER and receives one or more DHCPOFFER messages.

  • Each interface accepts the best offer.

  • Option 66 is processed only for the interface belonging to the primary VLAN.

Multi-homed Server serving Multiple VLANs
  • The switch perceives the multi-homed server as multiple separate servers.

  • Each DHCP-enabled VLAN interface initiates DHCPDISCOVER and receives one DHCPOFFER message.

  • Each interface accepts the offer.

  • Option 66 is processed only for the interface belonging to the primary VLAN.

Operating notes

Replacing the existing configuration file: After the DHCP client downloads the configuration file, the switch compares the contents of that file with the existing configuration file. If the content is different, the new configuration file replaces the existing file and the switch reboots.

Option 67 and the configuration file name: Option 67 includes the name of the configuration file. If the DHCPACK contains this option, it overrides the default name for the configuration file (switch.cfg)

Global DHCP parameters: Global parameters are processed only if received on the primary VLAN.

Best Offer: The "Best Offer" is the best DHCP or BootP offer sent by the DHCP server in response to the DHCPREQUEST sent by the switch. The criteria for selecting the "Best Offer" are:

  • DHCP is preferred over BootP

  • If two BootP offers are received, the first one is selected

  • For two DHCP offers:

    • The offer from an authoritative server is selected

    • If there is no authoritative server, the offer with the longest lease is selected

Log messages

The file transfer is implemented by the existing TFTP module. The system logs the following message if an incorrect IP address is received for Option 66:

"Invalid IP address <ip-address> received for DHCP Option 66"