DHCPDHCP Pool Config

dns-server [ip]

Specifies the DNS server IP address(es) that will be assigned to DHCP clients on a specific DHCP pool.

Syntax·DHCP Pool Config
dns-server [ip]

When to Use This Command

  • Assigning a corporate DNS server to hosts in a VLAN so they can resolve internal domain names.
  • Providing a public DNS server like 8.8.8.8 to clients in a guest network.
  • Configuring multiple DNS servers for redundancy in a production DHCP pool.
  • Updating DNS server addresses in an existing pool without deleting and recreating the pool.

Command Examples

Assign a single DNS server to a DHCP pool

dns-server 192.168.1.1

No output is generated; the command silently configures the DNS server address. Use 'do show ip dhcp pool' to verify.

Assign multiple DNS servers to a DHCP pool

dns-server 192.168.1.1 8.8.8.8

Multiple DNS servers can be specified in order of preference. Clients will receive both addresses.

Understanding the Output

This command does not produce output upon execution. To verify the configured DNS servers, use 'show ip dhcp pool [pool-name]'. The output will list the DNS server(s) under 'DNS server' field. For example: 'DNS server : 192.168.1.1, 8.8.8.8'. If no DNS server is configured, the field will be absent or show 'None'. Ensure the IP addresses are reachable and correct for client resolution.

CCNA Exam Tips

1.

CCNA exam may ask which command assigns a DNS server to a DHCP pool; answer is 'dns-server' under DHCP pool configuration mode.

2.

Remember that multiple DNS servers can be listed in one command, separated by spaces.

3.

The command is configured per DHCP pool, not globally; each pool can have different DNS servers.

4.

Be aware that the DNS server IP must be reachable from clients; exam might test troubleshooting scenarios.

Common Mistakes

Mistake: Forgetting to enter DHCP pool configuration mode before using 'dns-server'. Consequence: Command rejected or applied to wrong pool.

Mistake: Using 'ip dns-server' instead of 'dns-server'. Consequence: Command not recognized.

Mistake: Not verifying with 'show ip dhcp pool' after configuration. Consequence: Undetected misconfiguration.

Related Commands

Practice for the CCNA 200-301

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

Practice CCNA Questions