File: aggregate.8

package info (click to toggle)
aggregate 1.0.2-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 304 kB
  • ctags: 117
  • sloc: ansic: 1,036; sh: 335; perl: 132; makefile: 83
file content (157 lines) | stat: -rw-r--r-- 3,787 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.\" aggregate.8                                             January 2002
.\" Horms                                             horms@verge.net.au
.\"
.\" Man page for aggregate command line utility
.\"
.\" aggreagete
.\" CIDR network aggregation and filtering
.\" Copyright (C) 1999-2002  Horms
.\" 
.\" This program is free software; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of the
.\" License, or (at your option) any later version.
.\" 
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
.\" General Public License for more details.
.\" 
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
.\" 02111-1307  USA
.\"
.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.TH AGGREGATE 8 "7th January 2002"
.SH NAME
aggregate \- tool for aggregating CIDR networks
.SH SYNOPSIS
\fBaggregate\fP [options]
.SH DESCRIPTION
\fBaggregate\fP(8) is a tool for aggregating CIDR networks.
Input is read from stdin and output is written to stdout.
It undestands IPv4 networks represented as network/prefix, network/netmask
and start_address - end_addres. It is able to read input in any
one of these formats and output in the same or a different format.
.P
It is also able to limit the maximum and minimum prefix length
that will be output. This can be used to filter, for instance
ignoring all networks with a prefix longer than 24 bits. That
is all networks smaller than a traditional Class C.
.SH OPTIONS
.TP
.B \-h, \-\-help:
Display terse help.
.TP
.B \-i, \-\-input\-format FORMAT:
Format for input. One of:
.sp
.B prefix:
network/prefix. 
.br
e.g. 10.0.0.0/24
.sp
.B netmask:
network/netmask. 
.br
e.g. 10.0.0.0/255.255.255.0
.sp
.B range:
start_ip - end_ip. 
.br
e.g. 10.0.0.0 - 10.0.0.255
.sp
Note that while prefix and netmask types imply a single CIDR network,
a range may span multiple CIDR networks.
.sp
The default is prefix.
.TP
.B \-M, \-\-maximum\-format FORMAT:
Supress the output of networks whose prefix is greater than this value.
Valid values 0-32. -1 for no maximum prefix.
Default is -1.
.TP
.B \-m, \-\-minimum\-format FORMAT:
Supress netorks whose prefix is less than this value.
Valid values 0-32. -1 for no minimum prefix.
Default is -1.
.TP
.B \-o, \-\-output\-format FORMAT:
Format for intput. Available formats are as per \-\-input\-format.
Defailt is prefix.
.SH EXAMPLES
.TP
.B Example 1:
Aggregate some prefixes.
.sp
.nf
aggregate
10.0.0.0/19
10.0.255.0/24
10.1.0.0/24
10.1.1.0/24
10.1.2.0/24
10.1.2.0/25
10.1.2.128/25
10.1.3.0/25
^D
10.0.0.0/19
10.0.255.0/24
10.1.0.0/23
10.1.2.0/24
10.1.3.0/25
.fi

.TP
.B Example 2:
Aggregate some prefixes ignoring anything smaller than a /24.
.sp
.nf
aggregate -M 24
10.0.0.0/19
10.0.255.0/24
10.1.0.0/24
10.1.1.0/24
10.1.2.0/24
10.1.2.0/25
10.1.2.128/25
10.1.3.0/25
^D
10.0.0.0/19
10.0.255.0/24
10.1.0.0/23
10.1.2.0/24
.fi

.TP
.B Example 3:
Same as example 1 but input is in 
.B netmask 
format and output is in 
.B range
format
.sp
.nf
aggregate -i netmask
10.0.0.0/255.255.224.0
10.0.255.0/255.255.255.0
10.1.0.0/255.255.255.0
10.1.1.0/255.255.255.0
10.1.2.0/255.255.255.0
10.1.2.0/255.255.255.128
10.1.2.128/255.255.255.128
10.1.3.0/255.255.255.128
^D
10.0.0.0 - 10.0.31.255
10.0.255.0 - 10.0.255.255
10.1.0.0 - 10.1.1.255
10.1.2.0 - 10.1.2.255
10.1.3.0 - 10.1.3.127
.fi


.SH AUTHOR
Horms <horms@verge.net.au>