CN111314236A - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN111314236A
CN111314236A CN202010291364.5A CN202010291364A CN111314236A CN 111314236 A CN111314236 A CN 111314236A CN 202010291364 A CN202010291364 A CN 202010291364A CN 111314236 A CN111314236 A CN 111314236A
Authority
CN
China
Prior art keywords
target
message
load scheduling
forwarding
forwarded
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.)
Pending
Application number
CN202010291364.5A
Other languages
Chinese (zh)
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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202010291364.5A priority Critical patent/CN111314236A/en
Publication of CN111314236A publication Critical patent/CN111314236A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/123Evaluation of link metrics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Abstract

The application relates to a message forwarding method and device. The message forwarding method can comprise the steps of receiving a message to be forwarded and obtaining message characteristics of the message to be forwarded; determining a target load scheduling strategy matched with the message characteristics from the alternative load scheduling strategies, wherein the target load scheduling strategy comprises predefined forwarding conditions and a target outlet link; and forwarding the message to be forwarded through the target exit link under the condition that the health condition of the target exit link meets the forwarding condition. By the technical scheme, the network equipment can adopt independent load scheduling strategies aiming at messages of different applications, so that application-level link scheduling is realized, the link utilization rate is improved, forwarding pressure is prevented from being concentrated on part of links, and load balancing is facilitated.

Description

Message 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 a packet.
Background
In a network system, end-to-end message forwarding operation can be realized through the message forwarding function of network equipment. In some cases, packets for the same target IP address may be forwarded to the target device over multiple egress links defined by the network device. In the related art, when an egress link is selected for a received message, health detection may be performed on the egress link, and when the health detection passes, the message may be forwarded through the egress link, and when the health detection does not pass, all the messages may not be forwarded through the egress link, thereby increasing forwarding pressure of the egress link that passes the health detection.
Disclosure of Invention
The application provides a message forwarding method and a message forwarding device, which can adopt independent load scheduling strategies aiming at messages of different applications, thereby realizing link scheduling of application levels, improving the link utilization rate and avoiding forwarding pressure from concentrating on partial links.
According to a first aspect of the present application, a packet forwarding method is provided, which is applied to a network device, where alternative load scheduling policies corresponding to different applications are configured in the network device, and the method includes:
receiving a message to be forwarded and acquiring message characteristics of the message to be forwarded;
determining a target load scheduling strategy matched with the message characteristics from the alternative load scheduling strategies, wherein the target load scheduling strategy comprises predefined forwarding conditions and a target outlet link;
and forwarding the message to be forwarded through the target exit link under the condition that the health condition of the target exit link meets the forwarding condition.
According to a second aspect of the present application, there is provided a packet forwarding apparatus, applied to a network device, where alternative load scheduling policies corresponding to different applications are configured in the network device, including:
the receiving module is used for receiving the message to be forwarded and acquiring the message characteristics of the message to be forwarded;
the determining module is used for determining a target load scheduling strategy matched with the message characteristics from the alternative load scheduling strategies, wherein the target load scheduling strategy comprises a predefined forwarding condition and a target outlet link;
and the forwarding module is used for forwarding the message to be forwarded through the target outlet link under the condition that the health condition of the target outlet link meets the forwarding condition.
According to a third aspect of the present application, there is provided an electronic device comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the method of the first aspect as described above.
According to a fourth aspect of the present application, a computer-readable storage medium is proposed, having stored thereon computer instructions which, when executed by a processor, carry out the steps of the method according to the first aspect as described above.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
as can be seen from the foregoing embodiments, according to the feature of a packet, a target load scheduling policy may be matched in alternative load scheduling policies corresponding to different applications, and then according to a forwarding condition and a target egress link defined in the matched target load scheduling policy, it may be determined whether the packet to be forwarded may be forwarded through the selected target egress link, so that a scheme in which an independent target load scheduling policy is adopted for packets generated by different applications in the present application is implemented, so that the same target egress link may forward a packet generated by one part of applications while disallowing forwarding of a packet generated by another part of applications, thereby avoiding a situation in which the target egress link is completely unavailable in the related art, and facilitating implementation of load balancing.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a system architecture diagram illustrating a packet forwarding scenario, according to an example embodiment.
Fig. 2 is a flowchart illustrating a message forwarding method according to an example embodiment.
Fig. 3 is a flow chart illustrating another method of packet forwarding according to an example embodiment.
Fig. 4 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application.
Fig. 5 is a block diagram of a message forwarding apparatus according to an exemplary embodiment of the present application.
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 embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application 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 application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Fig. 1 is a system architecture diagram illustrating a packet forwarding scenario, according to an example embodiment. As shown in FIG. 1, the system architecture diagram may include a client L1, a client L2, a network device L3, and a server L4. The messages sent by the client L1 and the client L2 may be forwarded to the server L4 through the network device L2 for service processing. Still as shown in fig. 1, in this packet forwarding scenario, the network device L2 may forward the packet from the client L1 or the client L2 to the server L4 through the forwarding link R1; or, the network device L2 may also forward the packet from the client L1 or the client L2 to the server L4 through the forwarding link R2, and the network device 1 may specifically select the forwarding link according to the load condition.
In a related art, the network device L3 may select a forwarding link based on the health detection result. For example, assuming that the client L1 sends a message to the server L4 through the network device L3, after the network device L3 receives the message sent by the client L1, the forwarding link R1 and the forwarding link R2 may be subjected to health detection, respectively. If the health check of the forwarding link 1 fails, all the packets from the client 1 cannot be forwarded to the server L4 through the forwarding link R1, and in this case, if the health check of the forwarding link R2 passes, the forwarding pressure of the forwarding link 2 increases. Particularly, when the client L1 and the client L2 simultaneously send a message to the server L4 through the network device 3, since the forwarding link R1 does not allow the message to be forwarded, the forwarding pressure of the forwarding link R2 is further increased, which causes an increase in load on the forwarding link R2 and an increase in forwarding task weight.
Therefore, the present application solves the above-mentioned deficiencies in the related art by improving the way of forwarding packets by the network device. For further explanation of the present application, the following examples are provided. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments that can be derived from the embodiments given herein by a person of ordinary skill in the art are intended to be within the scope of the present disclosure. The technical solution of the present application will be described below with reference to examples.
Fig. 2 is a flowchart illustrating a message forwarding method according to an example embodiment. As shown in fig. 2, the packet forwarding method may be applied to a network device, and the network device is configured with alternative load scheduling policies corresponding to different applications; the message forwarding method may include the following steps:
step 201, receiving a message to be forwarded and obtaining message characteristics of the message to be forwarded.
In an embodiment, when receiving a packet to be forwarded, a network device may obtain a packet feature of the packet to be forwarded according to a pre-configured feature extraction rule. For example, five-tuple information of the message to be forwarded, such as a destination IP address, a source IP address, a destination port, a source port, and a transport protocol, may be extracted as the message characteristic of the message to be forwarded. For another example, part of the information in the five-tuple information may be used as a message feature, for example, a destination IP address, a destination port, and a protocol number of a message to be forwarded may be used as the message feature of the message to be forwarded, and of course, other combination forms may also be used, which is not limited in this application.
Step 202, determining a target load scheduling policy matched with the message characteristics from the alternative load scheduling policies, wherein the target load scheduling policy comprises predefined forwarding conditions and a target exit link.
In an embodiment, the ingress interface that receives the packet to be forwarded may be compared with ingress interface information defined in each alternative load scheduling policy configured in the network device, and when the ingress interface that receives the packet to be forwarded is the same as the ingress interface information defined in the one or more alternative load scheduling policies, the one or more alternative load scheduling policies may be determined as the effective load scheduling policy. When the network equipment has a plurality of interfaces, the effective load scheduling strategy possibly suitable for the message to be forwarded can be quickly screened out based on the matching condition of the input interfaces, compared with the method for matching by adopting message characteristics, the method can greatly save the consumed processing resources and accelerate the strategy screening speed. When the number of the effective load scheduling strategies is one, the effective load scheduling strategies can be determined as target load scheduling strategies; when the number of the effective load scheduling strategies is multiple, the target load scheduling strategy matched with the message characteristics can be determined from the multiple effective load scheduling strategies.
Taking the message characteristics including the destination IP address, the destination port, and the protocol number of the message to be forwarded as an example, the destination IP address, the destination port, and the protocol number defined in the payload scheduling policy may be matched with the acquired message characteristics one by one, and when the destination IP address defined in any payload scheduling policy and the destination IP address in the message characteristics are in the same network segment, and the destination port and the protocol number are the same, respectively, any payload scheduling policy may be determined as the target payload scheduling policy. It should be noted that: it is only described here that the message characteristics include a destination IP address, a destination port, and a protocol number, but actually, the message characteristics may also include one or two of the destination IP address, the destination port, and the protocol number, and the destination IP address defined in the matched target load scheduling policy and the destination IP address in the message characteristics are in the same network segment, and the destination port and the protocol number are respectively the same.
In the foregoing embodiments, the matched target load scheduling policy may include a predefined forwarding condition and a target egress link. Therefore, when the target load scheduling policy is matched according to the message characteristics, a target exit link capable of being used for forwarding the message to be forwarded and a forwarding condition corresponding to the message to be forwarded can be determined from the target load scheduling policy. When the message characteristics are matched with the target load scheduling strategy, indicating that the message to be forwarded belongs to the message generated by the application corresponding to the target load scheduling strategy; in other words, based on predefined alternative load scheduling policies corresponding to different applications, messages to be forwarded from each application can be accurately distinguished, and the corresponding messages to be forwarded are reasonably scheduled based on the matched target load scheduling policies, so that differentiated scheduling is realized for the messages generated by each application.
In one embodiment, when a plurality of target egress links are defined in the target load scheduling policy, each entry egress link may be sequentially selected for matching, and a packet to be forwarded is forwarded through the selected target egress link until the health condition of the selected target egress link satisfies the forwarding condition defined in the entry load scheduling policy.
In another embodiment, when there are multiple target load scheduling policies matching the message characteristics, the target egress links configured in the respective entry target load scheduling policies may be sequentially selected for matching until the health condition of the selected target egress link meets the forwarding condition defined in the target load scheduling policy.
In the above embodiments, the health condition of the target egress link may include at least one of a delay time length of the target egress link and a packet loss rate of the target egress link. For example, in one case, when the delay time of the selected target egress link is less than or equal to the preset delay time defined in the target load scheduling policy to which the entry mark egress link belongs, the message to be forwarded is forwarded through the selected target egress link; under another condition, when the packet loss rate of the selected target outlet link is less than or equal to the preset packet loss rate defined in the target load scheduling strategy to which the entry mark outlet link belongs, forwarding the message to be forwarded through the selected target outlet link; in another case, when the delay time of the selected target egress link is less than or equal to the preset delay time defined in the target load scheduling policy to which the entry mark egress link belongs, and the packet loss rate of the selected target egress link is less than or equal to the preset packet loss rate defined in the target load scheduling policy to which the entry mark egress link belongs, the packet to be forwarded is forwarded through the selected target egress link.
Step 203, forwarding the message to be forwarded through the target egress link when the health condition of the target egress link meets the forwarding condition.
In one embodiment, when the health condition of the selected target egress link meets a predefined forwarding condition, the message to be forwarded may be forwarded through the selected target egress link, otherwise, the next target egress link in the target load scheduling policy may be matched. When the target exit links corresponding to all target load scheduling policies matched with the message characteristics do not satisfy the forwarding condition, the message to be forwarded can be discarded.
In another embodiment, the real-time bandwidth of the selected target egress link may also be obtained, and when the real-time bandwidth of the selected target egress link is less than or equal to a preset bandwidth threshold and the health condition of the target egress link meets the forwarding condition, the message to be forwarded is forwarded through the selected target egress link.
As can be seen from the foregoing embodiments, according to the present application, by defining alternative load scheduling policies corresponding to different applications in advance, after receiving a packet to be forwarded, a target load scheduling policy is matched according to packet characteristics of the packet to be forwarded, and according to a target egress link and a forwarding condition defined in the target load scheduling policy, and a condition that a health condition of the target egress link satisfies the forwarding condition, it is determined whether the packet to be forwarded can be forwarded through the selected target egress link. Therefore, when the method and the device for forwarding the messages generated by different applications are used for forwarding the messages generated by different applications, the decoupling among different applications can be realized by defining differentiated forwarding conditions in corresponding alternative load scheduling strategies, so that the health condition of the same outlet link can meet the forwarding conditions corresponding to the messages generated by one part of applications while the health condition of the same outlet link cannot meet the forwarding conditions corresponding to the messages generated by the other part of applications, the messages generated by at least one part of applications can be forwarded based on the outlet link, the phenomenon that the outlet link is completely unavailable due to the fact that all the applications adopt the same forwarding conditions is avoided, the forwarding pressure of each entry marking outlet link is relieved, and load balancing is realized.
For the convenience of understanding, the technical solutions of the present application are further described below with reference to the accompanying drawings. Referring to fig. 3, fig. 3 is a flowchart illustrating another packet forwarding method according to an exemplary embodiment of the present application. As shown in fig. 3, the method is applied to a network device in which alternative load scheduling policies corresponding to different applications are configured. The message forwarding method can comprise the following steps:
step 301, configuring alternative load scheduling policies corresponding to different applications and predefined forwarding conditions and target egress links in each alternative load scheduling policy in a network device.
In one embodiment, a plurality of alternative load scheduling policies may be configured in the network device in advance, and a forwarding condition of a packet and a target egress link may be defined in each of the alternative load scheduling policies. In order to match a target load scheduling policy in the multiple candidate load scheduling policies according to the message characteristics in the following, ingress interface information, an IP address network segment, target port information, protocol number information, and the like of a received message may also be defined in each candidate load scheduling policy, which is not limited in the present application.
Step 302, receiving a message to be forwarded sent by a client.
In one embodiment, the message to be forwarded may include messages respectively generated by a plurality of applications, for example, the message to be forwarded may be an application message accessing a World Wide Web server (Web server), or the message to be forwarded may be an application message accessing a Domain Name System (DNS) server. Certainly, the message to be forwarded may also include an application message that accesses another server, which is not limited in this application.
Step 303, matching the ingress interface receiving the packet to be forwarded with ingress interfaces defined by the alternative load scheduling policies to obtain an effective load scheduling policy matched with the ingress interfaces.
In one embodiment, a plurality of alternative load scheduling policies may be preconfigured in the network device, and the ingress interface information is predefined for each alternative load scheduling policy. The network equipment can obtain the incoming interface information of the received message to be forwarded, and match the incoming interface of the received message to be forwarded with the incoming interface information defined in each alternative load scheduling strategy, so that the effective load scheduling strategy can be determined in the alternative load scheduling strategies, and a target load scheduling strategy can be matched in the effective load scheduling strategy subsequently. In this embodiment, the effective load scheduling policy that may be matched with the packet to be forwarded may be quickly determined based on the matching condition of the ingress interface, and compared with a scheme in which the target load scheduling policy is determined in the alternative load scheduling policies directly by packet feature matching, the number of alternative load scheduling policies for packet feature matching may be reduced, and the policy matching speed is increased.
Step 304, obtaining the message characteristics of the received message to be forwarded.
Step 305, determining a target load scheduling policy in the effective load scheduling policy according to the message characteristics.
In one embodiment, the message characteristics may include the destination IP address, protocol number, and destination port of the message to be forwarded. When the target IP address defined in any effective load scheduling strategy and the target IP address of the message to be forwarded are in the same network segment and the protocol number and the target port are the same, any effective load scheduling strategy can be determined as the target load scheduling strategy. Of course, in other embodiments, the target load scheduling policy may also be matched by one or two characteristics of the target IP address, the protocol number, and the target port, which is not limited in this application.
It should be noted that: in one case, if the number of the payload scheduling policies matched in step 303 is one, the one payload scheduling policy may be directly determined as the target payload scheduling policy, and step 304 and step 305 are omitted, although it may also be further determined whether the one payload scheduling policy is the target payload scheduling policy according to the message characteristics, if so, a target egress link is determined according to the one payload scheduling policy, otherwise, the message to be forwarded may be discarded. In another case, if the number of the effective load scheduling policies matched in step 302 is multiple, one or more target load scheduling policies may be matched from the multiple effective load scheduling policies according to the message characteristics.
Step 306, determine whether there is at least one target egress link defined in the target load scheduling policy that is not matched.
In one embodiment, when there is at least one target egress link defined in the target load scheduling policy whose health does not match the forwarding condition, step 308 is executed; when the health conditions of the defined target egress links in all the matched target load scheduling policies have been matched with the forwarding conditions, step 307 may be executed.
Step 307, discarding the message to be forwarded.
And 308, sequentially selecting a target load scheduling strategy to be subjected to target egress link matching from the at least one target load scheduling strategy.
In one embodiment, when there is a condition that the health of a target egress link defined in a plurality of target load scheduling policies does not match with a forwarding condition, the target load scheduling policies may be sequentially selected in order according to priority. And when the health condition of the target outlet link defined in one target load scheduling strategy is not matched with the forwarding condition, selecting the health condition of the target outlet link defined in the one target load scheduling strategy to be matched with the forwarding condition.
Step 309, selecting the target egress link defined in the target load scheduling policy in sequence.
In one embodiment, after the target load scheduling policy is determined, the target egress links may be selected in order according to the priorities of the target egress links defined in the target load scheduling policy. For example, the target egress links may be prioritized according to a load scheduling algorithm configured in the target load scheduling policy, for example, the target egress links defined in the same target load scheduling policy may be prioritized according to a weighted minimum connection scheduling algorithm; or, the target egress links defined in the same target load scheduling policy may also be prioritized according to a weighted minimum bandwidth scheduling algorithm; or, the priority ordering may also be performed according to the weight of the target egress link, and certainly, other priority ordering methods may also be used, which are not described herein any more.
At step 310, the health status of the selected target egress link is obtained.
In one embodiment, the health of the target egress link may be predefined and stored in the network device; or, the network device may also obtain the health condition of the target egress link once every preset time interval; or, after the target egress link is selected, the health condition of the target egress link may also be obtained, which is not limited in this application.
For example, taking the health condition of the target egress link including the delay time and the packet loss rate of the target egress link as an example, the network device may send a detection packet to the target server according to the target IP address in the packet to be forwarded, receive a response packet returned by the target server according to the detection packet, and then calculate the delay time and the packet loss rate of the target egress link according to the detection packet and the response packet.
Step 311, obtaining the forwarding condition defined in the target load scheduling policy.
Step 312, determine whether the health status of the target egress link meets the forwarding condition defined by the target load scheduling policy to which the target egress link belongs.
In an embodiment, the forwarding condition may include a maximum delay time and a maximum packet loss rate, and when the delay time of the target egress link is less than or equal to the maximum delay time defined by the target load scheduling policy to which the target egress link belongs, and the packet loss rate of the target egress link is less than or equal to the maximum packet loss rate defined by the target load scheduling policy to which the target egress link belongs, it is determined that the health condition of the target egress link satisfies the forwarding condition defined by the target load scheduling policy of the target egress link, and step 313 is executed; otherwise, step 316 is performed.
It should be noted that: in other implementations, when the delay time duration of the target egress link is less than or equal to the maximum delay time duration defined by the target load scheduling policy to which the target egress link belongs, or the packet loss rate of the target egress link is less than or equal to the maximum packet loss rate defined by the target load scheduling policy to which the target egress link belongs, it may be determined that the health condition of the target egress link satisfies the forwarding condition defined by the target load scheduling policy of the target egress link, which is not limited in this application.
And 313, acquiring the real-time bandwidth of the selected target exit link.
In step 314, it is determined whether the real-time bandwidth of the target egress link is less than or equal to a preset bandwidth threshold.
And 315, forwarding the received message to be forwarded through the selected target exit link.
In an embodiment, when the health condition of the selected target egress link meets the forwarding condition defined by the target load scheduling policy of the target egress link, the real-time bandwidth of the selected target egress link may be obtained, when the real-time bandwidth is less than or equal to the preset bandwidth threshold, step 315 is executed, and when the real-time bandwidth is greater than the preset bandwidth threshold, step 316 is executed, so that the message to be forwarded may be prevented from being forwarded from the target egress link with less remaining bandwidth or zero remaining bandwidth, which is beneficial to avoiding link congestion.
Step 316, determine whether the target egress link is the last target egress link in the target load scheduling policy.
In an embodiment, when the target egress link subjected to the health condition matching is the last target egress link in the target load scheduling policy, step 306 is executed, that is, the next target load scheduling policy subjected to the matching may be determined according to the priority ranking of the plurality of target load scheduling policies matched with the message characteristics; when the target egress link for which health matching is performed is not the last target egress link in the target load scheduling policy, step 317 is performed.
Step 317, determine whether to perform health match for the next target egress link.
In one embodiment, when the health condition of the next target egress link needs to be matched, step 309 is executed, that is, the next target egress link may be selected according to the priorities of the multiple target egress links defined in the same target load scheduling policy; when a health match is required for the next pair of target egress links, step 318 is performed.
Step 318, discarding the received message to be forwarded.
Fig. 4 shows a schematic structural diagram of an electronic device according to an exemplary embodiment of the present application. Referring to fig. 4, at the hardware level, the electronic device includes a processor 401, an internal bus 402, a network interface 403, a memory 404, and a non-volatile memory 405, but may also include hardware required for other services. The processor 401 reads a corresponding computer program from the nonvolatile memory 405 to the memory 404 and runs the computer program, and forms a message forwarding apparatus on a logical level. Of course, besides the software implementation, the present application does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Fig. 5 shows a block diagram of a message forwarding device 500 according to an example embodiment of the present application. Referring to fig. 5, in a software implementation, the message forwarding apparatus 500 is applied to a network device, and an alternative load scheduling policy corresponding to different applications is configured in the network device. The message forwarding apparatus 500 may include a receiving module 501, a determining module 502, and a forwarding module 503. Wherein:
a receiving module 501, configured to receive a packet to be forwarded and obtain a packet characteristic of the packet to be forwarded;
a determining module 502, configured to determine, from the alternative load scheduling policies, a target load scheduling policy that matches the message characteristics, where the target load scheduling policy includes a predefined forwarding condition and a target egress link;
the forwarding module 503 forwards the packet to be forwarded through the target egress link when the health condition of the target egress link meets the forwarding condition.
The message forwarding device further comprises: the comparison module compares the incoming interface of the received message to be forwarded with the incoming interface information defined in each alternative load scheduling strategy so as to screen out the effective load scheduling strategy;
the determining module 502 is further configured to: when the number of the effective load scheduling strategies is one, determining the effective load scheduling strategies as the target load scheduling strategies; and when the number of the effective load scheduling strategies is multiple, determining a target load scheduling strategy matched with the message characteristics from the effective load scheduling strategies.
Optionally, the message characteristics include at least one of the following: the destination IP address, the destination port and the protocol number of the message to be forwarded;
and the target IP address defined in the target load scheduling strategy and the target IP address of the message to be forwarded are in the same network segment, and the target port and the protocol number are respectively the same.
Optionally, the determining module 502 is further configured to:
and when a plurality of target outlet links are defined in the target load scheduling strategy, sequentially selecting each item marking outlet link for matching until the health condition of the selected target outlet link meets the forwarding condition defined in the target load scheduling strategy.
Optionally, the determining module 502 is further configured to:
and when a plurality of target load scheduling strategies matched with the message characteristics exist, sequentially selecting the target outlet links configured in the item target load scheduling strategies for matching until the health condition of the selected target outlet link meets the forwarding condition defined in the target load scheduling strategy.
Optionally, the health condition comprises at least one of:
a delay time of the target egress link;
and the packet loss rate of the target egress link.
Optionally, the forwarding module 503 is further configured to:
acquiring the real-time bandwidth of the target outlet link;
and when the real-time bandwidth of the target exit link is not greater than a preset bandwidth threshold and the health condition of the target exit link meets the forwarding condition, forwarding the message to be forwarded through the target exit link.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and 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 modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
In one embodiment, there is also provided a non-transitory computer-readable storage medium, such as a memory, including instructions executable by a processor of a message forwarding device to perform the method, the method may include:
receiving a message to be forwarded and acquiring message characteristics of the message to be forwarded;
determining a target load scheduling strategy matched with the message characteristics from the alternative load scheduling strategies, wherein the target load scheduling strategy comprises predefined forwarding conditions and a target outlet link;
and forwarding the message to be forwarded through the target exit link under the condition that the health condition of the target exit link meets the forwarding condition.
Optionally, the method further includes:
comparing the incoming interface of the message to be forwarded with the incoming interface information defined in each alternative load scheduling strategy to screen out an effective load scheduling strategy;
the determining a target load scheduling policy matching the message characteristics from the alternative load scheduling policies includes: when the number of the effective load scheduling strategies is one, determining the effective load scheduling strategies as the target load scheduling strategies; and when the number of the effective load scheduling strategies is multiple, determining a target load scheduling strategy matched with the message characteristics from the effective load scheduling strategies.
Optionally, the message characteristics include at least one of the following: the destination IP address, the destination port and the protocol number of the message to be forwarded;
and the target IP address defined in the target load scheduling strategy and the target IP address of the message to be forwarded are in the same network segment, and the target port and the protocol number are respectively the same.
Optionally, the determining a target load scheduling policy matching the packet characteristics from the alternative load scheduling policies includes:
and when a plurality of target outlet links are defined in the target load scheduling strategy, sequentially selecting each item marking outlet link for matching until the health condition of the selected target outlet link meets the forwarding condition defined in the target load scheduling strategy.
Optionally, the matching of the corresponding load scheduling policy according to the packet feature of the packet to be forwarded includes:
and when a plurality of target load scheduling strategies matched with the message characteristics exist, sequentially selecting the target outlet links configured in the item target load scheduling strategies for matching until the health condition of the selected target outlet link meets the forwarding condition defined in the target load scheduling strategy.
Optionally, the health condition comprises at least one of:
a delay time of the target egress link;
and the packet loss rate of the target egress link.
Optionally, forwarding the packet to be forwarded through the target egress link when the health condition of the target egress link meets the forwarding condition, where the forwarding includes:
acquiring the real-time bandwidth of the target outlet link;
and when the real-time bandwidth of the target exit link is not greater than a preset bandwidth threshold and the health condition of the target exit link meets the forwarding condition, forwarding the message to be forwarded through the target exit link.
The non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc., which is not limited in this application.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A message forwarding method is applied to a network device, and an alternative load scheduling policy corresponding to different applications is configured in the network device, including:
receiving a message to be forwarded and acquiring message characteristics of the message to be forwarded;
determining a target load scheduling strategy matched with the message characteristics from the alternative load scheduling strategies, wherein the target load scheduling strategy comprises predefined forwarding conditions and a target outlet link;
and forwarding the message to be forwarded through the target exit link under the condition that the health condition of the target exit link meets the forwarding condition.
2. The message forwarding method of claim 1,
the method further comprises the following steps: comparing the incoming interface of the message to be forwarded with the incoming interface information defined in each alternative load scheduling strategy to screen out an effective load scheduling strategy;
the determining a target load scheduling policy matching the message characteristics from the alternative load scheduling policies includes: when the number of the effective load scheduling strategies is one, determining the effective load scheduling strategies as the target load scheduling strategies; and when the number of the effective load scheduling strategies is multiple, determining a target load scheduling strategy matched with the message characteristics from the effective load scheduling strategies.
3. The message forwarding method of claim 1, wherein the message characteristics comprise at least one of: the destination IP address, the destination port and the protocol number of the message to be forwarded;
and the target IP address defined in the target load scheduling strategy and the target IP address of the message to be forwarded are in the same network segment, and the target port and the protocol number are respectively the same.
4. The packet forwarding method according to claim 1, wherein the determining a target load scheduling policy matching the packet characteristics from the alternative load scheduling policies comprises:
and when a plurality of target outlet links are defined in the target load scheduling strategy, sequentially selecting each item marking outlet link for matching until the health condition of the selected target outlet link meets the forwarding condition defined in the target load scheduling strategy.
5. The message forwarding method according to claim 1, wherein the matching of the corresponding load scheduling policy according to the message characteristics of the message to be forwarded comprises:
and when a plurality of target load scheduling strategies matched with the message characteristics exist, sequentially selecting the target outlet links configured in the item target load scheduling strategies for matching until the health condition of the selected target outlet link meets the forwarding condition defined in the target load scheduling strategy.
6. The message forwarding method of claim 1, wherein the health condition comprises at least one of:
a delay time of the target egress link;
and the packet loss rate of the target egress link.
7. The message forwarding method according to claim 1, wherein forwarding the message to be forwarded through the target egress link when the health status of the target egress link satisfies the forwarding condition comprises:
acquiring the real-time bandwidth of the target outlet link;
and when the real-time bandwidth of the target exit link is not greater than a preset bandwidth threshold and the health condition of the target exit link meets the forwarding condition, forwarding the message to be forwarded through the target exit link.
8. A message forwarding apparatus is applied to a network device, and an alternative load scheduling policy corresponding to different applications is configured in the network device, including:
the receiving module is used for receiving the message to be forwarded and acquiring the message characteristics of the message to be forwarded;
the determining module is used for determining a target load scheduling strategy matched with the message characteristics from the alternative load scheduling strategies, wherein the target load scheduling strategy comprises a predefined forwarding condition and a target outlet link;
and the forwarding module is used for forwarding the message to be forwarded through the target outlet link under the condition that the health condition of the target outlet link meets the forwarding condition.
9. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the method of any one of claims 1-7.
10. A computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, perform the steps of the method according to any one of claims 1-7.
CN202010291364.5A 2020-04-14 2020-04-14 Message forwarding method and device Pending CN111314236A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010291364.5A CN111314236A (en) 2020-04-14 2020-04-14 Message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010291364.5A CN111314236A (en) 2020-04-14 2020-04-14 Message forwarding method and device

