Skip to content
Ainar Garipov edited this page Dec 29, 2020 · 11 revisions

AdGuard Home - DHCP Server

AdGuard Home can be used as a DHCP server. This page describes how to do that.

  1. Make sure that you run an OS on which AdGuard Home supports DHCP. We currently don't support DHCP on Windows.
  2. Make sure that your machine has a static IP address.

By default, AdGuard Home will set itself as the DNS server for the DHCP clients. The default lease time is 24 hours.

See the DHCP section in the configuration article for the overview of the DHCP configuration options. There are several configuration parameters for DHCP that can't be set via the AdGuard Home administrator dashboard. Those are described below.

The options field accepts two types of values: hex and ip. Both start with the CODE, which MUST be an integer in the [1, 255] range.

See RFC 2132, sec. 3.

The hex format is:

CODE hex HEX_VALUE

For example, to set option 6, the DNS server, to two IP addresses, 1.2.3.4 and 1.2.3.5, use:

#
'dhcp':
  #
  'dhcpv4':
    #
    'options':
    - '6 hex 0102030401020305'

The ip format is:

CODE ip IPV4_VALUE

For example, to set option 6, the DNS server, to one IP address, 1.2.3.4, use:

#
'dhcp':
  #
  'dhcpv4':
    #
    'options':
    - '6 ip 1.2.3.4'

An easier format for multiple IP addresses is planned, see issue #2395.

The option dhcp.dhcpv6.ra_slaac_only, if true, sends RA packets forcing the clients to use SLAAC. The DHCPv6 server won't be started in this case.

The option dhcp.dhcpv6.ra_allow_slaac, if true, sends RA packets allowing the clients to choose between SLAAC and DHCPv6.

You can reach machines in the network more easily using the hostnames they send in the DHCP requests with the .lan top-level domain. For example, if you have a machine called “workstation” in the network, and it sends a DHCP request with option 12 set to workstation, you can reach it over HTTP on the host http://workstation.lan.

Configuring custom TLDs instead of the .lan one is planned, see issue #2393.