I really need a network expert to help me. I would like to know that does a network interface receive a multicast packet sent by itself? For example, a network interface card (NIC) with IP address 192.168.52.10 sends out a multicast packet 239.255.10.1:11101, does the NIC 192.168.52.10 receive the multicast packet 239.255.10.1:11101 just sent out? If the answer is no, can I do any configuration at the NIC to receive the multicast packet sent out by the NIC itself?
There is an application in my company but it seems that the loopback function does not work, which means that the NIC does not receive a multicast packet sent by itself.
You need to set the
IP_MULTICAST_LOOPoption to allow outgoing multicast packets to be received on the same interface:Note that this also requires that the socket in question is joined to the relevant multicast group using
IP_ADD_MEMBERSHIPorIP_ADD_SOURCE_MEMBERSHIP.