Resolving Hostnames

If you want to use a hostname rather than an IP address to connect to a remote device, the device that you are using to make the connection must be able to translate the hostname to an IP address.

There are two ways to resolve hostnames to IP addresses: building a host table on each router or building a Domain Name System (DNS) server, which is similar to a dynamic host table (assuming dynamic DNS).

Building a Host Table

A host table provides name resolution only on the router that it was built upon. The command to build a host table on a router is as follows:

ip host host_name [tcp_port_number] ip_address

The default is TCP port number 23, but you can create a session using Telnet with a different TCP port number if you ...

Get CCNA® Cisco Certified Network Associate: Study Guide, Seventh Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.