The ip host command configures the mappings between host names and IP addresses.
The undo ip host command deletes the mappings between host names and IP addresses.
By default, host names and IP addresses do not have mapping relationships.
Parameter | Description | Value |
---|---|---|
host-name |
Specifies a host name. |
The value is a string of 1 to 255 case-insensitive characters. |
ip-address |
Specifies an IP address corresponding to a host name. |
The value is in dotted decimal notation. |
vpn-instance vpn-instance-name |
Specifies the name of a VPN instance. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
Usage Scenario
If you want to use static DNS for domain name resolution, you must run the ip host command to configure the mappings between host names and IP addresses first.
Precautions
When using the ip host command, note the following:
<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpn1 [*HUAWEI-vpn-instance-vpn1] ipv4-family [*HUAWEI-vpn-instance-vpn1-af-ipv4] quit [*HUAWEI-vpn-instance-vpn1] quit [*HUAWEI] ip host RTA 10.110.0.2 vpn-instance vpn1
<HUAWEI> system-view [~HUAWEI] ip host huawei 10.110.0.1