in reply to Re: RFC: CPAN module Net::IP::Correct
in thread RFC: CPAN module Net::IP::Correct

Thanks for your comments and suggestions!

But isn't splitting an IP range into its constituent valid IP blocks actually maximising the number of routing entries? (assuming this exercise is for a route table).

I do think Net::IP::Range::Split (thanks to Smylers again) is appropriate for what this module will try to achive. i.e. split an IP range into its constituent valid IP blocks. The caller could use arguments to indicate whether she wants IP blocks smallest first or largest first.

Module implementation aside, I'm now confused as how to go ahead with CPAN. I did send a request to register a namespace using PAUSE, but I was informed by various good folks that its not a needed step. Do I need a certain number of votes here on Perlmonks to get the go ahead?

All help will be much appreciated!

  • Comment on Re^2: RFC: CPAN module Net::IP::Correct

Replies are listed 'Best First'.
Re^3: RFC: CPAN module Net::IP::Correct
by del (Pilgrim) on Jun 29, 2005 at 18:19 UTC
    But isn't splitting an IP range into its constituent valid IP blocks actually maximising the number of routing entries? (assuming this exercise is for a route table).

    I was actually thinking in terms of minimal and usable. Your initial example included the range 192.168.1.0 - 192.168.1.5. That range cannot be expressed as a single entity using CIDR or network masks, as you allude to, so it can't be used as a routing entry.

    One approach I frequently see is this:

    192.168.0.0 255.255.255.0
    192.168.1.0 255.255.255.0
    192.168.2.0 255.255.255.0
    192.168.3.0 255.255.255.0
    192.168.4.0 255.255.255.0
    192.168.5.0 255.255.255.0
    

    With your proposed module, I was imagining that same range could be programmatically rewritten as this:

    192.168.0.0 255.255.252.0  ( /22 )
    192.168.4.0 255.255.254.0  ( /23 )
    

    In these scenarios, I see this as a way of reducing the number of entries in a routing table.

    Module implementation aside, I'm now confused as how to go ahead with CPAN. I did send a request to register a namespace using PAUSE, but I was informed by various good folks that its not a needed step. Do I need a certain number of votes here on Perlmonks to get the go ahead?

    A monk vote shouldn't be needed. I think you were on the right track with PAUSE, as described here.

      Ooops. Those rewritten ranges have incorrect subnet masks. They should be 255.255.252.0 and 255.255.254.0, respectively.
Re^3: RFC: CPAN module Net::IP::Correct
by merlyn (Sage) on Jun 30, 2005 at 06:58 UTC
    Module implementation aside, I'm now confused as how to go ahead with CPAN. I did send a request to register a namespace using PAUSE, but I was informed by various good folks that its not a needed step. Do I need a certain number of votes here on Perlmonks to get the go ahead?
    Please don't, until you explain how it isn't actually the same as Net::IP::ip_range_to_prefix. We don't need a whole module to do what's already done as a subroutine in another module, unless there's something very broken about that implementation.

    Then again, if you just want to go pollute the CPAN, I'm really not the one to cast stones. {grin}

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.