No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Fat AP and Cloud AP V200R008C00 CLI-based Configuration Guide

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring DNS

Configuring DNS

Configuring a Device as a DNS Client

Configuring the Static Domain Name Resolution

Context

A static domain name resolution table is manually set up, describing the mappings between domain names and IP addresses. Some common domain names are added to the table. Static domain name resolution can be performed based on the static domain name resolution table. To obtain the IP address by resolving a domain name, the client searches the static domain name resolution table for the specified domain name. In this manner, the efficiency of domain name resolution is improved.

Procedure

  1. Run system-view

    Access the system view.

  2. Run ip host host-name ip-address

    Specify a host name and an IPv4 address mapped to the host name.

    A host name is mapped to only a single IPv4 address. When you configure an IPv4 address for a host several times, only the IPv4 address configured at the latest is valid. Repeat 2 to allow the device to resolve several host names.

Configuring the Dynamic Domain Name Resolution

Context

For dynamic domain name resolution, the DNS server needs to provide the mapping between domain names and IP addresses and receive domain name resolution requests from clients.

To implement dynamic DNS, you need to enable dynamic DNS resolution, configure the IP address of DNS server, configure a source IP address for the local device to receive DNS packets, and configure a domain name suffix.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run dns resolve

    Dynamic domain name resolution is enabled.

    By default, dynamic DNS resolution is disabled.

  3. Run dns server ip-address

    The IP address of the DNS server is configured.

    By default, no IP address of the DNS server is configured.

  4. (Optional) Run dns server source-ip ip-address

    The source IP address is configured for the local device to receive DNS packets.

    By default, no source IP address is configured for the local device to receive DNS packets.

    NOTE:
    • Ensure that the source IP address is the IP address of an interface or logical interface on the device, and there are reachable routes between the interface and the DNS server.

    • Ensure that the source IP address and the IP address of the DNS server are on the same VPN or public network.

  5. (Optional) Run dns domain domain-name

    A domain name suffix is configured.

    By default, no domain name suffix is configured on a DNS client.

  6. (Optional) Configure the algorithm mode and retransmission mechanism for a device to send DNS query requests to the DNS server.

    • Run dns-server-select-algorithm { fixed | auto }

      The mode for the device to select the DNS server is configured.

      By default, the mode for a device to select the DNS server is auto.

    • Run dns forward retry-number number

      The number of times for the device to retransmit query requests to the destination DNS server is configured.

      By default, the number of times for a device to retransmit DNS query requests to the destination DNS server is 2.

    • Run dns forward retry-timeout time

      The retransmission timeout period for query requests sent by the device to the destination DNS server is configured.

      By default, the retransmission timeout period for DNS query requests sent by a device to the destination DNS server is 3 seconds.

    NOTE:
    The total timeout period for DNS query requests configured by dns forward retry-number and dns forward retry-timeout cannot be too short. Generally, the default value is recommended. If the time of waiting for the resolution response from the DNS server is too long, and the service exception is caused, you can prolong the retransmission timeout period as required.

Verifying the DNS Client Configuration

Procedure

  • Run the display dns configuration command to display the global DNS configurations.
  • Run the display ip host command to check static DNS entries.
  • Run the display dns server [ verbose ] command to check the DNS server configuration.
  • Run the display dns domain [ verbose ] command to check the domain name suffix configuration.

Configuring DNS Proxy

The device can function as a DNS proxy to forward DNS request and reply packets and provide domain name resolution for DNS clients.

