12-28-2015 02:04 AM - edited 03-08-2019 03:13 AM
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!
Solved! Go to Solution.
04-23-2017 11:50 AM
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
12-28-2015 02:23 AM
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
12-28-2015 03:24 AM
Hi,
Okay, thanks for your reply. So I'm sure than it is not possible!
12-28-2015 06:32 AM
Hi,
I didn't have a look at dns name-list but this seems to be a good option!
Thanks for this great input!
04-23-2017 11:37 AM
I would say that last line should be
ip dns server view-group DNS
04-23-2017 11:50 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide