創(chuàng)載科技
18+年IT解決方案服務(wù)商
Catalyst 9000
上的內(nèi)嵌抓包方法

01-在特權(quán)模式下進(jìn)入如下配置
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
我們也可以使用以下命令指定數(shù)據(jù)包的數(shù)量
switch#monitor capture XXX limit packets
使用以下命令查看配置結(jié)果:
show monitor capture XXX
02-抓包開始
switch#monitor capture XXX start
03-此時(shí)復(fù)現(xiàn)問題或進(jìn)行測試
04-停止抓包
switch#monitor capture XXX stop
05-確認(rèn)抓包文件是否生成:
通過dir flash:來確認(rèn)抓包文件是否生成,一些平臺(tái)也可通過命令查看:
switch#show monitor capture file flash:XXX.pcap
06-完成后刪除相關(guān)配置:
switch#no monitor capture XXX