Pre-configuration Tasks
Before configuring DNS proxy, complete the following tasks:
  • Configuring link layer protocol parameters for interfaces to ensure that the link layer protocol status on the interfaces is Up
  • Configuring the DNS server
  • Configuring routes between the device and the DNS server and between the device and the DNS client

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run dns proxy enable

    DNS Proxy is enabled.

  3. Choose either of the following methods to configure domain name resolution.

    • Configure static domain name resolution.

      Static domain name resolution is implemented using static resource records. The manually created mappings between some common domain names and IP addresses are stored locally as static resource records. When a client requests for the IP address corresponding to a domain name, the device first queries the IP address information locally, improving the efficiency of domain name resolution.

      Static resource records can be configured using ip host or configured in the DNS zone. You can select the static resource record configuration method based on the following rules: When the domain name length does not exceed 24 characters, use ip host to configure static resource records; when the domain name length exceeds 24 characters, configure static resource records in the DNS zone.

      If the static resource records configured using the preceding two methods both exist on the device, when the device performs DNS query, the static resource records configured using ip host take precedence over those configured in the DNS zone. For example, when receiving a DNS query request, the device first queries the static resource records configured using ip host based on the domain name. If no matching record can be found, the device queries the static resource records configured in the DNS zone based on the domain name. If the matching record can be found in the static resource records configured in the DNS zone, the device sends a response; otherwise, the device forwards the DNS query request to the remote DNS server.

      Method 1: configuring static resource records using ip host

      • Run ip host host-name ip-address

        Static DNS entries are configured.

        By default, no static DNS entry is configured.

      Method 2: configuring DNS static resource records in the DNS zone

      1. Run dns zone zone-name

        A DNS zone is created and the DNS zone view is displayed.

        By default, no DNS zone is created.

      2. Run rr a hostname host-name ip-address ip-address or rr aaaa hostname host-name ipv6-address ipv6-address

        Static resource records of type A are configured.

        By default, no static resource record of type A is configured.

        Or run:

        Static resource records of type AAAAA are configured.

        By default, no static resource record of type AAAAA is configured.

      3. (Optional) Run ttl ttl-value

        The storage time of static resource records is configured.

        By default, the storage time of static resource records is 1200 seconds.

    • Configure dynamic domain name resolution.

      1. Run dns resolve

        Dynamic domain name resolution is enabled.

        By default, dynamic DNS resolution is disabled.

        After dynamic domain name resolution is enabled, the DNS proxy searches the dynamic domain name resolution table after receiving a DNS request packet and checks whether the requested information exists. If yes, the DNS proxy returns a DNS reply packet that carries the resolution result to the DNS client. If not, the DNS proxy forwards the DNS request packet to the DNS server.

      2. Run dns server ip-address

        The DNS server that the DNS Proxy connects to is configured.

        By default, no IP address is configured for the DNS server.

      3. (Optional) Run dns server source-ip ip-address

        The source IP address that the device uses to exchange packets with the DNS server is configured.

        By default, no source IP address is configured for the device.

        NOTE:
        • Ensure that the source IP address is the IP address of an interface or logical interface on the device, and there are reachable routes between the interface and the DNS server.

        • Ensure that the source IP address and the IP address of the DNS server are on the same VPN or public network.

      4. (Optional) Run dns-server-select-algorithm { fixed | auto }

        An algorithm used by the DNS Proxy to access the destination DNS server is configured.

        By default, the auto algorithm is used.

      5. (Optional) Run dns forward retry-number number

        The number of times for the DNS Proxy to retransmit query requests to the destination DNS server is set.

        By default, the number of times for the DNS Proxy to retransmit query requests to the destination DNS server is 2.

      6. (Optional) Run dns forward retry-timeout time

        The retransmission timeout period that the DNS proxy sends query requests to the destination DNS server is set.

        By default, the retransmission timeout period is 3 seconds.

Verifying the Configuration
  • Run the display dns configuration command to display the global DNS configurations.
  • Run the display ip host command to check the static resource records configured using ip host.

  • Run the display dns zone zone-name command to check the static resource records configured in the DNS zone specified by zone-name.

  • Run the display dns server [ verbose ] command to check the DNS server configuration.
Translation
Download
Updated: 2019-01-11

Document ID: EDOC1000176006

Views: 115802

Downloads: 309

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next