cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11635
Views
0
Helpful
6
Replies

Setting up DNS forwarding in Cisco router

bprietoclv
Level 1
Level 1

Good afternoon,

Probably this is a trivial question but I have not found any response to it. What I would like is to set my cisco 877W rotuer up in order to act as a DNS server which forwards DNS queries following these simple rules:

     1.- If the name is within my local domain *.ib forward them to my local DNS 172.21.238.229 and .230, and

     2.- Else forward them to the chosen public domains (i.e. 8.8.8.8 and 8.8.4.4).

Thansk in advance.

Kind regards.

1 Accepted Solution

Accepted Solutions

ALIAOF_
Level 6
Level 6

Usually if you have a Local network and Local DNS server you use the Local DNS server for all DNS queries and if there is an external domain involved your local DNS server goes out and talkes to the external DNS servers that are configured on it. 

So lets say you have a PC with your Local DNS server configured 172.21.238.229 and .230.  If you ping something local on your network like "yourlocalhost.localdomain.com".  172.21.238.229 and .230 will have that record and they will respond back with the IP address.

Now if you ping lets say "google.com".  Your Local DNS servers if they have that name to IP mapping cached they will respond if they don't they will query the external DNS server (whatever you configure in your case 8.8.8.8 and .4) and then respond back to you.

View solution in original post

6 Replies 6

Kyle Cohne
Level 1
Level 1

  This kind of depends. Are trying to enable DNS on the router for a host (PC) to use or for the router to be able to use dns for ping or traceroute commands? Are you also using the router for DHCP as well?

Hi Kyle,

I am trying to enable DNS on the router for a host, being the router the DHCP server, default gateway and primary DNS server for the host.

So Basically you would configure the local DNS under the DHCP pool on the router this would hand out DNS server informtaion to your hosts when they get a DHCP address.

ip dhcp pool users

dns-server x.x.x.x

dns-server x.x.x.x

The on your local DNS server you would use forwarders to forward any dns quires to the desired 8.8.8.8 and 8.8.4.4 servers that can not be found in your local domain. The router can't actually act as true dns server.

ALIAOF_
Level 6
Level 6

Usually if you have a Local network and Local DNS server you use the Local DNS server for all DNS queries and if there is an external domain involved your local DNS server goes out and talkes to the external DNS servers that are configured on it. 

So lets say you have a PC with your Local DNS server configured 172.21.238.229 and .230.  If you ping something local on your network like "yourlocalhost.localdomain.com".  172.21.238.229 and .230 will have that record and they will respond back with the IP address.

Now if you ping lets say "google.com".  Your Local DNS servers if they have that name to IP mapping cached they will respond if they don't they will query the external DNS server (whatever you configure in your case 8.8.8.8 and .4) and then respond back to you.

I know, but imagine that my internal DNS can only resolve internal domain names, names that cannot be resolved on the Internet, and it is not possible for it to forward any query to the Internet because there is an isolated LAN. That is why I want to use my router to forwards internal DNS queries to the internal DNS servers and public ones to public DNS servers.

Well even if it is on an isolated LAN unless you are specifically blocking DNS traffic on the firewall from that DNS server to the outside world it should be able to.  But if you are trying to just test out something then you can just use the internal and external DNS servers and configure your router to hand out the internal one as the primary and external as secondary.  Not a best practice though.

Review Cisco Networking for a $25 gift card