CN111356181B - Traffic forwarding method, traffic forwarding device, network equipment and computer readable storage medium - Google Patents

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

Info

Publication number
CN111356181B
CN111356181B CN202010115549.0A CN202010115549A CN111356181B CN 111356181 B CN111356181 B CN 111356181B CN 202010115549 A CN202010115549 A CN 202010115549A CN 111356181 B CN111356181 B CN 111356181B
Authority
CN
China
Prior art keywords
flow
network
forwarding
traffic
member port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010115549.0A
Other languages
Chinese (zh)
Other versions
CN111356181A (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

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 equipartition flow of the network flow exceeds the maximum bandwidth of a certain member port in an aggregation group when the network equipment receives the network flow; the average flow is the flow distributed to each member port when the network flow is uniformly forwarded; if so, distributing target weights based on the bandwidth proportion of each member port in the aggregation group; and forwarding the network traffic according to the target weight. The invention relieves the problem of partial flow loss caused by the average flow and reduces the problem of packet loss caused by the forwarding flow of the member ports due to the performance difference of the boards.

Description

Traffic forwarding method, traffic forwarding 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 5G technology, the requirement for forwarding processing traffic to network devices is also increased. Currently, when a network device forwards traffic, the traffic entering the network device in the network is usually forwarded or discarded from the aggregation group according to a specific load balancing algorithm, and when the traffic is forwarded, the network traffic is usually forwarded uniformly. However, in practical applications, the maximum bandwidths allowed to pass through by the plurality of member ports in one aggregation group may not be the same, and the network traffic is forwarded after being equally divided, if the equally divided traffic is greater than the maximum bandwidth of a certain member port, the loss of part of the traffic will be caused.
For the loss of partial flow caused by the equal flow, no effective solution has been proposed at present.
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, including:
when network equipment receives network traffic, judging whether the equipartition flow of the network traffic exceeds the maximum bandwidth of a member port in an aggregation group; the average flow is the flow distributed to each member port when the network flow is uniformly forwarded;
if so, distributing target weights based on the bandwidth proportion of each member port in the aggregation group;
and forwarding the network traffic according to the target weight.
In an alternative embodiment, the method further comprises:
periodically detecting the service condition of each member port in the aggregation group; the member ports in the aggregation group comprise interfaces for forwarding board cards; the use condition comprises CPU use rate;
and if the forwarding board card with the CPU utilization rate exceeding the specified threshold exists, reassigning the target weight.
In an optional embodiment, when the network device receives the network traffic, the step of determining whether the average traffic of the network traffic exceeds the maximum bandwidth of a member port in the aggregation group includes:
when network equipment receives network traffic, judging that the equipartition traffic of the network traffic exceeds the maximum bandwidth of a certain member port in the aggregation group based on a rule issued by a user; and the rule issued by the user carries the information of the aggregation group.
In an alternative embodiment, the step of allocating 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 alternative embodiment, the preset algorithm includes a hash load balancing algorithm; the method further comprises the steps of:
inquiring a target module and a target interface of the member port according to the target hash value calculated by the hash load balancing algorithm;
and filling the target hash value into a switching chip so that the switching chip can forward the network traffic.
In an alternative 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 interface of the network device includes an electrical interface and an optical interface.
In a second aspect, an embodiment provides a traffic forwarding device, the device comprising:
the judging module is used for judging whether the equipartition flow of the network flow exceeds the maximum bandwidth of a certain member port in the aggregation group when the network equipment receives the network flow; the average flow is the flow distributed to each member port when the network flow is uniformly forwarded;
the weight distribution module is used for distributing target weights based on the bandwidth proportion of each member port in the aggregation group if the target weights are;
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 comprising a processor and a memory;
the memory stores computer executable instructions executable by the processor to implement the steps of the method of any of the preceding embodiments.
In a fourth aspect, embodiments provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any of the preceding embodiments.
The invention provides a flow forwarding method, a device, a network device and a computer readable storage medium, when the network device receives network flow, the network device judges whether the average flow of the network flow exceeds the maximum bandwidth of a certain member port in an aggregation group, wherein the average flow is the flow distributed to each member port when the network flow 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 flow is forwarded according to the target weight. By judging whether the average flow exceeds the maximum bandwidth of a certain member port, distributing a target weight according to the bandwidth proportion of each member port in the aggregation group when the average flow exceeds the maximum bandwidth, forwarding the network flow according to the target weight, solving the problem of partial flow loss caused by the average flow and reducing the problem of packet loss caused by the forwarding flow of the member ports due to the performance difference of the board card. Therefore, the embodiment of the invention relieves the problem of partial traffic loss caused by the average traffic and reduces the problem of packet loss caused by the forwarding traffic of the member ports due to the performance difference of the board cards.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a flow forwarding method according to an embodiment of the present invention;
fig. 2 is a flow chart of a specific flow forwarding method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a flow forwarding device 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
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the 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 invention, as 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 made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
Some embodiments of the present invention are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
Considering that the current forwarding of the network traffic after equipartition is performed, if the equipartition traffic is greater than the maximum bandwidth of a certain member port, the loss of part of the traffic is caused.
For easy understanding, a detailed description of a flow forwarding method provided by an embodiment of the present invention is first described with reference to a flow chart of a flow forwarding method shown in fig. 1, where the method mainly includes steps S102 to S106 as follows:
step S102: when the network equipment receives the network traffic, judging whether the equally divided traffic of the network traffic exceeds the maximum bandwidth of a member port in the aggregation group.
Network devices receive network traffic through a network device interface, which generally refers to the physical form externally visible on the network device, such as a 10/100/1000M electrical interface, a 1GE/10GE/100GE optical interface, and so forth. The average flow of the network flow is the flow distributed to each member port when the network flow is uniformly forwarded, for example, the aggregation group comprises 4 physical interfaces, each physical interface can also be called a member port of the aggregation group, the maximum bandwidth allowed to pass through by each member port is respectively 20G, 10G and 20G, when the network flow is 60Gbps, 15G should be distributed to each physical port when the network flow is equally distributed to completely forward the network flow, and at this time, the average flow of 15G is greater than the aggregation group member port with the maximum bandwidth allowed to pass through by 10G, in order not to cause the loss of the flow, the weight distribution is performed by adopting the following step S104.
Step S104: if so, a target weight is assigned based on the bandwidth proportion of each member port in the aggregate group.
In one embodiment, if there is an average traffic greater than the maximum bandwidth allowed to pass through the member ports of the aggregation group, at this time, the average re-forwarding of the network traffic may cause loss of part of the traffic, so as to avoid the traffic loss problem caused by the average traffic, the target weight is allocated based on the bandwidth proportion of each member port in the aggregation group. And filling the hash value into Ha Xige according to the bandwidth proportion of the member ports by 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 one embodiment, the network traffic is forwarded through the target weight allocated to each member port, so that the traffic can be ensured to be forwarded completely, and no loss of the traffic is caused.
When network equipment receives network traffic, the traffic forwarding method provided by the embodiment of the invention judges whether the average traffic of the network traffic exceeds the maximum bandwidth of a certain member port in the aggregation group, wherein the average traffic is the traffic distributed to each member port when the network traffic is uniformly forwarded, and if so, the 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, distributing a target weight according to the bandwidth proportion of each member port in the aggregation group when the average flow exceeds the maximum bandwidth, forwarding the network flow according to the target weight, solving the problem of partial flow loss caused by the average flow and reducing the problem of packet loss caused by the forwarding flow of the member ports due to the performance difference of the board card. Therefore, the embodiment of the invention relieves the problem of partial traffic loss caused by the average traffic and reduces the problem of packet loss caused by the forwarding traffic of the member ports due to the performance difference of the board cards.
Preferably, since the performance of the boards of each member port in the aggregation group is different, in order to reduce the pressure of the boards with poor performance, the use condition of each member port in the aggregation group, such as the CPU usage rate of the boards, can be periodically detected, and if there is a forwarding board with the CPU usage rate exceeding a specified threshold, the target weight is reassigned. Optionally, the detection period may be set to a period of 0.5min, 1min, 2min, and the like, and the detection period is selected according to the network traffic actually entering the network device, for example, when the traffic is more, the period may be set to be shorter, so that the use condition of the board card may be checked in real time.
The user can gather a plurality of physical ports of the board card in the device through configuration to form an aggregation group, and the weight value of the physical ports in the aggregation group can be designated in the configuration process, and is 1 by default. And the configuration supports port multiplexing, i.e. the same physical ports can be bound into multiple aggregation groups.
In one embodiment, the step S102 may include: when network traffic is received by the network device, judging that the equipartition traffic of the network traffic exceeds 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, and when receiving the target network traffic entering the device, uniformly forwarding the target network traffic through members in the aggregation group, thereby judging whether the equipartition traffic exceeds the maximum bandwidth allowed to pass through the member port in the aggregation group.
In order to determine whether the average traffic exceeds the maximum bandwidth allowed by the member ports in the aggregation group, a hash (hash) balancing load algorithm may be applied, such as 0-31 total of 32 aggregation groups, 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 lattices are circularly filled in the order of 0, 1 and 2 until the hash lattices are filled. The method for calculating the hash value comprises the following 5 algorithms, namely, according to a source IP address, a destination IP address, a source port, a destination port and a port polling.
When one of the first four algorithms is selected, a number is calculated, the number falls on a hash grid of 0-1023, a value corresponding to the hash grid is obtained, a destination module (module) and a destination interface (port) corresponding to the port are checked by the value, the FPGA fills the value into the exchange chip, and the exchange chip finally completes the forwarding of the flow. If the flows flowing through the aggregation group are concentrated in the same source/destination IP, the flows are all separated to the same physical port, so that overload of member ports is likely to occur, and the flows are lost, and at the moment, the hash algorithm is dynamically adjusted to carry out port polling, namely the incoming flows are evenly separated according to the number of ports, so that the normal forwarding of the flows is ensured. For example, when the device includes 4 boards 1, 2, 3, and 4, the maximum traffic forwarding bandwidths corresponding to these boards are respectively 40G, 10G, and 40G, where G is Gbps. In this way, 1024 hash grids are filled in a circulation mode according to the sequence of 0, 1, 2 and 3, in order to achieve the goal that the flow can equally pass out of the interface, the goal flow is required to be smaller than the minimum bandwidth value of the interface, and otherwise, the flow is lost. When the network traffic entering the device is 40G, the traffic is equally divided from four boards according to the port polling algorithm, and each board forwards 10G of traffic. However, when the network flow entering the equipment exceeds 40G, the maximum bandwidth of the 10G board is exceeded in the equal division, and at this time, the target weight is allocated according to the bandwidth proportion of the board.
For ease of understanding, referring to the flow chart of a specific flow forwarding method shown in fig. 2, taking an example that the network flow entering the device is 80G, the board is still the board1, the board2, the board3, and the board4, and the corresponding maximum flow forwarding bandwidths are 40G, 10G, and 40G respectively, where the average flow has exceeded the minimum bandwidth value of the interface, then the weight is used to redistribute the proportion of the interface forwarding, and after the weight is redistributed, the flow is not equally distributed any more, but is forwarded according to the proportion. For example let the weight value of board1 and board4 be 4, thus, the ratio of 0, 1, 2, 3 3 sequentially cyclically refilling 1024 hash bins, at this time their ratio becomes 4:1:1:4, such that each of boards 1 and 4 forwards 32G, each of boards 2 and 3 forwards 8G, thereby handling more traffic while reducing the pressure of boards 2 and 3. Preferably, when the target weight is distributed according to the bandwidth proportion, the CPU utilization rate of the dynamic detection board card, namely the CPU utilization rate of the periodic detection board card is adopted, so that when the CPU utilization rate of the board card with poor performance is too high, the weight value is redistributed, and the board card with strong forwarding performance bears more flow forwarding, thereby reducing the pressure of the board card with poor performance and achieving the purpose of dynamically adjusting the flow forwarding.
For the above-mentioned flow forwarding method, the embodiment of the present invention further provides a flow forwarding device, see a schematic structural diagram of the flow forwarding device shown in fig. 3, where the device mainly includes the following parts:
a judging module 302, configured to judge, when the network device receives the network traffic, whether an average traffic of the network traffic exceeds a maximum bandwidth of a member port in the aggregation group; the average flow is the flow distributed to each member port when the network flow is uniformly forwarded;
a weight distribution module 304, configured to distribute a target weight based on a bandwidth proportion of each member port in the aggregation group if the target weight is positive;
and the traffic forwarding module 306 is configured to forward the network traffic according to the target weight.
When network equipment receives network traffic, the traffic forwarding device provided by the embodiment of the invention judges whether the average traffic of the network traffic exceeds the maximum bandwidth of a certain member port in the aggregation group, wherein the average traffic is the traffic distributed to each member port when the network traffic is uniformly forwarded, and if so, the traffic forwarding device distributes target weights based on the bandwidth proportion of each member port in the aggregation group and forwards the network traffic according to the target weights. By judging whether the average flow exceeds the maximum bandwidth of a certain member port, distributing a target weight according to the bandwidth proportion of each member port in the aggregation group when the average flow exceeds the maximum bandwidth, forwarding the network flow according to the target weight, solving the problem of partial flow loss caused by the average flow and reducing the problem of packet loss caused by the forwarding flow of the member ports due to the performance difference of the board card. Therefore, the embodiment of the invention relieves the problem of partial traffic loss caused by the average traffic and reduces the problem of packet loss caused by the forwarding traffic of the member ports due to the performance difference of the board cards.
In one embodiment, the apparatus further comprises: the period detection module is used for periodically detecting the service condition of each member port in the aggregation group; the member ports in the aggregation group comprise interfaces of forwarding boards; the use cases include CPU usage; and if the forwarding board card with the CPU utilization rate exceeding the specified threshold exists, reassigning the target weight.
In one embodiment, the judging module 302 is further configured to judge, when the network device receives the network traffic, that the average traffic of the network traffic exceeds the maximum bandwidth of a member port in the aggregation group based on a rule issued by the user; the rules issued by the user carry information of the aggregation group.
In one embodiment, the weight allocation module 304 is further configured to allocate 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 preset algorithm comprises a hash load balancing algorithm; the device further comprises: the query module is used for querying the target module and the target interface of the member port according to the target hash value calculated by the hash load balancing algorithm; and the value filling module is used for filling the target hash value into the switching chip so that the switching chip can forward the network traffic.
In one embodiment, the traffic forwarding module 306 is further configured to forward the network traffic based on the target weight and the board sequence of each member port.
In one embodiment, the interfaces of the network device include an electrical interface and an optical interface.
The device provided by the embodiment of the present invention has the same implementation principle and technical effects as those of the foregoing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiment where the device embodiment is not mentioned.
The device is a network device, and specifically, the network device includes 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 embodiments described above.
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, the processor 40, the communication interface 43 and the memory 41 being connected by 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, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. The communication connection between the system network element and the at least one other network element is achieved via at least one communication interface 43 (which may be wired or wireless), which may use the internet, a wide area network, a local network, a metropolitan area network, etc.
Bus 42 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 4, but not only one bus or type of bus.
The memory 41 is configured to store a program, and the processor 40 executes the program after receiving an execution instruction, and the method executed by the apparatus for flow defining 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 circuitry in hardware or instructions in software in processor 40. The processor 40 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but may also be a digital signal processor (Digital Signal Processing, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks 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 embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as 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 in combination with its hardware performs the steps of the method described above.
The flow forwarding method, apparatus, network device and computer program product of the computer readable storage medium provided in the embodiments of the present invention include a computer readable storage medium storing non-volatile program codes 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 embodiment is executed, and specific implementation may be referred to the method embodiment and will not be described herein.
It will be clear to 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 embodiment, which is not described in detail herein.
The computer program product of the readable storage medium provided by the embodiment of the present invention includes a computer readable storage medium storing a program code, where the program code includes instructions for executing the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment and will not be described herein.
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 this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform 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, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (10)

1. A method for forwarding traffic, the method comprising:
when network equipment receives network traffic, judging whether the equipartition flow of the network traffic exceeds the maximum bandwidth of a member port in an aggregation group; the average flow is the flow distributed to each member port when the network flow is uniformly forwarded;
if so, distributing target weights based on the bandwidth proportion of each member port in the aggregation group;
and forwarding the network traffic according to the target weight.
2. The method according to claim 1, wherein the method further comprises:
periodically detecting the service condition of each member port in the aggregation group; the member ports in the aggregation group comprise interfaces for forwarding board cards; the use condition comprises CPU use rate;
and if the forwarding board card with the CPU utilization rate exceeding the specified threshold exists, reassigning the target weight.
3. The method of claim 1, wherein the step of determining whether the equally divided traffic of the network traffic exceeds the maximum bandwidth of a member port in the aggregation group when the network device receives the network traffic comprises:
when network equipment receives network traffic, judging that the equipartition traffic of the network traffic exceeds the maximum bandwidth of a certain member port in the aggregation group based on a rule issued by a user; and 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 aggregate 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 steps of:
inquiring a target module and a target interface of the member port according to the target hash value calculated by the hash load balancing algorithm;
and filling the target hash value into a switching chip so that the switching chip can forward the network traffic.
6. The method of claim 1, wherein the step of forwarding the network traffic according to the target weights 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 interface of the network device comprises an electrical interface and an optical interface.
8. A traffic forwarding device, the device comprising:
the judging module is used for judging whether the equipartition flow of the network flow exceeds the maximum bandwidth of a certain member port in the aggregation group when the network equipment receives the network flow; the average flow is the flow distributed to each member port when the network flow is uniformly forwarded;
the weight distribution module is used for distributing target weights based on the bandwidth proportion of each member port in the aggregation group if the target weights are;
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 it has stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any 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 CN111356181A (en) 2020-06-30
CN111356181B true 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)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532594B (en) * 2020-11-16 2022-11-25 杭州迪普科技股份有限公司 Method and device for creating aggregation group and forwarding message
CN113098790B (en) * 2021-03-26 2022-06-21 新华三信息安全技术有限公司 Flow forwarding method and device
CN113992589B (en) * 2021-10-21 2023-05-26 绿盟科技集团股份有限公司 Message distribution method and device and electronic equipment

Citations (5)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9929897B2 (en) * 2016-04-05 2018-03-27 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

Patent Citations (5)

* 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
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

Also Published As

Publication number Publication date
CN111356181A (en) 2020-06-30

Similar Documents

Publication Publication Date Title
CN111356181B (en) Traffic forwarding method, traffic forwarding device, network equipment and computer readable storage medium
CN107026907B (en) Load balancing method, load balancer and load balancing system
CN109218355B (en) Load balancing engine, client, distributed computing system and load balancing method
CN113132249A (en) Load balancing method and equipment
WO2015141337A1 (en) Reception packet distribution method, queue selector, packet processing device, and recording medium
CN102916903B (en) Cache adjusting method and device
CN107105013B (en) File processing method, server, terminal and system
CN104067578A (en) Dynamic load balancing without packet reordering
CN110769040B (en) Access request processing method, device, equipment and storage medium
CN110798400B (en) Message forwarding method and device
CN101572673A (en) Distributed packet switching system and distributed packet switching method of expanded switching bandwidth
US20170048145A1 (en) Switching device and control method of switching device
US11303571B2 (en) Data communication method and data communications network
US10965602B2 (en) Software assisted hashing to improve distribution of a load balancer
CN112269657B (en) Bandwidth balance control method and device for nodes in distributed storage system
CN111866902A (en) Resource utilization rate evaluation method and device
CN116318554A (en) Network transmission method and device
CN110324411B (en) Service distribution method and device
CN113973342A (en) Flow control method and device, electronic equipment and storage medium
CN113890855A (en) Message forwarding method, system, equipment and medium
CN110046040B (en) Distributed task processing method and system and storage medium
CN113992589B (en) Message distribution method and device and electronic equipment
CN111953615A (en) Load sharing method and device and BRAS
CN111654449B (en) Physical link flow balancing method and device
CN117354246A (en) ECMP flow equalization method, ECMP flow equalization device and storage medium

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