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.
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. |
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.