ProCurve / ProVision-Based
cancel
Showing results for 
Search instead for 
Did you mean: 

How to create DHCP server in 2920 Procurve switch

SOLVED
Go to solution
rka61
Occasional Contributor

How to create DHCP server in 2920 Procurve switch

Hi Can somebody confirm if it is possible to setup a DHCP server on a HP 2920 Procurve switch.

This is a L3 switch and I am used to configuring cisco switches. On a 2960 which is a L2 swtich you can do this is very easily.

 

But on the HP switch I cannot seem to do this. First of all there is no option in the GUI, so I have created a DHCP pool via the CLI but I cannot get the pool to be activated on VLAN 10 "Management"  All I want to acheive is a DHCP pool per VLAN on the switch. I do not know what the DHCP IP address is of the switch? Which VLAN will it listen on.

 

I saw this post but was not sure if it applies to 2920's and if this is the case I cannot beleive you cannot setup DHCP server on the switch. Really simple configuration.

 

Here is a copy of my config.

 

console idle-timeout 900
console idle-timeout serial-usb 900
timesync sntp
sntp unicast
sntp server priority 1 151.236.222.81
no telnet-server
time timezone 60
ip default-gateway 172.18.36.65
snmp-server community "public" unrestricted
snmp-server contact " NTT CSC Support Desk"
oobm
ip address dhcp-bootp
member 1
ip address dhcp-bootp
exit
member 2
ip address dhcp-bootp
exit
exit
vlan 1
name "DEFAULT_VLAN"
no untagged 1/1-1/6,2/1-2/6
untagged 1/7-1/48,1/A1-1/A2,1/B1-1/B2,2/7-2/48,2/A1-2/A2,2/B1-2/B2
no ip address
exit
vlan 10
name "Firewall"
ip address 172.18.36.2 255.255.255.192
exit
vlan 20
name "Management"
untagged 1/1,1/3-1/6,2/1,2/3-2/6
tagged 1/2,2/2
ip address 172.18.36.66 255.255.255.192
exit
vlan 30
 name "Servers"
ip address 172.18.36.130 255.255.255.192
exit
vlan 40
name "Video Conference"
ip address 172.18.36.194 255.255.255.192
exit
vlan 50
name "Office"
ip address 172.18.37.2 255.255.255.128
exit
vlan 60
name "Voice"
ip address 172.18.37.130 255.255.255.128
exit
vlan 70
name "WLAN Private"
tagged 1/2,2/2
ip address 172.18.38.2 255.255.255.128
exit
vlan 80
name "WLAN Guest"
tagged 1/2,2/2

ip address 192.168.1.2 255.255.255.128
exit
primary-vlan 20
spanning-tree
no tftp server
no autorun
no dhcp config-file-update
no dhcp image-file-update
dhcp-server pool "Managment"
authoritative
default-router "172.18.36.65"
lease 07:00:00
network 172.18.36.64 255.255.255.192
option 43 ip "172.18.36.68,172.18.36.69"
range 172.18.36.100 172.18.36.120
exit
dhcp-server conflict-logging
dhcp-server enable

 

Many thanks

10 REPLIES
EricAtHP
Esteemed Contributor
Solution

Re: How to create DHCP server in 2920 Procurve switch

Yes, it is possible. Here is the interesting part of a functioning config. Notice that there is a "dhcp-server" command at the VLAN context and a "dhcp-server enable" command at the global context.

 

vlan 1

    name "DEFAULT_VLAN"
    ip address 10.1.1.3 255.255.255.0
    dhcp-server
exit
dhcp-server pool "Lab"
     authoritative
     default-router "10.1.1.1"
     dns-server "10.1.1.97,10.1.1.1"
     domain-name "domain.com"
     network 10.1.1.0 255.255.255.0
     range 10.1.1.200 10.1.1.254
exit
dhcp-server enable

 

rka61
Occasional Contributor

Re: How to create DHCP server in 2920 Procurve switch

Thanks super star that helped me fix it.

 

Which there was an easier way to do it via the GUI

cristinho
Occasional Visitor

Re: How to create DHCP server in 2920 Procurve switch

Hello, somebody know how can I an IP reservation to a specific mac address?

 

EricAtHP
Esteemed Contributor

Re: How to create DHCP server in 2920 Procurve switch

Disable the dhcp server, enter the pool context, and then create a static-binding:

 

dhcp-server disable

dhcp-server pool "Name"

static-bind ip 10.1.1.254 255.255.255.255 mac aa:bb:cc:dd:ee:ff

exit

dhcp-server enable

 

Hope that helps.

besc
Advisor

Re: How to create DHCP server in 2920 Procurve switch

Just what I need :-)

Thanks!

hp2920
Occasional Visitor

Re: How to create DHCP server in 2920 Procurve switch

Hi

 

What about if I have 3 VLANs 

1. default VLAN 10.22.*.*  here I don`t need DHCP-serves

2. vlan 2 10.23.*.*   should I run here in this vlan

3 vlan 3 10.24.*.* (with openflow instance) and here

fribzi
Occasional Visitor

Re: How to create DHCP server in hp 5120 ei switch

How to create DHCP server in hp 5120 ei switch

 

i need help .... i am new user for hp switch

SheldonBird
Occasional Visitor

Re: How to create DHCP server in 2920 Procurve switch

EricAtHP
 
EricAtHP
ESTEEMED CONTRIBUTOR
 
Re: How to create DHCP server in 2920 Procurve switch

Disable the dhcp server, enter the pool context, and then create a static-binding:

 

dhcp-server disable

dhcp-server pool "Name"

static-bind ip 10.1.1.254 255.255.255.255 mac aa:bb:cc:dd:ee:ff

exit

dhcp-server enable

 

Hope that helps.


Would it be possible to disable a single dhcp ip-pool?  If not, does disabling the dhcp server make it so that all of the IPs that were dynamically assigned drop from a network range?

I did not know that you had to disable the server to statically bind MAC addresses, thanks! Kinda scratched my head for a bit wondering why the "static-bind" command was unregognized on my a7510 core switch. 

AbinAbraham
Occasional Visitor

Re: How to create DHCP server in 2920 Procurve switch

Hello,

how can i exclude 4 ip address ?

fixitrod
Occasional Visitor

Re: How to create DHCP server in 2920 Procurve switch

Use multiple Range commands to exclude-addresses. Here's an example of a range from 192.168.10.100 to .200 excluding .151 to .155. Also, I added a lease time since it wasn't shown above. Lease time is 30 days, 20 hours, 10 minutes. 

Note: disabling the DHCP server only stops the switch from handing out IP addresses during that time. It does not break addresses already given. If you put all your commands in a text editor like notepad then copy and paste to the switch it will be down for less than a couple seconds and in most environments, it won't be noticed. 

dhcp-server disable
dhcp-server pool Data
authoritative
default-router 192.168.10.1
dns-server 192.168.1.20,192.168.3.20
domain-name domain.int
network 192.168.10.0 255.255.255.0
range 192.168.10.100 192.168.10.150
range 192.168.10.156 192.168.10.200
lease 30:20:10
exit
dhcp-server enable