DHCPDHCP Pool Config

domain-name [domain]

Assigns a domain name to DHCP clients, which is used for DNS resolution and device naming.

Syntax·DHCP Pool Config
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.com

No 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 pool
Pool 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

1.

Remember that 'domain-name' is configured in DHCP pool configuration mode, not global config.

2.

The domain name is sent as DHCP option 15; clients use it for DNS suffix appending.

3.

CCNA may test that 'domain-name' is separate from 'ip domain-name' (global) which is for the router itself.

4.

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

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions