ip host
Use this command to define static a hostname-to-address mapping in DNS. You can specify one mapping in a command.
Use the no
form of this command remove a hostname-to-address mapping.
If the command ip host <hostname> <ip>
is enabled and the hostname is configured for any feature, the old IP associated with the hostname will be used until the feature is disabled and re-enabled, even if the IP associated with the hostname is changed later.
Command Syntax
ip host (vrf (NAME|management)|) WORD (X:X::X:X | A.B.C.D)
no ip host (vrf (NAME|management)|) WORD (X:X::X:X | A.B.C.D)
Parameters
WORD
Host name, such as company.com
X:X::X:X
IPv6 address of the host
A.B.C.D
IPv4 address of the host
vrf management
Defines the management VRF Virtual Routing and Forwarding instance.
vrf NAME
Specify the user-defined VRF instance name.
Default
None
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3. Added parameter NAME in OcNOS version 6.5.3
Examples
#configure terminal
(config)#ip host company.com 192.0.2.1