[Xorp-hackers] Multicast routing

Suresh kannan sureshkannan at gmail.com
Thu Mar 1 01:52:02 PST 2007


Hi Pavlin,

Sorry for very late response. I was bit busy with other works.
Please look for inline comments. %suresh :

Thanks,
Regards,
Suresh kannan.

On 2/16/07, Pavlin Radoslavov <pavlin at icir.org> wrote:
>
> Sachin K <sachinutd at gmail.com> wrote:
>
> > How does the XORP multicast router sniff IGMP/MLD messages from the
> network?
> >
> > I checked the some routers' code. Most of them just open a RAW socket
> with
> > protocol set to IPPROTO_IGMP. But using this the router gets the
> > packets addressed to 224.0.0.1 only.
> >
> > How does it receive IGMPv2 and IGMPv3 membership reports sent by other
> hosts?
>
> The kernel gets all multicast packets because the interface is set
> in ALLMULTI mode (i.e., snoop all multicast packets). This happens
> after the multicast routing socket has been opened with
> setsockopt(..., MRT_INIT, ...) and then each interface is added with
> setsockopt(..., MRT_ADD_VIF, ...).


%Suresh : In FreeBSD, IGMP packets are handled in from ipintr() in
ip_input.c where it directly goes to igmp_input() (igmp.c). From here, it
puts packet to applications via rip_input call. So, I guess to receive IGMP
packets we no need to setsockopt though IGMP ( XORP,etc) adds to VIF; thats
to enable Mrouting on that interface. Not particularly to receive IGMP
control packets. Please correct me if I'm wrong here.

Then the userland program can receive the IGMP packets with opening
> a raw IPPROTO_IGMP socket.
>
> BTW, note that there could be only one multicast routing socket open
> at a time (across all processes).
>
> Regards,
> Pavlin
>
>
> _______________________________________________
> Xorp-hackers mailing list
> Xorp-hackers at icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20070301/e5f96f4e/attachment.html 


More information about the Xorp-hackers mailing list