-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathaggregate-routes
25 lines (22 loc) · 1.94 KB
/
aggregate-routes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#Policy prevents BGP from generating an aggregate route. Useful for annouuncing a smaller subnet from a different ASN.
set policy-options policy-statement AGGREGATE_FROM_DIRECT_STATIC_OSPF term FROM_DIRECT from protocol direct
set policy-options policy-statement AGGREGATE_FROM_DIRECT_STATIC_OSPF term FROM_DIRECT then accept
set policy-options policy-statement AGGREGATE_FROM_DIRECT_STATIC_OSPF term FROM_STATIC from protocol static
set policy-options policy-statement AGGREGATE_FROM_DIRECT_STATIC_OSPF term FROM_STATIC then accept
set policy-options policy-statement AGGREGATE_FROM_DIRECT_STATIC_OSPF term FROM_OSPF from protocol ospf
set policy-options policy-statement AGGREGATE_FROM_DIRECT_STATIC_OSPF term FROM_OSPF then accept
set policy-options policy-statement AGGREGATE_FROM_DIRECT_STATIC_OSPF term FROM_OSPF3 from protocol ospf3
set policy-options policy-statement AGGREGATE_FROM_DIRECT_STATIC_OSPF term FROM_OSPF3 then accept
set policy-options policy-statement AGGREGATE_FROM_DIRECT_STATIC_OSPF term DEFAULT_REJECT then reject
#Will still take bgp routes into consideration for aggregate generation
set policy-options policy-statement aggregate-from-direct-static-ospf from protocol direct
set policy-options policy-statement aggregate-from-direct-static-ospf from protocol static
set policy-options policy-statement aggregate-from-direct-static-ospf from protocol ospf
set policy-options policy-statement aggregate-from-direct-static-ospf from protocol ospf3
set policy-options policy-statement aggregate-from-direct-static-ospf then accept
set routing-options aggregate route 209.0.0.0/20 community 65001:65001
set routing-options aggregate route 209.0.0.0/20 discard
set routing-options aggregate route 209.0..0.0/20 policy aggregate-from-direct-static-ospf
set routing-options aggregate route 97.0.0.0/24 policy AGGREGATE_FROM_DIRECT_STATIC_OSPF
set routing-options aggregate route 97.0.0.0/24 tag 123456
set routing-options aggregate route 97.0.0.0/24 discard