linux多网卡接收组播丢失问题
来源:互联网 发布:linux rpm安装包在哪 编辑:程序博客网 时间:2024/05/18 02:35
p_filter及Linux下多网卡接收多播的问题
(2011-09-24 21:35:48)linux
多播
it
分类: Linux
例如:
A: 192.168.8.100
B: (IGMP Query) 10.0.0.1 来自路由器
查找路由表
网卡1为默认路由: 172.17.5.100
网卡2
系统根据路由表,认为10.0.0.1这个IP应该在第一个网卡172.17.5.100上收到,现实的情况是在第二张网卡192.168.8.100上收到了。认为这是不合理的,丢弃该包。致命的问题的,该包是来自路由器的IGMP Query包。
The rp_filter can reject incoming packets if their source address doesn’t match the network interface that they’re arriving on, which helps to prevent IP spoofing. Turning this on, however, has its consequences: If your host has several IP addresses on different interfaces, or if your single interface has multiple IP addresses on it, you’ll find that your kernel may end up rejecting valid traffic. It’s also important to note that even if you do not enable the rp_filter, protection against broadcast spoofing is always on. Also, the protection it provides is only against spoofed internal addresses; external addresses can still be spoofed.. By default, it is disabled.
解决方法:
系统配置文件
1. /etc/sysctl.conf
把 net.ipv4.conf.all.rp_filter和 net.ipv4.conf.default.rp_filter设为0即可
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.all.rp_filter = 0
系统启动后,会自动加载这个配置文件,内核会使用这个变量
2. 命令行
显示一个内核变量 sysctl net.ipv4.conf.all.rp_filter
设置一个内核变量 sysctl -w net.ipv4.conf.all.rp_filter=0
设置完后,会更新内核(实时的内存)中的变量的值,但不会修改sysctl.conf的值
3. 使用/proc文件系统
查看 cat /proc/sys/net/ipv4/conf/all/rp_filter
设置 echo "0" >/proc/sys/net/ipv4/conf/all/rp_filter
- linux多网卡接收组播丢失问题
- rp_filter及Linux下多网卡接收多播的问题
- rp_filter及Linux下多网卡接收多播的问题
- linux下双网卡接收组播需要修改的参数
- linux udp组播接收问题及原理分析
- linux udp组播接收问题及原理分析
- linux 组播接收注意事项
- linux 在多网卡下的设备的UDP 组播问题总结
- linux 组播接收和发送代码和组播问题总结
- 双网卡分别接收和发送组播
- 关于WIN7 双网卡 多播 问题
- 组播的发送与接收问题
- windows 组播网卡绑定,解决多网卡通信异常问题。
- 多网卡收不到组播
- 组播接收
- UDP组播接收
- 双网卡或多网卡组播 (ZT)
- 关于android组播DatagramPacket不能正常接收问题
- 预处理详解
- 5.2 iOS开发视频教程—延展的基本概念和用法
- 菜鸟项目纠结初体验
- android 4.0新的特性(针对开发者)
- 5.3 iOS开发视频教程—协议和代理设计模式
- linux多网卡接收组播丢失问题
- Effective C++ Item6 如何阻止对象拷贝函数?
- secureCRT linux和windows互传文件
- JS截取字符串方法
- Winform实现Visual Studio效果
- 流年轻弹、离殇一曲
- 阿里巴巴20121009 研发/算法工程师 笔试试题【修正】
- Hadoop集群机器命名机制
- 5.4 iOS开发视频教程—OC中代理设计模式