Which dhcp setting is used to exclude ip address from dhcp configuration

To create an excluded pool and to prevent DHCP server from assigning certain addresses to DHCP clients, use the command ip dhcp excluded-address in Global Configuration Mode. The no form of the command deletes the created excluded pool. This command is a complete standardized implementation of the existing command and operates similar to that of the command excluded-address. This command is used to exclude a single IP address or a range of IP addresses.

ip dhcp excluded-address

ip dhcp excluded-address { <low-address> } { <high-address> }

ip dhcp excluded-address

no ip dhcp excluded-address { <low-address> } { <high-address> }

Parameters

ParameterTypeDescription
<low-address> Integer Enter to set the start IP address for an excluded pool. This address denotes the first IP address of a range of IP addresses which needs to be excluded from the created subnet pool. This IP address should be:
  • lower than the end IP address, and
  • in the same network of the subnet pool’s start IP address.
<high-address>   Enter to set the end IP address for an excluded pool. This address denotes the last IP address of a range of IP addresses which needs to be excluded from the created subnet pool. This IP address should be:
  • high than the start IP address, and within or equal to the subnet pool’s end IP address

Mode

Global Configuration Mode

Prerequisites

  • Subnet pool should have been created before creating an excluded pool. This excluded pool should be within the range of the created subnet pool.
  • For example, the excluded pool 20.0.0.20 – 20.0.0.30 created using this command is within the already created subnet pool 20.0.0.0 – 20.0.0.100.

Examples

iS5comm(config)# ip dhcp excluded-address 20.0.0.20 20.0.0.30

Configure DHCP server on Cisco devices

DHCP is widely used in LAN environments to dynamically assign host IP addresses from a centralized server, which significantly reduces the overhead of administration of IP addresses. DHCP also helps conserve the limited IP address space because IP addresses no longer need to be permanently assigned to hosts; only those hosts that are connected to the network consume IP addresses. The DHCP server assigns IP addresses from specified address pools on a router or router to DHCP clients and manages them.

In this article, you will learn how to configure Cisco Router as DHCP server using CLI and to update it on multiple devices simultaneously in NCM application using configlets. If you don't have NCM installed, please click here to download and install the application.

Steps to configure DHCP server through CLI.

  1. Login to the device using SSH / TELNET and go to enable mode.

  2. Go into the config mode.
    Router#configure terminal
    Enter configuration commands, one per line. End with CNTL/Z. 
    Router(config)#

  3. Exclude IP addresses from being assigned by DHCP by using the ip dhcp excluded-address FIRST_IP LAST_IP
    Router(config)#ip dhcp excluded-address 192.168.0.1 192.168.0.50
    Router(config)#

  4. Create a new DHCP pool with the ip dhcp pool NAME command
    Router(config)#ip dhcp pool Floor1DHCP
    Router(dhcp-config)#

  5. Define a subnet that will be used to assign IP addresses to hosts with the network SUBNET SUBNET_MASK command.
    Router(dhcp-config)#network 192.168.0.0 255.255.255.0
    Router(dhcp-config)#

  6. Define the default gateway with the default-router IP command
    Router(dhcp-config)#default-router 192.168.0.1
    Router(dhcp-config)#

  7. Define the DNS server with the dns-server IP address command.
    Router(dhcp-config)#dns-server 192.168.0.1
    Router(dhcp-config)#

  8. Return to privilege config mode
    Router(dhcp-config)#exit
    Router(config)#

  9. Enable DHCP server on the interface using service dhcp interface-type number command
    Router(config)#service dhcp vlan1
    Router(config)#

  10. Exit config mode
    Router(config)#exit
    Router#

  11. To view information about the currently leased addresses, you can use the show ip dhcp binding command
    Router#show ip dhcp binding
    IP address Client-ID/ Lease expiration Type
    Hardware address
    192.168.0.51 0060.5C2B.3DCC -- Automatic

    In the output above you can see that there is a single DHCP client that was assigned the IP address of 192.168.0.51. Since we’ve excluded the IP addresses from the 192.168.0.1 – 192.168.0.50 range, the device got the first address available – 192.168.0.51.


  12. To display information about the configured DHCP pools, you can use the show ip dhcp pool command
    Router#show ip dhcp pool
    Pool Floor1DHCP :
    Utilization mark (high/low) : 100 / 0
    Subnet size (first/next) : 0 / 0
    Total addresses : 254
    Leased addresses : 1
    Excluded addresses : 1
    Pending event : none

    1 subnet is currently in the pool
    Current index IP address range Leased/Excluded/Total
    192.168.0.1 192.168.0.1 - 192.168.0.254 1 / 1 / 254

    This command displays some important information about the DHCP pool(s) configured on the device – the pool name, total number of IP addresses, the number of leased and excluded addresses, subnet’s IP range, etc.


  13. Copy the running configuration into startup configuration using below command
    Router#write memory
    Building configuration... [OK]
    Router#

Corresponding configlet can be created in NCM application as shown in below screenshot. 

Which dhcp setting is used to exclude ip address from dhcp configuration

Also you can click the below button to download the Configlet as XML and import it into NCM application using file import option.

Configlet NameConfigure DHCP Server Cisco
Description Script execution mode
Execution Mode This article is about how to configure Cisco Router as DHCP server using CLI and how to update on multiple devices simultaneously in NCM application using configlets.
Configlet Content

configure terminal
ip dhcp excluded-address $EXCLUDE_FIRST_IP $EXCLUDE_LAST_IP
ip dhcp pool $MY_POOL_NAME
network $SUBNET $SUBNET_MASK
default-router $DEFAULT_ROUTER_IP
dns-server $DNS_SERVER_IP
exit
service dhcp $INTERFACE_TYPE_NUMBER
exit
show ip dhcp binding
show ip dhcp pool
write memory

How do I find DHCP excluded

1 Answer. Show activity on this post. From the relevant device, try show ip dhcp pool . To show exclusions, try show run | i excluded-addresses .

What is IP exclusion in DHCP?

An exclusion is an address or range of addresses taken from a DHCP scope that the DHCP server is not allowed to hand out. For example, if you have set a DHCP server to exclude the address range 192.168. 0.1-192.168. 0.10 then the only way a computer on your network would get an address of 192.168.

Which command used in excluded IP address in DHCP router configuration?

Exclude IP addresses from being assigned by DHCP by using the ip dhcp excluded-address FIRST_IP LAST_IP. Create a new DHCP pool with the ip dhcp pool NAME command. Define a subnet that will be used to assign IP addresses to hosts with the network SUBNET SUBNET_MASK command.

Which command is used to avoid a fixed IP address in DHCP?

Marking IP Addresses Unusable by the DHCP Service You can use the pntadm -M command with the -f UNUSABLE option to mark addresses unusable using the command line.