Publications (1)

Publication Number Publication Date
CN111314236A true CN111314236A (en) 2020-06-19

Family

ID=71160993

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010291364.5A Pending CN111314236A (en) 2020-04-14 2020-04-14 Message forwarding method and device

Country Status (1)

Country Link
CN (1) CN111314236A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112346854A (en) * 2020-09-28 2021-02-09 北京大学深圳研究生院 In-network resource scheduling method and system for hierarchical collaborative decision and storage medium
CN114389991A (en) * 2021-12-20 2022-04-22 中盈优创资讯科技有限公司 Intelligent network traffic scheduling management method and device
WO2023088362A1 (en) * 2021-11-19 2023-05-25 贵州白山云科技股份有限公司 Network traffic processing method and apparatus, and medium and electronic device
WO2024066623A1 (en) * 2022-09-30 2024-04-04 华为技术有限公司 Method for determining scheduling policy, and related apparatus

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007073620A1 (en) * 2005-12-28 2007-07-05 Zte Corporation A system and method for processing message
US8059653B1 (en) * 2009-03-12 2011-11-15 Brocade Communications Systems, Inc. Transaction and connection independent protocol load balancing
CN102263697A (en) * 2011-08-03 2011-11-30 杭州华三通信技术有限公司 Method and device for sharing aggregated link traffic
CN102916898A (en) * 2012-11-02 2013-02-06 杭州迪普科技有限公司 Application keeping method and device of multilink egress
CN105991474A (en) * 2015-05-18 2016-10-05 杭州迪普科技有限公司 Traffic scheduling method, traffic scheduling device and network device
US20170048144A1 (en) * 2015-08-13 2017-02-16 Futurewei Technologies, Inc. Congestion Avoidance Traffic Steering (CATS) in Datacenter Networks
CN107566267A (en) * 2016-06-30 2018-01-09 中兴通讯股份有限公司 A kind of message forwarding method and device based on aggregated links
CN109067664A (en) * 2018-08-29 2018-12-21 迈普通信技术股份有限公司 A kind of load-balancing method and device
WO2019007361A1 (en) * 2017-07-04 2019-01-10 中兴通讯股份有限公司 Load sharing method and apparatus, routing device and storage medium
CN110120897A (en) * 2019-04-22 2019-08-13 国家计算机网络与信息安全管理中心 Link detection method, apparatus, electronic equipment and machine readable storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007073620A1 (en) * 2005-12-28 2007-07-05 Zte Corporation A system and method for processing message
US8059653B1 (en) * 2009-03-12 2011-11-15 Brocade Communications Systems, Inc. Transaction and connection independent protocol load balancing
CN102263697A (en) * 2011-08-03 2011-11-30 杭州华三通信技术有限公司 Method and device for sharing aggregated link traffic
CN102916898A (en) * 2012-11-02 2013-02-06 杭州迪普科技有限公司 Application keeping method and device of multilink egress
CN105991474A (en) * 2015-05-18 2016-10-05 杭州迪普科技有限公司 Traffic scheduling method, traffic scheduling device and network device
US20170048144A1 (en) * 2015-08-13 2017-02-16 Futurewei Technologies, Inc. Congestion Avoidance Traffic Steering (CATS) in Datacenter Networks
CN107566267A (en) * 2016-06-30 2018-01-09 中兴通讯股份有限公司 A kind of message forwarding method and device based on aggregated links
WO2019007361A1 (en) * 2017-07-04 2019-01-10 中兴通讯股份有限公司 Load sharing method and apparatus, routing device and storage medium
CN109067664A (en) * 2018-08-29 2018-12-21 迈普通信技术股份有限公司 A kind of load-balancing method and device
CN110120897A (en) * 2019-04-22 2019-08-13 国家计算机网络与信息安全管理中心 Link detection method, apparatus, electronic equipment and machine readable storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112346854A (en) * 2020-09-28 2021-02-09 北京大学深圳研究生院 In-network resource scheduling method and system for hierarchical collaborative decision and storage medium
WO2023088362A1 (en) * 2021-11-19 2023-05-25 贵州白山云科技股份有限公司 Network traffic processing method and apparatus, and medium and electronic device
CN114389991A (en) * 2021-12-20 2022-04-22 中盈优创资讯科技有限公司 Intelligent network traffic scheduling management method and device
CN114389991B (en) * 2021-12-20 2023-09-29 中盈优创资讯科技有限公司 Intelligent network flow scheduling management method and device
WO2024066623A1 (en) * 2022-09-30 2024-04-04 华为技术有限公司 Method for determining scheduling policy, and related apparatus

