2017 © Pedro Peláez
 

library submuncher

Tool for consolidating subnets

image

andrewandante/submuncher

Tool for consolidating subnets

  • Friday, April 6, 2018
  • by andrewandante
  • Repository
  • 2 Watchers
  • 1 Stars
  • 106 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 12 Versions
  • 0 % Grown

The README.md

SubMuncher

Handy tool for consolidating subnets into as few subnets as possible, (*1)

Scrutinizer Code Quality Build Status, (*2)

Installation

composer require andrewandante/submuncher, (*3)

Using it

The most basic usage is to pass an array of IPv4 addresses into AndrewAndante\SubMuncher\SubMuncher::consolidate(), (*4)

The most useful usage is to pass an array of CIDRs into AndrewAndante\SubMuncher\SubMuncher::consolidate_subnets(), (*5)

There are also a bunch of helper IP utility functions in the Util classe should you need to do some tweaking., (*6)

You can also pass a second parameter that limits the number of rules returned. This invokes some magic to combine some subnets in a way that introduces the least number of additional IP addresses into the range as possible., (*7)

For example, to reduce your list of subnets down to 25 total rules, try AndrewAndante\SubMuncher\SubMuncher::consolidate_subnets($cidrsArray, 25);, (*8)

Debugging

There are verbose methods which will give you the initial list of IPs covered by your CIDRs, and the ultimate list covered. That will give you the opportunity to compare, so you can see what additional IPs have been introduced. This is in case you are using them for a whitelist or something that requires exact knowledge of the IPs., (*9)

Warning

This is significantly slower when calculating subnets, as it expands out all the individual IPs in the subnet, rather than just using the first and last IP, (*10)

Limitations

Only tested on IPv4 at present., (*11)

The Versions

06/04 2018

dev-develop

dev-develop

Tool for consolidating subnets

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

27/03 2018

dev-master

9999999-dev

Tool for consolidating subnets

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

27/03 2018

0.4.1

0.4.1.0

Tool for consolidating subnets

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

27/03 2018

dev-BUGFIX/remove_duplicate_subnets

dev-BUGFIX/remove_duplicate_subnets

Tool for consolidating subnets

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

13/03 2018

0.4.0

0.4.0.0

Tool for consolidating subnets

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

06/03 2018

0.3.4

0.3.4.0

Tool for consolidating subnets

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

06/03 2018

0.3.3

0.3.3.0

Tool for consolidating subnets

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

06/03 2018

0.3.2

0.3.2.0

Tool for consolidating subnets

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

06/03 2018

0.3.1

0.3.1.0

Tool for consolidating subnets

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

06/03 2018

0.3.0

0.3.0.0

Tool for consolidating subnets

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

02/03 2018

0.2.0

0.2.0.0

Tool for consolidating subnets

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

21/02 2018

0.1.0

0.1.0.0

Tool for consolidating subnets

  Sources   Download

The Requires

  • php >=5.6

 

The Development Requires