CN111356181A - Flow forwarding method and device, network equipment and computer readable storage medium - Google Patents

Flow forwarding method and device, network equipment and computer readable storage medium Download PDF

Info

Publication number
CN111356181A
CN111356181A CN202010115549.0A CN202010115549A CN111356181A CN 111356181 A CN111356181 A CN 111356181A CN 202010115549 A CN202010115549 A CN 202010115549A CN 111356181 A CN111356181 A CN 111356181A
Authority
CN
China
Prior art keywords
flow
network
member port
traffic
forwarding
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.)
Granted
Application number
CN202010115549.0A
Other languages
Chinese (zh)
Other versions
CN111356181B (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.)
Hangzhou DPtech Information Technology Co Ltd
Original Assignee
Hangzhou DPtech Information Technology 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 Information Technology Co Ltd filed Critical Hangzhou DPtech Information Technology Co Ltd
Priority to CN202010115549.0A priority Critical patent/CN111356181B/en
Publication of CN111356181A publication Critical patent/CN111356181A/en
Application granted granted Critical
Publication of CN111356181B publication Critical patent/CN111356181B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints
    • H04W28/14Flow control between communication endpoints using intermediate storage
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mathematical Physics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a flow forwarding method, a flow forwarding device, network equipment and a computer readable storage medium, which relate to the field of network flow forwarding and comprise the steps of judging whether the average flow of the network flow exceeds the maximum bandwidth of a certain member port in an aggregation group or not when the network equipment receives the network flow; the shared flow is the flow distributed to each member port when the network flow is uniformly forwarded; if so, allocating a target weight based on the bandwidth proportion of each member port in the aggregation group; and forwarding the network flow according to the target weight. The invention relieves the problem of partial flow loss caused by flow equalization and reduces the problem of flow loss of member port forwarding caused by board card performance difference.

Description

