Tuesday 2 February 2010

Create a Static Host Mapping

In this post I will create a static host entry for router on the IP address 10.0.1.254. I check the configuration with the show hosts command. Finally I ping 10.0.1.254 using the host name.


switch1#ping router
Translating "router"
% Unrecognized host or address, or protocol not running.

switch1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch1(config)#ip host router 10.0.1.254
switch1(config)#end


switch1#show hosts
Default domain is not set
Name/address lookup uses static mappings

Host Port Flags Age Type Address(es)
router None (perm, OK) 0 IP 10.0.1.254


switch1#ping router
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.1.254, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms