WO2012142871A1 - 本地局域网中组播流量转发方法及组播路由器 - Google Patents

本地局域网中组播流量转发方法及组播路由器 Download PDF

Info

Publication number
WO2012142871A1
WO2012142871A1 PCT/CN2012/071548 CN2012071548W WO2012142871A1 WO 2012142871 A1 WO2012142871 A1 WO 2012142871A1 CN 2012071548 W CN2012071548 W CN 2012071548W WO 2012142871 A1 WO2012142871 A1 WO 2012142871A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
local
multicast traffic
assert
multicast
Prior art date
Application number
PCT/CN2012/071548
Other languages
English (en)
French (fr)
Inventor
林�智
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012142871A1 publication Critical patent/WO2012142871A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a multicast traffic forwarding method and a multicast router in a local area network. Background technique
  • Multicast is a bandwidth saving technology.
  • a data source sends only one traffic. All hosts that join a multicast group can receive the same traffic.
  • the widely used Layer 3 multicast technology includes PIM-SM (Protocol Independent Multicast-Sparse Mode) and PIM-SSM (Protocol Independent Multicast-Source Specific Multicast). Broadcasting and IGMP (Internet Group Management Protocol), where PIM (Protocol Independent Multicast) is used between multicast routers (hereinafter referred to as routers), and IGMP is used for local LAN hosts and routers. between.
  • the host receiver sends the IGMP join information to the router in the local area network to express the multicast traffic that it wants to receive.
  • the elected DR Designated Router
  • the host in the LAN sends a PIM join message to the upstream router in the direction of the RP (Rendezvous Point) or S (data source) to generate an RPT (Rendezvous Point Tree) or SPT (Shortest Path Trees). ), receive multicast traffic and forward it to the local area network.
  • the router with the largest IP address becomes the DR. This rule obviously cannot dynamically guarantee that the DR is directly in the optimal path from the S to the local area network.
  • the downstream router will The next hop router to the optimal path of the RP or S indicated by the MRIB (Multicast Routing Information Base) sends a PIM Join message.
  • the next hop selected by the downstream router is not the DR, two routers will forward the multicast traffic to the local LAN at the same time, triggering the Assert process, and finally the Assert Winner (the winner of the Assert process) is responsible for the local LAN. Forward multicast traffic.
  • the Assert decision rule is: When SPT is used for forwarding, the router closest to S wins; if one is forwarded by SPT, the other is forwarded by RPT, and the router that forwards with SPT wins; when it is forwarded by RPT, the router closest to RP Win. It can be seen that through the Assert process, the local area network receives traffic from the nearest Assert Winner from the RP or S, and the Assert Winner will be responsible for joining or leaving the upstream router on behalf of the host receiver in the local area network.
  • the macro couldAssert S, G, I
  • SPT can be asserted
  • the macro couldAssert *, G, I
  • RPT can be asserted
  • the interface of the non-DR multicast router in the local area network is not in the scope of the CanAssert (assertable), and there will be no Assert process. Therefore, when there is only a host receiver and no downstream router in the local area network, the DR must be responsible for sending PIM join messages to the upstream and forwarding multicast traffic to the local area network. Therefore, the local area network may not receive multicast traffic from the router closest to the RP or S.
  • DR R5 will send a PIM join message to the RP on behalf of the receiver, and generate an RPT via R1, R2, and R5. After SPT switching, an SPT via R1, R2, and R5 is generated.
  • the existing multicast routing technology restricts only the DR to send the PIM join message to the upstream and forward to the local area network.
  • multicast traffic is sent, when the DR cannot be in the optimal path of S to the local area network, there is a waste of network resources.
  • the main purpose of the present invention is to provide a multicast traffic forwarding method and a multicast router in a local area network, which are designed to avoid waste of router processing resources and link bandwidth resources caused by DR forwarding.
  • the present invention provides a multicast traffic forwarding method in a local area network, including:
  • the non-designated router enters the delay waiting state when the non-DR local join interface detects the multicast traffic forwarded by the DR.
  • an Independent Multicast Protocol (PIM) join message to the upstream router in the direction of the convergence point (RP) or data source (S) to generate a shared tree (RPT) or active tree (SPT); from RPT or After receiving the multicast traffic, the SPT forwards the multicast traffic to the local area network; and receives an asserted Assert message sent by the DR when the downstream outbound interface detects the multicast traffic; according to the Assert message and the local route metric value, The DR competes to forward the multicast traffic.
  • PIM Independent Multicast Protocol
  • the forwarding according to the Assert message and the local route metric, the forwarding of the multicast traffic with the DR:
  • the non-DR local join interface continues to forward the multicast traffic and sends the Assert message; otherwise, the multicast traffic is stopped, and the DR is responsible for forwarding the multicast to the local area network. flow.
  • the non-DR before the non-DR local joining interface detects the multicast traffic forwarded by the DR, before entering the delay waiting state, the method further includes:
  • the non-DR is sent to the DR and other non-DR receiving host receivers in the local local area network
  • the group management protocol (IGMP) join message is sent.
  • the DR is responsible for sending PIM join messages to the upstream routers in the RP or S direction, and receiving multicast traffic from the RPT or SPT, and forwarding them to the local area network.
  • IGMP group management protocol
  • the non-DR non-DR local join interface is an interface that receives the IGMP join message but does not receive the PIM join message and is not selected as the DR.
  • the delay waiting time of the delay waiting state is calculated according to the route metric value reaching the RP or S; wherein, the smaller the route metric value, the shorter the delay waiting time.
  • the PIM join message is sent to the upstream router in the RP or S direction: when the non-DR local joining interface receives the IGMPv3 join message, the non-DR sends the PIM to the S direction (S, G) Message; When the non-DR local join interface receives the IGMPv2 join message, the non-DR sends a PIM (*, G) message to the RP.
  • the type of the Assert message sent by the DR is determined by the forwarding state of the DR.
  • the type of the Assert message is an Assert (S, G) message; when the DR uses the RPT to forward, The Assert message is of the type Assert (*, G) message.
  • the method further includes:
  • the method further includes: when the non-DR local joining interface receives an IGMPv2 join message and the non-DR is the last hop and When the local SPT handover condition is met, the non-DR completes the handover from the RPT to the SPT.
  • the present invention also provides a multicast router for forwarding multicast traffic in a local area network, including: a delay waiting module, configured to detect on a non-DR local joining interface of the multicast router When the multicast traffic forwarded by the DR enters a delayed waiting state;
  • Adding a message sending module configured to send a PIM join message to an upstream router in the RP or S direction to generate an RPT or SPT after the delay wait timeout;
  • the multicast traffic forwarding module is configured to forward the multicast traffic to the local local area network after receiving the multicast traffic from the RPT or the SPT.
  • the message receiving module is configured to receive an Assert message sent by the DR when the downstream outbound interface detects the multicast traffic;
  • the contention forwarding module is configured to forward the multicast traffic with the DR according to the Assert message and the local route metric.
  • the contention forwarding module includes:
  • a comparing unit configured to compare the Assert message with a local routing metric value
  • a forwarding control unit configured to: when the local routing metric value is better than the Assert message, control the multicast traffic forwarding module to join from the non-DR local
  • the interface continues to forward multicast traffic and sends Assert messages; otherwise, it stops forwarding multicast traffic and continues to be responsible for forwarding multicast traffic to the local area network by the DR.
  • the contention forwarding module is further configured to: during the delay waiting for the timeout period, and the message receiving module receives the Assert message sent by the DR when the downstream outbound interface detects the multicast traffic, according to the Assert message and the local Routing metrics, and the DR is contending to forward the multicast traffic.
  • the contention forwarding module is further configured to: when the non-DR local joining interface of the multicast router receives an IGMPv2 join message, and the multicast router is the last hop and meets the local SPT switching condition, , complete the switch from RPT to SPT.
  • the method for forwarding a multicast traffic in a local area network and the multicast router proposed by the present invention introduces a non-DR local join interface concept, and extends the Assert process to process the non-DR local join interface type, and the non-DR is based on the Assert message and the local route.
  • Measure value and DR competition to forward multicast Traffic when there is no downstream multicast router in the local area network, the host receiver still receives multicast traffic from the router located on the RP or S to the optimal path of the local area network, thereby achieving optimal utilization of network resources and avoiding complete The waste of router processing resources and link bandwidth resources caused by DR forwarding.
  • FIG. 1 is a schematic diagram of implementing multicast traffic forwarding by an existing protocol
  • FIG. 2 is a schematic flowchart of a method for forwarding a multicast traffic in a local area network according to the present invention
  • FIG. 3 is a schematic diagram of a multicast traffic forwarding method in a local area network according to the present invention, which is forwarded according to an Assert message and a local route metric value. Schematic diagram of the flow of multicast traffic;
  • FIG. 4 is a schematic diagram of a PIM-SSM combined with an IGMPv3 network processing flow in a method for forwarding a multicast traffic in a local area network according to the present invention
  • FIG. 5 is a PIM-SM combination in an embodiment of a method for forwarding multicast traffic in a local area network according to the present invention
  • FIG. 6 is a schematic diagram of a post-processing flow when the DR forwards the RPT traffic shown in FIG. 5;
  • FIG. 7 is a schematic diagram of a post-processing flow when the DR forwards the SPT traffic shown in FIG. 5;
  • FIG. 8 is a schematic structural diagram of an embodiment of a multicast router for multicast traffic forwarding in a local area network according to the present invention.
  • FIG. 9 is a schematic structural diagram of a contention forwarding module in an embodiment of a multicast router for multicast traffic forwarding in a local area network according to the present invention.
  • the solution of the embodiment of the present invention is as follows: the non-DR local join interface concept is introduced, and the Assert process is extended to the non-DR local join interface type, and the non-DR is forwarded according to the Assert message and the local route metric value.
  • Multicast traffic when there is no downstream multicast router in the local area network, the host receiver is still on the path from the RP or S to the local LAN optimal path. The receiver receives multicast traffic to optimize the utilization of network resources.
  • an embodiment of the present invention provides a method for forwarding a multicast traffic in a local area network, including:
  • Step S101 When the non-DR local joining interface detects the multicast traffic forwarded by the DR, the non-DR enters a delayed waiting state.
  • the non-DR local multicast interface that detects the DR forwarding is the multicast traffic that the DR receives from the RPT or SPT and forwards the multicast traffic to the local area network.
  • the host receiver wants to receive a certain multicast traffic, the host receiver sends an IGMP join message to multiple multicast routers in the local area network.
  • the non-DR and the DR in the local area network and other non-DRs are sent by the receiver of the receiving host.
  • the IGMP joins the message, and the DR is responsible for sending a PIM join message to the upstream router in the RP or S direction, establishing an RPT or SPT, and receiving multicast traffic from the RPT or SPT to the local area network for forwarding.
  • the host receiver is a host receiver having no downstream multicast router in the local area network.
  • a non-DR non-DR local join interface is an interface that receives an IGMP join message but does not receive a PIM join message and is not elected as the DR.
  • the delay wait time is calculated based on the route metrics arriving at the RP or S; where the smaller the route metric, the shorter the latency wait time.
  • Step S102 If the delay waits for a timeout, send a PIM join message to the upstream router in the RP or S direction to generate an RPT or SPT.
  • Step S103 After receiving the multicast traffic from the RPT or the SPT, forwarding the multicast traffic to the local area network.
  • Step S104 Receive an Assert message sent by the DR when the downstream outbound interface detects the multicast traffic.
  • Step S105 forwarding the multicast with the DR according to the Assert message and the local routing metric value. Traffic.
  • the non-DR after the delay wait timeout, sends a PIM join message to the upstream router in the RP or S direction, and generates an RPT or SPT.
  • the non-DR receives the multicast traffic from the RPT or the SPT, it forwards the packet to the local area network.
  • the DR generates the Assert process when the downstream interface detects the multicast traffic.
  • the non-DR receives the Assert message from the DR and joins the Assert Winner.
  • the Assert process of the DR is consistent with the protocol RFC4601 PIM-SM: Protocol Specification ( Revised ).
  • the type of the Assert message sent by the DR is determined by the forwarding state of the DR. When the DR uses SPT forwarding, it is Assert (S, G). Message; When the DR uses RPT forwarding, it is an Assert (*, G) message.
  • the Assert process that occurs on a non-DR local join interface compares the received Assert message with the local route metric. If the non-DR local route metric is better than the received Assert message, the non-DR local join interface enters the Assert Winner state, continues to forward multicast traffic, and sends an Assert message. When the outbound interface of the DR receives an Assert message that is better than its own, it enters the Assert Loser state and stops forwarding multicast traffic. At this point, the non-DR to the RP or S optimal path is responsible for forwarding multicast traffic to the local area network. If the non-DR local route metric is not better than the received Assert message, the non-DR local join interface enters the Assert Loser state, stops forwarding multicast traffic, and continues to be forwarded by the DR to the local area network.
  • the type of the PIM join message is determined by the version of the IGMP join message received by the non-DR on the local join interface. If the IGMPv3 join message is received, the non-DR sends a PIM (S, G) message to the S direction. The local join interface receives the IGMPv2 join message, and the non-DR sends a PIM (*, G) message to the RP.
  • the non-DR When the host receiver sends an IGMPv2 join message and the non-DR is the last hop and meets the local SPT handover condition, the non-DR performs the handover from the RPT to the SPT, and after the handover is completed, the multicast traffic received from the SPT is forwarded. In addition, during the delay waiting for the timeout period, when the non-DR receives the Assert message sent by the DR when the downstream outbound interface detects the multicast traffic, the non-DR competes with the DR to forward the multicast traffic according to the Assert message and the local route metric. .
  • step S105 includes:
  • Step S1051 The non-DR compares the received Assert message with the local route metric value.
  • Step S1052 If the local route metric value is better than the received Assert message, the non-DR local join interface continues to forward the multicast traffic, and sends the multicast traffic. Assert message; otherwise, the forwarding of multicast traffic is stopped, and the DR is responsible for forwarding multicast traffic to the local area network.
  • the multicast router in the local area network can participate in the competition process of multicast traffic forwarding when the corresponding conditions are met.
  • this embodiment introduces a new interface concept.
  • the DR is added to the interface locally.
  • the host receiver still receives multicast traffic from the router located on the RP or S to the local LAN optimal path, thus achieving Optimized use of network resources.
  • the following is a description of two methods for implementing local network host receivers to receive multicast traffic with an optimal path according to different multicast routing technologies used in the network.
  • the non-DR local join interface meets the following conditions: Not an RPF (Reverse Path Forwarding) interface to S;
  • Spt_assert_metric S, I : The route metric of the non-DR router to S, calculated in accordance with the definition of RFC4601.
  • Non_DR_DataTrigger_Timer ( S, G, I ): A delay timer for sending a PIM JOIN ( S, G ) message to the S direction set when the non-DR local join interface detects (S, G) traffic.
  • the calculation method is as follows:
  • Non_DR_DataTrigger_Timer S, G, I
  • S, G, I takes a range of values (2, 27), monotonically increasing on [0, + ⁇ ).
  • Non_DR_DataTrigger_Timer S, G, I
  • S, G, I can also use other calculation methods.
  • the elected DR sends a PIM join (S, G) message to the upstream router in the S direction to generate an SPT.
  • the DR receives multicast traffic from the SPT and forwards it to the local area network.
  • the delay timer Non_DR_DataTrigger_Timer (S, G, 1).
  • the delay timer timeout triggers a non-DR to send a PIM JOIN (S, G) message to the upstream router in the S direction, generates an SPT, and forwards the multicast traffic to the local area network.
  • the DR receives the multicast traffic on the downstream outbound interface, triggers the Assert process, sends the Assert (S, G) message, and enters the Assert (S, G) Winner state.
  • Non-DR compares the local spt_assert_metric ( S, I ) with the received Assert ( S, G ) message if local spt_assert_metric (S, I) is better and has forwarded multicast traffic to the local area network.
  • the non-DR local join interface enters the Assert (S, G) Winner state, sends Assert (S, G) messages, and continues to forward multicast traffic.
  • the non-DR local join interface enters the Assert (S, G) Loser state. If the delay timer has not expired, the timer is canceled. If the non-DR sends a PIM JOIN (S, G) message upstream because of the local LAN relationship, a PIM PRUNE (S, G) message is sent. If the DR receives an Assert (S, G) message that is better than itself, it enters the Assert (S, G) Loser state and stops forwarding multicast traffic. Otherwise, it continues to be responsible for forwarding multicast traffic to the local area network. At this point, the host receiver receives multicast traffic from the router located at the data source S to the local LAN optimal path.
  • the following describes the processing flow after the non-DR local join interface detects multicast traffic in the network environment where the PIM-SSM is combined with the IGMPv3.
  • Step S201 The non-DR local joining interface that is not connected to the local area network by the DR detects the multicast traffic forwarded by the DR.
  • Step S202 The non-DR sets a delay timer Non_DR_DataTrigger_Timer (S, G, I) for transmitting the PIM JOIN (S, G) message to the S direction.
  • S, G, I a delay timer for transmitting the PIM JOIN (S, G) message to the S direction.
  • Step S203 determining whether the delay timer expires, if timeout, step S204 is performed, otherwise, waiting is continued, if the Assert (S, G) message is received during the waiting timeout period, step S206 is performed;
  • Step S204 The delay timer expires to trigger the non-DR to send a PIM JOIN (S, G) message to the upstream router in the S direction, and establish S to the non-DR SPT.
  • Step S205 The non-DR receives the multicast traffic from the SPT and forwards the data to the local area network.
  • the downstream interface of the DR receives the multicast traffic forwarded by the non-DR, triggers the Assert process, enters the Assert (S, G) Winner state, and sends an Assert (S, G) message.
  • Step S207 The local spt_assert_metric (S, I) is better than the received Assert (S, G) message, enters the Assert (S, G) Winner state, and sends an Assert (S, G) message. Perform different subsequent operations based on whether the non-DR has forwarded multicast traffic.
  • the Assert (S, G) message sent by the non-DR will cause the downstream outbound interface of the DR and other non-DR non-DR local join interfaces to enter the Assert (S, G) Loser state.
  • the non-DR If the non-DR has not forwarded the multicast traffic to the local area network, the other non-DRs complete the establishment of the SPT.
  • the non-DR temporarily enters the Assert (S, G) Winner state by receiving the Assert (S, G) message sent by the DR, but will soon receive the Assert (S, G) of the non-DR sent by the multicast traffic.
  • the message according to the calculation method of the delay timer, the route metric of the non-DR to the data source S is not better than the Assert (S, G) message received from other non-DRs, cancels the delay timer and enters Assert (S, G) Loser status.
  • the non-DR sends a PIM JOIN (S, G) message upstream because of the local LAN relationship, it sends a PIM PRUNE (S, G) message to cancel the establishment of the SPT.
  • the router on the local LAN that is on the S-optimal path is responsible for forwarding multicast traffic to the local area network.
  • Step S208 The local spt_assert_metric (S, I) of the non-DR router cannot be better than the received Assert (S, G) message, enter the Assert (S, G) Loser state, cancel the delay timer that has not expired, if it has been localized
  • the relationship between the local area network sends a PIM JOIN(S, G) message upstream, and then sends PIM PRUNE (S, G).
  • Case (2) PIM-SM combines with IGMPv2; PIM-SM protocol is used between routers, and IGMPv2 protocol is used between router and host.
  • the characteristic of this situation is that the host receiver is originally from The RPT receives the multicast traffic, and the last hop multicast router determines whether the SPT handover is to be performed. The forwarding of the multicast traffic has a handover process from the RPT to the SPT.
  • the non-DR local join interface meets the following conditions:
  • Spt_assert_metric G, I: Non-DR to RP route metric, calculated in accordance with RFC4601 definition.
  • Spt_assert_metric (S, I): The route metric of the non-DR to data source S, calculated in accordance with the definition of RFC4601.
  • Non_DR_DataTrigger_Timer (*, G, I): Delay timer for sending PIMJOIN (*, G) messages to the RP direction set when the non-DR local join interface detects multicast traffic. The calculation method is as follows:
  • Non_DR_DataTrigger_Timer (*, G, I) takes a range of values (5, 30), incremented monotonically in [0, + ⁇ ).
  • Non_DR_DataTrigger_Timer S, G, I: A delay timer for sending a PIM JOIN (S, G) message to the data source S direction set by the non-DR when the SPT switching condition is satisfied. Calculation Methods as below:
  • Non_DR_DataTrigger_Timer ( S, G, I ) 27-10000/ ( metric ( S ) +400 ) where metric( S ) is a non-DR to S routing vector.
  • Non_DR_DataTrigger_Timer (S, G, I) takes a range of values (2, 27), monotonically increasing at [0, + ⁇ ).
  • the above two delay timers can also use other calculation methods as long as the route vector is smaller and the delay time is shorter.
  • the host receiver sends an IGMPv2 join message to request multicast traffic with a group address of G.
  • the DR in the local area network sends a PIM JOIN (*, G) message to the upstream router in the RP direction on behalf of the host in the local area network, establishes an RPT, and receives the multicast traffic and forwards it to the local area network.
  • the non-DR local add interface that is not connected to the local area network (LAN) sets the delay timer Non_DR_DataTrigger_Timer (*, G, 1) for sending PIM JOIN (*, G) messages to the RP direction after detecting the multicast traffic.
  • the non-DR sends a PIM JOIN (*, G) message to the upstream router in the RP direction to generate an RPT and forward the multicast traffic to the local area network.
  • the DR generates an Assert process when the downstream outbound interface receives multicast traffic, and sends different Assert messages according to the current forwarding state.
  • the DR sends an Assert (*, G) message if it is still in the RPT forwarding state. If the RPT to SPT switchover has been completed, the Assert (S, G) message is sent.
  • Non-DR enters different processing flows according to different Assert messages received:
  • the non-DR router receives the Assert (*, G) message. If the non-DR local rpt_assert_metric (G, I) is better than the received Assert (*, G) message, enter the Assert (*, G) Winner state, send the Asser(*, G) message and continue to forward the multicast traffic.
  • the Assert (*, G) message sent by the non-DR causes the DR to enter the Assert (*, G) Loser state, and the DR is responsible for forwarding the multicast traffic received from the RPT to the local area network.
  • the non-DR can generate the SPT and forward the multicast traffic received from the SPT instead of the local SPT switchover condition, instead of the multicast router forwarded by the RPT in the local LAN.
  • the multicast router that satisfies the SPT switching condition sets the delay timer Non_DR_DataTrigger_Timer (S, G, I) of the PIM JOIN (S, G) message to the S direction. After the timer expires, the PIM JOIN is sent to the upstream router in the S direction. , G) message, establish SPT, receive multicast traffic from SPT and forward it to local area network. The multicast router in the SPT forwarding state receives the multicast traffic forwarded from the RPT on the outbound interface. The Assert process occurs and the Assert (S, G) message is sent.
  • the Assert (S, G) message causes the multicast router that is still in the RPT forwarding state to enter the Loser state, and stops forwarding the multicast traffic received from the RPT; or performs an SPT switchover and joins the SPT to forward the contention. At this point, the local area network accepts multicast traffic from the SPT.
  • the Assert (S, G) message of I) enters the Assert (S, G) Loser state, otherwise it continues to check the SPT switch condition.
  • the non-DR receives the Assert (S, G) message. If the non-DR sends a PIM JOIN (*, G) message to the RP in the local area network, the PIM PRUNE (*, G) message is sent to cancel the establishment of the RPT. If the non-DR local spt_assert_metric (S, I) is better than the received Assert (S, G) message and the local switch SPT condition is met, set to S The delay timer Non_DR_DataTrigger_Timer (S, G, 1) of the PIM JOIN (S, G) message is sent in the direction.
  • the timer After the timer expires, it sends a PIMJOIN(S, G) message to the upstream router in the S direction, establishes an SPT, receives multicast traffic, and forwards it to the local area network.
  • the Assert process occurs, and the Assert (S, G) message is sent to enter the Assert (S, G) Winner state.
  • the multicast router currently responsible for forwarding receives an Assert (S, G) message better than itself, enters the Assert (S, G) Loser state, and stops forwarding traffic to the local area network.
  • the multicast router that satisfies the SPT condition and is located on the S-to-local LAN optimal path is responsible for forwarding traffic to the local area network.
  • the non-DR local spt_assert_metric (S, I) is better than the received Assert (S, G) message, but does not satisfy the local handover SPT condition, periodically check and judge until the SPT condition is met, the SPT is established, and the SPT is added. Forward the competition; or receive an Assert (S, G) message that is better than the local spt_assert_metric (S, I) and enter the Assert (S, G) Loser state.
  • the second case of receiving the multicast traffic by the host receiver of the present invention in the optimal path is as follows: PIM-SM combines with the IGMPv2 network environment, and the non-DR local join interface detects the multicast. The process after the flow is described in detail:
  • Step S301 The non-DR non-DR local joining interface detects the multicast traffic forwarded by the DR to the local area network.
  • Step S302 The non-DR sets a delay timer Non_DR_DataTrigger_Timer (*, G, 1) for transmitting the PIM JOIN (*, G) message to the RP direction.
  • the waiting time of the delay timer is relatively long. If the DR can perform SPT switching, it can be completed within the waiting time;
  • Step S304 Non_DR_DataTrigger_Timer (*, G, I) delay timer timeout triggers the non-DR to send a PIM JOIN (*, G) message to the RP direction to establish an RPT.
  • Step S305 The non-DR receives the multicast traffic from the RPT and forwards the traffic to the local area network.
  • the Assert process occurs when the downstream outbound interface of the DR receives multicast traffic. If the DR is in the RPT forwarding state, send an Assert (*, G) message. If the DR has completed the switch from RPT to SPT, the Assert (S, G) message is sent.
  • Step S306 The non-DR judges the type of the received Assert message. If you receive Assert
  • step S307 is performed; otherwise, step S308 is performed.
  • Step S307 The non-DR receives the Assert (*, G) message, and enters the corresponding processing process.
  • Assert (*, G) the Assert (*, G) message
  • Step S308 The non-DR receives the Assert (S, G) message, and determines whether the router has sent PIMJOIN(*, G) to the RP direction due to the local area network relationship. If it has been sent, step S309 is performed. Otherwise, the step is performed. 310.
  • Step S309 The DR has completed the handover of the RPT to the SPT.
  • the SPT forwarding is better than the RPT forwarding, and the non-DR sends the PIM PRUNE (*, G) message to the RP direction to cancel the establishment of the RPT.
  • Step 310 Enter a process in which the non-DR receives the Assert (S, G) message. Please refer to the detailed description of Figure 7 in conjunction with Figure 7.
  • Step S401 The non-DR compares the local rpt_assert_metric (G, I) with the received Assert (*, G) message if the local rpt_assert_metric (G, I) is better than the received Assert (*, G) message, step S402 is performed, otherwise, step S403 is performed;
  • Step S402 The local rpt_assert_metric (G, I) is better than the received Assert (*, G) message, enters the Assert (*, G) Winner state, and sends an Assert (*, G) message.
  • the DR receives a better than local Assert (*, G) message, enters the Asser (*, G) Loser state, and stops forwarding traffic.
  • the router closest to the RP in the network is responsible for forwarding the multicast traffic received from the RPT.
  • Step S403 The non-DR local rpt_assert_metric (G, I) cannot be better than the received Assert (*, G) message, the interface enters the Asser (*, G) Loser state, cancels the delay timer that has not expired, if it has been to the RP
  • the PIMJOIN (*, G) message is sent in the direction, and the PIM PRUNE (*, G) message is also sent, and step S404 is performed;
  • Step S404 Each router determines whether the local switching SPT condition is satisfied. Step S405 is performed to satisfy the switching condition, otherwise step S409 is performed;
  • Step S405 Setting a delay timer Non_DR_DataTrigger_Timer (S, G, I) for transmitting a PIM JOIN (S, G) message to the S direction;
  • Step S406 Determine whether the Non_DR_DataTrigger_Timer (S, G, I) delay timer expires. Step S407 is performed, otherwise step 411 is performed;
  • Step S407 The delay timer expires to trigger the router to send a PIM JOIN (S, G) message to the S direction to establish an SPT;
  • Step S408 The router that completes the SPT handover forwards the multicast traffic received from the SPT to the local area network.
  • the (S, G) outbound interface of the router receives the multicast traffic forwarded by other routers, triggers the Assert process, and sends the Assert (S, G) Message, enter the Assert (S, G) Winner state.
  • the router that was responsible for forwarding traffic to the local area network received an Assert(S, G) message better than itself, entered the Assert (S, G) Loser state, and stopped forwarding traffic.
  • the local local area network receives the multicast traffic from the router that meets the handover SPT condition and is closest to the distance S;
  • Step S409 Receiving an Assert (S, G) message before the local switching SPT condition is satisfied, if The local spt_assert_metric (S, I) is better than the received Assert (S, G) message, and continues to wait for the local handover SPT condition to be satisfied, step S404 is performed, otherwise step 410 is performed;
  • Step 410 Receive an Assert (S, G) message that is better than the local spt_assert_metric (S, I), and the interface enters the Assert(S, G)Loser state.
  • the router ends the SPT forwarding race;
  • Step 411 Receive the Assert (S, G) message before the delay timer Non_DR_DataTrigger_Timer (S, G, I) times out, if the local spt_assert_metric (S, I) is better than the received Assert (S, G) message, step S406, continue to wait for the delay timer to time out, otherwise step 412;
  • Step 412 The local spt_assert_metric (S, I) cannot be better than the received Assert (S, G) message, cancel the Non_DR_DataTrigger_Timer (S, G, I) delay timer, and the interface enters the Assert (S, G) Loser state, the router. Ending the competition for SPT forwarding;
  • Step S501 The non-DR compares the local spt_assert_metric (S, I) with the received Assert (S, G) message. If the message is not better than the received Assert (S, G) message, step S502 is performed, otherwise step S503 is performed. ;
  • Step S502 The non-DR router receives the better Assert (S, G) message, and the non-DR local join interface enters the Assert (S, G) Loser state, and the SPT forwarding of the router ends;
  • step S501 determining whether the condition of the local switching SPT is satisfied, if yes, performing step S504, otherwise continuing to wait, if a new Assert (S, G) message is received before the switching SPT condition is satisfied, step S501 is performed;
  • Step S504 setting a delay timer Non_DR_DataTrigger_Timer (S, G, I) for transmitting PIM JOIN (S, G) in the S direction;
  • Step S505 detecting whether the delay timer expires, timeout step S506, otherwise continue to wait, if the Assert (S, G) message is received before the timeout, step S508;
  • Step S506 The timer expires, and the non-DR sends a PIM JOIN (S, G) message to the S direction to establish an SPT.
  • Step S507 The non-DR that completes the SPT handover forwards the multicast traffic to the local area network.
  • the Assert process is triggered, the Assert (S, G) message is sent, and the interface enters Assert (S, G) Winner status.
  • the router that was previously responsible for forwarding multicast traffic enters the Assert (S, G) Loser state by receiving a better than its own Assert (S, G) message.
  • the local area network receives the multicast traffic from the router that meets the handover SPT condition and is closest to the distance S;
  • Step S508 Receive an Assert (S, G) message before the delay timer expires. If the local spt_assert_metric (S, I) is better than the received Assert (S, G) message, continue to wait for the timer to time out, and perform step S505. Otherwise, step S509 is performed;
  • Step S509 Cancel the delay timer Non_DR_DataTrigger_Timer (S, I, G), the interface enters the Assert (S, G) Loser state, and the SPT forwarding competition of the router ends.
  • the PIM-SSM network and the PIM-SM network can be implemented.
  • the host receiver in the broadcast router receives the multicast traffic with the optimal path to optimize the utilization of network resources.
  • an embodiment of the present invention provides a multicast traffic forwarding in a local area network.
  • the multicast router includes: a delay waiting module 801, a join message sending module 802, a multicast traffic forwarding module 803, a message receiving module 804, and a contention forwarding module 805, where:
  • the delay waiting module 801 is configured to enter a delay waiting state when the non-DR local joining interface detects the multicast traffic forwarded by the DR.
  • the message sending module 802 is configured to send a PIM join message to the upstream router in the RP or S direction to generate an RPT or SPT when the delay waits for a timeout;
  • the multicast traffic forwarding module 803 is configured to forward the multicast traffic to the local area network after receiving the multicast traffic from the RPT or the SPT.
  • the message receiving module 804 is configured to receive an Assert message sent by the DR when the downstream outbound interface detects the multicast traffic.
  • the contention forwarding module 805 is configured to forward the multicast traffic with the DR according to the Assert message and the local route metric.
  • the non-DR local multicast interface that detects the DR forwarding is the multicast traffic that the DR receives from the RPT or SPT and forwards the multicast traffic to the local area network.
  • the host receiver wants to receive a certain multicast traffic, the host receiver sends an IGMP join message to multiple multicast routers in the local area network.
  • the non-DR and the multiple multicast routers in the local area network receive the IGMP sent by the host receiver.
  • the message is added, and the DR is responsible for sending a PIM join message to the upstream router in the RP or S direction, establishing an RPT or SPT, and receiving multicast traffic from the RPT or SPT to the local area network for forwarding.
  • a non-DR local join interface is an interface that receives an IGMP join message but does not receive a PIM join message and is not elected as a DR.
  • the delay wait time is calculated based on the route metrics arriving at the RP or S; where the smaller the route metric, the shorter the latency wait time.
  • the non-DR When the delay waits for a timeout, the non-DR sends a PIM join message to the upstream router in the RP or S direction. After the non-DR receives the multicast traffic from the RPT or SPT, it forwards it to the local area network, DR. The Assert process occurs when the downstream outbound interface detects the multicast traffic. The non-DR receives the Assert message sent by the DR and enters the competition for Assert Winner.
  • the Assert process of the DR is consistent with the protocol RFC4601 PIM-SM: Protocol Specification ( Revised ).
  • the type of the Assert message sent by the DR is determined by the forwarding state of the DR. When the DR uses SPT forwarding, it is Assert (S, G). Message; When the DR uses RPT forwarding, it is an Assert (*, G) message.
  • the Assert process that occurs on a non-DR local join interface compares the received Assert message with the local route metric. If the non-DR local route metric is better than the received Assert message, the non-DR local join interface enters the Assert Winner state, continues to forward multicast traffic, and sends an Assert message. When the outbound interface of the DR receives an Assert message that is better than its own, it enters the Assert Loser state and stops forwarding multicast traffic. At this point, the non-DR to the RP or S optimal path is responsible for forwarding multicast traffic to the local area network. If the non-DR local route metric is not better than the received Assert message, the non-DR local join interface enters the Assert Loser state, stops forwarding multicast traffic, and continues to be forwarded by the DR to the local area network.
  • the type of the PIM join message is determined by the version of the IGMP join message received by the non-DR local join interface. If the IGMPv3 join message is received, the non-DR sends a PIM (S, G) message to the S direction. If the IGMPv2 join message is sent, the non-DR sends a PIM (*, G) message to the RP.
  • the non-DR When the host receiver sends an IGMPv2 join message and the non-DR is the last hop and meets the local SPT handover condition, the non-DR performs the handover from the RPT to the SPT, and after the handover is completed, the multicast traffic received from the SPT is forwarded.
  • the contention forwarding module 805 includes: a comparison unit 8051 and a forwarding control unit 8052, where:
  • the comparing unit 8051 is configured to compare the received Assert message with the local routing metric value, and the forwarding control unit 8052 is configured to: when the local routing metric value is better than the received Assert message, Controlling the multicast traffic forwarding module to continue to forward multicast traffic from the non-DR local join interface and send the Assert message; otherwise, the multicast traffic is stopped, and the DR is responsible for forwarding the multicast traffic to the local area network.
  • the contention forwarding module 805 is further configured to: during the delay waiting for the timeout period, and the message receiving module 804 receives the Assert message sent by the DR when the downstream outbound interface detects the multicast traffic, according to the Assert message and the local route metric value. , and DR compete to forward multicast traffic.
  • the contention forwarding module 805 is further configured to: when the non-DR local joining interface of the multicast router receives the IGMPv2 join message, and the multicast router is the last hop and meets the local SPT switching condition, The switch from RPT to SPT, after completing the handover, competes to forward the multicast traffic received from the SPT.
  • the multicast forwarding method and the multicast router in the local area network of the present invention introduce the non-DR local join interface concept, and extend the Assert process to process the non-DR local join interface type, and the non-DR according to the Assert message and the local route metric value.
  • the host receiver still receives multicast traffic from the router located on the RP or S to the local LAN optimal path, thereby achieving network resources. Optimize utilization to avoid waste of router processing resources and link bandwidth resources caused by DR forwarding.

Description

本地局域网中组播流量转发方法及组播路由器 技术领域
本发明涉及通信技术领域, 尤其涉及一种本地局域网中组播流量转发 方法及组播路由器。 背景技术
组播是一种带宽节约技术, 在组播技术中, 数据源只发送一份流量, 所有且只有加入组播组的主机接收者都可以收到相同的流量。 目前, 被广 泛使用的三层组播技术包括 PIM-SM ( Protocol Independent Multicast-Sparse Mode, 独立组播协议稀疏模式), PIM-SSM ( Protocol Independent Multicast-Source Specific Multicast, 独立组播协议源特定组播) 和 IGMP ( Internet Group Management Protocol, 因特网组管理协议), 其中, PIM ( Protocol Independent Multicast, 独立组播协议 )用于组播路由器(以下简 称路由器)之间, IGMP用于本地局域网主机和路由器之间。
通常主机接收者通过向本地局域网中的路由器发送 IGMP加入信息, 以表达希望接收到的组播流量, 当本地局域网中有多台路由器时, 选举出 来的 DR ( Designated Router, 指定路由器) 负责代表本地局域网中的主机 接收者向 RP ( Rendezvous Point, 汇聚点)或 S (数据源 )方向的上游路由 器发送 PIM加入消息, 生成 RPT ( Rendezvous Point Tree, 共享树 )或 SPT ( Shortest Path Trees, 有源树 ), 接收组播流量并向本地局域网转发。
根据 DR的选举规则: 优先级最大或优先级相同的情况下, IP地址最 大的路由器成为 DR, 该规则显然不能动态地保证 DR—直处于 S到本地局 域网的最优路径上。
如果本地局域网的下游接收者中还存在路由器, 则下游路由器会向 MRIB ( Multicast Routing Information Base, 组播路由信息库)指出的到 RP 或 S的最优路径的下一跳路由器发送 PIM加入消息。 当下游路由器选择的 下一跳不是 DR时,就会有两台路由器同时向本地局域网转发组播流量,触 发 Assert (断言)过程, 最终由 Assert Winner (经 Assert过程的获胜者 ) 负 责向本地局域网转发组播流量。 其中, Assert判定规则为: 都采用 SPT转 发时, 距离 S最近的路由器获胜; 如果一个用 SPT转发, 另外一个用 RPT 转发, 用 SPT转发的路由器获胜; 都用 RPT转发时, 距离 RP最近的路由 器获胜。可见,经 Assert过程,本地局域网从距 RP或 S最近的 Assert Winner 接收流量, 并且 Assert Winner将负责代表本地局域网中的主机接收者向上 游路由器加入或离开。
如果本地局域网的下游接收者中没有路由器, 如用户接入网络, 根据 PIM-SM协议对宏 CouldAssert ( S, G, I ) ( SPT可断言)和宏 CouldAssert ( *, G, I ) ( RPT可断言) 的定义, 本地局域网中非 DR组播路由器的接 口都不属于 CouldAssert (可断言) 范围, 不会有 Assert过程。 所以, 当本 地局域网中只有主机接收者而没有下游路由器时,一定是 DR负责向上游发 送 PIM加入消息, 并向本地局域网转发组播流量。 因此, 本地局域网就可 能不是从距离 RP或 S最近的路由器接收组播流量。
如图 1所示, 本地局域网 A中只有下游主机接收者, DR R5将代表接 收者 Hostl向 RP发送 PIM加入消息, 生成经由 Rl、 R2、 R5的 RPT。 经 SPT切换后, 生成经 Rl、 R2、 R5的 SPT。 网络中有 3台路由器要记录相 关的组播路由信息, 有 2条链 承载从数据源网络到接收者网络的组播 流量。 从网络拓朴看, 非 DR R4处于数据源 S到本地局域网 A的最优路径 上。
因此, 当下游主机接收者中不存在路由器时, 现有组播路由技术限制 了只有 DR能代表主机接收者向上游发送 PIM加入消息并向本地局域网转 发组播流量, 当 DR不能处于 S到本地局域网的最优路径上时, 就存在网 络资源浪费的情况。 发明内容
本发明的主要目的在于提供一种本地局域网中组播流量转发方法及组 播路由器,旨在避免因完全依靠 DR转发造成的路由器处理资源和链路带宽 资源的浪费。
为了达到上述目的, 本发明提出一种本地局域网中组播流量转发方法, 包括:
非指定路由器(DR )在非 DR本地加入接口检测到 DR转发的组播流 量时, 进入延迟等待状态;
当延迟等待超时后, 向汇聚点(RP )或数据源(S )方向的上游路由器 发送独立组播协议( PIM )加入消息, 生成共享树( RPT )或有源树( SPT ); 从 RPT或 SPT接收到组播流量后, 向本地局域网转发所述组播流量; 接收 DR在下游出接口检测到组播流量时发出的断言 Assert消息; 根据所述 Assert消息及本地路由度量值, 与所述 DR竟争转发所述组 播流量。
优选地, 所述根据所述 Assert消息及本地路由度量值, 与所述 DR竟 争转发所述组播流量为:
将所述 Assert消息与本地路由度量值进行比较;
当所述本地路由度量值优于所述 Assert消息时, 从非 DR本地加入接 口继续转发组播流量, 并发送 Assert消息; 否则, 停止转发组播流量, 继 续由 DR负责向本地局域网转发组播流量。
优选地,所述非 DR在非 DR本地加入接口检测到 DR转发的组播流量 时, 进入延迟等待状态之前, 所述方法还包括:
所述非 DR与所述本地局域网内的 DR及其他非 DR接收主机接收者发 送的组管理协议(IGMP )加入消息, 由 DR负责向 RP或 S方向的上游路 由器发送 PIM加入消息及从 RPT或 SPT接收组播流量,并向本地局域网转 发。
优选地,所述非 DR的非 DR本地加入接口是指接收到 IGMP加入消息, 但未收到 PIM加入消息且未被选为 DR的接口。
优选地,所述延迟等待状态的延迟等待的时间根据到达 RP或 S的路由 度量值计算; 其中, 路由度量值越小, 延迟等待时间越短。
优选地, 所述当延迟等待超时后, 向 RP或 S方向的上游路由器发送 PIM加入消息为: 当非 DR本地加入接口收到的是 IGMPv3加入消息时, 非 DR向 S方向发送 PIM ( S, G ) 消息; 当非 DR本地加入接口收到的是 IGMPv2加入消息时, 非 DR向 RP方向发送 PIM ( *, G ) 消息。
优选地,所述 DR发出的 Assert消息的类型由 DR当前所处转发状态决 定, 当 DR使用 SPT转发时, 所述 Assert消息的类型为 Assert ( S, G ) 消 息; 当 DR使用 RPT转发时, 所述 Assert消息的类型为 Assert ( *, G ) 消 息。
优选地, 所述方法还包括:
在延迟等待未超时期间,当所述非 DR收到 DR在下游出接口检测到组 播流量时发出的 Assert消息时, 根据所述 Assert消息及本地路由度量值, 与所述 DR竟争转发所述组播流量。
优选地,所述与所述 DR竟争转发所述组播流量之前,所述方法还包括: 当所述非 DR本地加入接口收到的是 IGMPv2加入消息且所述非 DR为 最后一跳并满足本地 SPT切换条件时,所述非 DR完成从 RPT到 SPT的切 换。
本发明还提出一种本地局域网中组播流量转发的组播路由器, 包括: 延迟等待模块, 用于在所述组播路由器的非 DR本地加入接口检测到 DR转发的组播流量时, 进入延迟等待状态;
加入消息发送模块, 用于当延迟等待超时后, 向 RP或 S方向的上游路 由器发送 PIM加入消息, 生成 RPT或 SPT;
组播流量转发模块, 用于从 RPT或 SPT接收到组播流量后, 向本地局 域网转发所述组播流量;
消息接收模块, 用于接收 DR在下游出接口检测到组播流量时发出的 Assert消息;
竟争转发模块, 用于根据所述 Assert消息及本地路由度量值, 与所述 DR竟争转发所述组播流量。
优选地, 所述竟争转发模块包括:
比较单元, 用于将所述 Assert消息与本地路由度量值进行比较; 转发控制单元, 用于当所述本地路由度量值优于所述 Assert消息时, 控制组播流量转发模块从非 DR本地加入接口继续转发组播流量, 并发送 Assert消息; 否则, 停止转发组播流量, 继续由 DR负责向本地局域网转发 组播流量。
优选地, 所述竟争转发模块, 还用于在延迟等待未超时期间, 且消息 接收模块收到 DR在下游出接口检测到组播流量时发出的 Assert消息时, 根据所述 Assert消息及本地路由度量值, 与所述 DR竟争转发所述组播流 量。
优选地,所述竟争转发模块,还用于当所述组播路由器的非 DR本地加 入接口收到的是 IGMPv2加入消息, 且所述组播路由器为最后一跳并满足 本地 SPT切换条件时, 完成从 RPT到 SPT的切换。
本发明提出的一种本地局域网中组播流量转发方法及组播路由器, 通 过引入非 DR本地加入接口概念,并扩展 Assert过程对非 DR本地加入接口 类型的处理,非 DR根据 Assert消息及本地路由度量值与 DR竟争转发组播 流量, 实现了本地局域网中没有下游组播路由器时, 主机接收者仍是从位 于 RP或 S到本地局域网最优路径上的路由器接收组播流量,从而达到对网 络资源的优化利用,避免因完全依靠 DR转发造成的路由器处理资源和链路 带宽资源的浪费。 附图说明
图 1是现有协议实现组播流量转发的示意图;
图 2是本发明本地局域网中组播流量转发方法一实施例流程示意图; 图 3是本发明本地局域网中组播流量转发方法一实施例中根据 Assert消 息及本地路由度量值, 与 DR竟争转发组播流量的流程示意图;
图 4是本发明本地局域网中组播流量转发方法一实施例中 PIM-SSM结 合 IGMPv3网络处理流程示意图;
图 5是本发明本地局域网中组播流量转发方法一实施例中 PIM-SM结合
IGMPv2网络前期处理流程示意图;
图 6是图 5所示的当 DR转发 RPT流量的后期处理流程示意图;
图 7是图 5所示的当 DR转发 SPT流量的后期处理流程示意图;
图 8是本发明本地局域网中组播流量转发的组播路由器一实施例结构 示意图;
图 9是本发明本地局域网中组播流量转发的组播路由器一实施例中竟 争转发模块的结构示意图。 具体实施方式 本发明实施例解决方案主要是:通过引入非 DR本地加入接口概念,并 扩展 Assert过程对非 DR本地加入接口类型的处理,非 DR根据 Assert消息 及本地路由度量值与 DR竟争转发组播流量,实现本地局域网中没有下游组 播路由器时,主机接收者仍是从位于 RP或 S到本地局域网最优路径上的路 由器接收组播流量, 达到对网络资源的优化利用。
如图 2所示, 本发明一实施例提出一种本地局域网中组播流量转发方 法, 包括:
步骤 S101, 非 DR在非 DR本地加入接口检测到 DR转发的组播流量 时, 进入延迟等待状态;
其中, 非 DR在非 DR本地加入接口检测到 DR转发的组播流量是 DR 从 RPT或 SPT接收的组播流量向本地局域网转发的。 当主机接收者希望接 收某组播流量时,主机接收者向本地局域网内的多台组播路由器发送 IGMP 加入消息,非 DR与本地局域网内的 DR及其他非 DR—同接收主机接收者 发送的 IGMP加入消息, 并由 DR负责向 RP或 S方向的上游路由器发送 PIM加入消息,建立 RPT或 SPT,并从 RPT或 SPT接收组播流量向本地局 域网转发。
本实施例中主机接收者为本地局域网中没有下游组播路由器的主机接 收者。
非 DR的非 DR本地加入接口是指有收到 IGMP加入消息,但没有收到 PIM加入消息且未被选为 DR的接口。
延迟等待的时间根据到达 RP或 S的路由度量值计算; 其中,路由度量 值越小, 延迟等待时间越短。
步骤 S102,若延迟等待超时,则向 RP或 S方向的上游路由器发送 PIM 加入消息, 生成 RPT或 SPT;
步骤 S103,从 RPT或 SPT接收到组播流量后, 向本地局域网转发组播 流量;
步骤 S104, 接收 DR 在下游出接口检测到组播流量时发出的断言 ( Assert ) 消息;
步骤 S105, 根据 Assert消息及本地路由度量值, 与 DR竟争转发组播 流量。
上述步骤 S102-步骤 S105中, 当延迟等待超时后, 非 DR向 RP或 S 方向的上游路由器发送 PIM加入消息, 并生成 RPT或 SPT。 非 DR从 RPT 或 SPT接收到组播流量后向本地局域网转发, DR在下游出接口检测到组播 流量时发生 Assert过程, 非 DR收到 DR发出的 Assert消息, 加入对 Assert Winner的竟争。
DR发生的 Assert过程与协议 RFC4601 PIM-SM: Protocol Specification ( Revised )规定一致, DR发送的 Assert消息的类型由 DR当前所处转发状 态决定: 当 DR使用 SPT转发时, 则为 Assert ( S, G ) 消息; 当 DR使用 RPT转发时, 则为 Assert ( *, G ) 消息。
非 DR本地加入接口发生的 Assert过程是指将收到的 Assert消息与本 地路由度量值进行比较。 如果非 DR 的本地路由度量值优于收到的 Assert 消息, 则非 DR本地加入接口进入 Assert Winner状态, 继续转发组播流量, 并发送 Assert消息。 当 DR的下游出接口收到优于自己的 Assert消息, 则 进入 Assert Loser状态, 停止转发组播流量。 至此, 到 RP或 S最优路径上 的非 DR负责向本地局域网转发组播流量。如果非 DR的本地路由度量值不 能优于收到的 Assert消息, 则非 DR本地加入接口进入 Assert Loser状态, 停止转发组播流量, 继续由 DR负责向本地局域网转发流量。
其中, PIM加入消息的类型由非 DR在本地加入接口收到的 IGMP加 入消息的版本决定: 若收到的是 IGMPv3加入消息, 则非 DR向 S方向发 送 PIM ( S, G ) 消息; 若非 DR在本地加入接口收到的是 IGMPv2加入消 息, 贝' J非 DR向 RP方向发送 PIM ( *, G ) 消息。
当主机接收者发送 IGMPv2加入消息且非 DR为最后一跳并满足本地 SPT切换条件, 则非 DR进行从 RPT到 SPT的切换, 完成切换之后竟争转 发从 SPT接收的组播流量。 此外,在延迟等待未超时期间, 当非 DR收到 DR在下游出接口检测到 组播流量时发出的 Assert消息时, 非 DR根据 Assert消息及本地路由度量 值, 与 DR竟争转发组播流量。
如图 3所示, 步骤 S105包括:
步骤 S1051, 非 DR将收到的 Assert消息与本地路由度量值进行比较; 步骤 S1052, 若本地路由度量值优于收到的 Assert消息, 则从非 DR本 地加入接口继续转发组播流量, 并发送 Assert消息; 否则停止转发组播流 量, 继续由 DR负责向本地局域网转发组播流量。
由上述可知, 本地局域网中的组播路由器在满足相应条件的情况下均 可以参与组播流量转发的竟争过程, 与现有技术相比较, 本实施例引入一 种新的接口概念——非 DR本地加入接口。 通过扩展 Assert过程对这种接 口类型的处理, 实现本地局域网中没有下游组播路由器时, 主机接收者仍 是从位于 RP或 S到本地局域网最优路径上的路由器接收组播流量,从而达 到对网络资源的优化利用。
下面根据网络中使用的不同组播路由技术对本发明实现本地局域网主 机接收者以最优路径接收组播流量的方法分两种情况进行说明。
情况(一): PIM-SSM结合 IGMPv3; 路由器间使用 PIM-SSM协议, 路由器和主机间使用 IGMPv3协议。 这种情况的特点是网络中只有 SPT, 不存在 RPT向 SPT的切换过程。
上述情况(一)使用到的变量说明如下:
非 DR本地加入接口宏定义:
Non_DR_CouldAssert ( S, G, I ) = ( RPF_interface ( S ) != I ) AND ( I_am_not_DR ( I ) AND local—receiver—include ( S, G, I ) = = TRUE ) AND ( I not in (joins ( *, *, RP ( G ) ) ( + ) joins ( *, G ) ( + ) joins ( S, G ) ) )。
非 DR本地加入接口满足以下条件: 不是到 S的 RPF (反向路径转发)接口;
收到 IGMPv3加入消息, 但本身不是 DR;
没有收到过 PIM加入消息;
spt_assert_metric ( S, I ): 非 DR路由器到 S的路由度量值, 计算方法 与 RFC4601定义一致。
Non_DR_DataTrigger_Timer ( S, G, I ):非 DR本地加入接口检测到( S, G )流量时设置的向 S方向发送 PIM JOIN ( S, G ) 消息的延迟计时器。 计 算方法如下:
Non_DR_DataTrigger_Timer ( S, G, I ) = 27 _ 10000 /( metric ( S ) + 400 ); 其中 metric ( S )是非 DR到 S的路由向量。 Non_DR_DataTrigger_Timer
( S, G, I )取值范围 (2, 27 ), 在 [0, +∞ )上单调递增。 具体实现中, 只 要满 足距 离 S 越近 , 延迟等待 时 间 越短 的 条件 , Non_DR_DataTrigger_Timer ( S, G, I )也可以使用其他计算方法。
情况(一) 的处理流程说明如下:
处于同一本地局域网的多台组播路由器收到主机接收者发送的
IGMPv3加入消息, 由选举出的 DR负责向 S方向的上游路由器发送 PIM 加入(S, G ) 消息, 生成 SPT, DR从 SPT接收组播流量并向本地局域网 转发。
当本地局域网中的非 DR在非 DR本地加入接口检测到组播流量时,设 置延迟计时器 Non_DR_DataTrigger_Timer ( S, G, 1 )。 延迟计时器超时触 发非 DR向 S方向的上游路由器发送 PIM JOIN ( S, G ) 消息, 生成 SPT 并向本地局域网转发组播流量。
DR在下游出接口收到组播流量, 触发 Assert过程, 发送 Assert ( S, G )消息并进入 Assert ( S, G ) Winner状态。 非 DR将本地 spt_assert_metric ( S, I )与收到的 Assert ( S, G )消息进行比较,如果本地 spt_assert_metric ( S, I )更优且已经向本地局域网转发过组播流量, 则非 DR本地加入接口 进入 Assert (S, G) Winner状态, 发送 Assert (S, G)消息并继续转发组 播流量。如果非 DR的本地 spt_assert_metric ( S, I )不如收到的 Assert ( S, G) 消息, 则非 DR本地加入接口进入 Assert (S, G) Loser状态, 如果 延迟计时器尚未超时,则取消计时器,如果非 DR因为本地局域网的关系向 上游发送过 PIM JOIN (S, G)消息则发送 PIM PRUNE (S, G)消息。 DR 如果收到优于自身的 Assert (S, G) 消息, 则进入 Assert (S, G ) Loser 状态并停止转发组播流量, 否则继续负责向本地局域网转发组播流量。 至 此, 主机接收者从位于数据源 S到本地局域网最优路径上的路由器接收组 播流量。
如图 4所示, 下面结合附图 4,对 PIM-SSM结合 IGMPv3的网络环境, 在非 DR本地加入接口检测到组播流量后的处理流程进行详细说明:
步骤 S201:非 DR连接到本地局域网的非 DR本地加入接口检测到 DR 转发的组播流量;
步骤 S202: 非 DR设置向 S方向发送 PIM JOIN ( S, G) 消息的延迟 计时器 Non_DR_DataTrigger_Timer (S, G, I), 根据延迟计时器的计算方 法, 距离 S越近的非 DR路由器的延迟等待时间越短;
步骤 S203: 判断延迟计时器是否超时, 若超时, 则执行步骤 S204, 否 则继续等待, 如果在等待超时期间收到 Assert (S, G) 消息, 则执行步骤 S206;
步骤 S204:延迟计时器超时触发非 DR向 S方向的上游路由器发送 PIM JOIN (S, G) 消息, 建立 S到非 DR的 SPT。
步骤 S205: 非 DR从 SPT接收组播流量并向本地局域网转发。 DR的 下游出接口收到非 DR转发的组播流量, 触发 Assert过程, 进入 Assert ( S, G ) Winner状态, 发送 Assert ( S, G) 消息。 步骤 S206: 非 DR 收到 Assert (S, G) 消息, 如果本地路由度量值 spt_assert_metric ( S, I )优于收到的 Assert ( S, G )消息,则执行步骤 S207, 否则执行步骤 S208;
步骤 S207: 本地 spt_assert_metric (S, I )优于收到的 Assert (S, G) 消息, 进入 Assert (S, G) Winner状态, 发送 Assert (S, G)消息。 根据 非 DR是否转发过组播流量执行不同的后续操作。
如果非 DR已经向本地局域网转发过组播流量, 则继续负责转发流量。 该非 DR发送的 Assert (S, G)消息将使 DR的下游出接口和其它非 DR的 非 DR本地加入接口进入 Assert ( S, G) Loser状态。
如果非 DR尚未向本地局域网转发过组播流量,即存在其他非 DR先完 成了 SPT的建立。 该非 DR因收到 DR发送的 Assert (S, G) 消息暂时进 入 Assert (S, G) Winner状态, 但很快又会收到转发过组播流量的非 DR 发送的 Assert (S, G) 消息, 根据延迟计时器的计算方法, 该非 DR到数 据源 S的路由度量不会比从其他非 DR接收到的 Assert (S, G)消息更优, 取消延迟计时器并进入 Assert (S, G) Loser状态。 如果该非 DR因为本地 局域网的关系向上游发送过 PIM JOIN ( S, G) 消息, 则发送 PIM PRUNE (S, G) 消息, 取消 SPT的建立。
至此, 本地局域网中位于到 S最优路径上的路由器负责向本地局域网 转发组播流量。
步骤 S208: 非 DR路由器的本地 spt_assert_metric (S, I) 不能优于收 到的 Assert (S, G)消息, 进入 Assert (S, G) Loser状态, 取消尚未超时 的延迟计时器,如果已经因为本地局域网的关系向上游发送过 PIM JOIN( S, G) 消息, 则发送 PIM PRUNE (S, G )。
情况(二): PIM-SM结合 IGMPv2; 路由器间使用 PIM-SM协议, 路 由器和主机间使用 IGMPv2协议。 这种情况的特点是主机接收者最初是从 RPT接收组播流量, 由最后一跳组播路由器判断是否要进行 SPT切换, 组 播流量的转发存在从 RPT向 SPT的切换过程。
情况(二)使用的变量说明如下:
非 DR本地加入接口宏定义:
Non_DR_CouldAssert (*, G, I) = ( RPF_interface ( RP ( G ) ) != I )
AND ( I_am_not_DR ( I ) AND local—receiver—include ( *, G, I ) == TRUE ) AND (I not in (joins ( *, *, RP ( G )) ( + ) joins ( *, G)))。
非 DR本地加入接口满足以下条件:
不是到 RP的 RPF接口;
收到 IGMPv2加入消息, 但本身不是 DR;
没有收到过 PIM加入消息;
spt_assert_metric ( G, I): 非 DR到 RP 的路由度量值, 计算方法与 RFC4601定义一致。
spt_assert_metric (S, I): 非 DR到数据源 S的路由度量值, 计算方法 与 RFC4601定义一致。
Non_DR_DataTrigger_Timer ( *, G, I): 非 DR本地加入接口检测到组 播流量时设置的向 RP方向发送 PIMJOIN (*, G) 消息的延迟计时器。 计 算方法如下:
Non_DR_DataTrigger_Timer ( *, G, I ) = 30 _ 10000/ ( metric ( RP ( G ) ) + 400 );
其中 metric ( RP ( G ) ) 是非 DR 到 RP 的路由向量。 Non_DR_DataTrigger_Timer (*, G, I)取值范围 (5, 30), 在 [0, +∞ )单 调递增。
Non_DR_DataTrigger_Timer ( S, G, I): 非 DR在满足 SPT切换条件 时设置的向数据源 S方向发送 PIM JOIN (S, G)消息的延迟计时器。 计算 方法如下:
Non_DR_DataTrigger_Timer ( S, G, I ) = 27-10000/ ( metric ( S ) +400 ) 其中 metric( S )是非 DR到 S的路由向量。 Non_DR_DataTrigger_Timer (S, G, I)取值范围 (2, 27), 在 [0, +∞ )单调递增。
具体实现中, 只要满足路由向量越小延迟等待时间越短的条件, 以上 两个延迟计时器也可以使用其他计算方法。
情况(二) 的处理流程说明如下:
主机接收者发送 IGMPv2加入消息, 请求组地址为 G的组播流量。 本 地局域网中的 DR在收到 IGMPv2加入消息后,代表本地局域网中的主机接 收者向 RP方向的上游路由器发送 PIM JOIN ( *, G ) 消息, 建立 RPT, 接 收组播流量并向本地局域网转发。非 DR连接到本地局域网的非 DR本地加 入接口检测到组播流量后设置向 RP方向发送 PIM JOIN ( *, G) 消息的延 迟计时器 Non_DR_DataTrigger_Timer (*, G, 1)。 待延迟计时器超时, 非 DR向 RP方向的上游路由器发送 PIM JOIN ( *, G ) 消息, 生成 RPT并向 本地局域网转发组播流量。 DR在下游出接口收到组播流量时发生 Assert 过程, 并根据当前所处的转发状态, 发送不同的 Assert消息。 DR在下游出 接口接收到组播流量时, 如果仍处于 RPT转发状态, 则发送 Assert (*, G) 消息; 如果已经完成 RPT到 SPT的切换, 则发送 Assert (S, G)消息。 非 DR根据收到的不同 Assert消息, 进入不同的处理流程:
流程( 1 ): 非 DR路由器收到 Assert (*, G)消息。 如果非 DR的本地 rpt_assert_metric ( G, I)优于收到的 Assert (*, G) 消息, 则进入 Assert (*, G) Winner状态, 发送 Asser(*, G)消息并继续转发组播流量。 非 DR发送的 Assert ( *, G) 消息使 DR进入 Assert ( *, G) Loser状态, 取 代 DR负责向本地局域网转发从 RPT接收到的组播流量。 如果非 DR的本 地 rpt_assert_metric (G, I) 不能优于收到的 Assert ( *, G) 消息, 则进入 Assert (*, G) Loser状态, 取消未超时的延迟计时器, 如果因为本地局域 网的关系向 RP方向发送过 PIM JOIN ( *, G ) 消息, 则发送 PIM PRUNE
(*, G) 消息。
因为 SPT切换仅取决于最后一跳路由器,所以非 DR只要满足本地 SPT 切换条件, 就可以生成 SPT, 转发从 SPT接收到的组播流量, 取代当前本 地局域网中使用 RPT转发的组播路由器。
满足 SPT切换条件的组播路由器设置向 S方向发送 PIM JOIN ( S, G ) 消息的延迟计时器 Non_DR_DataTrigger_Timer (S, G, I), 计时器超时后, 向 S方向的上游路由器发送 PIM JOIN (S, G) 消息, 建立 SPT, 从 SPT 接收组播流量并向本地局域网转发。 处于 SPT转发状态的组播路由器在下 游出接口收到从 RPT转发过来的组播流量, 发生 Assert过程, 发送 Assert (S, G) 消息。 Assert (S, G) 消息使当前仍处于 RPT转发状态的组播路 由器进入 Loser状态, 停止转发从 RPT接收到的组播流量; 或者进行 SPT 切换, 加入 SPT转发竟争。 至此, 本地局域网从 SPT接受组播流量。
如果在满足本地 SPT切换条件之前,收到优于本地 spt_assert_metric( S,
I) 的 Assert (S, G) 消息, 则进入 Assert (S, G) Loser状态, 否则继续 检查 SPT切换条件。
如果在等待 Non_DR_DataTrigger_Timer (S, G, I) 延迟计时器超时 期间收到优于本地 spt_assert_metric (S, I) 的 Assert (S, G) 消息, 取消 延迟计时器并进入 Assert (S, G) Loser状态, 否则继续等待延迟计时器超 时。
流程(2): 非 DR收到 Assert (S, G)消息。 如果非 DR因为本地局域 网的关系向 RP方向发送过 PIM JOIN ( *, G ) 消息, 则发送 PIM PRUNE (*, G)消息, 取消 RPT的建立。 如果非 DR的本地 spt_assert_metric ( S, I)优于收到的 Assert (S, G) 消息, 且满足本地切换 SPT条件, 设置向 S 方向发送 PIM JOIN ( S, G )消息的延迟计时器 Non_DR_DataTrigger_Timer (S, G, 1)。计时器超时后, 向 S方向的上游路由器发送 PIMJOIN(S, G) 消息, 建立 SPT, 接收组播流量并向本地局域网转发。 当出接口收到其他 组播路由器转发到本地局域网的组播流量时,发生 Assert过程,发送 Assert (S, G) 消息, 进入 Assert (S, G) Winner状态。 当前负责转发的组播路 由器收到优于自己的 Assert (S, G) 消息, 进入 Assert (S, G) Loser状 态, 停止向本地局域网转发流量。 至此, 满足切换 SPT条件且位于 S到本 地局域网最优路径上的组播路由器负责向本地局域网转发流量。
如果非 DR的本地 spt_assert_metric ( S, I )不能优于收到的 Assert ( S, G ) 消息, 则进入 Assert ( S, G ) Loser状态。
如果非 DR的本地 spt_assert_metric ( S, I )优于收到的 Assert ( S, G ) 消息, 但不满足本地切换 SPT条件, 则周期性的检查判断, 直到满足切换 SPT条件,建立 SPT,加入 SPT转发竟争;或是收到优于本地 spt_assert_metric (S, I) 的 Assert (S, G) 消息, 进入 Assert (S, G) Loser状态。
如果在等待 Non_DR_DataTrigger_Timer (S, G, I)延迟计时器超时期 间收到优于本地 spt_assert_metric (S, I) 的 Assert (S, G) 消息, 取消延 迟计时器, 进入 Assert(S, G)Loser状态, 否则继续等待延迟计时器超时。
如图 5所示, 下面结合附图 5,对本发明主机接收者以最优路径接收组 播流量的第二种情况: PIM-SM结合 IGMPv2的网络环境, 在非 DR本地加 入接口检测到组播流量后的处理过程进行详细说明:
步骤 S301: 非 DR的非 DR本地加入接口检测到由 DR向本地局域网 转发的组播流量;
步骤 S302: 非 DR设置向 RP方向发送 PIM JOIN ( *, G )消息的延迟 计时器 Non_DR_DataTrigger_Timer (*, G, 1)。 该延迟计时器的等待时间 相对较长, 如果 DR能进行 SPT切换, 可以在该等待时间内完成; 步骤 S303: 检查 Non_DR_DataTrigger_Timer (*, G, I)计时器是否 超时。 超时执行步骤 S304, 否则继续等待, 如果在等待期间收到 Assert消 息, 执行步骤 S306;
步骤 S304: Non_DR_DataTrigger_Timer ( *, G, I)延迟计时器超时触 发非 DR向 RP方向发送 PIM JOIN (*, G ) 消息, 建立 RPT。
步骤 S305: 非 DR从 RPT接收组播流量, 向本地局域网转发。 DR的 下游出接口收到组播流量时, 发生 Assert过程。 如果 DR处于 RPT转发状 态, 发送 Assert (*, G) 消息。 如果 DR已经完成从 RPT到 SPT的切换, 则发送 Assert (S, G) 消息。
步骤 S306:非 DR判断接收到的 Assert消息的类型。如果收到的是 Assert
(*, G) 消息, 执行步骤 S307; 否则, 执行步骤 S308。
步骤 S307: 非 DR收到 Assert (*, G) 消息, 进入相应的处理过程, 该过程请参见后续结合图 6的详细说明。
步骤 S308: 非 DR收到 Assert (S, G) 消息, 判断本路由器是否因本 地局域网的关系向 RP方向发送过 PIMJOIN(*, G), 如果已经发送过, 则 执行步骤 S309, 否则, 执行步骤 310。
步骤 S309: DR已经完成 RPT向 SPT的切换,根据 Assert的判定规则, SPT转发要优于 RPT转发, 非 DR向 RP方向发送 PIM PRUNE ( *, G )消 息, 取消 RPT的建立。
步骤 310: 进入非 DR收到 Assert (S, G)消息的处理过程。 该过程请 参见后续结合图 7的详细描述。
如图 6所示, 非 DR收到 Asser (*, G)消息情况的处理过程详细说明 如下:
步骤 S401: 非 DR将本地 rpt_assert_metric ( G, I )与收到的 Assert ( *, G) 消息进行比较, 如果本地 rpt_assert_metric (G, I)优于收到的 Assert (*, G) 消息, 执行步骤 S402, 否则, 执行步骤 S403;
步骤 S402: 本地 rpt_assert_metric ( G, I )优于收到的 Assert ( *, G) 消息, 进入 Assert (*, G) Winner状态, 发送 Assert (*, G) 消息。 DR 收到优于本地的 Assert ( *, G) 消息, 进入 Asser (*, G) Loser状态, 停 止转发流量。 至此, 网络中由距 RP最近的路由器负责转发从 RPT接收到 的组播流量。
步骤 S403: 非 DR的本地 rpt_assert_metric (G, I) 不能优于接收到的 Assert (*, G) 消息, 接口进入 Asser (*, G) Loser状态, 取消尚未超时 的延迟计时器, 如果已经向 RP方向发送过 PIMJOIN (*, G) 消息, 还需 发送 PIM PRUNE (*, G) 消息, 执行步骤 S404;
步骤 S404: 各路由器判断本地切换 SPT条件是否满足。 满足切换条件 的执行步骤 S405, 否则执行步骤 S409;
步骤 S405: 设置向 S方向发送 PIM JOIN (S, G) 消息的延迟计时器 Non_DR_DataTrigger_Timer ( S , G, I);
步骤 S406: 判断 Non_DR_DataTrigger_Timer (S, G, I)延迟计时器 是否超时。 超时执行步骤 S407, 否则执行步骤 411;
步骤 S407: 延迟计时器超时触发路由器向 S方向发送 PIM JOIN ( S, G) 消息, 建立 SPT;
步骤 S408:完成 SPT切换的路由器向本地局域网转发从 SPT接收到的 组播流量, 该路由器的(S, G) 出接口接收到其他路由器转发的组播流量, 触发 Assert过程, 发送 Assert (S, G) 消息, 进入 Assert (S, G ) Winner 状态。之前负责向本地局域网转发流量的路由器收到优于自己的 Assert(S, G) 消息, 进入 Assert (S, G) Loser状态, 停止转发流量。 至此, 本地局 域网从满足切换 SPT条件且距离 S最近的路由器接收组播流量;
步骤 S409: 本地切换 SPT条件满足前收到 Assert (S, G)消息, 如果 本地 spt_assert_metric (S, I)优于收到的 Assert (S, G) 消息, 继续等待 本地切换 SPT条件满足, 执行步骤 S404, 否则执行步骤 410;
步骤 410: 收到优于本地 spt_assert_metric (S, I) 的 Assert (S, G) 消息,接口进入 Assert(S, G)Loser状态。本路由器对 SPT转发竟争结束; 步骤 411: 在延迟计时器 Non_DR_DataTrigger_Timer (S, G, I )超时 之前收到 Assert (S, G) 消息, 如果本地 spt_assert_metric (S, I)优于收 到的 Assert (S, G) 消息, 执行步骤 S406, 继续等待延迟计时器超时, 否 则执行步骤 412;
步骤 412: 本地 spt_assert_metric (S, I) 不能优于收到的 Assert (S, G) 消息, 取消 Non_DR_DataTrigger_Timer (S, G, I)延迟计时器, 接口 进入 Assert (S, G) Loser状态, 本路由器对 SPT转发竟争结束;
如图 7所示, 非 DR路由器收到 Assert (S, G) 消息情况的处理流程 详细说明如下:
步骤 S501: 非 DR将本地 spt_assert_metric ( S, I )与收到的 Assert ( S, G) 消息进行比较, 如果不能优于收到的 Assert (S, G) 消息, 执行步骤 S502, 否则执行步骤 S503;
步骤 S502: 非 DR路由器收到优于本地的 Assert ( S, G)消息, 非 DR 本地加入接口进入 Assert ( S, G ) Loser状态, 本路由器的 SPT转发竟争结 束;
步骤 S503:非 DR路由器本地 spt_assert_metric( S, I )优于收到的 Assert
(S, G)消息,判断本地切换 SPT的条件是否满足, 满足时执行步骤 S504, 否则继续等待, 如果在切换 SPT条件满足之前又收到新的 Assert (S, G) 消息, 执行步骤 S501;
步骤 S504: 设置向 S 方向发送 PIM JOIN (S, G) 的延迟计时器 Non_DR_DataTrigger_Timer (S, G, I); 步骤 S505: 检测延迟计时器是否超时, 超时执行步骤 S506, 否则继续 等待, 如果在超时之前收到 Assert (S, G) 消息, 执行步骤 S508;
步骤 S506: 计时器超时, 非 DR向 S方向发送 PIM JOIN (S, G) 消 息, 建立 SPT;
步骤 S507: 完成 SPT切换的非 DR向本地局域网转发组播流量, 在出 接口收到其他路由器转发的组播流量时, 触发 Assert过程,发送 Assert (S, G) 消息, 接口进入 Assert (S, G) Winner状态。 之前负责转发组播流量 的路由器因收到优于自己的 Assert (S, G)消息而进入 Assert (S, G ) Loser 状态。 至此, 本地局域网从满足切换 SPT条件且距离 S最近的路由器接收 组播流量;
步骤 S508: 在延迟计时器超时之前收到 Assert (S, G) 消息, 如果本 地 spt_assert_metric (S, I)优于收到的 Assert (S, G) 消息, 则继续等待 计时器超时, 执行步骤 S505, 否则执行步骤 S509;
步骤 S509: 取消延迟计时器 Non_DR_DataTrigger_Timer (S, I, G), 接口进入 Assert (S, G) Loser状态, 本路由器的 SPT转发竟争结束。
需要说明的是,在路由器间使用 PIM-SM,路由器与主机间使用 IGMPv2 的情况下, 因为路由器需要先检查切换 SPT的条件是否满足, 所以, 最先 向 S发送 PIM JOIN ( S, G ) 并完成 SPT建立的路由器不一定是本地局域 网到 S最优路径上的路由器, 因此, 当有距 S的路由度量更优的路由器满 足切换 SPT的条件时, 就会取代当前负责流量转发的路由器。
由上述两种网络情况 PIM-SSM网络和 PIM-SM网络的具体实施过程可 以看到, 通过定义一种新的协议接口类型, 并扩展该接口类型的 Assert处 理过程, 达到本地局域网中没有下游组播路由器时的主机接收者以最优路 径接收组播流量的目的, 实现对网络资源的优化利用。
如图 8所示, 本发明一实施例提出一种本地局域网中组播流量转发的 组播路由器, 包括: 延迟等待模块 801、 加入消息发送模块 802、 组播流量 转发模块 803、 消息接收模块 804及竟争转发模块 805, 其中:
延迟等待模块 801, 用于在非 DR本地加入接口检测到 DR转发的组播 流量时, 进入延迟等待状态;
加入消息发送模块 802, 用于当延迟等待超时, 向 RP或 S方向的上游 路由器发送 PIM加入消息, 生成 RPT或 SPT;
组播流量转发模块 803, 用于从 RPT或 SPT接收到组播流量后, 向本 地局域网转发所述组播流量;
消息接收模块 804,用于接收 DR在下游出接口检测到组播流量时发出 的 Assert消息;
竟争转发模块 805, 用于根据 Assert消息及本地路由度量值, 与 DR竟 争转发所述组播流量。
其中, 非 DR在非 DR本地加入接口检测到 DR转发的组播流量是 DR 从 RPT或 SPT接收的组播流量向本地局域网转发的。 当主机接收者希望接 收某组播流量时,主机接收者向本地局域网内的多台组播路由器发送 IGMP 加入消息,非 DR与本地局域网内的多台组播路由器一同接收主机接收者发 送的 IGMP加入消息,并由 DR负责向 RP或 S方向的上游路由器发送 PIM 加入消息,建立 RPT或 SPT,并从 RPT或 SPT接收组播流量向本地局域网 转发。
非 DR本地加入接口是指有收到 IGMP加入消息, 但没有收到 PIM加 入消息且未被选为 DR的接口。
延迟等待的时间根据到达 RP或 S的路由度量值计算; 其中,路由度量 值越小, 延迟等待时间越短。
当延迟等待超时后, 非 DR向 RP或 S方向的上游路由器发送 PIM加 入消息。 非 DR从 RPT或 SPT接收到组播流量后向本地局域网转发, DR 在下游出接口检测到组播流量时发生 Assert过程, 非 DR收到 DR发出的 Assert消息, 力口入对 Assert Winner的竟争。
DR发生的 Assert过程与协议 RFC4601 PIM-SM: Protocol Specification ( Revised )规定一致, DR发送的 Assert消息的类型由 DR当前所处转发状 态决定: 当 DR使用 SPT转发时, 则为 Assert ( S, G ) 消息; 当 DR使用 RPT转发时, 则为 Assert ( *, G ) 消息。
非 DR本地加入接口发生的 Assert过程是指将收到的 Assert消息与本 地路由度量值进行比较。 如果非 DR 的本地路由度量值优于收到的 Assert 消息, 则非 DR本地加入接口进入 Assert Winner状态, 继续转发组播流量, 并发送 Assert消息。 当 DR的下游出接口收到优于自己的 Assert消息, 则 进入 Assert Loser状态, 停止转发组播流量。 至此, 到 RP或 S最优路径上 的非 DR负责向本地局域网转发组播流量。如果非 DR的本地路由度量值不 能优于收到的 Assert消息, 则非 DR本地加入接口进入 Assert Loser状态, 停止转发组播流量, 继续由 DR负责向本地局域网转发流量。
其中, PIM加入消息的类型由非 DR本地加入接口收到的 IGMP加入 消息的版本决定: 若收到的是 IGMPv3加入消息, 则非 DR向 S方向发送 PIM ( S, G )消息; 若收到的是 IGMPv2加入消息, 则非 DR向 RP方向发 送 PIM ( *, G ) 消息。
当主机接收者发送 IGMPv2加入消息且非 DR为最后一跳并满足本地 SPT切换条件时, 非 DR进行从 RPT到 SPT的切换, 完成切换之后竟争转 发从 SPT接收的组播流量。
如图 9所示, 竟争转发模块 805包括: 比较单元 8051及转发控制单元 8052, 其中:
比较单元 8051,用于将收到的 Assert消息与本地路由度量值进行比较; 转发控制单元 8052,用于当本地路由度量值优于收到的 Assert消息时, 控制组播流量转发模块从非 DR本地加入接口继续转发组播流量, 并发送 Assert消息; 否则停止转发组播流量, 继续由 DR负责向本地局域网转发组 播流量。
进一步的, 竟争转发模块 805还用于在延迟等待未超时期间, 且消息 接收模块 804收到 DR在下游出接口检测到组播流量时发出的 Assert消息 时, 根据 Assert消息及本地路由度量值, 与 DR竟争转发组播流量。
进一步的,竟争转发模块 805还用于当所述组播路由器的非 DR本地加 入接口收到的是 IGMPv2加入消息, 且所述组播路由器为最后一跳并满足 本地 SPT切换条件时, 进行从 RPT到 SPT的切换, 完成切换之后竟争转发 从 SPT接收的组播流量。
本发明实施例本地局域网中组播流量转发方法及组播路由器, 通过引 入非 DR本地加入接口概念,并扩展 Assert过程对非 DR本地加入接口类型 的处理,非 DR根据 Assert消息及本地路由度量值与 DR竟争转发组播流量, 实现本地局域网中没有下游组播路由器时, 主机接收者仍是从位于 RP或 S 到本地局域网最优路径上的路由器接收组播流量, 从而达到对网络资源的 优化利用,避免因完全依靠 DR转发造成的路由器处理资源和链路带宽资源 的浪费。
以上所述仅为本发明的优选实施例, 并非因此限制本发明的专利范围, 凡是利用本发明说明书及附图内容所作的等效结构或流程变换, 或直接或 间接运用在其它相关的技术领域, 均同理包括在本发明的专利保护范围内。

