On Mon Oct 22 16:10:29 2007, vernonnelson@cox.net wrote:
Show quoted text> the first & last returns on a /31 are incorrect.. this should return
> the network & broadcast...
>
> my $ip1 = new NetAddr::IP "192.168.0.0/255.255.255.254";
> 192.168.0.0 - 192.168.0.1 = range
> 192.168.0.1/31 = first
> 192.168.0.0/31 = last
A /31 contains no usable addresses so the first and last items are not
meaningful
First is the first address after the network address
Last is the last address before the broadcast address
The above is as close as you can get considering how a /31 wraps.
Perhaps this is idiosyncratic but that is how it's defined