Flow forwarding method and device, network equipment and computer readable storage medium
Technical Field
The present invention relates to the field of network traffic forwarding, and in particular, to a traffic forwarding method, apparatus, network device, and computer-readable storage medium.
Background
With the continuous development of the 5G technology, the requirement for forwarding and processing the traffic of the network device is also increased. At present, when a network device forwards traffic, the traffic entering the network device in the network is generally forwarded or discarded from the aggregation group according to a specific load balancing algorithm, and when the traffic is forwarded, the network traffic is generally forwarded uniformly. However, in practical applications, the maximum bandwidths allowed by a plurality of member ports in an aggregation group may not be the same, network traffic is equally divided and then forwarded, and if the equally divided traffic is greater than the maximum bandwidth of a certain member port, a part of the traffic will be lost.
No effective solution has been proposed for the above-mentioned loss of partial traffic due to the shared traffic.
Disclosure of Invention
The invention aims to provide a traffic forwarding method, a traffic forwarding device, network equipment and a computer readable storage medium, which are used for relieving the problem of traffic packet loss when network traffic is forwarded.
In a first aspect, an embodiment provides a traffic forwarding method, where the method includes:
when network equipment receives network flow, judging whether the average flow of the network flow exceeds the maximum bandwidth of a certain member port in an aggregation group; the shared flow is the flow distributed to each member port when the network flow is uniformly forwarded;
if so, allocating a target weight based on the bandwidth proportion of each member port in the aggregation group;
and forwarding the network flow according to the target weight.
In an alternative embodiment, the method further comprises:
periodically detecting the use condition of each member port in the aggregation group; the member port in the aggregation group comprises an interface of a forwarding board card; the use condition comprises CPU use rate;
and if the forwarding board card with the CPU utilization rate exceeding a specified threshold exists, reallocating the target weight.
In an optional implementation manner, when a network device receives network traffic, the step of determining whether an average traffic of the network traffic exceeds a maximum bandwidth of a certain member port in an aggregation group includes:
when the network equipment receives network flow, judging that the average flow of the network flow exceeds the maximum bandwidth of a certain member port in the aggregation group based on a rule issued by a user; the rule issued by the user carries the information of the aggregation group.
In an alternative embodiment, the step of assigning a target weight based on the bandwidth proportion of each member port in the aggregation group includes:
and distributing the target weight according to a preset algorithm based on the bandwidth proportion of each member port in the aggregation group.
In an optional embodiment, the preset algorithm comprises a hash load balancing algorithm; the method further comprises the following steps:
inquiring a target module and a target interface of the member port according to a target hash value calculated by the hash load balancing algorithm;
and filling the target hash value into an exchange chip so that the exchange chip can forward the network traffic.
In an optional embodiment, the step of forwarding the network traffic according to the target weight includes:
and forwarding the network traffic based on the target weight and the board card sequence of each member port.
In an alternative embodiment, the interfaces of the network device include electrical and optical interfaces.
In a second aspect, an embodiment provides a traffic forwarding apparatus, including:
the judging module is used for judging whether the average flow of the network flow exceeds the maximum bandwidth of a certain member port in the aggregation group or not when the network equipment receives the network flow; the shared flow is the flow distributed to each member port when the network flow is uniformly forwarded;
a weight distribution module, configured to, if yes, distribute a target weight based on a bandwidth proportion of each member port in the aggregation group;
and the flow forwarding module is used for forwarding the network flow according to the target weight.
In a third aspect, an embodiment provides a network device, including a processor and a memory;
the memory stores computer-executable instructions executable by the processor to perform the steps of the method of any of the preceding embodiments.
In a fourth aspect, embodiments provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method of any of the preceding embodiments.
When the network equipment receives the network flow, judging whether the average flow of the network flow exceeds the maximum bandwidth of a certain member port in the aggregation group, wherein the average flow is the flow distributed to each member port when the network flow is uniformly forwarded, if so, distributing a target weight based on the bandwidth proportion of each member port in the aggregation group, and forwarding the network flow according to the target weight. By judging whether the average flow exceeds the maximum bandwidth of a certain member port or not, when the average flow exceeds the maximum bandwidth of the certain member port, the target weight is distributed to the bandwidth proportion of each member port in the aggregation group, and the network flow is forwarded according to the target weight, so that the problem of partial flow loss caused by the average flow is solved, and the problem of flow loss caused by the board card performance difference in forwarding of the member port is reduced. Therefore, the embodiment of the invention relieves the problem of partial traffic loss caused by traffic sharing and reduces the problem of traffic loss caused by the difference of board card performance in the forwarding of the member port.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow chart of a traffic forwarding method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a specific traffic forwarding method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a traffic forwarding apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a network device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Considering that, when network traffic is equally divided and then forwarded, if the equally divided traffic is greater than the maximum bandwidth of a certain member port, a part of the traffic will be lost, embodiments of the present invention provide a traffic forwarding method, apparatus, network device, and computer-readable storage medium, which alleviate the problem of part of the traffic lost due to the equally divided traffic and reduce the problem of packet loss of the forwarded traffic of the member port due to the board card performance difference.
For convenience of understanding, first, a detailed description is given to a traffic forwarding method provided in an embodiment of the present invention, referring to a flow diagram of a traffic forwarding method shown in fig. 1, where the method mainly includes the following steps S102 to S106:
step S102: when the network equipment receives the network flow, judging whether the average flow of the network flow exceeds the maximum bandwidth of a certain member port in the aggregation group.
Network traffic is received by a network device through a network device interface, which generally refers to a physical form visible externally on the network device, such as 10/100/1000M electrical interface, 1GE/10GE/100GE optical interface, and so on. The average traffic of the network traffic is the traffic distributed to each member port when the network traffic is uniformly forwarded, for example, the aggregation group includes 4 physical interfaces, each physical interface may also be referred to as a member port of the aggregation group, the maximum allowed bandwidth of each member port is 20G, 10G, 20G, when the network traffic is 60Gbps, 15G should be distributed to each physical port to completely forward the network traffic when the network traffic is average, at this time, there is an aggregation group member port where the average traffic of 15G is greater than the maximum allowed bandwidth of 10G, and in order to not cause traffic loss, the following step S104 is adopted to perform weight distribution.
Step S104: if so, a target weight is assigned based on the bandwidth proportion of each member port in the aggregation group.
In an embodiment, if there is an average traffic larger than the maximum bandwidth allowed by the aggregation group member port, then performing the average retransmission of the network traffic may cause loss of part of the traffic, and in order to avoid the traffic loss problem caused by the average traffic, a target weight is allocated based on the bandwidth proportion of each member port in the aggregation group. The hash value can be filled in the hash grid according to the bandwidth proportion of the member port through a hash load balancing algorithm, so that the distribution of the target weight is completed.
Step S106: and forwarding the network traffic according to the target weight.
In an embodiment, the network traffic is forwarded through the target weight assigned to each member port, which can ensure that the traffic can be forwarded completely without causing traffic loss.
According to the traffic forwarding method provided by the embodiment of the invention, when network equipment receives network traffic, whether the average traffic of the network traffic exceeds the maximum bandwidth of a certain member port in an aggregation group is judged, wherein the average traffic is the traffic distributed to each member port when the network traffic is uniformly forwarded, if so, a target weight is distributed based on the bandwidth proportion of each member port in the aggregation group, and the network traffic is forwarded according to the target weight. By judging whether the average flow exceeds the maximum bandwidth of a certain member port or not, when the average flow exceeds the maximum bandwidth of the certain member port, the target weight is distributed to the bandwidth proportion of each member port in the aggregation group, and the network flow is forwarded according to the target weight, so that the problem of partial flow loss caused by the average flow is solved, and the problem of flow loss caused by the board card performance difference in forwarding of the member port is reduced. Therefore, the embodiment of the invention relieves the problem of partial traffic loss caused by traffic sharing and reduces the problem of traffic loss caused by the difference of board card performance in the forwarding of the member port.
Preferably, since the board card performance of each member port in the aggregation group is different, in order to reduce the pressure of the board card with poor performance, the usage condition of each member port in the aggregation group, such as the CPU usage rate of the board card, may also be periodically detected, and if there is a forwarding board card whose CPU usage rate exceeds a specified threshold, the target weight is reassigned. Optionally, the detection period may be set to a time period of 0.5min, 1min, 2min, or the like, and is selected according to the actual network traffic entering the network device, for example, when the traffic is large, the period may be set to be short, so that the service condition of the board card may be checked in real time.
A user can aggregate a plurality of physical ports of a board card in a device together through configuration to form an aggregation group, and a weight value of a physical port in the aggregation group can be specified in the configuration process, and the default value is 1. And the configuration supports port multiplexing, i.e. the same physical port can be bound into multiple aggregation groups.
In one embodiment, the step S102 may include: when the network equipment receives the network flow, the average flow of the network flow is judged to exceed the maximum bandwidth of a certain member port in the aggregation group based on a rule issued by a user, wherein the rule issued by the user carries information of the aggregation group, so that when the target network flow entering the equipment is received, the target network flow can be uniformly forwarded through the members in the aggregation group, and whether the average flow exceeds the maximum bandwidth allowed by the member port in the aggregation group can be judged.
To be able to determine if the average traffic exceeds the maximum bandwidth allowed by the member ports in the aggregation group, a hash (hash) load balancing algorithm may be used, such as 32 aggregation groups of 0-31, each with its own hash value, where the hash value is a number in the range of 0-1023 of 10 bits. If 3 physical interfaces are added to a certain aggregation group, 1024 hash grids are circularly filled in the order of 0, 1 and 2 until the hash grids are full. The method for calculating the hash value comprises the following 5 algorithms of polling according to a source IP address, a destination IP address, a source IP address + a destination IP address + a source port + a destination port and a port.
When one of the first four algorithms is selected, a number is calculated, the number falls on a hash grid of 0-1023, a corresponding value on the hash grid is obtained, a destination module (module) and a destination interface (port) corresponding to a port are searched by the value, the FPGA fills the value into a switching chip, and the switching chip finally completes the forwarding of the flow. For example, if the flows passing through the aggregation group are all concentrated in the same source/destination IP, the flows are all divided into the same physical port, so that the overload condition of member ports inevitably occurs, which results in flow loss, and at this time, the hash algorithm is dynamically adjusted to be port polling, that is, the entering flows are evenly divided according to the number of ports, thereby ensuring that the flows are normally forwarded. For example, when the device includes 4 boards, i.e., board1, board2, board3 and board4, their maximum traffic forwarding bandwidths are 40G, 10G and 40G, respectively, where G is Gbps. Therefore, 1024 hash grids can be circularly filled according to the sequence of 0, 1, 2 and 3, in order to achieve that the target traffic can be uniformly transferred out from the interface, the target traffic needs to be smaller than the minimum bandwidth value of the interface, otherwise, the traffic is lost. When the network flow entering the device is 40G, the flow is equally divided from the four boards according to the port polling algorithm, and each board forwards the flow of 10G. However, when the network traffic entering the device exceeds 40G, the average time will exceed the maximum bandwidth of 10G boards, and at this time, the target weight is distributed according to the bandwidth ratio of the boards.
For convenience of understanding, referring to a flowchart of a specific traffic forwarding method shown in fig. 2, taking an example that a network traffic entering a device is 80G, boards are still the boards 1, 2, 3, and 4, and their corresponding maximum traffic forwarding bandwidths are 40G, 10G, and 40G, respectively, at this time, when an average traffic exceeds a minimum bandwidth value of an interface, a weight is used to redistribute the proportion of interface forwarding, and after the weight is redistributed, the traffic is not redistributed, but is forwarded proportionally. If the weighted values of the board1 and board4 are 4, then they will be circularly filled with 1024 hash cells again in the order of 0, 1, 2, 3, and their proportional relationship becomes 4: 1: 1: 4 such that the board1 and 4 each retransmit 32G, the board2 and 3 each retransmit 8G, thereby handling more traffic while reducing the pressure on the boards 2 and 3. Preferably, when the target weight is distributed according to the bandwidth proportion, the utilization rate of the CPUs of the boards is dynamically detected, that is, the utilization rate of the CPUs of the boards is periodically detected, so that the situation that when the utilization rate of the CPUs of the boards with poor performance is too high, the weighted values are redistributed, the boards with strong forwarding performance can bear more flow forwarding, the pressure of the boards with poor performance is reduced, and the purpose of dynamically adjusting the flow forwarding is achieved.
For the above traffic forwarding method, an embodiment of the present invention further provides a traffic forwarding apparatus, referring to a schematic structural diagram of a traffic forwarding apparatus shown in fig. 3, where the apparatus mainly includes the following components:
a determining module 302, configured to determine, when a network device receives a network traffic, whether an average traffic of the network traffic exceeds a maximum bandwidth of a certain member port in an aggregation group; the flow sharing is the flow distributed to each member port when the network flow is uniformly forwarded;
a weight assignment module 304, configured to assign a target weight based on a bandwidth ratio of each member port in the aggregation group if yes;
and a traffic forwarding module 306, configured to forward the network traffic according to the target weight.
The traffic forwarding device provided in the embodiment of the present invention, when a network device receives a network traffic, determines whether an average traffic of the network traffic exceeds a maximum bandwidth of a certain member port in an aggregation group, where the average traffic is a traffic allocated to each member port when the network traffic is uniformly forwarded, and if so, allocates a target weight based on a bandwidth proportion of each member port in the aggregation group, and forwards the network traffic according to the target weight. By judging whether the average flow exceeds the maximum bandwidth of a certain member port or not, when the average flow exceeds the maximum bandwidth of the certain member port, the target weight is distributed to the bandwidth proportion of each member port in the aggregation group, and the network flow is forwarded according to the target weight, so that the problem of partial flow loss caused by the average flow is solved, and the problem of flow loss caused by the board card performance difference in forwarding of the member port is reduced. Therefore, the embodiment of the invention relieves the problem of partial traffic loss caused by traffic sharing and reduces the problem of traffic loss caused by the difference of board card performance in the forwarding of the member port.
In one embodiment, the above apparatus further comprises: the periodic detection module is used for periodically detecting the use condition of each member port in the aggregation group; the member port in the aggregation group comprises an interface of a forwarding board card; the usage comprises CPU usage; and if the forwarding board cards with the CPU utilization rate exceeding the specified threshold exist, the target weight is redistributed.
In an implementation manner, the determining module 302 is further configured to determine, when the network device receives the network traffic, that an average traffic of the network traffic exceeds a maximum bandwidth of a certain member port in the aggregation group based on a rule issued by a user; the rules issued by the users carry information of the aggregation groups.
In an embodiment, the weight assignment module 304 is further configured to assign the target weight according to a preset algorithm based on a bandwidth ratio of each member port in the aggregation group.
In one embodiment, the predetermined algorithm comprises a hash load balancing algorithm; the above-mentioned device still includes: the query module is used for querying a target module and a target interface of the member port according to a target hash value calculated by the hash load balancing algorithm; and the filling value module is used for filling the target hash value into the exchange chip so that the exchange chip can forward the network flow.
In an embodiment, the traffic forwarding module 306 is further configured to forward the network traffic based on the target weight and the board order of each member port.
In one embodiment, the interface of the network device includes an electrical interface and an optical interface.
The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments.
The device is a network device, and specifically, the network device comprises a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, performs the method of any of the above described embodiments.
Fig. 4 is a schematic structural diagram of a network device according to an embodiment of the present invention, where the network device 100 includes: a processor 40, a memory 41, a bus 42 and a communication interface 43, wherein the processor 40, the communication interface 43 and the memory 41 are connected through the bus 42; the processor 40 is arranged to execute executable modules, such as computer programs, stored in the memory 41.
The Memory 41 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 43 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
The bus 42 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
The memory 41 is used for storing a program, the processor 40 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow process disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 40, or implemented by the processor 40.
The processor 40 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 40. The Processor 40 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 41, and the processor 40 reads the information in the memory 41 and completes the steps of the method in combination with the hardware thereof.
The traffic forwarding method, apparatus, network device, and computer program product of a computer-readable storage medium according to embodiments of the present invention include a computer-readable storage medium storing a nonvolatile program code executable by a processor, where the computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method described in the foregoing method embodiments is executed.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the system described above may refer to the corresponding process in the foregoing embodiments, and is not described herein again.
The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, which is not described herein again.
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 computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes 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 invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for forwarding traffic, the method comprising:
when network equipment receives network flow, judging whether the average flow of the network flow exceeds the maximum bandwidth of a certain member port in an aggregation group; the shared flow is the flow distributed to each member port when the network flow is uniformly forwarded;
if so, allocating a target weight based on the bandwidth proportion of each member port in the aggregation group;
and forwarding the network flow according to the target weight.
2. The method of claim 1, further comprising:
periodically detecting the use condition of each member port in the aggregation group; the member port in the aggregation group comprises an interface of a forwarding board card; the use condition comprises CPU use rate;
and if the forwarding board card with the CPU utilization rate exceeding a specified threshold exists, reallocating the target weight.
3. The method of claim 1, wherein the step of determining, when the network device receives the network traffic, whether the average traffic of the network traffic exceeds the maximum bandwidth of a member port in the aggregation group comprises:
when the network equipment receives network flow, judging that the average flow of the network flow exceeds the maximum bandwidth of a certain member port in the aggregation group based on a rule issued by a user; the rule issued by the user carries the information of the aggregation group.
4. The method of claim 1, wherein the step of assigning a target weight based on the bandwidth proportion of each of the member ports in the aggregation group comprises:
and distributing the target weight according to a preset algorithm based on the bandwidth proportion of each member port in the aggregation group.
5. The method of claim 4, wherein the predetermined algorithm comprises a hash load balancing algorithm; the method further comprises the following steps:
inquiring a target module and a target interface of the member port according to a target hash value calculated by the hash load balancing algorithm;
and filling the target hash value into an exchange chip so that the exchange chip can forward the network traffic.
6. The method of claim 1, wherein the step of forwarding the network traffic according to the target weight comprises:
and forwarding the network traffic based on the target weight and the board card sequence of each member port.
7. The method of claim 1, wherein the interfaces of the network device comprise an electrical interface and an optical interface.
8. A traffic forwarding apparatus, the apparatus comprising:
the judging module is used for judging whether the average flow of the network flow exceeds the maximum bandwidth of a certain member port in the aggregation group or not when the network equipment receives the network flow; the shared flow is the flow distributed to each member port when the network flow is uniformly forwarded;
a weight distribution module, configured to, if yes, distribute a target weight based on a bandwidth proportion of each member port in the aggregation group;
and the flow forwarding module is used for forwarding the network flow according to the target weight.
9. A network device comprising a processor and a memory;
the memory stores computer-executable instructions executable by the processor to perform the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the method of any one of claims 1 to 7.
CN202010115549.0A 2020-02-25 2020-02-25 Traffic forwarding method, traffic forwarding device, network equipment and computer readable storage medium Active CN111356181B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010115549.0A CN111356181B (en) 2020-02-25 2020-02-25 Traffic forwarding method, traffic forwarding device, network equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010115549.0A CN111356181B (en) 2020-02-25 2020-02-25 Traffic forwarding method, traffic forwarding device, network equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111356181A true CN111356181A (en) 2020-06-30
CN111356181B CN111356181B (en) 2023-04-28

Family

ID=71195774

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010115549.0A Active CN111356181B (en) 2020-02-25 2020-02-25 Traffic forwarding method, traffic forwarding device, network equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111356181B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532594A (en) * 2020-11-16 2021-03-19 杭州迪普科技股份有限公司 Method and device for creating aggregation group and forwarding message
CN113098790A (en) * 2021-03-26 2021-07-09 新华三信息安全技术有限公司 Flow forwarding method and device
CN113467938A (en) * 2021-06-18 2021-10-01 山东云海国创云计算装备产业创新中心有限公司 Bus resource allocation method, device and related equipment
CN113992589A (en) * 2021-10-21 2022-01-28 绿盟科技集团股份有限公司 Message distribution method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103401801A (en) * 2013-08-07 2013-11-20 盛科网络(苏州)有限公司 Method and device for realizing dynamic load balance
WO2016054956A1 (en) * 2014-10-11 2016-04-14 华为技术有限公司 Load sharing method and device
US20170288946A1 (en) * 2016-04-05 2017-10-05 Juniper Networks, Inc. Performing a protocol, such as micro bidirectional forwarding detection, on member links of an aggregated link that uses an address of the aggregated link
CN109379297A (en) * 2018-11-26 2019-02-22 锐捷网络股份有限公司 A kind of method and apparatus for realizing flow load balance
CN110391994A (en) * 2019-07-24 2019-10-29 杭州迪普科技股份有限公司 Network flow retransmission method, device, electronic equipment
CN110798400A (en) * 2019-10-23 2020-02-14 新华三信息安全技术有限公司 Message forwarding method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103401801A (en) * 2013-08-07 2013-11-20 盛科网络(苏州)有限公司 Method and device for realizing dynamic load balance
WO2016054956A1 (en) * 2014-10-11 2016-04-14 华为技术有限公司 Load sharing method and device
US20170288946A1 (en) * 2016-04-05 2017-10-05 Juniper Networks, Inc. Performing a protocol, such as micro bidirectional forwarding detection, on member links of an aggregated link that uses an address of the aggregated link
CN109379297A (en) * 2018-11-26 2019-02-22 锐捷网络股份有限公司 A kind of method and apparatus for realizing flow load balance
CN110391994A (en) * 2019-07-24 2019-10-29 杭州迪普科技股份有限公司 Network flow retransmission method, device, electronic equipment
CN110798400A (en) * 2019-10-23 2020-02-14 新华三信息安全技术有限公司 Message forwarding method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532594A (en) * 2020-11-16 2021-03-19 杭州迪普科技股份有限公司 Method and device for creating aggregation group and forwarding message
CN113098790A (en) * 2021-03-26 2021-07-09 新华三信息安全技术有限公司 Flow forwarding method and device
CN113098790B (en) * 2021-03-26 2022-06-21 新华三信息安全技术有限公司 Flow forwarding method and device
CN113467938A (en) * 2021-06-18 2021-10-01 山东云海国创云计算装备产业创新中心有限公司 Bus resource allocation method, device and related equipment
CN113467938B (en) * 2021-06-18 2024-05-17 山东云海国创云计算装备产业创新中心有限公司 Bus resource allocation method and device and related equipment
CN113992589A (en) * 2021-10-21 2022-01-28 绿盟科技集团股份有限公司 Message distribution method and device and electronic equipment
CN113992589B (en) * 2021-10-21 2023-05-26 绿盟科技集团股份有限公司 Message distribution method and device and electronic equipment

