SystemGlobal Config

no ip domain-lookup

Disables DNS-based hostname resolution on a Cisco router or switch, preventing the device from attempting to resolve unrecognized commands as domain names.

Syntax·Global Config
no ip domain-lookup

When to Use This Command

  • When typing a mistyped command causes a long delay while the router tries to resolve it as a hostname via DNS
  • In lab environments where no DNS server is available and you want to avoid unnecessary timeouts
  • On routers that should only use static hostname mappings or local host table entries
  • When you want to ensure that all hostname resolution is done manually to avoid reliance on external DNS

Command Examples

Disabling DNS lookup to avoid command delays

Router(config)# no ip domain-lookup
Router(config)#

The command is entered in global configuration mode. No output is displayed upon successful execution. The prompt returns immediately, indicating the change is applied.

Verifying DNS lookup is disabled

Router# show running-config | include domain-lookup
no ip domain-lookup

The output shows that 'no ip domain-lookup' appears in the running configuration, confirming that DNS lookup is disabled. If the command were not present, DNS lookup would be enabled by default.

Understanding the Output

The command 'no ip domain-lookup' does not produce any direct output when executed. Its effect is observed indirectly: when a user mistypes a command, the router will immediately return '% Unknown command' instead of waiting for a DNS timeout (which can take up to 30 seconds). To verify the setting, use 'show running-config | include domain-lookup'. If 'no ip domain-lookup' appears, DNS lookup is disabled. If nothing appears, DNS lookup is enabled (default). In a real network, disabling DNS lookup is common on routers that do not need to resolve hostnames via DNS, such as in lab or isolated environments.

CCNA Exam Tips

1.

CCNA exam tip 1: The default state of 'ip domain-lookup' is enabled. You must know that 'no ip domain-lookup' disables it.

2.

CCNA exam tip 2: A common exam scenario shows a router hanging for 30 seconds after a mistyped command; the solution is to disable DNS lookup.

3.

CCNA exam tip 3: The exam may test that 'ip domain-lookup' is a global configuration command and that 'no ip domain-lookup' is used to prevent unwanted DNS queries.

4.

CCNA exam tip 4: Remember that disabling DNS lookup does not affect the ability to ping or telnet to IP addresses; it only affects hostname resolution.

Common Mistakes

Mistake 1: Typing 'no ip domain-lookup' in user EXEC or privileged EXEC mode instead of global configuration mode — the command will be rejected.

Mistake 2: Confusing 'ip domain-lookup' with 'ip name-server' — the former enables/disables DNS resolution, the latter specifies DNS server addresses.

Mistake 3: Forgetting that 'no ip domain-lookup' is a global command and does not require any additional parameters.

Practice for the CCNA 200-301

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

Practice CCNA Questions