ip domain name configures a Cisco IOS device’s default domain name. The device appends it to DNS queries containing only a hostname, allowing users to resolve short names such as pc2 instead of pc2.jeremysitlab.com. section 3.2.2
Use the command and its related behavior as follows:
- Configure either ip domain name name or the equivalent ip domain-name name in global configuration mode. section 3.2.2
- Treat the command as optional for hostname completion, but use it as one step when configuring SSH remote CLI access. section 3.2.2
- Verify the configured value with show hosts, which displays the default domain alongside manually configured and DNS-learned mappings. section 3.2.2
Configure and verify a default domain
R1(config)# ip domain name jeremysitlab.com R1# show hosts Default domain is jeremysitlab.com With this setting, ping pc2 can resolve pc2.jeremysitlab.com when a matching mapping exists.