Similar Documents

Publication Publication Date Title
EP3516833B1 (en) Methods, systems, and computer readable media for discarding messages during a congestion event
US8228929B2 (en) Flow consistent dynamic load balancing
EP3229407B1 (en) Application signature generation and distribution
CN111314236A (en) Message forwarding method and device
US10708146B2 (en) Data driven intent based networking approach using a light weight distributed SDN controller for delivering intelligent consumer experience
US7522521B2 (en) Route processor adjusting of line card admission control parameters for packets destined for the route processor
US9042355B2 (en) Quality of service (QoS) for satellite communications network
WO2017025021A1 (en) Method and device for processing flow table
US10892994B2 (en) Quality of service in virtual service networks
CN111756633B (en) Generating an automatic bandwidth adjustment policy from a label switched path
US10291584B2 (en) Dynamic prioritization of network traffic based on reputation
US11888745B2 (en) Load balancer metadata forwarding on secure connections
US10862805B1 (en) Intelligent offloading of services for a network device
CN110278152B (en) Method and device for establishing fast forwarding table
US10291518B2 (en) Managing flow table entries for express packet processing based on packet priority or quality of service
US9992110B2 (en) Dynamic switching control over multiple internet services provided for home networks
US20230319635A1 (en) Apparatus and method for providing n6-lan using service function chaining in wireless communication system
CN116582493A (en) Data center network link selection method and device and electronic equipment
CN103428295A (en) Method and system for monitoring P2P network application
US20230164149A1 (en) Causing or preventing an update to a network address translation table
US20240113959A1 (en) Instance-affine service scheduling
US9521078B2 (en) Method and apparatus for controlling congestion of network equipment
CN117499258A (en) Service data network transmission management method and DPU
CN116633852A (en) Data transmission method, system and electronic equipment

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