- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
04-DNS Configuration | 212.89 KB |
Dynamic Domain Name Resolution
Configuring Static Domain Name Resolution
Configuring Dynamic Domain Name Resolution
Displaying and Maintaining IPv4 DNS
IPv4 DNS Configuration Examples
Static Domain Name Resolution Configuration Example
Dynamic Domain Name Resolution Configuration Example
Troubleshooting IPv4 DNS Configuration
Configuring the IPv6 DNS Client
Configuring Static Domain Name Resolution
Configuring Dynamic Domain Name Resolution
Displaying and Maintaining IPv6 DNS
l Support of the H3C WA series WLAN access points (APs) for features may vary by AP model. For more information, see Feature Matrix.
l The interface types and the number of interfaces vary by AP model.
l The term AP in this document refers to common APs, wireless bridges, and mesh APs.
l The models listed in this document are not applicable to all regions. Please consult your local sales office for the models applicable to your region.
This chapter includes these sections:
l Displaying and Maintaining IPv4 DNS
l IPv4 DNS Configuration Examples
l Troubleshooting IPv4 DNS Configuration
DNS Overview
Domain Name System (DNS) is a distributed database used by TCP/IP applications to translate domain names into corresponding IP addresses. With DNS, you can use easy-to-remember domain names in some applications and let the DNS server translate them into correct IP addresses.
There are two types of DNS services, static and dynamic. After a user specifies a name, the AP checks the local static name resolution table for an IP address. If no IP address is available, it contacts the DNS server for dynamic name resolution, which takes more time than static name resolution. Therefore, some frequently queried name-to-IP address mappings are stored in the local static name resolution table to improve efficiency.
Static Domain Name Resolution
The static domain name resolution means setting up mappings between domain names and IP addresses. IP addresses of the corresponding domain names can be found in the static domain resolution table when you use applications such as telnet.
Dynamic Domain Name Resolution
Resolving 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 of 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 a query to the DNS server.
3) The DNS server looks up the corresponding IP address of the domain name in its DNS database. If no match is found, it sends a query to a higher level DNS server. This process continues until a result, whether successful or not, is returned.
4) The DNS client returns the resolution result to the application after receiving a response from the DNS server.
Figure 1-1 Dynamic domain name resolution
Figure 1-1 shows the relationship between the user program, DNS client, and DNS server.
The resolver and cache comprise the DNS client. The user program and DNS client can run on the same device or different devices, 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 domain names and IP addresses in the dynamic domain name cache. There is no need to send a request to the DNS server for a repeated query 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 aging 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 incomplete. The resolver can supply the missing part. 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 (for example, aabbcc), the resolver will consider this a host name and add a DNS suffix before query. If no match is found after all the configured suffixes are used respectively, the original domain name (for example, aabbcc) is used for query.
l If there is a dot in the domain name (for example, www.aabbcc), the resolver will directly use this domain name for query. If the query fails, the resolver adds a DNS suffix for another query.
l If the dot is at the end of the domain name (for example, aabbcc.com.), the resolver will consider it a fully qualified domain name (FQDN) and return the query result, successful or failed. Hence, the dot “.” at the end of the domain name is called the terminating symbol.
Currently, the AP supports static and dynamic DNS services.
If an alias is configured for a domain name on the DNS server, the AP can resolve the alias into the IP address of the host.
Configuring IPv4 DNS Client
Configuring Static Domain Name Resolution
Configuring static domain name resolution refers to specifying the mappings between host names and IPv4 addresses. Static domain name resolution allows applications such as Telnet to contact hosts by using host names instead of IPv4 addresses.
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 IPv4 address |
ip host hostname ip-address |
Required Not configured by default. |
l The IPv4 address you last assign to the host name will overwrite the previous one if there is any.
l You may create up to 50 static mappings between domain names and IPv4 addresses.
Configuring Dynamic Domain Name Resolution
To send DNS queries to a correct server for resolution, dynamic domain name resolution needs to be enabled and a DNS server needs to be configured.
In addition, you can configure a DNS suffix that the system will automatically add to the provided domain name for resolution.
Follow these steps to configure dynamic domain name resolution:
Use the command… |
Remarks |
||
Enter system view |
system-view |
— |
|
Enable dynamic domain name resolution |
dns resolve |
Required Disabled by default. |
|
Configure an IP address for a DNS server |
System view |
dns server ip-address |
Required Not configured by default. |
Interface view |
interface interface-type interface-number |
||
dns server ip-address |
|||
quit |
|||
Configure a DNS suffix |
dns domain domain-name |
Optional Not configured by default, that is, only the provided domain name is resolved. |
l In system view, you can configure up to six DNS servers, including those with IPv6 addresses. The total number of DNS servers configured in interface view must be within six.
l You can specify up to ten DNS suffixes on an AP.
Displaying and Maintaining IPv4 DNS
To do… |
Use the command… |
Remarks |
Display the static IPv4 domain name resolution table |
display ip host |
Available in any view |
Display IPv4 DNS server information |
display dns server [ dynamic ] |
Available in any view |
Display IPv4 domain name suffixes |
display dns domain [ dynamic ] |
Available in any view |
Display the information of the dynamic IPv4 domain name cache |
display dns dynamic-host |
Available in any view |
Clear the information of the dynamic IPv4 domain name cache |
reset dns dynamic-host |
Available in user view |
IPv4 DNS Configuration Examples
Static Domain Name Resolution Configuration Example
Network requirements
As shown in Figure 1-2, the AP uses the static domain name resolution to access Host with IP address 10.1.1.2 through domain name host.com.
Figure 1-2 Network diagram for static domain name resolution
Configuration procedure
# Configure a mapping between host name host.com and IP address 10.1.1.2.
<AP> system-view
[AP] ip host host.com 10.1.1.2
# Execute the ping host.com command to verify that the AP can use the static domain name resolution to get the IP address 10.1.1.2 corresponding to host.com.
[AP] 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=128 time=1 ms
Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=128 time=4 ms
Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=128 time=3 ms
Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=128 time=2 ms
Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=128 time=3 ms
--- host.com ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/2/4 ms
Dynamic Domain Name Resolution Configuration Example
Network requirements
As shown in Figure 1-3, the IP address of the DNS server is 2.1.1.2/16 and the name suffix is com. The mapping between domain name host and IP address 2.1.1.10/16 is stored in the com domain.
The AP serving as a DNS client uses the dynamic domain name resolution and the suffix to access the host with the domain name host.com and the IP address 2.1.1.10/16.
Figure 1-3 Network diagram for dynamic domain name resolution
Configuration procedure
l Before performing the following configuration, make sure that there is a route between the AP and the host, and configurations are done on both the AP and the host. For the IP addresses of the interfaces, see Figure 1-3.
l This configuration may vary with different DNS servers. The following configuration is performed on a Windows server 2000 PC.
1) Configure the DNS server
# Enter DNS server configuration page.
Select Start > Programs > Administrative Tools > DNS.
# Create zone com.
In Figure 1-4, right click Forward Lookup Zones, select New zone, and then follow the instructions to create a new zone.
Figure 1-4 Create a zone
# Create a mapping between the host name and IP address.
In Figure 1-5, right click zone com, and then select New Host to bring up a dialog box as shown in Figure 1-6. Enter host name host and IP address 2.1.1.10.
Figure 1-6 Add a mapping between domain name and IP address
2) Configure the DNS client (AP)
# Enable dynamic domain name resolution.
<AP> system-view
[AP] dns resolve
# Specify the DNS server 2.1.1.2.
[AP] dns server 2.1.1.2
# Configure com as the domain name suffix.
[AP] dns domain com
3) Configuration verification
# Execute the ping host command on the AP to verify that the communication between the AP and the host is normal and that the corresponding destination IP address is 2.1.1.10.
[AP] ping host
Trying DNS resolve, press CTRL_C to break
Trying DNS server (2.1.1.2)
PING host.com (2.1.1.10):
56 data bytes, press CTRL_C to break
Reply from 2.1.1.10: bytes=56 Sequence=1 ttl=126 time=3 ms
Reply from 2.1.1.10: bytes=56 Sequence=2 ttl=126 time=1 ms
Reply from 2.1.1.10: bytes=56 Sequence=3 ttl=126 time=1 ms
Reply from 2.1.1.10: bytes=56 Sequence=4 ttl=126 time=1 ms
Reply from 2.1.1.10: bytes=56 Sequence=5 ttl=126 time=1 ms
--- host.com ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/1/3 ms
Troubleshooting IPv4 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 verify that the specified domain name is in the cache.
l If there is no defined domain name, verify that dynamic domain name resolution is enabled and the DNS client can communicate with the DNS server.
l If the specified domain name is in the cache, but the IP address is incorrect, verify that the DNS client has the correct IP address of the DNS server.
l Verify the mapping between the domain name and IP address is correct on the DNS server.
This chapter includes these sections:
l Configuring the IPv6 DNS Client
l Displaying and Maintaining IPv6 DNS
Support for the IPv6 DNS server configuration depends on the AP model.
Introduction to IPv6 DNS
IPv6 DNS is responsible for translating domain names into IPv6 addresses. Similar to IPv4 DNS, IPv6 DNS involves static domain name resolution and dynamic domain name resolution. The functions and implementations of the two types of domain name resolution are the same as those of IPv4 DNS. For details, see IPv4 DNS Configuration. However, different to IPv4 DNS, IPv6 DNS translates domain names into IPv6 addresses other than IPv4 addresses.
Configuring the IPv6 DNS Client
Configuring Static Domain Name Resolution
Configuring static domain name resolution refers to specifying the mappings between host names and IPv6 addresses. Static domain name resolution allows applications such as Telnet to contact hosts by using host names instead of IPv6 addresses.
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 IPv6 address |
ipv6 host hostname ipv6-address |
Required Not configured by default. |
l A host name can be mapped to one IPv6 address only. If you map a host name to different IPv6 addresses, the last configuration takes effect.
l You can configure up to 50 mappings between domain name and IPv6 address.
Configuring Dynamic Domain Name Resolution
To send DNS queries to a correct server for resolution, dynamic domain name resolution needs to be enabled and a DNS server needs to be configured.
In addition, you can configure a DNS suffix that the system will automatically add to the provided domain name for resolution.
Follow these steps to configure dynamic IPv6 domain name resolution:
To do… |
Use the command… |
Remarks |
Enter system view |
system-view |
— |
Enable dynamic domain name resolution |
dns resolve |
Required Disabled by default. |
Specify an IPv6 DNS server |
dns server ipv6 ipv6-address [ interface-type interface-number ] |
Required Not specified by default. If the IPv6 address of a DNS server is a link-local address, you need to specify the interface-type and interface-number arguments. |
Configure a DNS suffix |
dns domain domain-name |
Required Not configured by default, that is, only the provided domain name is resolved. |
l The dns resolve and dns domain commands are the same as those of IPv4 DNS.
l You can configure up to six DNS servers, including those with IPv4 addresses.
l You can specify up to ten DNS suffixes.
Displaying and Maintaining IPv6 DNS
To do… |
Use the command… |
Remarks |
Display the static IPv6 domain name resolution table |
display ipv6 host |
Available in any view |
Display IPv6 DNS server information |
display dns ipv6 server [ dynamic ] |
Available in any view |
Display DNS suffixes |
display dns domain [ dynamic ] |
Available in any view |
Display the information of dynamic IPv6 domain name cache |
display dns ipv6 dynamic-host |
Available in any view |
Clear the information of dynamic IPv6 domain name cache |
reset dns ipv6 dynamic-host |
Available in user view |