Configuring DHCP Server Exclusion Range

When configuring a DHCP pool you must specify the network and subnet for the IP address pool. But what if you need to exclude some IP addresses from being allocated? This lab will discuss and demonstrate the configuration and verification of ios dhcp server exclusion ranges

Real World Application & Core Knowledge

However when you specified a network in the DHCP pool you’ll notice that the router would use the entire network to provide DHCP addresses and start with the lowest IP address available first. In many cases this would not suit the needs of network engineers who need to specify a range of ip addresses in a network to be statically configured only. For example, many networks that use a /24 netmask will carve out the first and last 25 IP addresses of the subnet for administrative and static use only. In this case only addresses .26 through .229 would be usable thus giving you 204 DHCP addresses to be used with PC’s on the network segment.

By default the Cisco IOS Server does not carve out any IP addresses in the DHCP Pools network. To do this you’ll need to configure an exclusion range to prevent the DHCP server from handing out IP Addresses in a specified range that fall in the network statement of a DHCP pool.

To specify an exclusion range you’ll use the ip dhcp exclusion s.s.s.s e.e.e.e whereas the s.s.s.s is the starting ip address and the e.e.e.e is the ending ip address of the range.

To clear the DHCP IP address from an Ethernet interface you can bounce the interface by shutting it down and waiting 10 seconds and bringing it back up or you can configure the interface to have no ip address then wait 10 seconds and configure the interface to have a DHCP IP Address again thus forcing the router to send a dhcp request.

As shown above in the syslog messages, you see that the FastEthernet0/0 interface on R2 has now obtained the 10.115.10.26 DHCP IP address which is the first address available outside of the excluded ranges configured in objective 1.