Command
IP dhcp excluded-address
Use
This command prevents IP addresses from being assigned by the router’s DHCP server. This is used to prevent IP conflicts with statically assigned servers and routers.
Syntax
Router(config)#ip dhcp excluded-address <low IP> <high IP>
Example
In the below example we will configure R2 to provide DHCP services for R1, but we will ensure that nothing under 10.1.1.100 will be assigned.
First we configure the DHCP server with ip dhcp pool and exclude the ip addresses.
R2(config)#ip dhcp pool R1_Pool |
Currently R1’s Fa0/0 does not have an IP address
R1(config-if)#do show ip interface brief | ex unass |
After we configure ip address dhcp on R1’s Fa0/0, it receives an IP address of 10.1.1.1
R1(config)#int fa0/0 R1(config-if)# R1(config-if)# |