19.07.2013 Views

CCNA Complete Guide 2nd Edition.pdf - Cisco Learning Home

CCNA Complete Guide 2nd Edition.pdf - Cisco Learning Home

CCNA Complete Guide 2nd Edition.pdf - Cisco Learning Home

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 10<br />

Managing a <strong>Cisco</strong> Internetwork<br />

Resolving Hostnames<br />

- By properly setting up hostname resolution or translation service, a hostname instead of an IP<br />

address can be used to communicate with a device.<br />

- Below lists the 2 available methods used to resolve hostnames to IP addresses:<br />

i) Build a host table on each device (static host table).<br />

ii) Setup a Domain Name System (DNS) server (dynamic host table).<br />

- Below lists some <strong>Cisco</strong> IOS IP naming services commands:<br />

ip domain-name {name} Defines the default domain name of a device.<br />

Global configuration command.<br />

ip domain-lookup Tells the IOS to resolve unknown hostnames and wrongly typed<br />

commands using DNS. Global configuration command.<br />

ip name-server {svr1}<br />

[svr2… svr6]<br />

Configures the DNS name server IP addresses (max of 6).<br />

Global configuration command.<br />

ip host {name} {ip-addr} Creates a static entry in the host table.<br />

Global configuration command.<br />

no ip host {name} Removes a static entry from the host table.<br />

Global configuration command.<br />

show hosts Lists DNS and host table information. EXEC command.<br />

Switch#conf t<br />

Switch(config)#ip host router01 192.168.0.1<br />

Switch(config)#ip host router02 192.168.0.2<br />

Switch(config)#ip name-server 172.16.0.1 172.16.0.2<br />

Switch(config)#^Z<br />

Switch#<br />

Switch#sh hosts<br />

Default domain is not set<br />

Name/address lookup uses domain service<br />

Name servers are 172.16.0.3, 172.16.1.3<br />

Codes: u - unknown, e - expired, * - OK, ? - revalidate<br />

t - temporary, p - permanent<br />

Host Port Flags Age Type Address(es)<br />

router01 None (perm, OK) 0 IP 192.168.0.1<br />

router02 None (perm, OK) 0 IP 192.168.0.2<br />

Switch#<br />

Note: The perm in the Flags column represents a manually configured entry; while the temp<br />

represents a cached DNS-resolved entry.<br />

- It is recommended to have at least 2 name servers for redundancy and availability purposes.<br />

67<br />

Copyright © 2008 Yap Chin Hoong<br />

yapchinhoong@hotmail.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!