Linux system, the problem can not receive multicast messages

Solution:

Do the following three modifications

1. /etc/sysctl.conf file net.ipv4.conf.all.rp_filter set to 0

2. sysctl -w net.ipv4.conf.all.rp_filter=0

3. echo "0">/proc/sys/net/ipv4/conf/all/rp_filter

 

principle:

For security reasons, linux system will be checked according to a value of the packet of rp_filter.

When rp_filter is 1, the destination address of the packet will be checked, if the object is not native ip ip, then discards the packet.

Because the destination address of the multicast packet is the IP multicast, and certainly does not match the local ip, so the data packet is dropped.

When rp_filter to 0, the check is not performed, all packets are received, the application can receive the multicast messages.

Guess you like

Origin www.cnblogs.com/jiexianzhu/p/11016125.html