background image
Resolving Hostnames
383
1 user(s) now active on Management Console.
User Interface Menu
[M] Menus
[K] Command Line
Enter Selection:[Ctrl+Shift+6, then x]
Todd2509#
I successfully used the host table to create a session to two devices and
used the names to telnet into both devices. Notice in the entries in the show
sessions
output below that the hostname now shows up instead of the
IP address.
Todd2509#sh sess
Conn Host Address Byte Idle Conn Name
1 1900switch 192.168.0.148 0 0 switch
* 2 2501b 172.16.10.2 0 0 2501b
Todd2509#
You can remove a hostname from the table by using the no ip host
command, as in the following example:
RouterA(config)#no ip host routerb
The problem with the host table method is that you would need to create
a host table on each router to be able to resolve names. If you have many
routers and want to resolve names, using DNS is a better choice.
Using DNS to Resolve Names
If you have many devices and don't want to create a host table in each device,
you can use a DNS server to resolve hostnames.
Any time a Cisco device receives a command it doesn't understand, it tries
to resolve this through DNS by default. Watch what happens when I type the
special command todd at a Cisco router prompt.
Todd2509#todd
Translating "todd"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find
computer address
Todd2509#
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com