H3C S9500 Operation Manual-Release1648[v1.24]-02 IP Services Volume

DownLoad Chapters Download(54.01 KB)

05-DNS Configuration
Title Size Download
05-DNS Configuration 54.01 KB

Chapter 1  DNS Configuration

When configuring DNS, go to these sections for information you are interested in:

l           Introduction to DNS

l           Configuring Domain Name Resolution

l           Displaying and Debugging Domain Name Resolution

l           DNS Configuration Example

l           Troubleshooting Domain Name Resolution Configuration

1.1  Introduction to DNS

Used in the TCP/IP application, Domain Name System (DNS) is a distributed database which provides the translation between domain name and the IP address. In this way, the user can use domain names that are easy to memorize and meaningful, and never needs to keep obscure IP addresses in mind.

There are two kinds of domain name resolutions: static domain name resolution and dynamic domain name resolution, which supplement each other in real application. On resolving a domain name, use the static resolution first. If it fails, use the dynamic resolution method. You can put some common domain names into the static domain name resolution table to raise the domain name resolution efficiency greatly.

1.1.1  Static Domain Name Resolution

Static domain resolution is to establish mappings between domain name and the IP address manually. When you perform some applications using domain names, the system can obtain the IP address of the specified domain name by searching the static domain name resolution table.

1.1.2  Dynamic Domain Name Resolution

Dynamic domain name resolution is implemented by inquiring the domain name server. As a DNS client, the switch sends an inquiry request to the domain name server, and the domain name server searches the related IP address of the domain name in its own database and sends it back to the switch. If the domain name server judges that the domain name does not belong to the local domain, it forwards the request to the upper level domain name resolution server till the resolution is finished.

Dynamic domain name resolution supports the buffer function. It stores each successful domain name/IP address mapping that is resolved dynamically in the dynamic domain name buffer. When the same domain name is searched next time, it can be read directly from the buffer, without requesting the domain name server. The aged mapping in the buffer is deleted after a certain period of time to ensure the updated contents can be got from the domain name server timely. The aging time is set by the domain name server and obtained by the switch from the protocol packet.

Dynamic domain name resolution supports the domain name suffix list function. You can set some domain name suffixes beforehand and input part of the domain name field during the domain name resolution, then the system adds different suffixes to the input domain name automatically for resolution. For example, if you want to search the domain name “h3c.com”, you can configure the “com” in the suffix list and input “h3c”. Then the system connects the input domain name with the suffix into “h3c.com” automatically to search. When the domain name suffix is used, if the input domain name does not include “.”, like “h3c”, the system regards it as a host name and add a domain name suffix to search. After all the domain names are failed to be searched out in this way, the system finally searches with the primarily input domain name. If the input domain name does include “.”, like “www.h3c”, the system searches with it directly. The system adds each suffix to search one by one only after the search fails. If the input domain name contains a “.” in the final position, like “h3c.com.”, it indicates that the domain name suffix needs not to be added. The system removes the last “.” from the input domain name and search with the remaining part. Succeeded or not, the system returns to the originally input domain name. Put it more specifically, if the last character of the input domain name is “.”, the system only searches according to characters before the “.” rather than matches the domain name. In this sense, the last “.” is also called “search terminator”.

1.2  Configuring Domain Name Resolution

l           Configuring Static Domain Name Resolution

l           Configuring Dynamic Domain Name Resolution

1.2.1  Configuring Static Domain Name Resolution

You can use this command to map the host name to the host IP address. When you use applications like Telnet, you can use the host name directly, and the system translates it into the IP address, rather than the obscure IP address.

Perform the following configuration in system view to configure host name and the corresponding IP address:

To do…

Use the command…

Configure host name and the corresponding IP address

ip host hostname ip-address

Cancel host name and the corresponding IP address

undo ip host hostname [ ip-address ]

 

Each host can have only one IP address. If you configure a host name more than once, then the IP address configured at last is effective.

