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?
Asked
Active
Viewed 418 times
1 Answers
0
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
- 299,756