Multicast traffic forwarding method, multicast system, routing device and storage medium
By identifying the DR router in the routing device and storing the PIM Join soft table, the problems of traffic interruption and excessively long switching time during multicast traffic switching are solved, enabling fast switching and efficient forwarding of multicast traffic and meeting the needs of high-quality communication.
Patent Information
- Application Number
- CN202310350872.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-04
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-04-04
AI Technical Summary
The existing PIM-DM and PIM-SM modes have problems such as traffic interruption, unsuccessful switching, or excessively long switching time when switching multicast traffic, which cannot meet the requirements of high-quality communication.
By identifying the DR router in the routing device, storing the PIM Join soft table, and switching the routing device to the new DR router during handover, the PIM Join soft table is used to quickly add multicast address and interface information, thereby enabling rapid switching and forwarding of multicast traffic.
It enables rapid switching of multicast traffic, with a switching time of less than 50ms, which greatly improves the switching efficiency of multicast traffic and ensures high-quality communication.
Smart Images

Figure CN116455807B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the multicast technology field, in particular to a multicast traffic forwarding method, a multicast system, a routing device and a storage medium. BACKGROUND
[0002] In actual network deployment, the phenomenon of link or communication device failure occurs frequently. In order to ensure basic communication requirements, a dual-link working mechanism is generally adopted, that is, when the main link fails, the traffic can be automatically switched to the backup link to ensure smooth communication. In order to ensure high-quality communication requirements, the traffic needs to be quickly switched during the main-backup switching, and the lower the packet loss rate, the better the communication quality. This is true for unicast traffic and also true for multicast traffic.
[0003] For multicast traffic forwarding, there are two traditional modes to choose from, PIM-DM mode (Protocol Independent Multicast-Dense Mode) and PIM-SM mode (Protocol Independent Multicast-Sparse Mode). The above two modes have the following defects: for PIM-DM mode, in the topo environment, using PIM-DM mode for multicast traffic switching, traffic may not be smooth, traffic switching may not be successful, or double traffic may occur, which does not meet the requirements of multicast traffic switching; for PIM-SM mode, after the uplink link fails, the DR (Designated Router) will be reselected between PIM protocols, and after the DR is reselected, the multicast traffic can also be smooth, but the performance of multicast traffic switching in this process does not meet the requirements. SUMMARY
[0004] Therefore, the purpose of the present application is to provide a multicast traffic forwarding method, a multicast system, a routing device and a storage medium to realize fast switching and forwarding of multicast traffic and provide a guarantee for high-quality communication.
[0005] In order to achieve the above purpose, the technical solutions adopted by the embodiments of the present application are as follows:
[0006] In a first aspect, the embodiments of the present application provide a multicast traffic forwarding method applied to each routing device in a multicast system, wherein the multicast system further comprises an RP router, and the RP router is in communication connection with each routing device.
[0007] The method comprises:
[0008] determining a DR router from each routing device based on a preset rule.
[0009] In response to the PIM Join message sent by the RP router, the multiple PIM Join soft tables contained in the PIM Join message are stored; wherein, the PIM Join message is obtained based on the registration instruction sent by the DR router to the RP router;
[0010] In response to the handover command sent by the DR router, another routing device among the routing devices is switched to the new DR router, and all other routing devices except the determined new DR router are switched to non-DR routers;
[0011] Iterate through all the PIM Join soft tables in the new DR router, and add multicast address information and interface information to the new DR router according to all the PIM Join soft tables, so that the new DR router forwards multicast traffic to the RP router according to the multicast address information and interface information.
[0012] In an optional implementation, each of the routing devices is equipped with an interconnection interface, and the step of determining the DR router from each of the routing devices based on preset rules includes:
[0013] Initialize each of the aforementioned routing devices;
[0014] Obtain the IP address of the interconnection interface corresponding to each of the routing devices;
[0015] The size of each IP address is determined, and the routing device corresponding to the largest IP address is identified as the DR router.
[0016] In an optional implementation, the switching instruction includes target DR router information, each of the routing devices pre-stores PIM hello messages to be sent, each of the PIM hello messages to be sent includes the initial priority of the router corresponding to each of the routing devices, and the initial priority of the routers corresponding to each of the routing devices is the same;
[0017] The step of switching one of the routing devices among the routing devices to a new DR router, and switching all the other routing devices besides the determined new DR router to non-DR routers, includes:
[0018] Based on the target DR router information, the corresponding routing device is switched to the new DR router;
[0019] The PIM hello message to be sent in the new DR router is updated to obtain the first PIM hello message to be sent;
[0020] Send the first PIM hello message to be sent to the routing device that is communicatively connected to the interconnection interface of the new DR router;
[0021] Switch all routing devices other than the new DR router to non-DR routers;
[0022] The PIM hello messages to be sent in each of the non-DR routers are updated to obtain the second PIM hello message to be sent corresponding to each of the non-DR routers;
[0023] Each of the second PIM hello messages to be sent is sent to the routing device that is communicatively connected to the interconnection interface of each of the non-DR routers.
[0024] In an optional implementation, the step of updating the PIM hello message to be sent in the new DR router includes:
[0025] Reassemble the PIM hello message to be sent in the new DR router to obtain the first PIM hello message to be processed corresponding to the new DR router;
[0026] Obtain the router priority from the first PIM hello message to be processed;
[0027] Update the router priority in the first PIM hello message to be processed so that the router priority in the updated first PIM hello message to be processed is greater than the initial router priority corresponding to the new DR router.
[0028] In an optional implementation, the step of updating the PIM hello messages to be sent in each of the non-DR routers includes:
[0029] The PIM hello messages to be sent in each of the non-DR routers are reassembled to obtain the second PIM hello message to be processed corresponding to each of the non-DR routers.
[0030] Obtain the router priority from each of the second PIM hello messages to be processed;
[0031] Update the router priority in each of the second PIM hello messages to be processed, so that the updated router priority in each of the second PIM hello messages to be processed is equal to the initial router priority corresponding to each of the non-DR routers.
[0032] In an optional implementation, after the step of updating the router priority in each of the second PIM hello messages to be processed, the method further includes:
[0033] Determine whether multicast address information and interface information exist in each of the non-DR routers;
[0034] If so, clear the multicast address information and interface information in each of the aforementioned non-DR routers.
[0035] In an optional implementation, the method further includes:
[0036] Upon receiving a PIM Prune message from the RP router, delete all PIM Join soft tables.
[0037] Secondly, embodiments of the present invention provide a multicast system, including multiple routing devices and an RP router, wherein the RP router is communicatively connected to each of the routing devices;
[0038] The RP router is used to send PIM Join messages to each of the routing devices, so that each of the routing devices stores multiple PIM Join soft tables in each of the PIM Join message packets.
[0039] Each of the routing devices is configured to implement the multicast traffic forwarding method provided in the first aspect embodiment and / or in combination with the possible implementation of the first aspect embodiment, so as to switch another routing device among the routing devices to a new DR router in response to a handover instruction sent by the DR router, and to enable the new DR router to forward multicast traffic to the RP router according to the multicast address information and interface information; wherein the multicast address information and interface information are obtained according to all the PIM Join soft tables in the new DR router.
[0040] Thirdly, embodiments of this application provide a routing device, including a memory and a processor;
[0041] The memory is used to store computer programs;
[0042] The processor is used to execute the computer program to implement the multicast traffic forwarding method provided as described in the first aspect embodiment and / or in combination with possible implementations of the first aspect embodiment.
[0043] Fourthly, embodiments of this application provide a computer-readable storage medium, wherein the computer program, when executed by a processor, implements the multicast traffic forwarding method provided by the embodiments of the first aspect described above and / or by possible implementations in conjunction with the embodiments of the first aspect described above.
[0044] The beneficial effects of the embodiments of the present invention include, for example:
[0045] This invention provides a multicast traffic forwarding method, multicast system, routing device, and storage medium. The method determines the DR router from each routing device according to preset rules. After responding to the PIM Join message sent by the RP router, it stores multiple PIM Join soft tables contained in the PIM Join message. When the DR router needs to switch, it switches another routing device among the routing devices to the new DR router. Finally, it traverses all PIM Join soft tables in the new DR router and adds multicast address information and interface information (i.e., (S, G) entries) to the new DR router based on all PIM Join soft tables, so that the new DR router can forward multicast traffic to the RP router according to the multicast address and interface information.
[0046] The above-mentioned multicast traffic forwarding method can quickly add the (S, G) table entries to the outgoing interface after a new DR router is determined and the PIM Join soft table stored locally on the new DR router when a link fails. This enables multicast traffic to be switched and forwarded quickly, with a switching rate of less than 50ms, which greatly improves the switching time of multicast traffic and ensures high-quality communication.
[0047] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0048] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 An exemplary structural block diagram of a conventional multicast traffic forwarding method provided by an embodiment of the present invention is shown;
[0050] Figure 2 This paper illustrates an exemplary structural block diagram of a multicast system and multicast traffic forwarding in a multicast system, provided by an embodiment of the present invention.
[0051] Figure 3 An exemplary structural block diagram of a routing device provided in an embodiment of the present invention is shown;
[0052] Figure 4 A flowchart illustrating a multicast traffic forwarding method provided by an embodiment of the present invention is shown;
[0053] Figure 5 This is a second schematic flowchart of a multicast traffic forwarding method provided by an embodiment of the present invention;
[0054] Figure 6 The third schematic flowchart of a multicast traffic forwarding method provided by an embodiment of the present invention is shown;
[0055] Figure 7 The fourth flowchart illustrates a multicast traffic forwarding method provided by an embodiment of the present invention.
[0056] Figure 8 This illustration shows a flowchart of a multicast traffic forwarding method provided by an embodiment of the present invention. Figure 5 ;
[0057] Figure 9 This illustration shows a flowchart of a multicast traffic forwarding method provided by an embodiment of the present invention. Figure 6 ;
[0058] Figure 10 This illustration shows a flowchart of a multicast traffic forwarding method provided by an embodiment of the present invention. Figure 7 .
[0059] Icons: 100 - Multicast system; 110 - Routing device; 1101 - Memory; 1102 - Processor; 1103 - Communication interface; 120 - RP router. Detailed Implementation
[0060] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0061] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0062] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0063] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.
[0064] In actual network deployments, occasional failures such as link or communication equipment failures are frequently encountered. To ensure basic communication needs, a dual-link working mechanism is generally adopted. That is, when the primary link fails, traffic can automatically switch to the backup link to ensure uninterrupted communication. To guarantee high-quality communication, traffic needs to switch rapidly during primary / backup switching. The lower the packet loss rate, the better the communication quality. This applies to both unicast and multicast traffic.
[0065] For forwarding multicast traffic, there are two traditional modes to choose from: PIM-DM (ProtocolIndependent Multicast-Dense Mode) and PIM-SM (ProtocolIndependent Multicast-Sparse Mode).
[0066] In PIM-DM mode, PIM-DM uses a "push" mode to forward multicast packets. PIM-DM propagates multicast packets from the multicast source to all PIM routers in the network and then prunes branches that do not have group members. PIM-DM builds and maintains a unidirectional acyclic SPT (shortest path tree) connecting the multicast source and group members by periodically performing "flooding-pruning".
[0067] In PIM-SM mode, PIM-SM is a sparse multicast routing protocol that uses "pull mode" to transmit multicast data. It constructs the RPT (aggregation tree) through RP discovery, DR election, DR sending registration messages, and RP returning PIM Join messages, thereby enabling the forwarding of multicast traffic.
[0068] For multicast traffic switching, two requirements must be met: one is to avoid multiple streams, and the other is to achieve fast switching with a low packet loss rate. See below. Figure 1 An exemplary block diagram of a traditional multicast traffic forwarding architecture is provided for illustration. This multicast traffic forwarding process is configured to occur in a topo environment, with routing devices SW1, SW2, SW3, and SW4. If the multicast uplink traffic flows from SW1 to SW4, SW1 is the master at this point. Due to some kind of handover, SW2 becomes the master, and the multicast traffic needs to switch from SW1 to SW4 to SW1->SW2->SW4. If SW3 becomes the master, the multicast traffic becomes SW1->SW2->SW3->SW4. Regardless of the handover, SW4's port 10 (i.e., ...) remains the master. Figure 1 The traffic coming out of Port 10 of SW4 must not be multiple streams and the interruption time must be very short.
[0069] For example, if PIM-DM mode is used for multicast traffic switching in a topo environment, then based on Figure 1 An exemplary structural diagram of traditional multicast traffic forwarding is shown below. This step can be described as follows: If a multicast data stream is sent to SW1, and a report is sent to SW4, the group table entry (i.e., ...) is learned. Figure 1 (As shown by the solid arrow in the diagram), SW1 to SW3 will all learn the (S, G) entries and become neighbors with each other. They will all add an outgoing interface VLAN 3. However, after traffic reaches SW4, multicast data floods on VLAN 3. Simultaneously, the outgoing interfaces of SW1 to SW3 receive the same multicast data stream. In this situation, SW1 to SW3 send assertions to each other to determine an outgoing interface. Under these circumstances, the multicast data stream can be sent to SW4 (only one stream). However, if a switchover occurs, it cannot be guaranteed that traffic will exit from the new master device because PIM-DM only selects the outgoing interface through assertions. In this case, the assertion result will still be the original device, and no traffic will exit from the new master.
[0070] If a report is sent to SW1, the group table entry is learned; if a multicast data stream is sent to SW4, (i.e., ...) Figure 1As shown by the dashed arrow in the diagram), SW1 to SW3 will all learn the group entry (SW1 to SW3 send PIM hello messages to each other, and the connected interfaces will dynamically learn the mrouter interface; SW1's report messages are forwarded from the mrouter interface to other devices, and SW2 to SW3 will also learn the group entry). According to the PIM-DM "push" mode, the multicast data stream sent by SW4 will arrive at SW1 to SW3, and each will have an (S, G) entry. The ingress interface is VLAN 3. Since SW1 to SW3 all have group entries, these devices will all add an outgress interface VLAN 2. Therefore, at this time, SW1's port 10 (i.e., ...) will be... Figure 1 Port 10 of SW1 will receive three messages, resulting in multiple flows.
[0071] Furthermore, if the report messages on SW1 are stopped and the group entries on SW2 and SW3 are deleted, according to the pruning principle of PIM-DM, SW2 and SW3 will send pruning messages to SW4 to notify it to delete the outgoing interface. Since there is only one outgoing interface VLAN 3 in SW4, the VLAN 3 outgoing interface in SW4 will be deleted. The (S, G) entries seen on SW4 will no longer have an outgoing interface, which will result in a traffic interruption problem.
[0072] Therefore, the above method of using PIM-DM mode to switch multicast traffic in the topo environment will have problems such as traffic interruption, unsuccessful traffic switching, and the occurrence of dual streams, which does not meet the requirements of multicast traffic switching.
[0073] For example, if PIM-SM mode is used for multicast traffic switching in a topo environment, it is still based on Figure 1 An exemplary structural diagram of traditional multicast traffic forwarding is shown below. This step can be described as follows: If a multicast data stream is sent on SW1, and a report is sent on SW4, the group table entry (i.e., ...) is learned. Figure 1 (As shown by the solid arrow in the image), at this time, SW1 to SW3 will all learn the (S, G) entries, but not all devices have outgoing interfaces for their entries. Due to the DR mechanism in PIM-SM, SW1 to SW3 will send PIM hello messages to each other to select a DR. The DR will encapsulate the register and register with the upstream SW4. After receiving the register, the upstream SW4 will send back a PIM Join message, and the DR will add an outgoing interface. Other devices only have (S, G) entries and no outgoing interfaces, ensuring that only one flow can pass and there will be no multiple flows.
[0074] Furthermore, if SW1 sends a report, learns the group table entry, and SW4 sends a multicast data stream (i.e., Figure 1As shown by the dashed arrow in the image, its principle is similar to the entire process described above, where SW1 sends a multicast data stream, SW4 sends a report, and learns group table entries. That is, SW1 to SW3 will send PIM hello to each other to select a DR, and the DR will add an outgoing interface based on the returned PIM Join message.
[0075] Therefore, the PIM-SM mode used for multicast traffic switching in the aforementioned topo environment, while allowing multicast traffic to continue after a DR reselection following an uplink failure, suffers from performance issues. This is because the DR reselection process relies on the priority of hello packets and the size of neighbor addresses, and the sending and receiving of PIM hello packets involves time intervals, resulting in an excessively long multicast traffic switching time. Consequently, this method for multicast traffic switching and forwarding fails to meet performance standards. Therefore, a method must be developed to achieve rapid multicast traffic switching and forwarding to ensure high-quality communication.
[0076] Based on this, embodiments of the present invention provide a multicast traffic forwarding method to solve the above problems.
[0077] Please see Figure 2 , Figure 2 This diagram illustrates an exemplary structural block diagram of a multicast system 100 and multicast traffic forwarding within the multicast system 100, as provided in an embodiment of the present invention. Figure 2 As shown, the multicast system 100 includes multiple routing devices 110 (i.e., Figure 2 SW1 to SW3) and RP router 120 (i.e., Figure 2 (SW4 in the text) The RP router 120 is communicatively connected to each of the routing devices 110.
[0078] The RP router 120 is used to send PIM Join messages to each routing device 110 so that each routing device 110 stores multiple PIM Join soft tables in the PIM Join message packet.
[0079] It should be noted that before the RP router 120 sends the PIM Join message to each routing device 110, it needs to determine the DR router among the routing devices 110, and the DR router needs to send a register to the RP router 120. Only after the RP router 120 receives the register can it send the PIM Join message to each routing device 110.
[0080] Therefore, each routing device 110 is used to determine the DR router by preset rules (e.g., based on the priority of each routing device and the IP address of the interconnection interface of each routing device). If the entire process of multicast traffic forwarding is set to be performed in the topo environment, then when one of the routing devices 110 is determined to be the master based on the preset rules, that routing device is the DR router.
[0081] For example, if SW1 is configured as the DR router, it sends a register to the RP router 120. After receiving the register, the RP router 120 will send a PIM Join message. SW1, SW2, and SW3 will all receive this PIM Join message. Since SW1 is the DR router, its (S, G) table entry has an outgoing interface, while SW2 and SW3 only have (S, G) table entries and no outgoing interface. Therefore, multicast traffic forwarding will ultimately proceed according to SW1->SW4.
[0082] In this embodiment of the invention, when the master link fails, each routing device 110 is also used to respond to the switching instruction sent by the DR router, switch another routing device in each routing device 110 to the new DR router, and make the new DR router forward multicast traffic to the RP router 120 according to the multicast address information and interface information (i.e., (S, G) table entries). The multicast address information and interface information can be obtained from the PIM Join soft table stored in the new DR router.
[0083] Based on the multicast system 100 described above, this embodiment of the invention also provides a routing device 110. Please refer to [link to relevant documentation]. Figure 3 , Figure 3 An exemplary structural block diagram of a routing device 110 provided in an embodiment of the present invention is shown, as follows: Figure 1 As shown, the routing device 110 includes a memory 1101, a processor 1102, and a communication interface 1103. The memory 1101, processor 1102, and communication interface 1103 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0084] The memory 1101 can be used to store software programs and modules. The processor 1102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 1101. The communication interface 1103 can be used to communicate with other node devices for signaling or data.
[0085] The memory 1101 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0086] The processor 1102 can be an integrated circuit chip with signal processing capabilities. The processor 1102 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0087] The following description uses the routing devices 110 in the multicast system 100 as the execution entities to illustrate a multicast traffic forwarding method provided in this embodiment of the invention. Please refer to [link / reference]. Figure 4 , Figure 4 The diagram shows a flowchart of a multicast traffic forwarding method provided by an embodiment of the present invention.
[0088] like Figure 4 As shown, the multicast traffic forwarding method described above is applied to each routing device 110 in the multicast system 100. The multicast system 100 also includes an RP router 120, which is communicatively connected to each routing device 110. The multicast traffic forwarding method described above may include the following steps:
[0089] S210 determines the DR router from each routing device based on preset rules.
[0090] S220, in response to the PIM Join message sent by the RP router, stores the multiple PIMJoin soft tables contained in the PIM Join message.
[0091] The PIM Join message is obtained based on the registration command sent by the DR router to the RP router.
[0092] S230, in response to the handover command sent by the DR router, switches one of the routing devices in each routing device to the new DR router, and switches all other routing devices except the determined new DR router to non-DR routers.
[0093] S240: Traverse all PIM Join soft tables in the new DR router, and add multicast address information and interface information to the new DR router according to all PIM Join soft tables, so that the new DR router forwards multicast traffic to the RP router according to the multicast address information and interface information.
[0094] The above steps enable the pre-storage of multiple PIM Join soft tables contained in the PIM Join message. When it is necessary to switch DR routers, the multicast address information and interface information are directly added to the new DR router based on the information in the stored PIM Join soft tables, thereby enabling rapid switching of multicast traffic and ensuring smooth multicast traffic forwarding.
[0095] Specifically, step S210 is the process of determining the DR router from each routing device based on preset rules, so that the DR router can send a register to the RP router to further receive the PIM Join message sent by the RP router.
[0096] In this embodiment of the invention, the above-mentioned preset rule can be to determine the DR router based on the priority of each routing device and the IP address of the interconnection interface of each routing device.
[0097] For example, based on the topo environment mentioned above, and Figure 2 The exemplary block diagram of multicast traffic forwarding in the provided multicast system 100 illustrates the process of determining the DR router:
[0098] In each routing device (e.g., Figure 2After SW1, SW2, and SW3 are initialized, they will send PIM hello messages to each other through their VLAN 2 interconnect interfaces. Since each routing device's PIM hello message carries its priority and the IP address of its interconnect interface, the DR router can be determined by comparing the priorities. Since SW1, SW2, and SW3 are now initialized, the priority in their PIM hello messages is DR_PRIORITY_1. To select the DR router for VLAN 2, the IP addresses of the VLAN 2 interconnect interfaces of each routing device must be compared, and the routing device with the highest IP address is identified as the DR router.
[0099] After determining the DR router from each routing device based on preset rules, step S220 is executed, and in response to the PIM Join message sent by the RP router, the multiple PIM Join soft tables contained in the PIM Join message are stored.
[0100] For example, based on the topo environment mentioned above, and Figure 2 The provided multicast system 100 provides an exemplary structural block diagram of multicast traffic forwarding. If the DR router determined in step S210 is set to SW1, then SW1 will send a register to the RP router. After receiving the register, the RP router will send a PIM Join message to each routing device (e.g., ...). Figure 2 SW1, SW2, and SW3 in the PIM Join message refer to the multiple PIM Join soft tables contained in the PIM Join message that each routing device stores on its own device after responding to the PIM Join message sent by the RP router.
[0101] It should be noted that the PIM Join soft table can store multiple entries without resource limitations, and both DR routers and non-DR routers store the PIM Join information. When each routing device receives a PIM Prune message, it will delete the PIM Join soft table, retaining only the latest PIM Join state.
[0102] After storing the multiple PIM Join soft tables contained in the PIM Join message in step S220, proceed to step S230.
[0103] In step S230, when the link of the DR router determined in step S210 fails, the DR router sends a handover command to the other routing devices. After each of the other routing devices responds to the handover command sent by the DR router, one of the routing devices is switched to become the new DR router. At the same time, all other routing devices except the new DR router, regardless of whether they were previously DR routers, are set to non-DR routers. The above process can be implemented through the PIM-SM module of each routing device.
[0104] For example, based on the topo environment described above, and Figure 2 An exemplary structural block diagram of multicast traffic forwarding in the provided multicast system 100 shows that if the DR router determined in step S210 is SW1, when the link of SW1 fails and SW2 is selected as the new DR router, SW1 will transmit a message that SW2 is the new DR router to the PIM-SM module of SW2.
[0105] Furthermore, upon receiving the aforementioned message, the PIM-SM module of SW2 immediately sets this routing device as the new DR router, reassembles the PIM hello message to be sent, increases the priority of the reassembled PIM hello message (i.e., makes its corresponding priority greater than the initial priority DR_PRIORITY_1), and immediately sends it to the routing device connected via the interconnect interface.
[0106] At the same time, the aforementioned message containing the information that SW2 is the new DR router will be transmitted to other routing devices (e.g., Figure 2 When the PIM-SM module of SW3 receives the above message, it immediately sets the routing device as a non-DR router, reassembles the PIM hello message to be sent, sets the priority of the reassembled PIM hello message to the initial priority DR_PRIORITY_1 (that is, makes its corresponding priority equal to the initial priority DR_PRIORITY_1), and immediately sends it to the routing device connected through the interconnection interface.
[0107] After step S230 switches another routing device among the routing devices to the new DR router and switches all other routing devices except the determined new DR router to non-DR routers, step S240 is then executed.
[0108] In step S240, since the new DR router and non-DR routers have been determined, all PIM Join soft tables in the new DR router can be traversed. Using all PIM Join soft tables, (S, G) entries for the outgoing interface are added (i.e., multicast address information and interface information are added to the new DR router), so that the new DR router forwards multicast traffic to the RP router based on the multicast address information and interface information. At this time, the PIM Join soft tables are not deleted; the deletion operation is only performed after a PIM Prune message is received.
[0109] At the same time, non-DR routers will clear their existing (S, G) entries (for example, since SW1 is determined to be a DR router in step S210 and has an (S, G) entry, it needs to clear the (S, G) entry), and non-DR routers do not need to traverse all of their stored PIM Join soft tables.
[0110] Based on the above settings, before the DR router switchover, since SW1, SW2, and SW3 can all receive PIM Join messages and store all PIM Join soft tables on their respective routing devices, once the DR router switchover occurs, they can directly use the information in their local PIM Join soft tables to add the outgoing interface of the (S, G) table entries. The new DR router does not need to register by sending a register message. Instead, it uses the PIM Join message information returned by the RP router to add the outgoing interface of the (S, G) table entries, saving time in the entire process.
[0111] This invention provides a multicast traffic forwarding method that determines the DR router from each routing device according to preset rules. After responding to the PIM Join message sent by the RP router, it stores multiple PIM Join soft tables contained in the PIM Join message. When the DR router needs to switch, it switches another routing device among the routing devices to the new DR router. Finally, it traverses all PIM Join soft tables in the new DR router and adds multicast address information and interface information (i.e., (S, G) entries) to the new DR router according to all PIM Join soft tables, so that the new DR router can forward multicast traffic to the RP router according to the multicast address information and interface information.
[0112] The above-mentioned multicast traffic forwarding method can quickly add the (S, G) table entries to the outgoing interface after a new DR router is determined and the PIM Join soft table stored locally on the new DR router when a link fails. This enables multicast traffic to be switched and forwarded quickly, with a switching rate of less than 50ms, which greatly improves the switching time of multicast traffic and ensures high-quality communication.
[0113] Optionally, the specific process of determining the DR router from each routing device based on preset rules in step S210 can be implemented through the following steps:
[0114] exist Figure 4 Based on this, please refer to Figure 5 , Figure 5 This illustrates the second flowchart of the multicast traffic forwarding method provided in this embodiment of the invention. Step S210, which involves determining the DR router from each routing device based on preset rules, includes:
[0115] S211, Initialize each routing device.
[0116] S212, obtain the IP address of the corresponding interconnection interface of each routing device.
[0117] S213, determine the size of each IP address, and identify the routing device corresponding to the largest IP address as the DR router.
[0118] The above steps enable the process of determining the DR router based on the IP address of the corresponding interconnect interface of each routing device after initializing each routing device.
[0119] For example, based on the topo environment described above, and Figure 2 The provided exemplary block diagram of multicast traffic forwarding in the multicast system 100 shows that after SW1, SW2, and SW3 are initialized, the priority in the PIM hello message is DR_PRIORITY_1, meaning that SW1, SW2, and SW3 have the same priority. At this point, it is necessary to compare the IP addresses of the VLAN 2 interconnection interfaces in each routing device and determine the routing device with the largest IP address as the DR router.
[0120] For example, if the IP address of the VLAN 2 interconnection interface in SW1 is the largest, then SW1 will be identified as the DR router. This logic is inherent in the PIM-SM protocol itself.
[0121] Optionally, since the handover command sent by the DR router contains information about the target DR router, and each routing device pre-stores PIM hello messages to be sent, in the process of determining the new DR router and non-DR routers, it is also necessary to reassemble the PIM hello messages to be sent and update the priority information of each routing device contained in the reassembled PIM hello messages. The above process can be implemented through the following steps:
[0122] exist Figure 5 Based on this, please refer to Figure 6 , Figure 6The third flowchart of a multicast traffic forwarding method provided by an embodiment of the present invention is shown. The switching instruction includes target DR router information. Each routing device has pre-stored PIMhello messages to be sent. Each PIMhello message to be sent contains the initial priority of the router corresponding to each routing device. The initial priority of the routers corresponding to each routing device is the same.
[0123] Step S230 involves switching one routing device among the routing devices to the new DR router, and switching all other routing devices except the newly determined DR router to non-DR routers. This includes:
[0124] S231, based on the target DR router information, switch the corresponding routing device to the new DR router.
[0125] S232 updates the PIM hello message to be sent in the new DR router to obtain the first PIM hello message to be sent.
[0126] S233, send the first PIM hello message to the routing device that is connected to the interconnection interface of the new DR router.
[0127] S234 switches all routing devices except the new DR router to non-DR routers.
[0128] S235, update the PIM hello messages to be sent in each non-DR router to obtain the second PIM hello message to be sent for each non-DR router.
[0129] S236, send each second PIM hello message to the routing device that is connected to the interconnection interface of each non-DR router.
[0130] The above steps identify the new DR router and non-DR routers, and update and send the corresponding PIM hello messages for the new DR router and non-DR routers.
[0131] Optionally, the process of updating the PIM hello message to be sent in the new DR router in step S232 can be implemented through the following steps:
[0132] exist Figure 6 Based on this, please refer to Figure 7 , Figure 7 This illustrates the fourth step of the multicast traffic forwarding method provided in this embodiment of the invention. Step S232, which involves updating the PIM hello message to be sent in the new DR router, includes:
[0133] S2321, Reassemble the PIM hello message to be sent in the new DR router to obtain the first PIM hello message to be processed corresponding to the new DR router.
[0134] S2322, obtain the router priority from the first pending PIM hello message.
[0135] S2323, Update the router priority in the first pending PIM hello message so that the router priority in the updated first pending PIM hello message is greater than the initial router priority corresponding to the new DR router.
[0136] The above steps realize the process of reassembling the PIM hello message to be sent corresponding to the new DR router, and updating the priority information of the routing device contained in the reassembled PIM hello message to be sent.
[0137] Optionally, the process of updating the PIM hello messages to be sent in each non-DR router in step S235 can be implemented through the following steps:
[0138] exist Figure 6 Based on this, please refer to Figure 8 , Figure 8 The fifth step of the multicast traffic forwarding method provided in this embodiment of the invention is illustrated. Step S235, which involves updating the PIM hello messages to be sent in each non-DR router, includes:
[0139] S2351, reassemble the PIM hello messages to be sent in each non-DR router to obtain the second PIM hello message to be processed for each non-DR router.
[0140] S2352, obtain the router priority in each second PIM hello message to be processed.
[0141] S2353, update the router priority in each second pending PIM hello message so that the router priority in each updated second pending PIM hello message is equal to the initial priority of the router corresponding to each non-DR router.
[0142] The above steps realize the process of reassembling the PIM hello messages to be sent corresponding to each non-DR router, and updating the priority information of each routing device contained in the reassembled PIM hello messages to be sent.
[0143] For example, based on the topo environment described above, and Figure 2The provided exemplary structural block diagram of multicast traffic forwarding in the multicast system 100, if the DR router determined in step S210 is set as SW1, and when the link of SW1 fails and SW2 is selected as the new DR router, the specific process of determining the new DR router and the non-DR router in combination with the above steps can be described as follows:
[0144] If SW2 is selected as the new DR router, SW1 will send a message to SW2's PIM-SM module indicating that SW2 is the new DR router (i.e., the handover instruction contains the target DR router information).
[0145] Furthermore, upon receiving the aforementioned message, the PIM-SM module of SW2 immediately sets this routing device as the new DR router, reassembles the PIM hello message to be sent, increases the priority of the reassembled PIM hello message (i.e., makes its corresponding priority greater than the initial router priority DR_PRIORITY_1 during initialization), and immediately sends the reassembled PIM hello message with updated priority information to the routing device that communicates with SW2 through the interconnection interface.
[0146] At the same time, the aforementioned message containing the information that SW2 is the new DR router will be transmitted to other routing devices (e.g., Figure 2 When the PIM-SM module of SW3 receives the above message, it immediately sets the routing device as a non-DR router, reassembles the PIM hello message to be sent, and sets the priority of the reassembled PIM hello message to the initial priority DR_PRIORITY_1 (that is, makes its corresponding priority equal to the router's initial priority DR_PRIORITY_1 at the time of initialization). Then, it immediately sends the reassembled PIM hello message with updated priority information to the routing device that communicates with SW3 through the interconnection interface.
[0147] It should be noted that after the new DR router is confirmed, based on the priority of the PIM hello message, since the above steps increase the priority of the new DR router's PIM hello messages to be sent, the new DR router will be selected as the DR router in subsequent multicast traffic forwarding processes until the next DR router switchover.
[0148] Optionally, after updating the router priority in each of the second PIM hello messages to be processed in step S2353, it is also necessary to clear the (S, G) entries existing in each of the non-DR routers. This process can be implemented through the following steps:
[0149] exist Figure 8 Based on this, please refer to Figure 9 , Figure 9 This is a flowchart illustrating a multicast traffic forwarding method according to an embodiment of the present invention. After step S2353, which involves updating the router priority in each second PIM hello message to be processed, the multicast traffic forwarding method further includes:
[0150] S2354 determines whether multicast address and interface information exists in each non-DR router.
[0151] S2355, if so, clear the multicast address and interface information in each non-DR router.
[0152] If not, return to step S2354.
[0153] The above steps implement the process of clearing the (S, G) entries that exist in each of the identified non-DR routers.
[0154] Optionally, when each routing device's port receives a PIM Prune message sent by the RP router, it will delete the corresponding PIM Join soft table, retaining only the latest PIM Join state. This process can be achieved through the following steps:
[0155] exist Figure 4 Based on this, please refer to Figure 10 , Figure 10 This is illustrated in the seventh flowchart of a multicast traffic forwarding method provided by an embodiment of the present invention. The multicast traffic forwarding method further includes:
[0156] S250, upon receiving a PIM Prune message from the RP router, deletes all PIM Join soft tables.
[0157] The above steps enable each routing device to delete all corresponding PIM Join soft tables upon receiving a PIM Prune message from the RP router.
[0158] It should be noted that during step 240, when traversing the PIM Join soft table in the new DR router and adding multicast address information and interface information to the new DR router according to the PIM Join soft table, the PIM Join soft table of each routing device is not deleted. The soft table deletion operation is only performed after receiving the PIM Prune message.
[0159] Based on the same inventive concept, embodiments of the present invention also provide a multicast system 100, such as... Figure 2As shown, the multicast system 100 includes multiple routing devices 110 and RP routers 120, with the RP routers 120 communicatively connected to each of the routing devices 110.
[0160] The RP router 120 is used to send PIM Join messages to each routing device 110, so that each routing device 110 stores multiple PIM Join soft tables in each PIM Join message packet.
[0161] Each routing device 110 is used to implement the multicast traffic forwarding method provided in the above embodiments and / or in combination with possible implementations of the above embodiments, so as to switch another routing device in each routing device 110 to a new DR router after responding to a switching instruction sent by the DR router, and to make the new DR router forward multicast traffic to the RP router 120 according to the multicast address information and interface information.
[0162] The multicast address and interface information is obtained from all PIM Join soft tables in the new DR router.
[0163] Based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium storing a computer program thereon, which, when executed by processor 1102, implements the multicast traffic forwarding method provided in the above embodiments.
[0164] The steps executed by the aforementioned computer program during runtime will not be described in detail here, but can be found in the explanation of the multicast traffic forwarding method above.
[0165] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can also be implemented in other ways. The system embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0166] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0167] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0168] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A multicast traffic forwarding method, characterized in that, The routing devices are applied in the multicast system, which also includes an RP router, and the RP router is communicatively connected to each of the routing devices. The method includes: Based on preset rules, the DR router is determined from each of the routing devices, including: Initialize each of the aforementioned routing devices; Obtain the IP address of the interconnection interface corresponding to each of the aforementioned routing devices; Determine the size of each IP address and identify the routing device corresponding to the largest IP address as the DR router. In response to the PIM Join message sent by the RP router, the multiple PIM Join soft tables contained in the PIM Join message are stored; wherein, the PIM Join message is obtained based on the registration instruction sent by the DR router to the RP router; In response to a handover command sent by the DR router, one of the routing devices is switched to the new DR router, and all other routing devices except the determined new DR router are switched to non-DR routers. The handover command includes target DR router information. Each routing device has pre-stored PIM hello messages to be sent, and each PIM hello message to be sent contains the initial router priority corresponding to each routing device. The initial router priorities corresponding to each routing device are the same. The step of switching the other routing device to the new DR router and switching all other routing devices except the determined new DR router to non-DR routers includes: Based on the target DR router information, the corresponding routing device is switched to the new DR router; The PIM hello message to be sent in the new DR router is updated to obtain the first PIM hello message to be sent; Send the first PIM hello message to be sent to the routing device that is communicatively connected to the interconnection interface of the new DR router; Switch all routing devices other than the new DR router to non-DR routers; The PIM hello messages to be sent in each of the non-DR routers are updated to obtain the second PIM hello message to be sent corresponding to each of the non-DR routers; Send each of the second PIM hello messages to be sent to the routing device that is communicatively connected to the interconnection interface of each of the non-DR routers; Iterate through all the PIM Join soft tables in the new DR router, and add multicast address information and interface information to the new DR router according to all the PIM Join soft tables, so that the new DR router forwards multicast traffic to the RP router according to the multicast address information and interface information.
2. The multicast traffic forwarding method according to claim 1, characterized in that, The step of updating the PIM hello message to be sent in the new DR router includes: Reassemble the PIM hello message to be sent in the new DR router to obtain the first PIM hello message to be processed corresponding to the new DR router; Obtain the router priority from the first PIM hello message to be processed; Update the router priority in the first PIM hello message to be processed so that the router priority in the updated first PIM hello message to be processed is greater than the initial router priority corresponding to the new DR router.
3. The multicast traffic forwarding method according to claim 1, characterized in that, The step of updating the PIM hello messages to be sent in each of the non-DR routers includes: The PIM hello messages to be sent in each of the non-DR routers are reassembled to obtain the second PIM hello message to be processed corresponding to each of the non-DR routers. Obtain the router priority from each of the second PIM hello messages to be processed; Update the router priority in each of the second PIM hello messages to be processed, so that the updated router priority in each of the second PIM hello messages to be processed is equal to the initial router priority corresponding to each of the non-DR routers.
4. The multicast traffic forwarding method according to claim 3, characterized in that, After the step of updating the router priority in each of the second PIM hello messages to be processed, the method further includes: Determine whether multicast address information and interface information exist in each of the non-DR routers; If so, clear the multicast address information and interface information in each of the aforementioned non-DR routers.
5. The multicast traffic forwarding method according to claim 1, characterized in that, The method further includes: Upon receiving a PIM Prune message from the RP router, delete all PIM Join soft tables.
6. A multicast system, characterized in that, It includes multiple routing devices and an RP router, wherein the RP router is communicatively connected to each of the routing devices; The RP router is used to send PIM Join messages to each of the routing devices, so that each of the routing devices stores multiple PIM Join soft tables in each of the PIM Join message packets. Each of the routing devices is configured to execute the multicast traffic forwarding method as described in any one of claims 1-5, to switch another routing device among the routing devices to a new DR router in response to a handover instruction sent by the DR router, and to enable the new DR router to forward multicast traffic to the RP router according to the multicast address information and interface information; wherein the multicast address information and interface information are obtained from all the PIMJoin soft tables in the new DR router.
7. A routing device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is used to execute the computer program to implement the multicast traffic forwarding method as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the multicast traffic forwarding method as described in any one of claims 1-5.
Citation Information
Patent Citations
Multicast switching method and device and machine readable memory medium
CN107547367A