- Table of Contents
-
- H3C WX3000 Series Unified Switches Switching Engine Configuration Guide-6W103
- 00-Preface
- 01-CLI Configuration
- 02-Login Configuration
- 03-Configuration File Management Configuration
- 04-VLAN Configuration
- 05-Auto Detect Configuration
- 06-Voice VLAN Configuration
- 07-GVRP Configuration
- 08-Basic Port Configuration
- 09-Link Aggregation Configuration
- 10-Port Isolation Configuration
- 11-Port Security-Port Binding Configuration
- 12-DLDP Configuration
- 13-MAC Address Table Management Configuration
- 14-MSTP Configuration
- 15-802.1x and System Guard Configuration
- 16-AAA Configuration
- 17-MAC Address Authentication Configuration
- 18-IP Address and Performance Configuration
- 19-DHCP Configuration
- 20-ACL Configuration
- 21-QoS-QoS Profile Configuration
- 22-Mirroring Configuration
- 23-ARP Configuration
- 24-SNMP-RMON Configuration
- 25-Multicast Configuration
- 26-NTP Configuration
- 27-SSH Configuration
- 28-File System Management Configuration
- 29-FTP-SFTP-TFTP Configuration
- 30-Information Center Configuration
- 31-System Maintenance and Debugging Configuration
- 32-VLAN-VPN Configuration
- 33-HWPing Configuration
- 34-DNS Configuration
- 35-Smart Link-Monitor Link Configuration
- 36-PoE-PoE Profile Configuration
- 37-Routing Protocol Configuration
- 38-UDP Helper Configuration
- 39-Acronyms
- 40-Index
- Related Documents
-
Title | Size | Download |
---|---|---|
34-DNS Configuration | 67.5 KB |
Table of Contents
Dynamic Domain Name Resolution
Configuring Domain Name Resolution
Configuring Static Domain Name Resolution
Configuring Dynamic Domain Name Resolution
Static Domain Name Resolution Configuration Example
Dynamic Domain Name Resolution Configuration Example
Displaying and Maintaining DNS
Troubleshooting DNS Configuration
l The term switch used throughout this chapter refers to a switching device in a generic sense or the switching engine of the WX3000 series.
l The sample output information in this manual was created on the WX3024. The output information on your device may vary.
l This chapter covers only IPv4 DNS configuration. For details about IPv6 DNS, refer to IPv6 Management Configuration.
DNS Overview
Domain name system (DNS) is a mechanism used for TCP/IP applications to provide domain name-to-IP address translation. With DNS, you can use memorizable and meaningful domain names in some applications and let the DNS server resolve it into correct IP addresses.
There are two types of DNS services, static and dynamic. Each time the DNS server receives a name query, it checks its static DNS database before looking up the dynamic DNS database. Reduction of the searching time in the dynamic DNS database would increase efficiency. Some frequently used addresses can be put in the static DNS database.
Static Domain Name Resolution
The static domain name resolution means manually setting up mappings between domain names and IP addresses. IP addresses of the corresponding domain names can be found in the static domain name resolution table for applications, such as Telnet.
Dynamic Domain Name Resolution
Resolution procedure
Dynamic domain name resolution is implemented by querying the DNS server. The resolution procedure is as follows:
1) A user program sends a name query to the resolver in the DNS client.
2) The DNS resolver looks up the local domain name cache for a match. If a match is found, it sends the corresponding IP address back. If not, it sends the query to the DNS server.
3) The DNS server looks up its DNS database for a match. If no match is found, it sends a query to a higher-level DNS server. This process continues until a result, success or failure, is returned.
4) The DNS client performs the next operation according to the result.
Figure 1-1 Dynamic domain name resolution
Figure 1-1 shows the relationship between user program, DNS client, and DNS server.
The resolver and cache comprise the DNS client. The user program and DNS client run on the same device, while the DNS server and the DNS client usually run on different devices.
Dynamic domain name resolution allows the DNS client to store latest mappings between name and IP address in the dynamic domain name cache of the DNS client. There is no need to send a request to the DNS server for a repeated query request next time. The aged mappings are removed from the cache after some time, and latest entries are required from the DNS server. The DNS server decides how long a mapping is valid, and the DNS client gets the information from DNS messages.
DNS suffixes
The DNS client normally holds a list of suffixes which can be defined by users. It is used when the name to be resolved is not complete. The resolver can supply the missing part (automatic domain name addition). For example, a user can configure com as the suffix for aabbcc.com. The user only needs to type aabbcc to get the IP address of aabbcc.com. The resolver can add the suffix and delimiter before passing the name to the DNS server.
l If there is no dot in the domain name, such as aabbcc, the resolver will consider this as a host name and add a DNS suffix before processing. The original name such as aabbcc is used if all DNS lookups fail.
l If there is a dot in the domain name, such as www.aabbcc, the resolver will use this domain name to do DNS lookup first. If the lookup fails, the resolver adds a DNS suffix for another lookup.
l If a dot is at the end of the domain name, such as “aabbcc.com.”, the resolver will consider this as a fully qualified domain name and return the result, success or failure. Hence, the dot (.) is called the terminating symbol.
Currently, the device supports both static and dynamic DNS clients.
Configuring Domain Name Resolution
Configuring Static Domain Name Resolution
Follow these steps to configure static domain name resolution:
To do… |
Use the command… |
Remarks |
Enter system view |
system-view |
— |
Configure a mapping between a host name and an IP address |
ip host hostname ip-address |
Required No IP address is assigned to a host name by default. |
The IP address you assign to a host name last time will overwrite the previous one if there is any.
You may create up to 50 static mappings between domain names and IP addresses.
Configuring Dynamic Domain Name Resolution
Follow these steps to configure dynamic domain name resolution:
Use the command… |
Remarks |
|
Enter the system view |
system-view |
— |
Enable dynamic domain name resolution |
dns resolve |
Required Disabled by default |
Configure an IP address for the DNS server |
dns server ip-address |
Required No IP address is configured for the DNS server by default. |
Configure DNS suffixes |
dns domain domain-name |
Optional No DNS suffix is configured by default |
You may configure up to six DNS servers and ten DNS suffixes.
DNS Configuration Example
Static Domain Name Resolution Configuration Example
Network requirements
As shown in Figure 1-2, Switch uses static domain name resolution to access host 10.1.1.2 through domain name host.com.
Figure 1-2 Network diagram for static DNS configuration
Configuration procedure
# Configure a mapping between host name host.com and IP address 10.1.1.2.
<device> system-view
[device] ip host host.com 10.1.1.2
# Execute the ping host.com command to verify that the device can use static domain name resolution to get the IP address 10.1.1.2 corresponding to host.com.
[device] ping host.com
PING host.com (10.1.1.2): 56 data bytes, press CTRL_C to break
Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=127 time=3 ms
Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=127 time=3 ms
Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=127 time=2 ms
Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=127 time=5 ms
Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=127 time=3 ms
--- host.com ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/3/5 ms
Dynamic Domain Name Resolution Configuration Example
Network requirements
As shown in Figure 1-3, Switch serving as a DNS client uses dynamic domain name resolution to access the host at 3.1.1.1/16 through its domain name host. The DNS server has the IP address 2.1.1.2/16. The DNS suffix is com.
Figure 1-3 Network diagram for dynamic DNS configuration
Configuration procedure
Before doing the following configuration, make sure that:
l The routes between the DNS server, Switch, and Host are reachable.
l Necessary configurations are done on the devices. For the IP addresses of the interfaces, see the figure above.
l There is a mapping between domain name host and IP address 3.1.1.1/16 on the DNS server.
l The DNS server works normally.
# Enable dynamic domain name resolution.
<device> system-view
[device] dns resolve
# Configure the IP address 2.1.1.2 for the DNS server.
[device] dns server 2.1.1.2
# Configure com as the DNS suffix
[device] dns domain com
Execute the ping host command on Switch to verify that the communication between Switch and Host is normal and that the corresponding IP address is 3.1.1.1.
[device] ping host
Trying DNS server (2.1.1.2)
PING host.com (3.1.1.1): 56 data bytes, press CTRL_C to break
Reply from 3.1.1.1: bytes=56 Sequence=1 ttl=255 time=3 ms
Reply from 3.1.1.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 3.1.1.1: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 3.1.1.1: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 3.1.1.1: bytes=56 Sequence=5 ttl=255 time=1 ms
--- 3.1.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/1/3 ms
--- host.com ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
Displaying and Maintaining DNS
To do… |
Use the command… |
Remarks |
Display static DNS database |
display ip host |
Available in any view |
Display the DNS server information |
display dns server [ dynamic ] |
|
Display the DNS suffixes |
display dns domain [ dynamic ] |
|
Display the information in the dynamic domain name cache |
display dns dynamic-host |
|
Display the DNS resolution result |
nslookup type { ptr ip-address | a domain-name } |
Available in any view |
Clear the information in the dynamic domain name cache |
reset dns dynamic-host |
Available in user view |
Troubleshooting DNS Configuration
Symptom
After enabling the dynamic domain name resolution, the user cannot get the correct IP address.
Solution
l Use the display dns dynamic-host command to check that the specified domain name is in the cache.
l If there is no defined domain name, check that dynamic domain name resolution is enabled and the DNS client can communicate with the DNS server.
l If the specified domain name exists in the cache but the IP address is incorrect, check that the DNS client has the correct IP address of the DNS server.
l Check that the mapping between the domain name and IP address is correct on the DNS server.