aggregate: examples

| Main | Download | CVS | Examples | | More Projects | About the Author |

Some examples of how aggregate may be used.

Example 1: Aggregate some prefixes
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
Example 2: Aggregate some prefixes ignoring anything smaller than a /24
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
Example 3: Same as example 1 but input is in netmask format and output is in range format
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

| Horms Solutions | Simon Horman's Personal Page |

Copyright © 1995-2022 Simon Horman
Copyright © 2010-2022 Horms Solutions Ltd.
All rights reserved unless otherwise noted