CN109995657B - Flow forwarding method and device - Google Patents

Flow forwarding method and device Download PDF

Info

Publication number
CN109995657B
CN109995657B CN201910209544.1A CN201910209544A CN109995657B CN 109995657 B CN109995657 B CN 109995657B CN 201910209544 A CN201910209544 A CN 201910209544A CN 109995657 B CN109995657 B CN 109995657B
Authority
CN
China
Prior art keywords
link
transmission quality
state
forwarding
target
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
CN201910209544.1A
Other languages
Chinese (zh)
Other versions
CN109995657A (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 Technologies Co Ltd Hefei Branch
Original Assignee
New H3C Technologies Co Ltd Hefei Branch
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 Technologies Co Ltd Hefei Branch filed Critical New H3C Technologies Co Ltd Hefei Branch
Priority to CN201910209544.1A priority Critical patent/CN109995657B/en
Publication of CN109995657A publication Critical patent/CN109995657A/en
Application granted granted Critical
Publication of CN109995657B publication Critical patent/CN109995657B/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/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/70Routing based on monitoring results

Abstract

The application provides a method and a device for forwarding traffic, wherein in the method, a first forwarding device receives a first flow specification message sent by a second forwarding device, and the first flow specification message comprises a transmission quality state of each link in at least two links between the first forwarding device and the second forwarding device and information of a second outgoing interface used for connecting each link on the second forwarding device; determining a target link of which the transmission quality state meets a preset requirement and a second target output interface used for connecting the target link on the second forwarding device in at least two links based on the transmission quality state of each link of the at least two links; after receiving the service flow, searching a first target output interface used for forwarding the service flow on the first forwarding equipment in a local routing table; and if the first target output interface is connected with the second target output interface through the target link, forwarding the service flow through the target link.

Description

Flow forwarding method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for forwarding traffic.
Background
In a Border Gateway Protocol (BGP) network, each router may have at least one egress interface, where if a BGP neighbor relationship is established between any two routers, at least one link may be formed through the respective egress interfaces, so as to forward a service traffic, where the service traffic may be understood as a data packet carrying service data. Specifically, a forwarding manner of the service traffic may be controlled based on a Flow Specification (Flow spec), where one of the routers may serve as a BGP Flow spec controller, and issue a Flow spec message to another router so as to notify a traffic matching rule and a corresponding traffic application action, and accordingly, after receiving the service traffic, the other router may determine whether the service traffic is in accordance with a certain traffic matching rule, and if so, further forward the service traffic based on a default next hop-out interface address defined in the corresponding traffic application action.
However, considering that the transmission quality of links corresponding to different egress interfaces in a router may be unstable, if the above scheme is adopted to forward the service traffic meeting a certain traffic matching rule according to a predefined default next-hop interface, and it is likely that the transmission quality of the link corresponding to the default next-hop interface is poor, the service traffic is forwarded through the link, which is difficult to meet the requirement on the transmission quality in some services.
Disclosure of Invention
In view of this, an object of the present application is to provide a method and an apparatus for forwarding traffic to improve transmission quality of service traffic.
In a first aspect, the present application provides a method for forwarding traffic, which is applied to a first forwarding device, and includes:
receiving a first flow specification message sent by a second forwarding device, where the first flow specification message includes a transmission quality state of each link in at least two links between the first forwarding device and the second forwarding device, and information of a second outgoing interface on the second forwarding device, where the second outgoing interface is used to connect each link;
determining a target link in the at least two links, the transmission quality state of which meets a preset requirement, and a second target output interface, which is used for connecting the target link, on the second forwarding device, based on the transmission quality state of each of the at least two links;
after receiving the service flow, searching a first target output interface used for forwarding the service flow on the first forwarding equipment in a local routing table;
and if the first target output interface is connected with the second target output interface through the target link, forwarding the service flow through the target link.
In some embodiments of the application, the determining, based on the transmission quality status of each of the at least two links, a target link of the at least two links whose transmission quality status meets a preset requirement and a second target outgoing interface on the second forwarding device, where the second target outgoing interface is used to connect the target link, includes:
if a link to be detected with a transmission quality state set to be a first state exists in the at least two links, detecting the link to be detected;
determining a detection result by comparing the detected transmission quality parameter with a preset detection parameter carried in the first flow specification message; if the detection result is successful, updating the transmission quality state of the link to be detected to a second state; if the detection result is detection failure, updating the transmission quality state of the link to be detected to a third state;
determining a target link of the at least two links, the transmission quality state of which meets a preset requirement, and a second target output interface of the second forwarding device, the second target output interface being used for connecting the target link, based on the detected transmission quality state of each link;
the first state is used for indicating that the link is not detected, the second state is used for indicating that the transmission quality of the link meets a preset requirement, and the third state is used for indicating that the transmission quality of the link does not meet the preset requirement.
In some embodiments of the present application, the method further comprises:
and after the link to be detected is detected, sending a second flow specification message to the second forwarding device, wherein the second flow specification message comprises the transmission quality state of each detected link.
In some embodiments of the present application, determining a target link of the at least two links whose transmission quality status meets a preset requirement according to the following manner includes:
determining a link of which the transmission quality state is a second state in the at least two links; the second state is used for indicating that the transmission quality of the link meets a preset requirement;
if the link with the transmission quality state set as the second state is one, taking one link with the transmission quality state set as the second state as the target link;
and if the number of the links with the transmission quality states set as the second states is at least two, selecting the target link from the at least two links with the transmission quality states set as the second states based on a preset strategy.
In some embodiments of the present application, the method further comprises:
if any one of the following conditions is met, forwarding the service flow based on the routing table entry recorded in the local routing table; wherein any one of the conditions is:
the link with the transmission quality state set as a second state does not exist in the at least two links; or the first target output interface is not connected with the second target output interface through the target link.
In a second aspect, the present application provides a method for forwarding traffic, which is applied to a second forwarding device, and includes:
sending a first flow specification message to a first forwarding device, where the first flow specification message includes a transmission quality state of each link in at least two links between the first forwarding device and the second forwarding device, and information of a second outgoing interface on the second forwarding device, where the second outgoing interface is used to connect each link;
if a link to be detected with a transmission quality state set to be a first state exists in the at least two links, after the first forwarding device detects the link to be detected, receiving a second flow specification message sent by the first forwarding device, where the second flow specification message includes the detected transmission quality state of each link;
determining a target link in each link, the transmission quality state of which meets a preset requirement, and a second target output interface, which is used for connecting the target link, on the second forwarding device, based on the detected transmission quality state of each link;
after receiving the service flow, looking up a second outgoing interface used for forwarding the service flow on the second forwarding device in a local routing table;
and if the second outgoing interface used for forwarding the service flow is connected with the second target outgoing interface through the target link, forwarding the service flow through the target link.
In a third aspect, the present application provides a device for forwarding traffic, including:
a receiving module, configured to receive a first flow specification packet sent by a second forwarding device, where the first flow specification packet includes a transmission quality state of each of at least two links between the first forwarding device and the second forwarding device, and information of a second outgoing interface on the second forwarding device, where the second outgoing interface is used to connect each link;
a determining module, configured to determine, based on a transmission quality state of each of the at least two links, a target link in the at least two links, where the transmission quality state meets a preset requirement, and a second target outgoing interface, which is used for connecting the target link, on the second forwarding device;
the searching module is used for searching a first target output interface used for forwarding the service flow on the first forwarding equipment in a local routing table after receiving the service flow;
and a traffic forwarding module, configured to forward the service traffic through the target link if the first target output interface is connected to the second target output interface through the target link.
In some embodiments of the present application, the determining module is specifically configured to:
if a link to be detected with a transmission quality state set to be a first state exists in the at least two links, detecting the link to be detected;
determining a detection result by comparing the detected transmission quality parameter with a preset detection parameter carried in the first flow specification message; if the detection result is successful, updating the transmission quality state of the link to be detected to a second state; if the detection result is detection failure, updating the transmission quality state of the link to be detected to a third state;
determining a target link of the at least two links, the transmission quality state of which meets a preset requirement, and a second target output interface of the second forwarding device, the second target output interface being used for connecting the target link, based on the detected transmission quality state of each link;
the first state is used for indicating that the link is not detected, the second state is used for indicating that the transmission quality of the link meets a preset requirement, and the third state is used for indicating that the transmission quality of the link does not meet the preset requirement.
In some embodiments of the present application, the apparatus further comprises:
and the sending module is used for sending a second flow specification message to the second forwarding device after the link to be detected is detected, wherein the second flow specification message comprises the transmission quality state of each detected link.
In some embodiments of the present application, the determining module is specifically configured to:
determining a link of which the transmission quality state is a second state in the at least two links; the second state is used for indicating that the transmission quality of the link meets a preset requirement;
if the link with the transmission quality state set as the second state is one, taking one link with the transmission quality state set as the second state as the target link;
and if the number of the links with the transmission quality states set as the second states is at least two, selecting the target link from the at least two links with the transmission quality states set as the second states based on a preset strategy.
In some embodiments of the present application, the traffic forwarding module is further configured to:
if any one of the following conditions is met, forwarding the service flow based on the routing table entry recorded in the local routing table; wherein any one of the conditions is:
the link with the transmission quality state set as a second state does not exist in the at least two links; or the first target output interface is not connected with the second target output interface through the target link.
In a fourth aspect, the present application provides another apparatus for forwarding traffic, including:
a sending module, configured to send a first flow specification packet to a first forwarding device, where the first flow specification packet includes a transmission quality state of each of at least two links between the first forwarding device and the second forwarding device, and information of a second outgoing interface on the second forwarding device, where the second outgoing interface is used to connect each link;
a receiving module, configured to receive, after the first forwarding device detects the link to be detected if a link to be detected exists in the at least two links, where a transmission quality state of the link to be detected is a first state, a second flow specification packet sent by the first forwarding device, where the second flow specification packet includes a transmission quality state of each detected link;
a determining module, configured to determine, based on the detected transmission quality state of each link, a target link in each link, where the transmission quality state meets a preset requirement, and a second target output interface, which is used for connecting the target link, on the second forwarding device;
the searching module is used for searching a second output interface used for forwarding the service flow on the second forwarding equipment in a local routing table after receiving the service flow;
and the traffic forwarding module is configured to forward the service traffic through the target link if a second outgoing interface used for forwarding the service traffic is connected to the second target outgoing interface through the target link.
In a fifth aspect, the present application provides an electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the method of traffic forwarding as described in the first aspect above or performing the steps of the method of traffic forwarding as described in the second aspect above.
In a sixth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method for traffic forwarding as described in the first aspect above, or performs the steps of the method for traffic forwarding as described in the second aspect above.
In this embodiment of the application, by adding a field for indicating a link selection manner in a flowspec message, a first forwarding device may determine a transmission quality state of each link between the first forwarding device and a second forwarding device based on a parameter defined in the newly added field in the flowspec message sent by the second forwarding device, and select a target link whose transmission quality meets a preset requirement based on the transmission quality state of each link, and further, after receiving a service traffic, the first forwarding device may determine whether the service traffic matches the target link by determining whether a first target outgoing interface for forwarding the service traffic is connected to a second target outgoing interface of the second forwarding device through the target link, and may forward the service traffic matching the target link through the target link, thereby improving the transmission quality of the service traffic.
In order to make the aforementioned and other objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic flowchart illustrating a method for forwarding traffic according to an embodiment of the present application;
FIG. 2 is a schematic diagram illustrating an application scenario provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram illustrating a traffic forwarding apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram illustrating another traffic forwarding apparatus provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 6 shows a schematic structural diagram of another electronic device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
The method and the device can be applied to the scene of determining the link for transmitting the service flow in the BGP network. Currently, when a router in a BGP network forwards traffic, a link for transmitting the traffic may be determined based on a traffic matching rule indicated in flowspec and a corresponding traffic application action. However, it should be noted that links corresponding to each type of traffic flow are generally configured in flowspec, and after determining the type of the traffic flow based on the traffic matching rule, the router may directly forward the traffic flow based on the links configured in the traffic application action. Because the transmission quality of the links corresponding to different outgoing interfaces in the router may be unstable, the method of forwarding the service traffic based on the pre-configured link may cause a problem of poor transmission quality of the service traffic.
For example, for a router (router) # a and a router # B that have established a BGP neighbor relationship, a link #1 may be formed between an egress interface # a1 of the router # a and an egress interface # B1 of the router # B, and a link #2 may be formed between an egress interface # a2 of the router # a and an egress interface # B2 of the router # B, and if a network anomaly situation occurs in the Flowspec, forwarding is performed by using the link #1 for a certain type of traffic flow, and if a network anomaly occurs in the link #1, problems such as a high network delay or a high packet loss rate may occur when the router # a or the router # B forwards the type of traffic flow, resulting in poor transmission quality.
In view of the above problems, the present application provides a method and an apparatus for forwarding traffic, where a field for indicating a link selection manner is newly added to a flowspec, so that a router may determine a transmission quality state of each link based on a parameter defined in the newly added field in the flowspec, and select a link for transmitting traffic based on the transmission quality state of each link, so that the router may intelligently select a link to transmit traffic, thereby improving the transmission quality of the traffic.
The following describes the traffic forwarding method provided in the present application in detail with reference to specific embodiments. It should be noted that, in the following embodiments, an interaction flow between any two forwarding devices that have established a BGP neighbor relationship in a BGP network is taken as an example to describe a traffic forwarding manner. The forwarding device may be any forwarding device with a routing function, such as a router. Taking a router as an example, any two routers may be directly connected, or may be connected through at least one router in between, for example, the router # a and the router # B may be directly connected, or the router # a and the router # B may also be connected through an intermediate router # C, that is, the router # a-the router # C-the router # B, which is not limited in this application. Moreover, the ordinal numbers such as "first," "second," etc., in the embodiments of the present application do not imply a certain order or importance, but merely serve to distinguish one feature from another.
Referring to fig. 1, a schematic flow chart of a method for forwarding traffic provided in an embodiment of the present application is shown, where the method includes the following steps:
step 101, the second forwarding device sends a first flowspec message to the first forwarding device.
In this embodiment, the second forwarding device may serve as a BGP flowspec controller, and send the first flowspec message to the first forwarding device, so as to notify the first forwarding device of a forwarding rule and the like when forwarding traffic.
A field for indicating a link selection mode is newly added in the first flowspec message, and the newly added field may have the following parameters:
(1) and the action identifier is used for identifying the link selection action. After recognizing the action identifier, the first forwarding device may perform a link selection action to intelligently determine a link for transmitting the traffic flow.
(2) The transmission quality status of the link.
At least two links can be formed between the first forwarding device and the second forwarding device. For example, it is assumed that the first forwarding device includes a first outgoing interface #11 and a first outgoing interface #12, and the second forwarding device includes a second outgoing interface #21 and a second outgoing interface #22, where one link #1 may be formed between the first outgoing interface #11 and the second outgoing interface #21, and another link #2 may be formed between the first outgoing interface #12 and the second outgoing interface # 22.
The newly added field may include a transmission quality status of each link to indicate whether the transmission quality of the link meets a preset requirement. In addition, since the link between the two forwarding devices may not be probed yet in the initial state, a state indicating that the link is not probed may be further included in the transmission quality state. For example, the transmission quality status of each link can be divided into three states: a first state for indicating that the link is not probed; the second state is used for indicating that the transmission quality of the link meets the preset requirement; and the third state is used for indicating that the transmission quality of the link does not meet the preset requirement.
In one possible embodiment, the transmission quality status of each link may be represented by an identification bit, and different transmission quality statuses may be represented by setting the identification bit to different values. For example, if the flag position is 1, it may be stated that the transmission quality of the link meets a preset requirement, if the flag position is 0, it may be stated that the transmission quality of the link does not meet the preset requirement, and if the flag position is 2, it may be stated that the link has not been detected yet and a detection process needs to be performed. Of course, in practical applications, different transmission quality states may also be configured according to different requirements, and the three types are not limited, and the specific value of the flag bit may be configured according to actual requirements, and the above value is merely an exemplary illustration and is not limiting.
(3) And the second forwarding equipment is used for connecting the information of the second outgoing interface of each link.
Since the different outgoing interface of each forwarding device may be identified by an Internet Protocol (IP) address and a port number, the information of the second outgoing interface on the second forwarding device for connecting each link may include the IP address and the port number of the second outgoing interface. For example, assuming that the second forwarding device is connected to the first target outgoing interface #11 of the first forwarding device through the second outgoing interface #21 to form the link #1, and the IP address of the second outgoing interface #21 is 100.1.1.1 and the port number is 60000, the information of the second outgoing interface #21 of the second forwarding device connected to the link #1 is the IP address 100.1.1.1 and the port number 60000.
In some embodiments of the present application, in order to facilitate instructing the first forwarding device to perform detection on each link, the field further includes preset detection parameters, such as a packet loss rate threshold, a transmission delay threshold, and the like, for detecting whether the transmission quality of each link meets a preset requirement. The preset detection parameters may be the same or different for different links, that is, the evaluation criteria for evaluating whether the transmission quality of each link meets the preset requirement are not necessarily the same, and by distinguishing the transmission qualities of different links, a link with better transmission quality may be determined for forwarding the service traffic with higher requirement on the transmission quality.
In addition, the first forwarding device and the second forwarding device may also be configured with the prediction detection parameter in advance, so that, if the first flowspec message does not carry the prediction detection parameter, whether the transmission quality of each link meets the preset requirement may also be determined based on the prediction detection parameter configured in advance locally.
Step 102, after receiving the first flowspec message, the first forwarding device determines, based on the transmission quality state of each of the at least two links carried in the first flowspec message, a target link of which the transmission quality state meets a preset requirement in the at least two links, and a second target outgoing interface on the second forwarding device, where the second target outgoing interface is used for connecting the target link.
In a specific implementation, if the first forwarding device identifies that there is a link to be detected in which the transmission quality state is the first state in at least two links, that is, there is a link that has not been detected, the first forwarding device may also start a detection process to detect each link to be detected.
For each link to be detected, the first forwarding device may send a detection packet to the second forwarding device through the link to be detected, and receive a response packet replied by the second forwarding device through the link to be detected. Through the detection process, the first forwarding device can detect transmission quality parameters such as transmission delay, packet loss rate and the like of the detection message in the transmission process.
Further, the detected transmission quality parameter may be compared with a preset detection parameter corresponding to the link to be detected, and a detection result is determined, for example, if the transmission quality parameter includes transmission delay and packet loss rate, and the preset detection parameter includes a transmission delay threshold and a packet loss rate threshold, by comparing the transmission delay and the transmission delay threshold, if the transmission delay is lower than the transmission delay threshold and the packet loss rate is lower than the packet loss rate threshold, it may be determined that the detection is successful, otherwise, it is determined that the detection is failed.
Further, if the detection result is that the detection is successful, the transmission quality state of the link to be detected can be set to be a second state; if the detection result is detection failure, the transmission quality state of the link to be detected may be set to the third state.
After the probing is completed, the first forwarding device may determine, based on the transmission quality states of the links after the probing, a target link of which the transmission quality states meet preset requirements in the at least two links, and a second target output interface of the second forwarding device connected to the target link. In a possible implementation manner, the first forwarding device may select, from the at least two links, a link whose transmission quality status is set to the second status as the target link by identifying the transmission quality status of each link.
If there is one link with the transmission quality state set as the second state, the link with the transmission quality state set as the second state may be used as the target link; and if the number of the links with the transmission quality states being the second states is at least two, selecting a target link from the at least two links with the transmission quality states being the second states based on a preset strategy. The prediction strategy may be to randomly select one link as a target link, or to use each link as a target link, so as to implement load balancing.
Step 103, after receiving the service traffic, the first forwarding device searches a first target outgoing interface for forwarding the service traffic on the first forwarding device in the local routing table.
The entry content recorded in the local routing table includes, but is not limited to, a corresponding relationship between a destination address, egress interface information, and next hop egress interface information.
In a specific implementation, since there are a plurality of first egress interfaces of the first forwarding device, and a link corresponding to each first egress interface does not necessarily correspond to a link connected to the second forwarding device, nor corresponds to a target link connected to the second forwarding device, the first forwarding device may find information of the first egress interface corresponding to the destination address of the service traffic in the local routing table, so as to determine the first target egress interface on the first forwarding device for forwarding the service traffic.
And step 104, if the first target output interface is connected with the second target output interface through the target link, the first forwarding equipment forwards the service flow through the target link.
In a specific implementation, if the first target outgoing interface is connected to the second target outgoing interface through the target link, it may be said that the service traffic is matched with the target link, that is, after being forwarded through the first target outgoing interface of the first forwarding device, the service traffic may pass through the target link, reach the second target outgoing interface of the second forwarding device, and be received by the second forwarding device.
In the above flow, in the process of forwarding the service traffic, there may be some service traffic that does not match the target link, that is, the target link cannot be selected to forward the service traffic, and in this case, the service traffic may be forwarded based on a common routing rule.
For example, the first forwarding device may forward the traffic based on the routing table entry recorded in the local routing table if any one of the following conditions is satisfied. Wherein any one of the conditions is:
the method comprises the following steps that 1, no link with a transmission quality state set as a second state exists in at least two links;
condition 2, the first target output interface is not connected with the second target output interface through the target link;
and 3, the information of the second target outgoing interface is not found in the local routing table.
In this embodiment of the application, by adding a field for indicating a link selection manner in a flowspec message, a first forwarding device may determine a transmission quality state of each link between the first forwarding device and a second forwarding device based on a parameter defined in the newly added field in the flowspec message sent by the second forwarding device, and select a target link whose transmission quality meets a preset requirement based on the transmission quality state of each link, and further, after receiving a service traffic, the first forwarding device may determine whether the service traffic matches the target link by determining whether a first target outgoing interface for forwarding the service traffic is connected to a second target outgoing interface of the second forwarding device through the target link, and may forward the service traffic matching the target link through the target link, thereby improving the transmission quality of the service traffic.
In addition, in this embodiment of the application, after the step 102 is executed, that is, after the first forwarding device completes the detection of the link to be detected, the transmission quality state of the corresponding link in the newly added field of the first flowspec packet may be updated based on the detection result, and the step 105 may also be executed, it should be noted that the execution sequence of the step 105 and the step 103 to the step 104 may not be sequential, which is not limited in this application.
And 105, the first forwarding device sends a second flowspec message to the second forwarding device, wherein the second flowspec message contains the detected transmission quality state of each link.
The content of the flowspec entry included in the second flowspec message can be the same as the updated entry content in the first flowspec message.
Correspondingly, after receiving the second flowspec message, the second forwarding device may determine a target link based on the detected transmission quality state of each link, and forward the service traffic matched with the target link through the target link, where a process of selecting the target link and forwarding the service traffic by the second forwarding device may refer to the forwarding process executed by the first forwarding device, and a description thereof is not repeated here.
In the embodiment of the application, the detection result is synchronized to the second forwarding device, and the second forwarding device does not need to repeatedly execute the detection process. Moreover, since the second forwarding device serves as a BGP flowspec controller and may issue the first flowspec message to multiple first forwarding devices, if the second forwarding device initiates a detection process to each first forwarding device, the detection pressure of the second forwarding device may be large.
In order to facilitate understanding of the foregoing embodiments provided in the present application, the following provides an exemplary description of a traffic forwarding method provided in the present application in conjunction with the foregoing specific implementation and specific application scenarios.
Referring to the application scenario diagram shown in fig. 2, the application is applied to a BGP network, where BGP neighbor relationships are respectively established between router # a and router # C, router # a and router # D, a link #1 is formed between an outgoing interface # a1 of router # a and an outgoing interface # C1 of router # C, a link #2 is formed between an outgoing interface # a2 of router # a and an outgoing interface # C2 of router # C, a link #3 is formed between an outgoing interface # a1 of router # a and an outgoing interface # D1 of router # D, and a link #4 is formed between an outgoing interface # a2 of router # a and an outgoing interface # D2 of router # D.
With router # a as the second forwarding device and router # C as the first forwarding device, assume that IP addresses of egress interface # a1 and egress interface # a2 of router # a are 100.1.1.1 and 200.1.1.1, respectively, and port numbers are 60000 and 60001, respectively, IP addresses of egress interface # C1 and egress interface # C2 of router # C are 101.1.1.1 and 201.1.1.1, respectively, and port numbers are 60000 and 60001, respectively. Further, assume that the IP address of the egress interface connected to router # a on router # G is 1.1.1.1 and the IP address of the egress interface connected to router # C on router # E is 2.2.2.2.
Then, the interaction flow between router # a and router # C includes the following steps:
first, the router # a serves as a BGP flowspec controller, and transmits a first flowspec packet to the router # C.
And a field for indicating a link selection mode is newly added in the first flowspec message.
For example, the newly added field may adopt a tag-length-value (TLV) structure, and the specific format is, for example:
<type,length,(length,rir-flag),(length,rir-addr),(length,rir-port),(length,rir-pa ra)>。
wherein, the type field identifies the link selection action and can be filled with 0x800 a; rir-flag field is used to mark the transmission quality state of link, setting 1 to mark that the transmission quality of link meets the preset requirement, setting 0 to mark that the transmission quality of link does not meet the preset requirement, and setting 2 to mark that the link is not detected; rir-addr field is used to identify the specific address path for detecting link quality, i.e. the second outgoing interface IP address of the second forwarding device; rir-port field is used to identify the listening port that detects the link quality, i.e. the port number of the second outgoing interface of the second forwarding device; the rir-para field is used to indicate the required parameter for identifying the link quality, i.e. the above-mentioned preset detection parameter, wherein the rir-para field may or may not be present. length identifies the length occupied by each type of field.
For example, for a link #1 and a link #2 between a router # a and a router # C, the new fields in the first flowspec message are:
Apply<Type0x800a,(rir-flag2),(rir-addr100.1.1.1),(rir-port 60000)>;
Apply<Type0x800a,(rir-flag2),(rir-addr200.1.1.1),(rir-port 60001)>。
here, the transmission quality status of link #1 and link #2 is set to 2, which indicates that link #1 and link #2 have not been probed.
In addition, the first flowspec message may further include a Flow _ spec _ nlri (1.1.1.1,2.2.2.2) field, which is an original field in the first flowspec message and may be used to match characteristics of the service traffic, and apply a corresponding link selection action for a specific service traffic. Such as traffic flows specifying destination addresses of 1.1.1.1 and 2.2.2.2, perform link selection actions.
Then, after the router # a sends the first flowspec message, it may automatically invoke a Network Quality analysis (nqa) module, and listen to the nqa probe message whose destination address is 100.1.1.1 through the port number 60000; the nqa probe message with destination address 200.1.1.1 is listened to through port number 60001.
Further, after receiving the first flowspec message, router # C recognizes that the transmission quality states of link #1 and link #2 are set to 2, may invoke nqa module, and initiate nqa probing to destination address 100.1.1.1 and destination address 200.1.1.1 through port number 60000 and port number 60001, respectively. If both link #1 and link #2 are successfully probed, the transmission quality status of link #1 and link #2 may be set to 1, whereas if both link #1 and link #2 are unsuccessfully probed, the transmission quality status of link #1 and link #2 may be set to 0.
The specific detection process may be implemented by referring to the detection process described in fig. 1, and will not be described herein.
Further, after the router # C executes the detection process, a second flowspec message may be sent to the router # a. Wherein, the content carried in the second flowspec message includes:
Apply<Type0x800a,(rir-flag1,(rir-addr100.1.1.1),(rir-port 60000)>;
Apply<Type0x800a,(rir-flag1),(rir-addr200.1.1.1),(rir-port 60001)>。
in addition, the second flowspec message also includes an original field, and a description thereof will not be provided.
Further, after the router # a and the router # C have determined the transmission quality states of the two connected links, after receiving the service traffic, the traffic forwarding flows respectively executed by the router # a and the router # C are as follows:
for router # C:
the router # C determines that the transmission quality states of the two links connected to the router # a are set to 1, that is, the link #1 and the link #2 are target links, the second target egress interfaces of the router # a, which are respectively connected to the link #1 and the link #2, are an egress interface # a1 and an egress interface # a2, and the corresponding information is 100.1.1.1, 60000, 200.1.1.1, and 60001.
After receiving the service traffic, router # C may identify a destination address of the service traffic, and if the destination address of the service traffic is not the destination address 1.1.1.1 or 2.2.2.2 specified in the flowspec message, the service traffic is directly forwarded through a common routing rule.
If the destination address of the service traffic is the destination address specified in the flowspec message, the first outgoing interface information corresponding to the destination address of the service traffic can be further searched in the local routing table, so that the router # C determines from which first target outgoing interface the service traffic is forwarded.
In an example, if the destination address of the received traffic is 1.1.1.1, the destination address is determined to correspond to the egress interface # C1 with the IP address of 101.1.1.1 and the egress interface # C2 with the IP address of 201.1.1.1 by looking up the local routing table, because the egress interface # C1 is connected to the egress interface # a1 through the link #1, and the egress interface # C2 is connected to the egress interface # a2 through the link #2, it is stated that the traffic matches the link #1 and the link #2, and the traffic can be forwarded through at least one of the link #1 and the link # 2.
In another example, if the destination address of the received traffic flow is 2.2.2.2, it is determined that the outgoing interface corresponding to the destination address is not the outgoing interface # C1 with the IP address of 101.1.1.1 and the outgoing interface # C2 with the IP address of 201.1.1.1 by looking up the local routing table, then the outgoing interface corresponding to the destination address cannot be connected to the outgoing interface # a1 through the link #1, and cannot be connected to the outgoing interface # a2 through the link #2, so that the traffic flow is not matched with the link #1 and the link #2, and can be forwarded through a normal routing rule.
For router # a:
router # A determines that link #1 and link #2 are target links, the second target output interfaces of Router # A respectively connecting link #1 and link #2 are output interface # A1 and output interface # A2, and the corresponding information is 100.1.1.1, 60000, 200.1.1.1 and 60001.
After receiving the service traffic, the router # a can identify the destination address of the service traffic, and if the destination address of the service traffic is not the destination address 1.1.1.1 or 2.2.2.2 specified in the flowspec message, the service traffic is directly forwarded through a common routing rule.
If the destination address of the service traffic is the designated destination address, second outgoing interface information corresponding to the destination address of the service traffic may be further looked up in the local routing table, so that router # a determines from which second outgoing interface the service traffic is forwarded.
In an example, if the destination address of the received traffic is 2.2.2.2, by looking up the local routing table, it is determined that the destination address corresponds to the outbound interface # a1 with the IP address of 100.1.1.1 and the outbound interface # a2 with the IP address of 200.1.1.1, because the outbound interface # a1 belongs to a direct connection interface, that is, the outbound interface # a1 is directly connected to itself through the link #1, and the outbound interface # a2 also belongs to a direct connection interface, that is, the outbound interface # a2 is directly connected to itself through the link #2, in this case, the traffic is also considered to be matched with the target link, and the traffic may also be forwarded by using at least one of the link #1 and the link # 2.
In another example, if the destination address of the received traffic flow is 1.1.1.1, the local routing table is searched to determine that the outgoing interface corresponding to the destination address is not the outgoing interface # a1 with the IP address of 100.1.1.1 and the outgoing interface # a2 with the IP address of 200.1.1.1, in this case, it indicates that the traffic flow does not match the target link, and the traffic flow may be forwarded through the normal routing rule.
Thus, the router # a and the router # C can select a target link with higher transmission quality through a link selection action, and then can forward the service traffic matched with the target link through the target link, so that the transmission quality of the service traffic can be improved.
Based on the same technical concept, a traffic forwarding device corresponding to the traffic forwarding method is also provided in the embodiments of the present application, and because the principle of solving the problem of the traffic forwarding device in the embodiments of the present application is similar to that of the traffic forwarding method in the embodiments of the present application, the implementation of the device may refer to the implementation of the method, and repeated details are not described again.
Referring to fig. 3, which is a schematic structural diagram of a traffic forwarding apparatus provided in an embodiment of the present application, a traffic forwarding apparatus 30 includes:
a receiving module 31, configured to receive a first flow specification packet sent by a second forwarding device, where the first flow specification packet includes a transmission quality state of each of at least two links between the first forwarding device and the second forwarding device, and information of a second outgoing interface on the second forwarding device, where the second outgoing interface is used to connect each link;
a determining module 32, configured to determine, based on a transmission quality state of each of the at least two links, a target link in the at least two links, where the transmission quality state meets a preset requirement, and a second target outgoing interface, which is used for connecting the target link, on the second forwarding device;
the searching module 33 is configured to, after receiving a service traffic, search a first target outgoing interface, used for forwarding the service traffic, on the first forwarding device in a local routing table;
a traffic forwarding module 34, configured to forward the service traffic through the target link if the first target outgoing interface is connected to the second target outgoing interface through the target link.
In some embodiments of the present application, the determining module 32 is specifically configured to:
if a link to be detected with a transmission quality state set to be a first state exists in the at least two links, detecting the link to be detected;
determining a detection result by comparing the detected transmission quality parameter with a preset detection parameter carried in the first flow specification message; if the detection result is successful, updating the transmission quality state of the link to be detected to a second state; if the detection result is detection failure, updating the transmission quality state of the link to be detected to a third state;
determining a target link of the at least two links, the transmission quality state of which meets a preset requirement, and a second target output interface of the second forwarding device, the second target output interface being used for connecting the target link, based on the detected transmission quality state of each link;
the first state is used for indicating that the link is not detected, the second state is used for indicating that the transmission quality of the link meets a preset requirement, and the third state is used for indicating that the transmission quality of the link does not meet the preset requirement.
In some embodiments of the present application, the apparatus 30 for forwarding traffic further includes:
a sending module 35, configured to send a second flow specification packet to the second forwarding device after the link to be detected is detected, where the second flow specification packet includes the transmission quality state of each detected link.
In some embodiments of the present application, the determining module 32 is specifically configured to:
determining a link of which the transmission quality state is a second state in the at least two links; the second state is used for indicating that the transmission quality of the link meets a preset requirement;
if the link with the transmission quality state set as the second state is one, taking one link with the transmission quality state set as the second state as the target link;
and if the number of the links with the transmission quality states set as the second states is at least two, selecting the target link from the at least two links with the transmission quality states set as the second states based on a preset strategy.
In some embodiments of the present application, the traffic forwarding module 34 is further configured to:
if any one of the following conditions is met, forwarding the service flow based on the routing table entry recorded in the local routing table; wherein any one of the conditions is:
the link with the transmission quality state set as a second state does not exist in the at least two links; or the first target output interface is not connected with the second target output interface through the target link.
For specific functions and interaction modes of the modules, reference may be made to related contents in the above method embodiments, and details are not described herein.
Referring to fig. 4, which is a schematic structural diagram of another traffic forwarding apparatus provided in an embodiment of the present application, a traffic forwarding apparatus 40 includes:
a sending module 41, configured to send a first flow specification packet to a first forwarding device, where the first flow specification packet includes a transmission quality state of each of at least two links between the first forwarding device and the second forwarding device, and information of a second outgoing interface on the second forwarding device, where the second outgoing interface is used to connect each link;
a receiving module 42, configured to receive, after the first forwarding device detects the link to be detected, a second flow specification packet sent by the first forwarding device if a link to be detected exists in the at least two links, where a transmission quality state of the link to be detected is set to be a first state, where the second flow specification packet includes a transmission quality state of each detected link;
a determining module 43, configured to determine, based on the detected transmission quality states of the links, a target link in each link, where the transmission quality state meets a preset requirement, and a second target output interface, which is used for connecting the target link, on the second forwarding device;
a searching module 44, configured to search, after receiving a service traffic, a second outgoing interface on the second forwarding device for forwarding the service traffic in a local routing table;
a traffic forwarding module 45, configured to forward the service traffic through the target link if a second outgoing interface used for forwarding the service traffic is connected to the second target outgoing interface through the target link.
For specific functions and interaction modes of the modules, reference may be made to related contents in the above method embodiments, which are not described herein again.
Corresponding to the foregoing method embodiment, an electronic device is further provided in this embodiment of the present application, and referring to a schematic structural diagram shown in fig. 5, where the device 50 includes a processor 51, a memory 52, and a bus 53, where the memory 52 stores an execution instruction, when the device 50 runs, the processor 51 communicates with the memory 52 through the bus 53, and the processor 51 executes the execution instruction stored in the memory 52, so that the device 50 executes steps of a method executed by a first forwarding device in a method for implementing the foregoing traffic forwarding.
Corresponding to the foregoing method embodiment, an embodiment of the present application further provides another electronic device, and referring to a schematic structural diagram shown in fig. 6, the device 60 includes a processor 61, a memory 62, and a bus 63, where the memory 62 stores an execution instruction, when the device 60 runs, the processor 61 communicates with the memory 62 through the bus 63, and the processor 61 executes the execution instruction stored in the memory 62, so that the device 60 executes steps of a method executed by a second forwarding device in the method for implementing the foregoing traffic forwarding.
The present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the method for forwarding traffic in the foregoing method embodiments.
The computer program product of the traffic forwarding method provided in the embodiment of the present application includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the steps of the method described in the foregoing method embodiment, which may be specifically referred to in the foregoing method embodiment, and details are not described here again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application 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 the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (14)

1. A method for forwarding traffic is applied to a first forwarding device, and is characterized by comprising the following steps:
receiving a first flow specification message sent by a second forwarding device, where the first flow specification message includes a transmission quality state of each link in at least two links between the first forwarding device and the second forwarding device, and information of a second outgoing interface on the second forwarding device, where the second outgoing interface is used to connect each link; the transmission quality state includes three states: a first state for indicating that the link is not probed; the second state is used for indicating that the transmission quality of the link meets the preset requirement; a third state for indicating that the transmission quality of the link does not meet the preset requirement;
determining a target link in the at least two links, the transmission quality state of which meets a preset requirement, and a second target output interface, which is used for connecting the target link, on the second forwarding device, based on the transmission quality state of each of the at least two links;
after receiving the service flow, searching a first target output interface used for forwarding the service flow on the first forwarding equipment in a local routing table;
and if the first target output interface is connected with the second target output interface through the target link, forwarding the service flow through the target link.
2. The method of claim 1, wherein the determining, based on the transmission quality status of each of the at least two links, a target link of the at least two links whose transmission quality status meets a preset requirement and a second target outgoing interface on the second forwarding device for connecting to the target link comprises:
if a link to be detected with a transmission quality state set to be a first state exists in the at least two links, detecting the link to be detected;
determining a detection result by comparing the detected transmission quality parameter with a preset detection parameter carried in the first flow specification message; if the detection result is successful, updating the transmission quality state of the link to be detected to a second state; if the detection result is detection failure, updating the transmission quality state of the link to be detected to a third state;
determining a target link of the at least two links, the transmission quality state of which meets a preset requirement, and a second target output interface of the second forwarding device, the second target output interface being used for connecting the target link, based on the detected transmission quality state of each link;
the first state is used for indicating that the link is not detected, the second state is used for indicating that the transmission quality of the link meets a preset requirement, and the third state is used for indicating that the transmission quality of the link does not meet the preset requirement.
3. The method of claim 2, wherein the method further comprises:
and after the link to be detected is detected, sending a second flow specification message to the second forwarding device, wherein the second flow specification message comprises the transmission quality state of each detected link.
4. The method according to claim 1 or 2, wherein determining a target link of the at least two links whose transmission quality status meets a preset requirement comprises:
determining a link of which the transmission quality state is a second state in the at least two links; the second state is used for indicating that the transmission quality of the link meets a preset requirement;
if the link with the transmission quality state set as the second state is one, taking the link with the transmission quality state set as the second state as the target link;
and if the number of the links with the transmission quality states set as the second states is at least two, selecting the target link from the at least two links with the transmission quality states set as the second states based on a preset strategy.
5. The method of claim 4, wherein the method further comprises:
if any one of the following conditions is met, forwarding the service flow based on the routing table entry recorded in the local routing table; wherein any one of the conditions is:
the link with the transmission quality state set as a second state does not exist in the at least two links; or the first target output interface is not connected with the second target output interface through the target link.
6. A method for forwarding traffic is applied to a second forwarding device, and is characterized by comprising the following steps:
sending a first flow specification message to a first forwarding device, where the first flow specification message includes a transmission quality state of each link in at least two links between the first forwarding device and the second forwarding device, and information of a second outgoing interface on the second forwarding device, where the second outgoing interface is used to connect each link; the transmission quality state includes three states: a first state for indicating that the link is not probed; the second state is used for indicating that the transmission quality of the link meets the preset requirement; a third state for indicating that the transmission quality of the link does not meet the preset requirement;
if a link to be detected with a transmission quality state set to be a first state exists in the at least two links, after the first forwarding device detects the link to be detected, receiving a second flow specification message sent by the first forwarding device, where the second flow specification message includes the detected transmission quality state of each link;
determining a target link in each link, the transmission quality state of which meets a preset requirement, and a second target output interface, which is used for connecting the target link, on the second forwarding device, based on the detected transmission quality state of each link;
after receiving the service flow, looking up a second outgoing interface used for forwarding the service flow on the second forwarding device in a local routing table;
and if the second outgoing interface used for forwarding the service flow is connected with the second target outgoing interface through the target link, forwarding the service flow through the target link.
7. An apparatus for traffic forwarding, comprising:
a receiving module, configured to receive a first flow specification packet sent by a second forwarding device, where the first flow specification packet includes a transmission quality state of each of at least two links between the first forwarding device and the second forwarding device, and information of a second outgoing interface on the second forwarding device, where the second outgoing interface is used to connect each link; the transmission quality state includes three states: a first state for indicating that the link is not probed; the second state is used for indicating that the transmission quality of the link meets the preset requirement; a third state for indicating that the transmission quality of the link does not meet the preset requirement;
a determining module, configured to determine, based on a transmission quality state of each of the at least two links, a target link in the at least two links, where the transmission quality state meets a preset requirement, and a second target outgoing interface, which is used for connecting the target link, on the second forwarding device;
the searching module is used for searching a first target output interface used for forwarding the service flow on the first forwarding equipment in a local routing table after receiving the service flow;
and a traffic forwarding module, configured to forward the service traffic through the target link if the first target output interface is connected to the second target output interface through the target link.
8. The apparatus of claim 7, wherein the determination module is specifically configured to:
if a link to be detected with a transmission quality state set to be a first state exists in the at least two links, detecting the link to be detected;
determining a detection result by comparing the detected transmission quality parameter with a preset detection parameter carried in the first flow specification message; if the detection result is successful, updating the transmission quality state of the link to be detected to a second state; if the detection result is detection failure, updating the transmission quality state of the link to be detected to a third state;
determining a target link of the at least two links, the transmission quality state of which meets a preset requirement, and a second target output interface of the second forwarding device, the second target output interface being used for connecting the target link, based on the detected transmission quality state of each link;
the first state is used for indicating that the link is not detected, the second state is used for indicating that the transmission quality of the link meets a preset requirement, and the third state is used for indicating that the transmission quality of the link does not meet the preset requirement.
9. The apparatus of claim 8, wherein the apparatus further comprises:
and the sending module is used for sending a second flow specification message to the second forwarding device after the link to be detected is detected, wherein the second flow specification message comprises the transmission quality state of each detected link.
10. The apparatus of claim 7 or 8, wherein the determining module is specifically configured to:
determining a link of which the transmission quality state is a second state in the at least two links; the second state is used for indicating that the transmission quality of the link meets a preset requirement;
if the link with the transmission quality state set as the second state is one, taking the link with the transmission quality state set as the second state as the target link;
and if the number of the links with the transmission quality states set as the second states is at least two, selecting the target link from the at least two links with the transmission quality states set as the second states based on a preset strategy.
11. The apparatus of claim 10, wherein the traffic forwarding module is further configured to:
if any one of the following conditions is met, forwarding the service flow based on the routing table entry recorded in the local routing table; wherein any one of the conditions is:
the link with the transmission quality state set as a second state does not exist in the at least two links; or the first target output interface is not connected with the second target output interface through the target link.
12. An apparatus for traffic forwarding, comprising:
a sending module, configured to send a first flow specification packet to a first forwarding device, where the first flow specification packet includes a transmission quality state of each of at least two links between the first forwarding device and a second forwarding device, and information of a second outgoing interface on the second forwarding device, where the second outgoing interface is used to connect each link; the transmission quality state includes three states: a first state for indicating that the link is not probed; the second state is used for indicating that the transmission quality of the link meets the preset requirement; a third state for indicating that the transmission quality of the link does not meet the preset requirement;
a receiving module, configured to receive, after the first forwarding device detects the link to be detected if a link to be detected exists in the at least two links, where a transmission quality state of the link to be detected is a first state, a second flow specification packet sent by the first forwarding device, where the second flow specification packet includes a transmission quality state of each detected link;
a determining module, configured to determine, based on the detected transmission quality state of each link, a target link in each link, where the transmission quality state meets a preset requirement, and a second target output interface, which is used for connecting the target link, on the second forwarding device;
the searching module is used for searching a second output interface used for forwarding the service flow on the second forwarding equipment in a local routing table after receiving the service flow;
and the traffic forwarding module is configured to forward the service traffic through the target link if a second outgoing interface used for forwarding the service traffic is connected to the second target outgoing interface through the target link.
13. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the method of traffic forwarding according to any one of claims 1 to 5 or performing the steps of the method of traffic forwarding according to claim 6.
14. A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, performs the steps of the method for traffic forwarding according to any one of claims 1 to 5, or performs the steps of the method for traffic forwarding according to claim 6.
CN201910209544.1A 2019-03-19 2019-03-19 Flow forwarding method and device Active CN109995657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910209544.1A CN109995657B (en) 2019-03-19 2019-03-19 Flow forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910209544.1A CN109995657B (en) 2019-03-19 2019-03-19 Flow forwarding method and device

Publications (2)

Publication Number Publication Date
CN109995657A CN109995657A (en) 2019-07-09
CN109995657B true CN109995657B (en) 2021-06-08

Family

ID=67129201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910209544.1A Active CN109995657B (en) 2019-03-19 2019-03-19 Flow forwarding method and device

Country Status (1)

Country Link
CN (1) CN109995657B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112995065B (en) * 2019-12-16 2022-06-17 中国移动通信集团湖南有限公司 Internet flow control method and device and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1758632A (en) * 2005-11-11 2006-04-12 杭州华为三康技术有限公司 Method for selecting exit link according to flow and routing equipment of converting flow
CN102474462A (en) * 2009-07-30 2012-05-23 新泽西理工学院 Disseminating link state information to nodes of a network
CN102624584A (en) * 2012-03-01 2012-08-01 中兴通讯股份有限公司 Link detection method and link detection device
CN103957158A (en) * 2014-04-14 2014-07-30 华为技术有限公司 Determining method and device for flow forwarding path and communication system
CN105409169A (en) * 2014-05-30 2016-03-16 华为技术有限公司 Construction method, device and system for multi-path forwarding rules
CN106160800A (en) * 2016-06-22 2016-11-23 邦彦技术股份有限公司 Data transmission method and device
CN106452958A (en) * 2016-09-30 2017-02-22 中国联合网络通信集团有限公司 Flow control method and system, and centralized controller
CN107040942A (en) * 2016-02-04 2017-08-11 华为技术有限公司 Business Stream transmission method, apparatus and system
CN107547249A (en) * 2017-06-15 2018-01-05 新华三技术有限公司 Link switch-over method, device, SDN switch, controller and storage medium
CN108965137A (en) * 2018-07-20 2018-12-07 新华三技术有限公司 A kind of message processing method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7769885B1 (en) * 2003-05-23 2010-08-03 Juniper Networks, Inc. Determining liveness of protocols and interfaces
US20100150120A1 (en) * 2008-09-04 2010-06-17 Ludger Schlicht Mobile applications for a mobile, broadband, routable internet

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1758632A (en) * 2005-11-11 2006-04-12 杭州华为三康技术有限公司 Method for selecting exit link according to flow and routing equipment of converting flow
CN102474462A (en) * 2009-07-30 2012-05-23 新泽西理工学院 Disseminating link state information to nodes of a network
CN102624584A (en) * 2012-03-01 2012-08-01 中兴通讯股份有限公司 Link detection method and link detection device
CN103957158A (en) * 2014-04-14 2014-07-30 华为技术有限公司 Determining method and device for flow forwarding path and communication system
CN105409169A (en) * 2014-05-30 2016-03-16 华为技术有限公司 Construction method, device and system for multi-path forwarding rules
CN107040942A (en) * 2016-02-04 2017-08-11 华为技术有限公司 Business Stream transmission method, apparatus and system
CN106160800A (en) * 2016-06-22 2016-11-23 邦彦技术股份有限公司 Data transmission method and device
CN106452958A (en) * 2016-09-30 2017-02-22 中国联合网络通信集团有限公司 Flow control method and system, and centralized controller
CN107547249A (en) * 2017-06-15 2018-01-05 新华三技术有限公司 Link switch-over method, device, SDN switch, controller and storage medium
CN108965137A (en) * 2018-07-20 2018-12-07 新华三技术有限公司 A kind of message processing method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
《A guaranteed forwarding service for Differentiated Service architecture》;A. Norouzi 等;《2006 IEEE Conference on Computer Aided Control System Design, 2006 IEEE International Conference on Control Applications, 2006 IEEE International Symposium on Intelligent Control》;20061231;全文 *
《MPLS网络中一种基于博弈论的流量均衡机制》;郑映;《华中科技大学学报(自然科学版)》;20090630;全文 *
《流追踪:一种软件定义网络中的低开销的时延测量和路径追踪方法》;汪硕 等;《Frontiers of information Technology & Electronic Engineering》;20170320;全文 *

Also Published As

Publication number Publication date
CN109995657A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
US11563641B1 (en) Shifting network traffic from a network device
JP4840236B2 (en) Network system and node device
CN110401599B (en) Data packet processing method and device, storage medium and electronic device
CN112262549B (en) Robust node failure detection mechanism for SDN controller clusters
CN110798403B (en) Communication method, communication device and communication system
CN105812197A (en) Bit-forwarding ingress router, bit-forwarding router and operation administration maintenance detection method
US8452893B2 (en) Method and member device for traffic forwarding in a stacking apparatus
CN110113260B (en) Forwarding table updating method and device
CN112868214B (en) Coordinated load transfer OAM records within packets
US20210119906A1 (en) Loop Avoidance Communications Method, Device, and System
US11711243B2 (en) Packet processing method and gateway device
CN102325079B (en) Message transmission method and egress router
EP3229393A1 (en) Error code information transfer method, network device and communication system
CN107682261B (en) Flow forwarding method and device
US20130272141A1 (en) Transport system, central control computer, and transport method
CN113615132A (en) Fast flooding topology protection
CN109995657B (en) Flow forwarding method and device
CN108599980B (en) Fault diagnosis method and device
US20150281050A1 (en) Method for Adjacency Status Synchronization in Label Distribution Protocol
US20230116548A1 (en) Route Processing Method and Related Device
CN107547411B (en) Route processing method and device, electronic equipment and machine-readable storage medium
CN108540343B (en) Path detection method and device
US10129089B1 (en) Shifting network traffic
WO2018001127A1 (en) Transmission method, device and system, and computer readable storage medium
US10404652B2 (en) Communication device, communication method, and program

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