It means that the tool is trying to use multicast but the network interface doesn't support it There are two likely causes:
·Your machine doesn't have multicast support enabled. For example, on Linux and FreeBSD it is possible to compile a kernel which doesn't support multicast.
·You don't have a route for multicast traffic. Some systems don't add this by default, and you need to run:
route add -net 224.0.0.0 netmask 224.0.0.0 eth0(or similar). If you wish to use RAT in unicast mode only, it is possible to add the multicast route on the loopback interface.
我一般都这样写:
mreq.imr_interface.s_addr = htonl(localIP)
因为你用route命令添加的路由表不会保存到一次重启,虽然你查看得到,你可以写到启动脚本里去。编辑/etc/init.d/network,在未尾加上下面几行:
# Add non interface-specific static-routes.
if [ -f /etc/sysconfig/static-routes ]then
grep "^any" /etc/sysconfig/static-routes | while read ignore args do
/sbin/route add -$args
done
fi
编辑/etc/sysconfig/static-routes:
any net 224.0.0.101 netmask 255.255.255.255 dev eth0
any net 224.0.0.110 netmask 255.255.255.255 dev eth1
any net 244.0.0.111 netmask 255.255.255.255 dev eth3
any net 244.14.0.112 netmask 255.255.255.255 dev eth2
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)