In Some situation we might need to assign a Static IP address to specific devices(Like RADIUS server, WEB server or Media Server). Instead of assigning static IP address, Mobility Access Switch provides support for assigning a fixed IP address for a specific device using DHCP based on the MAC address of the device.
We can configure the IP address for a device from a locally configured DHCP pool using the CLI.
Limitations:
- If there are more than 498 DHCP reservations, the output of the show ip dhcp pool <poolname> command does not display anything.
- When the number of DHCP reservations exceeds 695 the leased IPs are not displayed in the output of the show ip dhcp reserved command .
- After a system switchover, the list of DHCP reservations do not appear in the output of the show ip dhcp reserved command .
Environment:
A Mobility access switch network with specific devices like RADIUS server, WEB server or Media Server or any device where we need to reserve with fixed IP address.
Configuring DHCP Device Reservation:
Use the following CLI command to configure a specific IP to a device:
(host) (config) #service dhcp
(host) (service dhcp) #exit
(host) (config) #ip dhcp pool <pool>
(host) (dhcp server profile "<pool>") #network <address> <mask>
(host) (dhcp server profile "<pool>") #hardware-address <mac-address> ip-address <address>
(host) (dhcp server profile "<pool>") #exit
(host) (config) #interface vlan <id>
(host) (vlan "<id>") #ip address <addr> <mask>
(host) (vlan "<id>") #no shut
Sample Configuration:
(host) #configure terminal
(host) (config) #service dhcp
(host) (service dhcp) #exit
(host) (config) #ip dhcp pool pool_4
(host) (dhcp server profile "pool_4") #network 4.4.4.0 255.255.255.0
(host) (dhcp server profile "pool_4") #hardware-address 00:00:ac:07:01:13 ip-address 4.4.4.2
(host) (dhcp server profile "pool_4") #hardware-address 00:00:ac:07:01:14 ip-address 4.4.4.3
(host) (dhcp server profile "pool_4") #hardware-address 00:00:ac:07:01:15 ip-address 4.4.4.4
(host) (dhcp server profile "pool_4") #exit
(host) (config) #interface vlan 4
(host) (vlan "4") #ip address 4.4.4.1 255.255.255.0
(host) (vlan "4") #no shut
Verifying DHCP Reservation Configuration:
Use the following command to view a configured DHCP pool with device reservations:
(host) #show ip dhcp pool pool_4
dhcp server profile "pool_4"
----------------------------
Parameter Value
--------- -----
Domain name for the pool N/A
DHCP server pool 4.4.4.0/255.255.255.0
DHCP pool lease time 0 days 12 hr 0 min 0 sec
Vendor Class Identifier ArubaAP
DHCP default router address N/A
Configure DNS servers N/A
Configure netbios name servers N/A
DHCP Option N/A
Exclude address N/A
Device reservation 00:00:ac:07:01:13 4.4.4.2
Device reservation 00:00:ac:07:01:14 4.4.4.3
Device reservation 00:00:ac:07:01:15 4.4.4.4
Use the following command to view the DHCP reserved IP assigned to the device:
(host) #show ip dhcp reserved
DHCP Server Device Reservation Information
------------------------------------------
Vlan Hardware Address Reserved IP Address
---- ---------------- -------------------
4 00:00:ac:07:01:14 4.4.4.3
4 00:00:ac:07:01:13 4.4.4.2