Lab 11-5 - Configuring DHCP Server Exclusion Range

Real World Application & Core Knowledge

If you’ve completed Lab 11-4 – Configuring the Cisco IOS DHCP Server then you should have a general understanding on how to configure the Cisco IOS DHCP Server.

However when you specified a network in the DHCP pool you’ll notice that the router would use the entire network to provide DHCP addresses and start with the lowest IP address available first. In many cases this would not suit the needs of network engineers who need to specify a range of ip addresses in a network to be statically configured only. For example, many networks that use a /24 netmask will carve out the first and last 25 IP addresses of the subnet for administrative and static use only. In this case only addresses .26 through .229 would be usable thus giving you 204 DHCP addresses to be used with PC’s on the network segment.

By default the Cisco IOS Server does not carve out any IP addresses in the DHCP Pools network. To do this you’ll need to configure an exclusion range to prevent the DHCP server from handing out IP Addresses in a specified range that fall in the network statement of a DHCP pool.

To specify an exclusion range you’ll use the ip dhcp exclusion s.s.s.s e.e.e.e whereas the s.s.s.s is the starting ip address and the e.e.e.e is the ending ip address of the range.

In this lab you’ll continue where you left on with 11-4 – Configuring the Cisco IOS DHCP Server and configure an exclusion range for the first and last 25 IP addresses of the 10.115.10.0/24 network.

Please review the following command(s) listed below;

Command Description
ip dhcp exclusion s.s.s.s e.e.e.e This command is executed in global configuration mode to specify an IP DHCP exclusion range whereas s.s.s.s is the starting IP Address and e.e.e.e is the ending IP address of the range.

This lab will use the same logical topology as Lab 11-5 however the IP Addressing has changed as shown below;

Lab Prerequisites

  • If you are using GNS3 than load the Free CCNA Workbook GNS3 topology than start devices; R1, R2 and SW1
  • Establish a console session with devices R1, R2 and SW1 than load the initial configurations provided below by copying the config from the textbox and pasting it into the respected routers console.

Lab Objectives

  • Create a IP DHCP Exclusion range to exclude the first and last 25 IP addresses of the 10.115.10.0/24 network on R1.
  • Verify your configuration by renewing the IP address on R2′s FastEthernet0/0 interface.

Lab Instruction

Objective 1. – Create a IP DHCP Exclusion range to exclude the first and last 25 IP addresses of the 10.115.10.0/24 network on R1.

R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#ip dhcp excluded-address 10.115.10.1 10.115.10.25
R1(config)#ip dhcp excluded-address 10.115.10.229 10.115.10.254
R1(config)#end
R1#
%SYS-5-CONFIG_I: Configured from console by console
R1#

Objective 2. – Verify your configuration by renewing the IP address on R2′s FastEthernet0/0 interface.

To clear the DHCP IP address from an Ethernet interface you can bounce the interface by shutting it down and waiting 10 seconds and bringing it back up or you can configure the interface to have no ip address then wait 10 seconds and configure the interface to have a DHCP IP Address again thus forcing the router to send a dhcp request.

R2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#interface FastEthernet0/0
R2(config-if)#no ip address
R2(config-if)#ip address dhcp
R2(config-if)#end
R2#
%SYS-5-CONFIG_I: Configured from console by console
R2#
%DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned DHCP
address 10.115.10.26, mask 255.255.255.0, hostname R2

R2#

As shown above in the syslog messages, you see that the FastEthernet0/0 interface on R2 has now obtained the 10.115.10.26 DHCP IP address which is the first address available outside of the excluded ranges configured in objective 1.