ipaggmanip
Manage IP aggregation links
TLDR
Combine labels equal in their high-order bits
Remove labels with a count smaller than a given number of bytes and output a random sample of such labels
Replace each label's count with 1 if it is non-zero
SYNOPSIS
ipaggmanip { add | del | flush } PREFIX dev STRING [ table TABLEID ]
ipaggmanip { list | flush } [ PREFIX ] [ table TABLEID ]
PARAMETERS
add
Add new aggregate prefix to routing table.
del | delete
Delete specified aggregate prefix.
list | show | lst
List all or matching aggregate prefixes.
flush
Delete all or matching aggregate prefixes.
PREFIX
CIDR prefix (e.g., 10.0.0.0/8) or 'default'; required for add/del.
dev STRING
Network device name (e.g., lo, eth0); required for add/del.
table TABLEID
Routing table ID (default: main, numeric or name).
DESCRIPTION
ipaggmanip is a command-line tool from the iproute2 suite for adding, deleting, listing, and flushing aggregate IP prefixes in the Linux kernel's routing table (FIB). Aggregate routes summarize multiple more specific routes into one entry, reducing table size and enabling efficient routing for IP ranges, such as in BGP aggregation, default routing, or blackholing unroutable traffic.
These routes are tied to a network device and optionally a routing table. When a packet matches an aggregate prefix but no more specific route exists, it is forwarded to the specified device. This differs from standard routes managed by ip route, as aggregates suppress specifics unless overridden.
Common use cases include core routers for scalability or firewalls for traffic control. The tool requires kernel IPv4 routing support and root privileges. Output from list shows prefix, device, table, and flags.
CAVEATS
Requires root privileges.
IPv4 only; kernel must support aggregates (IP_MULTICAST, routing cache).
Aggregates suppress more specific routes unless metric/preference adjusted.
<B>EXAMPLES</B>
ipaggmanip add 192.168.0.0/16 dev lo table main
ipaggmanip list 10.0.0.0/8
ipaggmanip flush table 100
<B>FLAGS</B>
list output includes flags like A (active), table, device, refcount.
HISTORY
Developed by Alexey N. Kuznetsov; part of iproute2 since early 2000s, now maintained by Linux Foundation for modern networking.