Claims

权利要求书
1、一种本地局域网中组播流量转发方法,其特征在于, 所述方法包括: 非指定路由器 DR在非 DR本地加入接口检测到 DR转发的组播流量 时, 进入延迟等待状态;
当延迟等待超时后,向汇聚点 RP或数据源 S方向的上游路由器发送独 立组播协议 PIM加入消息 , 生成共享树 RPT或有源树 SPT;
从 RPT或 SPT接收到组播流量后, 向本地局域网转发所述组播流量; 接收 DR在下游出接口检测到组播流量时发出的断言 Assert消息; 根据所述 Assert消息及本地路由度量值, 与所述 DR竟争转发所述组 播流量。
2、 根据权利要求 1所述的方法, 其特征在于, 所述根据所述 Assert消 息及本地路由度量值, 与所述 DR竟争转发所述组播流量为:
将所述 Assert消息与本地路由度量值进行比较;
当所述本地路由度量值优于所述 Assert消息时, 从非 DR本地加入接 口继续转发组播流量, 并发送 Assert消息; 否则, 停止转发组播流量, 继 续由 DR负责向本地局域网转发组播流量。
3、 根据权利要求 2所述的方法, 其特征在于, 所述非 DR在非 DR本 地加入接口检测到 DR转发的组播流量时,进入延迟等待状态之前,所述方 法还包括:
所述非 DR与所述本地局域网内的 DR及其他非 DR接收主机接收者发 送的组管理协议 IGMP加入消息, 由 DR负责向 RP或 S方向的上游路由器 发送 PIM加入消息及从 RPT或 SPT接收组播流量, 并向本地局域网转发。
4、 根据权利要求 1所述的方法, 其特征在于, 所述非 DR的非 DR本 地加入接口是指接收到 IGMP加入消息, 但未接收到 PIM加入消息且未被 选为 DR的接口。
5、 根据权利要求 1所述的方法, 其特征在于, 所述延迟等待状态的延 迟等待的时间根据到达 RP或 S的路由度量值计算;其中,路由度量值越小, 延迟等待时间越短。
6、根据权利要求 3所述的方法,其特征在于, 所述当延迟等待超时后, 向 RP或 S方向的上游路由器发送 PIM加入消息为:
当非 DR本地加入接口收到的是 IGMPv3加入消息时,非 DR向 S方向 发送 PIM ( S , G ) 消息; 当非 DR本地加入接口收到的是 IGMPv2加入消 息时, 非 DR向 RP方向发送 PIM ( *, G ) 消息。
7、 根据权利要求 1至 6任一项所述的方法, 其特征在于, 所述 DR发 出的 Assert消息的类型由 DR当前所处转发状态决定, 当 DR使用 SPT转 发时, 所述 Assert消息的类型为 Assert ( S, G ) 消息; 当 DR使用 RPT转 发时, 所述 Assert消息的类型为 Assert ( *, G ) 消息。
8、 根据权利要求 1所述的方法, 其特征在于, 所述方法还包括: 在延迟等待未超时期间,当所述非 DR收到 DR在下游出接口检测到组 播流量时发出的 Assert消息时, 根据所述 Assert消息及本地路由度量值, 与所述 DR竟争转发所述组播流量。
9、 根据权利要求 6所述的方法, 其特征在于, 所述与所述 DR竟争转 发所述组播流量之前, 所述方法还包括:
当所述非 DR本地加入接口收到的是 IGMPv2加入消息且所述非 DR为 最后一跳并满足本地 SPT切换条件时,所述非 DR完成从 RPT到 SPT的切 换。
10、 一种本地局域网中组播流量转发的组播路由器, 其特征在于, 包 括:
延迟等待模块, 用于在所述组播路由器的非 DR本地加入接口检测到 DR转发的组播流量时, 进入延迟等待状态; 加入消息发送模块, 用于当延迟等待超时后, 向 RP或 S方向的上游路 由器发送 PIM加入消息, 生成 RPT或 SPT;
组播流量转发模块, 用于从 RPT或 SPT接收到组播流量后, 向本地局 域网转发所述组播流量;
消息接收模块, 用于接收 DR在下游出接口检测到组播流量时发出的 Assert消息;
竟争转发模块, 用于根据所述 Assert消息及本地路由度量值, 与所述 DR竟争转发所述组播流量。
11、 根据权利要求 10所述的组播路由器, 其特征在于, 所述竟争转发 模块包括:
比较单元, 用于将所述 Assert消息与本地路由度量值进行比较; 转发控制单元, 用于当所述本地路由度量值优于所述 Assert消息时, 控制组播流量转发模块从非 DR本地加入接口继续转发组播流量, 并发送 Assert消息; 否则, 停止转发组播流量, 继续由 DR负责向本地局域网转发 组播流量。
12、 根据权利要求 10所述的组播路由器, 其特征在于, 所述竟争转发 模块,还用于在延迟等待未超时期间,且消息接收模块收到 DR在下游出接 口检测到组播流量时发出的 Assert消息时, 根据所述 Assert消息及本地路 由度量值, 与所述 DR竟争转发所述组播流量。
13、 根据权利要求 10所述的组播路由器, 其特征在于, 所述竟争转发 模块, 还用于当所述组播路由器的非 DR本地加入接口收到的是 IGMPv2 加入消息, 且所述组播路由器为最后一跳并满足本地 SPT切换条件时, 完 成从 RPT到 SPT的切换。
PCT/CN2012/071548 2011-04-22 2012-02-23 本地局域网中组播流量转发方法及组播路由器 WO2012142871A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110102021.0A CN102158415B (zh) 2011-04-22 2011-04-22 本地局域网中组播流量转发方法及组播路由器
CN201110102021.0 2011-04-22

