By | 2022-04-13
  • net-speeder源码下载
root@localhost:~# wget https://github.com/snooda/net-speeder/archive/master.zip
  • 依赖安装
# 安装libnet-dev
root@localhost:~# apt-get install libnet1
root@localhost:~# apt-get install libnet1-dev
# 安装libpcap-dev
root@localhost:~# apt-get install libpcap0.8
root@localhost:~# apt-get install libpcap0.8-dev
  • 源码编译
root@localhost:~#  sh build.sh
  • 运行net-speeder
# 运行测试
root@localhost:~# ./net_speeder eth0 "ip"
# 后台运行
root@localhost:~# nohup /root/net_speeder eth0 "ip" >/dev/null 2>&1 &
# 查看net-speeder是否运行
root@localhost:~# ps aux|grep net_speeder|grep -v grep
# 杀死net-speeder进程
root@localhost:~# ps aux|grep net_speeder|grep -v grep|awk '{print$2}'|xargs kill -9
  • 常见错误处理
# 报错信息:err msg:[libnet_write_raw_ipv4(): -1 bytes written (Message too long)
# 解决方法,关闭tso.
root@localhost:~# ethtool -K eth0 tso off