Subject: [magma] About source IP address of IGMP Join sent on loopback interface

From: preetham B <[email-masked]>
Date: Mon, 22 Mar 2010 13:35:59 +0530

Hi,

I am running a host application which joins multicast group on
loopback interface.

But the source IP address of IGMPv3 report is not loopback address (127.0.0.1).
Its picking up first available N/W interface address.

Snippet:
 mreq.imr_multiaddr.s_addr = inet_addr("239.5.1.7");
 mreq.imr_address.s_addr = htonl(INADDR_LOOPBACK);
 mreq.imr_ifindex = 1; (Interface index of loopback)
 check(setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) == 0);

Is there any reason why loopback address is not source IP address of
join message?

Regards,
Anupama

---

From: "Prashant Jhingran (pjhingra)" <[email-masked]>
Date: Mon, 22 Mar 2010 14:33:37 +0530

Hi,
 
What you are seeing is expected, that's because 127/8 is reserved for
loopback address which cannot be used as source IP address while
communicating with outside world.

Regards,
Prashant Jhingran

________________________________

	From: [email-masked] [mailto:[email-masked]] On
Behalf Of preetham B
	Sent: Monday, March 22, 2010 1:36 PM
	To: [email-masked]
	Subject: [magma] About source IP address of IGMP Join sent on
loopbackinterface

	Hi, 

	But the source IP address of IGMPv3 report is not loopback
address (127.0.0.1).
	Its picking up first available N/W interface address. 

	Snippet:
	 mreq.imr_multiaddr.s_addr = inet_addr("239.5.1.7");
	 mreq.imr_address.s_addr = htonl(INADDR_LOOPBACK);
	 mreq.imr_ifindex = 1; (Interface index of loopback)
	 check(setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq,
sizeof(mreq)) == 0);

	Is there any reason why loopback address is not source IP
address of join message?
	
	Regards,
	Anupama

---

From: preetham B <[email-masked]>
Date: Mon, 22 Mar 2010 15:17:15 +0530

Hi Prashant,

Thanks for the response.

I have both igmp daemon(igmp router side) and host running on same PC.
When the host joins on loopback interface, igmp daemon is expected to
receive the join report on loopback interface.
Here the join on loopback interface is not going outside the PC(Outside
Network).

Is it possible to receive join report (@ igmp daemon) with source IP address
as loopback interface address
in above explained setup?

When I run the host,  output of netstat command is as below:

#netstat -ng

IPv6/IPv4 Group Memberships
Interface       RefCnt Group
--------------- ------ ---------------------
lo              1      239.5.1.7   ==========> This is the group joined on
loopback
lo              1      224.0.0.1
eth0            1      224.0.0.1
eth0            1      239.5.5.6
eth0            1      239.5.5.7

Regards,
Anupama

On Mon, Mar 22, 2010 at 2:33 PM, Prashant Jhingran (pjhingra) <
[email-masked]> wrote:

>  Hi,
>
> What you are seeing is expected, that's because 127/8 is reserved
> for loopback address which cannot be used as source IP address while
>  ------------------------------
> *From:* [email-masked] [mailto:[email-masked]] *On Behalf
> Of *preetham B
> *Sent:* Monday, March 22, 2010 1:36 PM
> *To:* [email-masked]
> *Subject:* [magma] About source IP address of IGMP Join sent on
> loopbackinterface
>
> Hi,
>
> I am running a host application which joins multicast group on loopback interface.
>
> Is there any reason why loopback address is not source IP address of join message?
>
> Regards,
> Anupama
>
>