本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
排除网络问题
如果遇到网络问题,您可以按照此处显示的过程来诊断问题。
您想捕获数据包跟踪
数据包跟踪流程验证数据包通过各层到达目的地的路径。您可以使用以下 NetApp ONTAP CLI 命令来控制数据包跟踪过程:
network tcpdump start – 开始数据包跟踪
network tcpdump show – 显示当前正在运行的数据包跟踪
network tcpdump stop – 停止正在运行的数据包跟踪
这些命令可供在文件系统上拥有 fsxadmin
角色的用户使用。
从文件系统捕获数据包跟踪
-
要通过 SSH 登录文件系统的 NetApp ONTAP CLI,请按照《适用于 ONTAP 的 Amazon FSx 用户指南》一使用 NetApp ONTAP CLI节中记录的步骤 NetApp 进行操作。
ssh fsxadmin@
file-system-management-endpoint-ip-address
-
使用以下命令在 ONTAP CLI 中进入诊断权限级别。
::>
set diag
当系统提示继续操作时,请输入
y
。Warning: These diagnostic commands are for use by NetApp personnel only. Do you want to continue? {y|n}: y
-
确定文件系统上用于保存数据包跟踪的位置。卷必须处于在线状态,并且必须安装于具有有效连接路径的命名空间中。使用以下命令检查符合以下标准的卷:
::*>
volume show -junction-path !- -fields junction-path
vserver volume junction-path ------- --------- ------------- fsx test_vol1 /test_vol1 fsx test_vol2 /test_vol2 fsx test_vol2 /test_vol3
-
使用最少的必需参数开始跟踪。替换以下内容:
将
node_nam
e 替换为节点的名称(例如,)。FsxId01234567890abcdef-01
将
svm_name
替换为存储虚拟机的名称(例如,)。fsx
用卷
的名称替换 juntion_path_
name(例如)。test-vol1
::*>
debug network tcpdump start -node
node_name
-ipspace Default -pass-through "-i e0e -w /clus/svm_name
/junction_path_name
"Info: Started network trace on interface "e0e" Warning: Snapshots should be disabled on the tcpdump destination volume while packet traces are occurring. Use the "volume modify -snapshot-policy none -vserver fsx -volume test_vol1" command to disable Snapshots on the tcpdump destination volume.
重要
只能在
e0e
接口和Default
IP 空间中捕获数据包跟踪。在 FSx for ONTAP 中,所有网络流量都使用e0e
接口。使用数据包跟踪时,请注意以下几点:
-
开始数据包跟踪时,必须包含要存储跟踪文件的路径,格式为:/clus/ svm_name/
junction-path-name
-
(可选)提供数据包跟踪的文件名。
如果未指定 filter_name,则会自动生成为:
node-name _ port-name _ yyymmdd_hhmmsss.trc
-
如果滚动跟踪已指定,则 filter_name 后跟数字,表示旋转序列中的位置。
ONTAP CLI 还接受以下可选 -pass-through 参数:
-B, --buffer-size=<KiB> -c <number_of_packets> -C <file_size-mB> -F <filter_expression_filename> -G <rotate_seconds> --time-stamp-precision {micro|nano} -Q, --direction {in|out|inout} -s, --snapshot-length=<bytes> -U, --packet-buffered -W <rotate_file_count> <filter-expression>
有关筛选器表达式的信息,请参阅 pcap-filter(7)手册页
。
-
查看正在进行的跟踪:
::*>
debug network tcpdump show
Node IPspace Port Filename ----------------------- -------- -------- -------- FsxId123456789abcdef-01 Default e0e /clus/fsx/test_vol1/FsxId123456789abcdef-01_e0e_20230605_181451.trc
-
停止跟踪:
::*>
debug network tcpdump stop -node FsxId123456789abcdef-01 -ipspace Default -port e0e
Info: Stopped network trace on interface "e0e"
-
返回管理员权限级别:
::*>
set -priv admin
::>
-
访问数据包跟踪。
数据包跟踪存储在您使用 debug network tcpdump start 命令指定的卷中,可通过 NFS 导出或与该卷对应的 SMB 共享进行访问。
有关捕获数据包跟踪的更多信息,请参阅知识库中的如何在 ONTAP 9.10+ 中使用调试网络 tcpdump