Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Using Router as DNS Server

I have customer who is in the position that they need the Cisco router to resovle internal hostnames.

Each location has a cisco router terminating an Internet connection. The customer is installing a new anti virus software that has to connect to the AV server that is located at their HQ.

The software must use a hostname and not an IP address. The hostname that it uses is the AV server.

The clients are failing to contact the server b/c they currently use the local Internet providers DNS servers.

I would like to set the Cisco up to resolve hostnames that are configured in the router, and forward request for all other traffic to the Internet DNS severs.

I am reading conflicting reports, some say this is not possible, some say it is.

The config I have currently is:

ip domain name

ip host CustomerAV

ip name-server (ISP DNS Server)

ip name-server (ISP DNS Server)

ip domain-lookup

ip dns server

Some articles I read say you must use the following command:

ip dns primary soa

I have no clue what that command is and if it must be used.

Right now, the clients are failing to resolve the internal hostnames. The IP of the Cisco has been configured as the primary DNS on the clients.

Any ideas?


Re: Using Router as DNS Server

This site has a good explanation,

I assume the host site has dns running on something other than a router and that it is configured to reply to dns queries for zones it is primary for, but forward dns queries for zones it is not. That would be a standard MS domain controller/dns installation. If that is the case, then I would configure the remote routers as dns caching proxies as the first article in the link above explains.

Sent from Cisco Technical Support iPad App

VIP Purple

Re: Using Router as DNS Server

For that you can use the DNS-views that can be configred in IOS. Lets assume you wnat to send queries for "*.company.local" to your internal server, but everything else to the ISP-DNS-server. That can be done the following way:

Prepare the Regex for the domains that need a special handling:

ip dns name-list 1 permit \.company\.local

Prepare all the views, one for each different DNS-need:

ip dns view COMP


  dns forwarder

  dns forwarding source-interface Vlan254


ip dns view default


  domain timeout 2

  dns forwarder

And now tell the router which view should be used for which queries. The name-group 1 references the name-list configured at the top:

ip dns view-list DNS

  view COMP 10

    restrict name-group 1

  view default 1000


ip dns server view-group DNS

The internal server should be the one that can resolve the name for the AV-server. If the IP is later changed, then you don't have to reconfigure all your routers that have this DNS-settings.

Don't stop after you've improved your network! Improve the world by lending money to the working poor:

Don't stop after you've improved your network! Improve the world by lending money to the working poor:
CreatePlease login to create content