cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4313
Views
5
Helpful
5
Replies

Per domain forward for DNS

tim.de.vos
Level 1
Level 1

Hi all,

I have a simple question. I'm trying to use our Cisco device as a DNS server but I miss one thing. Is it possible to do a per domain forward in IOS like in ISC BIND?

E.g. in ISC BIND you can say:

// zone section fragment of named.conf 
zone "example.com" IN {
	type forward;
	forwarders {10.0.0.1};
};
zone "example2.com" IN {
	type forward;
	forwarders {10.0.0.2};
};

This means all DNS lookups for example.com will be forwarded to 10.0.0.1 and all DNS lookups for example2.com will be forwarded to 10.0.10.2. I can not find this option in IOS but maybe I'm missing something.

Thanks!

1 Accepted Solution

Accepted Solutions

You can configure that on IOS. Here is an example that I use for branch-offices with local internet.These send all company-DNS queries to the HQ-DNS (10.11.12.13) and all the rest to the internet (8.8.8.8):

(EDIT: changed wrong config HQ -> DNS)

ip dns name-list 1 permit \.example\.intern
!
ip dns view HQ
logging
dns forwarder 10.11.12.13
dns forwarding source-interface Vlan254
ip dns view default
logging
domain timeout 2
dns forwarder 8.8.8.8
!
ip dns view-list DNS
view HQ 10
restrict name-group 1 ! this matches the name-list in line 1
view default 1000
!
ip dns server view-group DNS

View solution in original post

5 Replies 5

rickardkorkko
Level 1
Level 1

I don't think it's possible. You have the ip name-server command which only support an IP address as an argument. No domains for that address can be added.

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr/command/ipaddr-cr-book/ipaddr-i3.html#wp9569784510

Hi,

Okay, thanks for your reply. So I'm sure than it is not possible!

tim.de.vos
Level 1
Level 1

Hi,

I didn't have a look at dns name-list but this seems to be a good option!

Thanks for this great input!

ratko
Level 1
Level 1

I would say that last line should be

ip dns server view-group DNS

You can configure that on IOS. Here is an example that I use for branch-offices with local internet.These send all company-DNS queries to the HQ-DNS (10.11.12.13) and all the rest to the internet (8.8.8.8):

(EDIT: changed wrong config HQ -> DNS)

ip dns name-list 1 permit \.example\.intern
!
ip dns view HQ
logging
dns forwarder 10.11.12.13
dns forwarding source-interface Vlan254
ip dns view default
logging
domain timeout 2
dns forwarder 8.8.8.8
!
ip dns view-list DNS
view HQ 10
restrict name-group 1 ! this matches the name-list in line 1
view default 1000
!
ip dns server view-group DNS