cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7561
Views
0
Helpful
3
Replies

How to Exclude x No. of IP Addresses from the DHCP Pool

hamood.syed
Level 1
Level 1

Depending on the current DHCP pool, how could i exclude some IP addresses from the DHCP pool
!
!
!
ip dhcp pool DHCP
   network 192.168.0.0 255.255.255.0
   default-router 192.168.0.250
   dns-server 192.168.0.250 192.168.0.1 xx.xx.xx.xx xx.xx.xx.xx
!
!

 

Regards,

 

 

Hamood

3 Replies 3

Michal Bruncko
Level 4
Level 4

Hi Hamood

you can exclude selective IP address or range of addresses at once. for this purpose command "ip dhcp excluded-address" needs to be used.

For example excluding single IP 192.168.0.1:

Router(config)# ip dhcp excluded-address 192.168.0.1

Or excluding an range of addresses at once:

Router(config)# ip dhcp excluded-address 192.168.0.1 192.168.1.10

More information you can find out on following documentation.

Thanks Michal,

 

That was helpful, but how to reserve the selected IP address for specific machine / device. so that ip would be only used for that device.

 

Appreciate you kind support.

 

Regards

> how to reserve the selected IP address for specific machine / device

you have to create dedicated pool per device, example:

Router(config)# ip dhcp pool Client1
Router(dhcp-config)# host 192.168.0.13 255.255.255.0
Router(dhcp-config)# client-identifier unique-identifier

Last command specifies the unique identifier for DHCP clients. This command is used for DHCP requests. DHCP clients require client identifiers. The unique identification of the client is specified in dotted hexadecimal notation, for example, 01b7.0813.8811.66, where 01 represents the Ethernet media type. More about this can be found here.