1-5
Configuring the DNS Proxy
Follow these steps to configure the DNS proxy:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enable DNS proxy
dns proxy enable
Required
Disabled by default.
Displaying and Maintaining DNS
To do…
Use the command…
Remarks
Display the static domain name
resolution table
display ip host
Display DNS server information
display dns server
[
dynamic
]
Available in
any view
Display domain name suffixes
display dns domain
[
dynamic
]
Display the information of the dynamic
domain name cache
display dns dynamic-host
Available in
any view
Clear the information of the dynamic
domain name cache
reset dns dynamic-host
Available in
user view
DNS Configuration Examples
Static Domain Name Resolution Configuration Example
Network requirements
Switch uses the static domain name resolution to access Host with IP address 10.1.1.2 through domain
name host.com.
Figure 1-3
Network diagram for static domain name resolution
Configuration procedure
# Configure a mapping between host name host.com and IP address 10.1.1.2.
<Sysname> system-view
[Sysname] ip host host.com 10.1.1.2
# Execute the
ping host.com
command to verify that the Switch can use the static domain name
resolution to get the IP address 10.1.1.2 corresponding to host.com.
[Sysname] ping host.com
PING host.com (10.1.1.2):