3 DHCP Options and Sub-Options: Explained

Dynamic Host Configuration Protocol (DHCP) is one of the most important networking features that we use every day to automatically configure devices as they connect to the network. In order to make DHCP work the way we need it to, we employ a number of DHCP options that automatically tells our DHCP server how to treat different devices as they access the network.
These options tie into other services and can help to load images and operating system installations for network devices and point to important servers such as TFTP servers for files and configurations. The DHCP options that you select for your network will determine how much, or how little work you will need to manually carry out when provisioning new equipment.
We want to explore these DHCP options and sub-options, how they relate to the Juniper ecosystem of products, and how Juniper uses this technology to create automated network environments that are easier and more efficient to work on.
What Does DHCP Do?
At its core, DHCP delivers different settings to network devices through a series of options. From these options, things like IP addresses, subnets, default gateways, and DNS configurations are automatically provisioned to eligible devices that are connected to the network.
Each of these settings is accessed via DHCP options and sub-options, which Juniper network devices read when they are connected to the network. From this point on, the entire process is automated and each option and sub-option is read and executed as the network device continues on its configuration journey.
For home networks where there is very little additional information needed to configure a simple Wi-Fi network, having these options available doesn’t make all that much sense. But in massive corporate and enterprise networks where scaling up is essential, it can be the difference between a few hours of work to a few weeks of manual labor.
What DHCP Options and Sub-options Exist?
When we look at options for DHCP, we are referring to option numbers. Most people don’t realize that there are also sub-options to choose from as well. Option 43 is a prime example when it comes to Zero Touch Provisioning on a Junos device.
This option has sub-options that relate specifically to ZTP. The first sub-option of option 43 has to do with image configuration options for a Junos device. As an example, sub Option 00 could point to an image such as Junos 21.1R7 while sub-option 04 could point to Junos 20.2R4.
If both of these options were to be selected for some reason, then sub-option 00 would be selected by default, and the device would then request that version to be installed. Something to note about these sub-options is that they do not tell the Junos device where to get the image from, only what version it should be requesting.
Sub-option 03 takes us one step closer to getting the correct image, as it specifies what transfer protocol must be used. The choices for this sub-option include TFTP, FTP, and HTTP. Next, we need a different option from what is offered in option 43.
Instead, we must have specified Option 150 or 66 to show our Junos device where the software image location is on the network. The location must allow anonymous access as the Junos device will not have any credentials loaded onto it at this point. This brings up some security concerns and will mean that the location where this access is required should be segmented from the rest of the production network.
Next, a sub-option for a configuration file is needed. This suboption is again found within option 43, and is sub-option 01. When specifying this option, the configuration file will be loaded and will have the necessary settings preconfigured to allow the Junos device to connect to the network properly such as the config filename, DNS servers, NTP, and SNMP addresses.
The Junos image and configuration files will both be housed in the same location on the network, both of which are specified in option 150. Once the Junos device has been loaded to this point it can then join the network and take on any additional scripts and configurations that are needed.
Final Thoughts
We all know that DHCP makes our lives easier by automatically configuring IP addresses, subnets, and default gateways for internet access, but how often do we think about some of the deeper configuration capabilities that it has at its disposal?
By using Junos compatible hardware, network engineers can take full advantage of ZTP by simply racking up their equipment, plugging in the necessary network cables, and powering it on.
This hands-off approach saves thousands of hours in repetitive, tedious work, and ensures that there is a far less likelihood of there being any manual errors introduced into the installation process.
delivered to your inbox.
By submitting this form you agree to receive marketing emails from CBT Nuggets and that you have read, understood and are able to consent to our privacy policy.