dns source-interface

Syntax

dns source-interface interface-type interface-number

undo dns source-interface

View

System view

Default level

2: System level

Parameters

interface-type interface-number: Specifies an interface by its type and number.

Description

Use dns source-interface to specify the source interface for DNS packets.

Use undo dns source-interface to restore the default.

By default, no source interface for DNS packets is specified. The device uses the primary IP address of the output interface of the matching route as the source IP address of a DNS request.

The device uses the primary IP address of the specified source interface as the source IP address of a DNS request, which however is still forwarded through the output interface of the matching route.

Examples

# Specify VLAN-interface 2 as the source interface of DNS requests.

<Sysname> system-view
[Sysname] dns source-interface vlan-interface2