1AGGREGATE6(7)                                                    AGGREGATE6(7)
2
3
4
5aggregate6 will compress an unsorted list of IP prefixes (both IPv4 and IPv6).
6

Description

8       Takes a list of IPv6 prefixes in conventional format on stdin, and per‐
9       forms two optimisations to attempt to reduce the length of  the  prefix
10       list.  The  first optimisation is to remove any supplied prefixes which
11       are superfluous because they are already included in  another  supplied
12       prefix.   For   example,  2001:67c:208c:10::/64  would  be  removed  if
13       2001:67c:208c::/48 was also supplied.
14
15       The second optimisation identifies adjacent prefixes that can  be  com‐
16       bined   under   a   single,   shorter-length   prefix.   For   example,
17       2001:67c:208c::/48 and 2001:67c:208d::/48 can be combined into the sin‐
18       gle prefix 2001:67c:208c::/47.
19
20       The above optimalisation steps are often useful in context of compress‐
21       ing firewall rules or BGP prefix-list filters.
22
23       The following command line options are available:
24
25
26
27               -4          Only output IPv4 prefixes
28               -6          Only output IPv6 prefixes
29               -h, --help  show help message and exit
30               -m N        Sets the maximum prefix length for entries read, longer prefixes will be discarded prior to processing
31               -t          truncate IP/mask to network/mask
32               -v          Display verbose information about the optimisations
33               -V          Display aggregate6 version
34
35
36

Installation

38       OpenBSD 6.3:
39
40       $ doas pkg_add aggregate6
41
42       Other platforms:
43
44       $ pip3 install aggregate6
45

CLI Usage

47       Either provide the list of IPv4 and IPv6 prefixes  on  STDIN,  or  give
48       filenames containing lists of IPv4 and IPv6 prefixes as arguments.
49
50
51
52           $ # via STDIN
53           $ cat file_with_list_of_prefixes | aggregate6
54              ... output ...
55
56           $ # with a filename as argument
57           $ aggregate6 file_with_list_of_prefixes [ ... optional_other_prefix_lists ]
58              ... output ...
59
60           $ # Whitespace separated works too
61           $ echo 2001:67c:208c::/48 2000::/3 | aggregate6
62           2000::/3
63
64           $ # You can combine IPv4 and IPv6
65           $ echo 10.0.0.0/16 10.0.0.0/24 2000::/3 | aggregate6
66           10.0.0.0/16
67           2000::/3
68
69
70

Library Usage

72       Aggregate6  can  be  used  in  your  own pyp/python2/python3 project as
73       python module. Currently there is just one simple public function:  ag‐
74       gregate() which takes a list as parameter.
75
76
77
78           >>> import from aggregate6 import aggregate
79           >>> aggregate(["10.0.0.0/8", "10.0.0.0/24"])
80           [´10.0.0.0/8´]
81           >>>
82
83
84

Bugs

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

Author

89       Job Snijders job@instituut.net
90
91
92
93                                 December 2017                   AGGREGATE6(7)
Impressum