---
title: "Dynamic Host Configuration Protocol (DHCP) on the ANAP"
canonical: "https://docs.aryaka.com/space/KNOW/1300234274/Dynamic%20Host%20Configuration%20Protocol%20(DHCP)%20on%20the%20ANAP"
format: markdown
---
The ANAPs at your sites can be configured to run DHCP services. You can configure the VLANs at a site to host either a DHCP server or DHCP relay. A DHCP server automatically assigns IP addresses to devices that connect to your network. When a device (client) and DHCP server are located on different subnets, you can assign a DHCP relay agent to act as a client-server interface that forwards DHCP requests and replies between the client and the DHCP server. A site's ANAP can be configured to act as a DHCP server for the VLANs at your site. It can also be configured to relay DHCP requests to a DHCP server at a remote site or to a DHCP server at a local site, as long as the DHCP server at the local site is not configured on an ANAP.  DHCP services are only available for sites deployed in edge routed mode or inline routed mode. DHCP servers ANAPs can support up to 32 zones (either VPN or DMZ zones). The VLANs within a zone can have a unique DHCP server configuration.  The following graphic depicts an example configuration where the VLANs within the VPN 0 zone are configured as DHCP servers with their own subnets configured. These subnets could be used to assign IP addresses to corporation devices (such as VOIP and printers) and users. Additionally, the VLAN within the DMZ 0 zone is configured as a DHCP server to assign IP addresses to guest users. Subnets, DNS servers, DHCP lease durations, and other attributes can be configured based on the type of device or user connecting to the ANAP. You can modify the DHCP server configuration for a VLAN in MyAryaka. See  Configure DHCP  for step-by-step instructions on configuring a DHCP server for a VLAN. Configuration To configure a DHCP server for a VLAN, you must provide information about the subnet and a range of IP addresses that can be assigned to DHCP clients for that subnet. You can define the following fields when configuring a DHCP server: Next Hop—The IP address of the adjacent router or device that packets should be forwarded to along the path to their final destination on the subnet. At least one IP address is required, but you can enter up to 10. The next hop can be either the local switch or the ANAP’s IP address depending on your site’s topology. Domain Name Server—The IP addresses of domain name servers that are available to DHCP clients. You can enter up to 10 IP addresses. The servers can be hosted at the site where you are configuring DHCP, on the internet, or at a remote site. You cannot use the ANAP as a domain name server. Lease Time—The amount of time a DHCP server provides a client an IP address. When you configure a DHCP server for a VLAN, you can define a default, minimum, and maximum lease time. If you do not define these lease times, the following values are used: Default—One day (86,400 seconds) Maximum—One day (86,400 seconds) Minimum—Five hours (300 seconds) Client Netmask—The subnet mask that is assigned to clients. If the client netmask is not defined, the client is assigned a netmask that matches the subnet being configured. Domain Name—The domain name assigned to clients.  Next Server (DHCP Option 66)—The next server the client should contact in its boot sequence. This is typically a  bootp  or  tftp  server. You cannot use an ANAP as the next server. File Name (DHCP Option 67)—The filename to request from the server defined in the Next Server field.  Domain Search—Domain suffixes that the client can search when resolving hostnames. You can enter up to 10 strings in this field. Note that not all clients support this field, for example, EL5 type clients. NetBIOS Name Server—The NetBIOS servers that are available to clients. NetBIOS allows applications located on different computers to communicate over a LAN. You can select up to 10 servers.   Range Information—The pool of IP addresses within the subnet that can be leased to clients. Each pool can be configured with dynamic  bootp  to allow the addresses in the pool to be dynamically assigned to  bootp  clients and DHCP clients. Static Host Assignment—Assign specific hosts a predefined IP address. Addresses included in this table are not available for handoff to other clients. DHCP relay You can use DHCP relay to forward client requests to a DHCP server hosted on the same zone but at a different site.  The following graphic depicts an example configuration where the VLANs in the VPN 0 zone are configured in DHCP relay mode. They can point to any 10 DHCP servers, hosted on either a remote site or local site. Inter-VLAN communication must be enabled for VPN 0 and DMZ 0 such that that VLAN 222’s requests can be relayed through VLAN 333 to the local DHCP server. You can modify the DHCP relay configuration for a VLAN in MyAryaka. See  Configure DHCP  for step-by-step instructions on configuring DHCP relay for a VLAN. Configuration The only configuration required for DHCP relay is to specify up to 10 servers that DHCP requests can be forwarded to. Note that you must specify at least one server.  A DHCP server hosted on the ANAP of a local or remote site cannot be used as the server for relayed VLANs.  You can configure the following additional settings, if needed: Append Agent Option—Select whether an agent option field is appended to each client request before it is forwarded to the server. Any agent option fields included in responses from servers to clients are removed before the response is forwarded to the client. The agent option field contains two agent options: Circuit ID and Remote ID. The Circuit ID is the name of the interface on which the client request was received. The Remote ID is the MAC address of the switch from which the request was received. Although clients support the Remote ID, it is not used by default. If you do not configure this field, the agent option fields is not appended to forwarded requests. Drop Foreign Agent—Select whether packets from upstream servers are dropped if they contain relay agent options that indicate they were generated in response to a query that came from a different relay agent. If you do not configure this field, the packets are not dropped.  Relay Agent Option Handling—Select how to handle incoming DHCPv4 packets that contain relay agent options. If the packet does not have a gateway IP address (giaddr) field in its header, the packet is discarded. If there is a giaddr field, the relay agent can handle the situation in one of the following ways: Append (default)—Relay options are appended to the incoming packet’s existing option field. Replace—The incoming packet’s agent option field is replaced. Forward—The incoming packet is forwarded as is. Discard—The incoming packet is discarded. None—The field is ignored.  Deploying a DHCP server and DHCP relay at a site You can configure both DHCP server and DHCP relay within the same zone.  The following graphic depicts an example configuration where the VPN 0 zone hosts VLAN 0, configured for DHCP relay, and VLAN 222, configured as a DHCP server. VLAN 0 acts as relay for corporation users and forwards requests to the DHCP servers at the remote site. VLAN 222 acts as a local DHCP server for testbed and QA devices. Additionally, the DMZ 0 zone hosts a DHCP server that assigns IP addresses to guest devices.  If you configure a DHCP server and relay within a zone, you can customize the DHCP relay configuration for each VLAN. When customizing this configuration, you can select all relevant VLANs, specify if the configuration is for a specific interface of the ANAP, and specify up to 10 relay server IP addresses for each VLAN.  Status When DHCP is configured, you can view the status of DHCP servers on a site’s Status page in MyAryaka. See  View a site’s status  for instructions on accessing this page. On a site’s Status page, the DHCP and DNS tab displays details about the current DHCP service including the zones configured to use the DHCP server and the associated subnets and IP address pools.  Alerts You can configure MyAryaka to create an alert if your DHCP service experiences the following issues: A service outage. A DHCP pool is running low on available IP addresses to hand off. Navigate to Global Settings > Alert Management in MyAryaka to configure DHCP alerts. See  Alert management  for instructions on configuring alerts. In this topic Related topics Configure DHCP