创载科技
18+年IT解决方案服务商
Catalyst 9000
上的内嵌抓包方法
01-在特权模式下进入如下配置
switch#monitor capture XXX interface Gix/x/x both 或 control-plan both <<<<< control-plan为CPU抓包
switch#monitor capture XXX match any 或 access-list XX
switch#monitor capture XXX file location flash:XXX.pcap size
我们也可以使用以下命令指定数据包的数量
switch#monitor capture XXX limit packets
使用以下命令查看配置结果:
show monitor capture XXX
02-抓包开始
switch#monitor capture XXX start
03-此时复现问题或进行测试
04-停止抓包
switch#monitor capture XXX stop
05-确认抓包文件是否生成:
通过dir flash:来确认抓包文件是否生成,一些平台也可通过命令查看:
switch#show monitor capture file flash:XXX.pcap
06-完成后删除相关配置:
switch#no monitor capture XXX