You want to configure your router to use DNS to resolve hostnames.
To configure the router to use DNS to resolve hostnames, you need to specify a domain name and at least one nameserver:
configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router1(config)#
Starting in IOS Version 12.2, Cisco changed the command syntax from ip domain-lookup to ip domain lookup. They also changed the command syntax from ip domain-name to ip domain name. The new IOS software still accepts previous versions of the commands.
As we mentioned in Recipe
2.10, you can configure your router to use Domain Name Service
(DNS) to resolve hostnames. In fact, Cisco routers have DNS name
resolution enabled by default. However, since there is no default
nameserver, the router will attempt to use the local broadcast
255.255.255.255, until you
explicitly configure a proper nameserver. This means that the
ip domain-lookup configuration
command in the example is necessary only if someone has explicitly
disabled DNS on the router.
After you configure the router with a valid nameserver, you can access any hostname that is known by your DNS server. For example, our DNS server exchanges information with the public Internet, so we can ping the Cisco web page ...