aggregate6


Nameaggregate6 JSON
Version 1.0.14 PyPI version JSON
download
home_pagehttps://github.com/job/aggregate6
SummaryIPv4 and IPv6 prefix list compressor
upload_time2024-11-12 16:54:00
maintainerJob Snijders
docs_urlNone
authorNone
requires_pythonNone
licenseBSD 2-Clause
keywords ipv4 and ipv6 prefix routing networking
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            |Requirements Status| |Coverage Status|

aggregate6
==========

aggregate6 will compress an unsorted list of IP prefixes (both IPv4 and
IPv6).

Description
-----------

Takes a list of IPv6 prefixes in conventional format on stdin, and
performs two optimisations to attempt to reduce the length of the prefix
list. The first optimisation is to remove any supplied prefixes which
are superfluous because they are already included in another supplied
prefix. For example, ``2001:67c:208c:10::/64`` would be removed if
``2001:67c:208c::/48`` was also supplied.

The second optimisation identifies adjacent prefixes that can be
combined under a single, shorter-length prefix. For example,
``2001:67c:208c::/48`` and ``2001:67c:208d::/48`` can be combined into
the single prefix ``2001:67c:208c::/47``.

The above optimalisation steps are often useful in context of
compressing firewall rules or BGP prefix-list filters.

The following command line options are available:

::

       -4          Only output IPv4 prefixes
       -6          Only output IPv6 prefixes
       -h, --help  show help message and exit
       -m N        Sets the maximum prefix length for entries read, longer prefixes will be discarded prior to processing
       -t          truncate IP/mask to network/mask
       -v          Display verbose information about the optimisations
       -V          Display aggregate6 version

Installation
------------

OpenBSD:

``$ doas pkg_add aggregate6``

CentOS/RHEL/Rocky:

| ``$ yum install epel-release``
| ``$ yum install aggregate6``

Fedora:

``$ dnf install aggregate6``

Other platforms:

``$ pip3 install aggregate6``

CLI Usage
---------

Either provide the list of IPv4 and IPv6 prefixes on STDIN, or give
filenames containing lists of IPv4 and IPv6 prefixes as arguments.

::

   $ # via STDIN
   $ cat file_with_list_of_prefixes | aggregate6
      ... output ...

   $ # with a filename as argument
   $ aggregate6 file_with_list_of_prefixes [ ... optional_other_prefix_lists ]
      ... output ...

   $ # Whitespace separated works too
   $ echo 2001:67c:208c::/48 2000::/3 | aggregate6
   2000::/3

   $ # You can combine IPv4 and IPv6
   $ echo 10.0.0.0/16 10.0.0.0/24 2000::/3 | aggregate6
   10.0.0.0/16
   2000::/3

Library Usage
-------------

Aggregate6 can be used in your own pyp/python2/python3 project as python
module. Currently there is just one simple public function:
``aggregate()`` which takes a list as parameter.

::

   >>> from aggregate6 import aggregate
   >>> aggregate(["10.0.0.0/8", "10.0.0.0/24"])
   ['10.0.0.0/8']
   >>>

Bugs
----

Please report bugs at https://github.com/job/aggregate6/issues

Author
------

Job Snijders job@instituut.net

.. |Requirements Status| image:: https://requires.io/github/job/aggregate6/requirements.svg?branch=master
   :target: https://requires.io/github/job/aggregate6/requirements/?branch=master