Also Published As

Publication number Publication date
CN111356181B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
CN111356181B (en) Traffic forwarding method, traffic forwarding device, network equipment and computer readable storage medium
CN109218355B (en) Load balancing engine, client, distributed computing system and load balancing method
CN108881448B (en) API request processing method and device
CN111614746B (en) Load balancing method and device of cloud host cluster and server
CN110830391A (en) Resource allocation method and device and cluster system
CN113132249A (en) Load balancing method and equipment
US20130239119A1 (en) Dynamic Processor Mapping for Virtual Machine Network Traffic Queues
JPWO2015141337A1 (en) Received packet distribution method, queue selector, packet processing device, program, and network interface card
WO2014022395A1 (en) Priority driven channel allocation for packet transferring
CN107105013B (en) File processing method, server, terminal and system
CN110798400B (en) Message forwarding method and device
EP3293969A1 (en) Method of terminal-based conference load-balancing, and device and system utilizing same
CN110769040B (en) Access request processing method, device, equipment and storage medium
CN111078391A (en) Service request processing method, device and equipment
CN112269657B (en) Bandwidth balance control method and device for nodes in distributed storage system
CN111538572A (en) Task processing method, device, scheduling server and medium
CN110221775B (en) Method and device for distributing tokens in storage system
CN114666276A (en) Method and device for sending message
EP3709164A1 (en) Software assisted hashing to improve distribution of a load balancer
CN109714269B (en) Data processing method and network equipment
CN104899097A (en) Thread allocation quantity calculating method and apparatus
CN110324411B (en) Service distribution method and device
CN113890855A (en) Message forwarding method, system, equipment and medium
CN111953615A (en) Load sharing method and device and BRAS
CN113992589B (en) Message distribution method and device 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
GR01 Patent grant
GR01 Patent grant