Publications (1)

Publication Number Publication Date
WO2012142871A1 true WO2012142871A1 (zh) 2012-10-26

Family

ID=44439611

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/071548 WO2012142871A1 (zh) 2011-04-22 2012-02-23 本地局域网中组播流量转发方法及组播路由器

Country Status (2)

Country Link
CN (1) CN102158415B (zh)
WO (1) WO2012142871A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110838991A (zh) * 2019-11-05 2020-02-25 深圳前海达闼云端智能科技有限公司 网关连接方法、装置、存储介质、电子设备及网关设备

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158415B (zh) * 2011-04-22 2015-01-28 中兴通讯股份有限公司 本地局域网中组播流量转发方法及组播路由器
CN105207913B (zh) * 2015-10-19 2019-09-13 上海斐讯数据通信技术有限公司 一种组播报文转发方法及系统
CN107612824B (zh) * 2016-07-12 2020-07-28 迈普通信技术股份有限公司 一种组播指定路由器的确定方法及组播设备
CN106878188B (zh) * 2017-01-16 2019-11-12 新华三技术有限公司 一种断言报文的发送方法和装置
CN109511148B (zh) * 2018-11-21 2022-03-15 上海事凡物联网科技有限公司 自组网路由切换方法及其装置、通信节点和存储介质
CN114221913A (zh) 2019-02-21 2022-03-22 华为技术有限公司 一种发送和获取断言报文的方法和网络节点

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060268869A1 (en) * 2005-05-31 2006-11-30 Arjen Boers Designated router assginment per multicast group address/range
US20090161670A1 (en) * 2007-12-24 2009-06-25 Cisco Technology, Inc. Fast multicast convergence at secondary designated router or designated forwarder
CN101617512A (zh) * 2007-02-23 2009-12-30 阿尔卡特朗讯公司 在非指定路由器处接收多播业务
CN101873260A (zh) * 2010-06-01 2010-10-27 北京星网锐捷网络技术有限公司 组播流转发方法及路由设备
CN102158415A (zh) * 2011-04-22 2011-08-17 中兴通讯股份有限公司 本地局域网中组播流量转发方法及组播路由器

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060268869A1 (en) * 2005-05-31 2006-11-30 Arjen Boers Designated router assginment per multicast group address/range
CN101617512A (zh) * 2007-02-23 2009-12-30 阿尔卡特朗讯公司 在非指定路由器处接收多播业务
US20090161670A1 (en) * 2007-12-24 2009-06-25 Cisco Technology, Inc. Fast multicast convergence at secondary designated router or designated forwarder
CN101873260A (zh) * 2010-06-01 2010-10-27 北京星网锐捷网络技术有限公司 组播流转发方法及路由设备
CN102158415A (zh) * 2011-04-22 2011-08-17 中兴通讯股份有限公司 本地局域网中组播流量转发方法及组播路由器

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110838991A (zh) * 2019-11-05 2020-02-25 深圳前海达闼云端智能科技有限公司 网关连接方法、装置、存储介质、电子设备及网关设备
CN110838991B (zh) * 2019-11-05 2023-05-16 达闼机器人股份有限公司 网关连接方法、装置、存储介质、电子设备及网关设备

Also Published As

Publication number Publication date
CN102158415B (zh) 2015-01-28
CN102158415A (zh) 2011-08-17

Similar Documents

Publication Publication Date Title
WO2012142871A1 (zh) 本地局域网中组播流量转发方法及组播路由器
JP4825696B2 (ja) パケット中継装置
US9031070B2 (en) Methods for controlling elections in a multicast network
EP2437444A1 (en) Method, router and communication system for rapid multicast convergence
JP5852232B2 (ja) マルチパスオーバーレイネットワーク及びそれのマルチパス管理プロトコル
US20110267962A1 (en) Method and system for predictive designated router handover in a multicast network
WO2009052712A1 (fr) Procédé, système et routeur pour un transfert de flux de multidiffusion
US11381883B2 (en) Dynamic designated forwarder election per multicast stream for EVPN all-active homing
US20130088951A1 (en) Multicast packet transmission method, related device and system
US10855579B2 (en) Optimizing IP multicast delivery with use of local source nodes and the propagation of advertisements therefor
WO2010111956A1 (zh) 一种组播转发路径收敛的方法和系统
US7876755B2 (en) Method and system for improving quality of communication based on label distribution protocol
WO2010017720A1 (zh) 实现组播负载分担的方法及装置
WO2017046684A1 (en) Triggering pim assert re-election to honor network configuration changes
CN102724048B (zh) 稀疏模式协议无关组播通知汇聚点的方法和装置
WO2009111958A1 (zh) 一种组播快速重路由的方法、装置和系统
US8848512B2 (en) Rendezvous point convergence method and apparatus
WO2015014197A1 (zh) 组播负载场景下选路的方法和路由器
JP4451387B2 (ja) マルチキャスト輻輳制御システムおよびマルチキャスト輻輳制御方法
WO2010069174A1 (zh) 一种数据的传输方法、系统及装置
WO2011140813A1 (zh) 在协议无关组播双重加入下转发数据的方法、装置及系统
WO2015032337A1 (zh) 一种优化pim-sm组播路由建立的方法
Biradar et al. Enhancing the quality of service using M-AODV protocol in MANETs
WO2015032260A1 (zh) 路由更新方法和路由设备
WO2020168982A1 (zh) 一种发送和获取断言报文的方法和网络节点

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12773694

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12773694

Country of ref document: EP

Kind code of ref document: A1