hi,
> Exactly, there are hidden aggregates, what does it mean?
http://www.juniper.net/techpubs/en_US/junos/topics/concept/hidden-routes-understanding.html says:
Hidden routes are routes that the device cannot use for reasons such as an invalid next hop or a routing policy that rejects the routes.
In your case to make aggregates active, Junos requires to have active contributing routes (more specific routes). For 1.2.104.0/26 it may any subnet of the prefix, like 1.2.104.0/27, 1.2.104.1/32, etc.
The router needs to have a route to any subnet 'covered' by the aggregate. It must be more specific (smaller net) then the aggregate - your static routes are the same as aggregates.
Let's test the config.
1) Just aggregates, no contributing routes. The aggregates are hidden (non usable):
admin@Junos# show routing-options
aggregate {
route 1.2.104.0/26;
route 1.2.104.128/25;
}
admin@Junos# run show route 1.2.104.0/26
inet.0: 4 destinations, 4 routes (2 active, 0 holddown, 2 hidden)
[edit]
admin@Junos# run show route 1.2.104.128/25
inet.0: 4 destinations, 4 routes (2 active, 0 holddown, 2 hidden)
admin@Junos# run show route hidden detail
inet.0: 4 destinations, 4 routes (2 active, 0 holddown, 2 hidden)
1.2.104.0/26 (1 entry, 0 announced)
Aggregate
Next hop type: Reject
Address: 0x24dfbd4
Next-hop reference count: 2
State: <Hidden Int Ext>
Age: 1:03
Validation State: unverified
Task: Aggregate
AS path: I
Flags: Depth: 0 Inactive
1.2.104.128/25 (1 entry, 0 announced)
Aggregate
Next hop type: Reject
Address: 0x24dfbd4
Next-hop reference count: 2
State: <Hidden Int Ext>
Age: 1:03
Validation State: unverified
Task: Aggregate
AS path: I
Flags: Depth: 0 Inactive
[edit]
admin@Junos#
2) Let's add your static routes - equal to aggregates (not valid contributing routes).
Static routes are active (and can be exported in BGP policy)
Aggregates are hidden (can't be exported)
admin@Junos# show routing-options
static {
route 1.2.104.0/26 discard;
route 1.2.104.128/25 discard;
}
aggregate {
route 1.2.104.0/26;
route 1.2.104.128/25;
}
[edit]
admin@Junos# run show route 1.2.104.0/26 exact
inet.0: 4 destinations, 6 routes (4 active, 0 holddown, 2 hidden)
+ = Active Route, - = Last Active, * = Both
1.2.104.0/26 *[Static/5] 00:01:47
Discard
[edit]
admin@Junos# run show route 1.2.104.128/25 exact
inet.0: 4 destinations, 6 routes (4 active, 0 holddown, 2 hidden)
+ = Active Route, - = Last Active, * = Both
1.2.104.128/25 *[Static/5] 00:01:56
Discard
[edit]
admin@Junos#
admin@Junos# run show route 1.2.104.0/26 exact all
inet.0: 4 destinations, 6 routes (4 active, 0 holddown, 2 hidden)
+ = Active Route, - = Last Active, * = Both
1.2.104.0/26 *[Static/5] 00:02:19
Discard
[Aggregate] 00:00:45
Reject
[edit]
admin@Junos# run show route 1.2.104.128/25 exact all
inet.0: 4 destinations, 6 routes (4 active, 0 holddown, 2 hidden)
+ = Active Route, - = Last Active, * = Both
1.2.104.128/25 *[Static/5] 00:02:25
Discard
[Aggregate] 00:00:51
Reject
[edit]
admin@Junos#
admin@Junos# run show route protocol aggregate 1.2.104.0/26 all detail
inet.0: 4 destinations, 6 routes (4 active, 0 holddown, 2 hidden)
1.2.104.0/26 (2 entries, 1 announced)
Aggregate
Next hop type: Reject
Address: 0x24dfbd4
Next-hop reference count: 2
State: <Hidden Int Ext>
Inactive reason: Unusable path
Age: 1:24
Validation State: unverified
Task: Aggregate
AS path: I
Flags: Depth: 0 Inactive
[edit]
admin@Junos# run show route protocol aggregate 1.2.104.128/25 all detail
inet.0: 4 destinations, 6 routes (4 active, 0 holddown, 2 hidden)
1.2.104.128/25 (2 entries, 1 announced)
Aggregate
Next hop type: Reject
Address: 0x24dfbd4
Next-hop reference count: 2
State: <Hidden Int Ext>
Inactive reason: Unusable path
Age: 1:41
Validation State: unverified
Task: Aggregate
AS path: I
Flags: Depth: 0 Inactive
[edit]
admin@Junos#
3) let's change the static routes to be more specific.
Now aggregates are active as expected and will be exported by the BGP policy.
admin@Junos# show routing-options
static {
route 1.2.104.0/30 discard;
route 1.2.104.128/30 discard;
}
aggregate {
route 1.2.104.0/26;
route 1.2.104.128/25;
}
admin@Junos# run show route 1.2.104.0/26
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.2.104.0/26 *[Aggregate/130] 00:05:56
Reject
1.2.104.0/30 *[Static/5] 00:01:27
Discard
[edit]
admin@Junos# run show route 1.2.104.128/25
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.2.104.128/25 *[Aggregate/130] 00:05:59
Reject
1.2.104.128/30 *[Static/5] 00:01:30
Discard
admin@Junos# run show route 1.2.104.0/26 exact detail
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
1.2.104.0/26 (1 entry, 1 announced)
*Aggregate Preference: 130
Next hop type: Reject
Address: 0x24dfbd4
Next-hop reference count: 4
State: <Active Int Ext>
Age: 6:17
Validation State: unverified
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):
1.2.104.0/30 proto Static
[edit]
admin@Junos# run show route 1.2.104.128/25 exact detail
inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
1.2.104.128/25 (1 entry, 1 announced)
*Aggregate Preference: 130
Next hop type: Reject
Address: 0x24dfbd4
Next-hop reference count: 4
State: <Active Int Ext>
Age: 6:25
Validation State: unverified
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):
1.2.104.128/30 proto Static
[edit]
admin@Junos#
> The router advertise 1.2.104.0/26 but not 1.2.104.128/25. I think it is because the router has a network interface with the address 1.2.104.1/28.
correct
> With regards to 1.2.104.128/25, how can I change the contributing static routes to be more specific?
see example above, hope that helps.
Play with the config and verify results.
jtb