dns-server (IP address pool view)

Function

The dns-server command configures a DNS server address.

The undo dns-server command deletes the configuration.

By default, no DNS server address is configured.

Format

dns-server ip-address1 [ ip-address2 [ ip-address3 [ ip-address4 [ ip-address5 [ ip-address6 [ ip-address7 [ ip-address8 ] ] ] ] ] ] ]

undo dns-server { ip-address1 [ ip-address2 [ ip-address3 [ ip-address4 [ ip-address5 [ ip-address6 [ ip-address7 [ ip-address8 ] ] ] ] ] ] ] | all }

Parameters

Parameter Description Value
ip-address1

Specifies the IP address of a DNS server.

The value is in dotted decimal notation. A maximum of eight DNS server addresses can be configured, separated by space.

ip-address2

Specifies the IP address of a DNS server.

The value is in dotted decimal notation. A maximum of eight DNS server addresses can be configured, separated by space.

ip-address3

Specifies the IP address of a DNS server.

The value is in dotted decimal notation. A maximum of eight DNS server addresses can be configured, separated by space.

ip-address4

Specifies the IP address of a DNS server.

The value is in dotted decimal notation. A maximum of eight DNS server addresses can be configured, separated by space.

ip-address5

Specifies the IP address of a DNS server.

The value is in dotted decimal notation. A maximum of eight DNS server addresses can be configured, separated by space.

ip-address6

Specifies the IP address of a DNS server.

The value is in dotted decimal notation. A maximum of eight DNS server addresses can be configured, separated by space.

ip-address7

Specifies the IP address of a DNS server.

The value is in dotted decimal notation. A maximum of eight DNS server addresses can be configured, separated by space.

ip-address8

Specifies the IP address of a DNS server.

The value is in dotted decimal notation. A maximum of eight DNS server addresses can be configured, separated by space.

all

Deletes all DNS server addresses.

-

Views

IP address pool view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

Before a host accesses the Internet, the DNS server needs to be used to resolve a domain name to an IP address. To allow a DHCP client to properly access the Internet, run the dns-server command to configure the IP address of a DHCP server so that the DHCP server can send DNS server addresses to DHCP clients through Option 6.

Precautions

A maximum of eight NetBIOS server addresses can be specified for each address pool.

If DNS server addresses have been configured in an address pool, running the dns-server command adds new DNS server addresses but does not delete the configured ones. To delete the configured ones, run the undo dns-server command.

An earlier configured ip-address has a higher priority. The IP address with the highest priority is used as the primary address, and the other seven IP addresses are used as secondary addresses.

Example

# Set DNS server addresses to 1.1.1.1 and 2.2.2.2 for an address pool named huawei.
<HUAWEI> system-view
[~HUAWEI] ip pool huawei server
[~HUAWEI-ip-pool-huawei] dns-server 1.1.1.1 2.2.2.2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >