Support Downloads Community

UniFi Video is an obsolete product line.

This application and its related devices will no longer receive any manner of technical support, including functional and security updates. Additionally, there will be no further updates to Help Center content pertaining to UniFi Video.

EdgeRouter - Custom DHCP Server Options


Readers will learn how to add custom options to the DHCP server configuration.

  • Applicable to the latest EdgeOS firmware on all EdgeRouter models.

Add a DHCP Option

Back to Top

Four settings are required when configuring a DHCP server: 

  • name The name of the DHCP scope (LAN).
  • subnet The subnet range (
  • option <name/number> The DHCP option (Default Gateway, DNS, etc).
  • option <string> The value given to the DHCP option.

Below is an example on how to add option 242 to an existing DHCP configuration. The ISC manual page includes many more available options.

CLI: Access the Command Line Interface.You can do this using the CLI button in the GUI or by using a program such as PuTTY.

1. Enter configuration mode.


2. Add the DHCP option, in this case option 242.

set service dhcp-server global-parameters 'option option-242 code 242 = string;'
set service dhcp-server shared-network-name LAN subnet subnet-parameters 'option option-242 &quot;L2Q=1,L2QVLAN=118&quot;;'

3. Commit the changes and save the configuration.

commit ; save 
NOTE: The actual value of this DHCP option is option option-242 "L2Q=1,L2QVLAN=118";

The &quot; value is used to replace the quotation marks (") to allow a part of the string to be quoted inside the single quote (') section.

Related Articles

Back to Top

Intro to Networking - How to Establish a Connection Using SSH

EdgeRouter - DHCP Server Using Dnsmasq

EdgeRouter - UniFi Network DHCP Options

EdgeRouter - DHCP Relay

EdgeRouter - DHCP Server

Was this article helpful?
15 out of 35 found this helpful