Switches, Hubs, and Modems
cancel
Showing results for 
Search instead for 
Did you mean: 

DHCP Multi Subnet on VLAN - 5406zl

Sanjay Navik
Occasional Visitor

DHCP Multi Subnet on VLAN - 5406zl

I have configure a Linux DHCP Server, The configuration are

----------------------------------------------
ddns-update-style interim;
ignore client-updates;
default-lease-time 21600;
max-lease-time 43200;
DHCPDARGS = "eth1 eth1:1 eth1:2 eth1:3";

# shared-network
shared-network name {

option domain-name-servers 192.168.0.1, 192.168.0.254;

subnet 10.10.0.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 10.10.0.1;
range dynamic-bootp 10.10.0.2 10.10.0.254;
}
subnet 10.10.1.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 10.10.1.1;
range dynamic-bootp 10.10.1.2 10.10.1.254;
}
subnet 10.10.2.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 10.10.2.1;
range dynamic-bootp 10.10.2.2 10.10.2.254;
}
subnet 10.10.3.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 10.10.3.1;
range dynamic-bootp 10.10.3.2 10.10.3.254;
}
}
--------------------------------------------

Above dhcpd.conf, config file work but assign any IP address to any client.

I want to configure specific vlan assign specific subnet

like

vlan 1 ==> assign ==> 10.10.0.x
vlan 2 ==> assign ==> 10.10.1.x
vlan 3 ==> assign ==> 10.10.2.x
vlan 4 ==> assign ==> 10.10.3.x

and so on...

As i am new to HP devices, Can any one explain in details of each steps.

Thanks in advance.




2 REPLIES
Gareth Walters
Occasional Contributor

Re: DHCP Multi Subnet on VLAN - 5406zl

You need 2 changes;
first your switch needs to append the circuit ids of the VLANs to the DHCP request when they forward it on to your DHCP server.

I think this is...
dhcp-relay option 82 append


Second you have to change the config of your DHCP server so that it hands out addresses based on those circuit/remote IDs.

I have had this working before but I can't remember exactly have a look in the man page for dhcpd.conf;
You are looking for circuit id.
I think you will need to create a class to match the circuit ID.

The only way I know of to determine the circuit ID is to turn on option 82 append on the switch and monitor the packets with wireshark or tcpdump. You can use the circuit ID from tere to divide up your dhcp scopes/classes.

good luck

Pieter 't Hart
Honored Contributor

Re: DHCP Multi Subnet on VLAN - 5406zl

you did not give details of the vlan config of your network.

offcourse the vlans's must exist (i guess you did that).
there must be a router configured between the vlan's (this can be the 5406)
the router needs an interface (with respective ip-adress) in each vlan.
each vlan of this router must have the dhcp-relay configured pointing to the dhcp-server's ip-address.

in the dhcp server's range exclude it's own address from the dhcp-range (let's say 10.10.0.2)
range dynamic-bootp 10.10.0.3 10.10.0.254;

on the 5406
with ports 1-9 in vlan 1
and dhcp-server in vlan1 (say port 1)
with ports 10-15 in vlan 2
and 16-20 in vlan3
==============
ip routing
vlan 1
untagged 1-9
ip adress 10.10.0.1 255.255.255.0
! no ip-helper here because the dchp-server is reachable directly
exit
vlan 2
untagged 10-15
ip adress 10.10.2.1 255.255.255.0
ip helper-address 10.10.0.2
exit
vlan 3
untagged 16-20
ip adress 10.10.3.1 255.255.255.0
ip helper-address 10.10.0.2
exit
===============
the router(/switch) modifies the dhcp-request so the dhcp-server knows from witch vlan/subnet the request came from and can respond back to this router with a dhcp-offer with an address in the correct subnet .

if some other device does the routing you need to configure the helper-address there.