PBR
nv show interface <interface-id> router pbr
显示指定接口的 PBR 配置设置。
命令语法
语法 | 描述 |
---|---|
<interface-id> | 接口名称。 |
版本历史
Cumulus Linux 5.0.0 中引入
示例
cumulus@switch:~$ nv show interface swp51 router pbr
operational applied
----- ----------- -------
[map] MAP1 MAP1
nv show interface <interface-id> router pbr map
显示为指定接口配置的 PBR 路由图。
命令语法
语法 | 描述 |
---|---|
<interface-id> | 接口名称。 |
版本历史
Cumulus Linux 5.1.0 中引入
示例
cumulus@switch:~$ nv show interface swp51 router pbr map
valid
---- -----
MAP1 on
nv show interface <interface-id> router pbr map <pbr-map-id>
显示指定接口上特定 PBR 路由图的配置设置。
命令语法
语法 | 描述 |
---|---|
<interface-id> | 接口名称。 |
<pbr-map-id> | 路由图名称。 |
版本历史
Cumulus Linux 5.1.0 中引入
示例
cumulus@switch:~$ nv show interface swp51 router pbr map map1
operational applied
----- ----------- -------
valid on
nv show router pbr
显示全局 PBR 配置设置。
版本历史
Cumulus Linux 5.0.0 中引入
示例
cumulus@switch:~$ nv show router pbr
operational applied
------ ----------- -------
enable on
[map] map1 map1
nv show router pbr map
显示 PBR 路由图的设置。如果您未提供特定的路由图名称,则此命令将显示所有已配置 PBR 路由图的配置设置。
版本历史
Cumulus Linux 5.0.0 中引入
示例
cumulus@switch:~$ nv show router pbr map
Rule - Rule number, IP-RuleId - Kernel IP rule table id, Installed - Install
state, Match - Match criteria, NHG - Nexthop group, NHG-state - Nexthop group
install state, NHG-tableId - Nexthop group table id, Vrf - VRF name, Reason -
Policy installation reason
Map Rule IP-RuleId Installed valid Match NHG NHG-state NHG-tableId Vrf Reason
------------------- ---- --------- --------- ----- ------------------------------ ------ --------- ----------- --- ------
POLICY_PBR_ISP 21 320 yes yes source-ip: 10.0.160.0/23 group1 on 10000 Valid
23 322 yes source-ip: 10.0.162.0/23 group1 on 10000 Valid
24 323 yes source-ip: 10.0.164.0/23 group1 on 10000 Valid
25 324 yes source-ip: 10.0.166.0/23 group1 on 10000 Valid
26 325 yes source-ip: 10.0.168.0/23 group1 on 10000 Valid
31 330 yes source-ip: 10.0.172.0/23 group2 on 10001 Valid
32 331 yes source-ip: 10.0.174.0/23 group2 on 10001 Valid
33 332 yes source-ip: 10.0.176.0/23 group2 on 10001 Valid
34 333 yes source-ip: 10.0.178.0/23 group2 on 10001 Valid
35 334 yes source-ip: 10.0.180.0/23 group2 on 10001 Valid
36 335 yes destination-ip: 190.1.1.128/28 group2 on 10001 Valid
source-ip: 10.0.182.0/24
POLICY_PBR_ISP_DSCP 10 309 yes yes dscp: 20 group1 on 10000 Valid
11 310 yes dscp: 24 group1 on 10000 Valid
12 311 yes dscp: 28 group2 on 10001 Valid
nv show router pbr map <pbr-map-id>
显示用于策略配置的 PBR 路由图的配置设置。
命令语法
语法 | 描述 |
---|---|
<pbr-map-id> | 路由图的名称。 |
版本历史
Cumulus Linux 5.0.0 中引入
示例
cumulus@switch:~$ nv show router pbr map map1
POLICY_PBR_ISP
operational applied
----- ----------- -------
valid yes
rule
=======
action.vrf installed installed-reason ip-rule-id match.destination-ip match.dscp match.ecn match.source-ip Summary
-- ---------- --------- ---------------- ---------- -------------------- ---------- --------- --------------- ----------------------
21 yes Valid 320 10.0.160.0/23 Nexthop-groups: group1
23 yes Valid 322 10.0.162.0/23 Nexthop-groups: group1
24 yes Valid 323 10.0.164.0/23 Nexthop-groups: group1
25 yes Valid 324 10.0.166.0/23 Nexthop-groups: group1
26 yes Valid 325 10.0.168.0/23 Nexthop-groups: group1
31 yes Valid 330 10.0.172.0/23 Nexthop-groups: group2
32 yes Valid 331 10.0.174.0/23 Nexthop-groups: group2
33 yes Valid 332 10.0.176.0/23 Nexthop-groups: group2
34 yes Valid 333 10.0.178.0/23 Nexthop-groups: group2
35 yes Valid 334 10.0.180.0/23 Nexthop-groups: group2
36 yes Valid 335 190.1.1.128/28 10.0.182.0/24 Nexthop-groups: group2
nv show router pbr map <pbr-map-id> rule
显示指定 PBR 路由图的规则。
在命令末尾添加 -o json
以查看更易读格式的输出。
命令语法
语法 | 描述 |
---|---|
<pbr-map-id> | 路由图的名称。 |
版本历史
Cumulus Linux 5.0.0 中引入
示例
cumulus@switch:~$ nv show router pbr map map1 rule -o json
{
"1": {
"action": {
"nexthop-group": {
"group1": {
"installed": "off",
"table-id": 10000
}
}
},
"installed": "off",
"installed-reason": "Invalid NH-group",
"ip-rule-id": 300,
"match": {
"source-ip": "0.0.0.0/0"
}
}
}
nv show router pbr map <pbr-map-id> rule <rule-id>
显示 PBR 路由图的匹配和设置条件以及规则操作。
命令语法
语法 | 描述 |
---|---|
<pbr-map-id> | 路由图的名称。 |
<rule-id> | PBR 规则编号。 |
版本历史
Cumulus Linux 5.0.0 中引入
示例
cumulus@switch:~$ nv show router pbr map map1 rule 1
operational applied
----------------- ---------------- ---------
action
[nexthop-group] group1 group1
match
source-ip 0.0.0.0/0 0.0.0.0/0
installed off
installed-reason Invalid NH-group
ip-rule-id 300
nv show router pbr map <pbr-map-id> rule <rule-id> action
显示 PBR 路由图的规则操作。
命令语法
语法 | 描述 |
---|---|
<pbr-map-id> | 路由图名称。 |
<rule-id> | PBR 规则编号。 |
版本历史
Cumulus Linux 5.0.0 中引入
示例
cumulus@switch:~$ nv show router pbr map map1 rule 1 action
POLICY_PBR_ISP rule 21 action
nexthop-group
================
Nexthop-groups installed table-id
-------------- --------- --------
group1 on 10000
nv show router pbr map <pbr-map-id> rule <rule-id> action nexthop-group
显示 PBR 路由图规则操作中的下一跳组。
命令语法
语法 | 描述 |
---|---|
<pbr-map-id> | 路由图名称。 |
<rule-id> | PBR 规则编号。 |
版本历史
Cumulus Linux 5.1.0 中引入
示例
cumulus@switch:~$ nv show router pbr map map1 rule 1 action nexthop-group
POLICY_PBR_ISP rule 21 action nexthop-group
Nexthop-groups installed table-id
-------------- --------- --------
group1 on 10000
nv show router pbr map <pbr-map-id> rule <rule-id> action nexthop-group <nexthop-group-id>
显示指定下一跳组的配置设置,包括默认路由的 IP 路由表编号。
命令语法
语法 | 描述 |
---|---|
<pbr-map-id> | 路由图名称。 |
<rule-id> | PBR 规则编号。 |
<nexthop-group-id> | 下一跳组名称。 |
版本历史
Cumulus Linux 5.1.0 中引入
示例
cumulus@switch:~$ nv show router pbr map map1 rule 1 action nexthop-group group1
operational applied
--------- ----------- -------
installed off
table-id 5000
nv show router pbr map <pbr-map-id> rule <rule-id> match
显示 PBR 路由图的规则匹配条件。
命令语法
语法 | 描述 |
---|---|
<pbr-map-id> | 路由图名称。 |
<rule-id> | PBR 规则编号。 |
版本历史
Cumulus Linux 5.0.0 中引入
示例
cumulus@switch:~$ nv show router pbr map map1 rule 1 match
operational applied
--------- ----------- ---------
source-ip 0.0.0.0/0 0.0.0.0/0
nv show router pbr nexthop-group
显示交换机上配置的 PBR 下一跳组。
版本历史
Cumulus Linux 5.6.0 中引入
示例
cumulus@switch:~$ nv show router pbr nexthop-group
Nexthop-groups installed valid Summary
-------------- --------- ----- ----------------
group1 yes yes Nexthop-index: 1
Nexthop-index: 2
nv show router pbr nexthop-group <nexthop-group-id>
显示有关特定 PBR 下一跳组的信息。
命令语法
语法 | 描述 |
---|---|
<nexthop-group-id> | 下一跳组 ID。 |
版本历史
Cumulus Linux 5.6.0 中引入
示例
cumulus@switch:~$ nv show router pbr nexthop-group group1
operational applied
--------- ----------- -------
installed no
valid no
nexthop
==========
Nexthop-index label nexthop target-vrf valid vrf weight
------------- ----- ------------ ---------- ----- ---- ------
1 192.168.0.22 no
2 192.168.0.21 no swp1
nv show system global reserved routing-table pbr
显示 PBR 保留路由表范围。
版本历史
Cumulus Linux 5.0.0 中引入
示例
cumulus@switch:~$ nv show system global reserved routing-table pbr
operational applied
----- ----------- ----------
begin 10000 10000
end 4294966272 4294966272