- Table of Contents
-
- H3C S3600 Operation Manual-Release 1602(V1.02)
- 00-1Cover
- 00-2Product Overview
- 01-CLI Operation
- 02-Login Operation
- 03-Configuration File Management Operation
- 04-VLAN Operation
- 05-IP Address and Performance Operation
- 06-Voice VLAN Operation
- 07-GVRP Operation
- 08-Port Basic Configuration Operation
- 09-Link Aggregation Operation
- 10-Port Isolation Operation
- 11-Port Security-Port Binding Operation
- 12-DLDP Operation
- 13-MAC Address Table Management Operation
- 14-Auto Detect Operation
- 15-MSTP Operation
- 16-Routing Protocol Operation
- 17-Multicast Operation
- 18-802.1x and System Guard Operation
- 19-AAA Operation
- 20-Web Authentication Operation
- 21-MAC Address Authentication Operation
- 22-VRRP Operation
- 23-ARP Operation
- 24-DHCP Operation
- 25-ACL Operation
- 26-QoS-QoS Profile Operation
- 27-Web Cache Redirection Operation
- 28-Mirroring Operation
- 29-IRF Fabric Operation
- 30-Cluster Operation
- 31-PoE-PoE Profile Operation
- 32-UDP Helper Operation
- 33-SNMP-RMON Operation
- 34-NTP Operation
- 35-SSH Operation
- 36-File System Management Operation
- 37-FTP-SFTP-TFTP Operation
- 38-Information Center Operation
- 39-System Maintenance and Debugging Operation
- 40-VLAN-VPN Operation
- 41-HWPing Operation
- 42-IPv6 Management Operation
- 43-DNS Operation
- 44-Smart Link-Monitor Link Operation
- 45-Access Management Operation
- 46-Appendix
- Related Documents
-
Title | Size | Download |
---|---|---|
43-DNS Operation | 91.75 KB |
Dynamic Domain Name Resolution
Configuring Domain Name Resolution
Configuring Static Domain Name Resolution
Configuring Dynamic Domain Name Resolution
Displaying and Maintaining DNS
Static Domain Name Resolution Configuration Example
Dynamic Domain Name Resolution Configuration Example
When configuring DNS, go to these sections for information you are interested in:
l Configuring Domain Name Resolution
l Displaying and Maintaining DNS
This chapter covers only IPv4 DNS configuration. For details about IPv6 DNS, refer to IPv6 Management Operation.
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.
Currently, S3600 series Ethernet switches support both static and dynamic DNS clients.
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 and aabbcc., the resolver will directly use this domain name to do DNS lookup first. If the lookup fails, the resolver adds a DNS suffix for another lookup.
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:
To do… |
Use the command… |
Remarks |
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.
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 } |
|
Clear the information in the dynamic domain name cache |
reset dns dynamic-host |
Available in user view |
DNS Configuration Examples
Static Domain Name Resolution Configuration Example
Network requirements
The switch uses static domain name resolution to access host 10.1.1.2 through domain name host.com.
Network diagram
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.
<Sysname> system-view
[Sysname] 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.
[Sysname] 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, the 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.
Network diagram
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.
<Sysname> system-view
[Sysname] dns resolve
# Configure the IP address 2.1.1.2 for the DNS server.
[Sysname] dns server 2.1.1.2
# Configure com as the DNS suffix
[Sysname] 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.
[Sysname] 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=125 time=4 ms
Reply from 3.1.1.1: bytes=56 Sequence=2 ttl=125 time=4 ms
Reply from 3.1.1.1: bytes=56 Sequence=3 ttl=125 time=4 ms
Reply from 3.1.1.1: bytes=56 Sequence=4 ttl=125 time=4 ms
Reply from 3.1.1.1: bytes=56 Sequence=5 ttl=125 time=5 ms
--- host.com ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 4/4/5 ms
Troubleshooting DNS
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.