1.1 DNS Overview
Domain name system (DNS) is a distributed
database used by TCP/IP applications for transformation between domain names
and their corresponding IP addresses. With DNS, you can use memorizable and
meaningful domain names in some applications and let the DNS server resolve the
correct IP address.
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.
1.1.1 Static Domain Name Resolution
The static domain name resolution means setting
up mappings between domain names and IP addresses. IP addresses of the corresponding
names can be found in the static domain name resolution database for
applications.
1.1.2 Dynamic Domain Name Resolution
I. 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 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 a 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 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, NDS Client, and DNS Server.
The resolver and cache comprise the DNS
Client. The user program and DNS client can run on the same machine or
different machines, while the DNS Server and the DNS Client usually must run on
different machines.
Dynamic domain name resolution allows the
DNS Client to store latest mappings between name and IP address 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 information from DNS
messages.
II. 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.
When a DNS suffix is used, the resolver
will look up the domain name in the following ways according to the form of the
domain name you input.
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 the 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 a failure. Hence, the dot (.) is
called the terminating symbol.
Currently, the S5500-SI series Ethernet switches
support static and dynamic DNS services.
If an alias is
configured for a domain name on the DNS server, the device can resolve the IP
address of the host according to the alias.
1.2 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 host name and
IP address in the static domain name resolution table
|
ip host
hostname ip-address
|
Required
No mapping between host name and IP
address is configured in the static domain name resolution table by default.
|
The last IP address
you assign to the 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.
1.3 Configuring Dynamic Domain Name
Resolution
Follow these steps to configure dynamic 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
|
|
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.
I. Network requirements
As shown in Figure 1-2, an S5500-SI series
Ethernet switch serving as a DNS Client uses the dynamic domain name resolution
feature to access the host with the domain name being host1 and the IP address
1.1.1.2/16. The DNS Server has the IP address 2.1.1.2/16. The DNS suffixes are
com and net.
II. Network diagram

Figure 1-2
Network diagram for dynamic domain name resolution
III. Configuration procedure
Before doing the following configuration, make sure that
l
The route between the device and host 1 is
reachable.
l
Configurations are done on both the device and
host 1. For the IP address of the interfaces, see Figure 1-2.
l
There is a mapping between domain name host1 and
IP address 1.1.1.2/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 net as the DNS suffix
[Sysname] dns domain net
# Configure com as the DNS suffix
[Sysname] dns domain com
Execute the ping host1 command on an
S5500-SI series Ethernet switch to verify that the communication between the switch
and the host is normal and that the corresponding destination IP address is
1.1.1.2.
1.4 Displaying and Maintaining DNS
|
To do…
|
Use the command…
|
Remarks
|
|
Display the 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
|
|
Clear the information in the dynamic domain
name cache
|
reset dns dynamic-host
|
1.5 Troubleshooting DNS Configuration
I. Symptom
After enabling the dynamic domain name resolution,
the user cannot get the correct IP address.
II. 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 is 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 the mapping between the domain name and IP
address is correct on the DNS Server.