10-13-2011 04:06 AM - edited 03-07-2019 02:47 AM
Hi All,
Complete Newbie when it comes to Cisco command line routers, trying to learn though...
Can someone give me a quick lesson on how to change the existing DNS Servers within DHCP please on a Cisco 800 series?
Config is as follows:
ip dhcp pool DHCP-POOL
import all
network 192.168.18.0 255.255.255.0
default-router 192.168.18.254
dns-server 192.168.10.2 83.256.23.424
domain-name XXXX
netbios-name-server 192.168.10.2
I wish to remove 83.256.23.424 and replace it with another DNS server
thank you
Lee
Solved! Go to Solution.
10-13-2011 04:28 AM
Hi Lee,
You can do that like below...
Router(config)# ip dhcp pool DHCP-POOL
Router(config-dhcp)# no dns-server 192.168.10.2 83.256.23.424
Router(config-dhcp)# dns-server 192.168.10.2 "another DNS server IP"
Router(config-dhcp)# exit
Please rate the helpful posts.
Regards,
Naidu.
10-13-2011 04:48 AM
Yes... To write the configuration to NVRAM so that if the router get reaload anytime unknowingly the configuration will not loose.
Please rate the helpful posts.
Regards,
Naidu.
10-13-2011 04:28 AM
Hi Lee,
You can do that like below...
Router(config)# ip dhcp pool DHCP-POOL
Router(config-dhcp)# no dns-server 192.168.10.2 83.256.23.424
Router(config-dhcp)# dns-server 192.168.10.2 "another DNS server IP"
Router(config-dhcp)# exit
Please rate the helpful posts.
Regards,
Naidu.
10-13-2011 04:45 AM
Thank you!
Completed after ive done the following copy running-config startup-config
Is that all I need to do?
Thanks
Lee
10-13-2011 04:48 AM
Yes... To write the configuration to NVRAM so that if the router get reaload anytime unknowingly the configuration will not loose.
Please rate the helpful posts.
Regards,
Naidu.
10-13-2011 04:49 AM
Superb. I've rated. thanks for your help
Lee
10-13-2011 04:52 AM
You are most welcome Lee..... :-)
03-06-2024 04:45 AM
Sir newbie here, found this while going through to find solution for my problem.
I wan to extend DHCP
Currently I have,
ip dhcp pool mainpool
network 20.20.20.0 255.255.252.0
default-router 20.20.20.1
dns-server 8.8.8.8
Want to change to
ip dhcp pool mail pool
network 20.20.0.0. 255.255.224.0
default-router 20.20.20.1
dns-server 8.8.8.8
How to I edit?
Thanks
03-06-2024 07:33 AM
Similarly to what @Latchum Naidu mentioned but for the whole pool:
Router(config)#no ip dhcp pool mainpool (to remove the pool that you have)
Router(config)#ip dhcp pool mail pool
Router((config-dhcp))#network 20.20.0.0. 255.255.224.0
Router(config-dhcp)#default-router 20.20.20.1
Router(config-dhcp)#dns-server 8.8.8.8
Kind regards,
Jon
03-06-2024 09:12 PM
Thanks Jon!
Is there any recommended things I have to do before or after making the changes.
Thanks,
03-07-2024 10:46 AM
I would just say that if you would like to reserve specific IP's, then its recommended to do this before you create the pool.
This is to avoid that, if clients are already configured to received IP's from the DHCP server, they might get assigned those IP's.
to perform this do:
Router(config)#ip dhcp excluded-address a.b.c.d (starting address) - for a specific IP
or
Router(config)#ip dhcp excluded-address a.b.c.d (low IP) a.b.c.d (high IP) - for a range.
But then again, you can always reserve them after you create the pool and then do a "clear ip dhcp binding a.b.c.d" command.
Kind regards
03-07-2024 10:50 AM
Oh, forgot to add...
If this is in a production environment, and clients are connected, then you will need to inform them that they will need to renew their leases, otherwise they will keep the old lease until it makes a new request.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: