domain-name [domain]
Assigns a domain name to DHCP clients, which is used for DNS resolution and device naming.
domain-name [domain]When to Use This Command
- Configure a domain name for DHCP clients in a corporate network so they can resolve internal hostnames.
- Set a domain name for clients in a branch office to ensure consistent DNS suffix for local resources.
- Automatically assign a domain name to devices in a lab environment for testing and management.
- Provide a domain name to clients in a guest network for internet access without internal domain resolution.
Command Examples
Basic domain name assignment
domain-name cisco.comNo output is generated; the command configures the DHCP pool to send domain name option 15 to clients.
Verifying domain name in DHCP pool
show ip dhcp poolPool mypool : Utilization mark (high/low) : 100 / 0 Subnet size (first/next) : 0 / 0 Total addresses : 254 Leased addresses : 10 Pending event : none 1 subnet is currently in the pool : Current index IP address range Leased addresses 192.168.1.1 192.168.1.1 - 192.168.1.254 10 Domain name : cisco.com
The 'Domain name' field shows the configured domain name. If missing, clients may not receive the domain suffix.
Understanding the Output
The command itself produces no output. To verify, use 'show ip dhcp pool' and look for the 'Domain name' line. A missing domain name indicates the option is not sent to clients. Ensure the domain name matches the organization's DNS suffix for proper name resolution.
CCNA Exam Tips
Remember that 'domain-name' is configured in DHCP pool configuration mode, not global config.
The domain name is sent as DHCP option 15; clients use it for DNS suffix appending.
CCNA may test that 'domain-name' is separate from 'ip domain-name' (global) which is for the router itself.
Know that 'domain-name' in DHCP pool overrides any global domain name for DHCP clients.
Common Mistakes
Configuring 'domain-name' in global configuration mode instead of DHCP pool mode.
Forgetting to apply the command to the correct DHCP pool, leaving clients without a domain.
Using an invalid domain name format (e.g., with spaces or special characters).
Related Commands
ip dhcp pool [name]
Creates a DHCP pool and enters DHCP pool configuration mode, where you define the subnet, default gateway, DNS servers, and other DHCP options for assigning IP addresses to clients.
show ip dhcp pool
Displays the configuration and utilization statistics of a DHCP pool, used to verify pool settings and address allocation status.
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions