Using DNS names with ping and traceroute: Example:
In the network illustrated in Example: network domain, the switch at 10.28.192.1 is configured to use DNS names for DNS-compatible commands in the pubs.outdoors.com domain. The DNS server has been configured to assign the host name docservr to the IP address used by the document server (10.28.229.219).
Configuring switch "A" with the domain name and the IP address of a DNS server for the domain enables the switch to use host names assigned to IP addresses in the domain to perform
ping
and
traceroute
actions on the devices in the domain. To summarize:
Entity |
Identity |
---|---|
DNS server IP address |
10.28.229.10 |
Domain name (and domain suffix for hosts in the domain) |
pubs.outdoors.com |
Host name assigned to 10.28.229.219 by the DNS server |
docservr |
Fully qualified domain name for the IP address used by the document server (10.28.229.219) |
docservr.pubs.outdoors.com |
Switch IP address |
10.28.192.1 |
Document server IP address |
10.28.229.219 |
With the above already configured, the following commands enable a DNS-compatible command with the host name
docserver
to reach the document server at 10.28.229.219.
Configuring switch "A" in Example: network domain to support DNS resolution
switch(config)# ip dns server-address 10.28.229.10 switch(config)# ip dns domain-name pbs.outdoors.com
Ping and traceroute execution for the network in Example: network domain
switch(config)# ping docservr 10.28.229.219 is alive, time = 1 ms switch# traceroute docservr traceroute to 10.28.229.219 1 hop min, 30 hops max, 5 sec. timeout, 3 probes 1 10.28.192.2 1 1 ms 0 ms 0 ms 2 10.28.229.219 2 0 ms 0 ms 0 ms
1First-Hop Router (“B”)
2Traceroute Target
As mentioned under the following example, if the DNS entry configured in the switch does not include the domain suffix for the desired target, you must use the target host's fully qualified domain name with DNS-compatible commands. For example, using the document server in Example: network domain as a target: