http://qs1969.pair.com?node_id=511275


in reply to Don't Use Regular Expressions To Parse IP Addresses!

The IP addresses you give as invalid addresses in the "Invalid Client Addresses" section isn't strictly correct.

First there is no such thing as a classful addressing. In todays Internet classful means nothing. The subnet mask determines the range of IP addresses that can be considered local (on the same network).

Second, because of the above x.x.x.0 - or any variation eg x.0.0.0, except 0.0.0.0 - can be a valid IP address. For example the subnet mask 255.255.254.0 means that 2 contiguous /24's are part of the same network. In this case this makes .255 of the first /24 and .0 of the second /24 valid client IP addresses.

It is fair to say that some OSes seem to have a problem with this. But the fact remains the .0 and .255 addresses can be used by clients. It just all depends on the subnet mask.

Other than that a quality rant. ;)