show route aspath-regex
语法
show route aspath-regex regular-expression <logical-system (all | logical-system-name)>
语法(EX 系列交换机)
show route aspath-regex regular-expression
描述
显示路由表中与指定的自治系统 (AS) 路径正则表达式匹配的条目。
选项
regular-expression | 匹配整个 AS 路径的正则表达式。 |
logical-system (all | logical-system-name) | (可选)在所有逻辑系统或特定逻辑系统上执行此操作。 |
其他信息
您可以将正则表达式指定为:
单个 AS 编号
用于代替 AS 编号的句点通配符
括在括号中的 AS 路径正则表达式
您还可以包括《 Junos 策略框架配置指南》的 AS 路径正则表达式运算符表中所述的运算符。以下列表总结了这些运算符:
{m,n}
- 至少 m 且最多 n 重复 AS 路径术语。{m}
— AS 路径术语的精确 m 重复。{m,}
—m 或 AS 路径术语的多次重复。*
— AS 路径术语的零个或多个重复。+
— AS 路径术语的一个或多个重复。?
— AS 路径术语的零个或一个重复。aspath_term
|
aspath_term
— 匹配两个 AS 路径术语之一。如果指定多个 AS 编号或路径术语,或者在正则表达式中包含运算符,请用引号将整个正则表达式括起来。例如,要匹配包含编号 AS 编号 234 的任何路径,请指定以下命令:
show route aspath-regex ".* 234 .*"
所需权限级别
视图
输出字段
有关输出字段的信息,请参阅 show route 命令的输出字段表。
示例输出
显示路由 aspath-regex(匹配特定 AS 编号)
user@host> show route aspath-regex 65477 inet.0: 46411 destinations, 46411 routes (46409 active, 0 holddown, 2 hidden) + = Active Route, - = Last Active, * = Both 111.222.1.0/25 *[BGP/170] 00:08:48, localpref 100, from 111.222.2.24 AS Path: [65477] ({65548 65536}) IGP to 111.222.18.225 via fpa0.0(111.222.18.233) 111.222.1.128/25 *[IS-IS/15] 09:15:37, metric 37, tag 1 to 111.222.18.225 via fpa0.0(111.222.18.233) [BGP/170] 00:08:48, localpref 100, from 111.222.2.24 AS Path: [65477] ({65548 65536}) IGP to 111.222.18.225 via fpa0.0(111.222.18.233) ...
显示路由 aspath-regex(匹配具有两个 AS 编号的任何路径)
user@host> show route aspath-regex ".* 234 3561 .*" inet.0: 46351 destinations, 46351 routes (46349 active, 0 holddown, 2 hidden) + = Active Route, - = Last Active, * = Both 9.20.0.0/17 *[BGP/170] 01:35:00, localpref 100, from 131.103.20.49 AS Path: [666] 234 3561 2685 2686 Incomplete to 192.156.169.1 via 192.156.169.14(so-0/0/0) 12.10.231.0/24 *[BGP/170] 01:35:00, localpref 100, from 131.103.20.49 AS Path: [666] 234 3561 5696 7369 IGP to 192.156.169.1 via 192.156.169.14(so-0/0/0) 24.64.32.0/19 *[BGP/170] 01:34:59, localpref 100, from 131.103.20.49 AS Path: [666] 234 3561 6327 IGP to 192.156.169.1 via 192.156.169.14(so-0/0/0) ...
发布信息
在 Junos OS 7.4 版之前引入的命令。