To define static hostname-to-address mappings in the Domain Name System (DNS) hostname cache, use the ip host command. To remove a hostname-to-address mapping, use the no form of this command.
ip host name address1 [ address2 ... address6 ]
no ip host name address1 [ address2 ... address6 ]
|
name
|
Hostname. The
name
can be any case-sensitive, alphanumeric string up to 80 characters.
|
|
address1
|
IPv4 address in the x.x.x.x format.
|
|
address2 ...address6
|
(Optional) Up to five additional IPv4 addresses in the x.x.x.x format.
|
None
Global configuration mode
|
Release
|
Modification
|
|---|---|
|
5.0(3)N1(1)
|
This command was introduced.
|
Use the ip host command to add a static hostname to DNS.
This example shows how to configure a static hostname:
|
Command
|
Description
|
|---|---|
|
show hosts
|
Displays information about the IP domain name configuration.
|