An aggregate route is a route you define but which is not used for forwarding traffic (next-hop is discard or reject).
Only if there are more specific routes (contributing routes) will the aggregate be active in the routing table and therefore available for use in the export policy.
root@SRX# set routing-options aggregate route 2.2.0.0/16
root@SRX> show route protocol aggregate detail
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
2.2.0.0/16 (1 entry, 1 announced)
*Aggregate Preference: 130
Next hop type: Reject
Address: 0x11717f0
Next-hop reference count: 3
State: <ACTIVE int="" ext="">
Age: 13
Task: Aggregate
Announcement bits (1): 0-KRT
AS path: I (LocalAgg)
Flags: Depth: 0 Active
AS path list:
AS path: I Refcount: 1
Contributing Routes (1):
2.2.2.0/30 proto Direct
Generate routes are almost similar to aggregate routes as they have the same preference of 130 and even show up with the show route protocol aggregate command (there is no protocol generate option).
The difference between an aggregate route and generate route is that generate route can use the next-hop of its primary contributing route, so it can have a real next-hop (discard is also option). This also means that only routes with a real-next hop can contribute to an generate route!!
Since we have a valid next-hop with generate route it can forward traffic.
Traffic which matches the generated route (and not more specific routes) will be forwarded using the same next-hop as the first contributing route. A generated-route is typically combined with a policy to match which routes we want to be contributing and thus used as NHs.
The generated-route is typically the default 0/0 with a policy matching to upstream routes - ie: provide connectivity if certain upstream routes exist.</ACTIVE>