10

I am working on a Cisco L3 switch where most of SVIs are having ip helper-address configured for DHCP relay but also a couple of DHCP pools have been configured in the switch itself to serve dynamic addresses to a couple of VLANs.

I'm planning some changes where I would like to disable only one of the DHCP pools in the switch. So far, I have read about the following options related to disabling DHCP in IOS:

  • Adding no service dhcp in global config: not suitable for my scenario, as it would disable all DHCP relay and all DHCP pools.
  • Deleting configuration for the pool to be disabled: this would work in my scenario but I would like to keep the pool configuration in running config, just in case I need to rollback the change.

So my question is: for an IOS based device, is there a way to disable a single DHCP pool while keeping the pool configuration in running config? Something like shutdown for an interface?

  • What about an ACL that blocks DHCP on the SVI? – Mike Pennington Jul 20 '13 at 10:58
  • ACL to block DHCP on SVI would probably work , but I would like a more straight way to disable the pool. – Daniel Yuste Aroca Jul 20 '13 at 20:28
14

Well, one way to do this would be to exclude the entire pool from assignment. This would leave the configuration of the pool in there and you would just remove the exclusion if you wanted it to assign addresses again.

ip dhcp excluded-address <first address> <last address>

However, I would just archive a copy of the config and remove the pool.

4

You could create dummy VRF and associate the pool to that VRF. Not exactly clean solution, but seems to satisfy your requirement.

ip vrf NO_DHCP
  rd 1:1
!
ip dhcp pool foo
  vrf NO_DHCP
  • trying to remember off the top of my head...but I believe, if you were to add the VRF name into the dhcp pool - it will actually remove the network statement, much like when an interface – knotseh Jul 19 '13 at 19:05
  • @hestonk at least not on 15.2(3)T3 – ytti Jul 19 '13 at 19:07
1

It's not quite what you wanted, but you could also remove the 'network ...' statement from the pool.

0

That is what I do, removing only the network statement, leaving all the other options in. When I need to switch over to this DHCP, I add back in just the network statement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.