How to tell a subnet number is valid or not in dhcpd.conf?

by codexplorer   Last Updated June 25, 2019 12:02 PM - source

I got a warming message with "subnet 192.168.10.1 netmask 255.255.255.0: bad subnet number/mask combination" in dhcpd.conf after I tried to configure the dhcp server. I found if I change the subnet id, 192.168.10.1, to 192.168.10.0. Is there a regular expression for subnet id?

Tags : dhcpd


Answers 1


Is there a regular expression for subnet id?

Sure but the one refused is also valid ;)

var n = @"(255|254|252|248|240|224|192|128|0+)";
var r = new Regex("^" + n + @"." + n + @"." +n + @"." +n + "$");
Rinzwind
Rinzwind
June 25, 2019 11:44 AM

Related Questions



No IP address DHCP

Updated August 22, 2018 22:02 PM

DHCP Configuration

Updated January 28, 2019 04:02 AM