Joel_42834
Oct 19, 2012Nimbostratus
IP Address Validation with CIDR
How can a validate an IP address that is stored in a string data group that uses CIDR notation?
For dotted netmasks I use: [IP::addr $address mask $netmask]
where $address is say "1.2.3.4" and $netmask is "255.255.255.0"
But this doesn't work for CIDR notation. You can't have "/24" for the value of $netmask.
I tried leaving it off: [IP::addr $address]
where $address = "1.2.3.4/24"
But it appears that the "mask" keyword & its argument are required.
Any help would be greatly appreciated.