ip dns domain-name


ip dns domain-name domain-name-suffix

no ip dns domain-name domain-name-suffix


Used at the global config level to configure the domain suffix that is automatically appended to the hostname entered with a command supporting DNS operation. Configuring the domain suffix is optional if you plan to use fully qualified domain names in all cases instead of just entering hostnames. The no form of the command removes the configured domain name suffix.

Example input

Suppose you want to configure the following on the switch:

  • the address 2001:db8::127:10 which identifies a DNS server in the domain named mygroup.hpnetworking.net

  • a priority of 1 for the above server

  • the domain suffix mygroup.hpnetworking.net

Assume that the above, configured DNS server supports an IPv6 device having a hostname of “mars-1” (and an IPv6 address of fe80::215:60ff:fe7a:adc0) in the “mygroup.hpnetworking.net” domain. In this case you can use the device's hostname alone to ping the device because the mygroup.hpnetworking.net domain has been configured as the domain name on the switch and the address of a DNS server residing in that domain is also configured on the switch. The commands for these steps are as follows:
Switch(config)# ip dns server priority 1 2001:db8::127:10
Switch(config)# ip dns domain-name mygroup.hpnetworking.net
Switch(config)# ping6 mars-1
fe80::215:60ff:fe7a:adc0 is alive, time = 1 ms

However, for the same “mars-1” device, if mygroup.hpnetworking.net was not the configured domain name, you would have to use the fully qualified domain name for the device named mars-1:

Switch# ping6 mars-1.mygroup.hpnetworking.net

For further information and examples on using the DNS feature, see “DNS Resolver” in the Troubleshooting appendix, in the current Management and Configuration Guide for your switch.