dns server
Use dns server to specify the IPv4 address of a DNS server.
Use undo dns server to remove the IPv4 address of a DNS server.
Syntax
dns server ip-address [ vpn-instance vpn-instance-name ]
undo dns server [ ip-address ] [ vpn-instance vpn-instance-name ]
Default
No DNS server IPv4 address is specified.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
ip-address: Specifies the IPv4 address of a DNS server.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. To specify a DNS server IPv4 address for the public network, do not use this option.
Usage guidelines
The device sends a DNS query request to the DNS servers in the order their IPv4 addresses are specified.
The system allows a maximum of six DNS server IPv4 addresses for the public network or each VPN instance. You can specify DNS server IPv4 addresses for both public network and VPN instances.
If you do not specify an IPv4 address, the undo dns server command removes all DNS server IPv4 addresses for the public network or the specified VPN instance.
Examples
# Specify DNS server IPv4 address 172.16.1.1.
<Sysname> system-view [Sysname] dns server 172.16.1.1
Related commands
display dns server