1、首先搭建一个ftp服务器,用于上传抓取的报文文件。
2、在设备上对接口进行抓包:
capture-packet interface GigabitEthernet 0/0/2 destination ftp-server 192.168.0.2 username admin password admin file txstof.cap
3、成功后会输出对应信息
[Huawei]
------------------capture report-----------------------
file: txstof.cap(ftp 192.168.0.2)
capture: interface GigabitEthernet0/0/2
acl: -
vlan: - cvlan: -
car: 64kbp timeout: 60s
packets: 100 (expected) 59 (actual)
length: 128 (expected)
-------------------------------------------------------
4、注意事项:目前只支持捕获接口入方向报文,不支持出接口报文;此命令配置后不会保存到配置文件,完成捕获后自动失效;产品文档表示:当CPU高于80%的时候,执行此命令会导致cpu升高,不建议操作。