Tuesday, August 7, 2018

工具分享手把手教你-使用IOS-XE内嵌wireshark进行抓包

在 IOS-EX平台, 是支持内嵌wireshark抓包的, (lanbase版本不支持,敲不上moni cap命令)

moni cap A interface g1/1 both    //配置抓包接口和方向
moni cap A match any  或者 moni cap A access-list X //通过match 或者挂 ACL 来 限制抓包的源目条件
moni cap A file location bootflash:A.pcap   //将数据包存到flash中
moni cap A start   //开始抓包

dir  //确认生成了pcap文件,并且文件大小在增长
Directory of bootflash:/
8121  -rw-          24  Jun 26 2017 06:57:18 +00:00  A.pcap

moni cap A stop  //停止抓包


sh moni cap file bootflash:A.pcap   //查看抓包
sh moni cap file bootflash:A.pcap detail  //查看每个数据包

sh moni cap A   //查看抓包参数
sh moni cap A para   //查看已配置的抓包命令
no moni cap A   //删除定义的抓包名称和对应的参数

No comments:

Post a Comment