Dns 15 MT Book
Dns 15 MT Book
Dns 15 MT Book
Americas Headquarters
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134-1706
USA
http://www.cisco.com
Tel: 408 526-4000
800 553-NETS (6387)
Fax: 408 527-0883
THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS,
INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH
THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY,
CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.
The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version
of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.
NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS" WITH ALL FAULTS.
CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.
IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT
LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS
HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network
topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional
and coincidental.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: http://
www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership
relationship between Cisco and any other company. (1110R)
Response to Internally Generated DNS Queries per the Resolving Parameters of the
Default Global DNS View 63
How to Configure Split DNS 64
Enabling Split DNS Debugging Output 64
Defining a DNS Name List 66
Defining a DNS View 67
Defining Static Entries in the Hostname Cache for a DNS View 71
Defining a DNS View List 73
Modifying a DNS View List 75
Adding a Member to a DNS View List Already in Use 75
Changing the Order of the Members of a DNS View List Already in Use 77
Specifying the Default DNS View List for the DNS Server of the Device 78
Specifying a DNS View List for a Device Interface 79
Specifying a Source Interface to Forward DNS Queries 81
Configuration Examples for Split DNS 82
Example: Split DNS View Limited to Queries from a Specific VRF 82
Example: Split DNS View with Dynamic Name Server Configuration 82
Example: Split DNS View with Statically Configured Hostname Cache Entries 83
Example: Split DNS View with Round-Robin Rotation of Hostname Cache Entries 83
Example: Split DNS Configuration of ACLs That Can Limit DNS View Use 83
Example: Split DNS View Lists Configured with Different View-use Restrictions 84
Example: Split DNS Configuration of Default and Interface-specific View Lists 85
Additional References 86
Feature Information for Split DNS 87
Glossary 87
Note You can specify IPv4 and IPv6 addresses while performing various tasks in this feature. The resource
record type AAAA is used to map a domain name to an IPv6 address. The IP6.ARPA domain is defined
to look up a record given an IPv6 address.
DNS Overview
If your network devices require connectivity with devices in networks for which you do not control name
assignment, you can assign device names that uniquely identify your devices within the entire internetwork.
The global naming scheme of the Internet, the DNS, accomplishes this task. This service is enabled by default.
The following sections summarize DNS concepts and function.
Name Servers
To keep track of domain names, IP has defined the concept of a name server. Name servers are programs that
have complete information about their namespace portion of the domain tree and may also contain pointers
to other name servers that can be used to lead to information from any other part of the domain tree. Name
servers know the parts of the domain tree for which they have complete information. A name server may also
store information about other parts of the domain tree. Before domain names can be mapped to IP addresses,
you must first identify the hostnames, then specify a name server, and enable the DNS service.
Cache
To speed the process of converting names to addresses, the name server maintains a database, called a cache,
of hostname-to-address mappings for use by the connect, telnet, and ping EXEC commands, and related
Telnet support operations. The cache stores the results from previous responses. Upon receiving a client-issued
DNS query, the name server will check this local storage to see if the answer is available locally.
Name Resolvers
Name resolvers are programs that extract information from name servers in response to client requests.
Resolvers must be able to access at least one name server. The resolver either uses that name server's information
to answer a query directly or pursues the query using referrals to other names servers. A resolver will typically
be a system routine that is directly accessible to user programs. Therefore, no protocol is necessary between
the resolver and the user program.
Zones
The domain namespace is divided into areas called zones that are points of delegation in the DNS tree. A zone
contains all domains from a certain point downward, except those for which other zones are authoritative.
DNS Operation
An organization can have many name servers, but Internet clients can query only those that the root name
servers know. The other name servers answer internal queries only.
A name server handles client-issued queries to the DNS server for locally defined hosts within a particular
zone as follows:
• An authoritative name server responds to DNS user queries for a domain name that is under its zone of
authority by using the permanent and cached entries in its own host table. If the query is for a domain
name that is under its zone of authority but for which it does not have any configuration information,
the authoritative name server simply replies that no such information exists.
• A name server that is not configured as the authoritative name server responds to DNS user queries by
using information that it has cached from previously received query responses. If no device is configured
as the authoritative name server for a zone, queries to the DNS server for locally defined hosts will
receive nonauthoritative responses.
Name servers answer DNS queries (forward incoming DNS queries or resolve internally generated DNS
queries) according to the forwarding and lookup parameters configured for the specific domain.
When DNS queries are forwarded to name servers for resolution, some memory space is held for the
corresponding DNS query until an appropriate response is received or until there is timeout. To avoid the free
I/O memory from getting exhausted when handling queries at high rate, configure the maximum size for the
queue.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip host name [tcp-port-number] address1 [address2 ... address8]
4. Do one of the following:
• ip domain name name
• ip domain list name
DETAILED STEPS
Example:
Device# configure terminal
Step 3 ip host name [tcp-port-number] address1 Defines a static hostname-to-address mapping in the hostname cache.
[address2 ... address8]
• The host IP address can be an IPv4 or IPv6 address.
Step 4 Do one of the following: (Optional) Defines a default domain name that the Cisco IOS software will
use to complete unqualified hostnames.
• ip domain name name
or
• ip domain list name
(Optional) Defines a list of default domain names to complete unqualified
hostnames.
Example: • You can specify a default domain name that the Cisco IOS software
will use to complete domain name requests. You can specify either a
Device(config)# ip domain name
cisco.com single domain name or a list of domain names. Any hostname that
does not contain a complete domain name will have the default domain
name you specify appended to it before the name is looked up.
Example:
Note If there is no domain list, the domain name that you specified with
the ip domain name global configuration command is used. If
there is a domain list, the default domain name is not used. The ip
Example: domain list command is similar to the ip domain name command,
Device(config)# ip domain list except that with the ip domain list command you can define a list
cisco1.com of domains, each to be tried in turn until the system finds a match.
Step 5 ip name-server server-address1 Specifies one or more hosts (up to six) that can function as a name server
[server-address2 ... server-address6] to supply name information for DNS.
Example:
Device(config)# ip name-server
172.16.1.111 172.16.1.2
Customizing DNS
Perform this task to customize your DNS configuration.
In a multiple server configuration without the DNS round-robin functionality, many programs will use the
first host server/IP address for the whole time to live (TTL) of the cache and use the second and third host
servers/IP addresses only in the event of host failure. This behavior presents a problem when a high volume
of users all arrive at the first host during the TTL time. For example, the network access server (NAS) sends
out a DNS query. The DNS servers reply with a list of the configured IP addresses to the NAS. The NAS then
caches these IP addresses for a given time (for example, five minutes). All users that dial in during the five
minute TTL time will land on one host, the first IP address in the list.
In a multiple server configuration with the DNS round-robin functionality, the DNS server returns the IP
address of all hosts to rotate between the cache of hostnames. During the TTL of the cache, users are distributed
among the hosts. This functionality distributes calls across the configured hosts and reduces the number of
DNS queries.
In a scheduling algorithm, processes are activated in a fixed cyclic order. Processes that are waiting for other
events, like termination of a child process or an input or output operation, cannot proceed and hence they
return control to the scheduler. If the TTL of the process times out just before the event (for which it was
waiting) occurs, then the event will not be handled until all the other processes are activated.
Note The DNS round-robin functionality is applicable only for the DNS lookups on a device and is not applicable
to another client pointing to the device.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip domain timeout seconds
4. ip domain retry number
5. ip domain round-robin
DETAILED STEPS
Example:
Device# configure terminal
Step 3 ip domain timeout seconds (Optional) Specifies the amount of time to wait for a response to
a DNS query.
Example:
Device(config)# ip domain timeout 17
Step 4 ip domain retry number (Optional) Specifies the number of times to retry sending DNS
queries.
Example: • If the ip domain retry command is not configured, the Cisco
Device(config)# ip domain retry 10 IOS software will retry DNS queries twice.
Example:
Device(config)# ip domain round-robin
SUMMARY STEPS
1. enable
2. configure terminal
3. ip dns server
4. ip dns spoofing [ip-address]
DETAILED STEPS
Example:
Device# configure terminal
Example:
Device(config)# ip dns server
• If the query is for a domain name that is not under its zone of authority, the authoritative name server
determines whether to forward the query to specific back-end name servers based on whether IP
DNS-based hostname-to-address translation has been enabled via the ip domain lookup command.
• If the query is for a domain name that is under its zone of authority and for which it has configuration
information, the authoritative name server answers the query using the permanent and cached entries in
its own host table.
• If the query is for a domain name that is under its zone of authority but for which it does not have any
configuration information, the authoritative name server does not forward the query elsewhere for a
response; instead the authoritative name server simply replies that no such information exists.
Note Unless Distributed Director is enabled, the TTL on locally defined resource records will always be ten
seconds, regardless of any authority record parameters that may have been specified for the DNS name
server by the use of the ip dns primary command.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip dns server
4. ip name-server server-address1 [server-address2... server-address6]
5. ip dns server queue limit {forwarder queue-size-limit | director queue-size-limit}
6. ip host [vrf vrf-name] [view view-name] hostname {address1 [address2 ... address8] | additional address9
[address10 ... addressn]}
7. ip dns primary domain-name soa primary-server-name mailbox-name [refresh-interval
[retry-interval [expire-ttl [minimum-ttl]]]]
8. ip host domain-name ns server-name
DETAILED STEPS
Example:
Device# configure terminal
Example:
Device(config)# ip dns server
Step 6 ip host [vrf vrf-name] [view view-name] hostname (Optional) Configures local hosts.
{address1 [address2 ... address8] | additional address9
[address10 ... addressn]}
Example:
Device(config)# ip host user1.example.com
192.168.201.5 192.168.201.6
Step 7 ip dns primary domain-name soa Configures the device as the primary DNS name server for a
primary-server-name mailbox-name domain (zone) and as the start of authority (SOA) record source
[refresh-interval [retry-interval [expire-ttl (which designates the start of a zone).
[minimum-ttl]]]] Note Unless Distributed Director is enabled, the TTL on
locally defined resource records will always be ten
Example: seconds.
Device(config)# ip dns primary example.com soa
ns1.example.com mb1.example.com
Step 8 ip host domain-name ns server-name (Optional) Configures the device to create an name server (NS)
resource record to be returned when the DNS server is queried
Example: for the associated domain.
Device(config)# ip host example.com ns • This configuration is needed only if the zone for which
ns1.example.com the system is authoritative will also be served by other
name servers.
Examples
This section provides examples of debugging output that is logged when a device is configured as an
authoritative name server for its own local host table and the debug domain command is in effect:
Note For DNS-based X.25 routing, the debug x25 events command supports functionality to describe the events
that occur while the X.25 address is being resolved to an IP address using a DNS server. The debug
domain command can be used along with debug x25 events to observe the whole DNS-based X.25 routing
data flow.
Debugging Output for Relaying a DNS Query to Another Name Server Example
The following is sample output from the debug domain command that corresponds to relaying a DNS query
to another name server when the device is configured as an authoritative name server for its own local host
table:
Debugging Output for Servicing a DNS Query from the Local Host Table Example
The following is sample output from the debug domain command that corresponds to servicing a DNS query
from the local host table when the device is configured as an authoritative name server for its own local host
table:
SUMMARY STEPS
1. enable
2. configure terminal
3. no ip domain lookup nsap
DETAILED STEPS
Example:
Device# configure terminal
Step 3 no ip domain lookup nsap Disables DNS queries for ISO CLNS addresses.
Example:
Device(config)# no ip domain lookup nsap
Verifying DNS
Perform this task to verify your DNS configuration.
1 enable
2 ping hosts
3 show hosts
SUMMARY STEPS
1. enable
2. ping hosts
3. show hosts
DETAILED STEPS
Step 3 show hosts Displays the default domain name, the style of name lookup service, a list of
name server hosts, and the cached list of hostnames and addresses.
Example: • After a name is resolved using DNS, use the show hosts command to
Device# show hosts view the cached hostnames and the DNS configuration.
Example: IP Addresses
The following example establishes a domain list with several alternate domain names:
ip dns server
ip dns spoofing
no ip domain lookup
interface e3/1
ip address 10.1.1.1 255.255.255.0
Additional References
Related Documents
Standards
Standards Title
No new or modified standards are supported by this --
functionality.
MIBs
RFCs
RFCs Title
RFC 1348 DNS NSAP RRs
Technical Assistance
Description Link
The Cisco Support website provides extensive online http://www.cisco.com/techsupport
resources, including documentation and tools for
troubleshooting and resolving technical issues with
Cisco products and technologies.
To receive security and technical information about
your products, you can subscribe to various services,
such as the Product Alert Tool (accessed from Field
Notices), the Cisco Technical Services Newsletter,
and Really Simple Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website
requires a Cisco.com user ID and password.
sending the ACK to the client REQUEST) and the client (immediately after receiving the ACK and assigning
the address to the interface). The default for the client is two attempts with a 5-second wait time between
attempts.
The DHCP server continues to process DHCP client DISCOVER and REQUEST packets while waiting for
the DDNS updates to complete. Even if the update is done before sending the ACK to the client, it does not
delay processing of other DHCP requests. The DHCP server could be impacted minimally because of the
time and memory needed in order to set up the DDNS update and get things started.
Reloading the system may take a little longer in some cases, such as, if there are outstanding DDNS updates
that need to complete.
Associated with each update method is a value specifying the maximum number of seconds between updates.
If left unspecified, then the update is performed only when the address is changed. If specified, the update is
performed automatically if the specified number of seconds have passed since the last update.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip host-list host-list-name
4. host [vrf vrf-name] {host-ip-address | hostname}
5. exit
DETAILED STEPS
Example:
Router# configure terminal
Step 3 ip host-list host-list-name Specifies a list of hosts and enters host-list configuration mode. The
host-list-name argumentassigns a name to the list of hosts.
Example:
Router(config)# ip host-list abc
Step 4 host [vrf vrf-name] {host-ip-address | Configures one or more hosts. The arguments and keyword are as
hostname} follows:
• vrf vrf-name --Associates a hostname with a virtual private
Example: network (VPN) routing and forwarding instance (VRF) name.
Router(host-list)# host 10.1.1.1 10.2.2.2
10.3.3.3 a.com b.com 10.4.4.4 10.5.5.5 Note All hostnames or IP addresses specified after the vrf
d.com host 10.6.6.6 f.com host vrf abc
a.com b.com c.com host vrf def 10.1.1.1 keyword are associated with that VRF.
10.2.2.2 10.3.3.3
• host-ip-address --Specifies an IP address for a host in the host
list. You can specify more than one host using this argument
by listing the hostname and IP addresses on the same line.
• hostname --Specifies a hostname.
Example:
Router(host-list)# exit
Examples
The following example shows how to configure several hosts with VRF:
ip host-list abc
host 10.1.1.1 10.2.2.2 10.3.3.3 a.com b.com 10.4.4.4 10.5.5.5 d.com
host 10.6.6.6 f.com
host vrf abc a.com b.com c.com
host vrf def 10.1.1.1 10.2.2.2 10.3.3.3
SUMMARY STEPS
1. show ip host-list
2. show running-config | inc host-list
3. show running-config | inc host
4. debug ip ddns update
DETAILED STEPS
Example:
Router# show ip host-list abc
Host list: abc
ddns.abc
10.2.3.4
ddns2.abc
10.3.4.5
ddns3.com
10.3.3.3
d.org
e.org
1.org.2.org
3.com
10.2.2.2 (VRF: test)
10.5.5.5 (VRF: test)
a.net (VRF: test)
b.net (VRF: test)
Example:
Router# show running-config | inc host-list
ip host-list a
ip host-list b
ip host-list c
ip host-list abc
Example:
Router# show running-config | inc host
hostname who
ip host who 10.0.0.2
ip host-list a
host 10.1.1.1 a.com b.com 10.2.2.3 10.2.2.2 c.com. 10.3.3.3 10.4.4.4
host d.com
host vrf abc 10.10.10.4 10.10.10.8
host vrf def 10.2.3.4 10.6.7.8
ip host-list b
host a.com b.com c.com 10.1.1.1 10.2.2.2 10.3.3.3
host vrf ppp 10.2.1.0
ip host-list c
host 10.1.1.1 10.2.2.2 10.3.3.3 a.com b.com 10.4.4.4 10.5.5.5 d.com
host 10.6.6.6 f.com
host vrf zero a.com b.com c.om
host vrf one 10.1.1.1 10.2.2.2 10.3.3.3
ip host-list unit-test
host ddns.unit.test 10.2.3.4 ddns2.unit.test 10.3.4.5 ddns3.com 10.3.3.3 d.org e.org
host 1.org.2.org 3.com
host vrf ZERO 10.2.2.2 10.5.5.5 a.net b.net
ip ddns update hostname use-this.host.name
ip ddns update this-method host 10.2.3.4
ip ddns update this-method host this-host
ip ddns update this-method host-group this-list
ip ddns update this-method host 10.3.4.5
ip ddns update test host 10.19.192.32
ip ddns update test host 10.19.192.32
ip ddns update a host-group a
ip ddns update a host-group ab
ip ddns update aa host-group ab
ip ddns update method host 10.33.44.55
Example:
!Configure the DHCP Client
ip host-list servers
host 10.19.192.32 10.0.0.1
ip ddns update method testing
ddns
interface Ethernet1
ip dhcp client update dns server none
ip ddns update testing host-group servers
ip address dhcp
end
!Configure the DHCP Server
ip dhcp pool test
network 10.0.0.0 255.0.0.0
update dns
!Enable Debugging
debug ip ddns update
!The update to the server 10.0.0.1 fails in this example
00:18:58:%DHCP-6-ADDRESS_ASSIGN: Interface Ethernet1 assigned DHCP address 10.0.0.8, mask 255.0.0.0,
hostname canada_reserved
00:18:58: DYNDNSUPD: Adding DNS mapping for canada_reserved.hacks <=> 10.0.0.8 server 10.19.192.32
00:18:58: DYNDNSUPD: Sleeping for 3 seconds waiting for interface Ethernet1 configuration to settle
00:19:01: DDNS: Enqueuing new DDNS update 'canada_reserved.hacks' <=> 10.0.0.8 server 10.19.192.32
00:19:01: DYNDNSUPD: Adding DNS mapping for canada_reserved.hacks <=> 10.0.0.8 server 10.0.0.1
00:19:01: DDNS: Enqueuing new DDNS update 'canada_reserved.hacks' <=> 10.0.0.8 server 10.0.0.1
00:19:01: DYNDNSUPD: Adding DNS mapping for canada_reserved.hacks <=> 10.0.0.8 server 10.0.0.1
00:19:01: DDNS: Enqueuing new DDNS update 'canada_reserved.hacks' <=> 10.0.0.8 server 10.0.0.1
00:19:01: DDNS: Zone name for '10.0.0.11.in-addr.arpa.' is '10.in-addr.arpa'
00:19:01: DDNS: Using server 10.19.192.32
00:19:01: DDNS: Dynamic Update 1: (sending to server 10.19.192.32)
00:19:01: DDNS: Zone = 10.in-addr.arpa
00:19:01: DDNS: Prerequisite: 10.0.0.11.in-addr.arpa. not in use
00:19:01: DDNS: Update: add 10.0.0.11.in-addr.arpa. IN PTR canada_reserved.hacks
00:19:01: DDNS: Zone name for '10.0.0.11.in-addr.arpa.' is '10.in-addr.arpa'
00:19:01: DDNS: Using server 10.0.0.1
00:19:01: DDNS: Dynamic Update 1: (sending to server 10.0.0.1)
00:19:01: DDNS: Zone = 10.in-addr.arpa
00:19:01: DDNS: Prerequisite: 10.0.0.11.in-addr.arpa. not in use
00:19:01: DDNS: Update: add 10.0.0.11.in-addr.arpa. IN PTR canada_reserved.hacks
00:19:01: DDNS: Zone name for '10.0.0.11.in-addr.arpa.' is '10.in-addr.arpa'
00:19:01: DDNS: Using server 10.0.0.1
00:19:01: DDNS: Dynamic Update 1: (sending to server 10.0.0.1)
00:19:01: DDNS: Zone = 10.in-addr.arpa
00:19:01: DDNS: Prerequisite: 10.0.0.11.in-addr.arpa. not in use
00:19:01: DDNS: Update: add 10.0.0.11.in-addr.arpa. IN PTR canada_reserved.hacks
00:19:01: DDNS: Dynamic DNS Update 1 (PTR) for host canada_reserved.hacks returned 6 (YXDOMAIN)
00:19:01: DDNS: Dynamic Update 2: (sending to server 10.19.192.32)
00:19:01: DDNS: Zone = 10.in-addr.arpa
00:19:01: DDNS: Update: delete 10.0.0.11.in-addr.arpa. all PTR RRs
00:19:01: DDNS: Update: add 10.0.0.11.in-addr.arpa. IN PTR canada_reserved.hacks
00:19:01: DDNS: Dynamic DNS Update 2 (PTR) for host canada_reserved.hacks returned 0 (NOERROR)
00:19:01: DDNS: Zone name for 'canada_reserved.hacks' is 'hacks'
00:19:01: DDNS: Using server 10.19.192.32
00:19:01: DDNS: Dynamic Update 1: (sending to server 10.19.192.32)
00:19:01: DDNS: Zone = hacks
00:19:01: DDNS: Prerequisite: canada_reserved.hacks not in use
00:19:01: DDNS: Update: add canada_reserved.hacks IN A 10.0.0.8
00:19:01: DDNS: Dynamic DNS Update 1 (A) for host canada_reserved.hacks returned 0 (NOERROR)
00:19:01: DDNS: Update of 'canada_reserved.hacks' <=> 10.0.0.8 finished
00:19:01: DYNDNSUPD: Another update completed (total outstanding=2)
00:19:11: DDNS: Dynamic DNS Update 1 (PTR) for host canada_reserved.hacks returned 0 (NOERROR)
00:19:11: DDNS: Dynamic DNS Update 1 (PTR) for host canada_reserved.hacks returned 0 (NOERROR)
00:19:11: DDNS: Zone name for 'canada_reserved.hacks' is 'hacks'
00:19:11: DDNS: Using server 10.0.0.1
00:19:11: DDNS: Dynamic Update 1: (sending to server 10.0.0.1)
00:19:11: DDNS: Zone = hacks
00:19:11: DDNS: Prerequisite: canada_reserved.hacks not in use
00:19:11: DDNS: Update: add canada_reserved.hacks IN A 10.0.0.8
00:19:11: DDNS: Zone name for 'canada_reserved.hacks' is 'hacks'
00:19:11: DDNS: Using server 10.0.0.1
00:19:11: DDNS: Dynamic Update 1: (sending to server 10.0.0.1)
00:19:11: DDNS: Zone = hacks
00:19:11: DDNS: Prerequisite: canada_reserved.hacks not in use
00:19:11: DDNS: Update: add canada_reserved.hacks IN A 10.0.0.8
00:19:21: DDNS: Dynamic DNS Update 1 (A) for host canada_reserved.hacks returned 0 (NOERROR)
00:19:21: DDNS: Update of 'canada_reserved.hacks' <=> 10.0.0.8 failed
00:19:21: DYNDNSUPD: Another update completed (total outstanding=1)
00:19:21: DDNS: Dynamic DNS Update 1 (A) for host canada_reserved.hacks returned 0 (NOERROR)
00:19:21: DDNS: Update of 'canada_reserved.hacks' <=> 10.0.0.8 failed
00:19:21: DYNDNSUPD: Another update completed (total outstanding=0)
Note DHCP server-pool configuration commands and interface configurations have precedence over global
configurations.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip dhcp update dns [both] [override] [before]
4. ip dhcp-client update dns [server {both | none}]
5. exit
DETAILED STEPS
Example:
Router# configure terminal
Step 3 ip dhcp update dns [both] Enables DDNS updates of PTR RRs for all address pools except those configured
[override] [before] with the per-pool update dns command, which overrides global configuration. The
keywords are as follows:
Example: • both --(Optional) Enables the DHCP server to perform DDNS updates for A
Router(config)# ip dhcp update and PTR RRs, unless the DHCP client has specified in the FQDN option that
dns both override the server should not perform the updates.
• override --(Optional) Enables the DHCP server to perform DDNS updates for
PTR RRs even if the DHCP client has specified in the FQDN option that the
server should not perform the updates.
Note If you specify the both and override keywords together, this enables the
DHCP server to perform DDNS updates for A and PTR RRs overriding
anything the DHCP client specified in the FQDN option to the contrary.
• before --(Optional) Enables the DHCP server to perform DDNS updates before
sending the DHCP ACK back to the client. The default is to perform updates
after sending the DHCP ACK.
Step 4 ip dhcp-client update dns [server Enables DDNS updates of PTR RRs. The optional server keyword enables the server
{both | none}] to perform DDNS updates for A and PTR RRs. The keywords are as follows:
• both --Enables the DHCP server to perform DDNS updates for A and PTR
Example: RRs, unless the DHCP client specifies in the FQDN option that the server should
Router(config)# ip dhcp-client not perform the updates.
update dns server both
• none --Enables the DHCP client to perform DDNS updates and the server will
not perform any updates. The server can override this action.
Note The ip dhcp-client update dns server none command instructs the server
not to perform any updates. If configured to do so, the server can override
the client.
Note The ip dhcp-client update dns server both command instructs the server
to update both the A and PTR RRs.
Example:
Router(config)# exit
Examples
The following example shows how to configure A and PTR RR updates that are performed by the server only:
Note The changes will not take effect until any current lease on the interface is released and a new lease is
requested that uses a new DHCP DISCOVER packet. This means configuring the ip address dhcp
command or using the release dhcp EXEC command followed by the renew dhcp EXEC command.
>
SUMMARY STEPS
1. enable
2. configure terminal
3. interface interface-type number
4. ip dhcp client update dns [server {both | none}]
5. ip address dhcp
6. exit
DETAILED STEPS
Example:
Router# configure terminal
Step 3 interface interface-type number Specifies an interface type and number and enters interface configuration
mode.
Example:
Router(config)# interface ethernet1
Step 4 ip dhcp client update dns [server {both Configures the DHCP client to include an FQDN option when sending
| none}] packets to the DHCP server. The keywords are as follows:
• both --(Optional) Enables the DHCP server to perform DDNS updates
Example: for A and PTR RRs, unless the DHCP client specifies in the FQDN
Router(config-if)# ip dhcp client option that the server should not perform the updates.
update dns server both
• none --(Optional) Enables the DHCP client to perform DDNS updates
and the server will not perform any updates. The server can override
this action.
Note The ip dhcp client update dns server none command instructs
the server not to perform any updates. If configured to do so, the
server can override the client.
Note The ip dhcp client update dns server both command instructs
the server to update both the A and PTR RRs.
Step 5 ip address dhcp Releases any current lease on the interface and enables the configuration.
Note You can also release any lease by using the release dhcp EXEC
Example: command followed by the renew dhcp EXEC command.
Router(config-if)# ip address dhcp
Example:
Router(config-if)# exit
SUMMARY STEPS
1. enable
2. configure terminal
3. ip dhcp pool pool-name
4. update dns [both | never] [override] [before]
5. exit
DETAILED STEPS
Example:
Router# configure terminal
Step 3 ip dhcp pool pool-name Assigns a name to a DHCP pool and enters DHCP configuration mode.
Example:
Router(config)# ip dhcp pool
test
Step 4 update dns [both | never] Enables DDNS update capability for a pool of DHCP servers for any addresses
[override] [before] assigned from this address pool.
If the server is configured using this command with or without any of the other
Example: keywords, and if the server does not see an FQDN option in the DHCP interaction,
Router(dhcp-config)# update dns then it will assume that the client does not understand DDNS and act as though it
never were configured to update both A and PTR records on behalf of the client.
The keywords are as follows:
• both --(Optional) Perform forward and reverse updates. If the before optional
keyword is specified along with the both keyword, the server can perform
DDNS updates before sending the ACK back to the client.
If the override optional keyword is specified with the both keyword, the server
can override the client and update forward and reverse RRs.
If the override and before optional keywords are specified with the both keyword,
the server can override the client (forward and reverse updates) and perform the
updates before sending the ACK.
• never --(Optional) Never perform updates for this pool.
• override --(Optional) Override the client FQDN flags. If the before optional
keyword is specified, the updates will be performed before sending the ACK.
• before --(Optional) Perform updates before sending the ACK.
Example:
Router(dhcp-config)# exit
Examples
The following example shows how to configure a pool of DHCP servers to perform updates for A and PTR
RRs before the ACK is sent:
SUMMARY STEPS
1. enable
2. configure terminal
3. ip ddns update method method-name
4. interval minimum days hours minutes seconds
5. interval maximum days hours minutes seconds
6. ddns [both]
7. http
8. add url
9. remove url
10. exit
11. exit
12. interface interface-type number
13. ip ddns update hosthame hostname
14. ip ddns update name
15. exit
DETAILED STEPS
Example:
Router# configure terminal
Step 3 ip ddns update method method-name Specifies the update method name
Example:
Router(config)# ip ddns update method myupdate
Step 4 interval minimum days hours minutes seconds Configures a minimum update int
• days --Range is from 0 to 36
Example:
• hours --Range is from 0 to 2
Router(DDNS-update-method)# interval minimum 1 0 0 0
• minutes --Range is from 0 to
• seconds --Range is from 0 to
Step 5 interval maximum days hours minutes seconds Configures a maximum update in
• days --Range is from 0 to 36
Example:
• hours --Range is from 0 to 2
Router(DDNS-update-method)# interval maximum 1 0 0 0
• minutes --Range is from 0 to
• seconds --Range is from 0 to
Example:
Router(DDNS-update-method)# http
Example:
Router(DDNS-HTTP)# exit
Example:
Router(DDNS-update-method)# exit
Example:
Router(config)# interface ether1
Step 13 ip ddns update hosthame hostname Specifies a host to be used for the upd
IP address of the interface. The hostn
Example: (for example, DynDNS.org).
Step 14 ip ddns update name Specifies the name of the update meth
address changes on this interface.
Example:
Router(config-if) ip ddns update myupdate
Example:
Router(config)# exit
Examples
The following example shows how to configure the update method, the maximum interval of the updates
(globally), and configure the hostname on the interface:
add http://test:test@members.dyndns.org/nic/update?system=dyndns&hostname=<h>&myip=<a>
interval maximum 1 0 0 0
exit
interface ether1
Sample Configuration #1
The following scenario has a client configured for IETF DDNS updating of A DNS RRs during which a DHCP
server is expected to update the PTR DNS RR. The DHCP client discovers the DNS server to update using
an SOA RR lookup since the IP address to the server to update is not specified. The DHCP client is configured
to include an FQDN DHCP option and notifies the DHCP server that it will be updating the A RRs.
Sample Configuration #2
The following scenario has the client configured for IETF DDNS updating of both A and DNS RRs and
requesting that the DHCP server update neither. The DHCP client discovers the DNS server to update using
an SOA RR lookup since the IP address to the server to update is not specified. The DHCP client is configured
to include an FQDN DHCP option that instructs the DHCP server not to update either A or PTR RRs. This
is configured using the global version of the command.
Sample Configuration #3
The following scenario the client is configured for IETF DDNS updating of both A and DNS RRs and
requesting that the DHCP server update neither. The DHCP client explicitly specifies the server to update.
The DHCP client is configured to include an FQDN DHCP option which instructs the DHCP server not to
update either A or PTR RRs. This is configured using the global version of the command. The DHCP server
is configured to override the client request and update both A and PTR RR anyway.
Sample Configuration #4
In the following scenario the client is configured for IETF DDNS updating of both A and DNS RRs and
requesting the DHCP server to update neither. The DHCP client explicitly specifies the server to update. The
DHCP client is configured to include an FQDN DHCP option which instructs the DHCP server not to update
either A or PTR RRs. This is configured using the global version of the command. The DHCP server is
configured to allow the client to update whatever RR it chooses.
Sample Configuration #5
In the following scenario, the debug output shows the HTTP-style DDNS updates. The sample configuration
defines a new IP DDNS update method named dyndns that configures a URL to use when adding or changing
an address. No URL has been defined for use when removing an address since DynDNS.org does not use
such a URL for free accounts. A maximum update interval of 28 days has been configured, so specifying that
updates should be sent at least every 28 days. Configuring the new dyndns update method should be used for
Ethernet interface .
Note Before entering the question mark (?) character in the “add http” configuration after the update keyword,
press the control (Ctrl) key and the “v” key together on your keyboard. This will allow you to enter the ?
without the software interpreting it as a help query.
Note Before entering the question mark (?) character in the “add http” configuration after the update keyword,
press the control (Ctrl) key and the “v” key together on your keyboard. This will allow you to enter the ?
without the software interpreting it as a help query.
ddns
http
add http://test:test@members.dyndns.org/nic/update?system=dyndns&hostname=<h>&myip=<a>
interval maximum 1 0 0 0
exit
interface ether1
Note Before entering the question mark (?) character in the “add http” configuration after the update keyword,
press the control (Ctrl) key and the “v” key together on your keyboard. This will allow you to enter the ?
without the software interpreting it as a help query.
DDNS
http://USERNAME:PASSWORD@members.dyndns.org/nic/update?system=dyndns&hostname=<h>&myip=<a>
!Requires “interval max 28 0 0 0" in the update method definition.
TZO
http://cgi.tzo.com/webclient/signedon.html?TZOName=<h>&Email=USERNAME&TZOKey=PASSWORD&IPAddress=<a>
EASYDNS
http://USERNAME:PASSWORD@members.easydns.com/dyn/ez-ipupdate.php?action=edit&myip=<a>&host_id=<h>
JUSTLINUX
http://USERNAME:PASSWORD@www.justlinux.com/bin/controlpanel/dyndns/jlc.pl?direst=1&username=USERNAME&password=PASSWORD&host=<h>&ip=<a>
DYNS
http://USERNAME:PASSWORD@www.dyns.cx/postscript.php?username=USERNAME&password=PASSWORD&host=<h>&ip=<a>
HN
http://USERNAME:PASSWORD@dup.hn.org/vanity/update?ver=1&IP=<a>
ZONEEDIT
http://USERNAME:PASSWORD@www.zoneedit.com/auth/dynamic.html?host=<h>&dnsto=<a>
Note Because these services are provided by the respective companies, the URLs may be subject to change or
the service could be discontinued at any time. Cisco takes no responsibility for the accuracy or use of any
of this information. The URLs were obtained using an application called “ez-ipupdate,” which is available
for free on the Internet.
Additional References
The following sections provide references related to the Dynamic DNS Support for Cisco IOS Software
feature.
Related Documents
DNS commands: complete command syntax, Cisco IOS IP Addressing Services Command
command mode, command history, defaults, usage Reference
guidelines, and examples
Standards
Standards Title
No new or modified standards are supported by this --
feature, and support for existing standards has not
been modified by this feature.
MIBs
RFCs
RFCs Title
RFC 2136 Dynamic Updates in the Domain Name System (DNS
Update)
Technical Assistance
Description Link
The Cisco Support and Documentation website http://www.cisco.com/cisco/web/support/index.html
provides online resources to download documentation,
software, and tools. Use these resources to install and
configure the software and to troubleshoot and resolve
technical issues with Cisco products and technologies.
Access to most tools on the Cisco Support and
Documentation website requires a Cisco.com user ID
and password.
Table 2: Feature Information for Dynamic DNS Support for Cisco IOS Software
Note You can specify IPv4 and IPv6 addresses while performing various tasks in this feature. The resource
record type AAAA is used to map a domain name to an IPv6 address. The IP6.ARPA domain is defined
to look up a record given an IPv6 address.
A DNS server can be a dedicated device or a software process running on a device. The server stores and
manages data about domains and responds to requests for name conflict resolutions. In a large DNS
implementation, there can be a distributed database over many devices. A server can be a dedicated cache.
Defining a VRF Table and Assigning a Name Server to Enable VRF-Aware DNS
Perform this task to define a VRF table and assign a name server.
A VRF-specific name cache is dynamically created if one does not exist whenever a VRF-specific name server
is configured by using the ip name-server vrfcommand option or a permanent name entry is configured by
using the ip host vrfcommand option. The VRF name cache is removed whenever all name server and
permanent entries in the VRF are disabled.
It is possible that multiple name servers are configured with the same VRF name. The system will send queries
to those servers in turn until any of them responds, starting with the server that sent a response the last time.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip vrf vrf-name
4. rd route-distinguisher
5. exit
6. ip name-server [vrf vrf-name] server-address1 [server-address2...server-address6]
7. ip domain lookup [source-interface interface-type interface-number]
DETAILED STEPS
Example:
Device# configure terminal
Step 3 ip vrf vrf-name Defines a VRF table and enters VRF configuration mode.
• The vrf-name argument can be up to 32 characters.
Example:
Device(config)# ip vrf vpn1
Example:
Device(config)# rd 100:21
Example:
Device(config-vrf)# exit
Step 6 ip name-server [vrf vrf-name] server-address1 Assigns the address of one or more name servers to a VRF table
[server-address2...server-address6] to use for name and address resolution.
• The name server IP address can be an IPv4 or IPv6 address.
Example:
• The vrf keyword is optional but must be specified if the
Device(config)# ip name-server vrf vpn1
172.16.1.111 2001:DB8:1::1 name server is used with VRF. The vrf-name argument
assigns a name to the VRF.
Step 7 ip domain lookup [source-interface interface-type (Optional) Enables DNS-based address translation.
interface-number]
• DNS is enabled by default. You only need to use this
command if DNS has been disabled.
Example:
Device(config)# ip domain lookup
SUMMARY STEPS
1. enable
2. configure terminal
3. Do one of the following:
• ip domain name [vrf vrf-name] name
• ip domain list [vrf vrf-name] name
DETAILED STEPS
Example:
Device# configure terminal
Step 3 Do one of the following: Defines a default domain name that the software will use to complete
unqualified hostnames.
• ip domain name [vrf vrf-name] name
or
• ip domain list [vrf vrf-name] name
Defines a list of default domain names to complete unqualified hostnames.
• You can specify a default domain name that the software will use to
Example: complete domain name requests. You can specify either a single domain
name or a list of domain names. Any hostname that does not contain
Device(config)# ip domain name vrf
vpn1 cisco.com a complete domain name will have the default domain name you
specify appended to it before the name is looked up.
Example: • The vrf keyword and vrf-name argument specify a default VRF domain
name.
Device(config)# ip domain list vrf
vpn1 cisco.com • The ip domain list command can be entered multiple times to specify
more than one domain name to append when doing a DNS query. The
system will append each in turn until it finds a match.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip host vrf [vrf-name] name[tcp-port] address1[address2 ... address8] [mx ns srv]
DETAILED STEPS
Example:
Device# configure terminal
Step 3 ip host vrf [vrf-name] name[tcp-port] Defines a static hostname-to-address mapping in the host cache.
address1[address2 ... address8] [mx ns srv]
• The IP address of the host can be an IPv4 or IPv6 address, and
the IP address can be associated with a Virtual Private Network
Example: (VPN) routing and forwarding (VRF) instance.
Device(config)# ip host vrf vpn3
company1.com 172.16.2.1 • If the vrf keyword and vrf-name arguments are specified, then a
Device(config)# ip host test mx 1 permanent entry is created only in the VRF-specific name cache.
mx_record
Device(config)# ip host test ns ns_record • Mail exchanger (mx) identifies the mail server that is responsible
Device(config)# ip host test srv 0 0 0
srv_record for handling e-mails for a given domain name.
• Name server (ns) state the authoritative name servers for the given
domain.
• Service (srv) records specifies the location of a service.
SUMMARY STEPS
1. enable
2. show hosts [vrf vrf-name] {all| hostname} [summary]
3. clear host [vrf vrf-name] {all| hostname}
DETAILED STEPS
Step 2 show hosts [vrf vrf-name] {all| hostname} • Displays the default domain name, the style of name lookup service,
[summary] a list of name server hosts, the cached list of hostnames and addresses,
and the cached list of hostnames and addresses specific to a particular
Example: Virtual Private Network (VPN).
Device# show hosts vrf vpn2 • The vrf keyword and vrf-name argument only display the entries if a
VRF name has been configured.
• If you enter the show hosts command without specifying any VRF,
only the entries in the global name cache will display.
Step 3 clear host [vrf vrf-name] {all| hostname} (Optional) Deletes entries from the hostname-to-address global address
cache or VRF name cache.
Example:
Device# clear host vrf vpn2
Additional References
Related Documents
IP addressing services commands: complete command Cisco IOS IP Addressing Services Command
syntax, command mode, command history, defaults, Reference
usage guidelines, and examples
Standards
Standards Title
No new or modified standards are supported by this --
feature, and support for existing standards has not
been modified by this feature.
MIBs
RFCs
RFCs Title
No new or modified RFCs are supported by this --
feature, and support for existing RFCs has not been
modified by this feature.
Technical Assistance
Description Link
The Cisco Support and Documentation website http://www.cisco.com/cisco/web/support/index.html
provides online resources to download documentation,
software, and tools. Use these resources to install and
configure the software and to troubleshoot and resolve
technical issues with Cisco products and technologies.
Access to most tools on the Cisco Support and
Documentation website requires a Cisco.com user ID
and password.
Note You can specify IPv4 and IPv6 addresses while performing various tasks in this feature. The resource
record type AAAA is used to map a domain name to an IPv6 address. The IP6.ARPA domain is defined
to look up a record given an IPv6 address.
• Query source interface Virtual Private Network (VPN) routing and forwarding (VRF) instance
• Query source authentication
• Query source IP address
• Query hostname
When the device must respond to a query, the Cisco IOS software selects a DNS name server by comparing
the characteristics of the query to a list of name servers and their configured restrictions. After the appropriate
name server is selected, the device addresses the query using the associated host table cache or forwarding
parameters that are defined for that virtual name server.
Note Split tunneling requires additional security and firewall configuration to ensure the security of the remote
site.
The following sections summarize the network activities in a basic Split DNS environment:
The clients access the corporate network through a VPN tunnel that originates at the corporate VPN gateway
and terminates in the CPE device.
Note The advantage of establishing the VPN tunnel from the corporate access system to the CPE device (rather
than the endpoint client system) is that every other computer on the home LAN can also use the same
tunnel, making it unnecessary to establish multiple tunnels (one for each system). In addition, the client
system end user can use the tunnel when accessing corporate systems, without having to explicitly bring
the tunnel up and down each time.
• Similarly, an Internet access request from the PC of the family member of the home teleworker also
would be forwarded to the ISP DNS name server.
• A DNS request for access to the corporate site from a worker, though, would be forwarded to the
corporate DNS name server.
4 If no domain name servers are configured for the virtual DNS name server, the device forwards the query
to the limited broadcast address (255.255.255.255) so that the query is received by all hosts on the local
network segment but not forwarded by devices.
DNS Views
A DNS view is a set of parameters that specify how to handle a DNS query. A DNS view defines the following
information:
• Association with a VRF
• Option to write to system message logging (syslog) output each time the view is used
• Parameters for resolving internally generated DNS queries
• Parameters for forwarding incoming DNS queries
• Internal host table for answering queries or caching DNS responses
Note The maximum number of DNS views and view lists depends on the memory of Cisco device. Configuring
a large number of DNS views and view lists uses more device memory, and configuring a large number
of views in the view lists uses more device processor time. For optimum performance, configure views
and view list members that are required to support your Split DNS query forwarding or query resolution
needs.
Note Additional restrictions (described in DNS Views) can be placed on a view after it has been defined. Also,
a single view can be referenced multiple times, with different restrictions added in each case. However,
because the association of a DNS view with a VRF is specified in the DNS view definition, the VRF-specific
view-use limitation is a characteristic of the DNS view definition itself and cannot be separated from the
view.
Sometimes, when a source interface is configured on a device with the split DNS feature to forward DNS
queries, the device does not forward the DNS queries through the configured interface. Hence, consider the
following points while forwarding the DNS queries using the source interface:
• DNS queries are forwarded to a broadcast address when a forwarding source interface is configured and
the DNS forwarder is not configured.
• The source IP address of the forwarded query should be set to the primary IP address of the interface
configured, using the dns forwarding source-interface interface command. If no such configuration
exists, then the source IP address of the forwarded DNS query will be the primary IP address of the
outgoing interface. DNS forwarding should be done only when the source interface configured for the
DNS forwarding is active.
• The source IP address of the DNS query for the DNS resolver functionality is set using the domain
resolver source-interface interface-type number command. If there is no DNS address configured, then
queries will be broadcasted to the defined source interface. DNS resolving should be done only when
the source interface configured for the DNS resolving is active. See "Specifying a Source Interface to
Forward DNS Queries" for the configuration steps.
Note The maximum number of DNS views and view lists supported is not specifically limited but is dependent
on the amount of memory on the Cisco device. Configuring a larger number of DNS views and view lists
uses more device memory, and configuring a larger number of views in the view lists uses more device
processor time. For optimum performance, configure no more views and view list members than needed
to support your Split DNS query forwarding or query resolution needs.
Note Multiple DNS view lists can be defined so that, for example, a given DNS view can be associated with
different restrictions in each list. Also, different DNS view lists can include different DNS views.
If the device is responding to an internally generated query, no DNS view list is used to select a view; the
global DNS view is used to handle the query.
The assignment of a DNS view list as the default or to an interface is described in "DNS View Groups".
If the query list does not specify additional restrictions on the view, the view will be used to address the query,
so the view-selection process is finished.
If the view list does specify additional restrictions on the view, the query is compared to those restrictions:
• If the query characteristics fail any view-use restriction, the view cannot be used to address the query,
so the view-selection process moves on to the next member of the view list.
• If the query characteristics pass all the view-use restrictions, the view will be used to address the query.
The view-selection process is finished.
• If the view-selection process reaches the end of the selected DNS view list without finding a view list
member that can handle the query, the device discards the query.
The first DNS view list member that is found to have restrictions that match the query characteristics is used
to handle the query.
Note In this context, the term “group” is used to refer to the specification of a DNS name list or a standard IP
ACL as a usage restriction on a view list member.
Note In this context, the term “group” refers to the specification of a DNS view list as an interface-specific DNS
view list or the default view list for the device.
See "Specifying a DNS View List for a Device Interface" to specify a DNS view list for a particular device
interface.
The following sections provide detailed descriptions of how the device responds to DNS queries in a Split
DNS environment.
Response to Incoming DNS Queries per the Forwarding Parameters of the Selected DNS View
Given an incoming DNS query, the Cisco IOS software uses the DNS view list configured for that interface
to select the DNS view list to use to handle the query. If no view list is configured for the interface, the default
DNS view list is used instead.
Using the configured or default view list, the device software selects the first view list member that is associated
with the same VRF as the query and whose usage restrictions match the query characteristics. After the DNS
view is selected, the device handles the query according to the parameters configured in the selected view.
1 The device uses the DNS view list that is specified for the interface on which the DNS query arrives:
1 If a DNS view list is attached to the interface, the device uses the specified DNS view list.
2 If no DNS view list is attached to the interface, the device uses the default DNS view list.
2 The device uses the DNS view list to select a DNS view to use to address the query. Each view list member
is checked, in the order defined by the view list, as follows:
1 If the view list member is associated with a different VRF from that of the incoming interface for the
DNS query that needs to be resolved, the view-selection process moves on to the next member of the
view list.
2 If all the usage restrictions on the view list member match the other characteristics of the DNS query
to be resolved, the view is selected to handle the query.
Otherwise, the view-selection process moves on to the next member of the view list.
If no member of the default DNS view list is qualified to address the query, the device does nothing further
with the query.
1 The device attempts to respond to the query using the parameters specified by the selected DNS view:
1 The Cisco IOS software looks in the hostname cache associated with the view. If the query can be
answered from that information, the device responds to the query.
2 If the query cannot be answered using the hostname cache, the Cisco IOS software checks whether
the DNS forwarding of queries is enabled for the view. If DNS forwarding is enabled, the device sends
the query to each of the configured DNS forwarders.
3 If no DNS forwarders are configured for the view, the device forwards the query using the configured
domain name servers.
4 If no domain name servers are configured for the view, the device forwards incoming DNS queries to
the limited broadcast address (255.255.255.255) so that the queries are received by all hosts on the
local network segment but not forwarded by devices.
Response to Internally Generated DNS Queries per the Resolving Parameters of the Default
Global DNS View
Given an internally generated DNS query to resolve, the Cisco IOS software uses the default DNS view to
handle the query:
• When a hostname must be resolved for a query that does not specify a VRF, the device uses the unnamed
DNS view associated with the global VRF (the default VRF that contains routing information for the
global IP address space of the provider network).
• When a hostname must be resolved for a Cisco IOS command that specifies a VRF to use, the device
uses the unnamed DNS view associated with that VRF.
The device attempts to respond to the query using the DNS resolving parameters specified by that view:
1 If the query specifies an unqualified hostname, the Cisco IOS software completes the hostname using the
domain name list or the default domain specified by the view.
2 The Cisco IOS software looks in the hostname cache associated with the view. If the query can be answered
from that information, the device responds to the query.
3 Otherwise, because the query cannot be answered using the hostname cache, the Cisco IOS software
checks whether the DNS forwarding of queries is enabled for the view. If so, the device sends the query
to each of the configured name servers, using the timeout period and number of retries specified for the
view.
4 Otherwise, the device does not respond to the query.
Note By default, the network server sends the output from the debug commands to the console. Sending output
to a terminal (virtual console) produces less overhead than sending it to the console. Use the terminal
monitor privileged EXEC command to send output to a terminal. For more information about redirecting
debug command output, see the “Using Debug Commands” chapter of the Cisco IOS Debug Command
Reference .
• The enabling or disabling of logging of a syslog message each time a DNS view is used.
Perform this optional task if you want to enable the writing of an event message to syslog output for DNS
name list events, view events, or view list events:
SUMMARY STEPS
1. enable
2. debug ip dns name-list
3. debug ip dns view
4. debug ip dns view-list
5. show debugging
DETAILED STEPS
Step 2 debug ip dns name-list (Optional) Enables the writing of DNS name list event messages.
• Debugging output for DNS name lists is disabled by default.
Example:
• To disable debugging output for DNS name list events, use the no
Device# debug ip dns name-list
form of this command.
Step 3 debug ip dns view (Optional) Enables the writing of DNS view event messages.
• Debugging output for DNS views is disabled by default.
Example:
• To disable debugging output for DNS view events, use the no form
Device# debug ip dns view
of this command.
Step 4 debug ip dns view-list (Optional) Enables the writing of DNS view list event messages.
• Debugging output for DNS view lists is disabled by default.
Example:
• To disable debugging output for DNS view list events, use the no
Device# debug ip dns view-list
form of this command.
Example:
Device# show debugging
SUMMARY STEPS
1. enable
2. configure terminal
3. no ip dns name-list name-list-number [{deny | permit} pattern]
4. ip dns name-list name-list-number {deny | permit} pattern
5. exit
6. show ip dns name-list [name-list-number]
DETAILED STEPS
Example:
Device# configure terminal
Step 3 no ip dns name-list name-list-number (Optional) Clears any previously defined DNS name list.
[{deny | permit} pattern]
• To clear only an entry in the list, specify the deny or permit clause.
Example: • To clear the entire list, omit any clauses.
Device(config)# no ip dns name-list
500
Example:
Device(config)# exit
Step 6 show ip dns name-list [name-list-number] Displays a particular DNS name list or all configured name lists.
Example:
Device# show ip dns name-list
SUMMARY STEPS
1. enable
2. configure terminal
3. ip dns view [vrf vrf-name] {default | view-name}
4. [no] dns trust name
5. [no] logging
6. [no] domain lookup
7. Do one of the following:
• domain name domain-name
• domain list domain-name
DETAILED STEPS
Example:
Device# configure terminal
Step 3 ip dns view [vrf vrf-name] {default | Defines a DNS view and enters DNS view configuration mode.
view-name}
Example:
Device(config)# ip dns view vrf vpn101
user3
Step 4 [no] dns trust name (Optional) Enables or disables storage of trusted keys in a view and enters
DNS view configuration mode. The dns trust key enables the DNS security
Example: feature.
Device(cfg-dns-view)# dns trust name
Step 5 [no] logging (Optional) Enables or disables logging of a syslog message each time the
DNS view is used.
Example: Note View-specific event logging is disabled by
Device(cfg-dns-view)# logging default.
Step 6 [no] domain lookup (Optional) Enables or disables DNS-based hostname-to-address translation
for internally generated DNS queries handled using the DNS view.
Example: Note The domain lookup capability is enabled by
Device(cfg-dns-view)# domain lookup default.
Step 7 Do one of the following: (Optional) Defines a default domain name to be used by this DNS view to
complete unqualified hostnames when addressing DNS queries.
• domain name domain-name
or
• domain list domain-name
(Optional) Defines a list of domain names to be used by this DNS view to
complete unqualified hostnames when addressing DNS queries.
Example: • The device attempts to respond to the query using the parameters
specified by the selected DNS view. First, the Cisco IOS software
Device(cfg-dns-view)# domain name
example.com looks in the hostname cache associated with the view. If the query
can be answered from that information, the device responds to the
query. Otherwise, because the query cannot be answered using the
Example: hostname cache, the device forwards the query using the configured
Device(cfg-dns-view)# domain list domain name servers.
example1.com
• If the device is using this view to handle a DNS query for an
unqualified hostname and domain lookup is enabled for the view, the
Cisco IOS software appends a domain name (either a domain name
from the domain name list or the default domain name) in order to
perform any of the following activities:
• Looking up the hostname in the name server cache.
• Forwarded the query to other name servers (whether to the hosts
specified as DNS forwarders in the selected view or to the
limited broadcast address).
Step 8 Do one of the following: (Optional) Defines a list of name servers to be used by this DNS view to
resolve internally generated DNS queries. The IP address of the name server
• domain name-server [vrf vrf-name] can be an IPv4 or IPv6 address, and the IP address can be associated with
name-server-ip-address a Virtual Private Network (VPN) routing and forwarding (VRF) instance.
• domain name-server interface or
interface
(Optional) Defines an interface on which to acquire (through DHCP or
PPP interaction on the interface) the IP address of a DNS server to add to
the list of DNS name servers to be used by this DNS view to resolve
Example:
internally generated DNS queries.
Device(cfg-dns-view)# domain
name-server • If both of these commands are configured, DHCP or PPP interaction
192.168.2.124 on the interface causes another IP address to be added to the list.
Example:
Device(cfg-dns-view)# domain
name-server
interface FastEthernet0/1
Step 9 domain multicast domain-name (Optional) Specifies the IP address to use for multicast lookups handled
using the DNS view.
Example:
Device(cfg-dns-view)# domain multicast
www.example8.com
Step 10 domain retry number (Optional) Defines the number of times to perform a retry when using this
DNS view to send or forward DNS queries.
Example: Note The number of retries is 2 by
Device(cfg-dns-view)# domain retry 4 default.
Step 11 domain timeout seconds (Optional) Defines the number of seconds to wait for a response to a DNS
query sent or forwarded when using this DNS view.
Example: Note The time to wait is 3 seconds by
Device(cfg-dns-view)# domain timeout default.
5
Step 12 [no] dns forwarding (Optional) Enables or disables forwarding of incoming DNS queries handled
using the DNS view.
Example: Note The query forwarding capability is enabled by default.
Device(cfg-dns-view)# dns forwarding
Step 14 dns forwarding source-interface interface Defines the interface on which to forward queries when this DNS view is
used.
Example:
Device(cfg-dns-view)# dns forwarding
source-interface FastEthernet0/0
Example:
Device(cfg-dns-view)# end
SUMMARY STEPS
1. enable
2. clear host [view view-name | vrf vrf-name | all] {hostname | *}
3. configure terminal
4. ip host [vrf vrf-name] [view view-name] hostname {ip-address1 [ip-address2...ip-address8] | additional
ip-address9 [ip-address10...ip-addressn]}
5. exit
6. show hosts [vrf vrf-name] [view view-name] [all | hostname] [summary]
DETAILED STEPS
Step 2 clear host [view view-name | vrf (Optional) Removes static hostname-to-address mappings from the hostname
vrf-name | all] {hostname | *} cache for the specified DNS view or all configured views.
• Use the view keyword and view-name argument to specify the DNS view
Example: whose hostname cache is to be cleared. Default is the default DNS view
Device# clear host all * associated with the specified or global VRF.
• Use the vrf keyword and vrf-name argument to specify the VRF associated
with the DNS view whose hostname cache is to be cleared. Default is the
global VRF (that is, the VRF whose name is a NULL string) with the
specified or default DNS view.
• Use the all keyword to specify that hostname-to-address mappings are to
be deleted from the hostname cache of every configured DNS view.
• Use the hostname argument to specify the name of the host for which
hostname-to-address mappings are to be deleted from the specified hostname
cache.
• Use the * keyword to specify that all the hostname-to-address mappings
are to be deleted from the specified hostname cache.
Example:
Device# configure terminal
Step 4 ip host [vrf vrf-name] [view Defines static hostname-to-address mappings in the DNS hostname cache for a
view-name] hostname {ip-address1 DNS view.
[ip-address2...ip-address8] | additional
ip-address9 • More than one DNS view can be associated with a VRF. To uniquely identify
a DNS view, specify both the view name and the VRF with which it is
[ip-address10...ip-addressn]}
associated.
Example: • The host IP address can be an IPv4 or IPv6 address.
Device(config)# ip host vrf vpn101 • Use the hostname argument to specify the name of the host for which
view user3 hostname-to-address mappings are to be added to the specified hostname
www.example.com 192.168.2.111
2001:DB8:1::1 cache.
• To bind more than eight addresses to a hostname, you can use the ip host
command again and use the additional keyword.
Example:
Device(config)# exit
Step 6 show hosts [vrf vrf-name] [view (Optional) Displays the default domain name, the style of name lookup service,
view-name] [all | hostname] [summary] a list of name server hosts, and the cached list of hostnames and addresses specific
to a particular DNS view or for all configured DNS views.
Example: • More than one DNS view can be associated with a VRF. To uniquely identify
Device# show hosts vrf vpn101 view a DNS view, specify both the view name and the VRF with which it is
user3 associated.
www.example.com
• Use the all keyword if the specified hostname cache information is to be
displayed for all configured DNS views.
• Use the hostname argument if the specified name cache information
displayed is to be limited to entries for a particular hostname.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip dns view-list view-list-name
4. ip dns name-list [number] [permit/deny] [name]
5. view [vrf vrf-name] {default | view-name} order-number
6. restrict name-group name-list-number
7. restrict source access-group acl-number
8. exit
9. end
10. show ip dns view-list view-list-name
11. show ip dns name-list number
DETAILED STEPS
Example:
Device# configure terminal
Step 3 ip dns view-list view-list-name Defines a DNS view list and enters DNS view list configuration
mode.
Example:
Device(config)# ip dns view-list userlist5
Step 4 ip dns name-list [number] [permit/deny] [name] Defines a DNS name list and enters DNS name list configuration
mode.
Example:
Device(config)# ip dns name-list 10
Step 5 view [vrf vrf-name] {default | view-name} Defines a DNS view list member and enters DNS view list
order-number member configuration mode.
Example:
Device(cfg-dns-view-list)# view vrf vpn101
user5 10
Step 6 restrict name-group name-list-number (Optional) Specifies that this DNS view list member cannot be
used to respond to a DNS query unless the query hostname
Example: matches a permit clause in the specified DNS name list and
none of the deny clauses.
Device(cfg-dns-view-list-member)# restrict
name-group 500 • To define a DNS name list entry, use the ip dns name-list
command.
Step 7 restrict source access-group acl-number (Optional) Specifies that this DNS view list member cannot be
used to respond to a DNS query unless the source IP address
Example: of the DNS query matches the specified standard ACL.
Example:
Device(cfg-dns-view-list)# end
Step 10 show ip dns view-list view-list-name Displays information about a particular DNS view list or all
configured DNS view lists.
Example:
Device# show ip dns view-list userlist5
Step 11 show ip dns name-list number Displays information about a particular DNS name list or all
configured DNS name lists.
Example:
Device# show ip dns name-list 5
If you need to add DNS view user4 as the second member of the list, add that view to the list with a position
number value from 11 to 19. You do not need to remove the three existing members and then add all four
members to the list in the desired order.
SUMMARY STEPS
1. enable
2. show ip dns view-list view-list-name
3. configure terminal
4. ip dns view-list view-list-name
5. view [vrf vrf-name] {default | view-name} order-number
6. end
7. show ip dns view-list view-list-name
DETAILED STEPS
Step 2 show ip dns view-list view-list-name Displays information about a particular DNS view list or
all configured DNS view lists.
Example:
Device# show ip dns view-list userlist5
Example:
Device# configure terminal
Step 4 ip dns view-list view-list-name Defines a DNS view list and enters DNS view list
configuration mode.
Example:
Device(config)# ip dns view-list userlist5
Step 5 view [vrf vrf-name] {default | view-name} order-number Defines a DNS view list member and enters DNS view
list member configuration mode.
Example:
Device(cfg-dns-view-list)# view user4 15
Example:
Device(cfg-dns-view-list-member)# end
Changing the Order of the Members of a DNS View List Already in Use
Perform this optional task if you need to change the order of the members of a DNS view list that is already
in use.
For example, suppose the DNS view list named userlist5 is already defined and in use as a default view list
or as an interface-specific view list. Assume that the list consists of the following members:
• DNS view user1 with position number 10
• DNS view user2 with position number 20
• DNS view user3 with position number 30
If you want to move DNS view user1 to the end of the list, remove that view from the list and then add it back
to the list with a position number value greater than 30. You do not need to remove the three existing members
and then add the members back to the list in the desired order.
SUMMARY STEPS
1. enable
2. show ip dns view-list view-list-name
3. configure terminal
4. ip dns view-list view-list-name
5. no view [vrf vrf-name] {default | view-name} order-number
6. view [vrf vrf-name] {default | view-name} order-number
7. end
8. show ip dns view-list view-list-name
DETAILED STEPS
Example:
Device# configure terminal
Step 4 ip dns view-list view-list-name Defines a DNS view list and enters DNS view list
configuration mode.
Example:
Device(config)# ip dns view-list userlist5
Step 5 no view [vrf vrf-name] {default | view-name} Removes a DNS view list member from the list.
order-number
Example:
Device(cfg-dns-view-list)# no view user1 10
Step 6 view [vrf vrf-name] {default | view-name} order-number Defines a DNS view list member and enters DNS view
list member configuration mode.
Example:
Device(cfg-dns-view-list)# view user1 40
Example:
Device(cfg-dns-view-list-member)# end
Step 8 show ip dns view-list view-list-name Displays information about a particular DNS view list
or all configured DNS view lists.
Example:
Device# show ip dns view-list userlist5
Specifying the Default DNS View List for the DNS Server of the Device
Perform this task to specify the default DNS view list for the device’s DNS server. The device uses the default
DNS view list to select a DNS view to use to handle an incoming DNS query that arrives on an interface for
which no interface-specific DNS view list has been defined.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip dns server view-group name-list-number
4. exit
5. show running-config
DETAILED STEPS
Example:
Device# configure terminal
Step 3 ip dns server view-group name-list-number Configures the default DNS view list for the device’s DNS
server.
Example:
Device(config)# ip dns server view-group
500
Example:
Device(config)# exit
Step 5 show running-config Displays information about how DNS view lists are applied.
The default DNS view list, if configured, is listed in the default
Example: DNS view information as the argument for the ip dns server
view-group command.
Device# show running-config
SUMMARY STEPS
1. enable
2. configure terminal
3. interface interface
4. ip dns view-group view-list-name
5. end
6. show running-config
DETAILED STEPS
Example:
Device# configure terminal
Step 3 interface interface Configures an interface type and enter interface configuration
mode so that the specific interface can be configured.
Example:
Device(config)# interface ATM2/0
Step 4 ip dns view-group view-list-name Configures the DNS view list for this interface on the device.
Example:
Device(config-if)# ip dns view-group
userlist5
Example:
Device(config-if)# end
Step 6 show running-config Displays information about how DNS view lists are applied.
Any DNS view lists attached to interfaces are listed in the
Example: information for each individual interface, as the argument for
the ip dns view-group command.
Device# show running-config
SUMMARY STEPS
1. enable
2. configure terminal
3. ip dns view [vrf vrf-name] {default | view-name}
4. domain resolver source-interface interface-type number
5. end
DETAILED STEPS
Example:
Device# configure terminal
Step 3 ip dns view [vrf vrf-name] {default | view-name} Creates the DNS view of the specified name associated
with the specified VRF instance and then enters DNS view
Example: configuration mode.
Step 4 domain resolver source-interface interface-type Sets the source IP address of the DNS queries for the DNS
number resolver functionality.
Example:
Device(cfg-dns-view)# domain resolver
source-interface fastethernet 0/0
Example:
Device(config-if)# end
ip vrf vpn101
description VRF vpn101 for example purposes
rd 10:112
exit
!
ip vrf vpn102
description VRF vpn102 for example purposes
rd 10:128
exit
!
ip dns view vrf vpn101
.
.
.
exit
!
ip dns view vrf vpn102 user1
.
.
.
exit
The two DNS views are both named user1, but each view is associated with a different VRF.
• The default DNS view associated with VRF vpn101 is limited to handling DNS queries from VRF
vpn101 only. This view will be used by the resolver for commands which specify a VRF, such as ping
vrf vpn101 www.example.com.
• The DNS view user1 associated with VRF vpn102 is limited to handling DNS queries from VRF vpn102
only. This view will only be used if specified inside a DNS view list that is configured for use by the
DNS server globally or for a specific interface.
The two DNS views in this example can be configured with the same DNS resolving and forwarding parameters,
or they can be configured with different DNS resolving and forwarding parameters.
Example: Split DNS View with Statically Configured Hostname Cache Entries
The following example shows how to statically add three hostname-to-address mappings for the host
www.example.com in the DNS hostname cache for the DNS view user5 that is associated with VRF vpn101:
Note It does not matter whether the VRF vpn101 has been defined. The hostname cache for this DNS view will
be automatically created, and the hostname will be added to the cache.
Example: Split DNS Configuration of ACLs That Can Limit DNS View Use
The following example shows how to configure one DNS name list and one standard IP ACL:
• A DNS name list is a list of hostname pattern-matching rules that can be used to restrict the use of a
DNS view list member.
• A standard IP ACL is a list of IP addresses that can be used to restrict the use of a DNS view list member.
Both types of lists can be used to limit the types of DNS queries that a DNS view is allowed to handle.
Continuing to use this configuration example, suppose that this same DNS view list member is also configured
to use standard IP ACL 71 as a usage restriction. Then, even if the query hostname matched DNS name list
151, the query source IP address would have to match standard IP ACL 71 before that view would be selected
to handle the query. To validate this second usage restriction, the DNS view-selection steps would continue
as follows:
1 If the DNS query source IP address matches 192.168.2.64, the first DNS view list member is selected to
handle the query.
2 If the DNS query source IP address matches 192.168.2.128, the first DNS view list member is selected to
handle the query. Otherwise, the first DNS view list member is rejected and the view-selection process
moves on to the second member of the DNS view list.
Example: Split DNS View Lists Configured with Different View-use Restrictions
The following example shows how to define two DNS view lists, userlist1 and userlist2. Both view lists
comprise the same three DNS views:
• DNS view user1 that is associated with the usergroup10 VRF
• DNS view user2 that is associated with the usergroup20 VRF
• DNS view user3 that is associated with the usergroup30 VRF
Both view lists contain the same DNS views, specified in the same order:
The Cisco IOS software uses the DNS view list named userlist3 to select the DNS view to use for incoming
queries that arrive on port 1 of the FastEthernet card in slot 0.
Additional References
Related Documents
DNS commands: complete command syntax, Cisco IOS IP Addressing Services Command
command mode, command history, defaults, usage Reference
guidelines, and examples
Standards
Standard Title
None --
MIBs
RFCs
RFC Title
No new or modified RFCs are supported by this --
feature, and support for existing RFCs has not been
modified by this feature.
Technical Assistance
Description Link
The Cisco Support and Documentation website http://www.cisco.com/cisco/web/support/index.html
provides online resources to download documentation,
software, and tools. Use these resources to install and
configure the software and to troubleshoot and resolve
technical issues with Cisco products and technologies.
Access to most tools on the Cisco Support and
Documentation website requires a Cisco.com user ID
and password.
Glossary
AAA --authentication, authorization, and accounting.
ACL --access control list. A list kept by devices to control access to or from the device for a number of services
(for example, to prevent packets with a certain IP address from leaving a particular interface on the device).
access control list --See ACL.
address resolution --Generally, a method for resolving differences between computer addressing schemes.
Address resolution usually specifies a method for mapping network layer (Layer 3) addresses to data link
layer (Layer 2) addresses.
authentication --In security, the verification of the identity of a person or a process.
bridge --Device that connects and passes packets between two network segments that use the same
communications protocol. Bridges operate at the data link layer (Layer 2) of the OSI reference model. In
general, a bridge filters, forwards, or floods an incoming frame based on the MAC address of that frame. See
also relay.
broadcast address --A special address reserved for sending a message to all stations.
CE device --Customer edge device, an edge device in the C network, defined as a C device which attaches
directly to a P device.
client --Any host requesting configuration parameters.
C network --Customer (enterprise or service provider) network.
CPE --customer premises equipment.
C device --Customer device, a device in the C network.
DDR --dial-on-demand routing. Technique whereby a device can automatically initiate and close a
circuit-switched session as transmitting stations demand. The device spoofs keepalives so that end stations
treat the session as active. DDR permits routing over ISDN or telephone lines using an external ISDN terminal
adapter or modem.
DHCP --Dynamic Host Configuration Protocol. Provides a mechanism for allocating IP addresses dynamically
so that addresses can be reused when hosts no longer need them.
DNS --Domain Name System. System used on the Internet for translating names of network nodes into
addresses.
DNS name group --Association of a DNS view list member with a restriction that limits the view to handling
DNS queries whose queried domain name matches a DNS name list. See also DNS source access group.
DNS name list --A named set of a domain name pattern-matching rules, with each rule specifying the type
of action to be performed on a DNS query if a queried domain name matches the text string pattern.
DNS proxy --Feature that allows a device to act as a proxy for devices on the LAN by sending its own LAN
address to devices that request DNS server IP addresses and forwarding DNS queries to the real DNS servers
after the WAN connection is established.
DNS server view group --A DNS view list that has been configured as the default DNS view list for the
device. The Cisco IOS software uses the default DNS view list to determine which DNS view to use to handle
resolution of incoming DNS queries that arrive on an interface not configured with a DNS view list. See also
DNS view group.
DNS source access group --Association of a DNS view list member with a restriction that limits the view to
handling DNS queries whose source IP address matches a standard access control list (ACL).See also DNS
name group.
DNS spoofing --Scheme used by a device to act as a proxy DNS server and “spoof” replies to any DNS queries
using either the configured IP address in the ip dns spoofing command or the IP address of the incoming
interface for the query. This functionality is useful for devices where the interface toward the ISP is not up.
Once the interface to the ISP is up, the device forwards DNS queries to the real DNS servers.
The device will respond to the DNS query with the configured IP address when queried for any hostname
other than its own but will respond to the DNS query with the IP address of the incoming interface when
queried for its own hostname.
The hostname used in the DNS query is defined as the exact configured hostname of the device specified by
the hostname command, with no default domain appended.
DNS view --A named set of virtual DNS servers. Each DNS view is associated with a VRF and is configured
with DNS resolver and forwarder parameters.
DNS view group --Association of a DNS view list with a device interface. The Cisco IOS software uses this
view list to determine which DNS view to use to handle resolution of incoming DNS queries that arrive on
that interface. See also DNS server view group.
DNS view list --A named set of DNS views that specifies the order in which the view list members should
be checked and specifies usage restrictions for each view list member.
DNS view list member --A named set of DNS views that specifies the order in which the view list members
should be checked and specifies usage restrictions for each view list member.
domain --On the Internet, a portion of the naming hierarchy tree that refers to general groupings of networks
based on organization type or geography.
domain name --The style of identifier--a sequence of case-insensitive ASCII labels separated by dots--defined
for subtrees in the Internet Domain Name System (R1034) and used in other Internet identifiers, such as
hostnames, mailbox names, and URLs.
enterprise network --Large and diverse network connecting most major points in a company or other
organization. Differs from a WAN in that it is privately owned and maintained.
gateway --In the IP community, an older term referring to a routing device. Today, the term router or device
is used to describe nodes that perform this function, and gateway refers to a special-purpose device that
performs an application-layer conversion of information from one protocol stack to another.
ISP --Internet service provider. Company that provides Internet access to other companies and individuals.
LAN --local-area network. High-speed, low-error data network covering a relatively small geographic area
(up to a few thousand meters). LANs connect workstations, peripherals, terminals, and other devices in a
single building or other geographically limited area. LAN standards specify cabling and signaling at the
physical and data link layers of the OSI model. Ethernet, FDDI, and Token Ring are widely used LAN
technologies. Compare with MAN and WAN.
MAN --metropolitan-area network. Network that spans a metropolitan area. Generally, a MAN spans a larger
geographic area than a LAN, but a smaller geographic area than a WAN. Compare with LAN and WAN.
MPLS --Multiprotocol Label Switching. Switching method that forwards IP traffic using a label. This label
instructs the routers and switches (or network devices) in the network where to forward the packets based on
preestablished IP routing information.
multicast address --Single address that refers to multiple network devices. Synonymous with group address.
name caching --Method by which remotely discovered hostnames are stored by a device for use in future
packet-forwarding decisions to allow quick access.
name resolution --Generally, the process of associating a name with a network location.
name server --Server connected to a network that resolves network names into network addresses.
namespace --Commonly distributed set of names in which all names are unique.
PE device --Provider edge device, an edge device in the P network, defined as a P device which attaches
directly to a C device.
P network --MPLS-capable service provider core network. P devices perform MPLS.
P device --Provider device, a device in the P network.
relay --OSI terminology for a device that connects two or more networks or network systems. A data link
layer (Layer 2) relay is a bridge; a network layer (Layer 3) relay is a router or device.
router or device --Network layer device that uses one or more metrics to determine the optimal path along
which network traffic should be forwarded. Routers (or devices) forward packets from one network to another
based on network layer information. Occasionally called a gateway (although this definition of gateway is
becoming increasingly outdated).
server --Any host providing configuration parameters.
spoofing --Scheme used by devices to cause a host to treat an interface as if it were up and supporting a
session. The device spoofs replies to keepalive messages from the host in order to convince that host that the
session still exists. Spoofing is useful in routing environments, such as DDR, in which a circuit-switched link
is taken down when there is no traffic to be sent across it in order to save toll charges.
SSM --Source Specific Multicast. A datagram delivery model that best supports one-to-many applications,
also known as broadcast applications. SSM is the core networking technology for the Cisco implementation
of the IP Multicast Lite suite of solutions targeted for audio and video broadcast application environments.
tunnel --Secure communication path between two peers, such as two devices.
VPN --Virtual Private Network. Framework that consists of multiple peers transmitting private data securely
to one another over an otherwise public infrastructure. A VPN protects inbound and outbound network traffic
by using protocols that tunnel and encrypt all data at the IP level. This framework permits networks to extend
beyond their local topology, while remote users are provided with the appearance and functionality of a direct
network connection. Enables IP traffic to travel securely over a public TCP/IP network by encrypting all
traffic from one network to another. A VPN uses “tunneling” to encrypt all information at the IP level.
VRF --VPN routing and forwarding instance. A VRF consists of an IP routing table, a derived forwarding
table, a set of interfaces that use the forwarding table, and a set of rules and routing protocols that determine
what goes into the forwarding table. In general, a VRF includes the routing information that defines a customer
VPN site that is attached to a PE device. Each VPN instantiated on the PE device has its own VRF.
WAN --wide-area network. Data communications network that serves users across a broad geographic area
and often uses transmission devices provided by common carriers. Frame Relay, SMDS, and X.25 are examples
of WANs. Compare with LAN and MAN.
Caution Extension of services should be done with proper care. Generally, only specific services should be extended.
Service names should be unique in the network to avoid duplicate name conflicts.
See Feature Information for Service Discovery Gateway section to check feature availability for your
platform release version.
Note Extension of services such as printers or Apple TV works fine without actual replication of service
announcements. The Service Discovery Gateway will cache announcements, queries and their responses
in the cache. If another device queries for a service, the Service Discovery Gateway will be able to provide
an answer from its cache.
Enable the redistribution mdns-sd command only on a per-interface basis, and only if it is actually required.
You must ensure that there are no loops in the network topology corresponding to the interface for which
service announcement redistribution is being enabled. A loop can lead to a broadcast storm.
Redistribution of service announcement information cannot be done globally. You can enable redistribution
of service information only at the interface level.
For the sample scenario where a printer service is accessible by clients on other interfaces, you must apply
these filters:
• On the interface where the printer service is available (IN filter) —You want to allow the printer service
into the mDNS cache, so that it can be accessed by users on other subnets.
• On the interface where the printer service is available (OUT filter)—Since clients on other interfaces
will access the service (printer x, for example), you should allow queries coming from the device (OUT
filter, from the device's point of view).
• On each interface where clients reside (IN filter)—For clients on other interfaces (subnets) wanting to
access the printer service, you must allow queries from users into the mDNS cache (IN filter).
Remember Applying the IN filter means that you are allowing the printer service into the device mDNS cache, and
other interfaces can access it. Applying the OUT filter means that you are allowing the queries out of the
cache so that queries from clients on other interfaces can reach the printer interface. On other client-facing
interfaces, the IN filter is applied to allow queries in.
Note • Filters can be applied at the global level and at the interface level. Filters applied at the interface
level takes precedence over the filters applied at the global level.
• The term 'service discovery information' refers to services (printer services, etc), queries (queries
for printer services, etc, from one interface to the other), announcements (printer service is removed,
etc), and service-instances (a specific service—printer x, Apple TV 3, etc) that you want to extend
across subnets.
You must mention a sequence number when using the permit or deny option. The filtering is done sequentially,
in the ascending order. The same service-list can be associated with multiple sequence numbers. Within a
sequence, match statements (commands) must be used to specify what needs to be filtered. Generally, match
statements are used to filter queries (for example, queries from clients to find printer and fax services),
announcements (new service is added, and so on), specific service–instances, types of service such as printer
services (so that the service is allowed into the cache for use), services available for a specific interface (printers
and Apple TVs associated with a VLAN), and locations.
Note A service-list by itself does not contain any services. You must specify a service type in the match statement
when setting filter options to allow or prohibit services. (For example, '_ipp._tcp' is the service type for
an IPP printing service running over TCP).
Sample scenario - Consider a device is in a client segment. The goal is to allow the following on the device:
• All queries from clients to the device.
• Printer services to clients on other subnets.
!
service-list mdns-sd mixed permit 10
match message-type query
!
service-list mdns-sd mixed permit 20
match message-type announcement
match service-type _ipps._tcp.local
!
In the above example, a service-list called 'mixed' is created and the permit option is used twice—to filter
queries and to filter printer services and announcements. The filtering is done in the sequence given below:
• Sequence 10 - A match statement is used to filter queries.
• Sequence 20 - Match statements are used to filter announcements and printer services.
The match statement in Sequence 10 sets a filter for queries on the device, but does not specify that queries
be allowed into the device. To allow queries from clients, the filter needs to be applied on the interface in the
IN direction. The example is displayed in the Extend Services Across Subnets section.
Similarly, the match statements in Sequence 20 sets a filter for announcements and printer services on the
device, but does not specify that they be allowed into the device. To allow announcements and printer services
into the device, the filter needs to be applied on the required interfaces in the IN direction. The example is
displayed in the Extend Services Across Subnets section.
If neither the permit option nor the deny option is used, the default action is to disallow services from being
transported to other subnets.
Browsing services periodically—Service-lists of the type query can be used to browse services. Such queries
are called active queries. Active queries periodically send out requests for the services specified within the
query on all interfaces. As services have a specific Time to Live (TTL) duration, active queries can help to
keep services fresh in the cache memory.
In the following example, a service-list named 'active-query' is created and the service-list is of the type query.
Services such as printer services are specified within the query, and these are the services that we want to
extend. Typically, these services would match the services that have been configured as 'permitted' services
in the IN filter.
!
service-list mdns-sd active-query query
service-type _universal._sub._ipp._tcp
service-type _ipp._tcp.local
service-type _ipps._tcp.local
service-type _raop._tcp.local
!
The purpose of an active query and a query associated with a match statement is different. When you enable
an active query, services are browsed periodically. A query is used in a match statement to permit or prohibit
queries (not active queries) on the interface.
Note • Service-list creation can only be used globally and cannot be used at the interface level.
• You can create a new service-instance of a specific service-type using the service-instance mdns-sd
command.
• A service end–point (such as a printer, fax, and so on) sends unsolicited announcements when a
service starts up. After that, it sends unsolicited announcements whenever a network change event
occurs (such as, an interface coming up or going down, and so on). The device always responds to
queries.
Remember Filtering only sets filter options and specifies that certain services need to be filtered. You must apply the
filters on an interface for the services, queries, or announcements to actually be permitted or prohibited
on the interface. To know about applying filters and the other available service discovery configuration
options, refer the Extend Services Across Subnets section.
Sample scenario - A device is in a client segment and the goal is to allow the following between the device
interfaces:
• All queries from clients to the device.
• Printer services.
A note about filter options - Filter options have been set for the above scenario by creating a service-list
called 'mixed' and adding filter options to it. (see Set Filter Options to Extend Services Across Subnets for
more details). The following example explains how to apply the filters:
!
interface Ethernet0/0
description *** (wireless) Clients here plus some printers
ip address 172.16.33.7 255.255.255.0
service-routing mdns-sd
service-policy mixed IN
!
interface Ethernet0/3
description *** (wireless) Clients here plus some printers
ip address 172.16.57.1 255.255.255.0
service-routing mdns-sd
service-policy mixed IN
!
In the above example, service-routing is enabled on the interface and the filter options in the service-policy
'mixed' are applied in the IN direction. In other words, all queries and printer services will be allowed into
the device, from the interfaces Ethernet 0/0 and Ethernet 0/3.
Sample scenario for browsing specific services - A service-list of the type query (called active query) has
been created. It contains services that we want to browse periodically, such as printer services (see Set Filter
Options to Extend Services Across Subnets for more details about creating an active query). To enable browsing
of the services in the query, you must apply the active query for the device.
!
service-routing mdns-sd
service-policy-query active-query 900
!
In the above example, the period is set to 900 seconds. The services within the active query are queried on
all interfaces of the device after an interval of 900 seconds.
Note • You can enable browsing of services for specific interfaces. If browsing of services is enabled
globally, you can disable browsing of services on specific interfaces.
• Services are browsed specific to a device or interface by the mDNS process. So, the IN or OUT
option is not relevant for browsing of services.
You can use the following options after enabling mDNS on a device or interface.
SUMMARY STEPS
1. enable
2. configure terminal
3. service-list mdns-sd service-list-name {deny sequence-number | permit sequence-number | query}
4. match message-type {announcement | any | query}
5. match service-instance {instance-name | any | query}
6. match service-type mDNS-service-type-string
7. match location civic civic-location-name
8. exit
DETAILED STEPS
Example:
Device# configure terminal
Step 3 service-list mdns-sd service-list-name {deny Enters mdns service discovery service-list mode.
sequence-number | permit sequence-number | query}
• Creates a service-list and applies a filter on the service-list
according to the permit or deny option applied to the
Example: sequence number.
Device(config)# service-list mdns-sd sl1
permit 3 Or
Or
• Creates a service-list and associates a query for the
Device(config)# service-list mdns-sd sl4 query service-list name if the query option is used.
Remember When you set filter options, ensure that you permit
a query or announcement for a service-list. If you
do not use a permit option and only use deny
options, you will not be able to apply the filter.
Step 4 match message-type {announcement | any | query} Configures parameters for a service-list based on a service
announcement or query.
Example: Note You cannot use the match command if you have used
Device(config-mdns-sd-sl)# match message-type the query option. The match command can be used
announcement only for the permit or deny option.
Step 5 match service-instance {instance-name | any | Configures parameters for a service-list based on a
query} service-instance or query.
Example:
Device(config-mdns-sd-sl)# match
service-instance printer-3
Step 6 match service-type mDNS-service-type-string Configures parameters for a service-list based on a service-type.
Example:
Device(config-mdns-sd-sl)# match service-type
_ipp._tcp.local
Step 7 match location civic civic-location-name Configures parameters for a service-list based on a civic location.
Example:
Device(config-mdns-sd-sl)# match location
civic location3
What to Do Next
Apply filters on an interface for the services, queries, or announcements to actually be permitted or prohibited
on the interface.
Note Steps 5 to 11 are mDNS Service Discovery configuration options. The steps are optional and not meant
to be used in any specific order.
SUMMARY STEPS
1. enable
2. configure terminal
3. service-routing mdns-sd
4. service-policy service-policy-name {IN | OUT}
5. cache-memory-max cache-config-percentage
6. service-policy-query service-list-name query-period
7. designated-gateway enable [ttl duration]
8. service-policy-proximity service-list-name [limit number-of-services]
9. service-type-enumeration period period-value
10. source-interface type number
11. rate-limit in maximum-rate-limit
12. exit
DETAILED STEPS
Example:
Device# configure terminal
Step 3 service-routing mdns-sd Enables mDNS gateway functionality for a device and enters
multicast DNS configuration (config-mdns) mode.
Example:
Device(config)# service-routing mdns-sd
Step 4 service-policy service-policy-name {IN | OUT} For a service-list, applies a filter on incoming service discovery
information (IN-bound filtering) or outgoing service discovery
Example: information (OUT-bound filtering).
Device(config-mdns)# service-policy sl1 IN Note Global service-policies are optional and effect all L3
interfaces. Typically, a service-policy is applied on an
interface.
Step 5 cache-memory-max cache-config-percentage Sets some part of the system memory (in percentage) for cache.
Note By default, 10% of the system memory is set aside for
Example: cache. You can override the default value by using this
Device(config-mdns)# cache-memory-max 20 command.
Step 6 service-policy-query service-list-name Creates an active query and configures the service-list-query
query-period period.
Example:
Device(config-mdns)# service-policy-query
sl4 100
Step 7 designated-gateway enable [ttl duration] Designates the device to route mDNS announcement and query
information for the domain.
Example:
Device(config-mdns)# designated-gateway
enable
Step 8 service-policy-proximity service-list-name [limit Configures service policy proximity filtering on the device.
number-of-services]
• Service policy proximity filtering is only available for
wireless clients and is based on Radio Resource
Device(config-mdns)# • The default value for the maximum number of services that
service-policy-proximity sl1 limit 10 can be returned is 50.
Step 9 service-type-enumeration period period-value Configures service-type enumeration period for the device.
Example:
Device(config-mdns)#
service-type-enumeration period 45
Step 10 source-interface type number Specifies an alternate source interface for outgoing mDNS packets
on a device.
Example:
Step 11 rate-limit in maximum-rate-limit Configures the maximum rate limit of incoming mDNS packets
for a device.
Example:
Device(config-mdns)# rate-limit in 80
Step 12 exit Exits multicast DNS configuration mode, and returns to global
configuration mode.
Example:
Device(config-mdns)# exit
1. enable
2. configure terminal
3. interface type number
4. service-routing mdns-sd
5. service-policy service-policy-name {IN | OUT}
6. exit
DETAILED STEPS
Example:
Device# configure terminal
Step 3 interface type number Enters Interface multicast DNS configuration mode, and enables interface
configuration.
Example:
Step 4 service-routing mdns-sd Enables mDNS gateway functionality for an interface and enters multicast
DNS configuration (config-mdns) mode.
Example:
Device(config-if)# service-routing
mdns-sd
Step 5 service-policy service-policy-name {IN | For a service-list, applies a filter on incoming service discovery
OUT} information (IN-bound filtering) or outgoing service discovery
information (OUT-bound filtering).
Example: Remember When you set filter options, ensure that you permit a query
Device(config-if-mdns-sd)# or announcement for a service-list. If you have not
service-policy sl1 IN permitted a service, query, or announcement while setting
filter options, then you will see this warning when you
apply the filter:
Warning: Please enable explicit service-list rule with the
permit action to allow queries and responses.
Step 6 exit Exits Interface multicast DNS configuration mode, and returns to interface
configuration mode.
Example:
Device(config-if-mdns-sd)# exit
1. enable
2. configure terminal
3. service-instance mdns-sd service instance-name regtype service-type domain name
4. {ipv4addr | ipv6addr} IP-address
5. port number
6. target-hostname host-name
7. txt text-record-name
8. priority value
9. weight value
10. exit
DETAILED STEPS
Example:
Device# configure terminal
Step 3 service-instance mdns-sd service instance-name Creates a service-instance of a specific service type and enters
regtype service-type domain name multicast Domain Name System (mDNS) service discovery
service-instance (config-mdns-sd-si) mode.
Example: Note In this mode, you can configure various parameters for
Device(config)# service-instance mdns-sd the service-instance. The subsequent steps show how to
service printer-3 regtype _ipp._tcp.local configure service-instance parameters.
domain tcp4
Step 4 {ipv4addr | ipv6addr} IP-address Specifies the IPv4 or IPv6 address of the port on which the service
is available.
Example:
Device(config-mdns-sd-si)# ipv4addr
209.165.200.230 255.255.255.0
Example:
Device(config-mdns-sd-si)# port 9100
Step 6 target-hostname host-name Specifies the fully qualified domain name (FQDN) of the target
host.
Example:
Device(config-mdns-sd-si)# target-hostname
fqdn-of-printer.example.com.
Step 7 txt text-record-name Specifies the text record associated with the service instance.
Note A TXT record is a type of DNS record that provides text
Example: information to sources outside your domain. Specify the
text record in the format 'service-type=service-name'. To
Device(config-mdns-sd-si)# txt specify multiple records, use a semicolon (;) as a
_ipp._tcp.local=printer3
separator.
Step 8 priority value (Optional) Specifies the priority value for the service-instance.
The default priority value is zero.
Example:
Device(config-mdns-sd-si)# priority 3
Step 9 weight value (Optional) Specifies the weight value for the service-instance. The
default weight value is zero.
Example:
Device(config-mdns-sd-si)# weight 20
Step 10 exit Exits multicast Domain Name System (mDNS) service discovery
service-instance (config-mdns-sd-si) mode and enters global
Example: configuration mode.
Device(config-mdns-sd-si)# exit
Note The show and debug commands mentioned below are not in any specific order.
SUMMARY STEPS
DETAILED STEPS
Example:
Device# show mdns requests detail
Step 2 show mdns cache [interface type number [detail] | [ name record-name] [type record-type] [ detail]]
Example:
Note You can use the detail keyword for a specific interface, record or type. You cannot use it independently with
the show mdns cache command.
Device# show mdns cache
mDNS CACHE
=================================================================================================================================
[<NAME>] [<TYPE>][<CLASS>] [<TTL>/Remaining] [Accessed]
[If-index] [<RR Record Data>]
music-WS.local A IN 120/116 1 3
192.168.183.1
Step 3 show mdns statistics {all | interface type number | service-list list-name | [cache | service-policy] {all | interface type
number} | services orderby providers}
Example:
Device# show mdns statistics all
mDNS Statistics
mDNS packets sent : 0
mDNS packets received : 31
mDNS packets dropped : 8
mDNS cache memory in use: 64264(bytes)
Example:
Device# show mdns service-types
mDNS SERVICES
=================================
[<NAME>] [<TTL>/Remaining] [If-name]
_ipp._tcp.local 4500/4496
Example:
Device# debug mdns all
This command enables all mDNS debugging flows.
Device> enable
Device# configure terminal
Device(config)# service-list mdns-sd sl1 permit 3
Device(config-mdns-sd-sl)# match message-type announcement
Device(config-mdns-sd-sl)# exit
!
service-list mdns-sd mixed permit 10
match message-type query
!
service-list mdns-sd mixed permit 20
match message-type announcement
match service-type _ipps._tcp.local
!
service-list mdns-sd mixed permit 30
match message-type announcement
match service-type _ipp._tcp.local
match service-type _universal._sub._ipp._tcp
!
service-list mdns-sd mixed permit 40
match message-type announcement
!
service-list mdns-sd mixed deny 50
!
service-list mdns-sd permit-most deny 10
match service-type _sleep-proxy._udp.local
!
service-list mdns-sd permit-most permit 20
!
service-list mdns-sd permit-all permit 10
!
service-list mdns-sd deny-all permit 10
match message-type query
!
service-list mdns-sd deny-all deny 20
!
service-list mdns-sd active-query query
service-type _universal._sub._ipp._tcp.local
service-type _ipp._tcp.local
service-type _ipps._tcp.local
service-type _raop._tcp.local
!
service-routing mdns-sd
service-policy-query active-query 900
!
!
interface Ethernet0/0
description *** (wireless) Clients here plus some printers or aTVs
ip address 172.16.33.7 255.255.255.0
service-routing mdns-sd
service-policy mixed IN
service-policy permit-all OUT
!
interface Ethernet0/1
description *** AppleTVs, Print Servers here
In addition, to keep the service PTRs fresh in the cache an active query is configured. The active query queries
for those services that we want to extend. Typically, this would match the services that have been configured
as 'permitted' services in the IN filter. The value is set to 900 seconds. The duration is enough to refresh the
PTRs as they typically have a TTL of 4500 seconds.
Device(config-mdns-sd-si)# exit
Note When you create a service-instance, a text record is created even if you do not configure service-instance
parameters.
Standard/RFC Title
RFC 6762 Multicast DNS
MIBs
Technical Assistance
Description Link
The Cisco Support website provides extensive online http://www.cisco.com/support
resources, including documentation and tools for
troubleshooting and resolving technical issues with
Cisco products and technologies.
To receive security and technical information about
your products, you can subscribe to various services,
such as the Product Alert Tool (accessed from Field
Notices), the Cisco Technical Services Newsletter,
and Really Simple Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website
requires a Cisco.com user ID and password.
Service 15.4(3)M The Service Discovery Gateway feature was enhanced with
Discovery additional filter and configuration options.
Gateway—Phase The following commands were introduced or modified: clear
2 mdns cache, clear mdns service-types, clear mdns statistics,
designated-gateway, match location, rate-limit,
service-instance mdns-sd, service-policy-proximity,
service-routing mdns-sd, service-type-enumeration, show
mdns cache, show mdns statistics, source-interface