135
Syntax
ip host host-name ip-address [ vpn-instance vpn-instance-name ]
undo ip host host-name ip-address [ vpn-instance vpn-instance-name ]
Default
No host name-to-IPv4 address mappings exist.
Views
System view
Predefined user roles
network-admin
Parameters
host-name: Specifies a host name, a case-insensitive string of 1 to 253 characters. Valid characters
are letters, digits, hyphens (-), underscores (_), and dots (.).
ip-address: Specifies the IPv4 address of the host.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a
case-sensitive string of 1 to 31 characters. To create a host name-to-IP address mapping for the
public network, do not specify this option.
Usage guidelines
The system allows a maximum of 1024 host name-to-IPv4 address mappings for the public network
or each VPN instance. You can configure host name-to-IPv4 address mappings for both public
network and VPN instances.
For the public network or a VPN instance, each host name maps to only one IPv4 address. If you
execute this command multiple times, the most recent configuration takes effect.
Do not use the ping command parameter ip, -a, -c, -f, -h, -i, -m, -n, -p, -q, -r, -s, -t, -tos, -v, or
-vpn-instance as the host name. For more information about the ping command parameters, see
Network Management and Monitoring Command Reference.
Examples
# Map IPv4 address 10.110.0.1 to host name aaa for the public network.
<Sysname> system-view
[Sysname] ip host aaa 10.110.0.1
Related commands
display dns host
ipv6 dns dscp
Use ipv6 dns dscp to set the DSCP value for IPv6 DNS packets sent by an IPv6 DNS client or DNS
proxy.
Use undo ipv6 dns dscp to restore the default.
Syntax
ipv6 dns dscp dscp-value
undo ipv6 dns dscp
Default
The DSCP value is 0 in IPv6 DNS packets sent by an IPv6 DNS client or DNS proxy.