in reply to NetAddr::IP Automated Subnet Allocation
Like the documentation indicates says + and ++ will wrap around within the subnet, so new_netaddr won't hold what you want:
(127.0.0.255/24)++ -> (127.0.0.0/24) (127.0.0.255/24)+1 -> (127.0.0.0/24)
How about: (Tested)
my ($addr, $mask) = $net_broadcast->numeric(); my $new_netaddr = NetAddr::IP->new($addr+1, $mask);
I haven't looked at why you have /32's instead of /29's in your output.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: NetAddr::IP Automated Subnet Allocation
by amt (Monk) on Sep 03, 2004 at 15:00 UTC | |
by ikegami (Patriarch) on Sep 03, 2004 at 15:18 UTC |