Skip to content

Domain

This feature allows you to manage DNS resolution behavior, source interfaces, and maintain local host mappings. It also supports VRF-specific domain configurations for isolated DNS resolution within VRF contexts.

Diagram
NameTypeConstraintMandatoryDefault Value
domainClass[domain]No

NameTypeConstraintMandatoryDefault Value
default_flows_disableBooleantrue, falseNo
ipv4_hostsList[ipv4_hosts]No
ipv6_hostsList[ipv6_hosts]No
listsList[lists]No
lookup_disableBooleantrue, falseNo
source_interfaceStringNo
multicastStringNo
nameStringNo
name_serversList[name_servers]No
vrfsList[vrfs]No

ipv4_hosts (iosxr.devices.configuration.domain)

Section titled “ipv4_hosts (iosxr.devices.configuration.domain)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
addressesListIPNo

ipv6_hosts (iosxr.devices.configuration.domain)

Section titled “ipv6_hosts (iosxr.devices.configuration.domain)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
addressesListIPNo

lists (iosxr.devices.configuration.domain)

Section titled “lists (iosxr.devices.configuration.domain)”
NameTypeConstraintMandatoryDefault Value
nameStringYes

name_servers (iosxr.devices.configuration.domain)

Section titled “name_servers (iosxr.devices.configuration.domain)”
NameTypeConstraintMandatoryDefault Value
addressIPYes

NameTypeConstraintMandatoryDefault Value
vrfStringYes
ipv4_hostsList[ipv4_hosts]No
ipv6_hostsList[ipv6_hosts]No
listsList[lists]No
lookup_disableBooleantrue, falseNo
source_interfaceStringNo
multicastStringNo
nameStringNo
name_serversList[name_servers]No

The following configuration describes how to set up various domain parameters on a Cisco IOS-XR device.

domain name <domain-name>
domain list <domain>
domain name-server <ip-address>
domain lookup
no domain lookup
domain source-interface <interface>
domain multicast <multicast-domain>
domain vrf <vrf-name>

Global domain configuration applies DNS settings to the default routing table and is used by the router for hostname resolution across all VRFs unless overridden by VRF-specific settings. These settings control how the router performs DNS lookups for management tasks, hostname resolution in CLI commands, and other system-level DNS requirements.

Example-1: Domain configuration with name servers

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
domain:
name: cisco.com
name_servers:
- address: 8.8.8.8
- address: 8.8.4.4

Example-2: Domain with domain list and host mappings

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
domain:
name: lab.cisco.com
lists:
- name: cisco.com
- name: lab.cisco.com
ipv4_hosts:
- name: server1
addresses:
- 192.168.1.10
- 192.168.1.11
- name: ntp-server
addresses:
- 10.1.1.1
ipv6_hosts:
- name: server1-v6
addresses:
- "2001:db8::10"
- "2001:db8::11"

VRF-specific domain configuration applies DNS settings to individual VRFs and is used for isolated hostname resolution within each VRF context. These settings override global domain configuration within the specified VRF and control how the router performs DNS lookups for applications, services, and routing protocols operating within that VRF’s routing table.

Example-1: VRF domain configuration with name servers

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
domain:
vrfs:
- vrf: MGMT
name: mgmt.cisco.com
name_servers:
- address: 10.1.1.1
- address: 10.1.1.2

Example-2: VRF domain with host mappings

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
domain:
vrfs:
- vrf: INTERNET
name: internet.lab.com
ipv4_hosts:
- name: proxy-server
addresses:
- 203.0.113.10
- 203.0.113.20
- name: dns-cache
addresses:
- 203.0.113.100
ipv6_hosts:
- name: proxy-v6
addresses:
- "2001:db8:internet::10"
- "2001:db8:internet::20"

Example-3: Multiple VRF domain configurations

iosxr:
devices:
- name: router-1
host: 10.10.10.1:57400
configuration:
domain:
vrfs:
- vrf: MGMT
name: mgmt.example.com
lookup_disable: false
name_servers:
- address: 10.0.0.1
- vrf: PROD
name: prod.example.com
name_servers:
- address: 192.168.100.1
- address: 192.168.100.2