< Home

dns server source-ip

Function

The dns server source-ip command configures the source IP address for the DNS client to communicate with a server.

The undo dns server source-ip command deletes the source IP address for the DNS client to communicate with a server.

By default, no source IP address is configured for the DNS client to communicate with a server.

Format

dns server source-ip ip-address [ vpn-instance vpn-instance-name ]

undo dns server source-ip [ vpn-instance vpn-instance-name ]

Parameters

Parameter

Description

Value

ip-address

Specifies the source IP address for the DNS client to communicate with a server.

The value is in dotted decimal notation.

vpn-instance vpn-instance-name

Specifies the name of a VPN instance.

The value must be an existing VPN instance name.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

When the DNS client communicates with a server, the administrator can specify a source IP address for the client to ensure the communication security. The route from the DNS server to the specified source IP address must be reachable. The DNS server uses the specified source IP address as the destination address and sends a DNS response packet to the client.

If vpn-instance vpn-instance-name is specified, the specified source IP address is used only when the device communicates with the DNS server bound to the specified VPN instance.

Example

# Specify the source IP address 172.16.1.1 for the DNS client to communicate with a server.

<HUAWEI> system-view
[HUAWEI] dns server source-ip 172.16.1.1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >