A perl script to convert Cisco IOS/Nexus/ASA configurations to HTML for easier comprehension

re more general 'network utilities' and scripts:


adds and removes subnets from networks giving list of remaining/aggregated (sub)nets.

I couldnt find an online calculator that does this, most are just for 'translation'
from subnet masks<>cidr or cisco inverse masks, etc.

Wrote it years ago cuz I had an itch. The included perl module populates a
hash entry per ip and I didnt want to write my own, so uses lots of ram+cpu on
big ops (/8 - /9 for eg). But great for earthly operations like /23 - /27 +

Yes I should start my own git repo, but i've been lazy.

No warranties provided.

If anyone has a faster/better one, that'd be handy.



In the spirit of Ken's script below, I've started development of a tool
which I called NetCalc:

https://github.com/israel-lugo/netcalc (source code)

https://pypi.python.org/pypi/netcalc (Python package)

Currently, NetCalc allows one to add (aggregate) multiple networks,
subtract a network from a larger network, and mix add/subtract
operations with an arbitrary mathematical expression. It supports both
IPv4 and IPv6, and works very efficiently even with very large networks.
It uses the excellent netaddr library for the core address manipulation.

Example usage:

$ netcalc add 10.1/16 10/16
$ netcalc sub
$ netcalc expr 2001:db8::/34 - 2001:db8::/38 + 2001:db8:100::/41

More features are planned, this is still just an early release. Right
now, things that I can think of being useful:

  * new command for static information (netmask/bitmask, IP range)
  * new command for WHOIS queries
  * new command for splitting a network into smaller networks by prefix
  * ability to specify network arguments through a file
  * ???

The tool is made in Python, and supports both Python 3 (preferred) and
Python 2.

I'm releasing here with the desire that it will be useful to someone,
and hopefully to get some feedback on useful functionality, behavior and
so on.


Israel G. Lugo