cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
25320
Views
10
Helpful
0
Comments

 

 

Introduction

How to configure Aironet devices to act as a DHCP server

Solution

By default, autonomous access points are configured to receive IP settings from a DHCP server on your network. You can also configure an access point to act as a DHCP server to assign IP settings to devices on both your wired and wireless LANs.

Beginning in privileged EXEC mode, follow these steps to configure an access point to provide DHCP service and specify a default router:

Step 1: Enter global configuration mode on the Access Point.

Step 2: Exclude the wireless device's IP address from the range of addresses the wireless device assigns. Enter the IP address in four groups of characters, such as 10.91.6.158.

The wireless device assumes that all IP addresses in a DHCP address pool subnet are available for assigning to DHCP clients. You must specify the IP addresses that the DHCP Server should not assign to clients.

To enter a range of excluded addresses, enter the address at the low end of the range followed by the address at the high end of the range.

ip dhcp excluded-address [low_address] [ high_address ]

Excluding IP Addresses

The DHCP Server assumes that all IP addresses in a DHCP address pool subnet are available for assigning to DHCP clients. You must specify the IP address that the DHCP Server should not assign to clients. To do so, use the following command in global configuration mode.

 

Command

 

Purpose

Router(config)# ip dhcp excluded-addresslow-address [high-address]

Specifies the IP addresses that the DHCP Server should not assign to DHCP clients.

 

Step 3: Create a name for the pool of IP addresses that the wireless device assigns in response to DHCP requests, and enter DHCP configuration mode.

ip dhcp pool [pool_name]

Configuring a DHCP Address Pool

You can configure a DHCP address pool with a name that is a symbolic string (such as "engineering") or an integer (such as 0). Configuring a DHCP address pool also places you in DHCP pool configuration mode—identified by the (dhcp-config)# prompt—from which you can configure pool parameters (for example, the IP subnet number and default router list). To configure a DHCP address pool, complete the required tasks in the following sections.

Configuring the DHCP Address Pool Name and Entering DHCP Pool Configuration Mode

To configure the DHCP address pool name and enter DHCP pool configuration mode, use the following command in global configuration mode:

 

Command

 

Purpose

Router(config)# ip dhcp pool name

Creates a name for the DHCP Server address pool and places you in DHCP pool configuration mode (identified by the dhcp-config# prompt).

 

Step 4: Assign the subnet number for the address pool. The wireless device assigns IP addresses within this subnet.

Assign a subnet mask for the address pool, or specify the number of bits that comprise the address prefix. The prefix is an alternative way of assigning the network mask. The prefix length must be preceded by a forward slash (/).

network subnet_number [ mask | prefix-length ]

Configuring the DHCP Address Pool Subnet and Mask

To configure a subnet and mask for the newly created DHCP address pool, which contains the range of available IP addresses that the DHCP Server may assign to clients, use the following command in DHCP pool configuration mode:

 

command

 

Purpose

Router(dhcp-config)#network network-number[mask | /prefix-length]

Specifies the subnet network number and mask of the DHCP address pool.The prefix length specifies the number of bits that comprise the address prefix. The prefix is an alternative way of specifying the network mask of the client. The prefix length must be preceded by a forward slash (/).

 

Note You can not configure manual bindings within the same pool that is configured with the network command. To configure manual bindings, see the "Configuring Manual Bindings" section.

Step 5: Configure the duration of the lease for IP addresses assigned by the wireless device.

  • days—configure the lease duration in number of days
  • hours—configure the lease duration in number of hours
  • minutes—configure the lease duration in number of minutes
    • infinite—set the lease duration to infinite

 

     
lease { days [ hours ] [ minutes ] | infinite 

Step 6: Specify the IP address of the default router for DHCP clients on the subnet. One IP address is required; however, you can specify up to eight addresses in one command line.

default-router address [address2 ... address 8] end

This example shows how to configure the wireless device as a DHCP server, exclude a range of IP address, and assign a default router:

AP# configure terminal
AP(config)# ip dhcp excluded-address 172.16.1.1 172.16.1.20
AP(config)# ip dhcp pool wishbone
AP(dhcp-config)# network 172.16.1.0 255.255.255.0
AP(dhcp-config)# lease 10
AP(dhcp-config)# default-router 172.16.1.1
AP(dhcp-config)# end

Show Commands

In Exec mode, enter the commands in Table 5-2 to display information about the wireless device as DHCP server.

Table 5-2 Show Commands for DHCP Server

 

Command

Purpose

show ip dhcp conflict [address ]

Displays a list of all address conflicts recorded by a specific DHCP Server. Enter the wireless device IP address to show conflicts recorded by the wireless device.

show ip dhcp database [url ]

Displays recent activity on the DHCP database.

Note Use this command in privileged EXEC mode.

show ip dhcp server statistics

Displays count information about server statistics and messages sent and received.

 

Clear Commands

In privileged Exec mode, use the commands in Table 5-3 to clear DHCP server variables.

Table 5-3 Clear Commands for DHCP ServerCommand

Command

Purpose

clear ip dhcp binding 
address | * }

Deletes an automatic address binding from the DHCP database. Specifying the address argument clears the automatic binding for a specific (client) IP address. Specifying an asterisk (*) clears all automatic bindings.

clear ip dhcp conflict 
address | * }

Clears an address conflict from the DHCP database. Specifying the address argument clears the conflict for a specific IP address. Specifying an asterisk (*) clears conflicts for all addresses.

clear ip dhcp server statistics

Resets all DHCP Server counters to 0.

 

 

Debug Command

To enable DHCP server debugging, use this command in privileged EXEC mode:

debug ip dhcp server { events | packets | linkage }

Use the no form of the command to disable debugging for the wireless device DHCP server.

Reference

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: