ipv6 host

Function

The ipv6 host command configures a static DNS entry.

The undo ipv6 host command deletes a static DNS entry.

By default, no static DNS entry is configured.

Format

ipv6 host host-name ipv6-address [ vpn-instance vpn-name ]

undo ipv6 host host-name [ ipv6-address ] [ vpn-instance vpn-name ]

Parameters

Parameter Description Value
host-name

Specifies a host name.

The value is a string of 1 to 255 characters.

ipv6-address

Specifies an IPv6 address mapped to a host name.

The address is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

vpn-instance vpn-name

Specifies the VPN to be displayed.

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.

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dns write

Usage Guidelines

Usage Scenario

If a host name is mapped to multiple IPv6 addresses and addresses are searched based on the host name, for example, the host is being pinged, the first configured IPv6 address is used.

If you want to use static DNS for domain name resolution, run the ipv6 host command on an IPv6 DNS resolver to set the mapping between a host name and an IPv6 address.

Precautions

Each domain name can be mapped to a maximum of eight IPv6 addresses.

Example

# Set the IPv6 address corresponding to domain name RTA in the VPN named vpn1 to 2001:db8::2.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpn1
[*HUAWEI-vpn-instance-vpn1] ipv6-family
[*HUAWEI-vpn-instance-vpn1-af-ipv6] quit
[*HUAWEI-vpn-instance-vpn1] quit
[~HUAWEI] ipv6 host RTA 2001:db8::2 vpn-instance vpn1
# Configure a static DNS entry.
<HUAWEI> system-view
[~HUAWEI] ipv6 host RTA 2001:db8::1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >