More than one DHCP ranges in the same network segment

Hi guy,
I want to know if it’s possibile to have in Nethserver 7 release more than one DHCP ranges in the same network segment.

My current server (linux server, Debian 8 with isc-dhcp-server) has more than one DHCP range with IP address reservation (no free lease dynamic range only static) but in Nethserver I don’t see a similar GUI configuration.

Thanks a lot

1 Like

I’m interested too.

which is the aim? I mean… different segments in the same subnet…

It happens when you are out of IP in a segment and can’t expand it because near to it there are configured printers/cams/servers/scanners/someotherthings that have fixed IP. (real experience…)

you’re right, indeed… thank you

AFAIK, dnsmasq (NethServer dhcp server) will not assign fixed ip within the range.
Real world scenario: green network: 192.168.5.0/24, dhcp range 192.168.5.1-254, many fixed ip addresses scattered in the 192.168.5.1-254 range (printers, voip gateways, cams, etc), never seen an ip conflict in years.

1 Like

So, i have a printer with ip 192.168.16.90 that it’s turned off at the moment.
I set up the DHCP server and a client have assigned 192.168.16.90 from the DHCP server.
Then, i turn on the printer…

I think you can generate via template-custom

mkdir -p /etc/e-smith/templates-custom/etc/dnsmasq.conf
cd /etc/e-smith/templates-custom/etc/dnsmasq.conf

vi 31dhcp

dhcp-range=LanAssignedToDHCPRange,First.IP.Of.Range,Last.IP,Of,Range,Subnet.Mask.Of.Range,LeasingTimeInSeconds

example:

dhcp-range=eth0,192.168.16.10,192.168.16.90,255.255.255.0,86400
dhcp-range=eht0,192.168.16.150,192.168.16.180,255.255.255.0,86400

save the file then

expand-template /etc/dnsmasq.conf

and restart the service

Reference:
http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

Search for --dhcp-range parameter

http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2014q4/009016.html

1 Like

Thanks for the suggestions.
I’m not really sure you understood what i said, so my question was: is it possible to realize a “shared-network”?

shared network: the situation where you run multiple IP subnets on the same wire.

for example in isc-dhcp-server the lines are:
shared-network demo {
subnet 192.168.1.0 …
subnet 10.0.0.0 …
}

Could I try to create a template by the way you suggested me?

you’re asking for different subnets with enabled dhcp :slight_smile:

yes two dhcp subnets with fixed IP released by mac.

1 Like

That is when VLAN kicks in, right? Otherwise you will have a big mess when you don’t use DHCP reservations.

In my current enviroment I don’t have any VLAN configuration but I have a DHCP reservation for all the hosts of organization
Clients correctly takes own configuration from DHCP server:
-clients with a fixed IP of subnet 1 and fixed MAC takes network parameters of subnet 1
-clients with a fixed IP of subnet 2 and fixed MAC takes network parameters of subnet 2

network parameters of subnet 1 and subnet 2 are globally definited in DHCP configuration file.
Only one network physical card on linux server with 2 logical subnet defined in dhcp configuration

Just playing the devils advocate here: What happens when a device enters your network that has no IP address reservation? It will get an IP in one or the other subnet. But it will be unpredictable what IP range. IMO this is a situation you want to prevent (the unpredictable part).

1 Like

Looks like a nightmare :fearful: