The Ip Dhcp Pool [Pool Name] Cisco command

The ‘ip dhcp pool [pool name]’ command in Cisco networking is used to create a DHCP (Dynamic Host Configuration Protocol) pool on a Cisco router or switch. A DHCP pool is a range of IP addresses that can be dynamically assigned to DHCP clients on a network.

This command is typically used in conjunction with the ‘ip dhcp excluded-address’ command, which allows you to exclude a range of IP addresses from the DHCP pool. This ensures that those IP addresses cannot be assigned to DHCP clients.

The ‘ip dhcp’ command can be used on a variety of Cisco equipment, including routers, switches, and wireless access points. However, the specific syntax of the command may vary depending on the device.

To use the ‘ip dhcp pool [pool name]’ command, you must first enter the ‘configure terminal’ mode. Once in configure terminal mode, you can use the ‘ip dhcp pool [pool name]’ command to create a DHCP pool.

The following is an example of how to use the ‘ip dhcp pool [pool name]’ command:

R1(config)# ip dhcp pool POOL1
R1(config-dhcp-pool)# network 192.168.1.0 255.255.255.0
R1(config-dhcp-pool)# default-router 192.168.1.1
R1(config-dhcp-pool)# dns-server 8.8.8.8
R1(config-dhcp-pool)# lease 24

The ‘network’ keyword specifies the IP address range of the DHCP pool. The ‘default-router’ keyword specifies the default gateway for the DHCP clients in the pool. The ‘dns-server’ keyword specifies the IP address of the DNS server that the DHCP clients will use. The ‘lease’ keyword specifies the length of time (in hours) that the DHCP clients will lease the IP address for.

Once you have created a DHCP pool, you must activate it using the ‘ip dhcp pool POOL1 active’ command. This command will start the DHCP server on the device and allow it to assign IP addresses to DHCP clients.

The ‘ip dhcp pool [pool name]’ command is a powerful tool that can be used to configure a DHCP server on a Cisco device. By using this command, you can easily create and manage DHCP pools and provide IP addresses to DHCP clients on your network.

ip dhcp pool [pool name] Usage Examples

The Cisco command “ip dhcp pool [pool name]” is used to configure a DHCP pool on a Cisco router or switch. The [pool name] argument specifies the name of the DHCP pool.

Example 1: Create a DHCP Pool

The following command creates a DHCP pool named “default” with a network address of 192.168.1.0, a subnet mask of 255.255.255.0, and a range of IP addresses from 192.168.1.10 to 192.168.1.254:

ip dhcp pool default
network 192.168.1.0
netmask 255.255.255.0
range 192.168.1.10 192.168.1.254

Example 2: Set Default Gateway and DNS Server

The following command sets the default gateway and DNS server for the “default” DHCP pool:

ip dhcp pool default
default-router 192.168.1.1
dns-server 8.8.8.8

Example 3: Activate DHCP Pool

The following command activates the “default” DHCP pool:

ip dhcp pool default
enable

Example 4: Display DHCP Pool Configuration

The following command displays the configuration of the “default” DHCP pool:

show ip dhcp pool default

Output:

DHCP pool default
  Network: 192.168.1.0
  Netmask: 255.255.255.0
  Range: 192.168.1.10 - 192.168.1.254
  Default router: 192.168.1.1
  DNS server: 8.8.8.8
  Lease time: 86400 seconds
  Renewal time: 43200 seconds
  Rebinding time: 37800 seconds
  Idle time: 172800 seconds
  Pool statistics:
    Leases allocated: 0
    Leases active: 0
    Leases expired: 0
    Leases declined: 0
    Leases offered: 0

Example 5: Remove DHCP Pool

The following command removes the “default” DHCP pool:

no ip dhcp pool default

Leave a Reply

Your email address will not be published. Required fields are marked *