< Home

dns server vpn-instance

Function

The dns server vpn-instance command configures the device to send DNS query requests to the DNS server on a specified VPN network.

The undo dns server vpn-instance command disables the device from sending DNS query requests to the DNS server on a specified VPN network.

By default, the device can only send DNS query requests to the DNS server on a public network.

Format

dns server vpn-instance vpn-instance-name

undo dns server vpn-instance

Parameters

Parameter Description Value

vpn-instance-name

Specifies a VPN instance name.

It must be the name of an existing VPN instance.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

If an interface on the device and the DNS server have reachable routes to each other and the interface is on a VPN network, the device must use the DNS server on the VPN network for DNS query so that DNS packets can be exchanged properly.

If you run this command multiple times, only the latest configuration takes effect.

The device can send DNS query requests to the DNS server on a public network or specified VPN network.

After a VPN instance is bound to the interface connected to the DNS client, the DNS proxy or relay function does not take effect.

Example

# Configure the device to send DNS query requests to the DNS server on the VPN network vpn1.

<sysname> system-view
[sysname] ip vpn-instance vpn1
[sysname-vpn-instance-vpn1] ipv4-family
[sysname-vpn-instance-vpn1-af-ipv4] quit
[sysname-vpn-instance-vpn1] quit
[sysname] dns server vpn-instance vpn1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >