This has helped with finding ip's in subnets.. Especially When 1000's of subnets are used with different masks.use Net::Netmask; $range = undef; $range = "$ip/$maskip"; print "-- RANGE: \"$range\"\n"; $msess = undef; $msess = new Net::Netmask($range); $table = undef; $msess->storeNetblock($table); $wireip = undef; $wireip = $msess->base(); $bcastip = undef; $bcastip = $msess->broadcast(); if($debug == 1) { print "WIREIP: \"$wireip\"\n"; print "MASKIP: \"$maskip\"\n"; } # Dump all ips in range $oip = undef; foreach $oip ($msess->enumerate(0)) { print "OIP: \"$oip\"\n"; }
In reply to Re: Net IP
by t_rex_joe
in thread Net IP
by lddzjwwy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |