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;
层次结构级别
[edit logical-systems logical-system-name policy-options], [edit policy-options]
路由过滤器列表(用法)
route-filter-list route-filter-list-name;
层次结构级别
[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]
描述
路由过滤器列表是在层次结构级别创建 [edit policy-options]
的各个路由过滤器的用户配置列表。列表中的每一项都包含一个完整的路由筛选语句,该语句由目标前缀、匹配类型和可选操作组成。您可以在不同的策略中重复使用该列表,添加所需的任何限定符,而不必为每个不同的情况重新创建它,如以下示例所示。
[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;
配置后,通过在层次结构级别引用[edit policy-options policy-statement policy-statement-name term term-name from]
它route-filter-list-name
policy-statement
来使用 。route-filter-list
路由过滤器列表可与其他route-filter
语句结合使用。
例如:
[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;
如果一个操作与该 route-filter-list
条目关联,而另一个操作与列表级条目关联,则与该列表级条目关联的操作优先。
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; } } } }
下面是有关如何为为给定前缀分配的 BGP-LU 标签指定基于策略的控制的示例:
[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; } }
选项
指定匹配前缀时,可以指定与特定路由的完全匹配或不太精确的匹配。您可以配置适用于整个列表的常用操作,也可以配置与每个前缀关联的操作。
list-name
- 要匹配的路由的路由过滤器列表的名称。exact
- 与前缀长度完全匹配。longer
- 掩码大于前缀长度。orlonger
- 掩码大于或等于前缀长度。prefix-length-range
- 掩码介于两个前缀长度之间。upto
- 掩码介于两个前缀长度之间。
所需权限级别
路由 - 在配置中查看此语句。
路由控制 - 将此语句添加到配置中。
发布信息
Junos OS 16.1 版中引入的语句。
Junos OS 20.2R1 版中引入的 PTX1000、PTX10000 和 PTX10003 数据包传输路由器支持以下列表级限定符:exact
、 、 、 prefix-length-range
longer
orlonger
和 。upto