Friday, September 27, 2013

Cisco IOS DNS Views

DNS views are a fairly recent (12.4ish) addition to IOS to provide the capability for some advanced DNS name server functionality. They allow you to utilize the router as a DNS server and segregate DNS names + forwarding. This comes in handy when you want a split DNS environment - i.e., different name spaces and forwarding for different segments of the network. Obviously, you’re not likely to see the enterprise using the router as a DNS server – but it’s quite effective in the small network builder space (home network for instance).

The starting point in this configuration is creation of the view itself.

ip dns view internal
domain name
domain name-server
domain name-server

The command above creates the DNS view named "internal", sets the domain name to "" and sets up DNS forwarding to a pair of Google's DNS servers.

Now, I can create my own DNS namespace within that view.

ip host view internal server1
ip host view internal server2
ip host view internal server3
ip host view internal server4
ip host view internal server5

Next step is to assign the view to a ‘view list’. A view list is an ordered list of view where you can put additional restrictions. A view list is also what you assign to a network segment (interface). For this exercise, we’re just adding 1 view to a list named ‘internallist’ (note the highly creative naming conventions I’m using).

ip dns view-list internallist
view internal 1

Now, I assign the view list to a subinterface/VLAN.

interface FastEthernet0/1.1
description data vlan
encapsulation dot1Q 1 native
ip address
ip dns view-group internallist
ip nat inside

Done. Now, this VLAN has visibility to the “internal” DNS namespace above and utilizes DNS forwarding to Google’s DNS servers.

No comments:

Post a Comment