< Home

dns server source-ip

Function

The dns server source-ip command configures the source IP address for the device to send and receive DNS packets.

The undo dns server source-ip command deletes the source IP address for the device to send and receive DNS packets.

By default, no source IP address is configured for the device.

Format

dns server source-ip ip-address

undo dns server source-ip

Parameters

Parameter

Description

Value

ip-address

Specifies the source IP address for the device to send and receive DNS packets.

The value is in dotted decimal notation.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the device sends and receives DNS packets, the administrator can specify a source IP address for the device 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 local device.

When the device functions as a DNS proxy or relay, run the dns server source-ip ip-address command to configure the source IP address for communicating with the DNS server.

Precautions

To make the command take effect, pay attention to the following points:

  • Ensure that the source IP address is the IP address of an interface or logical interface on the device, and there are reachable routes between the interface and the DNS server.

  • Ensure that the source IP address and the IP address of the DNS server are on the same VPN or public network.

Example

# Specify source IP address 172.16.1.1 for the local device.

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