ip dhcp excluded-address
ip dhcp excluded-address
The ip dhcp excluded-address command is used to exclude certain IP addresses from being assigned to DHCP clients by the DHCP server service on a Cisco IOS device.
The format of the command is as follows:
ip dhcp excluded-address <start address> [<end address>]
The command can be used to exclude a single IP address at a time, or an entire range of IP addresses at a time.
In the following example, we create two dhcp pools and exclude a number of addresses from each pool:
In the example above we created two DHCP pools. One pool for the subnet 192.168.0.0/24 and the other pool for the subnet 172.16.1.0/24.
For the subnet 192.168.0.0/24 we excluded:
- the range of IP addresses from 192.168.0.0 to 192.168.0.10
- the single IP address from 192.168.0.50
- the range of IP addresses from 192.168.0.200 to 192.168.0.254
For the subnet 172.16.1.0/24 we excluded:
- the range of IP addresses from 172.16.1.0 to 172.16.1.10
- the single IP address 172.16.1.50
- the single IP address 172.16.1.100
In what configuration context are the excluded-addresses defined?
On most server-based DHCP server applications (such as a Windows DHCP server), the range of addresses to be excluded from a DHCP pool (or scope) is defined within the context of each scope.
However, in the case of Cisco IOS devices, the excluded addresses are defined in the Global configuration context, and not defined under each pool. (This is a common mistake while trying to configure excluded addresses on Cisco IOS.)
On Cisco IOS, we need to exit the DHCP configuration mode if we want to see the "excluded-address" option under the context-sensitive help. We define a global list of addresses to be excluded and the DHCP server service checks against the global list before assigning addresses for any specific pool.
DHCP, DNS and NAT are covered extensively in the following interactive course: Course 6 - IP Services. The course features visual, animated explanations and hands-on interactive labs.
Want to test your networking skills with hands-on configuration and troubleshooting questions? Try out the Workshops section of this website here: Workshops (Login required).
Read how to use the device simulators on this website here: Workshops - General Instructions