How to configure DHCP server on Aruba switches
The configuration of DHCP server on Aruba switches is pretty similar to the configuration of DHCP server on Cisco switches, except that Aruba switches require dhcp-server explicitly enabled on an interface.
First, we have to configure L3 interface on our switch, the snippet below shows how to assign IP address(192.168.1.1) to VLAN 1. Now that our switch has L3 interface it can listen for DHCP requests on VLAN 1 interface.
Make sure that you have dhcp-server command applied to your VLAN interface configuration, otherwise the switch won’t listen for any DHCP requests.
vlan 1 name "User_VLAN" untagged 1/3 ip address 192.168.1.1 255.255.255.0 dhcp-server exit
The next step is to configure the DHCP pool itself, most common DHCP server settings are:
- default-router – DHCP client will use this IP address as a default gateway
- dns-server – you can specify several comma separated DNS server IP addresses
- lease – the lease time for the DHCP pool in dd-hh-mm format
- network – network IP address
- range – DHCP clients will get IP addresses from this range
The last command dhcp-server enable enables DHCP server on the switch globally.
dhcp-server pool "user-pool" default-router "192.168.1.1" dns-server "220.127.116.11,18.104.22.168" lease 00:12:00 network 192.168.1.0 255.255.255.0 range 192.168.1.10 192.168.1.20 exit dhcp-server enable
Now the DHCP server on your Aruba switch should work!