[Xorp-hackers] Extension of PIM: Register stop

Ralf Lübben ralfluebben at gmx.de
Wed Jun 25 06:55:29 PDT 2008


Hi,

thanks a lot. Your answer already helps me a lot.

The general idea is to restart the encapsulation at a later date again.

I think, for this I have to modify the multicast forwarding cache.

Ralf



Am Dienstag 24 Juni 2008 18:40:45 schrieben Sie:
> Ralf Lübben <ralfluebben at gmx.de> wrote:
> > Hello,
> >
> > I'm new to XORP.
> >
> > At the moment I'm trying to extend PIM. For it I need to understand how
> > the switch between the different phases in PIM (RP Tree -> Register Stop
> > -> Shortest Path Tree) is done.
>
> The switch to the SPT can be initiated by either:
>
> (a) the last-hop router that is connected to the receiver. If the
>     last-hop router sends (S,G) Join toward the source, it will
>     start receiving the packets from S on the SPT (i.e., it won't
>     need the RP for that anymore). Note that the rest of the
>     receivers might continue to receive the packets on the RP Tree
>     (unless their last-hop routers also send (S,G) Join toward the
>     source).
>
> (b) By the RP for the multicast group G.
>     The RP sends (S,G) Join toward the S, and once it starts
>     receiving the packets on the SPT the switch is completed.
>     If the RP receives a PIM Register for that source, it will send
>     PIM Register Stop to suppress further PIM Register
>     encapsulation.
>     Note that in this case only the path from S to the RP is
>     affected. The receivers will continue to receive the packets on
>     the RP Tree.
>
> Typically, the switch to the SPT is bandwidth-triggered. E.g., if
> the bandwidth for a particular (S,G) is above a pre-defined
> threshold, the last-hop router (or the RP) will initiate SPT switch.
>
> In XORP the threshold is configured by the following statement:
>
>         switch-to-spt-threshold {
>             /* approx. 1K bytes/s (10Kbps) threshold */
>             disable: false
>             interval: 100
>             bytes: 102400
>         }
>
> The threshold in the above configuration is 10Kbps.
> If you set "bytes" to 0, the switch will be initiated right after
> the first packet is forwarded.
>
> Implementation-wise, have a look in file pim/pim_mre_data.cc method
> PimMre::is_switch_to_spt_desired_sg()
> This is the procedure that tests whether the SPT switch should be
> initiated.
> Please search the rest of the PIM-SM code for that method to see how
> it is used and in what places.
> It is difficult to give you further recommendations without knowing
> what exactly you are trying to extend in PIM-SM.
>
> > I saw that all packets are forwarded to the PIM process if the flag
> > VIFF_REGISTER is set.
> > But I can't find the code where the flag is reset, so that multicast
> > packets are no longer forwarded from the kernel to the PIM process.
>
> The VIFF_REGISTER flag is permanent and is used to indicate the
> so-called register_vif. That register_vif is used for communication
> between the UNIX kernel and XORP. For example, all PIM Register
> encapsulated packets received by the kernel (in the RP) are passed
> to the userland process such that they appear they have arrived on
> the register_vif.
> In other words, you shouldn't try to manipulate the VIFF_REGISTER
> flag.
>
> Hope that helps,
> Pavlin
>
> > Maybe someone can give me a hint.
> >
> > Thanks in advance.
> >
> > Regards,
> > Ralf
> >
> > _______________________________________________
> > Xorp-hackers mailing list
> > Xorp-hackers at icir.org
> > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers



More information about the Xorp-hackers mailing list