---
title: "Enabling Recursive Resolution Using EDNS Client Subnet (ECS) Option"
canonical: "https://docs.infoblox.com/space/BloxOneDDI/186844311/Enabling%20Recursive%20Resolution%20Using%20EDNS%20Client%20Subnet%20(ECS)%20Option"
format: markdown
---
<span style="color: #000000">The EDNS Client Subnet (ECS) option is a DNS extension you use to optimize recursive resolution for query sources that are not topologically close to the recursive resolvers. When you enable ECS for recursive resolution, the application includes subnet information of the NIOS-X Server that originates a DNS query. Thus, your recursive resolver can perform geotargeting by passing the subnet information to authoritative servers so that the response will be more optimized for the end clients. For example, when you enable ECS and/or ECS forwarding on your recursive resolver, CDNs (Content Delivery Networks) can deliver content faster and more efficiently to the end user by providing information about the end user's subnet to the authoritative DNS server operated by the CDNs.</span>

<span style="color: #000000">You can enable the application to handle recursive queries using the ECS option and enable ECS forwarding support. You can then add whitelisted zone names that are subject to ECS recursion and specify the source prefix length for IPv4 and IPv6 addresses. Make sure you enter only apex zones. Example: </span><span style="color: #000000">[test.com](http://foo.com)</span><span style="color: #000000">, </span><span style="color: #000000">[example.com](http://example.com)</span><span style="color: #000000">, etc. The whitelisted zone name indicates the zone to which ECS tagged queries must be sent.</span>

<span style="color: #000000">Note the following while adding whitelisted zone names:</span>

- <span style="color: #000000">ECS options are sent only when the name being queried, and the apex of the zone being queried both match ECS zones. For example, if the zone "</span><span style="color: #000000">[example.com](http://foo.com)</span><span style="color: #000000">" contains a subdomain "</span><span style="color: #000000">[www.](http://www.foo.com)</span><span style="color: #000000">[example](http://foo.com)</span>.com", then you must configure "<span style="color: #000000">[example](http://foo.com)</span>[.com](http://foo.com)" as ECS zone and not "[www.](http://www.foo.com)[example](http://foo.com).com". The latter configuration might result in no ECS queries being sent, because the apex zone, "<span style="color: #000000">[example](http://foo.com)</span>[.com](http://foo.com)" does not match with "[www.](http://www.foo.com)[example](http://foo.com).com".
- <span style="color: #000000">Queries for subdomains of the specified zone name, with prefix lengths greater than the specified prefix length is not applicable for the subdomains of the specified zone name. For example, if you specify “</span><span style="color: #000000">[example.com](http://foo.com)</span><span style="color: #000000">” with IPv4 prefix length 20, then IPv4 queries with prefix length greater than 20 is not applicable for the subdomains of “</span><span style="color: #000000">[example.com](http://foo.com)</span><span style="color: #000000">”.</span>
- <span style="color: #000000">You can exclude certain subdomains by adding a leading exclamation mark (!) to the subdomain name. For example: ! </span><span style="color: #000000">[foo.example.org](http://foo.example.org)</span><span style="color: #000000">, ! </span><span style="color: #000000">[foo.test.com](http://test.foo.com)</span><span style="color: #000000">, etc.</span>

## <span style="color: #000000">Guidelines for Using ECS and ECS Forwarding</span>

<span style="color: #000000">The following are the guidelines for using ECS and ECS forwarding:</span>

- <span style="color: #000000">When recursive ECS is enabled, the application applies ECS handling for queries that meet both of the following criteria:</span>

> Macro (legacy-content)

- <span style="color: #000000">If you enable ECS forwarding, all queries that contain a valid ECS option will be forwarded to the authoritative server.</span>
- <span style="color: #000000">Queries with the source prefix length set to zero will be forwarded unchanged, regardless of whether ECS forwarding is enabled or disabled.</span>
- <span style="color: #000000">When recursive ECS and ECS forwarding are enabled, then response to queries that contain a valid ECS option with a non-zero source prefix length will contain an ECS option.</span>
- <span style="color: #000000">When recursive ECS is enabled and ECS forwarding is disabled, and if the original query contains a valid ECS option with a non-zero source prefix length, then the resolver returns a REFUSED response.</span>

<span style="color: #000000"> To enable recursive ECS and configure DNS resolver parameters, complete the following:</span>

1. From the Infoblox Portal, click **Network** **>** <span style="color: #000000">**DNS**</span>, and click <span style="color: #000000">**Global DNS Configuration**</span>.
2. <span style="color: #000000">In the </span><span style="color: #000000">*Global DNS Configuration*</span><span style="color: #000000"> page, clic</span>k<span style="color: #000000"> </span><span style="color: #000000">** EDNS Client Subnet Configuration**</span><span style="color: #000000">, and complete the following:</span>
  - <span style="color: #000000">**Enable Recursive EDNS Client Subnet**</span>: <span style="color: #000000">Select this check box to enable recursive resolution using EDNS client subnet. This is disabled by default. If recursive EDNS client subnet is enabled, the application applies EDNS client subnet handling for queries that meet both of the following criteria:</span>
    - <span style="color: #000000">If the source prefix length is not set to zero.</span>
    - <span style="color: #000000">If the query zone name is listed in the whitelisted domains.</span>
  - <span style="color: #000000">**Enable EDNS Client Subnet Forwarding**</span><span style="color: #000000">: Select this check box to enable EDNS client subnet forwarding. If you enable ECS forwarding, all queries containing a valid EDNS client subnet option will be forwarded to the authoritative server.</span>
    - <span style="color: #000000">**QUERY ZONE PERMISSIONS:**</span><span style="color: #000000"> Click </span><span style="color: #000000">**Add**</span><span style="color: #000000"> to add a list of query zone names that are subject to ECS recursion and the corresponding permission. The application adds a row to the table. Complete the following:</span>
      - <span style="color: #000000">**Zone**</span><span style="color: #000000">: Enter the zone name.</span>
      - <span style="color: #000000">**Permission**</span><span style="color: #000000">: Select </span><span style="color: #000000">**Allow**</span><span style="color: #000000"> or </span><span style="color: #000000">**Deny**</span><span style="color: #000000"> from the drop-down list.</span>
  <span style="color: #000000">To delete a query zone from the list, select the check box and click the </span><span style="color: #000000">**Remove**</span><span style="color: #000000"> button.</span>
  - <span style="color: #000000">**IPv4 Source Prefix**</span><span style="color: #000000">: Specify the IPv4 source prefix length. You can enter a value between 1 and 24. The default value is 24.</span>
  - <span style="color: #000000">**IPv6 Source Prefix**</span><span style="color: #000000">: Specify the IPv6 source prefix length. You can enter a value between 1 and 56. The default value is 56.</span>
3. <span style="color: #000000">Click </span><span style="color: #000000">**Save & Close**</span><span style="color: #000000"> to save</span>