小兵以太网测试仪Linux版(Linux发包工具)使用说明

AI助手已提取文章相关产品:

本文是小兵以太网测试仪Linux版的使用说明。

若要了解使用windows版本小兵以太网测试仪,可参考如下网址:

http://blog.youkuaiyun.com/crazycoder8848/article/details/38964007


1. 编译

从以下网址下载源码
https://github.com/sunmingbao/xb-ether-tester/archive/master.zip

执行如下命令完成编译
unzip -q xb-ether-tester-master.zip
cd xb-ether-tester-master/linux-xb/
make

编译成功后,生成的程序为./target/xb_ether_tester.exe

2. 构造要发送的报文

使用windows版的小兵以太网测试仪,构造好相应的报文(包括字段变化规则等),并选中实际要发送的报文。
将构造好的内容保存为.etc文件,拷贝到Linux系统中。
这里假设路径为 /home/sunmingbao/aaa.etc


3. 发包

执行如下命令即可发包:
./target/xb_ether_tester.exe  -i eth0 -f /home/sunmingbao/aaa.etc  --pps=1000

上述命令的含义为,通过eth0网口,发送aaa.etc中的报文,pps为1000
当然,软件还支持其他一些选项。
执行 ./target/xb_ether_tester.exe --help 就能看到软件支持的选项列表

下面是软件支持的选项:

options:
--help (-h or -H for short) :  no argument
      print help info

--version (-v or -V for short) :  no argument
      show version

--config-file (-f or -F for short) :  
      specify config file。即上面示例中的/home/sunmingbao/aaa.etc

     注意,此选项不能与--bin-pkt-file同时使用。

--bin-pkt-file  :  
      specify a raw binary packet file which  contains a single packet's raw binary data

     注意,此选项不能与--config-file同时使用。

--interface (-i or -I for short) :  
      interface to use for sending packets

--bind-cpu  :  
      bind sending thread to a free cpu. based from 0

--enable-max-speed (-m or -M for short) :  no argument
      send packet with max speed

--burst-num  :  
      how many packet to send. If not specified, always sending until press CTRL+C


--interval  :  
      how long to delay (in us) between two sending

--pps  :  
      how many packets to send in one second

--set-src-mac  :  
      set src mac of each packet


--set-dst-mac  :  
      set dst mac of each packet

--send-all  :  no argument
      send all packets in config file, including packets not selected


--no-wait  :  no argument
      no wait before sending and finish sending

您可能感兴趣的与本文相关内容

评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值