1AGGREGATE(1)                General Commands Manual               AGGREGATE(1)
2
3
4

NAME

6       aggregate  -  optimise a list of route prefixes to help make nice short
7       filters
8
9

SYNOPSIS

11       aggregate [-m max-length] [-o max-opt-length] [-p default-length]  [-q]
12       [-t] [-v]
13
14

DESCRIPTION

16       Takes  a list of prefixes in conventional format on stdin, and performs
17       two optimisations to attempt to reduce the length of the prefix list.
18
19       The first optimisation is to remove any  supplied  prefixes  which  are
20       superfluous  because they are already included in another supplied pre‐
21       fix. For example, 203.97.2.0/24 would be removed if  203.97.0.0/17  was
22       also supplied.
23
24       The  second  optimisation identifies adjacent prefixes that can be com‐
25       bined under a single, shorter-length prefix. For example, 203.97.2.0/24
26       and 203.97.3.0/24 can be combined into the single prefix 203.97.2.0/23.
27
28

OPTIONS

30       -m max-length
31              Sets  the  maximum  prefix  length  for  entries read from stdin
32              max_length bits. The default is 32. Prefixes with longer lengths
33              will be discarded prior to processing.
34
35       -o max-opt-length
36              Sets  the  maximum  prefix  length  for optimisation to max-opt-
37              length bits. The default is 32.  Prefixes  with  longer  lengths
38              will not be subject to optimisation.
39
40       -p default-length
41              Sets  the  default  prefix  length. There is no default; without
42              this option a  prefix  without  a  mask  length  is  treated  as
43              invalid.   Use  -p  32  -m  32 -o 32 to aggregate a list of host
44              routes specified as bare addresses, for example.
45
46       -q     Sets quiet mode -- instructs aggregate never to generate warning
47              messages or other output on stderr.
48
49       -t     Silently  truncate  prefixes  that  seem to have an inconsistent
50              prefix: e.g. an input prefix 203.97.2.226/24 would be  truncated
51              to   203.97.2.0/24.   Without   this   option  an  input  prefix
52              203.97.2.226/24 would not be accepted, and a warning  about  the
53              inconsistent mask would be generated.
54
55       -v     Sets verbose mode. This changes the output format to display the
56              source line number that the prefix was obtained  from,  together
57              with a preceding "-" to indicate a route that can be suppressed,
58              or a "+" to indicate a shorter-prefix aggregate that  was  added
59              by  aggregate  as  an  adjacency optimisation. Note that verbose
60              output continues even if -q is selected.

DIAGNOSTICS

62       Aggregate exits 0 on success, and >0 if an error occurs.
63

EXAMPLES

65       The following list of prefixes:
66
67         193.58.204.0/22
68         193.58.208.0/22
69         193.193.160.0/22
70         193.193.168.0/22
71         193.243.164.0/22
72         194.126.128.0/22
73         194.126.132.0/22
74         194.126.134.0/23
75         194.151.128.0/19
76         195.42.240.0/21
77         195.240.0.0/16
78         195.241.0.0/16
79
80       is optimised as followed by aggregate (output shown using the -v flag):
81
82         aggregate: maximum prefix length permitted will be 24
83         [    0] + 193.58.204.0/21
84         [    1] - 193.58.204.0/22
85         [    2] - 193.58.208.0/22
86         [    3]   193.193.160.0/22
87         [    4]   193.193.168.0/22
88         [    5]   193.243.164.0/22
89         [    0] + 194.126.128.0/21
90         [    6] - 194.126.128.0/22
91         [    7] - 194.126.132.0/22
92         [    8] - 194.126.134.0/23
93         [    9]   194.151.128.0/19
94         [   10]   195.42.240.0/21
95         [    0] + 195.240.0.0/15
96         [   11] - 195.240.0.0/16
97         [   12] - 195.241.0.0/16
98
99       Note that 193.58.204.0/22 and 193.58.208.0/22 were combined  under  the
100       single  prefix  193.58.204.0/21,  and  194.126.134.0/23  was suppressed
101       because it was included  in  194.126.132.0/22.  The  number  in  square
102       brackets at the beginning of each line indicates the original line num‐
103       ber, or zero for new prefixes that were introduced by aggregate.
104
105       The output without the -v flag is as follows:
106
107         193.58.204.0/21
108         193.193.160.0/22
109         193.193.168.0/22
110         193.243.164.0/22
111         194.126.128.0/21
112         194.151.128.0/19
113         195.42.240.0/21
114         195.240.0.0/15
115

SEE ALSO

117       aggregate-ios(1)
118

HISTORY

120       Aggregate was written by Joe Abley <jabley@mfnx.net>, and has been rea‐
121       sonably  well  tested. It is suitable for reducing customer prefix fil‐
122       ters for production use without extensive hand-proving of results.
123
124       Autoconf     bits     were     donated     by      Michael      Shields
125       <michael.shields@mfn.com>.   The -t option was suggested by Robin John‐
126       son <robbat2@fermi.orbis-terrarum.net>, and the  treatment  of  leading
127       zeros  on octet parsing was changed following comments from Arnold Nip‐
128       per <arnold@nipper.de>.
129
130       An early version of aggregate would attempt to  combine  adjacent  pre‐
131       fixes  regardless of whether the first prefix lay on an appropriate bit
132       boundary or not (pointed out with  great  restraint  by  Robert  Noland
133       <rnoland@2hip.net>).
134

BUGS

136       Common unix parsing of IPv4 addresses understands the representation of
137       individual octets in octal or hexadecimal, following a "0" or "0x" pre‐
138       fix, respectively. That convention has been deliberately disabled here,
139       since resources such as the IRR do not follow the convention, and  con‐
140       fusion can result.
141
142       For  extremely  sensitive  applications, judicious use of the -v option
143       together with a pencil and paper is probably advisable.
144
145
146
147
148Joe Abley                       2001 November 2                   AGGREGATE(1)
Impressum