.. |Coverage Status| image:: https://coveralls.io/repos/github/job/aggregate6/badge.svg?branch=master
   :target: https://coveralls.io/github/job/aggregate6?branch=master

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/job/aggregate6",
    "name": "aggregate6",
    "maintainer": "Job Snijders",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "job@instituut.net",
    "keywords": "ipv4 and ipv6 prefix routing networking",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/e1/21/5779f94817a7a83bb19855c1c807b39db7456d27128f40bdb4ee96185050/aggregate6-1.0.14.tar.gz",
    "platform": null,
    "description": "|Requirements Status| |Coverage Status|\n\naggregate6\n==========\n\naggregate6 will compress an unsorted list of IP prefixes (both IPv4 and\nIPv6).\n\nDescription\n-----------\n\nTakes a list of IPv6 prefixes in conventional format on stdin, and\nperforms two optimisations to attempt to reduce the length of the prefix\nlist. The first optimisation is to remove any supplied prefixes which\nare superfluous because they are already included in another supplied\nprefix. For example, ``2001:67c:208c:10::/64`` would be removed if\n``2001:67c:208c::/48`` was also supplied.\n\nThe second optimisation identifies adjacent prefixes that can be\ncombined under a single, shorter-length prefix. For example,\n``2001:67c:208c::/48`` and ``2001:67c:208d::/48`` can be combined into\nthe single prefix ``2001:67c:208c::/47``.\n\nThe above optimalisation steps are often useful in context of\ncompressing firewall rules or BGP prefix-list filters.\n\nThe following command line options are available:\n\n::\n\n       -4          Only output IPv4 prefixes\n       -6          Only output IPv6 prefixes\n       -h, --help  show help message and exit\n       -m N        Sets the maximum prefix length for entries read, longer prefixes will be discarded prior to processing\n       -t          truncate IP/mask to network/mask\n       -v          Display verbose information about the optimisations\n       -V          Display aggregate6 version\n\nInstallation\n------------\n\nOpenBSD:\n\n``$ doas pkg_add aggregate6``\n\nCentOS/RHEL/Rocky:\n\n| ``$ yum install epel-release``\n| ``$ yum install aggregate6``\n\nFedora:\n\n``$ dnf install aggregate6``\n\nOther platforms:\n\n``$ pip3 install aggregate6``\n\nCLI Usage\n---------\n\nEither provide the list of IPv4 and IPv6 prefixes on STDIN, or give\nfilenames containing lists of IPv4 and IPv6 prefixes as arguments.\n\n::\n\n   $ # via STDIN\n   $ cat file_with_list_of_prefixes | aggregate6\n      ... output ...\n\n   $ # with a filename as argument\n   $ aggregate6 file_with_list_of_prefixes [ ... optional_other_prefix_lists ]\n      ... output ...\n\n   $ # Whitespace separated works too\n   $ echo 2001:67c:208c::/48 2000::/3 | aggregate6\n   2000::/3\n\n   $ # You can combine IPv4 and IPv6\n   $ echo 10.0.0.0/16 10.0.0.0/24 2000::/3 | aggregate6\n   10.0.0.0/16\n   2000::/3\n\nLibrary Usage\n-------------\n\nAggregate6 can be used in your own pyp/python2/python3 project as python\nmodule. Currently there is just one simple public function:\n``aggregate()`` which takes a list as parameter.\n\n::\n\n   >>> from aggregate6 import aggregate\n   >>> aggregate([\"10.0.0.0/8\", \"10.0.0.0/24\"])\n   ['10.0.0.0/8']\n   >>>\n\nBugs\n----\n\nPlease report bugs at https://github.com/job/aggregate6/issues\n\nAuthor\n------\n\nJob Snijders job@instituut.net\n\n.. |Requirements Status| image:: https://requires.io/github/job/aggregate6/requirements.svg?branch=master\n   :target: https://requires.io/github/job/aggregate6/requirements/?branch=master\n.. |Coverage Status| image:: https://coveralls.io/repos/github/job/aggregate6/badge.svg?branch=master\n   :target: https://coveralls.io/github/job/aggregate6?branch=master\n",
    "bugtrack_url": null,
    "license": "BSD 2-Clause",
    "summary": "IPv4 and IPv6 prefix list compressor",
    "version": "1.0.14",
    "project_urls": {
        "Homepage": "https://github.com/job/aggregate6"
    },
    "split_keywords": [
        "ipv4",
        "and",
        "ipv6",
        "prefix",
        "routing",
        "networking"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e1215779f94817a7a83bb19855c1c807b39db7456d27128f40bdb4ee96185050",
                "md5": "76280715e5a509c823eab61071c6cfb6",
                "sha256": "425a3a7934935f9ff439bdbb3ada6218f61a1d2a3ef37f0f856313ca5709c07c"
            },
            "downloads": -1,
            "filename": "aggregate6-1.0.14.tar.gz",
            "has_sig": false,
            "md5_digest": "76280715e5a509c823eab61071c6cfb6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8869,
            "upload_time": "2024-11-12T16:54:00",
            "upload_time_iso_8601": "2024-11-12T16:54:00.837586Z",
            "url": "https://files.pythonhosted.org/packages/e1/21/5779f94817a7a83bb19855c1c807b39db7456d27128f40bdb4ee96185050/aggregate6-1.0.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-12 16:54:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "job",
    "github_project": "aggregate6",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "aggregate6"
}
        
Elapsed time: 0.40656s