A method and device for achieving fast flow convergence
By setting a primary and backup next hop in the VXLAN tunnel and switching the backup next hop in the event of a hardware failure, the problem of slow BUM traffic convergence speed when the VXLAN tunnel link fails is solved, achieving fast convergence and zero packet loss.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2026-03-10
AI Technical Summary
When a VXLAN tunnel experiences a link failure, the convergence speed of BUM traffic is slow, especially in scenarios where the VXLAN tunnel is bound to a large-size VSI. The VTEP needs to refresh and delete a large number of multicast entries, resulting in a long tunnel broadcast traffic switching time.
In a VXLAN tunnel, select a primary next hop and a backup next hop, and set their status in the multicast table. The backup next hop can be switched directly through hardware failure events, simplifying table operations and enabling rapid traffic convergence.
By rapidly switching to the backup next hop via hardware, the table refresh time is reduced, enabling zero-packet-loss and rapid convergence of VXLAN tunnel BUM traffic.
Smart Images

Figure CN118677838B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the communication technology, and in particular to a method and device for realizing fast convergence of traffic. BACKGROUND
[0002] VXLAN (Virtual eXtensible LAN) is a kind of Layer 2 VPN (Virtual Private Network) technology, which is used to encapsulate Layer 2 data packets in UDP (User Datagram Protocol) packets and transmit in Layer 3 network.
[0003] When VTEP (VXLAN Tunnel End Point) sends BUM (Broadcast, Unknown Unicast, and Multicast) in VSI, it can only select one of the multiple next hops of the VXLAN tunnel to forward the BUM traffic. When the VXLAN tunnel broadcast next hop has a link failure, the old broadcast next hop needs to be switched, and the broadcast encapsulation table item of the old next hop is deleted from the multicast table item of the VSI bound to the VXLAN tunnel, and the encapsulation table item of the old broadcast next hop is deleted, and then a broadcast encapsulation table item is created for the new next hop. This process needs to refresh and add or delete table items, so it takes a long time, resulting in a long switching time of the tunnel broadcast traffic. Especially for the scenario of a large-scale VSI bound to the same VXLAN tunnel, the multicast table items of the VSI are increased and deleted, and the convergence speed is slow.
[0004] In addition, when the VXLAN tunnel has a link failure, the underlying hardware of the VTEP will refresh the software table items of the detected link failure operating system, and then refresh the hardware next hop table items bound to the VXLAN tunnel according to the refreshed software table items, which further aggravates the slow convergence of the BUM traffic of the VXLAN tunnel. SUMMARY
[0005] The present application aims to provide a method and device for realizing fast convergence of traffic, so as to realize fast convergence of the BUM traffic of the VXLAN tunnel.
[0006] To achieve the above objectives, this application provides a method for achieving rapid traffic convergence. The method includes: selecting a primary next hop and a backup next hop from multiple next hops in a VXLAN tunnel based on the device type; setting the primary next hop to a forwarding state and the backup next hop to a discard state in the VXLAN tunnel's multicast table entry; setting the primary next hop to a forwarding state; setting the backup next hop to a discard state; registering a port close event for the VXLAN tunnel; forwarding broadcast packets, unknown unicast packets, and multicast packets within a virtual forwarding instance through the primary next hop of the VXLAN tunnel; and upon receiving a port close event from the primary next hop's outgoing port, setting the primary next hop to a discard state and the backup next hop to a forwarding state.
[0007] The method also includes registering port interruption events for the VXLAN tunnel; when a port interruption event is received on the outgoing port of the primary next hop, setting the primary next hop to a discard state and setting the backup next hop to a forwarding state.
[0008] The method also includes registering a pre-reboot event for the VXLAN tunnel; when a pre-reboot event is received from the service board where the primary next hop's outgoing port is located, the primary next hop is set to discard state, and the backup next hop is set to forwarding state.
[0009] The method also includes registering a board removal event for the VXLAN tunnel; when a first-stage board removal event is received for the service board where the primary next hop's outgoing port is located, the primary next hop is set to discard state, and the backup next hop is set to forwarding state.
[0010] In this method, selecting a primary next hop and a backup next hop from multiple next hops in a VXLAN tunnel based on the device type means that when the device type is a stacked device, the next hops of the primary and backup next hops are located in different stack members; when the device type is a distributed device, the next hops of the primary and backup next hops are located in different service boards. To achieve the above objective, this application also provides a device for achieving fast traffic convergence. The device includes a tunnel module, used to select a primary next hop and a backup next hop from multiple next hops in a VXLAN tunnel based on the device type; set the primary next hop to a forwarding state and the backup next hop to a discard state in the multicast table entry of the VXLAN tunnel; register a port close event for the VXLAN tunnel; a forwarding module, used to forward broadcast packets, unknown unicast packets, and multicast packets within a virtual forwarding instance through the primary next hop of the VXLAN tunnel; the tunnel module is also used to set the primary next hop to a discard state and set the backup next hop to a forwarding state when a port close event is received from the output port of the primary next hop.
[0011] The tunnel module is also used to register port interruption events for the VXLAN tunnel; when a port interruption event is received on the outgoing port of the primary next hop, the primary next hop is set to discard state, and the backup next hop is set to forwarding state.
[0012] The tunnel module is also used to register pre-restart events for the VXLAN tunnel; when it receives a pre-restart event for the service board where the primary next hop's outgoing port is located, it sets the primary next hop to the discard state and sets the backup next hop to the forwarding state.
[0013] The tunnel module is also used to register board removal events for the VXLAN tunnel; when it receives the first phase event of board removal of the service board where the primary next hop's output port is located, it sets the primary next hop to the discard state and sets the backup next hop to the forwarding state.
[0014] The tunnel module is also used to determine whether the device type is a stacked device, and whether the next hop of the primary next hop and the next hop of the backup next hop are located in different stack members; or, to determine whether the device type is a distributed device, and whether the next hop of the primary next hop and the next hop of the backup next hop are located in different service boards.
[0015] The beneficial effect of this application is that it simplifies the VXLAN tunnel multicast entries, and directly switches the hardware next-hop entry of the backup next hop based on the primary next-hop hardware failure event when the VXLAN tunnel link fails, thereby accelerating the convergence speed of BUM traffic in the VXLAN tunnel. Attached Figure Description
[0016] Figure 1 A flowchart illustrating an embodiment of the method for achieving fast traffic convergence provided in this application;
[0017] Figure 2 A flowchart illustrating an embodiment of achieving rapid traffic convergence based on optical signal faults provided in this application;
[0018] Figure 3 This is a schematic diagram of an embodiment of the method for achieving fast traffic convergence provided in this application;
[0019] Figure 4 This is a schematic diagram of an embodiment of the method for achieving fast traffic convergence provided in this application;
[0020] Figure 5 The diagram shown is a schematic representation of an embodiment of the device for achieving fast traffic convergence provided in this application. Detailed Implementation
[0021] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.
[0022] In the terminology 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" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.
[0023] Figure 1 The diagram shown is a flowchart of an embodiment of the method for achieving fast traffic convergence provided in this application; the method includes,
[0024] Step 101: Select a primary next hop and a backup next hop from the multiple next hops of the VXLAN tunnel based on the device type.
[0025] The inventors of this application discovered through experimental testing that for a VXLAN tunnel with multiple next hops, the more broadcast next hops there are, the more multicast entries need to be refreshed. For example, if a VXLAN tunnel contains 20 next hops and each next hop is set as a broadcast next hop, then when any next hop link in the VXLAN tunnel fails, the broadcast encapsulated entry for the failed next hop needs to be deleted from the multicast entry. The more failed next hops there are, the greater the computational burden of refreshing the entries.
[0026] In link failure scenarios, the failure of some next-hop links in a VXLAN tunnel, such as stack-up upgrades or service board restarts, typically does not result in the failure of all next-hop links in the VXLAN tunnel. Therefore, the number of broadcast next-hop settings for the VXLAN tunnel can be reduced, eliminating the need to set all next-hops of the VXLAN tunnel as broadcast next-hops. Furthermore, by setting both primary and backup next-hops for the broadcast next-hops of the VXLAN tunnel, fewer table entries need to be refreshed during link failure switching, resulting in lower latency.
[0027] Given the diverse range of VXLAN tunnel link failure scenarios, to ensure the primary and backup next hops of the VXLAN tunnel, VTEP can select one primary and one backup next hop with different outgoing ports, depending on the device type.
[0028] VTEP identifies the device type as a stacked device and distributes the primary and backup next hops of the VXLAN tunnel to different member devices for configuration. For example, the next hops of the VXLAN tunnels on the primary member device and a backup member device are set as the primary and backup next hops of the VXLAN tunnel multicast entries, respectively.
[0029] VTEP identifies the device type as a distributed device and selects the next hop on different service boards as the primary and backup next hop for VXLAN tunnel multicast.
[0030] If the VTEP identifies the device type as a box-type device, it randomly selects two next hops with different output ports as the primary and backup next hops for the VXLAN tunnel multicast entry.
[0031] Step 102: In the multicast table entry of the VXLAN tunnel, set the primary next hop to forwarding state and the backup next hop to discard state.
[0032] Configure one primary next hop and one backup next hop for the multicast entry of the VXLAN tunnel. The primary next hop is responsible for forwarding the tunnel's BUM traffic, while the backup next hop is set to discard and does not forward BUM traffic.
[0033] Step 103 is to register a port shutdown event for the VXLAN tunnel;
[0034] For link failures that result in physical port shutdown, the tunnel module on the VTEP's switching chip registers a physical port shutdown event. This way, when any port on the VTEP shuts down, the port shutdown event of that port notifies the tunnel module on the switching chip.
[0035] Step 104: Forward broadcast packets, unknown unicast packets, and multicast packets within the virtual forwarding instance through the primary next hop of the VXLAN tunnel.
[0036] Step 105: When a port closure event is received on the outgoing port of the primary next hop, set the primary next hop to the discard state and set the backup next hop to the forwarding state.
[0037] The VTEP's on-chip tunnel module receives a physical port close event and responds to the physical port close event.
[0038] If the tunnel module identifies the closed port as the egress port of the primary next hop in the VXLAN tunnel multicast table, it will directly initiate a primary / backup next hop switch, setting the primary next hop to a discard state and the backup next hop to a forwarding state, thus achieving traffic convergence. By responding to this event, the tunnel module completes the primary / backup next hop switch for the VXLAN tunnel multicast table before the underlying interface of the VTEP receives the port closure operation (i.e., before the underlying interface state has been closed) and before the egress port of the primary next hop is closed, achieving zero packet loss in tunnel broadcasting.
[0039] VTEP can further remove the original host's next hop that was set to discard and select a new alternative next hop.
[0040] Figure 2 A flowchart illustrating an embodiment of achieving rapid traffic convergence based on optical signal faults provided in this application;
[0041] Step 201 is the VXLAN tunnel registration port interruption event;
[0042] When a link failure occurs due to the removal of an optical module from a physical port, the tunnel module on the VTEP's switching chip registers a port interruption event. This way, when an optical module on any port of the VTEP is turned off, the port interruption event for that port notifies the tunnel module on the switching chip.
[0043] Step 202: Scan the status of the optical signal received at the port;
[0044] The VTEP device's switching chip enables the port status hardware scanning function to scan whether each port is receiving optical signals normally.
[0045] Step 203: Receive the port interrupt event of the next-hop output port of the master.
[0046] When the optical module at the primary next-hop output port of the VXALN tunnel is disconnected, the switching chip on the VTEP detects no optical signal at the primary next-hop output port of the VXALN tunnel and immediately reports a port interrupt event. The tunnel module of the VTEP's switching chip receives the port interrupt event.
[0047] As the port optical module is unplugged, the VTEP's switching chip hardware scan immediately detects and reports the port interruption event. The tunnel module responds to the port interruption event by broadcasting the next-hop master / slave switch in the VXLAN tunnel multicast table. Due to the high efficiency of the hardware scan, this process takes only tens of milliseconds.
[0048] Step 204: Set the primary next hop to the discard state and set the backup next hop to the forwarding state.
[0049] When the tunnel module on the VTEP's switching chip receives a port interrupt event, it identifies that the output port of the primary next-hop in the VXLAN tunnel multicast table is not receiving an optical signal normally. It then directly initiates a primary / backup next-hop switch, setting the primary next-hop to a discarded state and the backup next-hop to a forwarding state, thus achieving traffic convergence. The VTEP can further delete the original primary next-hop that was set to discarded state and select a new backup next-hop.
[0050] Figure 2In this embodiment, when the physical port of the VTEP switching chip tunnel module is shut down, the tunnel broadcast primary / backup next hop is switched in response to the event. The shutdown operation has not yet been notified to the underlying interface module, so the underlying interface state has not yet gone down. That is, the tunnel broadcast next hop has been switched in before the interface goes down, which can achieve zero packet loss in tunnel broadcast.
[0051] Figure 3 This is a schematic diagram of an embodiment of the method for achieving fast traffic convergence provided in this application;
[0052] Step 301 is to register a single-board restart event for the VXLAN tunnel;
[0053] For scenarios involving service board reboot operations or abnormal service board restarts, the tunnel module of the VTEP's switching chip registers a response to the service board's pre-reboot event.
[0054] Step 302: The single board is restarted;
[0055] When the service board where the primary next-hop output port of the VXLAN tunnel on the VTEP is located executes the reboot command or restarts due to software malfunction, a pre-reboot event of the single board is generated.
[0056] Step 303: Receive the board restart event;
[0057] The tunnel module of the VTEP switching chip receives the pre-reboot event of the single board and identifies the service board where the primary next-hop output port of the VXLAN tunnel multicast entry is located will be rebooted.
[0058] Step 304: Set the primary next hop to the discard state and set the backup next hop to the forwarding state.
[0059] The tunnel module of the VTEP switching chip directly initiates the primary and backup next-hop switching of the VXLAN tunnel multicast table entry, sets the primary next hop to the discard state, and sets the backup next hop to the forwarding state, thereby achieving traffic convergence.
[0060] Before the VTEP device performs a single-board restart operation or an abnormal single-board restart operation, it will notify the single-board restart pre-restart event. Before the service board where the primary next-hop outgoing port of the VXLAN tunnel is located restarts, the tunnel module responds to the event and quickly switches the primary and backup next hops of the VXLAN tunnel multicast table entry, achieving zero packet loss effect for the BUM traffic of the VXLAN tunnel.
[0061] Figure 4 This is a schematic diagram of an embodiment of the method for achieving fast traffic convergence provided in this application;
[0062] Step 401 is the VXLAN tunnel registration board removal event;
[0063] For VTEP, which is a distributed device, in the scenario where the service boards within the VTEP's chassis can be removed from the chassis, the tunnel module of the VTEP's switching chip registers the first-stage (first remove) event for board removal.
[0064] Step 402: Receive the first stage event of board removal;
[0065] During the process of removing a service board from the VTEP, a first-stage event for board removal is generated, triggering the switching of services and protocols on the service board. The tunnel module of the VTEP's switching chip receives the response event for the first stage of board removal.
[0066] Step 403: Set the primary next hop to the discard state and set the backup next hop to the forwarding state.
[0067] The tunnel module of the VTEP switching chip identifies that the primary next-hop output port of the VXLAN tunnel multicast entry is located on the unplugged service board, and directly initiates the primary and backup next-hop switch of the VXLAN tunnel multicast entry, sets the primary next-hop to the discard state, and sets the backup next-hop to the forwarding state, thereby achieving traffic convergence.
[0068] Figure 5 The diagram shows a flowchart of an embodiment of a device for achieving fast traffic convergence provided in this application. The device 50 includes at least a network interface, a switching chip, a CPU, and a memory. The switching chip includes at least a tunnel module and a forwarding module.
[0069] The tunnel module is used to select a primary next hop and a backup next hop from multiple next hops in a VXLAN tunnel based on the device type; in the VXLAN tunnel's multicast table entry, it sets the primary next hop to forwarding status and the backup next hop to discard status; and it registers port close events for the VXLAN tunnel. The forwarding module is used to forward broadcast packets, unknown unicast packets, and multicast packets within the virtual forwarding instance through the primary next hop of the VXLAN tunnel. The tunnel module is also used to set the primary next hop to discard status and set the backup next hop to forwarding status when it receives a port close event from the primary next hop's outgoing port.
[0070] The tunnel module is also used to register port interruption events for VXLAN tunnels; when a port interruption event is received on the outgoing port of the primary next hop, the primary next hop is set to discard state, and the backup next hop is set to forwarding state.
[0071] The tunnel module is also used to register pre-restart events for VXLAN tunnels; when it receives a pre-restart event from the service board where the primary next hop's output port is located, it sets the primary next hop to the discard state and sets the backup next hop to the forwarding state.
[0072] The tunnel module is also used to register board removal events for VXLAN tunnels; when it receives the first phase event of board removal of the service board where the primary next hop's output port is located, it sets the primary next hop to the discard state and sets the backup next hop to the forwarding state.
[0073] The tunnel module is also used to determine whether the device type is a stacked device, and whether the next hop of the primary next hop and the next hop of the backup next hop are located in different stack members; or, to determine whether the device type is a distributed device, and whether the next hop of the primary next hop and the next hop of the backup next hop are located in different service boards.
[0074] Figure 5 The beneficial effect of the device embodiment shown is that it simplifies the VXLAN tunnel multicast table entries of the VTEP device, and directly switches the hardware next-hop entry of the backup next hop according to the primary next-hop hardware failure event when the VXLAN tunnel link fails, thereby accelerating the convergence speed of BUM traffic in the VXLAN tunnel.
[0075] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for achieving fast traffic convergence, the method comprising: The method comprises, selecting one primary next hop and one backup next hop of different egress ports in multiple next hops of a VXLAN tunnel according to device type; setting the primary next hop as a forwarding state and the backup next hop as a discard state in a multicast entry of the VXLAN tunnel; registering a port down event for the VXLAN tunnel to inform the VXLAN tunnel of a port down event of any down port; forwarding a broadcast packet, an unknown unicast packet and a multicast packet in a virtual forwarding instance through the primary next hop of the VXLAN tunnel; when receiving a port down event of the egress port of the primary next hop, setting the primary next hop as the discard state and setting the backup next hop as the forwarding state, so that the primary and backup next hop switching of the multicast entry of the VXLAN tunnel is completed before the down operation of the underlying interface state and the egress port of the primary next hop is closed, realizing zero-packet loss of tunnel broadcast.
2. The method of claim 1, wherein, The method further comprises, registering a port interrupt event for the VXLAN tunnel; when receiving a port interrupt event of the egress port of the primary next hop, setting the primary next hop as the discard state and setting the backup next hop as the forwarding state.
3. The method of claim 1, wherein, The method further comprises, registering a pre-single-board restart event for the VXLAN tunnel; when receiving a pre-restart event of the service board where the egress port of the primary next hop is located, setting the primary next hop as the discard state and setting the backup next hop as the forwarding state.
4. The method of claim 1, wherein, The method further comprises, registering a single-board pull-out event for the VXLAN tunnel; when receiving a single-board pull-out first-stage event of the service board where the egress port of the primary next hop is located, setting the primary next hop as the discard state and setting the backup next hop as the forwarding state.
5. The method of claim 1, wherein, The selecting one primary next hop and one backup next hop of different egress ports in multiple next hops of a VXLAN tunnel according to device type refers to, when the device type is a stacking device, the egress port of the primary next hop and the egress port of the backup next hop are located in different stacking members; when the device type is a distributed device, the egress port of the primary next hop and the egress port of the backup next hop are located in different service boards.
6. A device for achieving fast traffic convergence, characterized by The device comprises, a tunnel module located in a switching chip, configured to select one primary next hop and one backup next hop of different egress ports in multiple next hops of a VXLAN tunnel according to device type; set the primary next hop as a forwarding state and the backup next hop as a discard state in a multicast entry of the VXLAN tunnel; register a port down event for the VXLAN tunnel to inform the tunnel module of a port down event of any down port; a forwarding module located in the switching chip, configured to forward a broadcast packet, an unknown unicast packet and a multicast packet in a virtual forwarding instance through the primary next hop of the VXLAN tunnel; The tunnel module is further configured to, when a port down event of the egress port of the primary next hop is received, set the primary next hop to a discard state and set the backup next hop to a forward state, so that the primary- backup next hop switching of the multicast entry of the VXLAN tunnel is completed before the port down operation of the underlying interface is received, i.e., the underlying interface state has not been closed, and the egress port of the primary next hop is closed, thereby realizing zero-packet loss of tunnel broadcast.
7. The device of claim 6, wherein, The tunnel module is further configured to register a port down event for the VXLAN tunnel, and when a port down event of the egress port of the primary next hop is received, set the primary next hop to a discard state and set the backup next hop to a forward state.
8. The device of claim 6, wherein, The tunnel module is further configured to register a board pre-restart event for the VXLAN tunnel, and when a pre-restart event of the service board where the egress port of the primary next hop is located is received, set the primary next hop to a discard state and set the backup next hop to a forward state.
9. The device of claim 6, wherein, The tunnel module is further configured to register a board pull-out event for the VXLAN tunnel, and when a first-stage board pull-out event of the service board where the egress port of the primary next hop is located is received, set the primary next hop to a discard state and set the backup next hop to a forward state.
10. The device of claim 6, wherein, The tunnel module is further configured to determine that the device type is a stacking device, and the egress port of the primary next hop and the egress port of the backup next hop are located in different stacking members, or determine that the device type is a distributed device, and the egress port of the primary next hop and the egress port of the backup next hop are located in different service boards.
Citation Information
Patent Citations
Message forwarding method and device
CN110535761A