< Home

(Optional) Configuring DNS Configurations Allocated by a DHCP Server

Context

If DHCP clients on your network use DNS and you want them to receive DNS configurations through DHCP, configure the DHCP server to provide DNS configurations.

Procedure

  • Based on an interface address pool
    1. Enter the system view.

      system-view

    2. Enter the interface or sub-interface view.

      interface interface-type interface-number[.subinterface-number ]

      Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731S-H, S5731-S, S5731S-S, S6720-HI, S5732-H, S6730-H, S6730S-H, S6730-S, S6730S-S, S6720-EI, and S6720S-EI support sub-interfaces.

    3. (Optional) On an Ethernet interface, run undo portswitch

      The interface is switched to Layer 3 mode.

      By default, an Ethernet interface works in Layer 2 mode.

      Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.

    4. Configure the IP address of a DNS server for DHCP clients.

      dhcp server dns-list { ip-address &<1-8> | unnumbered interface interface-type interface-number }

      By default, no DNS server IP address is configured in an address pool.

      Each address pool can be configured with a maximum of eight DNS server IP addresses.

    5. Configure a domain name that is allocated to DHCP clients.

      dhcp server domain-name domain-name

      By default, no domain name is allocated.

  • Based on a global address pool in the global address pool view
    1. Enter the system view.

      system-view

    2. Enter the global address pool view.

      ip pool ip-pool-name

    3. Configure the IP address of a DNS server.

      dns-list ip-address &<1-8>

      By default, no DNS server IP address is configured in an address pool.

      Each address pool can be configured with a maximum of eight DNS server IP addresses.

    4. Configure a domain name that is allocated to DHCP clients.

      domain-name domain-name

      By default, no DNS domain name suffix is configured.

  • In the DHCP Option template view

    1. Enter the system view.
      system-view
    2. Create a DHCP Option template and enter the DHCP Option template view.

      dhcp option template template-name

      By default, no DHCP Option template is created.

      To allocate network parameters except IP addresses to static clients, configure a DHCP Option template. Network parameters configured in the DHCP Option template view take effect only for static clients. For static clients, if a network parameter is configured in both the DHCP Option template view and global address pool view, only the configuration in the DHCP Option template view takes effect.

      To allocate only IP addresses to static clients (for details, see (Optional) Configuring Fixed IP Addresses in an Address Pool), you do not need to configure a DHCP Option template.

    3. Configure the DNS server IP address and DNS domain name suffix to be allocated to DHCP clients.
      • Configure the DNS server IP address to be allocated to DHCP clients.

        dns-list ip-address &<1-8>

        By default, no DNS server IP address is configured.

        Each address pool can be configured with a maximum of eight DNS server IP addresses.

      • Configure the DNS domain name suffix to be allocated to DHCP clients.

        domain-name domain-name

        By default, no DNS domain name suffix is configured.

      If you need to configure other items in the DHCP Option template view, complete them first before performing the following steps.

    4. (Optional) Return to the system view.
      quit
    5. (Optional) Enter the global address pool view.
      ip pool ip-pool-name
    6. (Optional) Bind a DHCP Option template to static clients.
      static-bind ip-address ip-address mac-address mac-address option-template template-name

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >