CN111654434B - Flow switching method and device and forwarding equipment - Google Patents

Flow switching method and device and forwarding equipment Download PDF

Info

Publication number
CN111654434B
CN111654434B CN202010267472.9A CN202010267472A CN111654434B CN 111654434 B CN111654434 B CN 111654434B CN 202010267472 A CN202010267472 A CN 202010267472A CN 111654434 B CN111654434 B CN 111654434B
Authority
CN
China
Prior art keywords
processor
link
table entry
standby
forwarding table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010267472.9A
Other languages
Chinese (zh)
Other versions
CN111654434A (en
Inventor
占志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202010267472.9A priority Critical patent/CN111654434B/en
Publication of CN111654434A publication Critical patent/CN111654434A/en
Application granted granted Critical
Publication of CN111654434B publication Critical patent/CN111654434B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery

Abstract

The present disclosure provides a method, an apparatus and a forwarding device for switching traffic, where the method is applied to a first processor in the forwarding device, and the first processor is configured to process traffic of a forwarding plane, and the method includes: a first processor acquires a main forwarding table entry and a first standby forwarding table entry for sending flow; and if the first processor detects that the main link for sending the flow according to the main forwarding table entry fails, sending the flow through a first standby link according to the first standby forwarding table entry. By the method, the traffic can be directly switched on the forwarding plane without being influenced by the control plane.

Description

Flow switching method and device and forwarding equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for switching traffic, and a forwarding device.
Background
As shown in fig. 1, a service line card of a high-performance forwarding device (such as a router or a switch) generally adopts a forwarding separation architecture, that is, an NPU (Network Processing Unit) is used as a data forwarding plane and a CPU (Central Processing Unit) is used as a control plane, where the data forwarding plane is mainly used for performing traffic transceiving, and the control plane is mainly used for protocol Processing, forwarding table item issuing, and the like.
An important index of BFD detection performed in the high-performance forwarding device is detection accuracy (sensitivity for sensing link failure), for example, 10ms × 3 (it means that a sending end sends a keep-alive message every 10ms, and a receiving end determines that a link failure occurs if the keep-alive message is not received within 3 periods), when the forwarding plane BFD detects a link failure, the link failure needs to be reported to a CPU, and after the CPU receives the link failure of the forwarding plane BFD, the CPU performs corresponding calculation processing, and then instructs the forwarding plane to forward the flow through the newly calculated standby link.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for switching traffic and forwarding equipment, which can realize BFD transfer control separated linkage, that is, when BFD detects a link failure, a forwarding plane and a control plane are separately processed, so as to solve the problem that the forwarding plane is affected by the processing capability of the control plane, which results in too low traffic switching speed of the forwarding plane.
The present disclosure provides an embodiment, comprising: a method for traffic switching, the method being applied to a first processor in a forwarding device, the first processor being configured to process traffic of a forwarding plane, the method comprising:
the first processor obtains a main forwarding table entry and a first standby forwarding table entry for sending flow;
and if the first processor detects that the main link for sending the flow according to the main forwarding table entry fails, sending the flow through a first standby link according to the first standby forwarding table entry.
It can be seen from the above embodiments that, when detecting a failure of a primary link, a first processor of a forwarding plane may directly send traffic through a first backup link according to an obtained first backup forwarding table without sending link failure information to a control plane first and waiting for an indication of the control plane to switch the backup link sending traffic, thereby saving switching time and avoiding traffic interruption.
The present disclosure also provides an embodiment, comprising: also included in the forwarding device is a second processor configured to perform management functions of the control plane, the method further comprising:
if the first processor detects that the main link of the flow is sent according to the main forwarding table item, sending fault notification information to the second processor;
receiving a second standby forwarding table entry generated for the fault notification information and sent by the second processor (it should be noted that, in this disclosure, the second standby forwarding table entry is only used for distinguishing from the first standby forwarding table entry, and for the forwarding device, after the second standby forwarding table entry recalculated by the CPU is sent to the NPU, the NPU may use the second standby forwarding table entry as a new main forwarding table entry);
and replacing the first standby forwarding table entry with the second standby forwarding table entry to send the flow through a second standby link.
It can be seen from the above embodiments that, while the forwarding plane sends the traffic by using the obtained first backup forwarding table, the forwarding plane may also send the failure notification information to the control plane, so that the control plane calculates a second backup forwarding table according to the failure information, where the second backup forwarding table calculated by the control plane according to a real-time situation is an optimal forwarding table, and after receiving the second backup forwarding table, the forwarding plane sends the traffic according to the second backup forwarding table, so as to achieve an effect of link optimization.
The present disclosure also provides an embodiment, comprising: the first processor is provided with link level states of normal link, link alarm and link disconnection;
if the first processor detects that the main link sending the flow according to the main forwarding table entry fails, the method specifically includes:
if the first processor detects that the main link fails and the failure level of the main link belongs to a link alarm state, the first processor sends the flow through the first standby link according to the first standby forwarding table entry and does not send the failure notification information to the second processor; alternatively, the first and second electrodes may be,
and if the first processor detects that the main link fails and the failure level of the main link belongs to a link disconnection state, sending the flow through the first standby link according to the first standby forwarding table entry, and sending the failure notification information to the second processor.
It can be seen from the above embodiments that, in addition to the normal and open states, the present embodiment is also provided with a third state (i.e. an alarm state, in a specific implementation, there may also be a fourth and a fifth state, but the principle is the same as the third state), and when the forwarding plane detects that the alarm state is satisfied but the open state is not satisfied, the forwarding plane may not send the failure notification information to the control plane, so as to avoid the situation of false alarm caused by link jitter.
The present disclosure also provides an embodiment, comprising: and if the first processor detects that the link corresponding to the main forwarding table entry is in a link normal state, the first processor sends the flow through the main link by using the main forwarding table entry.
The present disclosure also provides an embodiment, comprising: the method for acquiring the main forwarding table entry and the first standby forwarding table entry for sending the traffic by the first processor comprises the following steps:
the first processor acquires the data from a storage medium in the forwarding device; alternatively, the first and second electrodes may be,
the first processor retrieves from its own register.
The present disclosure also provides a device for switching traffic, which is applied to a first processor in a forwarding device, where the first processor is configured to process traffic of a forwarding plane, and the device includes:
the obtaining module is used for obtaining a main forwarding table entry and a first standby forwarding table entry of sending flow;
the detection module is used for detecting whether the main link which sends the flow according to the main forwarding table entry fails or not;
and the switching module is used for indicating the forwarding equipment to send the flow through the first standby link according to the first standby forwarding table entry when the detection module detects the failure of the main link.
The present disclosure also provides an embodiment, where the forwarding device further includes a second processor, where the second processor is configured to execute a management function of a control plane, and the apparatus further includes:
a notification module, configured to send failure notification information to the second processor when the detection module detects that a main link that sends the traffic according to the main forwarding table entry fails;
a receiving module, configured to receive a second standby forwarding table entry generated by a second processor for the fault notification information;
and the switching module is used for replacing the first standby forwarding table entry with the second standby forwarding table entry to send the flow through a second standby link.
The embodiment of the present disclosure further provides a forwarding device, where the forwarding device includes a second processor and a first processor, the second processor is configured to execute a management function of a control plane, and the first processor is configured to process traffic of the forwarding plane;
the first processor obtains a main forwarding table entry and a first standby forwarding table entry for sending flow;
if the first processor detects that a main link for sending the flow according to the main forwarding table entry fails, the first processor sends the flow through a first standby link according to the first standby forwarding table entry and sends failure notification information to the second processor;
receiving a second standby forwarding table entry which is sent by the second processor and generated aiming at the fault notification information;
and replacing the first standby forwarding table entry with the second standby forwarding table entry to send the flow through a second standby link.
The forwarding device may include a router, a switch, and other devices with switching capabilities.
It can be seen from the above embodiments that, when detecting a failure of a primary link, a first processor of a forwarding plane may directly send traffic through a first backup link according to an obtained first backup forwarding table without sending link failure information to a control plane first and waiting for an indication of the control plane to switch the backup link sending traffic, thereby saving switching time and avoiding traffic interruption.
Drawings
Fig. 1 is a schematic diagram of a processor of a transition control separation architecture according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a network structure provided in the embodiment of the present disclosure;
fig. 3 is a schematic diagram of NPU service processing provided in the embodiment of the present disclosure;
fig. 4 is a flow chart of a method for switching traffic according to an embodiment of the present disclosure;
fig. 5 is a flowchart of a method for switching traffic according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The present disclosure provides an embodiment, as shown in fig. 2, in this embodiment, a PE1 is taken as a forwarding device for example, and a PE1 is a forwarding device in an MPLS link, which is provided with a CPU for executing control plane functions and an NPU for executing a forwarding plane.
The PE1 obtains a main forwarding table (main link) PE1-P1-PE3 from the PE1 to the PE3 through calculation by the CPU, and when the PE1 is provided with hardware BFD (the hardware BFD means that BFD processing logic is cured on an NPU chip, packet sending and detection of hardware are realized, so as to facilitate description of the following BFD of the present disclosure), high-precision link detection can be realized through BFD.
As shown in fig. 3, when the main link is normal, the NPU in PE1 sends out the incoming traffic through the interface corresponding to the main link, and if the NPU in PE1 detects that the main link has a failure, the incoming traffic is reported to the CPU through the bus, because the CPU is configured to execute the function of the control plane, after receiving the failure information of the main link, the backup link from PE1 to PE3 is recalculated, for example, the newly calculated link is PE1-PE2-P2-PE4-PE3, the CPU informs the NPU of the newly calculated backup link through the bus, and the NPU sends the traffic according to the backup link after receiving the backup link sent by the CPU.
It can be seen from the above disclosed embodiments that, after the NPU finds that the main link fails, the NPU informs the CPU of the failure information and waits for the CPU to recalculate the standby link, however, due to the influence of the processing capability of the CPU, the NPU may wait for a long time to acquire the standby link information recalculated by the CPU, so that the traffic sent by the NPU is interrupted, thereby causing a loss to the user.
To solve the technical problem in the above embodiments, the present disclosure provides an embodiment of a traffic switching method, as shown in fig. 4,
the method is applied to a first processor in a forwarding device, wherein the first processor is used for processing the traffic of a forwarding plane, and the method comprises the following steps:
s1, the first processor obtains a main forwarding table entry and a first standby forwarding table entry which are used for sending flow;
and S2, if the first processor detects that the main link for sending the flow according to the main forwarding table entry fails, sending the flow through a first standby link according to the first standby forwarding table entry.
In this embodiment, the first processor may be an NPU or other processor capable of handling forwarding plane traffic (this embodiment is exemplarily illustrated with an NPU).
In step S1, the NPU obtains a main forwarding entry and a first standby forwarding entry for sending traffic, specifically, the NPU may obtain the main forwarding entry and the first standby forwarding entry from a storage medium (e.g., RAM, ROM, usb disk, optical disk, etc.) of the device to which the NPU belongs, or from a register of a processor (e.g., CPU) executing a control plane in the NPU itself or the device to which the NPU belongs, and the main forwarding entry and the first standby forwarding entry may be obtained by calculation of the CPU or may be manually input by an administrator.
Generally, the NPU forwards the traffic according to the obtained main forwarding table entry, for example, according to an outgoing interface of the main forwarding table entry, the NPU sends the received traffic to the main link through the outgoing interface. Meanwhile, the NPU performs BFD detection, and when the BFD detects that the main link corresponding to the main forwarding table has a failure, the step S2 is executed.
In S2, the NPU may obtain a first backup forwarding table entry used to send the traffic according to a source address or a destination address of the traffic, or in S1, when the NPU obtains a main forwarding table entry and a first backup forwarding table entry for a certain traffic, a corresponding relationship between the traffic, the main forwarding table entry, and the backup forwarding table entry may be established, which facilitates the NPU to call, as shown in table 1:
Figure BDA0002441835190000071
TABLE 1
As can be seen from table 1, if the NPU establishes the correspondence among L1, S1, and S2, when the forwarding device detects that the primary tunnel S1 of the transmission traffic L1 fails, the S2 tunnel can be directly obtained according to the correspondence, so that the time for the NPU to search for the first backup link is saved.
Therefore, when detecting the failure of the main link, the first processor of the forwarding plane can directly send the traffic through the first backup link according to the acquired first backup forwarding table without sending the link failure information to the control plane and waiting for the indication of the control plane to switch the backup link sending traffic, so that the switching time is saved, and the traffic interruption is avoided.
In another embodiment, as shown in fig. 5, the NPU may further perform the following steps:
s3, if the first processor detects that the main link of the flow is sent according to the main forwarding table item, sending fault notification information to the second processor;
s4, receiving a second standby forwarding table item which is sent by the second processor and generated aiming at the fault notification information;
and S5, replacing the first standby forwarding table entry with the second standby forwarding table entry to send the flow through a second standby link.
Wherein the second processor is a CPU that performs management functions of the control plane, as exemplified above.
In this embodiment, since the time interval from the NPU detecting the main link failure is longer when the NPU obtains the first backup forwarding entry, and there may be situations of performance aging of the intermediate device and increase and decrease of the intermediate link in this time interval, in order to enable the NPU to forward the traffic through the optimal backup link, the NPU executes the step S3 while executing the step S2, the NPU may send the failure notification information to the CPU, so that the CPU calculates the optimal backup link according to the failure notification information, and the failure notification information may include information such as a source address and a destination address of the traffic, so that the CPU may calculate the second backup forwarding entry, and send the second backup forwarding entry to the NPU.
In step S5, there may be two cases for the second standby-to-forward table entry sent by the CPU and received by the NPU,
the first condition is as follows: the second standby forwarding table entry is the same as the first standby forwarding table entry, and the flow can still be sent according to the first standby forwarding table entry at this time.
Case two: the second standby forwarding table entry is different from the first standby forwarding table entry, which indicates that the second standby forwarding table entry is more preferable than the first standby forwarding table entry, and the traffic may be sent by using the second standby forwarding table entry.
Therefore, when the forwarding plane sends the flow by using the obtained first standby forwarding table entry, the forwarding plane can also send fault notification information to the control plane, so that the control plane calculates a second standby forwarding table entry for the flow according to the fault information, the second standby forwarding table entry calculated by the control plane according to the real-time situation is an optimal forwarding table entry, and after receiving the second standby forwarding table entry, the forwarding plane sends the flow according to the second standby forwarding table entry, so as to achieve the effect of link optimization.
In another embodiment, the NPU may divide the BFD detection result into three or more link level states, for example, link level states of normal link, link alarm, and link open circuit, assuming that the BFD detection accuracy is 10ms × 3, and if a keep-alive message can be received in each period, determining that the current link level state is normal link; if the keep-alive message is not received for 1 or 2 periods, for example, the keep-alive message is lost due to link jitter, it is determined that the current link level state is a link alarm, and at this time, the NPU may execute step S2 to send traffic using the first standby link; if the keep-alive messages are not received in all 3 periods, the current link level state is determined to be a link open circuit, and at this time, the NPU executes the steps of S2, S3, S4 and S5.
It can be seen that, in this embodiment, in addition to the normal and open circuit states, a third state is also provided (i.e., an alarm state, in a specific implementation, there may be a fourth and a fifth state, but the principle is the same as the third state), and when the forwarding plane detects that the alarm state is satisfied but the open circuit state is not satisfied, the forwarding plane may not send the failure notification information to the control plane, so as to avoid the situation of false alarm caused by link jitter, and simultaneously, the resource waste caused by NPU false alarm of the CPU may be reduced.
In another embodiment, the NPU may continue BFD detection on the main link that previously sent the traffic while the backup link is sending the traffic, and if the failure of the main link is recovered, the NPU may switch back the traffic from the backup link to the main link for sending.
Based on the same concept as the method, the embodiment of the present disclosure further provides a forwarding device (the forwarding device may be a router, a switch, or a server deployed with a virtual router and a switch), where the forwarding device includes a second processor (CPU) and a first processor (NPU), the CPU is configured to execute a management function of a control plane, and the NPU is configured to process traffic of the forwarding plane;
the NPU acquires a main forwarding table entry and a first standby forwarding table entry which are used for sending flow;
if the NPU detects that a main link for sending the flow according to the main forwarding table entry fails, the NPU sends the flow through a first standby link according to the first standby forwarding table entry and sends failure notification information to a CPU;
receiving a second standby forwarding table item which is sent by the CPU and generated aiming at the fault notification information;
and the NPU replaces the first standby forwarding table entry with a second standby forwarding table entry to send the flow through a second standby link.
In this embodiment, the main forwarding table and the first standby forwarding table for sending traffic, which are obtained by the NPU, are calculated by the CPU and sent to the NPU device by the CPU, and the NPU device stores the main forwarding table and the first standby forwarding table sent by the CPU in a register of the NPU. In other embodiments, the main forwarding entry and the first backup forwarding entry may be stored in a storage medium in the NPU, such as a RAM storage medium, a ROM storage medium, or a removable storage medium.
In this embodiment, when the NPU detects a failure of the main link that transmits the traffic according to the main forwarding table, the NPU obtains the first standby forwarding table from the register according to the source address or the destination address of the traffic (in other embodiments, the first standby forwarding table may be obtained through the corresponding relationship as in the foregoing embodiment).
In this embodiment, in order to ensure that the traffic is sent through the optimal standby link, the NPU sends the failure notification information to the CPU, so that the CPU recalculates the second standby forwarding table entry sent to the traffic according to the failure notification information.
It can be seen from the above embodiments that, when detecting a failure of a primary link, an NPU of the forwarding device may directly send traffic through the first backup link according to the obtained first backup forwarding table, without sending the link failure information to the CPU first and waiting for an instruction of the CPU to switch the backup link sending traffic, which saves the switching time and avoids the occurrence of traffic interruption.
Based on the same concept as the method, the embodiment of the present disclosure further provides a device for switching traffic, which is applied to a forwarding device. The device for switching the flow rate can be realized by software, or can be realized by hardware or a combination of the software and the hardware. Taking a software implementation as an example, as a logical means, the device is formed by reading a corresponding computer program instruction in the nonvolatile memory through a processor of the forwarding device where the device is located. From a hardware level. The forwarding device may include other hardware, such as a forwarding chip responsible for processing a message, a network interface, a memory, etc., in addition to the processor and the nonvolatile memory; in terms of hardware structure, the forwarding device may also be a distributed device, and may include multiple interface cards, so as to perform message processing extension at the hardware level.
The present disclosure provides an apparatus for switching traffic, which is applied to a first processor in a forwarding device, where the first processor is configured to process traffic of a forwarding plane, and the apparatus includes:
the obtaining module is used for obtaining a main forwarding table entry and a first standby forwarding table entry of sending flow;
the detection module is used for detecting whether the main link which sends the flow according to the main forwarding table entry fails or not;
and the switching module is used for indicating the forwarding equipment to send the flow through the first standby link according to the first standby forwarding table entry when the detection module detects the failure of the main link.
Further, the forwarding device further includes a second processor, where the second processor is configured to perform a management function of the control plane, and the apparatus further includes:
a notification module, configured to send failure notification information to the second processor when the detection module detects that a main link that sends the traffic according to the main forwarding table entry fails;
a receiving module, configured to receive a second standby forwarding table entry generated by a second processor for the fault notification information;
and the switching module is used for replacing the first standby forwarding table item with the second standby forwarding table item to send the flow through a second standby link.
In the several embodiments provided in the present application, it should be understood that the disclosed method and electronic device can be implemented in other manners. The embodiments described above are merely illustrative, and the flowcharts and block diagrams in the figures, for example, illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes and substitutions do not depart from the spirit and scope of the embodiments disclosed herein, and they should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (9)

1. A method for traffic switching, the method being applied to a first processor in a forwarding device, the first processor being configured to process traffic of a forwarding plane, the method comprising:
the first processor obtains a main forwarding table entry and a first standby forwarding table entry for sending flow;
and if the first processor detects that the main link for sending the flow according to the main forwarding table entry fails, sending the flow through a first standby link according to the first standby forwarding table entry.
2. The method of claim 1, further comprising a second processor in the forwarding device, the second processor configured to perform management functions of a control plane, the method further comprising:
if the first processor detects that the main link of the flow is sent according to the main forwarding table item, sending fault notification information to the second processor;
receiving a second standby forwarding table entry which is sent by the second processor and generated aiming at the fault notification information;
and replacing the first standby forwarding table entry with the second standby forwarding table entry to send the flow through a second standby link.
3. The method of claim 2, wherein link level states of link normal, link alarm and link down are set in the first processor;
if the first processor detects that the main link sending the flow according to the main forwarding table entry fails, the method specifically includes:
if the first processor detects that the main link fails and the failure level of the main link belongs to a link alarm state, the first processor sends the flow through the first standby link according to the first standby forwarding table entry and does not send the failure notification information to the second processor; alternatively, the first and second electrodes may be,
and if the first processor detects that the main link fails and the failure level of the main link belongs to a link disconnection state, sending the flow through the first standby link according to the first standby forwarding table entry, and sending the failure notification information to the second processor.
4. The method of claim 3, wherein if the first processor detects that the link corresponding to the primary forwarding entry is in a link-normal state, the first processor sends the traffic through the primary link using the primary forwarding entry.
5. The method of claim 1, wherein the method for the first processor to obtain a primary forwarding entry and a first backup forwarding entry for sending traffic comprises:
the first processor acquires the data from a storage medium in the forwarding device; alternatively, the first and second electrodes may be,
the first processor obtains from its own register.
6. An apparatus for traffic switching, the apparatus being applied to a first processor in a forwarding device, the first processor being configured to process traffic of a forwarding plane, the apparatus comprising:
the obtaining module is used for obtaining a main forwarding table entry and a first standby forwarding table entry of sending flow;
the detection module is used for detecting whether the main link which sends the flow according to the main forwarding table entry fails or not;
and the switching module is used for indicating the forwarding equipment to send the flow through the first standby link according to the first standby forwarding table entry when the detection module detects the failure of the main link.
7. The apparatus of claim 6, further comprising a second processor in the forwarding device, the second processor configured to perform management functions of a control plane, the apparatus further comprising:
a notification module, configured to send failure notification information to the second processor when the detection module detects that a main link that sends the traffic according to the main forwarding table entry fails;
a receiving module, configured to receive a second standby forwarding table entry generated by a second processor for the fault notification information;
and the switching module is used for replacing the first standby forwarding table entry with the second standby forwarding table entry to send the flow through a second standby link.
8. A forwarding device comprising a second processor for performing management functions of a control plane and a first processor for processing traffic of a forwarding plane;
the first processor obtains a main forwarding table entry and a first standby forwarding table entry for sending flow;
if the first processor detects that a main link for sending the flow according to the main forwarding table entry fails, the first processor sends the flow through a first standby link according to the first standby forwarding table entry and sends failure notification information to the second processor;
receiving a second standby forwarding table entry which is sent by the second processor and generated aiming at the fault notification information;
and replacing the first standby forwarding table entry with the second standby forwarding table entry to send the flow through a second standby link.
9. The forwarding device of claim 8, wherein the first processor obtains a main forwarding table entry and a first standby forwarding table entry for sending traffic, and specifically comprises:
the first processor acquires the data from a storage medium in the forwarding device; alternatively, the first and second electrodes may be,
the first processor retrieves from its own register.
CN202010267472.9A 2020-04-08 2020-04-08 Flow switching method and device and forwarding equipment Active CN111654434B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010267472.9A CN111654434B (en) 2020-04-08 2020-04-08 Flow switching method and device and forwarding equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010267472.9A CN111654434B (en) 2020-04-08 2020-04-08 Flow switching method and device and forwarding equipment

Publications (2)

Publication Number Publication Date
CN111654434A CN111654434A (en) 2020-09-11
CN111654434B true CN111654434B (en) 2022-05-27

Family

ID=72348170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010267472.9A Active CN111654434B (en) 2020-04-08 2020-04-08 Flow switching method and device and forwarding equipment

Country Status (1)

Country Link
CN (1) CN111654434B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101094175A (en) * 2007-06-14 2007-12-26 华为技术有限公司 Method, device, and system for protecting flux of multicast
CN101217457A (en) * 2007-12-28 2008-07-09 华为技术有限公司 A method to realize fast reroute and router
CN101277269A (en) * 2008-05-06 2008-10-01 杭州华三通信技术有限公司 Terminal with dependable communication, terminal switch method and system as well as method for implementing the system
CN101459549A (en) * 2007-12-14 2009-06-17 华为技术有限公司 Link failure processing method and data forwarding device
WO2011100882A1 (en) * 2010-02-20 2011-08-25 中兴通讯股份有限公司 Link detecting method, apparatus and system
CN104767680A (en) * 2015-04-15 2015-07-08 杭州华三通信技术有限公司 Rapid route switch method and device
CN109039746A (en) * 2018-08-07 2018-12-18 新华三技术有限公司 Detect the method and processor of two-way converting path detection session status
CN109787839A (en) * 2019-02-28 2019-05-21 新华三技术有限公司 A kind of message forwarding method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101094175A (en) * 2007-06-14 2007-12-26 华为技术有限公司 Method, device, and system for protecting flux of multicast
CN101459549A (en) * 2007-12-14 2009-06-17 华为技术有限公司 Link failure processing method and data forwarding device
CN101217457A (en) * 2007-12-28 2008-07-09 华为技术有限公司 A method to realize fast reroute and router
CN101277269A (en) * 2008-05-06 2008-10-01 杭州华三通信技术有限公司 Terminal with dependable communication, terminal switch method and system as well as method for implementing the system
WO2011100882A1 (en) * 2010-02-20 2011-08-25 中兴通讯股份有限公司 Link detecting method, apparatus and system
CN104767680A (en) * 2015-04-15 2015-07-08 杭州华三通信技术有限公司 Rapid route switch method and device
CN109039746A (en) * 2018-08-07 2018-12-18 新华三技术有限公司 Detect the method and processor of two-way converting path detection session status
CN109787839A (en) * 2019-02-28 2019-05-21 新华三技术有限公司 A kind of message forwarding method and device

Also Published As

Publication number Publication date
CN111654434A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
US20170091013A1 (en) Pcie error reporting and throttling
EP2352253A1 (en) Method and apparatus for protecting link aggregation group of ethernet ring
US10122618B2 (en) Path switching method and device
CN110730125B (en) Message forwarding method and device, dual-active system and communication equipment
WO2017215441A1 (en) Self-recovery method and apparatus for board configuration in distributed system
WO2018108149A1 (en) Data-link switching method and apparatus and data-link switching device
CN112217658B (en) Stacking and splitting processing method and device
JPWO2009090723A1 (en) Packet transmission equipment
CN113055196B (en) Message processing method, network device and computer readable storage medium
CN114157609B (en) PFC deadlock detection method and device
US11258666B2 (en) Method, device, and system for implementing MUX machine
JP2007180891A (en) Communication device, packet transmission control method used therefor, and program
CN110417761B (en) Communication method and device based on dual-computer redundancy
CN112532731B (en) Automatic optimization method and device for multiple market data sources
CN112787939B (en) Method and device for updating path forwarding table
EP2187582A1 (en) Transmission apparatus, transmission network, and method being employed thereof
CN111130943B (en) Method for realizing fast ring network switching, switch and computer readable storage medium
CN111654434B (en) Flow switching method and device and forwarding equipment
CN110213176B (en) Message processing method, device, equipment and medium of switch
CN111314432B (en) Message processing method and device
US7324438B1 (en) Technique for nondisruptively recovering from a processor failure in a multi-processor flow device
CN112217718A (en) Service processing method, device, equipment and storage medium
CN109361781B (en) Message forwarding method, device, server, system and storage medium
CN109039921B (en) Designated router switching method, multicast router and multicast network
JPH07152697A (en) Roughly coupled computer system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant