ip dns vrf

Configures the IPv4 Domain Name System (DNS) server configuration through user-defined VRF and management VRF.
Syntax
ip dns [ vrf vrf-name ] {domain-list domain-name | server-address ip-address [ip-address...]}
no ip dns [ vrf vrf-name] {domain-list domain-name | server-address ip-address [ip-address... ]}
Command Default

IPv4 DNS is not configured.

Parameters
vrf
Configures the pre-configured VRF or a management VRF.
vrf-name
Specifies the name of a pre-configured VRF or a management VRF.
domain-list
Configures a list of DNS domains.
domain-name
The domain name.
server-address
Configures the DNS server IPv4 address.
ip-address
The IPv4 address of the DNS server. You can configure up to a maximum of four IP addresses separated by a space.
Modes

Global configuration mode

Usage Guidelines

This command does not support IPv6 DNS servers with VRF; it only supports IPv4 DNS servers with VRF.This feature is supported on ICX8200, ICX 7850, ICX7650, and ICX7550 devices only.

The no form of the command removes the IPv4 DNS server configuration with VRF.

Examples

The following example confugures DNS server resolution over a user-defined VRF.

device(config)# ip dns vrf vrf1 server-address 8.8.8.8
device(config)# ip dns vrf vrf1 domain-list www.google.com

The following example configures DNS server resolution through management VRF.

device# configure terminal
device(config)# vrf vrf2
device(config-vrf-vrf2)# exit
device(config)# management vrf vrf2 
device(config)# ip dns vrf vrf2 server-address 8.8.8.8
History
Release version Command history
10.0.10d This command was introduced.