route-filter-list
route-filter-list
route-filter-list route-filter-list-name { ip-addresses <exact | longer | orlonger | prefix-length-range | through | upto> label range start : end; ip-addresses <exact | longer | orlonger | prefix-length-range | through | upto> label-allocation-fallback-reject; ip-addresses exact label value; ip-addresses exact label-allocation-fallback-reject;
Hierarchy Level
[edit logical-systems logical-system-name policy-options], [edit policy-options]
route-filter-list (usage)
route-filter-list route-filter-list-name;
Hierarchy Level
[edit logical-systems logical-system-name policy-statement policy-statement-name term term-name from], [edit policy-options policy-statement policy-statement-name term term-name from]
Description
The route filter list is a user-configured list of individual route filters that you
create at the [edit policy-options]
hierarchy level. Each item in the list consists
of a complete route filter statement, made up of a destination prefix, a match type, and an
optional action. You can re-use the list in different policies, adding whatever qualifiers
you need, rather than having to re-create it for every different case, as shown in the examples
below.
[edit] user@router# show policy-options route-filter-list rf-test-list 203.0.113.0/24 address-mask 255.255.255.0; 192.0.2.0/26 orlonger reject; 198.51.100.8/29 exact accept;
Once configured, the route-filter-list
is used by referencing its route-filter-list-name
in a policy-statement
at the [edit
policy-options policy-statement policy-statement-name term term-name from]
hierarchy level. Route filter lists can be used in conjunction
with other route-filter
statements.
For example:
[edit] user@router# show policy-options policy-statement test-route-filter-list-statement from { route-filter 198.51.100.32/29 exact accept; route-filter 192.0.2.1/32 exact; route-filter-list rf-test-list; } then reject;
If one action is associated with the route-filter-list
entry and another
action is associated with the list-level entry, the action associated with the list-level
entry takes precedence.
policy-options { route-filter-list RFL-1 { 198.1.1.0/24 exact; 198.2.1.0/24 orlonger; } route-filter-list RFL-2 { 198.1.1.0/24 exact reject; 198.2.1.0/24 orlonger accept; } policy-statement pol { term 1 { from { route-filter-list RFL-1 longer accept; } } term 2 { from { route-filter-list RFL-2 longer reject; } } } }
Here is an example on how to specify policy-based control for BGP-LU labels being allocated for a given prefix:
[edit] user@host# show policy-options route-filter-list rfl-1{ 198.51.1.1/32 exact { label 1000101; next-hop 198.52.1.2; accept; label-allocation-fallback-reject; } 198.51.1.0/24 prefix-length-range /24-/32 { label range 1000000:1000200; next-hop 198.53.2.2; accept; } }
[edit] user@host# show policy-options policy-statement p-1{ from { route-filter-list rfl-1; } then accept; }
[edit] user@host# show protocols bgp group ibgp{ type internal; local-address 198.0.23.3; family inet { labeled-unicast { per-prefix-label; } } neighbor 198.0.12.1 { export p-1; } }
Options
When specifying a match prefix, you can specify an exact match with a particular route or a less precise match. You can configure either a common action that applies to the entire list or an action associated with each prefix.
list-name
—Name of route-filter-list of routes to match.exact
—Exactly match the prefix length.longer
—Mask is greater than the prefix length.orlonger
—Mask is greater than or equal to the prefix length.prefix-length-range
—Mask falls between two prefix lengths.upto
—Mask falls between two prefix length.
Required Privilege Level
routing—To view this statement in the configuration.
routing-control—To add this statement to the configuration.
Release Information
Statement introduced in Junos OS Release 16.1.
Support on PTX1000, PTX10000, and PTX10003 Packet Transport Routers introduced in Junos
OS Release 20.2R1 for the following list-level qualifiers: exact
, longer
, orlonger
, prefix-length-range
, and upto
.