A multicast switching method and device, electronic equipment and storage medium
By pre-establishing multicast entries for primary and backup links in network devices and quickly switching to the backup link when the primary link fails, the problem of excessive data loss during multicast switching is solved, and rapid recovery of multicast data transmission is achieved.
Patent Information
- Application Number
- CN202211657445.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-22
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2042-12-22
Smart Images

Figure CN118283539B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a multicast switching method and device, electronic equipment and storage medium. BACKGROUND
[0002] As a communication mode parallel to unicast and broadcast, multicast technology can effectively solve the problem of single-point sending and multi-point receiving, and realize efficient data transmission from point to multipoint.
[0003] Current network devices rely on unicast routing to establish multicast forwarding table items. When a link or node in the network fails, multicast table items need to be re-established after unicast routing converges. Since unicast convergence on the control plane itself takes time, after the control plane converges, multicast table items need to be added or deleted, and the data forwarding plane also takes time to process table items. The whole process takes a long time, which can cause a lot of multicast data loss.
[0004] It can be seen that there is a problem of too much multicast data loss during multicast switching in the prior art. SUMMARY
[0005] Embodiments of the present application provide a multicast switching method and device, electronic equipment and storage medium to solve the problem of too much multicast data loss during multicast switching in the prior art.
[0006] In a first aspect, embodiments of the present application provide a multicast switching method, comprising:
[0007] After a network device establishes a protocol-independent multicast fast reroute (PIM FRR) multicast table item for a multicast source, the network device receives multicast data of the multicast source through a primary link and a backup link respectively;
[0008] If it is determined that the primary link fails, the network device switches to the backup link on the data forwarding plane to forward the multicast data received through the backup link outward, and switches the backup link to a new primary link on the control plane to update the PIM FRR multicast table item to a PIM multicast table item.
[0009] In some embodiments, after determining that the primary link fails, the network device further comprises:
[0010] When it is determined that the failure type of the primary link is a physical link failure, the network device performs port oscillation suppression processing to attempt to resolve the physical link failure of the primary link;
[0011] If it is determined that the resolution of the physical link failure of the primary link fails, the network device switches to the backup link on the data forwarding plane to forward the multicast data received through the backup link outward.
[0012] In some embodiments, the multicast data received through the backup link is forwarded out according to the following steps:
[0013] switching the first non-forwarding IPMC resource corresponding to the backup link to a second forwarding IPMC resource, and switching the third forwarding IPMC resource corresponding to the primary link to the first non-forwarding IPMC resource;
[0014] submitting the multicast data received through the backup link to a forwarding egress pointed by the second forwarding IPMC resource, so as to send the multicast data received through the backup link out through the forwarding egress, and submitting the multicast data received through the primary link to a non-forwarding egress pointed by the first non-forwarding IPMC resource, so as to discard the multicast data received through the primary link.
[0015] In some embodiments, after switching to the backup link at the data forwarding plane, the method further comprises:
[0016] if it is determined that the original primary link is recovered, switching the first non-forwarding IPMC resource corresponding to the original primary link to the third forwarding IPMC resource, and switching the second forwarding IPMC resource corresponding to the original backup link to the first non-forwarding IPMC resource;
[0017] submitting the multicast data received through the original primary link to a forwarding egress pointed by the third forwarding IPMC resource, so as to send the multicast data received through the original primary link out through the forwarding egress, and submitting the multicast data received through the original backup link to a non-forwarding egress pointed by the first non-forwarding IPMC resource, so as to discard the multicast data received through the original backup link.
[0018] In some embodiments, whenever a PIM FRR multicast entry is established, the detection parameters required for remote link fault detection are automatically set based on the link information of the primary link in the PIM FRR multicast entry.
[0019] In a second aspect, the embodiments of the present application provide a multicast switching device, comprising:
[0020] a receiving module, configured to receive multicast data of a multicast source through a primary link and a backup link respectively after a protocol independent multicast fast reroute (PIM FRR) multicast entry of the multicast source is established;
[0021] switching, if it is determined that the primary link fails, to the backup link on a data forwarding plane to forward multicast data received through the backup link outwards, and switching the backup link to a new primary link on a control plane to update the PIM FRR multicast entry to a PIM multicast entry.
[0022] In some embodiments, further comprising:
[0023] a failure processing module configured to, after determining that the primary link fails, perform a port flapping suppression process to attempt to remove a physical link failure of the primary link when it is determined that the failure type of the primary link is a physical link failure;
[0024] the switching module is further configured to, if it is determined that the physical link failure of the primary link fails to be removed, switch to the backup link on the data forwarding plane to forward the multicast data received through the backup link outwards.
[0025] In some embodiments, the switching module is specifically configured to forward the multicast data received through the backup link outwards according to the following steps:
[0026] switching a first non-forwarding IPMC resource corresponding to the backup link to a second forwarding IPMC resource, and switching a third forwarding IPMC resource corresponding to the primary link to the first non-forwarding IPMC resource;
[0027] submitting the multicast data received through the backup link to a forwarding egress pointed to by the second forwarding IPMC resource to send the multicast data received through the backup link outwards through the forwarding egress, and submitting the multicast data received through the primary link to a non-forwarding egress pointed to by the first non-forwarding IPMC resource to discard the multicast data received through the primary link.
[0028] In some embodiments, further comprising a recovery module configured to:
[0029] after switching to the backup link on the data forwarding plane, if it is determined that the original primary link recovers, switching the first non-forwarding IPMC resource corresponding to the original primary link to the third forwarding IPMC resource, and switching the second forwarding IPMC resource corresponding to the original backup link to the first non-forwarding IPMC resource;
[0030] The multicast data received through the original primary link is submitted to the transmissible egress pointed by the transmissible third IPMC resource to send the multicast data received through the original primary link out through the transmissible egress, and the multicast data received through the original backup link is submitted to the non-transmissible egress pointed by the non-transmissible first IPMC resource to discard the multicast data received through the original backup link.
[0031] In some embodiments, whenever the PIM FRR multicast entry is established, the detection parameters required for remote link fault detection are automatically set based on the link information of the primary link in the PIM FRR multicast entry.
[0032] In a third aspect, an electronic device is provided, including at least one processor, and a memory connected with the at least one processor in communication, wherein:
[0033] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the multicast switching method.
[0034] In a fourth aspect, a storage medium is provided, and when a computer program in the storage medium is executed by a processor of an electronic device, the electronic device can execute the multicast switching method.
[0035] In the embodiments of the present application, for the network device with the PIM FRR function enabled, the multicast data of a multicast source is received through a primary link and a backup link, when the primary link fails, the backup link of the multicast is switched to the primary link in the data forwarding plane to send the multicast data from the backup link, and the backup link is switched to a new primary link in the control plane, instead of sending the multicast data from the backup link after the switching in the control plane and the data forwarding plane is completed, so the amount of multicast data loss during multicast switching can be greatly reduced. BRIEF DESCRIPTION OF DRAWINGS
[0036] The accompanying drawings, which are included to provide a further understanding of the present application and constitute a part of this application, illustrate embodiments of the present application and together with the description serve to explain the present application. In the drawings:
[0037] Figure 1 A schematic diagram of the relationship between the primary link and the IPMC resource when the primary link is normal is provided for the embodiments of the present application;
[0038] Figure 2 A schematic diagram of the relationship between the primary link and the IPMC resource when the primary link fails is provided for the embodiments of the present application;
[0039] Figure 3A switching process diagram when a physical link fails is provided for an embodiment of the present application.
[0040] Figure 4 A switching process diagram when a remote link fails is provided for an embodiment of the present application.
[0041] Figure 5 A multicast topology structure diagram is provided for an embodiment of the present application.
[0042] Figure 6 A PIM FRR multicast data forwarding process diagram is provided for an embodiment of the present application.
[0043] Figure 7 A switching process diagram when a local link fails is provided for an embodiment of the present application.
[0044] Figure 8 A switching process diagram when a remote link fails is provided for an embodiment of the present application.
[0045] Figure 9 A switching process diagram when a local link fails is provided for an embodiment of the present application.
[0046] Figure 10 A flowchart of a multicast switching method is provided for an embodiment of the present application.
[0047] Figure 11 A structure diagram of a multicast switching device is provided for an embodiment of the present application.
[0048] Figure 12 A hardware structure diagram of an electronic device for implementing a multicast switching method is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to solve the problem of excessive multicast data loss during multicast switching in the prior art, an embodiment of the present application provides a multicast switching method, device, electronic device and storage medium.
[0050] The preferred embodiments of the present application are described below in conjunction with the accompanying drawings of the specification, and it should be understood that the preferred embodiments described herein are only used to explain and describe the present application, and are not used to limit the present application, and the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0051] In order to facilitate understanding of the present application, among the technical terms involved in the present application:
[0052] 1. Protocol Independent Multicast (PIM), an intra-domain multicast routing protocol. A multicast source sends a packet to a group address. The packet is forwarded hop by hop by network devices and finally reaches group members. On a Layer 3 network device, PIM can be used to create and maintain a multicast routing table entry, thereby supporting multicast forwarding.
[0053] 2. Multicast packets are transmitted from a point to multiple points, and the forwarding path presents a tree structure. This forwarding path is referred to as a multicast distribution tree (MDT, Multicast Distribution Tree), and there are two types:
[0054] RPT (RP Tree, Shared Tree): with a rendezvous point RP as the root and a designated router DR connecting group members as the leaf.
[0055] SPT (Shortest Path Tree, Shortest Path Tree): with a designated router DR connecting a multicast source as the root and a rendezvous point RP or a designated router DR connecting group members as the leaf.
[0056] 3. Data Link Detection Protocol (DLDP), a fast detection protocol for Ethernet link faults. General Ethernet link detection mechanisms only use the state of physical connection to detect the connectivity of the link through physical layer auto-negotiation. However, there are certain limitations for three-layer data connectivity detection, such as a scenario in which the physical connection state is normal but three-layer data communication is abnormal. By using the data link detection protocol DLDP, reliable three-layer link detection information can be provided. At the same time, after detecting a fault, DLDP can close the logical state of the three-layer interface to promote the rapid convergence of three-layer protocols.
[0057] 1) Detection mode
[0058] The detection mode of DLDP includes active mode and passive mode, wherein:
[0059] Active mode: refers to a mode in which ICMP probe packets are actively sent, and the default configuration is active mode.
[0060] Passive mode: refers to the mode of passively receiving ICMP probe packets. That is, the DLDP component does not actively initiate ICMP Echo packets for detection, but only responds to ICMP Reply packets after receiving ICMP Echo packets. The interface is determined to have a path failure within a specified time by judging whether the ICMP Echo packet is received. The effect of detecting the link path of both devices is met, and the bandwidth resources and device CPU resources are also saved.
[0061] 2) Cross-segment detection
[0062] If the DLDP component needs to detect the reachability of non-directly connected network segment IP, the next hop IP of the interface can be configured so that the DLDP component can obtain the next hop media access control (MAC) address through the address resolution protocol (ARP) packet, correctly encapsulate the ICMP packet and send it out. However, in this case, the situation of responding to the packet from other links needs to be avoided, otherwise it will cause the DLDP component to misjudge that the interface has not received the ICMP response.
[0063] 3) Detection time
[0064] When the network device does not receive the response packet from the opposite end within the time period of "detection interval" x "retransmission number", it is considered that the three-layer link is faulty, and the three-layer interface logical state is actively closed (SHUTDOWN) (the actual physical link is still connected). Once the three-layer link is normal, the logical state of the three-layer interface is restored to the UP state.
[0065] Detection interval: refers to the sending interval of the DLDP detection packet (ICMP echo).
[0066] Number of retransmissions: refers to the number of packet sending required for DLDP detection failure.
[0067] 4) Number of recoveries
[0068] If the detected link is unstable, such as Ping is disconnected for three times, connected for one time, and disconnected for multiple times. If the single result is logically judged, the DLDP detection result is UP, DOWN multiple times, which will aggravate the instability of the network.
[0069] The number of recoveries indicates the number of consecutive DLDP detection packets that the link needs to receive in response before being set to UP state from DOWN state. The number of recoveries is 3 by default, i.e. only when the link is continuously pinged 3 times will it be set to UP state. In this case, although the sensitivity of link detection is reduced, its stability is increased, and the related parameters can also be adjusted according to the network situation in actual application.
[0070] 5) Ignoring link failure of ICMP detection
[0071] After starting the DLDP function, the DLDP agent sends ICMP echo packets for path detection, and the detection state is returned to the DLDP component. By default, if a link failure is detected, the DLDP component will actively SHUTDOWN the corresponding layer 3 port.
[0072] In some application scenarios, it is required that the state detected by the DLDP agent is notified to other functional modules, and if the detection state is abnormal, the DLDP component cannot SHUTDOWN the corresponding layer 3 port. In this scenario, the DLDP component ignores the case where the layer 3 link state changes from UP state to DOWN state, but it still does not ignore the case where the state changes from DOWN state to UP state.
[0073] 4 Control plane, used for controlling and managing the operation of all network protocols, such as management and control of spanning tree protocol, VLAN protocol, ARP protocol, various routing protocols and multicast protocols, etc. The control plane provides routers / switches with accurate understanding of network devices, connection links and interaction protocols in the entire network environment through network protocols, and makes timely adjustments when the network status changes to maintain the normal operation of the network. The control plane provides various network information and forwarding query table items necessary for the data processing and forwarding of the data forwarding plane.
[0074] 5, Data forwarding plane, mainly relies on hardware resources to process information. The basic task of network equipment is to process and forward various types of data on different ports. For various specific processing and forwarding processes in the data processing process, such as L2 / L3 / ACL / QOS / multicast / security protection, etc. The specific execution process of each function belongs to the task category of the data forwarding plane.
[0075] 6, Route convergence, refers to the state in which all routers in the routing domain agree on the current network structure and routing forwarding. From the change of the network topology to the fact that all related routers on the network know about the change and make corresponding changes.
[0076] In the related art, when a link or a node in a network fails, unicast route re-convergence needs to be experienced, thereby triggering re-establishment of multicast table entries, but this process takes a long time and causes too much multicast data loss. According to actual measurement, 1000 table entries need 17s to complete primary link switching to backup link, which cannot meet the high requirement of convergence within 3s.
[0077] Multicast control plane protocol convergence needs to rely on unicast convergence, multicast convergence can be performed only after unicast convergence, and unicast convergence itself takes time. After control plane protocol convergence, multicast table entries are issued, and data forwarding plane processing table entries take time. The whole process mainly takes time in the following aspects: 1, link fault detection, 2, unicast route convergence, 3, multicast route convergence, and 4, multicast forwarding table installation. The process of multicast data loss when the link fails is: step 1->step 4.
[0078] Therefore, an embodiment of the present application provides a multicast switching method to reduce the amount of multicast data loss when the link fails. In the method, a network device such as a switch or a router supports PIM FRR function, PIM FRR has multicast table entries on the backup link in advance before the link fails, multicast data from the primary link is sent when the primary link does not fail, multicast data from the backup link is discarded, and multicast data from the backup link can be forwarded immediately when the primary link fails, without experiencing the process of re-establishing multicast table entries, thereby reducing the flow interruption time of multicast data.
[0079] Advantages of PIM FRR: The primary and backup links are installed in advance, the primary link is quickly switched to the backup link when the primary link fails, and protocol convergence is not needed.
[0080] The whole process mainly takes time in the following aspects: 1, link fault detection, 2, multicast fast switching, 3, unicast route convergence, 4, multicast route convergence, and 5, multicast forwarding table installation. The process of multicast data loss when the link fails is: step 1->step 2.
[0081] To achieve the purpose of fast switching and less loss, IP multicast (IPMC) resources can be used to maintain multicast groups (data forwarding plane software fast switching, applicable to all chips).
[0082] Specifically, an IPMC resource is reserved as a non-forwarding IPMC without any egress. Assume that source ports of the primary and backup links correspond to multicast routes (S, G, V1) and (S, G, V2), respectively. After starting the PIM FRR function, a PIM FRR multicast table item is established on the network device, (S, G, V1) is a primary link multicast route prefix, (S, G, V2) is a backup link multicast route prefix, IPMC1+PORTi (i is between 1 and m) is primary link egress information, IPMC2+PORTj (j is between 1 and n) is backup link egress information, and IPMC_DROP is an IPMC resource without egress information, pointing to a non-forwarding egress empty. Wherein, S represents a multicast group source IP, G represents a multicast group IP, and V represents a source port VLAN. The primary and backup link multicast group source addresses SIP and the multicast group addresses GIP are the same, and the primary and backup link source port VLANs are different. The VLAN and IFX (device port number) have a unique mapping relationship.
[0083] Referring to Figure 1 When the primary link is normal, the primary link (S, G, V1) multicast route prefix corresponds to a forwarding IPMC1 resource (i.e., the third IPMC resource), and the backup link multicast route prefix (S, G, V2) corresponds to a non-forwarding IPMC_DROP resource (i.e., the first IPMC resource). The network device receives two copies of multicast data from the primary and backup links. The multicast data from the primary link is submitted to the forwarding egress PORTi pointed by the IPMC1 resource for forwarding outside, and the multicast data from the backup link is submitted to the non-forwarding egress empty pointed by the IPMC_DROP resource for discarding the multicast data from the backup link.
[0084] Referring to Figure 2 When detecting that the primary link fails, the data forwarding plane only needs to change the correspondence between the multicast prefix and the IPMC resource to perform fast switching, for example, changing the primary link multicast route prefix (S, G, V1) from corresponding to the forwarding IPMC1 resource to corresponding to the non-forwarding IPMC_DROP resource, and changing the backup link multicast route prefix (S, G, V2) from corresponding to the non-forwarding IPMC_DROP resource to corresponding to the forwarding IPMC2 resource (i.e., the second IPMC resource). Subsequently, the multicast data received through the backup link is submitted to the forwarding egress PORTj pointed by the IPMC2 resource, so as to send the multicast data received through the backup link outside through PORTj, and the multicast data received through the primary link (if any) is submitted to the non-forwarding egress empty pointed by the IPMC_DROP resource, so as to discard the multicast data from the primary link.
[0085] When the data forwarding plane fast switching, only the change of the link forwarding state, can not delete the multicast table. After the control plane convergence, the data forwarding plane and the control plane consistent. In addition, when the multicast group only one link, do not perform fast switching, the failure of the link is the backup link, do not perform fast switching, the main link failure, the backup link is also in the failure state, do not perform fast switching.
[0086] It should be noted that the prefix of the main and backup link are installed to the hardware of the network device (such as the ASIC chip), otherwise, the multicast data of the backup link will be sent to the CPU as unknown multicast.
[0087] In practical application, the link failure is divided into local link failure and remote link failure, the following respectively to the multicast switching process of the two kinds of failure are introduced.
[0088] I, local link failure
[0089] The local link detection is responsible by the port component of the network device, the link failure information of any port is directly announced to the data forwarding plane multicast component from the control plane port component and the data forwarding plane port component, and the fast switching is performed by the data forwarding plane multicast component to the multicast group whose source port is the ifx of the port.
[0090] The local link failure includes physical link failure and logical link failure. When the physical link failure occurs, the logical link failure also occurs, and when the logical link failure occurs, the physical link failure does not necessarily occur. The following respectively to the two kinds of failure are introduced.
[0091] Referring to Figure 3 , the switching process of the physical link failure includes the following steps:
[0092] 1.1, the ASIC chip senses the failure of the physical link, and announces the physical link failure information to the data forwarding plane interface component;
[0093] 1.2, the data forwarding plane interface component receives the physical link failure information, performs the port oscillation suppression processing, and if the failure cannot be removed after the processing, the failure information is announced to the data forwarding plane multicast component;
[0094] 1.3, the data forwarding plane multicast component receives the failure information, and performs the fast switching to switch to the multicast data from the backup link.
[0095] 2.1, the control plane interface component senses the logical link failure (the interface is configured with shutdown, the routing protocol is disabled, the link failure is calculated through the control plane protocol, etc.), and announces the logical link failure information to the data forwarding plane multicast component;
[0096] 2.2、Data Forwarding Plane Multicast Component receives the failure information, performs fast switching, and switches to sending multicast data from the backup link.
[0097] 3.1、Control Plane Interface Component senses logical link failure (shutdown is configured under the interface, routing protocol is disabled, link failure is calculated through control plane protocol, etc.), advertises logical link failure information to Control Plane Unicast Component, and triggers Control Plane Unicast Component to perform unicast routing calculation; (3.1 and 2.1 are performed at the same time)
[0098] 3.2、Control Plane Unicast Component, after unicast routing calculation is completed (i.e., unicast routing converges), advertises that unicast routing of the multicast source IP address of Control Plane Multicast Component changes, and triggers Control Plane Multicast Component to perform multicast routing calculation;
[0099] 3.3、Control Plane Multicast Component, after multicast routing calculation is completed (i.e., multicast routing converges), advertises that multicast routing of Data Forwarding Plane Multicast Component converges, and the backup link is upgraded to the new primary link;
[0100] 3.4、Data Forwarding Plane Multicast Component installs the new multicast table item to the ASIC chip, and finally leaves one primary link (the original backup link).
[0101] In the above process, the steps of 1.3 and 2.2 are the same, and only one execution is required.
[0102] The switching process in the case of logical link failure does not include 1.1-1.3 in Figure 3 , and the other steps are the same, which will not be described here.
[0103] It should be noted that the ASIC chip is an internal chip of the network device, and the Data Forwarding Plane Interface Component, the Data Forwarding Plane Multicast Component, the Control Plane Interface Component, the Control Plane Unicast Component, the Control Plane Multicast Component, and the Data Forwarding Plane Multicast Component are all pre-installed in the network device.
[0104] II. Remote Link Failure
[0105] Remote link failure detection uses DLDP, which can detect within the network segment or across the network segment. DLDP can be configured with multiple IPs, and when all IPs have no ICMP response, the interface is determined to be in DOWN state. Once one IP resumes communication, the interface is considered to be in UP state. DLDP is configured under the interface: whether to configure the next hop IP, MAC address, sending interval, retransmission times, recovery times, and other parameters is selected according to the actual environment.
[0106] The interface configuration DLDP function detects the link connectivity of the multicast source sip. That is, based on the source interface ifx, whether the multicast source IP is reachable is detected. When the main link fails, the DLDP state is directly notified to the data forwarding plane multicast component, and the data forwarding plane multicast component performs fast switching for all multicast groups of the ifx and sip.
[0107] Figure 4 The multicast switching flowchart for the remote link failure includes the following steps:
[0108] 4.1. The control plane DLDP component senses the logical link failure of the remote link, and notifies the data forwarding plane DLDP component.
[0109] 4.2. The data forwarding plane DLDP component receives the link failure information and transmits it to the data forwarding plane multicast component.
[0110] 4.3. The data forwarding plane multicast component receives the link failure information, performs fast switching, and switches to send multicast data from the backup link.
[0111] At the same time, the control plane switching is performed, including steps 5.1-5.4:
[0112] 5.1. The control plane DLDP component senses the logical link failure of the remote link (the interface is configured with shutdown, the routing protocol is disabled, the link failure is calculated through the control plane protocol, etc.), notifies the control plane unicast component, and triggers the control plane unicast component to perform unicast routing calculation. (5.1 and 4.1 are performed at the same time)
[0113] 5.2. After the control plane unicast component completes the calculation (that is, the unicast routing converges), the control plane multicast component is notified that the unicast routing of the multicast source IP address has changed, and the control plane multicast component is triggered to perform multicast routing calculation.
[0114] 5.3. After the control plane multicast component completes the calculation (that is, the multicast routing converges), the new multicast table item is calculated according to the unicast routing, the new multicast table item is notified to the data forwarding plane multicast component, and the backup link is upgraded to the new main link.
[0115] 5.4. The data forwarding plane multicast component installs the new multicast table item to the ASIC chip, and finally leaves one main link (the original backup link).
[0116] In addition, whenever the PIM FRR multicast table item is established, the control plane multicast component can establish a DLDP session in the control plane DLDP component according to the link information of the current main link, and when this main link fails, the DLDP session can also be deleted from the control plane DLDP component.
[0117] It should be noted that the ASIC chip is an internal chip of the network device, and the control plane DLDP component, the data forwarding plane DLDP component, the data forwarding plane multicast component, the control plane DLDP component, and the control plane multicast component are pre-installed into the network device.
[0118] The scheme of the embodiment of the application will be introduced below in combination with specific embodiments.
[0119] Figure 5 A multicast topology structure schematic diagram provided by the embodiment of the application includes a multicast source, a receiver, and network devices R1, R2, R3, and R4 located between the multicast source and the receiver.
[0120] Typical scenarios include:
[0121] 1. PIM FRR multicast data forwarding: If the R4 in the topology starts the PIM FRR function, the R4 will respectively send primary and backup dual joins to the multicast source according to the unicast backup FRR route, and establish primary and backup multicast forwarding table items, so that the R4 respectively receives one copy of multicast data from the primary and backup links, and the data forwarding plane selects the multicast data from the primary link for forwarding and discards the multicast data from the backup link.
[0122] 2. Local link fault detection and protection: If the primary link R3->R4 in the topology fails, the R4 can quickly detect the local interface link fault, and immediately selects the multicast data from the backup link for forwarding, thereby reducing the flow interruption time of the multicast data.
[0123] 3. Remote link fault detection and protection: If the primary link R1->R3 in the topology fails, the R4 can quickly detect the remote link fault, and immediately selects the multicast data from the backup link for forwarding, thereby reducing the flow interruption time of the multicast data.
[0124] 4. Multicast data switching back after the primary link fault recovery: If the primary link R1->R3->R4 in the topology recovers from the fault, the PIM protocol layer senses the route change, starts the route switching back process, and then converges to the current optimal primary path again.
[0125] The several scenarios will be introduced in detail below.
[0126] 1. PIM FRR multicast data forwarding
[0127] PIM FRR forwarding refers to finding a backup route (unicast backup FRR route or ECMP route) for an (S, G) entry, if the backup route exists, adding a backup incoming interface according to the backup route, and sending a PIM join message to the backup incoming interface to establish a primary-backup FRR multicast forwarding entry. When the network device receives two copies of multicast data, the data forwarding plane forwards the multicast data from the primary link and discards the multicast data from the backup link.
[0128] Referring to Figure 6 , the PIM FRR multicast data forwarding includes the following steps:
[0129] 1) A user starts a layer 3 multicast function on R1, R2, R3, and R4, starts a unicast FRR function, a PIM SPT function, and a PIM FRR function on R4.
[0130] 2) A receiver sends an IGMP join message to R4 to request to receive multicast data of a multicast source S and a multicast group G. The multicast source S sends a multicast data stream of the multicast source S and the multicast group G to R1.
[0131] 3) After R4 receives the IGMP message, the route of the multicast source S is queried, the primary next-hop outgoing interface Te0 / 4 is found, and a PIM join message is sent to Te0 / 4.
[0132] 4) After R3 receives the PIM join message, the route of the multicast source S is queried, the primary next-hop outgoing interface Te0 / 3 is found, and a PIM join message is sent to Te0 / 3.
[0133] 5) After R1 receives the PIM join message, a multicast entry (S, G) is created, the egress is Te0 / 3, and the multicast stream is forwarded to the egress Te0 / 3.
[0134] 6) After R3 receives the multicast stream, a multicast entry (S, G) is created, the egress is Te0 / 4, and the multicast stream is forwarded to the egress Te0 / 4.
[0135] 7) After R4 receives the multicast stream, SPT switching is performed, a multicast entry (S, G) is generated, the primary incoming interface is Te0 / 4, the egress is Te0 / 5, and the multicast stream is forwarded to the egress Te0 / 5.
[0136] 8) R4 determines whether the PIM FRR function is enabled, if the PIM FRR function is enabled, whether there is a backup FRR route or an ECMP route for the multicast source S is queried, if there is a backup FRR route or an ECMP route, step 9) is jumped to, and if there is no backup FRR route or ECMP route, the process ends.
[0137] 9) R4 finds backup FRR route or ECMP route of multicast source S, backup incoming interface is Te0 / 3, sends PIM join message to backup incoming interface Te0 / 3, and generates PIM FRR multicast table item (S, G), adds backup incoming interface to PIM forwarding table, and starts link detection of main link to multicast source S.
[0138] 10) Similar to steps 3) and 4), R2 receives the PIM join message, sends the PIM join message to R1, R1 receives the PIM join message, adds the outgoing Te0 / 2 to the (S, G) table item, and R2 receives the multicast stream and adds the (S, G) table item with the outgoing Te0 / 3. At this time, the multicast table items of the main and backup links are established, and R4 receives two copies of multicast data.
[0139] 11) R4 forwards the multicast data of the main incoming interface and discards the multicast data of the backup incoming interface.
[0140] That is, the multicast data is forwarded in the manner shown in Figure 1 At this time, V1 is the main incoming interface, V2 is the backup incoming interface, and i of IPMC1_PORTi is 1, and the only one IPMC1_PORT is the outgoing interface.
[0141] 2, Local link fault detection and protection
[0142] After the main and backup FRR multicast table items are established, the network devices with main and backup routes can receive two copies of multicast data. The data forwarding plane selects the multicast data from the main link and discards the multicast data from the backup link. When the local link of the main link fails, the link state of the main incoming interface is detected to quickly perceive the link failure, and the multicast data from the backup link is immediately selected to reduce the flow interruption time of the multicast data.
[0143] Referring to Figure 7 , after the PIM FRR multicast table item is created, the local link R3->R4 failure is taken as an example. The local link failure processing includes the following steps:
[0144] 1) Initially, the PIM FRR multicast table item of R4 is established, and R4 receives two copies of multicast data. Only the multicast data from the main link is selected to be forwarded to the receiver.
[0145] 2) When the R3->R4 link fails, R4 detects the failure of the main incoming interface of the PIM FRR multicast table item, the data forwarding plane immediately performs fast switching, and selects the multicast data from the backup incoming interface to be forwarded (i.e., steps 2.1-2.2 or steps 1.1-1.3 in Figure 3 ).
[0146] That is, the multicast data is forwarded in the manner shown in Figure 2The multicast data is forwarded in the illustrated manner, at this time, V1 is the main incoming interface, V2 is the backup incoming interface, i of IPMC2_PORTi is 1, and the only one IPMC2_PORT is the backup link export.
[0147] 3) The PIM protocol component in R4 detects that the main link is DOWN, updates the converged multicast table item and updates to the data forwarding plane (i.e. executes steps 3.1-3.4 in Figure 3 , at this time, the table item is updated from the PIM FRR multicast table item to the common multicast table item (i.e. the PIM multicast table item), and the main incoming interface is updated to Te0 / 3.
[0148] 4) The R3 device detects that the export link is DOWN, no other device receives the multicast stream (S, G), deletes the (S, G) table item and sends a PIM pruning message to the upstream R1.
[0149] 5) After the R1 receives the PIM pruning message, the export Te0 / 3 of the (S, G) table item is deleted.
[0150] 3, Remote link fault detection and protection
[0151] After the main and backup FRR multicast table items are established, the network devices with the main and backup routes can receive double multicast data. The data forwarding plane selects to forward the multicast data from the main link and discards the multicast data from the backup link. When the remote main link fails, the link failure can be quickly sensed by detecting whether the multicast source on the main link is reachable, and the multicast data from the backup link is immediately selected for forwarding, thereby reducing the flow interruption time of the multicast data.
[0152] Referring to Figure 8 , after the PIM FRR multicast table item is created, the remote link R1->R3 fails, and the remote link failure processing includes the following steps:
[0153] 1) Initially, the PIM FRR multicast table item on the R4 has been established, and double multicast data is received, only the multicast data from the main link is selected for forwarding to the receiver, and the multicast data from the backup link is discarded.
[0154] 2) After the PIM FRR multicast table item is established, the R4 starts the link detection to the multicast source S on the main link, when the R1->R3 link fails, the main incoming interface link failure of the PIM FRR multicast table item can be detected, the data forwarding plane immediately performs fast switching, and the multicast data of the backup incoming interface is selected for forwarding (i.e. steps 4.1-4.3 in Figure 4 ).
[0155] That is, according to Figure 2The multicast data is forwarded in the illustrated manner, at this time, V1 is the primary incoming interface, V2 is the backup incoming interface, i of IPMC2_PORTi is 1, and the only one IPMC2_PORT is the backup link egress.
[0156] 3) The unicast route to the multicast source changes, the PIM protocol component in R4 detects the unicast route change, sends a PIM prune message to R3, updates the converged multicast table item, and updates the data forwarding plane. At this time, the table item is updated from the FRR multicast table item to the ordinary multicast table item, the primary incoming interface is updated to Te0 / 3, and R4 closes the link detection to the multicast source (i.e., steps 5.1-5.4 in Figure 4 are executed).
[0157] 4) R3 detects that the ingress link to the multicast source is DOWN, and deletes the (S, G) table item. When R3 receives the PIM prune message, if the table item has been deleted, the prune message is not processed.
[0158] 5) R1 receives the PIM prune message, and deletes the (S, G) table item egress Te0 / 3.
[0159] 4, multicast data back switching after the primary link failure recovery
[0160] When the primary link failure is recovered, the PIM protocol component in R4 senses the route change, and starts the multicast table item back switching process to smoothly converge to the current optimal primary path.
[0161] Referring to Figure 9 , taking the primary link local failure recovery (the remote failure recovery process is similar) as an example, the table item back switching process includes the following steps:
[0162] 1) After the failure recovery, the unicast route re-converges, the unicast route to the multicast source S changes, and the primary link is the high-priority route.
[0163] 2) The PIM protocol component in R4 receives the unicast route convergence notification, and re-sends the PIM join message to the unicast primary incoming interface, so that the multicast data reaches R4 from the primary link.
[0164] 3) R3 receives the PIM join message, finds that there is no (S, G) forwarding table item at present, and continues to send the PIM join message to the upstream R1.
[0165] 4) R1 receives the PIM join message, finds that there is already a multicast table item (S, G), adds the egress Te0 / 3, and forwards the multicast data to the egress Te0 / 3.
[0166] 5) R3 receives the multicast data, creates the multicast table item (S, G), the egress is Te0 / 4, and forwards the multicast data to the egress Te0 / 4.
[0167] 6) R4 receives the multicast data and finds that Te0 / 4 is the latest reverse path forwarding (RPF) entry, then updates the main entry interface of the table item to Te0 / 4, the backup entry interface to Te0 / 3, and updates the table item to the data forwarding plane, and reopens the link detection of the main link.
[0168] 7) The data forwarding plane updates the normal multicast table item to the PIM FRR multicast table item, forwards the multicast data from the main entry interface, and discards the multicast data from the backup entry interface.
[0169] The scheme of the embodiment of the application is applicable to all chips, and chips that do not support hardware failover can also be deployed, and experiments show that when 1000 table items complete main link switching to backup link, the time can be shortened from 17s to 1s by using the scheme of the embodiment of the application, meeting the high convergence requirement that 1000 groups of switching packet loss is less than 3s.
[0170] Figure 10 A flowchart of a multicast switching method provided by the embodiment of the application is provided, and the method comprises the following steps.
[0171] In step 1001, after establishing the PIM FRR multicast table item of the multicast source, the multicast data of the multicast source is received through the main link and the backup link respectively.
[0172] In step 1002, if it is determined that the main link fails, the data forwarding plane is switched to the backup link to forward the multicast data received through the backup link outward, and the control plane switches the backup link to the new main link to update the PIM FRR multicast table item to the PIM multicast table item.
[0173] That is, when the main link fails, the switching is performed in parallel in the data forwarding plane and the control plane, instead of waiting for the switching in the control plane and then performing the switching in the data forwarding plane, so that the multicast data loss during switching can be shortened.
[0174] In specific implementation, the failure types of the main link include the following types:
[0175] The first type is that the main link locally has a logical link failure.
[0176] This type of failure can be detected by the control plane interface component, and when the data forwarding plane is switched to the backup link, the control plane interface component can be controlled to send the failure information of the logical link failure to the data forwarding plane multicast component, and then the data forwarding plane multicast component can be controlled to forward the multicast data received through the backup link outward after receiving the failure information.
[0177] The second type is that the main link locally has a physical link failure.
[0178] The fault can be detected by the chip, and when the data forwarding plane switches to the backup link, the chip can be controlled to send the fault information of the physical link fault to the data forwarding plane interface component, control the data forwarding plane interface component to perform port oscillation suppression processing to attempt to remove the physical link fault of the main link, and after determining that the suppression processing cannot remove the physical link fault of the main link, send the fault information of the physical link fault to the data forwarding plane multicast component. Then, the data forwarding plane multicast component forwards the multicast data received through the backup link to the outside after receiving the fault information.
[0179] Third, the main link has a remote link fault.
[0180] The fault can be detected by the control plane DLDP component, and when the data forwarding plane switches to the backup link, the control plane DLDP component can be controlled to send the fault information of the remote link fault to the data forwarding plane DLDP component, control the data forwarding plane DLDP component to send the fault information of the remote logical link fault to the data forwarding plane multicast component, and then control the data forwarding plane multicast component to forward the multicast data received through the backup link to the outside after receiving the fault information.
[0181] Among them, no matter which of the above fault conditions, the data forwarding plane multicast component can be controlled to forward the multicast data received through the backup link to the outside according to the following steps:
[0182] Switch the backup link from the corresponding non-forwarding first IPMC resource to the corresponding forwarding second IPMC resource, and switch the main link from the corresponding forwarding third IPMC resource to the corresponding non-forwarding first IPMC resource;
[0183] Submit the multicast data received through the backup link to the forwarding egress pointed to by the forwarding second IPMC resource to send the multicast data received through the backup link to the outside through the forwarding egress, and submit the multicast data received through the main link to the non-forwarding egress pointed to by the non-forwarding first IPMC resource to discard the multicast data received through the main link.
[0184] And after the data forwarding plane switches to the backup link, if it is determined that the original main link fault is recovered, the original main link can also be switched back.
[0185] Specifically, the original primary link is switched from the corresponding non- transitable first IPMC resource to the corresponding transitable third IPMC resource, the original backup link is switched from the corresponding transitable second IPMC resource to the corresponding non-transitable first IPMC resource, then the multicast data received through the original primary link is submitted to the transitable egress pointed by the transitable third IPMC resource to send the multicast data received through the original primary link to the outside through the transitable egress, and the multicast data received through the original backup link is submitted to the non-transitable egress pointed by the non-transitable first IPMC resource to discard the multicast data received through the original backup link.
[0186] In addition, it should be noted that when switching back to the original primary link, there are two links of primary and backup, and the PIM FRR multicast table item is re-established, the local detection and remote detection of the primary link are started, and the DLDP session is re-established in the control plane DLDP component.
[0187] In order to better perform remote detection, whenever the PIM FRR multicast table item is established (i.e. the primary link is updated), the detection parameters required by the control plane DLDP component when performing link detection can be automatically set based on the link information of the primary link in the current PIM FRR multicast table item. In this way, the detection parameters of the control plane DLDP component can change with the change of the primary link, and the flexibility of remote detection is improved.
[0188] Based on the same technical concept, the embodiment of the application also provides a multicast switching device, and the principle of the multicast switching device for solving the problem is similar to the above-mentioned multicast switching method, so the implementation of the multicast switching device can be referred to the implementation of the multicast switching method, and the repeated parts will not be described again.
[0189] Figure 11 A structural schematic diagram of a multicast switching device provided by the embodiment of the application includes a receiving module 1101 and a switching module 1102.
[0190] The receiving module 1101 is configured to receive multicast data of a multicast source through a primary link and a backup link respectively after a protocol-independent multicast fast reroute (PIM FRR) multicast table item of the multicast source is established.
[0191] The switching module 1102 is configured to switch to the backup link in a data forwarding plane to forward the multicast data received through the backup link to the outside, and switch the backup link to a new primary link in a control plane to update the PIM FRR multicast table item to a PIM multicast table item if it is determined that the primary link fails.
[0192] In some embodiments, the method further includes:
[0193] The fault processing module 1103 is configured to, after determining that the main link fails, when it is determined that the failure type of the main link is a physical link failure, perform port flapping suppression processing to attempt to remove the physical link failure of the main link.
[0194] The switching module 1102 is further configured to, if it is determined that the physical link failure of the main link is not removed, switch to the backup link at a data forwarding plane to forward multicast data received through the backup link outwards.
[0195] In some embodiments, the switching module 1102 is specifically configured to forward the multicast data received through the backup link outwards according to the following steps:
[0196] switching a first IPMC resource corresponding to the backup link and not being able to forward to a second IPMC resource being able to forward, and switching a third IPMC resource corresponding to the main link and being able to forward to the first IPMC resource not being able to forward;
[0197] submitting the multicast data received through the backup link to a forwarding egress pointed by the second IPMC resource being able to forward to send the multicast data received through the backup link outwards through the forwarding egress, and submitting the multicast data received through the main link to a non-forwarding egress pointed by the first IPMC resource not being able to forward to discard the multicast data received through the main link.
[0198] In some embodiments, the apparatus further includes a recovery module 1104 configured to:
[0199] after switching to the backup link at the data forwarding plane, if it is determined that the original main link failure is recovered, switching the first IPMC resource not being able to forward corresponding to the original main link to the third IPMC resource being able to forward, and switching the second IPMC resource being able to forward corresponding to the original backup link to the first IPMC resource not being able to forward;
[0200] submitting the multicast data received through the original main link to a forwarding egress pointed by the third IPMC resource being able to forward to send the multicast data received through the original main link outwards through the forwarding egress, and submitting the multicast data received through the original backup link to a non-forwarding egress pointed by the first IPMC resource not being able to forward to discard the multicast data received through the original backup link.
[0201] In some embodiments, whenever a PIM FRR multicast entry is established, based on link information of a main link in the PIM FRR multicast entry, a detection parameter required for performing a remote link failure detection is automatically set.
[0202] The division of the modules in the embodiments of the present application is illustrative, and is merely a logical function division. Actual implementation can have another division manner. In addition, each functional module in each embodiment of the present application can be integrated in one processor, or can be physically separated, or two or more modules can be integrated in one module. The coupling between each module can be realized through some interfaces. These interfaces are usually electrical communication interfaces, but can also be mechanical interfaces or other forms of interfaces. Therefore, the modules described as separate components can or can not be physically separated, and can be located in one place or distributed to different locations of the same or different devices. The integrated modules can be realized in the form of hardware or software functional modules.
[0203] After introducing the multicast switching method and device of the example embodiments of the present application, next, the electronic device according to another example embodiment of the present application is introduced.
[0204] The electronic device 130 implemented according to this embodiment of the present application is described below with reference to Figure 12 Figure 12 The display electronic device 130 is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.
[0205] As shown in Figure 12 , the electronic device 130 is shown in the form of a general electronic device. The components of the electronic device 130 can include, but are not limited to, the at least one processor 131, the at least one memory 132, and the bus 133 connecting different system components including the memory 132 and the processor 131.
[0206] The bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor or local bus using any of a variety of bus structures.
[0207] The memory 132 can include a readable medium in the form of volatile memory, such as a random access memory (RAM) 1321 and / or a cache memory 1322, and can further include a read-only memory (ROM) 1323.
[0208] The memory 132 can further include a program / utility 1325 having a set of program modules 1324, including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or a combination can include implementation of a network environment.
[0209] The electronic device 130 can also communicate with one or more external devices 134 such as a keyboard or pointing device, through an input / output (I / O) interface 135. And the electronic device 130 can communicate with one or more devices that enable user interaction with the electronic device 130, and / or one or more devices that enable communication of the electronic device 130 with one or more other electronic devices. This communication can be via the I / O interface 135. The electronic device 130 can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or the public networks, such as the Internet, through a network adapter 136. As depicted, the network adapter 136 is in communication with the other components of the electronic device 130 through the bus 133. It should be appreciated that other hardware and / or software modules can be used in conjunction with the electronic device 130, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0210] In an example embodiment, a storage medium is also provided, when a computer program in the storage medium is executed by a processor of an electronic device, the electronic device can perform the above-mentioned multicast switching method. Optionally, the storage medium can be a non-transitory computer readable storage medium, for example, the non-transitory computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0211] In an example embodiment, the electronic device of the present application can at least include at least one processor, and a memory connected with the at least one processor in communication, wherein the memory stores a computer program which can be executed by the at least one processor, and the computer program, when executed by the at least one processor, can make the at least one processor execute the steps of any multicast switching method provided by the embodiments of the present application.
[0212] In an example embodiment, a computer program product is also provided, when the computer program product is executed by an electronic device, the electronic device can implement any example method provided by the present application.
[0213] Moreover, a computer program product can employ any combination of one or more computer readable media or storage media. A computer readable medium can be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0214] The program product for multicast switching in the embodiments of the present application can employ a CD-ROM and include program codes, and can run on a computing device. However, the program product of the present application is not limited thereto, and in the present document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in conjunction with an instruction execution system, apparatus or device.
[0215] A readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, in which a readable program code is borne. Such a propagated data signal can take on many forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. A readable signal medium can also be any readable medium that can send, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device.
[0216] The program code contained in the readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, radio frequency (RF), and the like, or any suitable combination thereof.
[0217] Program code implementing the application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider. The application is not limited to a particular programming language. For instance, other programming languages that can be used include but are not limited to: Python, Ruby, Flash, and / or the like.
[0218] It should be noted that, although several units or sub-units of the apparatus are mentioned in the foregoing detailed description, such division into units or sub-units is merely exemplary and not mandatory. Indeed, according to an embodiment of the application, features and functions of two or more units described above can be embodied in one unit. Conversely, features and functions of one unit described above can be further divided into a plurality of units.
[0219] Moreover, while operations of the methods of the present application are described in a particular order in the figures, this is not required or implied in any way, and one can perform the operations in any order, or perform only some of the operations, or perform the operations in whole or in part concurrently, and still achieve desirable results.
[0220] Those skilled in the art will appreciate that embodiments of the present application can be devised for a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code.
[0221] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0222] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0223] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart block or blocks.
[0224] While the preferred embodiments of the application have been described, additional variations and modifications can be employed by those skilled in the art. Therefore, the appended claims intend to cover all such modifications and variations as fall within the true spirit and scope of the application.
[0225] It is apparent that a number of modifications and changes can be made to the present application without departing from the true spirit and scope of the application. Accordingly, all such modifications and changes are intended to be included within the scope of the application as set forth in the following claims and the equivalents thereof.
Claims
1. A method of multicast handover, the method comprising: The network device comprises: After establishing a protocol-independent multicast fast reroute (PIM FRR) multicast table item of a multicast source, the network device receives multicast data of the multicast source through a primary link and a backup link respectively; If it is determined that the primary link fails, the network device switches to the backup link in a data forwarding plane to forward the multicast data received through the backup link outward, and switches the backup link to a new primary link in a control plane to update the PIM FRR multicast table item to a PIM multicast table item; The forwarding of the multicast data received through the backup link outward comprises: Switching a first non-forwarding IPMC resource corresponding to the backup link to a second forwarding IPMC resource, and switching a third forwarding IPMC resource corresponding to the primary link to the first non-forwarding IPMC resource; The network device submits the multicast data received through the backup link to a forwarding egress pointed by the second forwarding IPMC resource to send the multicast data received through the backup link outward through the forwarding egress, and submits the multicast data received through the primary link to a non-forwarding egress pointed by the first non-forwarding IPMC resource to discard the multicast data received through the primary link.
2. The method of claim 1, wherein, After determining that the primary link fails, the network device further comprises: When it is determined that the failure type of the primary link is a physical link failure, the network device performs port oscillation suppression processing to attempt to remove the physical link failure of the primary link; If it is determined that the physical link failure of the primary link fails to be removed, the network device switches to the backup link in the data forwarding plane to forward the multicast data received through the backup link outward.
3. The method of claim 1, wherein, After switching to the backup link in the data forwarding plane, the network device further comprises: If it is determined that the original primary link recovers, the network device switches the first non-forwarding IPMC resource corresponding to the original primary link to the third forwarding IPMC resource, and switches the second forwarding IPMC resource corresponding to the original backup link to the first non-forwarding IPMC resource; The network device submits the multicast data received through the original primary link to a forwarding egress pointed by the third forwarding IPMC resource to send the multicast data received through the original primary link outward through the forwarding egress, and submits the multicast data received through the original backup link to a non-forwarding egress pointed by the first non-forwarding IPMC resource to discard the multicast data received through the original backup link.
4. The method according to any one of claims 1 to 3, characterized in that, Whenever the PIM FRR multicast table item is established, the network device automatically sets detection parameters required for remote link failure detection based on link information of a primary link in the PIM FRR multicast table item.
5. A multicast handover apparatus, characterized by comprising: The network device comprises: a receiving module configured to receive multicast data of a multicast source through a primary link and a backup link after establishing a protocol-independent multicast fast reroute (PIM FRR) multicast table item of the multicast source; The switching module is configured to, if it is determined that the primary link fails, switch to the backup link at a data forwarding plane, switch a first IPMC resource corresponding to the backup link, which is non-forwardable, to a second IPMC resource which is forwardable, switch a third IPMC resource corresponding to the primary link, which is forwardable, to the first IPMC resource which is non-forwardable, submit multicast data received through the backup link to a forwardable egress pointed to by the second IPMC resource, so as to send the multicast data received through the backup link to the outside through the forwardable egress, submit multicast data received through the primary link to a non-forwardable egress pointed to by the first IPMC resource, so as to discard the multicast data received through the primary link, and switch the backup link to a new primary link at a control plane, so as to update the PIM FRR multicast table item to a PIM multicast table item.
6. The apparatus of claim 5, wherein, Also comprising: The failure processing module is configured to, after it is determined that the primary link fails, perform port oscillation suppression processing to attempt to remove a physical link failure of the primary link when it is determined that the failure type of the primary link is a physical link failure. The switching module is further configured to, if it is determined that the physical link failure of the primary link fails to be removed, switch to the backup link at the data forwarding plane, so as to forward multicast data received through the backup link to the outside.
7. An electronic device, comprising: Comprising: At least one processor, and a memory connected in communication with the at least one processor, wherein: The memory stores a computer program which can be executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
8. A storage medium, characterized by When the computer program in the storage medium is executed by the processor of the electronic device, the electronic device can perform the method of any one of claims 1-4.
Citation Information
Patent Citations
Method for realizing master-slave switching of multicast routing on distributed system
CN105306356A
Multicast data processing method, device and equipment and machine readable storage medium
CN109981306A