cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1025
Views
0
Helpful
4
Replies

DHCP, DNS, & Name Resolvers

jp.ward16
Level 1
Level 1

Let me preface this by saying that my setup uses both a DHCP pool and DNS within a single router for a single class C subnet. The idea was to have the clients assigned an IP address and for the router to act as that subnets DNS server for the addresses it assigned. The dhcp pool works. THe DNS Server not so much, but I might have misstepped in setting it up.

The running-config main section are:

 

!
ip dhcp excluded-address 192.168.99.254
ip dhcp excluded-address 192.168.99.1
ip dhcp excluded-address 192.168.99.251
ip dhcp excluded-address 192.168.99.253
!
ip dhcp pool KUS-AP-Pool
 import all
 network 192.168.99.0 255.255.255.0
 update dns
 default-router 192.168.99.254 
 dns-server 192.168.99.251 
 domain-name via.lan
!
!
ip dhcp update dns both
!
ip domain name via.lan
ip host via 192.168.99.222
ip host via.lan ns ns1.via.lan
ip host ns1 ns 192.168.99.251
ip host jpward-US-N1 192.168.99.13
ip name-server 192.168.99.251
ip dhcp-client update dns server both
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
cts logging verbose

...

!
ip dns view ns1
 domain name via.lan
 domain name-server  192.168.99.251
 domain name-server  8.8.8.8
ip dns view-list ns1
 view ns1 1
ip dns server
ip dns primary via.lan soa ns1.via.lan jpward.via.lan 3600 300 604800 172800
ip nat inside source list 101 interface GigabitEthernet0/0 overload
!
!         
!
access-list 101 permit ip 192.168.99.0 0.0.0.255 any
!
control-plane

 

what missteps did I take? Where did I go astray? Anyone?

 

The full Running-config is attached. 

4 Replies 4

Jon Marshall
Hall of Fame
Hall of Fame

According to the documentation yes it should be able to act as a DNS server although it is not something I have ever done.

If you also need to resolve internet names then you would need to configure forwarders for your router to query ie. public DNS servers.

Like I say though it's not something I have ever done or even considered to be honest.

Jon

Jon,

Why is this "build" so elusive to me? It's not that difficult a concept. One subnet, 100 hard wired clients, 50 wireless clients one dhcp pool with DNS for IP to Hostname mapping within that one subnet.

Can you explain to me what this code chunks do and if there placement in the hierarchy of the  show running-config is significant to what they do as I believe I am getting confused between DNS and DNS view. One is for the router as a DNS server the other is for a specific name view so it can be applied to an interface?

If this is true, then what the difference between using the entire router as a DNS and one using one interface?

 

 

ip dhcp pool KUS-AP-Pool
 import all
 network 192.168.99.0 255.255.255.0
 update dns
 default-router 192.168.99.254 
 dns-server 192.168.99.251 
 domain-name via.lan
!
!
ip dhcp update dns both
!
ip domain name via.lan
ip host via.lan ns ns1.via.lan
ip host ns1 ns 192.168.99.251
ip host ns1.via.lan 192.168.99.251
ip name-server 192.168.99.251
ip dhcp-client update dns server both

interface Vlan99
 ip address 192.168.99.254 255.255.255.0
 ip dns view-group internallist
 ip nat inside
 ip virtual-reassembly in

ip dns view internal
 domain name via.lan
 domain name-server  8.8.8.8
 domain name-server  8.8.4.4
ip dns view-list internallist
 view internal 1
ip dns server
ip dns primary via.lan soa ns1.via.lan jpward.via.lan 3600 300 604800 172800

Unfortunately I have not only never used a Cisco router as a DNS server but I don't have a router with the correct IOS feature set to test your setup with.

So you are trying to do dynamic updates to DNS from your DHCP leases as far as I can tell.

When a client gets an IP address what does "sh hosts" show on the router ?

Edit - in your configuration you have a name server IP of 192.168.99.251 but that IP is not in use on the router and I didn't think you had any other DNS servers ?

Jon

Jon,

 

Thanks for all the help, ideas, and suggestions. You've been a big help.

 

Actually, I wondered about that as well. It's obvious that the default router is an IP address attached to an interface on said router, but aside from saying that the dns-server is an IP address, what else do you do to make the router itself use that given IP address like an Virtual interface?

Since I'm up against a hard deadline I've reverted to using a Windows Server as an external dns. Should be finished by mid-morning tomorrow, then I can puzzle out what went awry with my router design/plan/build.

Review Cisco Networking for a $25 gift card