
l
Suffixes of domain names
Procedure
Step 1
Configure Switch A.
# Configure static DNS entries.
<SwitchA>
system-view
[SwitchA]
ip host SwitchB 4.1.1.1
[SwitchA]
ip host SwitchC 4.1.1.2
# Enable DNS resolution.
[SwitchA]
dns resolve
# Configure an IP address for the DNS server.
[SwitchA]
dns server 3.1.1.2
# Configure a domain name suffix "net".
[SwitchA]
dns domain net
# Configure a domain name suffix "com".
[SwitchA]
dns domain com
[SwitchA]
quit
NOTE
To complete DNS resolution, configuring routes from Switch A to the DNS server is mandatory. For
procedures for configuring routes, refer to the Quidway S2700 Series Ethernet Switches
Configuration
Guide - IP Routing
.
Step 2
Verify the configuration.
# Run the
ping huawei.com
command on Switch A to ping the IP address 2.1.1.3. The ping
succeeds.
<SwitchA>
ping huawei.com
Trying DNS server (3.1.1.2)
PING huawei.com (2.1.1.3): 56 data bytes, press CTRL_C to break
Reply from 2.1.1.3: bytes=56 Sequence=1 ttl=126 time=6 ms
Reply from 2.1.1.3: bytes=56 Sequence=2 ttl=126 time=4 ms
Reply from 2.1.1.3: bytes=56 Sequence=3 ttl=126 time=4 ms
Reply from 2.1.1.3: bytes=56 Sequence=4 ttl=126 time=4 ms
Reply from 2.1.1.3: bytes=56 Sequence=5 ttl=126 time=4 ms
--- huawei.com ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 4/4/6 ms
# Run the
display ip host
command on Switch A to view static DNS entries, including mappings
between host names and IP addresses.
<SwitchA>
display ip host
Host Age Flags Address
SwitchB 0 static 4.1.1.1
SwitchC 0 static 4.1.1.2
# Run the
display dns dynamic-host
command on Switch A to view dynamic DNS entries in
the domain name cache.
Quidway S2700 Series Ethernet Switches
Configuration Guide - IP Service
4 DNS Configuration
Issue 01 (2011-07-15)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
53