vpp抓包

vpp抓包

vpp支持抓包,对报文抓取后保存到文件中,并通过wireshark分析报文。

要进行抓包需要先进入vppctl,抓包分为rx和tx:

  • tx

    # 查看tx 抓包状态
    vpp# pcap tx trace status
    max is 100 for any interface to file /tmp/vpe.pcap
    pcap tx capture is off...
    # 开启抓包
    # max 1000指定最多抓取1000个报文
    # intfc intface_name 指定抓取的网口
    # file vppTest.pcap指定抓包文件保存时的文件名,最终会保存在/tmp目录下
    vpp# pcap tx trace on max 1000 intfc intface_name file vppTest.pcap
    # 设置好后再查看一下tx的抓包状态
    vpp# pcap tx trace status
    max is 1000 for interface local0 to file /tmp/vppTest.pcap
    pcap tx capture is on: 48 of 1000 pkts..
    # 运行一段时间后,有报文收发即可停止抓包
    vpp# pcap tx trace off
    captured 48 pkts...
    saved to /tmp/vppTest.pcap...
    
  • rx

    rx抓包与tx一致,将上面的tx换为rx即可。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

growdu_real

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值