本文是小兵以太网测试仪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
3616

被折叠的 条评论
为什么被折叠?



