📄 draft-ietf-pim-sm-v2-new-03.txt
字号:
Fenner/Handley/Holbrook/Kouvelas Section 4.2. [Page 24]INTERNET-DRAFT Expires: January 2002 July 2001On receipt on a data from S to G on interface iif: if( DirectlyConnected(S) == TRUE ) { set KeepaliveTimer(S,G) to Keepalive_Period # Note: register state transition may happen as a result # of restarting KeepaliveTimer, and must be dealt with here. } Update_SPTbit(S,G,iif) oiflist = NULL | if( iif == RPF_interface(S) AND UpstreamJPState(S,G) == Joined ) { | oiflist = inherited_olist(S,G) | if( oiflist != NULL ) { | restart KeepaliveTimer(S,G) | } | } else if( iif == RPF_interface(RP) AND SPTbit(S,G) == FALSE) { | oiflist = inherited_olist(S,G,rpt) | CheckSwitchToSpt(S,G) | } else { | # Note: RPF check failed | if ( SPTbit(S,G) == TRUE AND iif is in inherited_olist(S,G) ) { | send Assert(S,G) on iif | } else if ( SPTbit(S,G) == FALSE AND | iif is in inherited_olist(S,G,rpt) { | send Assert(*,G) on iif | } | } | oiflist = oiflist (-) iif | forward packet on all interfaces in oiflist |This pseudocode employs several "macro" definitions:directly_connected(S) is TRUE if the source S is on any subnet that isdirectly connected to this router (or for packets originating on thisrouter).inherited_olist(S,G) and inherited_olist(S,G,rpt) are defined in Section4.1.Basically inherited_olist(S,G) is the outgoing interface list forpackets forwarded on (S,G) state taking into account (*,*,RP) state,(*,G) state, asserts, etc.inherited_olist(S,G,rpt) is the outgoing interface for packets forwardedon (*,*,RP) or (*,G) state taking into account (S,G,rpt) prune state,and asserts, etc.Fenner/Handley/Holbrook/Kouvelas Section 4.2. [Page 25]INTERNET-DRAFT Expires: January 2002 July 2001Update_SPTbit(S,G,iif) is defined in section 4.2.2.CheckSwitchToSpt(S,G) is defined in section 4.2.1.UpstreamJPState(S,G) is the state of the finite state machine in section4.4.7.Keepalive_Period is defined in Section 4.10.Data triggered PIM-Assert messages sent from the above forwarding codeshould be rate-limited in a implementation-dependent manner.4.2.1. Last hop switchover to the SPT |In Sparse-Mode PIM, last-hop routers join the shared tree towards the |RP. Once traffic from sources to joined groups arrives at a last-hop |router it has the option of switching to receive the traffic on a |shortest path tree (SPT). |The decision for a rotuer to switch to the SPT is controlled as follows: | void | CheckSwitchToSpt(S,G) { | if ( ( pim_include(*,G) (-) pim_exclude(S,G) | (+) pim_include(S,G) != NULL ) | AND SwitchToSptDesired(S,G) ) { | restart KeepAliveTimer(S,G); | } | } |SwitchToSptDesired(S,G) is a policy function that is implementation |defined. An "infinite threshhold" policy can be implemented making |SwitchToSptDesired(S,G) return false all the time. A "switch on first |packet" policy can be implemented by making SwitchToSptDesired(S,G) |return true once a single packet has been received for the source and |group. |4.2.2. Setting and Clearing the (S,G) SPT bitThe (S,G) SPTbit is used to distinguish whether to forward on(*,*,RP)/(*,G) or on (S,G) state. When switching from the RP tree tothe source tree, there is a transition period when data is arriving dueto upstream (*,*,RP)/(*,G) state while upstream (S,G) state is beingFenner/Handley/Holbrook/Kouvelas Section 4.2.2. [Page 26]INTERNET-DRAFT Expires: January 2002 July 2001established during which time a router should continue to forward onlyon (*,*,RP)/(*,G) state. This prevents temporary black-holes that wouldbe caused by sending a Prune(S,G,rpt) before the upstream (S,G) statehas finished being established.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 receives an |Assert(S,G) on RPF_interface(S). |JoinDesired(S,G) is defined in Section 4.4.7, and indicates whether wehave the appropriate (S,G) Join state to wish to send a Join(S,G)upstream.Basically Update_SPTbit will set the SPT bit if we have the appropriate(S,G) join state and the packet arrived on the correct upstreaminterface for S, and one or more of the following conditions applies:1. The source is directly connected, in which case the switch to the SPT is a no-op.2. The RPF interface to S is different from the RPF interface to the RP. The packet arrived on RPF_interface(S), and so the SPT must have been completed.3. No-one wants the packet on the RP tree.4. RPF'(S,G) == RPF'(*,G). In this case the router will never be able to tell if the SPT has been completed, so it should just switch immediately.In the case where the RPF interface is the same for the RP and for S,but RPF'(S,G) and RPF'(*,G) differ, then we wait for an Assert(S,G)which indicates that the upstream router with (S,G) state believes theSPT has been completed. However item (3) above is needed because thereFenner/Handley/Holbrook/Kouvelas Section 4.2.2. [Page 27]INTERNET-DRAFT Expires: January 2002 July 2001may not be any (*,G) state to trigger an Assert(S,G) to happen.The SPT bit is cleared in the (S,G) upstream state machine (see Section4.4.7) when JoinDesired(S,G) becomes FALSE.4.3. PIM Register MessagesOverviewThe Designated Router (DR) on a LAN or point-to-point link encapsulatesmulticast packets from local sources to the RP for the relevant groupunless it recently received a Register Stop message for that (S,G) or(*,G) from the RP. When the DR receives a Register Stop message fromthe RP, it starts a Register Stop timer to maintain this state. Justbefore the Register Stop timer expires, the DR sends a Null-RegisterMessage to the RP to allow the RP to refresh the Register Stopinformation at the DR. If the Register Stop timer actually expires, the |DR will resume encapsulating packets from the source to the RP. |4.3.1. Sending Register Messages from the DREvery PIM-SM router has the capability to be a DR. The state machinebelow is used to implement Register functionality. For the purposes ofspecification, we represent the mechanism to encapsulate packets to theRP as a Register-Tunnel interface, which is added to or removed from the(S,G) olist. The tunnel interface then takes part in the normal packetforwarding rules specified in Section 4.2.If register state is maintained, it is maintained only for directlyconnected sources, and is per-(S,G). There are four states in the DR'sper-(S,G) Register state-machine:Join (J) The register tunnel is "joined" (the join is actually implicit, but the DR acts as if the RP has joined the DR on the tunnel interface).Prune (P) The register tunnel is "pruned" (this occurs when a Register Stop is received).Join Pending (JP) The register tunnel is pruned but the DR is contemplating adding it back.No Info (NI) No information. This is the initial state, and the state when theFenner/Handley/Holbrook/Kouvelas Section 4.3.1. [Page 28]INTERNET-DRAFT Expires: January 2002 July 2001 router is not the DR.In addition, a RegisterStop timer (RST) is kept if the state machine innot in the No Info state. +-----------------------------------+ | Figures omitted from text version | +-----------------------------------+ Figure 1: Per-(S,G) register state-machine at a DRIn tabular form, the state-machine is: |+---------------------++-------------------------------------------------|---------------------------------------|| || Event || || ++----------------+--------------+-----------------|------------------|--------------------||Prev State | ||Register- | | Could- | | Could- | | Register- || | RP changed || || ||Stop Timer | | Register | | Register | | Stop || | || ||expires | | ->True | | ->False | | received || | |+---------------------++----------------+--------------+-----------------+------------------+--------------------||No Info (NI) | ||- | -> J state | - | - | -| || || | add tunnel | | | |+---------------------++----------------+--------------+-----------------+------------------+--------------------|| ||- | - | -> NI state | -> P state | -> J state| || || | | remove tunnel | remove || | redirect || ||Join (J) | || | | | tunnel; set || | tunnel to || || || | | | Register- || | new RP || || || | | | Stop || | || || | | | timer(*) || | |+---------------------++----------------+--------------+-----------------+------------------+--------------------|| ||-> J state | - | -> NI state | -> P state | -> J state| || ||add tunnel | | remove tunnel | set Register- ||| redirect || ||Join Pending | || | | | Stop timer(*) ||| tunnel to new || ||(JP) | || | | | | RP; cancel || || || | | | | Register-Stop || || || | | | | timer || |+---------------------++----------------+--------------+-----------------+------------------+--------------------|| ||-> JP state | - | -> NI state | - | -> J state| || ||set Register- | | | remove tunnel | | redirect tunnel ||||Prune (P) | ||Stop | | | | | to new RP; |||| ||timer(**); | | | | | cancel Register- |||| ||send null | | | | | Stop timer |||| ||register | | | | | |+---------------------++----------------+--------------+-----------------+------------------+--------------------|Fenner/Handley/Holbrook/Kouvelas Section 4.3.1. [Page 29]INTERNET-DRAFT Expires: January 2002 July 2001Notes:(*) The RegisterStopTimer is set to a random value chosen uniformly from the interval ( 0.5 * Register_Suppression_Time, 1.5 * Register_Suppression_Time) minus Register_Probe_Time;Subtracting off register_probe_time is a bit unnecessary because it isreally small compared to register suppression timeout, but was in theold spec and is kept for compatibility.(**) The RegisterStopTimer is set to register_probe_time.The macro "CouldRegister" in the state machine is defined as: Bool CouldRegister(S,G) { return ( I_am_DR( RPF_interface(S) ) AND KeepaliveTimer(S,G) is running AND DirectlyConnected(S) == TRUE ) }Note that on reception of a packet at the DR from a directly connectedsource, KeepaliveTimer(S,G) needs to be set by the packet forwardingrules before computing CouldRegister(S,G) in the register state machine,or the first packet from a source won't be registered.Encapsulating data packets in the Register TunnelConceptually, the Register Tunnel is an interface with a smaller MTUthan the underlying IP interface towards the RP. IP fragmentation onpackets forwarded on the Register Tunnel is performed based upon thissmaller MTU. The encapsulating DR may perform Path-MTU Discovery to theRP to determine the effective MTU of the tunnel. This smaller MTU takes |both the outer IP header and the PIM register header overhead into |account. If a multicast packet is fragmented on the way into the |Register Tunnel, each fragment is encapsulated individually so contains |IP, PIM, and inner IP headers. |In IPv6, an ICMP Fragmentation Required message may be sent by theencapsulating DR.Just like any forwarded packet,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -