UPDATE: Shouldn't your fourth octet be limited to 253, to avoid the multicast and broadcast addresses for a class-C network ?use strict; my %exception_second_octet = map {$_=> "Put Subclass Info here"} qw( 6 + 17 19); for my $second_octet (1..23){ if ($exception_second_octet{$second_octet}){ # Put Subclass generation code here } else { for my $fourth_octet(1..255){ my $generated_ip = "10.$second_octet.0.$fourth_octet/32"; # Do whatever else ... } } }
"For every complex problem, there is a simple answer ... and it is wrong." --H.L. Mencken
In reply to Re: IP generation algorithm problem
by NetWallah
in thread IP generation algorithm (tc)
by giany
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |