- Table of Contents
-
- H3C S3610[S5510] Series Ethernet Switches Command Manual-Release 5303(V1.01)
- 00-1Cover
- 01-Login Commands
- 02-VLAN Commands
- 03-IP Addressing and Performance Commands
- 04-QinQ-BPDU Tunneling Commands
- 05-Port Correlation Configuration Commands
- 06-Link Aggregation Commands
- 07-MAC Address Table Management Commands
- 08-IP Source Guard Commands
- 09-MSTP Commands
- 10-IPv6 Commands
- 11-Routing Overview Commands
- 12-IPv4 Routing Commands
- 13-BFD-GR Commands
- 14-IPv6 Routing Commands
- 15-Multicast Protocol Commands
- 16-802.1x-HABP-MAC Authentication Commands
- 17-AAA-RADIUS-HWTACACS Commands
- 18-ARP Commands
- 19-DHCP Commands
- 20-ACL Commands
- 21-QoS Commands
- 22-Port Mirroring Commands
- 23-Cluster Management Commands
- 24-UDP Helper Commands
- 25-SNMP-RMON Commands
- 26-NTP Commands
- 27-DNS Commands
- 28-File System Management Commands
- 29-Information Center Commands
- 30-System Maintaining and Debugging Commands
- 31-NQA Commands
- 32-VRRP Commands
- 33-SSH Commands
- 34-MCE Commands
- 35-OAM Commands
- 36-DLDP Commands
- 37-RRPP Commands
- 38-SSL-HTTPS Commands
- 39-PKI Commands
- 40-Appendix
- Related Documents
-
Title | Size | Download |
---|---|---|
27-DNS Commands | 40.26 KB |
Chapter 1 DNS Configuration Commands
This document only covers IPv4 DNS configuration commands. For introduction to IPv6 DNS configuration commands, refer to IPv6 Commands.
1.1 DNS Configuration Commands
1.1.1 display dns domain
Syntax
display dns domain [ dynamic ]
View
Any view
Parameters
dynamic: Displays the domain name suffixes dynamically obtained through DHCP or other protocols.
Description
Use the display dns domain command to display the domain name suffixes.
Related commands: dns domain.
Examples
# Display domain name suffixes.
<Sysname> display dns domain
Type:
D:Dynamic S:Static
No. Type Domain-name
1 S com
Table 1-1 Description on fields of the display dns domain command
Field |
Description |
No |
Sequence number |
Type |
Type of domain name suffix: S represents a statically configured domain name suffix, and D represents a domain name suffix obtained dynamically through DHCP. |
Domain-name |
Domain name suffix |
1.1.2 display dns dynamic-host
Syntax
display dns dynamic-host
View
Any view
Parameters
None
Description
Use the display dns dynamic-host command to display the information of the dynamic domain name resolution cache.
Examples
# Display the information of the dynamic domain name resolution cache.
<Sysname> display dns dynamic-host
No Host IP Address TTL
1 www.baidu.com 202.108.249.134 63000
2 www.yahoo.akadns.net 66.94.230.39 24
3 www.hotmail.com 207.68.172.239 3585
4 www.eyou.com 61.136.62.70 3591
Table 1-2 Description on the field of the display dns dynamic-host command
Field |
Description |
No |
Sequence number |
Domain-name |
Domain name |
IP Address |
IP address for the corresponding domain name |
TTL |
Time a mapping can be stored in the cache (seconds). |
& Note:
A domain name in the display dns dynamic-host command contains 21 characters at most. If a domain name consists of more than 21 characters, only the first 21 characters are displayed.
1.1.3 display dns server
Syntax
display dns server [ dynamic ]
View
Any view
Parameters
dynamic: Displays the DNS server information dynamically obtained through DHCP or other protocols
Description
Use the display dns server command to display the DNS server information.
Related commands: dns server.
Examples
# Display the DNS server information.
<Sysname> display dns server
Type:
D:Dynamic S:Static
DNS Server Type IP Address
1 S 169.254.65.125
Table 1-3 Description on fields of the display dns server command
Field |
Description |
DNS Server |
Sequence number of the DNS server, configured automatically by the device, starting from 1. |
Type |
Type of domain name server: S represents a statically configured DNS server, and D represents a DNS server obtained dynamically through DHCP. |
IP Address |
IP address of the DNS server |
1.1.4 display ip host
Syntax
display ip host
View
Any view
Parameters
None
Description
Use the display ip host command to display the host names and corresponding IP addresses in the static domain name resolution table.
Examples
# Display the host names and corresponding IP addresses in the static domain name resolution table.
<Sysname> display ip host
Host Age Flags Address
My 0 static 1.1.1.1
Aa 0 static 2.2.2.4
Table 1-4 Description on fields of the display ip host command
Field |
Description |
Host |
Host name |
Age |
Time to live. 0 means that the static mapping will never age out. You can only manually remove the mappings between host names and IP addresses. |
Flags |
Indicates the mapping type, static or dynamic. Static represents static domain name resolution. |
Address |
Host IP address |
1.1.5 dns domain
Syntax
dns domain domain-name
undo dns domain [ domain-name ]
View
System view
Parameters
domain-name: Domain name suffix, consisting of character strings separated by a dot (for example, aabbcc.com). Each separated string contains no more 63 characters. A domain name suffix may include case-insensitive letters, digits, hyphens (-), underscores (_), and dots (.), with a total length of 238 characters.
Description
Use the dns domain command to configure a domain name suffix. The system can automatically add the suffix to part of the domain name you entered for resolution.
Use the undo dns domain command to delete a domain name suffix (with a domain name suffix specified) or all domain name suffixes (with no domain name suffix specified).
No domain name suffix is configured by default.
You can configure a maximum of 10 domain name suffixes.
Related commands: display dns domain.
Examples
# Configure com as a DNS suffix.
[Sysname] dns domain com
1.1.6 dns resolve
Syntax
dns resolve
undo dns resolve
View
System view
Parameters
None
Description
Use the dns resolve command to enable dynamic domain name resolution.
Use the undo dns resolve command to disable dynamic domain name resolution.
Dynamic domain name resolution is disabled by default.
Examples
# Enable dynamic domain name resolution.
[Sysname] dns resolve
1.1.7 dns server
Syntax
dns server ip-address
undo dns server [ ip-address ]
View
System view
Parameters
ip-address: IP address of the DNS server.
Description
Use the dns server command to specify a DNS server.
Use the undo dns server to remove DNS server(s).
No DNS server is specified by default.
You can configure a maximum of six DNS servers.
Related commands: display dns server.
Examples
# Specify the DNS server 172.16.1.1.
[Sysname] dns server 172.16.1.1
1.1.8 ip host
Syntax
ip host hostname ip-address
undo ip host hostname [ ip-address ]
View
System view
Parameters
Hostname: Host name, consisting of 1 to 20 characters, including case-insensitive letters, numbers, hyphens (-), or dots (.). The host name must include at least one letter.
ip-address: IP address of the specified host in dotted decimal notation.
Description
Use the ip host command to create a host name to IP address mapping in the static resolution table.
Use the undo ip host command to remove a mapping.
No mappings are created by default.
You can configure only one mapping for a host name. A mapping newly configured for the host name will overwrite the previous one if there is any.
Related commands: display ip host.
Examples
# Map the IP address 10.110.0.1 to the host name aaa.
[Sysname] ip host aaa 10.110.0.1
1.1.9 reset dns dynamic-host
Syntax
reset dns dynamic-host
View
User view
Parameters
None
Description
Use the reset dns dynamic-host command to clear the dynamic domain name resolution information.
Related commands: display dns dynamic-host.
Examples
# Clear the dynamic domain name resolution information.
<Sysname> reset dns dynamic-host