On Wed, Jul 13, 2011 at 12:28 PM, marc williams
<
marcwil...@gmail.com> wrote:
> I cant do:
>
> ip = IPAddress.parse "
1.1.1.0/24"
>
> subnets = ip / 64
> puts subnets
>
> spits out an error message:
>
> gem/ruby/1.8/gems/ipaddress-0.8.0/lib/ipaddress/ipv4.rb:684:in
> `subnet': New prefix must be between 24 and 32 (ArgumentError)
> from /Users/.gem/ruby/1.8/gems/ipaddress-0.8.0/lib/ipaddress/ipv4.rb:
> 622:in `/'
> from ./ip.rb:7
Hello Marc,
thanks for pointing out this issue. I will investigate it further.
Would you care to open an issue on Github on this one?
> I am trying to divide a /24 address space into /30's
In the meantime you can use IPv4#subnet which works fine
subnets = ip.subnet(30)
Regards,
Marco