Aggregating Routes


You want to aggregate some of the routes in the routing table to reduce the size of the tables and to minimize the amount of routing-information advertisements between routers.


Configure an aggregate route that covers the specific routes beneath it:

	[edit routing-options]
	aviva@router1# set aggregate route



In this recipe, the routing table contains prefixes for and, which aggregate as Unlike static routes, you do not specify a next hop in the set aggregate route command, because aggregate routes are not "real" routes but rather are just route summaries. The default next hop is reject. Aggregate routes become active if a more specific route beneath them becomes active. For example, if becomes active, the aggregate also becomes active, and you then see it in the routing table:

	aviva@RouterJ> show route
	inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
	+ = Active Route, - = Last Active, * = Both *[Aggregate/130] 00:00:03
	 Reject *[Direct/0] 00:01:30
	 > via fe-1/0/1.0 *[Local/0] 00:01:30
	 Local via fe-1/0/1.0 *[Direct/0] 00:01:30
	 > via fe-1/0/0.0 *[Local/0] 00:01:30
	 Local via fe-1/0/0.0 *[Direct/0] 1d 21:12:45
	 > via fe-0/0/0.0 *[Local/0] 1d 21:12:45
	 Local via fe-0/0/0.0 *[Direct/0] 00:01:30
	 > via lo0.0

This output shows that the aggregate route has a default next hop of Reject, which drops any traffic addressed to it and sends an ICMP unreachable message back to the sender. If you are concerned about malicious hackers using the ICMP messages to gain information about your network and routers, change the next hop to discard so that no ICMP unreachable messages are sent:

	[edit routing-options]
	aviva@router1# set aggregate route discard

Use the show route command to verify the change:

	aviva@RouterJ> show route protocol aggregate
	inet.0: 11 destinations, 11 
routes (11 active, 0 holddown, 0 hidden)
	+ = Active Route, - = Last Active, * = Both *[Aggregate/130] 00:01:45

When the aggregate route is active, it is installed in the forwarding table as a discard route:

	aviva@RouterJ> show route forwarding-table matching
	Routing table: inet
	Destination Type RtRef Next hop Type Index NhRef Netif user 0 dscd 12 1 intf 0 rslv 338 1 fe-1/0/1.0 dest 0 recv 336 1 fe-1/0/1.0 intf 0 locl 337 2 dest 0 locl 337 2 dest 0 bcst 335 1 fe-1/0/1.0 intf 0 rslv 334 1 fe-1/0/0.0 dest 0 recv 332 1 fe-1/0/0.0 intf 0 locl 333 2 dest 0 locl 333 2 dest 0 bcst 327 1 fe-1/0/0.0

Router Configuration and File Management

Basic Router Security and Access Control





Router Interfaces

IP Routing

Routing Policy and Firewall Filters







IP Multicast

JUNOS Cookbook
Junos Cookbook (Cookbooks (OReilly))
ISBN: 0596100140
EAN: 2147483647
Year: 2007
Pages: 290
Authors: Aviva Garrett © 2008-2020.
If you may any questions please contact us: