检查
提供三组验证命令,全部用于验证网络协议和服务的健康状况和性能
netq check
命令。 这些命令检查您的网络的设备、主机、网络协议和服务是否按预期运行。 它们根据理想设置“验证”您的网络,并报告不匹配项和建议。 它们允许按主机名过滤,可以包括或排除选定的测试,并且有些还具有其他选项。netq add validation
命令。 使用这些命令来验证网络结构中的各种元素。 结果会显示在 UI 中的“验证结果”卡片中,您可以在其中过滤它们。- 验证管理命令。
netq show validation settings
显示所有作业和作业设置的列表,netq del validation
允许您删除验证。
有关作为每个验证一部分运行的测试的描述,请参阅验证测试参考。
netq check addresses
搜索分配给清单中设备接口的重复 IPv4 和 IPv6 地址,并检查每个 VRF 中是否有重复的 /32 主机路由。
语法
netq check addresses
[label <text-label-name> | hostnames <text-list-hostnames>]
[check_filter_id <text-check-filter-id>]
[include <addr-number-range-list> | exclude <addr-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
标签 | <文本标签名称> | 保留 |
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <代理编号范围列表> | 包括指定的验证测试 |
exclude | <代理编号范围列表> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 格式显示输出 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
cumulus@switch:mgmt:~$ netq check addresses
addr check result summary:
Total nodes : 25
Checked nodes : 25
Failed nodes : 0
Rotten nodes : 0
Warning nodes : 0
Skipped Nodes : 0
IPV4 Duplicate Address Test : passed
IPV6 Duplicate Address Test : passed
相关命令
netq show address-history
netq add validation
netq check agents
验证网络结构中运行 NetQ 代理的所有节点(叶子节点、脊柱节点和主机)的通信状态。 输出显示所有测试的状态(通过/失败/跳过)以及摘要,包括
- 找到的节点总数
- 已验证的节点数
- 验证失败的节点数
- 已静默 120 秒(陈旧)的节点数
- 有警告的节点数
语法
netq check agents
[hostnames <text-list-hostnames>]
[check_filter_id <text-check-filter-id>]
[include <agents-number-range-list> | exclude <agents-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <代理编号范围列表> | 包括指定的验证测试 |
exclude | <代理编号范围列表> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 格式显示输出 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
在所有设备上运行所有测试的基本验证
cumulus@switch:~$ netq check agents
agent check result summary:
Total nodes : 21
Checked nodes : 21
Failed nodes : 0
Rotten nodes : 0
Warning nodes : 0
Agent Health Test : passed
选定设备的验证
cumulus@switch:~$ netq check agents hostnames leaf01,leaf02,leaf03,leaf04
agent check result summary:
Total nodes : 4
Checked nodes : 4
Failed nodes : 0
Rotten nodes : 0
Warning nodes : 0
Agent Health Test : passed
检查 4 小时前设备状态的基本验证
cumulus@switch:~$ netq check agents around 4h
agent check result summary:
Total nodes : 21
Checked nodes : 21
Failed nodes : 0
Rotten nodes : 0
Warning nodes : 0
Agent Health Test : passed
相关命令
netq show agents
netq show unit-tests agent
netq add validation
netq config agent
netq check bgp
通过查找 BGP 会话之间的一致性来验证网络结构中是否已建立所有配置的路由对等; 特别是,是否存在重复的路由器 ID 以及是否有任何会话处于未建立状态。 如果您的节点实施了虚拟路由和转发 (VRF),您可以根据相关的路由表请求状态。 VRF 通常在多租户部署中配置,以为每个租户维护单独的域。
输出显示所有测试的状态(通过/失败/跳过)以及摘要,包括
- 找到的节点总数
- 已验证的节点数
- 验证失败的节点数
- 已静默 120 秒(陈旧)的节点数
- 有警告的节点数
- 指定时间的 BGP 会话总数
- 未能建立连接的会话数
语法
netq check bgp
[label <text-label-name> | hostnames <text-list-hostnames>]
[vrf <vrf>]
[check_filter_id <text-check-filter-id>]
[include <bgp-number-range-list> | exclude <bgp-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
标签 | <文本标签名称> | 保留 |
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
vrf | <vrf> | 当您配置 VRF 时,接受的值包括
|
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <代理编号范围列表> | 包括指定的验证测试 |
exclude | <代理编号范围列表> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 格式显示输出 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
以下示例报告来自“会话建立”测试的 8 个错误。 要修复这些错误,请启动处于关闭状态的项目。 然后重新运行命令以验证新配置。
cumulus@switch:~$ netq check bgp
bgp check result summary:
Total nodes : 13
Checked nodes : 13
Failed nodes : 2
Rotten nodes : 0
Warning nodes : 0
Skipped nodes : 0
Additional summary:
Failed Sessions : 8
Total Sessions : 228
Session Establishment Test : 0 warnings, 8 errors
Address Families Test : passed
Router ID Test : passed
Hold Time Test : passed
Keep Alive Interval Test : passed
Ipv4 Stale Path Time Test : passed
Ipv6 Stale Path Time Test : passed
Interface MTU Test : passed
Session Establishment Test details:
Hostname VRF Peer Name Peer Hostname Reason Last Changed
----------------- --------------- ----------------- ----------------- --------------------------------------------- -------------------------
spine-1 DataVrf1080 swp7.2 tor-1 BGP session with peer tor-1 (swp7.2 vrf DataV Wed May 3 11:12:35 2023
rf1080) failed, reason: BFD down received
spine-1 DataVrf1081 swp7.3 tor-1 BGP session with peer tor-1 (swp7.3 vrf DataV Wed May 3 11:12:35 2023
rf1081) failed, reason: BFD down received
spine-1 DataVrf1082 swp7.4 tor-1 BGP session with peer tor-1 (swp7.4 vrf DataV Wed May 3 11:12:35 2023
rf1082) failed, reason: BFD down received
spine-1 default swp7 tor-1 BGP session with peer tor-1 (swp7 vrf default Wed May 3 11:12:34 2023
) failed, reason: BFD down received
tor-1 DataVrf1080 swp3.2 spine-1 BGP session with peer spine-1 (swp3.2 vrf Dat Wed May 3 11:12:38 2023
aVrf1080) failed, reason: Link Admin Down
tor-1 DataVrf1081 swp3.3 spine-1 BGP session with peer spine-1 (swp3.3 vrf Dat Wed May 3 11:12:38 2023
aVrf1081) failed, reason: Link Admin Down
tor-1 DataVrf1082 swp3.4 spine-1 BGP session with peer spine-1 (swp3.4 vrf Dat Wed May 3 11:12:38 2023
aVrf1082) failed, reason: Link Admin Down
tor-1 default swp3 spine-1 BGP session with peer spine-1 (swp3 vrf defau Wed May 3 11:12:38 2023
lt) failed, reason: Link Admin Down
相关命令
netq show bgp
netq show unit-tests bgp
netq add validation
netq check cl-version
根据选择的选项,验证 Cumulus Linux 版本在节点之间是否一致、是否与指定版本匹配或是否大于或等于指定版本。
语法
netq check cl-version
[label <text-label-name> | hostnames <text-list-hostnames>]
[match-version <cl-ver> | min-version <cl-ver>]
[check_filter_id <text-check-filter-id>]
[include <version-number-range-list> | exclude <version-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
标签 | <文本标签名称> | 保留 |
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
match-version | <cl-ver> | 标识 Cumulus Linux 版本与此选项指定的版本不同的所有交换机。 以x.y.z 格式指定 cl-ver 值,例如 4.2.0。 |
min-version | <cl-ver> | 标识 Cumulus Linux 版本比此选项指定的版本旧的所有交换机。 以x.y.z 格式指定 cl-ver 值,例如 3.7.12。 |
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <代理编号范围列表> | 包括指定的验证测试 |
exclude | <代理编号范围列表> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 格式显示输出 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
cumulus@switch:~$ netq check cl-version
version check result summary:
Total nodes : 21
Checked nodes : 21
Failed nodes : 0
Rotten nodes : 0
Warning nodes : 0
Cumulus Linux Image Version Test : passed
列出与版本不匹配的设备
cumulus@switch:~$ netq check cl-version match-version 3.7.12
version check result summary:
Total nodes : 21
Checked nodes : 21
Failed nodes : 12
Rotten nodes : 0
Warning nodes : 0
Cumulus Linux Image Version Test : 0 warnings, 12 errors
Cumulus Linux Image Version Test details:
Hostname Entity Version Reason
----------------- ------------ ------------------------------------ ---------------------------------------------
border01 OS 4.2.1 unexpected os version 4.2.1, should be 3.7.12
border02 OS 4.2.1 unexpected os version 4.2.1, should be 3.7.12
fw1 OS 4.2.1 unexpected os version 4.2.1, should be 3.7.12
fw2 OS 4.2.1 unexpected os version 4.2.1, should be 3.7.12
leaf01 OS 4.2.1 unexpected os version 4.2.1, should be 3.7.12
leaf02 OS 4.2.1 unexpected os version 4.2.1, should be 3.7.12
leaf03 OS 4.2.1 unexpected os version 4.2.1, should be 3.7.12
leaf04 OS 4.2.1 unexpected os version 4.2.1, should be 3.7.12
spine01 OS 4.2.1 unexpected os version 4.2.1, should be 3.7.12
spine02 OS 4.2.1 unexpected os version 4.2.1, should be 3.7.12
spine03 OS 4.2.1 unexpected os version 4.2.1, should be 3.7.12
spine04 OS 4.2.1 unexpected os version 4.2.1, should be 3.7.12
列出版本大于或等于某个版本的设备
cumulus@switch:~$ netq check cl-version min-version 3.7.12
version check result summary:
Total nodes : 21
Checked nodes : 21
Failed nodes : 0
Rotten nodes : 0
Warning nodes : 0
Cumulus Linux Image Version Test : passed
相关命令
netq show unit-tests cl-version
netq check evpn
验证网络结构中运行以太网 VPN (EVPN) 实例的所有节点(叶子节点、脊柱节点和主机)的通信状态。 特别是,它查找
- BGP 和 EVPN 会话建立
- VNI 类型一致性
- 参与设备之间的 VLAN 一致性
- 参与设备之间的 VRF 一致性
输出显示所有测试的状态(通过/失败/跳过)以及摘要,包括
- 找到的节点总数
- 已验证的节点数
- 验证失败的节点数
- 已静默 120 秒(陈旧)的节点数
- 有警告的节点数
- VNI 总数
- 失败的 BGP 会话数
- 会话总数
语法
netq check evpn
[label <text-label-name> | hostnames <text-list-hostnames>]
[check_filter_id <text-check-filter-id>]
[include <evpn-number-range-list> | exclude <evpn-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
标签 | <文本标签名称> | 保留 |
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <代理编号范围列表> | 包括指定的验证测试 |
exclude | <代理编号范围列表> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 格式显示输出 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
以下示例报告了“EVPN-BGP 会话”测试的错误。 要修复该错误,请启动处于关闭状态的接口。 再次运行测试以验证新配置。
cumulus@switch:~$: netq check evpn
evpn check result summary:
Total nodes : 6
Checked nodes : 6
Failed nodes : 1
Rotten nodes : 0
Warning nodes : 0
Skipped nodes : 0
Additional summary:
Total VNIs : 13
Failed EVPN Sessions: 1
Total EVPN Sessions : 47
EVPN BGP Session Test : 0 warnings, 1 errors
EVPN VNI Type Consistency Test : passed
EVPN Type 2 Test : skipped
EVPN Type 3 Test : passed
EVPN Session Test : passed
Vlan Consistency Test : passed
Vrf Consistency Test : passed
EVPN BGP Session Test details:
Hostname Peer Name Peer Hostname Reason Last Changed
----------------- ----------------- ----------------- --------------------------------------------- -------------------------
tor-1 swp3 spine-1 BGP session with peer spine-1 (swp3 vrf defau Wed May 3 11:12:34 2023
lt) failed, reason: Interface down
相关命令
netq show evpn
netq show unit-tests evpn
netq add validation
netq check interfaces
验证网络结构中所有节点(叶子节点、脊柱节点和主机)或特定节点之间接口的接口通信状态。 特别是,它查找
- 管理和操作状态
- 链路速度一致性
- 自动协商设置的一致性
输出显示所有测试的状态(通过/失败/跳过)以及摘要,包括
- 找到的节点总数
- 已验证的节点数
- 验证失败的节点数
- 已静默 120 秒(陈旧)的节点数
- 有警告的节点数
- 已验证的端口数
- 验证失败的端口数
- 未验证的端口数(未找到节点的对等端口)
此命令仅检查物理接口; 它不检查网桥、绑定或其他软件结构。
语法
netq check interfaces
[hostnames <text-list-hostnames>]
[check_filter_id <text-check-filter-id>]
[include <interface-number-range-list> | exclude <interface-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <代理编号范围列表> | 包括指定的验证测试 |
exclude | <代理编号范围列表> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 文件格式显示输出,而不是默认的屏幕文本格式 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
cumulus@switch:~$ netq check interfaces
interfaces check result summary:
Total nodes : 17
Checked nodes : 17
Failed nodes : 2
Rotten nodes : 0
Warning nodes : 0
Skipped nodes : 0
Additional summary:
Checked Ports : 484
Failed Ports : 6
Admin State Test : Passed.
Oper State Test : Passed.
Speed Test : Passed.
Autoneg Test : 0 warnings, 6 errors
Autoneg Test details:
Hostname Interface Peer Hostname Peer Interface Message Reason Last Changed
----------------- ------------------------- ----------------- ------------------------- ----------------------------------- --------------------------------------------- -------------------------
leaf01 swp1 server01 eth1 Autoneg mismatch (off, on) Autoneg mismatch (off, on) Mon Nov 4 17:53:18 2024
leaf01 swp2 server02 eth1 Autoneg mismatch (off, on) Autoneg mismatch (off, on) Mon Nov 4 17:53:18 2024
leaf01 swp3 server03 eth1 Autoneg mismatch (off, on) Autoneg mismatch (off, on) Mon Nov 4 17:53:18 2024
leaf02 swp1 server01 eth2 Autoneg mismatch (off, on) Autoneg mismatch (off, on) Mon Oct 28 16:28:30 2024
leaf02 swp2 server02 eth2 Autoneg mismatch (off, on) Autoneg mismatch (off, on) Mon Oct 28 16:28:30 2024
leaf02 swp3 server03 eth2 Autoneg mismatch (off, on) Autoneg mismatch (off, on) Mon Oct 28 16:28:30 2024
cumulus@switch:~$ netq check interfaces summary
interfaces check result summary:
Total nodes : 17
Checked nodes : 17
Failed nodes : 2
Rotten nodes : 0
Warning nodes : 0
Skipped nodes : 0
Additional summary:
Checked Ports : 484
Failed Ports : 6
Admin State Test : Passed.
Oper State Test : Passed.
Speed Test : Passed.
Autoneg Test : 0 warnings, 6 errors
此示例检查配置不匹配项,并在 server03 上找到链路速度不匹配项。 swp49 上的链路速度为 40G,对等端口 swp50 显示为未知。
cumulus@switch:~$ netq check interfaces
Checked Nodes: 10, Failed Nodes: 1
Checked Ports: 125, Failed Ports: 2, Unverified Ports: 35
Hostname Interface Peer Hostname Peer Interface Message
----------------- ------------------------- ----------------- ------------------------- -----------------------------------
server03 swp49 server03 swp50 Speed mismatch (40G, Unknown)
server03 swp50 server03 swp49 Speed mismatch (Unknown, 40G)
cumulus@switch:~$ netq check interfaces
Checked Nodes: 18, Failed Nodes: 8
Checked Ports: 741, Failed Ports: 1, Unverified Ports: 414
Matching cables records:
Hostname Interface Peer Hostname Peer Interface Message
----------------- ------------------------- ----------------- ------------------------- -----------------------------------
leaf02 - - - Link flapped 11 times in last 5
mins
相关命令
netq show interfaces physical
netq show unit-tests interfaces
netq add validation
netq check mlag
通过识别 NetQ 域中具有错误或配置错误的 MLAG 对等方来验证 MLAG 会话一致性。 特别是,它查找
- 具有相同系统 MAC 地址的多个链路对
- 任何只有单个附件的接口
- 对等连接
- 冲突的绑定
- 备份 IP 地址是否指向正确的对等方
输出显示所有测试的状态(通过/失败/跳过)以及摘要,包括
- 找到的节点总数
- 已验证的节点数
- 验证失败的节点数
- 已静默 120 秒(陈旧)的节点数
- 有警告的节点数
语法
netq check mlag
[label <text-label-name> | hostnames <text-list-hostnames>]
[check_filter_id <text-check-filter-id>]
[include <mlag-number-range-list> | exclude <mlag-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
标签 | <文本标签名称> | 保留 |
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <代理编号范围列表> | 包括指定的验证测试 |
exclude | <代理编号范围列表> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 文件格式显示输出,而不是默认的屏幕文本格式 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
以下示例在两个设备上运行检查:noc-se
和 noc-pr
。 输出报告了多个错误,包括对等链路 MTU 不匹配、绑定 MTU 不匹配、处于冲突状态的绑定和单连接绑定。 要解决这些错误,请重新配置不匹配的值并启动处于关闭状态的绑定接口。 然后再次运行命令以验证新配置。
cumulus@switch:~$ netq check mlag hostnames noc-se,noc-pr
mlag check result summary:
Total nodes : 2
Checked nodes : 2
Failed nodes : 2
Rotten nodes : 0
Warning nodes : 0
Skipped nodes : 0
Checked nodes hostname : noc-se, noc-pr
Peering Test : 0 warnings, 2 errors
Backup IP Test : passed
Clag SysMac Test : passed
VXLAN Anycast IP Test : passed
Bridge Membership Test : passed
Spanning Tree Test : passed
Dual Home Test : 0 warnings, 2 errors
Single Home Test : passed
Conflicted Bonds Test : 0 warnings, 5 errors
ProtoDown Bonds Test : passed
SVI Test : passed
Peering Test details:
Hostname Reason
----------------- ---------------------------------------------
noc-pr Peerlink peerlink-1.4094 MTU mismatch
noc-se Peerlink peerlink-1.4094 MTU mismatch
Dual Home Test details:
Hostname Reason
----------------- ---------------------------------------------
noc-pr Dually connected bond NetQBond-3 MTU mismatch
with peer noc-se:NetQBond-3
noc-se Dually connected bond NetQBond-3 MTU mismatch
with peer noc-pr:NetQBond-3
Conflicted Bonds Test details:
Hostname Reason
----------------- ---------------------------------------------
noc-pr Bond NetQBond-1 in Conflicted state due to ma
tching clagid not configured on peer
noc-pr Bond NetQBond-2 in Conflicted state due to ma
tching clagid not configured on peer
noc-pr Bond NetQBond-4 in Conflicted state due to no
t found in peer
noc-se Bond NetQBond-1 in Conflicted state due to ma
tching clagid not configured on peer
noc-se Bond NetQBond-2 in Conflicted state due to ma
tching clagid not configured on peer
相关命令
netq show mlag
netq show unit-tests mlag
netq add validation
netq check mtu
验证网络结构中所有链路的最大传输单元 (MTU) 的一致性。 该命令在适合特定链路类型的级别验证 MTU 一致性。 例如,绑定接口的 MTU 在绑定级别而不是在单个从属级别强制执行。 对于 MLAG/CLAG 绑定,验证确认绑定的两端是否为其本地绑定实例配置了相同的 MTU 值。 您还可以查看没有对等链路的节点。
输出显示所有测试的状态(通过/失败/跳过)以及摘要,包括
- 找到的节点总数
- 已验证的节点数
- 验证失败的节点数
- 已静默 120 秒(陈旧)的节点数
- 有警告的节点数
- 已验证的链路数
- 验证失败的链路数
- 有警告的链路数
语法
netq check mtu
[label <text-label-name> | hostnames <text-list-hostnames>]
[unverified]
[check_filter_id <text-check-filter-id>]
[include <mtu-number-range-list> | exclude <mtu-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
标签 | <文本标签名称> | 保留 |
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
unverified | NA | 查找没有已知对等链路的节点 |
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <代理编号范围列表> | 包括指定的验证测试 |
exclude | <代理编号范围列表> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 格式显示输出 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
cumulus@switch:~$ netq check mtu
mtu check result summary:
Total nodes : 21
Checked nodes : 21
Failed nodes : 3
Rotten nodes : 0
Warning nodes : 0
Additional summary:
Checked Links : 291
Failed Links : 8
Warn Links : 0
Link MTU Consistency Test : 0 warnings, 8 errors
VLAN interface Test : passed
Bridge interface Test : passed
Link MTU Consistency Test details:
Hostname Interface MTU Peer Peer Interface Peer MTU Reason
----------------- ------------------------- ------ ----------------- ------------------------- -------- ---------------------------------------------
border01 bond3 9000 fw1 borderBond 9216 MTU Mismatch
border01 swp3 9000 fw1 swp1 9216 MTU Mismatch
border02 bond3 9000 fw1 borderBond 9216 MTU Mismatch
border02 swp3 9000 fw1 swp2 9216 MTU Mismatch
fw1 borderBond 9216 border01 bond3 9000 MTU Mismatch
fw1 borderBond 9216 border02 bond3 9000 MTU Mismatch
fw1 swp1 9216 border01 swp3 9000 MTU Mismatch
fw1 swp2 9216 border02 swp3 9000 MTU Mismatch
将没有对等链路的节点添加到输出
cumulus@switch:~$ netq check mtu unverified
mtu check result summary:
Total nodes : 21
Checked nodes : 21
Failed nodes : 3
Rotten nodes : 0
Warning nodes : 0
Additional summary:
Checked Links : 291
Failed Links : 8
Warn Links : 0
Link MTU Consistency Test : 0 warnings, 8 errors
VLAN interface Test : passed
Bridge interface Test : passed
Link MTU Consistency Test details:
Hostname Interface MTU Peer Peer Interface Peer MTU Reason
----------------- ------------------------- ------ ----------------- ------------------------- -------- ---------------------------------------------
border01 bond3 9000 fw1 borderBond 9216 MTU Mismatch
border01 swp3 9000 fw1 swp1 9216 MTU Mismatch
border02 bond3 9000 fw1 borderBond 9216 MTU Mismatch
border02 swp3 9000 fw1 swp2 9216 MTU Mismatch
fw1 borderBond 9216 border01 bond3 9000 MTU Mismatch
fw1 borderBond 9216 border02 bond3 9000 MTU Mismatch
fw1 swp1 9216 border01 swp3 9000 MTU Mismatch
fw1 swp2 9216 border02 swp3 9000 MTU Mismatch
Link MTU Consistency Test unverified:
Hostname Interface MTU Peer Peer Interface Peer MTU Reason
----------------- ------------------------- ------ ----------------- ------------------------- -------- ---------------------------------------------
oob-mgmt-server vagrant 1500 - - - No Peer link info
相关命令
netq show unit-tests mtu
netq add validation
netq check ntp
使用 NTP 验证网络结构中所有节点(叶子节点、脊柱节点和主机)的网络时间同步。 未与 NetQ 设备或 VM 同步时间的节点可能会报告时间戳不正确的数据或完全失去通信。
输出显示所有测试的状态(通过/失败/跳过)以及摘要,包括
- 找到的节点总数
- 已验证的节点数
- 验证失败的节点数
- 已静默 120 秒(陈旧)的节点数
- 有警告的节点数
- 找到的 NetQ 未知节点数
- 可用于同步的 NTP 服务器数量
语法
netq check ntp
[label <text-label-name> | hostnames <text-list-hostnames>]
[check_filter_id <text-check-filter-id>]
[include <ntp-number-range-list> | exclude <ntp-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
标签 | <文本标签名称> | 保留 |
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <代理编号范围列表> | 包括指定的验证测试 |
exclude | <代理编号范围列表> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 格式显示输出 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
cumulus@switch:~$ netq check ntp
ntp check result summary:
Total nodes : 17
Checked nodes : 17
Failed nodes : 11
Rotten nodes : 0
Warning nodes : 0
Skipped nodes : 0
Additional summary:
NTP Servers : 0
Unknown nodes : 0
NTP Sync Test : 0 warnings, 11 errors
NTP Sync Test details:
Hostname NTP Sync Connect Time Reason
----------------- -------- ------------------------- ---------------------------------------------
border01 no Tue Nov 12 17:04:09 2024 Sync status changed from yes to no
border02 no Tue Nov 12 17:04:10 2024 Sync status changed from yes to no
fw1 no Tue Nov 12 17:04:11 2024 Sync status changed from yes to no
leaf01 no Tue Nov 12 17:04:10 2024 Sync status changed from yes to no
leaf02 no Tue Nov 12 17:04:09 2024 Sync status changed from yes to no
leaf03 no Tue Nov 12 17:04:10 2024 Sync status changed from yes to no
leaf04 no Tue Nov 12 17:04:12 2024 Sync status changed from yes to no
spine01 no Tue Nov 12 17:04:13 2024 Sync status changed from yes to no
spine02 no Tue Nov 12 17:04:10 2024 Sync status changed from yes to no
spine03 no Tue Nov 12 17:04:18 2024 Sync status changed from yes to no
spine04 no Tue Nov 12 17:04:12 2024 Sync status changed from yes to no
相关命令
netq show ntp
netq show unit-tests ntp
netq add validation
netq check roce
搜索节点之间一致的 RoCE 和 QoS 配置。
语法
netq check roce
[hostnames <text-list-hostnames>]
[check_filter_id <text-check-filter-id>]
[include <roce-number-range-list> | exclude <roce-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <roce-number-range-list> | 包括指定的验证测试 |
exclude | <roce-number-range-list> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 格式显示输出 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
以下示例显示了网络结构中的几个 RoCE 错误。 “RoCE 模式测试”表明交换机在有损模式和无损模式下运行,这必须进行协调。 其他错误报告了配置不匹配以及预期的配置。 要修复这些错误,请根据输出中报告的建议重新配置 RoCE。 然后再次运行命令以验证其准确性。
cumulus@switch:mgmt:~$ netq check roce
roce check result summary:
Total nodes : 2
Checked nodes : 2
Failed nodes : 2
Rotten nodes : 0
Warning nodes : 0
Skipped nodes : 0
Checked nodes hostname : mlx-3700c-23, mlx-3700c-24
RoCE mode Test : 0 warnings, 1 errors
RoCE Classification Test : 0 warnings, 3 errors
RoCE Congestion Control Test : 0 warnings, 2 errors
RoCE Flow Control Test : 0 warnings, 2 errors
RoCE ETS mode Test : passed
RoCE mode Test details:
Hostname Reason
----------------- ---------------------------------------------
mlx-3700c-24 RoCE Lossy mode inconsistent with mlx-3700c-2
3
RoCE Classification Test details:
Hostname Reason
----------------- ---------------------------------------------
mlx-3700c-23 Invalid traffic-class mapping for switch-prio
rity 4.Expected 0 Got 3
mlx-3700c-24 DSCP mapping config invalid for switch-prio 3
.Expected DSCP: 24,25,26,27,28,29,30,31.
DSCP mapping config invalid for switch-prio 5.
Expected DSCP: 40,41,42,43,44,45,46,47.
mlx-3700c-24 PCP mapping config invalid for switch-prio 3.
Expected PCP: 3. PCP mapping config invalid f
or switch-prio 4.Expected PCP: 4.
RoCE Congestion Control Test details:
Hostname Reason
----------------- ---------------------------------------------
mlx-3700c-23 Congestion Config TC Mismatch.Expected enable
d-tc: 0,3.
mlx-3700c-23 Congestion Config mode Mismatch.Expected cong
estion-mode: ECN.
RoCE Flow Control Test details:
Hostname Reason
----------------- ---------------------------------------------
mlx-3700c-23 Invalid RoCE PFC rx-enabled flag.Expected: en
abled.
mlx-3700c-23 RoCE PFC Priority Mismatch.Expected pfc-prior
ity: 3.
相关命令
netq show roce-counters
netq show roce-config
netq show roce-counters pool
netq show events
netq show unit-tests
netq check sensors
验证网络结构中所有节点的温度、冷却风扇和电源传感器状态。
输出显示所有测试的状态(通过/失败/跳过)以及摘要,包括
- 找到的节点总数
- 已验证的节点数
- 验证失败的节点数
- 已静默 120 秒(陈旧)的节点数
- 有警告的节点数
- 已验证的传感器数量
- 验证失败的传感器数量
语法
netq check sensors
[hostnames <text-list-hostnames>]
[check_filter_id <text-check-filter-id>]
[include <sensors-number-range-list> | exclude <sensors-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <代理编号范围列表> | 包括指定的验证测试 |
exclude | <代理编号范围列表> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 格式显示输出 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
cumulus@switch:~$ netq check sensors
sensors check result summary:
Total nodes : 13
Checked nodes : 13
Failed nodes : 0
Rotten nodes : 0
Warning nodes : 0
Additional summary:
Checked Sensors : 102
Failed Sensors : 0
PSU sensors Test : passed
Fan sensors Test : passed
Temperature sensors Test : passed
相关命令
netq show sensors
netq show unit-tests sensors
netq add validation
netq check topology
将从 LLDP 遥测数据派生的网络物理拓扑与您上传到 UI 的拓扑蓝图进行比较。 有关更多信息,请参阅拓扑验证。
您必须使用 UI 上传网络蓝图 .dot 文件,此命令才能成功运行。
语法
netq check topology
[label <text-label-name> | hostnames <text-list-hostnames>]
[check_filter_id <text-check-filter-id>]
[include <topology-number-range-list> | exclude <topology-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
标签 | <文本标签名称> | 保留 |
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <拓扑编号范围列表> | 包括指定的验证测试 |
exclude | <拓扑编号范围列表> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 格式显示输出 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
cumulus@switch:~$ netq check topology
topology check result summary:
Total nodes : 26
Checked nodes : 1
Failed nodes : 0
Rotten nodes : 25
Warning nodes : 0
Skipped nodes : 0
Additional summary:
blueprint_id : file_aa865b4a083ee2e86c3bdd1a4b2436de1220aac39208a21571989c4d12a911
blueprint_name : bp_file.dot
LLDP Service Test : passed
Topology Blueprint Test : passed
相关命令
netq add validation type
netq show unit-tests topology
netq check vlan
验证网络结构中所有链路的虚拟局域网 (VLAN) 节点和接口的一致性。 特别是,它查找链路邻居和 MLAG 绑定一致性。 您还可以识别没有对等方的节点。
输出显示所有测试的状态(通过/失败/跳过)以及摘要,包括
- 找到的节点总数
- 已验证的节点数
- 验证失败的节点数
- 已静默 120 秒(陈旧)的节点数
- 有警告的节点数
- 找到的链路总数
- 验证失败的链路数
语法
netq check vlan
[label <text-label-name> | hostnames <text-list-hostnames>]
[unverified]
[check_filter_id <text-check-filter-id>]
[include <vlan-number-range-list> | exclude <vlan-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
标签 | <文本标签名称> | 保留 |
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
unverified | NA | 查找没有对等方的节点 |
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <代理编号范围列表> | 包括指定的验证测试 |
exclude | <代理编号范围列表> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 格式显示输出 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
cumulus@switch:~$ netq check vlan
vlan check result summary:
Total nodes : 21
Checked nodes : 21
Failed nodes : 3
Rotten nodes : 0
Warning nodes : 0
Additional summary:
Total Link Count : 291
Failed Link Count : 4
Link Neighbor VLAN Consistency Test : 0 warnings, 4 errors
Clag Bond VLAN Consistency Test : 0 warnings, 2 errors
Link Neighbor VLAN Consistency Test details:
Hostname Interface VLANs Peer Peer Interface Peer VLANs Message
----------------- ------------------------- ------------------------- ----------------- ------------------------- ------------------------- -----------------------------------
border01 bond3 10,20,30 fw1 borderBond 10,20 bond3 VLAN set (10,20,30) mismatch
with peer fw1:borderBond (10,20)
border02 bond3 10,20,30 fw1 borderBond 10,20 bond3 VLAN set (10,20,30) mismatch
with peer fw1:borderBond (10,20)
fw1 borderBond 10,20 border01 bond3 10,20,30 borderBond VLAN set (10,20) mismatc
h with peer border01:bond3 (10,20,3
0)
fw1 borderBond 10,20 border02 bond3 10,20,30 borderBond VLAN set (10,20) mismatc
h with peer border02:bond3 (10,20,3
0)
Clag Bond VLAN Consistency Test details:
Hostname Interface VLANs Peer Peer Interface Peer VLANs Message
----------------- ------------------------- ------------------------- ----------------- ------------------------- ------------------------- -----------------------------------
border01 bond3 10,20,30 - - - bond3 VLAN set (10,20,30) missing o
n peerlink
border02 bond3 10,20,30 - - - bond3 VLAN set (10,20,30) missing o
n peerlink
相关命令
netq show vlan
netq show unit-tests vlan
netq add validation
netq check vxlan
验证网络结构中所有链路的虚拟可扩展局域网 (VXLAN) 节点和接口的一致性。 特别是,它查找一致的 VXLAN 配置和 BUM 复制错误。
输出显示所有测试的状态(通过/失败/跳过)以及摘要,包括
- 找到的节点总数
- 已验证的节点数
- 验证失败的节点数
- 已静默 120 秒(陈旧)的节点数
- 有警告的节点数
语法
netq check vxlan
[label <text-label-name> | hostnames <text-list-hostnames>]
[check_filter_id <text-check-filter-id>]
[include <vxlan-number-range-list> | exclude <vxlan-number-range-list>]
[around <text-time>]
[json | summary]
必需参数
无
选项
选项 | 值 | 描述 |
---|---|---|
标签 | <文本标签名称> | 保留 |
主机名 | <文本主机名列表> | 以逗号分隔的主机名列表(无空格),以包含在验证中 |
check_filter_id | <文本检查过滤器 ID> | 包括验证的特定过滤器 |
include | <代理编号范围列表> | 包括指定的验证测试 |
exclude | <代理编号范围列表> | 排除指定的验证测试 |
around | <文本时间> | 指示回溯网络状态信息的时间范围。 使用文本(而不是例如 UTP 表示)写入值。 请注意,数字和时间单位之间没有空格。 有效值包括
|
json | NA | 以 JSON 格式显示输出 |
summary | NA | 仅显示摘要信息和测试结果。 不显示失败或有警告的测试的详细信息。 |
用法示例
cumulus@switch:~$ netq check vxlan
vxlan check result summary:
Total nodes : 6
Checked nodes : 6
Failed nodes : 0
Rotten nodes : 0
Warning nodes : 0
Vlan Consistency Test : passed
BUM replication Test : passed
相关命令
netq show vxlan
netq show unit-tests vxlan
netq add validation