IP Addresses and Services Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

PDF

IP Addresses and Services Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

Domain name services

Want to summarize with AI?

Log in

Explains how Cisco IOS XR resolves hostnames and addresses through static and dynamic cache entries, configured domain names, and DNS servers, and provides a task for configuring and verifying the resolver.


Domain name services are BSD-compatible resolver functions that

  • maintain static and dynamic hostname-to-address cache entries

  • complete unqualified hostnames with a default domain or domain list, and

  • query configured DNS servers when the local cache does not contain a requested mapping.

Applications such as Telnet and commands such as ping and traceroute request hostname or address resolution through a remote procedure call.

The domain service checks the local cache first, which reduces the time required to resolve previously stored mappings. If no entry exists, the domain service sends a DNS query to a name server and stores the response as a dynamic entry.

DNS name servers maintain distributed hostname-to-address mappings. You can configure one or more name servers for the resolver.

Cache and domain settings

The resolver uses these entry and configuration types.

  • Static entry: Created with a domain ipv4 host or domain ipv6 host command.

  • Dynamic entry: Received from a configured name server.

  • Name server: Configured with the domain name-server command. You can configure one or more name servers.

  • Default domain: Configured with the domain name command. The resolver appends this domain to an unqualified hostname before adding the completed hostname to the host table.

  • Domain list: Configured with the domain list command. The list supplies candidate domains for an unqualified hostname.


Configure domain name services

Configure the router to resolve hostnames and IP addresses for applications and diagnostic commands.

DNS-based hostname-to-address translation is enabled by default. If it was disabled, use no domain lookup disable to enable it.

Procedure

  1. Define static IPv4 host mappings.

    Example:

    Router# configure
    Router(config)# domain ipv4 host host1 192.168.7.18
    Router(config)# domain ipv4 host host2 10.2.0.2 192.168.7.33
    Router(config)# commit
  2. Define the default domain name.

    Example:

    Router(config)# domain name sampledomain.com
    Router(config)# commit
  3. Configure the primary and secondary name server addresses.

    Example:

    Router(config)# domain name-server 192.168.1.111
    Router(config)# domain name-server 192.168.1.2
    Router(config)# commit
  4. Verify the domain settings and host cache.

    Example:

    Router# show hosts
    Default domain is sampledomain.com
    Name/address lookup uses domain service
    Name servers: 192.168.1.111, 192.168.1.2
    
    Host                       Flags    Age(hr) Type Address(es)
    host2                    (perm, OK)   0      IP  10.2.0.2
                                                     192.168.7.33
    host1                    (perm, OK)   0      IP  192.168.7.18
    

The router uses the configured cache, domain name, and name servers for name and address resolution.