1.2.2  Configuring Dynamic Domain Name Resolution

Dynamic domain name resolution configuration includes:

l           Enabling/disabling static domain name resolution

l           Configuring the IP address of a domain name server

l           Configuring domain name suffix

I. Enabling/disabling static domain name resolution

You can use the following command to enable dynamic domain name resolution. However, since dynamic domain name resolution may take some time, you can disable this function when you do not want to perform dynamic domain name resolution sometimes.

Perform the following configuration in system view to enable/disable dynamic domain name resolution:

To do…

Use the command…

Enable dynamic domain name resolution

dns resolve

Disable dynamic domain name resolution

undo dns resolve

 

By default, dynamic domain name resolution is disabled.

II. Configuring the IP address of a domain name server

You are required to configure the domain name server if you need to use the function of the dynamic domain name resolution. In this way, you can send the inquiry request packets to the appropriate server. The system supports up to six domain name servers.

Perform the following configuration in system view to configure the IP address of the domain name server:

To do…

Use the command…

Configure the IP address of the domain name server

dns server ip-address

Delete the IP address of the domain name server

undo dns server [ ip-address ]

 

III. Configuring domain name suffix

You can use the following command to configure domain name suffix list. By configuring this, you can just input part of the domain name and the system automatically adds the preconfigured suffix to perform the resolution. The system supports up to 10 domain name suffixes.

Perform the following configuration in system view to configure domain name suffix:

To do…

Use the command…

Configure domain name suffix

dns domain domain-name

Delete domain name suffix

undo dns domain [ domain-name ]

 

1.3  Displaying and Debugging Domain Name Resolution

To do…

Use the command…

Remarks

Display the static domain name resolution table

display ip host

Available in any view

Display the information on domain name server

display dns server

Display the information on domain name suffix list

display dns domain

Display the information on the dynamic domain name buffer

display dns dynamic-host

Clear dynamic domain name buffer

reset dns dynamic-host

Available in user view

Enable the debugging for the domain name resolution

debugging dns

Disable the debugging for the domain name resolution

undo debugging dns

 

1.4  DNS Configuration Example

I. Network requirements

As the client, the switch uses dynamic domain name resolution. The IP address of the domain name server is 172.16.1.1. The configured suffix of the domain name is “com”. There is a route between the switch and the server.

II. Network diagram

Figure 1-1 Network diagram for DNS client

III. Configuration procedure

# Enable dynamic domain name resolution

[H3C] dns resolve

# Configure the IP address of the domain name server to 172.16.1.1.

[H3C] dns server 172.16.1.1

# Configure the domain name suffix as com.

[H3C] dns domain com

# Ping a host with the specified domain name.

[H3C] ping ftp

 Trying DNS server (172.16.1.1)

  PING ftp.com (200.200.200.200): 56  data bytes, press CTRL_C to break

    Reply from 200.200.200.200: bytes=56 Sequence=1 ttl=128 time=2 ms

    Reply from 200.200.200.200: bytes=56 Sequence=2 ttl=128 time=2 ms

    Reply from 200.200.200.200: bytes=56 Sequence=3 ttl=128 time=2 ms

    Reply from 200.200.200.200: bytes=56 Sequence=4 ttl=128 time=2 ms

    Reply from 200.200.200.200: bytes=56 Sequence=5 ttl=128 time=2 ms

 

  --- ftp.com ping statistics ---

    5 packet(s) transmitted

    5 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 2/2/2 ms

The routing configuration between the switch and the domain name server is omitted here, and refer to the related chapter for the configuration.

1.5  Troubleshooting Domain Name Resolution Configuration

Fault: Domain name resolution fails.

Troubleshoot: Perform the following procedures:

l           Check whether the domain name resolution function is enabled.

l           Check whether the IP address of the domain name server is correctly configured.

l           Check whether there is a correct route between the domain name server and the switch.

l           Check whether there is network connection failure, such as network cable break, loose connection, and so on.