cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
27371
Views
36
Helpful
10
Replies

Changing Existing DHCP DNS Servers

leeharding1985
Level 1
Level 1

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

2 Accepted Solutions

Accepted Solutions

Latchum Naidu
VIP Alumni
VIP Alumni

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.

View solution in original post

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.

View solution in original post

10 Replies 10

Latchum Naidu
VIP Alumni
VIP Alumni

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.

Thank you!

Completed after ive done the following copy running-config startup-config

Is that all I need to do?

Thanks

Lee

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.

Superb. I've rated. thanks for your help

Lee

You are most welcome Lee..... :-)

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

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

Thanks Jon!

Is there any recommended things I have to do before or after making the changes.

Thanks,

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

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.

 

Getting Started

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: