DHCP Server Options of Vigor Router

By default, Vigor Router will be a DHCP server and automatically assign an IP address to the DHCP clients on LAN. In the DHCP packet, the router can include information other than the IP address, where can be customized from LAN General Setup. This article demonstrates how to configure the basic DHCP options, change lease time, clear DCHP lease from inactive clients, advanced options, and also use the router as a DHCP relay agent. (For DHCP reservation, please refer to the article Introduction to Bind IP to MAC

The Basic Options

You can change the common configuration at LAN >> General Setup >> Details Page, at the DHCP Server Configuration field. including The IP address pool, Subnet Mask (option 1), Router IP (option 3), Lease time (option 51) and Domain Name Server (option 6).

a screenshot of DrayOS LAN subnet settings
Change Default Lease Time

The default DHCP lease time is 86400 seconds (1 day), you can change the lease time at the General Set up page. Changing DHCP lease time can also be done by entering command srv dhcp leasetime xxx in the CLI, where xxx is the desired lease time in seconds, then enter sys reboot to restart the router.

Lease Time settings in LAN General Setup
Clear DHCP Lease from Inactive Clients

DrayOS also provides the option to reclaim the IP address from inactive clients to prevent the router from running out of IP address. It is especially useful for a network environment where client won't stay too long. When the option is enabled, the router will take the following actions when the IP pool has less than 30 IP addresses available:

  1. Check activities of DHCP clients by ARP requests every minute
  2. Clear DHCP lease when the client is not responding ARP replies
a screenshot of DrayOS
Advanced DHCP Options

For the advanced DHCP options which are not listed above, you can configure by going to LAN >> General Setup and clicking on "DHCP Server Option" button. (note: for older firmware version, it shows "Advanced" instead)

a screenshot of LAN setup page on DrayOS

To add a DHCP option to Customized List:

  • Check Enable
  • Select the LAN Interface you want to provide the DHCP option
  • Enter the Option Number
  • Select a Data Type according to the option requirements. (Check Appendix for some examples)
  • Enter the Data for DHCP option (Note: ASCII character ", ; and \ are not allowed due to security concerns. Please use HEX 22, 3B and 5C instead.)
  • Click Add to add the option into Customized List.
a screenshot of LAN setup page on DrayOS
DHCP Relay Agent

If you already have a DHCP server on your network, you can enable the router as a DHCP Relay Agent, and let the router forward DHCP request to the IP address specified. (DHCP Relay Agent also works over VPN, read the article here to learn more.)

Appendix - Examples of DHCP Options

 No.

 Option Name

 Datatype

 Data

 18

 Extensions Path

 ASCII

The path name, file name, and extension of the specified file, for example, "/path/2925001.cfg"

 33

 Static Route

 Address List

A pair of IP address separated by ",", where the first one is the destination IP, and the second is the router's IP, for example, "172.16.2.196, 172.16.2.1"

 66

 TFTP Server Name

 ASCII

The name of the TFTP server.

 67

 Bootfile Name

 Hexadecimal

The file name presented in hexadecimal format.

 119

 Domain Search

 Hexadecimal

The domain suffixes presented in hexadecimal with a number indicate the length in front of it. For example, "draytek.com" should be presented as "076472617974656b03636f6d" where 07 means there are 7 characters followed, 6472617974656b is "draytek", 03 means there are 3 characters followed, and 636f6d is "com"

 121

 Classless Static Route  Option

 Hexadecimal

The width of subnet mask, the significant portion of the subnet number, and the IP address of the router presented in hexadecimal value. For example, a route "172.16.196.0/24 via 172.16.2.1" should be presented as "18ac10c4ac100201", where 18 is the "24" in hex, ac10c4 is "172.16.196", and ac100201 is 172.16.2.1

 150

 TFTP Server Address

 Address List

The IP address of TFTP server.

The Basic Options

You can modify the standard LAN DHCP Server configuration here. This includes changing the IP address pool, Subnet Mask (option 1), Router IP (option 3), Lease time (option 51), and Domain Name Server (option 6). Additionally, you can define a DHCP pool for teleworkers (VPN).

Configutation
  1. Go to the Configuration / LAN /LAN Networks menu page
  2. Click on +Add to add a LAN profile.
  3. Enter required LAN details, including DHCP address range and gateway IP address.
Advanced Mode OFF

Advanced Mode ON

Advanced mode includes DHCP Lease Time and DHCP pool for teleworkers (VPN)

DHCP Relay Agent

You can set up the router as a DHCP Relay Agent if you have a DHCP server on your network. This will let the router forward DHCP requests to the specified IP address.

When a teleworker connects, they obtain an IP address in the following order:

  1. A static IP from their VPN profile
  2. An IP from the IP assignment for Teleworkers
  3. An IP via LAN DHCP (including DHCP relay).

Advanced DHCP Options

For the advanced DHCP options that are not listed above, you can configure them by going to the Configuration / LAN / DHCP Options menu page.

To add a DHCP option:

  1. Click on + Add (This will bring up a configuration menu)
  2. Enter the Option Number
  3. Select a Data Type according to the option requirements. (Check the Appendix section for some examples)
  4. Enter the Data for DHCP option
  5. (Note: ASCII character ", ; and \ are not allowed due to security concerns. Please use HEX 22, 3B and 5C instead.)
  6. Select the LAN where the option will be applied
  7. Click Apply to save the option.

Appendix - Examples of DHCP Options

 No.

 Option Name

 Datatype

 Data

 18

 Extensions Path

 ASCII

The path name, file name, and extension of the specified file, for example, "/path/2925001.cfg"

 33

 Static Route

 Address List

A pair of IP address separated by ",", where the first one is the destination IP, and the second is the router's IP, for example, "172.16.2.196, 172.16.2.1"

 66

 TFTP Server Name

 ASCII

The name of the TFTP server.

 67

 Bootfile Name

 Hexadecimal

The file name presented in hexadecimal format.

 119

 Domain Search

 Hexadecimal

The domain suffixes presented in hexadecimal with a number indicate the length in front of it. For example, "draytek.com" should be presented as "076472617974656b03636f6d" where 07 means there are 7 characters followed, 6472617974656b is "draytek", 03 means there are 3 characters followed, and 636f6d is "com"

 121

 Classless Static Route  Option

 Hexadecimal

The width of subnet mask, the significant portion of the subnet number, and the IP address of the router presented in hexadecimal value. For example, a route "172.16.196.0/24 via 172.16.2.1" should be presented as "18ac10c4ac100201", where 18 is the "24" in hex, ac10c4 is "172.16.196", and ac100201 is 172.16.2.1

 150

 TFTP Server Address

 Address List

The IP address of TFTP server.

Published On: Jul 17, 2018

Was this helpful?   


book icon

Related Articles