dns server source-ip

Function

The dns server source-ip command specifies an IP address of the DNS client as the source address for DNS communication.

The undo dns server source-ip command deletes the source address configured for DNS communication.

By default, no IP address is specified as the source address for DNS communication.

Format

dns server source-ip ipv4Addr

dns server source-ip vpn-instance vpn-name ipv4Addr

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

Parameters

Parameter Description Value
ipv4Addr

Specifies an IP address of the DNS client as the source address for DNS communication.

The value is in dotted decimal notation.

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 dynamic DNS is configured, you can run the dns server source-ip command to specify an IP address of the DNS client as the source address for DNS communication. This configuration ensures communication security. After an IP address of the DNS client is configured as the source address, the DNS server returns resolution results directly to that IP address. If you do not specify the source address, the source address carried in the DNS request varies according to the destination address.

Prerequisites

Before the dns server source-ip command is run, perform the following operations:

1.In the system view, run the dns resolve command to enable dynamic DNS.

2.In the system view, run the dns server command to configure a DNS server address.

Follow-up Procedure

After the dns server source-ip command is run, perform the following operations to implement dynamic DNS: run the dns domain command to configure the domain name suffix.

Example

# Specify the IP address of the DNS client 10.110.2.1 as the source address for DNS communication.
<HUAWEI> system-view
[~HUAWEI] dns server source-ip 10.110.2.1
# Specify the IP address of the local router in vpn1 to 10.110.2.1.
<HUAWEI> system-view
[~HUAWEI] dns server source-ip vpn-instance vpn1 10.110.2.1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >