DNS for clients using static IP addresses

Answered Question
Oct 24th, 2007

Hi,

I am a newbie to Cisco routers and have a basic question:

I am using a dhcp pool to assign DHCP addresses to clients. The DHCP clients also automatically get assigned the DNS server by the router and DNS resolution works fine. However if I have a server that I want to assign a static address to, if I assign it the routers address as the gateway and DNS server then it is unable to do DNS resolution. If I use the "ip dns server" command then this starts working.


My question is what is the best practice for dealing with DNS for static clients? Should I be assigning the same DNS servers directly to the static clients that I am using as name-servers in the router or should I be doing something else (such as ip dns server)?

Thanks

Correct Answer by sundar.palaniappan about 9 years 4 months ago

Farah,


Your option 1 is the better choice.


If you want to go with option 2 for configuration ease on the clients then the router is getting burdened with additional task of relaying DNS requests to the actual server. This setup would result in use of more CPU cycles on the router for processing DNS requests when the clients could unicast directly with the server for name resolution.



HTH


Sundar

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Richard Burts Wed, 10/24/2007 - 13:01

Farah


It is my understanding of best practice to assign the DNS on clients with static address to be the same as the DNS assigned to clients by DHCP.


HTH


Rick

farahs123456 Wed, 10/24/2007 - 13:17

Thanks for your response Rick.


So lets say my router is 192.168.1.1. In the setup of the static clients I will be using 192.168.1.1 as the gateway but should I be using the actual DNS server addresses for the DNS and not the router address here?


I was wondering if it was cleaner to use the router address as both the gateway and DNS even for static clients. This of course would require the use of ip dns server int he router.

Richard Burts Wed, 10/24/2007 - 13:32

Farah


I believe that it is best if the clients with static addresses are configured with the same addresses for DNS as the clients get from DHCP. I see no good reason to have the DHCP clients be configured with one set of addresses for DNS and for clients with static addresses to be configured with different addresses. Why would you want them configured differently?


HTH


Rick

farahs123456 Wed, 10/24/2007 - 14:32

Rick,


I want to use the same DNS for both DHCP and static clients as I agree it makes no sense to have different DNS servers for the two.


I have two options it seems for configuring DNS for static clients:


1. Specify the DNS servers on the static client side. These will be the same DNS servers that the router assigns to DHCP clients.


or,

2. Use the router address as the DNS server on the static client and then in the router use "ip dns server" to enable dns proxy.


It seems to me that going with option 2 is perhaps cleaner since one needs to specify the DNS servers only in the router and not also in static clients. However, I am unclear on what the drawbacks are of enabling the DNS proxy in the router.


Thanks,

Farah





Correct Answer
sundar.palaniappan Wed, 10/24/2007 - 15:37

Farah,


Your option 1 is the better choice.


If you want to go with option 2 for configuration ease on the clients then the router is getting burdened with additional task of relaying DNS requests to the actual server. This setup would result in use of more CPU cycles on the router for processing DNS requests when the clients could unicast directly with the server for name resolution.



HTH


Sundar

Actions

This Discussion