02-04-2017 01:18 PM - edited 03-08-2019 09:11 AM
Hello, I have seen a router configured with the following DHCP scope:
ip dhcp pool vlan10
network 10.20.90.0 255.255.255.0
default-router 10.20.90.1
I queried the admin about why there was no DNS entries. He said the the following provided DNS to the DHCP clients.
ip name-server 10.2.4.3
ip name-server 10.2.4.4
I thought 'ip name-server' entries were only for the router itself. Is there any possible way that 'ip name-server' can provide DNS servers to clients accessing the DHCP scope ?
Solved! Go to Solution.
02-04-2017 01:35 PM
Hi,
That is correct. That is for the router only.
If you want the router to assign dns to clients you need this config
ip dhcp pool vlan10
network 10.20.90.0 255.255.255.0
default-router 10.20.90.1
dns-server 8.8.8.8
HTTH
02-04-2017 01:35 PM
Hi,
That is correct. That is for the router only.
If you want the router to assign dns to clients you need this config
ip dhcp pool vlan10
network 10.20.90.0 255.255.255.0
default-router 10.20.90.1
dns-server 8.8.8.8
HTTH
02-04-2017 03:46 PM
Hi
As Reza mentioned below you can configure the dhcp pool to provide DNS servers to the hosts:
ip dhcp pool vlan10
dns-server <DNS IP #1> <DNS IP #2> <DNS IP #3>
Additional, remember to exclude the gateway from the dhcp scope, it is not related to the config above but it is good practice :-)
ip dhcp excluded-address 10.20.90.1 10.20.90.1 (assuming your gateway is IP .1)
02-04-2017 03:59 PM
Hello
Just like to add - if you receiving dhcp from your ISP you could also use their dns in your own dhcp pools, via importing the ISP's dhcp options for your clients.
ip dhcp pool xxx
network 10.20.90.0 255.255.255.0
default-router 10.20.90.1
import all
res
Paul
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