你好,游客 登录 注册 搜索
背景:
阅读新闻

PF_RING 6.0.2在Redhat 6.3 x86_64上编译和安装

[日期:2014-11-19] 来源:Linux社區  作者:fan_hai_ping [字体:大 中 小]

编译PF_RING问题

问题1:./runlex.sh: line 83: flex: command not found;

    ./runlex.sh: line 118: flex: command not found

  回答: sudo yuminstall flex

 

问题2:make[2]: yacc: Command not found         

 answer:sudo yum install bison

 

问题3:cannot find -lnuma

answer:sudo yum install numactl-devel

对于RedHat 6.3版本需要从网上下载:numactl-devel-2.0.7-3.el6.x86_64.rpm

 

问题4:grammar.c:(.text+0x44e): undefined reference to `pcap_lex'

  answer: 删除掉老的libpcap 1.0.0之前的版本。

      #rpm -aq | grep libpcap  如果存在则删除它

      #yum remove libpcap

 

问题5:insmod: error inserting 'pf_ring.ko': -1 Unknown symbol in module

解决:没有卸载当前的网卡驱动,导致新的驱动加载不了,因此需要先卸载网卡驱动后再重新进行加载。

 

问题6: --nodefs: unknown option

解决:rpm --nodeps -e libpcap

配置PF_RING

1.加载ixgbe驱动,我们发现设置InterruptThrottleRate为4000是最优的。

modprobe ixgbe InterruptThrottleRate=4000

2.加载PF_RING驱动,使用透传模式2,并且设置合理的缓冲区大小。

modprobe pf_ring.ko transparent_mode=2min_num_slots=16384

3.优化以太网设备,关闭影响吞吐量的选项。使用合适的接口替代eth3。

ethtool -C eth3 rx-usecs 1000

ethtool -C eth3 adaptive-rx off

ethtool -K eth3 tso off

ethtool -K eth3 gro off

ethtool -K eth3 lro off

ethtool -K eth3 gso off

ethtool -K eth3 rx off

ethtool -K eth3 tx off

ethtool -K eth3 sg off

 4.设置CPU的亲和力

为了让Snort达到5Gbps吞吐量,我们需要更好的硬件(24核CPU Intel X567),使用PF_RING NAPI或DNA进行加速,选择使用Silicom网卡。

禁用TX捕获:insmodpf_ring.ko enable_tx_capture=0

增加ring slots数量,使用透传模式1:insmod pf_ring.ko enable_tx_capture=0transparent_mode=1 min_num_slots=16384

本文永久更新链接地址:http://www.linuxidc.com/Linux/2014-11/109580.htm

linux
相关资讯       PF_RING 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款