Method and equipment for realizing fair forwarding of multicast data message
By generating and adjusting the replication list of the multicast router, the problem of uneven delay of multicast data packets on different interfaces is solved, and fair forwarding of multicast data is achieved, ensuring that different receivers can receive data with the lowest delay in different cycles.
Patent Information
- Application Number
- CN202510898962.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-09-16
AI Technical Summary
In a PIM-DM domain, in the multicast replication list of a multicast router, the multicast data packets sent by the Layer 3 interface of the head node have a low latency, while those sent by the tail node have a high latency, resulting in unfair multicast data packet transmission.
Generate a primary replication list containing all outbound interfaces of the multicast group, move its first outbound interface to the end of the backup replication list, move the remaining outbound interfaces forward one position in the backup replication list, start the replication list switching timer, and forward multicast data packets through the primary replication list.
Different receivers of the same multicast group have equal opportunities to receive multicast data in different cycles, thus achieving fair multicast and ensuring fair forwarding of multicast data.
Smart Images

Figure CN120658676A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to communication technology, and more specifically to a method and device for achieving fair forwarding of multicast data messages. Background Art
[0002] The Internet Group Management Protocol (IGMP) is used to establish and maintain multicast group memberships between hosts and their directly adjacent multicast routers. A multicast router, acting as a receiver-side DR (Designated Router), generates (*, G) or (S, G) multicast routing table entries based on IGMP MembershipReport requests from hosts.
[0003] PIM (Protocol Independent Multicast) runs between multicast routers within a PIM domain. Taking a PIM-SM domain as an example, a receiver-side DR sends a PIM Join message to the multicast group's Rendezvous Point (RP). The multicast routers traversed from the receiver-side DR to the RP form an RPT (Shared Tree), generating (*, G) entries. Multicast data packets from the multicast source are encapsulated as PIM Register messages and sent to the RP. Upon receiving the first multicast packet, the RP sends a (S, G) PIM Join message toward the multicast source. The multicast router that forwards the PIM Join message to the multicast source creates an (S, G) entry, establishing an SPT branch. After receiving the first multicast packet from a multicast group, the receiver-side DR generates an (S, G) multicast routing table entry, initiates an SPT switch, and sends a (S, G) PIM Join message toward the multicast source. Multicast routers along the way that forward the PIM Join message generate (S, G) entries. The RP then sends a PIM Prune message to switch the RPT to the SPT. In this way, the multicast routers and receiver-side DRs in the SPT tree generate (S, G) multicast routing table entries, enabling multicast data packets to be replicated and forwarded using a multicast replication chain. However, within the multicast replication chain of the (S, G) multicast routing table entry, the latency of multicast data packets sent from the Layer 3 interface of the head node is relatively low, while the latency of multicast data packets sent from the Layer 3 interfaces of nodes further down the replication chain, particularly the tail node, is relatively high. Multicast data packets sent from the Layer 3 interfaces of the multicast replication chain of multicast routing table entries within a PIM-DM domain also experience varying latency. Summary of the Invention
[0004] The purpose of the present application is to provide a method and device for achieving fair forwarding of multicast data packets, and to achieve fairness in the transmission delay of multicast data packets of different output interfaces of fair multicast.
[0005] To achieve the above-mentioned purpose, a method for realizing fair forwarding of multicast data messages is provided, which includes: generating a multicast routing table entry for a multicast group; generating a primary replication linked list containing each output interface of the multicast group; writing the table entry index of the primary replication linked list into the multicast routing table entry; generating a backup replication linked list, moving the first output interface of the primary replication linked list to the end of the backup replication linked list, and moving the remaining output interfaces of the primary replication linked list forward by one position in the backup replication linked list; starting a replication linked list switching timer of the multicast routing table entry; and replicating and forwarding each multicast data message of the multicast group through the primary replication linked list.
[0006] To achieve the above-mentioned purpose, the present application also provides a device for realizing fair forwarding of multicast data messages, which includes: a routing protocol module, which generates a multicast routing table entry for a multicast group; generates a primary replication linked list containing each output interface of the multicast group; writes the table entry index of the primary replication linked list into the multicast routing table entry; generates a backup replication linked list, moves the first output interface of the primary replication linked list to the end of the backup replication linked list, and moves the remaining output interfaces of the primary replication linked list forward by one position in the backup replication linked list; a setting module, which sets a replication linked list switching timer for the multicast routing table entry; and a multicast forwarding module, which starts the replication linked list switching timer and replicates and forwards each multicast data message of the multicast group through the primary replication linked list.
[0007] The beneficial effect of the present application is that the outbound interfaces of the same multicast group are sorted differently in different cycles, so that different receivers of the same multicast receive the multicast data with equal opportunities and the lowest delay, thereby achieving fair multicast. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 A flowchart of an embodiment of a method for achieving fair forwarding of multicast data packets provided by the present application;
[0009] Figures 2A-2C Schematic diagram of fair multicast routing table switching provided by this application;
[0010] Figures 3A-3B A schematic diagram of adding the outgoing port of a receiver joining a multicast group to a fair multicast routing table entry is provided for this application;
[0011] Figures 4A-4C A schematic diagram of adding the egress port of an important receiver joining a multicast group to a fair multicast routing table entry is provided for this application;
[0012] Figures 5A-5BA schematic diagram of deleting the outgoing interface of a receiver leaving a multicast group from a fair multicast routing table entry is provided for this application;
[0013] Figure 6 A schematic diagram of a device for implementing fair forwarding of multicast data packets provided in this application. DETAILED DESCRIPTION
[0014] The present invention will be described in detail with reference to a plurality of examples shown in the accompanying drawings. In the following detailed description, a number of specific details are provided to provide a comprehensive understanding of the present invention. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring the understanding of the examples.
[0015] Among the terms used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" are inclusive; the terms "greater than" and "less than" are exclusive. The term "based on" means based on at least a portion.
[0016] Figure 1 The figure shows a flow chart of an embodiment of a method for realizing fair forwarding of multicast data packets provided by the present application. The embodiment includes:
[0017] Step 101, generating a multicast routing table entry for a multicast group;
[0018] Step 102: Generate a master replication linked list containing each outbound interface of the multicast group;
[0019] Step 103: Write the entry index of the primary copy linked list into the multicast routing table entry;
[0020] Step 104: Generate a backup replication list, move the first outbound interface of the primary replication list to the end of the backup replication list, and move the remaining outbound interfaces of the primary replication list forward one position in the backup replication list.
[0021] Step 105: Start the copy list switching timer of the multicast routing table entry;
[0022] Step 106: copy and forward each multicast data message of the multicast group through the primary copy linked list.
[0023] Figure 1 The beneficial effect of the embodiment is that the outbound interfaces of the same multicast group are sorted differently in different cycles, so that different receivers of the same multicast group receive multicast data with equal opportunities and the lowest delay, thereby achieving fair multicast.
[0024] This application does not improve the way in which a multicast routing device is triggered to generate multicast routing table entries and identify the outgoing interfaces of a multicast group; this application improves the generation, search, and forwarding of the outgoing interface list (OIL) in the multicast routing table, and sorts the outgoing interfaces of the same multicast group differently in different cycles, so that during the continuous multicast forwarding process, the delay of multicast data packets of different multicast receivers is fair.
[0025] Figures 2A-2C This is a schematic diagram of fair multicast routing table switching provided by this application.
[0026] Figure 2A In the figure, the multicast router adds four outbound interfaces (lif03x01, port a), (lif03x02, port b), (lif03x03, port c), and (lif03x04, port d) for the multicast group whose multicast source IP address is S1 and multicast group IP address is G1. These outbound interfaces include a Layer 3 interface, such as lif03x01, and the physical port of the Layer 3 interface, such as port a.
[0027] These outbound interfaces are the VLAN interfaces through which the receiver-side DR receives IGMP messages; or the routing interfaces through which other multicast routers receive PIM Join messages.
[0028] The multicast routing device generates a multicast routing table entry 201 for the multicast group, and generates a copy linked list 202 for each outbound interface of the multicast group, including four outbound interfaces (lif03x01, port a), (lif03x02, port b), (lif03x03, port c), and (lif03x04, port d); writes an entry index 202 of the copy linked list 202 into the multicast routing table entry 201 as the primary copy linked list for the current timing period T1; generates a copy linked list 203, moves the first outbound interface (lif03x01, port a) of the copy linked list 202 to the end of the copy linked list 203, and moves the remaining outbound interfaces (lif03x02, port b), (lif03x03, port c), and (lif03x04, port d) of the copy linked list 202 forward by one position in the copy linked list 203. In this way, the copy linked list 203 becomes a backup copy linked list in the current timing period T1.
[0029] The multicast router starts the replication link table switching timer of the multicast routing table entry 201, and replicates and forwards each multicast data message of the multicast group (S1, G1) through the primary replication link table 202 in the first cycle T1.
[0030] Figure 2BIn the multicast routing table, the multicast router determines that the copy chain table switching timer of the multicast routing table entry 201 has arrived, switches the copy chain table 203 to the main copy chain table of the current timing period T2, and switches the copy chain table 202 to the backup copy chain table of the current timing period T2; replaces the table index index202 of the copy chain table 202 in the multicast routing table entry 201 with the table index index203 of the copy chain table; updates the new backup copy chain table 202 in the current timing period T2, moves the first outgoing interface (lif03x02, port b) of the main copy chain table 203 of the current timing period T2 to the tail of the backup copy chain table 202 of the current timing period T2, and moves the remaining outgoing interfaces (lif03x03, port c), (lif03x04, port d), and (lif03x01, port a) of the main copy chain table 203 of the current timing period T2 forward by one position in the backup copy chain table 202 of the current timing period T2.
[0031] The multicast router copies and forwards each multicast data message of the multicast group (S1, G1) through the primary copy linked list 203 of the current timing period T2.
[0032] Figure 2C In the multicast routing table, the multicast router determines that the copy chain table switching timer of the multicast routing table entry 201 has arrived, switches the copy chain table 202 to the main copy chain table of the current timing period T3, and switches the copy chain table 203 to the backup copy chain table of the current timing period T3; replaces the table index index203 of the copy chain table 203 in the multicast routing table entry 201 with the table index index202 of the copy chain table; updates the new backup copy chain table 203 in the current timing period T3, moves the first outgoing interface (lif03x03, port c) of the main copy chain table 202 of the current timing period T3 to the tail of the backup copy chain table 202 of the current timing period T3, and moves the remaining outgoing interfaces (lif03x04, port d), (lif03x01, port a), and (lif03x02, port b) of the main copy chain table 202 of the current timing period T3 forward by one position in the backup copy chain table 203 of the current timing period T3. In this way, the copy linked list 203 will be switched to the main copy linked list in the next timing cycle T4.
[0033] The multicast router copies and forwards each multicast data message of the multicast group (S1, G1) through the master copy linked list 202 of the current timing period T3.
[0034] Figures 2A-2CThe four outbound interfaces of the multicast group (S1, G1) are sorted differently in different cycles, so that different receivers of the multicast group (S1, G1) receive multicast data with equal opportunities and minimum delay, thereby realizing fair multicast.
[0035] Figures 3A-3B A schematic diagram of adding an outbound port of a receiver joining a multicast group to a fair multicast routing table entry is provided for this application.
[0036] Figure 3A In the timing period T4, the table entry index index203 of the replication link table 203 is written into the multicast routing table entry 201 as the main replication link table of the timing period T4; the replication link table 202 is the backup replication link table in the timing period T4.
[0037] Figure 3B In the example, the multicast group (S1, G1) is added to the multicast router by a new outgoing interface (lif03x05, port f). The multicast routing device adds the outgoing interface (lif03x05, port f) to the tail of the replication chain list 202 and the replication chain list 203.
[0038] Figures 4A-4C A schematic diagram of adding an egress port of an important receiver joining a multicast group to a fair multicast routing table entry is provided for this application.
[0039] Figure 4A In the timing period T4, the table entry index index203 of the replication link table 203 is written into the multicast routing table entry 201 as the main replication link table of the timing period T4; the replication link table 202 is the backup replication link table in the timing period T4.
[0040] Figure 4B In the example, when a high-priority multicast receiver joins the multicast group (S1, G1), the multicast router identifies the outbound interface (lif03x05, port f) of the multicast receiver as a high-priority outbound interface; for example, the Layer 3 interface of the outbound interface belongs to a specified VLAN or the Layer 3 interface / physical port of the outbound interface has a high weight.
[0041] The multicast routing device writes the outgoing interface (lif03x05, port f) into the fixed first position of the replication linked list 202 and the replication linked list 203. In this way, starting from the joining timing period T4, the multicast data message of the multicast group (S1, G1) is preferentially sent to the outgoing interface (lif03x05, port f) of the multicast receiver.
[0042] Figure 4CIn the process, the multicast router determines that the replication link table switching timer of the multicast routing table entry 201 has arrived, switches the replication link table 202 to the main replication link table of the current timing period T5, and switches the replication link table 203 to the backup replication link table of the current timing period T5; replaces the table index index203 of the replication link table 203 in the multicast routing table entry 201 with the table index index202 of the replication link table.
[0043] The multicast router updates the new backup copy linked list 203 in the current timing period T4, moves the first output interface (lif03x01, port a) after the output interface (lif03x05, port f) fixed in the first position in the primary copy linked list 202 of the current timing period T5 to the end of the backup copy linked list 203 of the current timing period T5, and moves the remaining output interfaces (lif03x02, port b), (lif03x03, port c), and (lif03x04, port d) of the primary copy linked list 202 of the current timing period T5 forward one position in the backup copy linked list 203 of the current timing period T5. In this way, the outgoing interface (lif03x05, port f) remains in the first position in replication list 203, and replication list 203 will be switched to the primary replication list in the next timing period T5. Multicast data packets are still preferentially sent to high-priority multicast receivers; however, other multicast receivers can still receive multicast data with the lowest delay with equal opportunities.
[0044] Figures 5A-5B This application provides a schematic diagram of deleting the outgoing interface of a receiver leaving a multicast group from a fair multicast routing table entry.
[0045] Figure 5A In the timing period Tn, the entry index index203 of the replication link table 202 is written into the multicast routing table entry 201 as the main replication link table of the timing period Tn; the replication link table 203 is the backup replication link table in the timing period Tn.
[0046] Figure 5B In the example, when the multicast receivers corresponding to the outgoing interfaces (lif03x05, port f) and (lif03x03, port c) leave the multicast group, the multicast router deletes the outgoing interfaces (lif03x05, port f) and (lif03x03, port c) from their current positions in the replication linked lists 202 and 203, respectively.
[0047] In the above embodiment of the present application, when the replication link table switching timer reaches the period when the table index of the replication link table in the multicast routing table entry needs to be switched and the backup link table needs to be updated, if a multicast receiver of the multicast group joins or leaves the multicast group, the above processing cannot be performed simultaneously. To avoid replication link table anomalies, the multicast router completes the update of the table index of the replication link table in the multicast routing table entry and the backup link table update before performing the add / delete operation on the outbound interfaces of the two replication link tables of the multicast group.
[0048] Figure 6 This is a schematic diagram of a device for implementing fair forwarding of multicast data packets, provided in this application. This device 60 can be used as a multicast routing device; it includes a processor 61, memory 62, a switching chip 63, and a network interface 64. The switching chip 63 includes at least a table entry storage module 631 and a multicast forwarding module 632. The processor 61 executes processor-executable instructions in the memory 62 to execute a multicast protocol module 621 and a configuration module 622.
[0049] The routing protocol module 621 generates a multicast routing table entry for the multicast group; generates a primary replication linked list containing each outbound interface of the multicast group; writes the entry index of the primary replication linked list into the multicast routing table entry; generates a backup replication linked list, moves the first outbound interface of the primary replication linked list to the end of the backup replication linked list, and moves the remaining outbound interfaces of the primary replication linked list forward one position in the backup replication linked list.
[0050] The setting module 622 sets a copy list switching timer for the multicast routing table entry.
[0051] The entry storage module 631 is used to record multicast routing entries, the primary replication linked list and the backup replication linked list;
[0052] The multicast forwarding module 632 starts the replication link table switching timer, and replicates and forwards each multicast data message of the multicast group through the primary replication link table.
[0053] The routing protocol module 621 is further configured to, when the replication list switching timer expires, switch the backup replication list to the primary replication list for the current timing period, and switch the primary replication list to the backup replication list for the current timing period; replace the entry index of the primary replication list in the multicast routing table entry with the entry index of the primary replication list for the current timing period; update the new backup replication list, move the first outbound interface of the primary replication list for the current timing period to the end of the backup replication list for the current timing period, and shift the remaining outbound interfaces of the primary replication list for the current timing period forward one position in the backup replication list for the current timing period;
[0054] The multicast forwarding module 632 is further configured to replicate and forward each multicast data message of the multicast group through the primary replication linked list of the current timing period.
[0055] The routing protocol module 621 is further configured to write the newly added outbound interface into the tail of the primary replication chain list of the current timing period and the tail of the backup replication chain list of the current timing period.
[0056] The routing protocol module 621 is further configured to identify that the newly added outbound interface has the highest priority and write the newly added outbound interface into the first fixed position of the primary replication link table of the current timing period and the first fixed position of the backup replication link table of the current timing period.
[0057] The routing protocol module 621 is further configured to delete the outgoing interface leaving the multicast group from the current position of the primary replication link list of the current timing period and the current position of the backup replication link list of the current timing period.
[0058] In this application, a machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device for storing or containing information (such as executable instructions, data, etc.). For example, any machine-readable storage medium herein can be any type of random access memory (RAM), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard drive), solid-state drive, any type of storage optical disk (such as a CD, DVD, etc.), and similar devices, or a combination thereof. In addition, any machine-readable storage medium described herein can be a non-transitory machine-readable storage medium.
[0059] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for achieving fair forwarding of multicast data packets, characterized in that: The method comprises, Generate multicast routing table entries for the multicast group; Generate a master replication linked list including each outbound interface of the multicast group; Writing the entry index of the primary copy linked list into the multicast routing table entry; Generate a backup copy chain list, move the first output interface of the primary copy chain list to the end of the backup copy chain list, and move the remaining output interfaces of the primary copy chain list forward one position in the backup copy chain list; Starting a copy link table switching timer of the multicast routing table entry; Each multicast data message of the multicast group is copied and forwarded through the primary copy chain table.
2. The method according to claim 1, characterized in that The method further comprises, When the replication chain table switching timer arrives, the backup replication chain table is switched to the main replication chain table of the current timing period, and the main replication chain table is switched to the backup replication chain table of the current timing period; Replacing the entry index of the primary copy linked list in the multicast routing table entry with the entry index of the primary copy linked list in the current timing period; Copying and forwarding each multicast data message of the multicast group through the master copy chain table of the current timing period; Update the backup copy linked list of the current timing period, move the first output interface of the main copy linked list of the current timing period to the tail of the backup copy linked list of the current timing period, and move the remaining output interfaces of the main copy linked list of the current timing period forward one position in the backup copy linked list of the current timing period.
3. The method according to claim 2, characterized in that The method further comprises, The newly added outbound interface is written into the tail of the primary replication chain list of the current timing period and the tail of the backup replication chain list of the current timing period respectively.
4. The method according to claim 2, characterized in that The method further comprises, Identify the newly added outbound interface with the highest priority; The newly added outbound interface is written into the fixed first position of the primary replication chain table of the current timing period and the fixed first position of the backup replication chain table of the current timing period.
5. The method according to claim 3 or 4, characterized in that The method further comprises, The outgoing interface leaving the multicast group is deleted from the current position of the primary replication chain table of the current timing period and the current position of the backup replication chain table of the current timing period.
6. A device for realizing fair forwarding of multicast data packets, characterized in that: The device comprises, The routing protocol module generates a multicast routing table entry for the multicast group; generates a primary copy linked list containing each outbound interface of the multicast group; and writes the entry index of the primary copy linked list into the multicast routing table entry; Generate a backup copy chain list, move the first output interface of the primary copy chain list to the end of the backup copy chain list, and move the remaining output interfaces of the primary copy chain list forward one position in the backup copy chain list; A setting module, configured to set a copy list switching timer for the multicast routing table entry; A table entry storage module, configured to record the multicast routing table entry, the primary replication linked list, and the backup replication linked list; The multicast forwarding module starts the replication chain table switching timer, and replicates and forwards each multicast data message of the multicast group through the primary replication chain table.
7. The device according to claim 6, characterized in that The routing protocol module is further configured to switch the backup replication chain table to the primary replication chain table of the current timing period and switch the primary replication chain table to the backup replication chain table of the current timing period when the replication chain table switching timer expires; Replace the entry index of the primary copy linked list in the multicast routing table entry with the entry index of the primary copy linked list of the current timing period; update the backup copy linked list of the current timing period, move the first outbound interface of the primary copy linked list of the current timing period to the end of the backup copy linked list of the current timing period, and move the remaining outbound interfaces of the primary copy linked list of the current timing period forward by one position in the backup copy linked list of the current timing period; The multicast forwarding module is further configured to copy and forward each multicast data message of the multicast group through the primary copy chain table of the current timing period.
8. The device according to claim 7, characterized in that The routing protocol module is further configured to write the newly added outbound interface into the tail of the primary replication chain list of the current timing period and the tail of the backup replication chain list of the current timing period.
9. The device according to claim 8, characterized in that The routing protocol module is further configured to identify that the newly added outbound interface has the highest priority; and write the newly added outbound interface into the fixed first position of the primary replication linked list of the current timing period and the fixed first position of the backup replication linked list of the current timing period.
10. The device according to claim 8 or 9, characterized in that The routing protocol module is further configured to delete the outgoing interface leaving the multicast group from the current position of the primary replication linked list of the current timing period and the current position of the backup replication linked list of the current timing period.