Subject: Re: SPT bit in (S,G) entry

From: "Jyotheeswara Rao Kurma" <[email-masked]>
Date: Mon, 16 Apr 2001 17:20:20 +0500

> 
> All the rules for setting/clearing the SPT bit are in section 
> 4.2.1 of
> draft-ietf-pim-sm-v2-new-02:
> 
> 
>     Thus, when a packet arrives, the (S,G) SPTbit is updated as 
> follows:
> 
>     void
>     Update_SPTbit(S,G,iif) {
>       if ( iif == RPF_interface(S)
>             AND JoinDesired(S,G) == TRUE
>             AND ( DirectlyConnected(S) == TRUE
>                   OR RPF_interface(S) != RPF_interface(RP)
>                   OR inherited_olist(S,G,rpt) == NULL
>                   OR RPF'(S,G) == RPF'(*,G) ) ) {
>          Set SPTbit(S,G) to TRUE
>       }
>     }
> 
>     Additionally a router sets SPTbit(S,G) to TRUE when it sees an
>     Assert(S,G) on RPF_interface(S).

    When can a router see Assert(S,G) on RPF_Interface(S),
    I guess RPF_interface(S) is upstream interface towards S.
    Could you please let me know, which triggers this ?
    This assert should be received on RPF_interface(S), who will send 
   this? and what will trigger him to send. 

 I only saw a case where a router can send an assert when it sees a 
data packet on an interface which is in its oif-list ???  Any other 
criteria that will trigger a router to send Assert ?

Thanks,
-----
Jyotheesh 

> Cheers,
>    Mark

---

From: Mark Handley <[email-masked]>
Date: Mon, 16 Apr 2001 08:44:47 -0700

>criteria that will trigger a router to send Assert ?

Asserts are triggered in the case you say above, and by other Asserts.

The text says "when it sees an Assert(S,G) on RPF_interface(S)", not
"sends".  It didn't send this assert - someone else did.

The typical case where this matters is:

     to S        to RP
       ^           ^
       |           |
       A           B
       |           |
    ---+-+---------+--
         |          
         C          

C has joined (*,G) through B.  Now it joins (S,G) through A.  How does
it decide when to set SPTbit?  Well, it wants to set SPTbit when a
data packet arrives from S via A, but it doesn't want to look at the
source MAC address of every data packet on the LAN to determine this,
because that's unnecessarily expensive.

So, when the first data packet from S is forwarded by A onto the LAN,
then B sees it and sends an Assert(*,G).  A sees the Assert(*,G) and
sends an Assert(S,G) to override it.  B now stops forwarding (S,G)
onto the LAN (but keeps forwarding other sources).

Now, C sees this Assert(S,G) on RPF_interface(S), and because it's an
Assert(S,G) and not an Assert(*,G), it KNOWS that the packet was
forwarded onto the LAN using (S,G) forwarding state, and so it knows
that it's safe to set SPTbit.

Hope this helps,

Mark

---

From: Francis Arts <[email-masked]>
Date: Tue, 17 Apr 2001 20:09:15 +0200

Mark,

Following your explanation, I find for router B the following state
transitions in section 4.5.1 ((S, G) assert state machine):
1) No Info --> Assert Winner.
2) Assert Winner --> Assert Loser.

The following question comes up now: How can router B know for which
sources S on which interfaces I it is worth monitoring the receipt of (S,
G) data packets? [If there is no means for B to know, B would have to do
this for every S on every interface I?]

Thanks for any clarification,

    Francis.

------------

---

From: Francis Arts <[email-masked]>
Date: Tue, 17 Apr 2001 20:16:27 +0200

Mark,

Following your explanation, I find for router B the following state
transitions based on section 4.5.2 (*. G) assert state machine):
1) No info --> Assert Winner.
2) Assert Winner -- > Assert Looser

The following question comes up now. How can router B know that it is
worth monitoring the receipt of (S, G) packets on interface I (I =
interface connecting A, B and C)? [If there is no means for B to know in
advance, B would have to monitor the receipt of (any source, G) packets on
any interface that is a branch of the tree?]

Thanks for any clarification you could provide,

    Francis.

---------------

---

From: Mark Handley <[email-masked]>
Date: Tue, 17 Apr 2001 11:46:04 -0700

>this for every S on every interface I?]

In practice, there are many ways to implement this (and you should
probably ask someone who works for a router vendor how best to do
this).  One option is to install a default multicast route that
forwards to an exception handler.  When a packet hits the exception
handler, PIM examines it, and in this case:

 - discovers that it's a group for which I is in the (*,G) olist.  

 - sends the assert as appropriate.

 - installs a forwarding table entry for (S,G) packets arriving
   on I that forwards to a discard interface.

Future (S,G) packets then won't hit the exception handler, but will be
fast-path forwarded to the discard interface.  If the assert state is
ever removed, you need to also remove the forwarding table entry too
so you handle future asserts correctly.

Note that the exception handler also has to handle other cases, such
as directly connected source starting sending, and other cross-traffic
on the LAN for which the router has no join state at all.

Cheers,
	Mark