ip dns domain-name

Syntax

ip dns domain-name <DOMAIN-NAME> [ vrf <VRF-NAME> ] 

no ip dns domain-name <DOMAIN-NAME> [ vrf <VRF-NAME> ]

Description

Configures a domain name that is appended to the DNS request. The domain can be either IPv4 or IPv6. By default, requests are forwarded on the default VRF. If a domain list is defined with the command ip dns domain-list, the domain name defined with this command is ignored.

The no form of this command removes the domain name.

Command context

config

Parameters

<DOMAIN-NAME>

Specifies the domain name to append to DNS requests. Length: 1 - 256 characters.

vrf <VRF-NAME>
Specifies the VRF on which to send DNS requests. The VRF must be defined on the switch. If no VRF is specified, the default VRF is used.

Authority

Administrators

Examples

Setting the default domain name to domain.com:

switch(config)# ip dns domain-name domain.com

Setting the default domain name to domain.com and forwards DNS requests onto mainvrf:

switch(config)# ip dns domain-name domain1.com vrf mainvrf

Removing the default domain name domain.com:

switch(config)# no ip dns domain-name domain.com