CN102255816B - Method and device for load sharing - Google Patents

Method and device for load sharing Download PDF

Info

Publication number
CN102255816B
CN102255816B CN201110238078.3A CN201110238078A CN102255816B CN 102255816 B CN102255816 B CN 102255816B CN 201110238078 A CN201110238078 A CN 201110238078A CN 102255816 B CN102255816 B CN 102255816B
Authority
CN
China
Prior art keywords
outgoing interface
message
list item
physics
stream table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201110238078.3A
Other languages
Chinese (zh)
Other versions
CN102255816A (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.)
Beijing Huawei Digital Technologies Co Ltd
Original Assignee
Beijing Huawei Digital 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 Beijing Huawei Digital Technologies Co Ltd filed Critical Beijing Huawei Digital Technologies Co Ltd
Priority to CN201110238078.3A priority Critical patent/CN102255816B/en
Publication of CN102255816A publication Critical patent/CN102255816A/en
Application granted granted Critical
Publication of CN102255816B publication Critical patent/CN102255816B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a method for load sharing, comprising the steps of: searching a corresponding first logical output interface according to the destination address of a first message; searching a matched first stream table entry in a stream table according to one or a plurality of fields in the quintuple of the first message; if the length of the stream table output interface of the first stream table entry is greater than or equal to the length of the first message, then sending the first message via the stream table output interface of the first stream table entry; or else, selecting a first physical output interface from a plurality of physical output interfaces, replacing the stream table output interface of the first stream table entry by the first physical output interface, and sending the first message via the first physical output interface. Additionally, the embodiment of the invention further provides a corresponding device for load sharing as well as another method and device for load sharing. Via the method and device for load sharing provided by the embodiment of the invention, the problem of load unbalance caused to traffic Hash can be solved, and the overall utilization rate of the physical output interfaces is increased.

Description

Load sharing method and device
Technical field
The embodiment of the present invention relates to the communication technology, particularly relates to load sharing method and device.
Background technology
Load balancing is a kind of technological means improving network bandwidth utilization factor, is widely used in communication network at present.Load balancing can realize following technique effect:
One, by assignment of traffic to multilink, be equivalent to the total bandwidth adding link;
Two, after certain link occurs fault, flow can forward from other links, improves link reliability.
Inventor finds, prior art exists following technical problem:
Carry out Hash to flow, and the physics outgoing interface corresponding according to Hash result forwards to flow, part physical outgoing interface may be caused relatively busy and other physics outgoing interface relative free, the overall utilization rate of physics outgoing interface is lower.
Summary of the invention
The embodiment of the present invention provides load sharing method and device, can solve the load imbalance problem caused flow Hash, improve the overall utilization rate of physics outgoing interface.
On the one hand, a kind of load sharing method that the embodiment of the present invention provides, comprising:
According to the destination address of the first message, search the first logic outgoing interface that this first message is corresponding in next skip list, this first logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface;
According to the one or more fields in the source Internet protocol IP address of this first message, object IP address, source port number, destination slogan and protocol number, the first-class table list item mated with this first message is searched in stream table, the list item of this stream table comprises Hash keys and stream table outgoing interface, and this stream table outgoing interface is a physics outgoing interface in the plurality of physics outgoing interface;
If find this first-class table list item in this stream table, and the length of the token of the stream table outgoing interface of first-class table list item is more than or equal to the length of this first message, is sent by the stream table outgoing interface of this first message by this first-class table list item; If the length of the token of the stream table outgoing interface of this first-class table list item is less than the length of this first message, selected first physics outgoing interface from described multiple physics outgoing interface, the length of the token of this first physics outgoing interface is more than or equal to the length of this first message, the stream table outgoing interface of this first-class table list item is replaced with this first physics outgoing interface, sends this first message by this first physics outgoing interface.
On the other hand, a kind of load sharing method that the embodiment of the present invention provides, comprising:
According to the destination address of the first message, search the first logic outgoing interface that this first message is corresponding in next skip list, this first logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface;
According to the one or more fields in the source MAC address of this first message, target MAC (Media Access Control) address and virtual LAN VLAN, the first-class table list item mated with this first message is searched in stream table, the list item of this stream table comprises Hash keys and stream table outgoing interface, and this stream table outgoing interface is a physics outgoing interface in the plurality of physics outgoing interface;
If find this first-class table list item in this stream table, and the length of the token of the stream table outgoing interface of this first-class table list item is more than or equal to the length of this first message, the stream table outgoing interface of this first message by this first-class table list item is sent, if the length of the token of the stream table outgoing interface of this first-class table list item is less than the length of this first message, selected first physics outgoing interface from the plurality of physics outgoing interface, the length of the token of this first physics outgoing interface is more than or equal to the length of this first message, the stream table outgoing interface of this first-class table list item in this first-class table list item is replaced with this first physics outgoing interface, this the first message is sent by this first physics outgoing interface.
Another aspect, a kind of load balancing device that the embodiment of the present invention provides, comprising:
First searches unit, and for the destination address according to the first message, search the first logic outgoing interface that this first message is corresponding in next skip list, this first logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface;
Second searches unit, for the one or more fields in the IP address according to this first message, object IP address, source port number, destination slogan and protocol number, the first-class table list item mated with this first message is searched in stream table, the list item of this stream table comprises Hash keys and stream table outgoing interface, and this stream table outgoing interface is a physics outgoing interface in the plurality of physics outgoing interface;
First transmitter, if for finding this first-class table list item in this stream table, and the length of the token of the stream table outgoing interface of this first-class table list item is more than or equal to the length of this first message, the stream table outgoing interface of this first message by this first-class table list item is sent; If the length of the token of the stream table outgoing interface of this first-class table list item is less than the length of this first message, selected first physics outgoing interface from the plurality of physics outgoing interface, the length of the token of this first physics outgoing interface is more than or equal to the length of this first message, the stream table outgoing interface of this first-class table list item is replaced with this first physics outgoing interface, sends this first message by this first physics outgoing interface.
Another aspect, a kind of load balancing device that the embodiment of the present invention provides, comprising:
First searches unit, and for the destination address according to the first message, search the first logic outgoing interface that this first message is corresponding in next skip list, this first logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface;
Second searches unit, for the one or more fields in the source MAC according to this first message, target MAC (Media Access Control) address and VLAN, the first-class table list item mated with this first message is searched in stream table, the list item of this stream table comprises Hash keys and stream table outgoing interface, and this stream table outgoing interface is a physics outgoing interface in this plurality of physics outgoing interface;
First transmitter, if for finding this first-class table list item in this stream table, and the length of the token of the stream table outgoing interface of this first-class table list item is more than or equal to the length of this first message, the stream table outgoing interface of this first message by this first-class table list item is sent, if the length of the token of the stream table outgoing interface of this first-class table list item is less than the length of this first message, selected first physics outgoing interface from the plurality of physics outgoing interface, the length of the token of this first physics outgoing interface is more than or equal to the length of this first message, the stream table outgoing interface of this first-class table list item is replaced with this first physics outgoing interface, this the first message is sent by this first physics outgoing interface.
Visible, the load sharing method proposed by the embodiment of the present invention and device are forwarded message, can obtain preferred physics outgoing interface for forwarding this message by searching stream table, the length that the token of this physics outgoing interface is corresponding is more than or equal to the length of this message.In addition, if not used for the preferred physics outgoing interface forwarding this message in stream table, can upgrade by convection current table.Stream table after renewal has possessed the preferred physics outgoing interface for forwarding this message.Therefore, the load sharing method that the embodiment of the present invention proposes and device can solve the load imbalance problem caused flow Hash, improve the overall utilization rate of physics outgoing interface
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is that the embodiment of the present invention provides a kind of load sharing method and application of installation in the networking structure figure of a certain scene;
Fig. 2 is a kind of load sharing method flow chart that the embodiment of the present invention provides;
Fig. 3 is a kind of schematic diagram flowing the forms such as table that the embodiment of the present invention provides;
Fig. 4 is that the embodiment of the present invention provides another kind of load sharing method and application of installation in the networking structure figure of a certain scene;
Fig. 5 is the another kind of load sharing method flow chart that the embodiment of the present invention provides;
Fig. 6 is the schematic diagram of the forms such as the another kind stream table that provides of the embodiment of the present invention;
Fig. 7 is a kind of load balancing device schematic diagram that the embodiment of the present invention provides;
Fig. 8 is the another kind of load balancing device schematic diagram that the embodiment of the present invention provides.
Detailed description of the invention
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Embodiments provide a kind of load sharing method and device, can solve and Hash is carried out to flow, and the physics outgoing interface corresponding according to Hash result forwards flow, the relatively busy and technical problem of other physics outgoing interface relative free of the part physical outgoing interface that may cause, improves the overall utilization rate of physics outgoing interface.Fig. 1 is the networking structure figure of a certain application scenarios of the embodiment of the present invention.
The networking structure figure of Fig. 1 comprises router (Router) R1, R2, R3, R4 and R5.R1 comprises 4 physical interfaces, is gigabit ether (Gigabit Ethernet) GE1, GE2, GE3 and GE4 respectively.Wherein, GE1 is physics incoming interface, and GE2, GE3, GE4 are physics outgoing interfaces.GE2, GE3 and GE4 are the members converging (TRUNK) mouth 1.R1 receives after destination is the message of R5 by GE1, will be forwarded to down hop, and finally arriving R5 by converging mouth 1.
Embodiment one:
Embodiments provide a kind of load sharing method, may be used in the network equipment of the TRUNK mouth with multiple member, be the load sharing method flow chart that the embodiment of the present invention provides see Fig. 2, Fig. 2, the method comprises:
201: according to the destination address of the first message, in next skip list, search the first logic outgoing interface that this first message is corresponding, this first logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface;
During specific implementation, according to the destination address of the first message, the first logic outgoing interface searching this first message corresponding in next skip list can have multiple implementation, and the present invention does not do concrete restriction.The network equipment can be router.First message can be the message that the network equipment generates.First message also can be the message that the network equipment receives from upstream network device.First message can be the three-tier message of open system interconnection (OpenSystems Interconnection, OSI) model definition, such as Internet Protocol (InternetProtocol, IP) grouping.
The network equipment can find the first logic outgoing interface corresponding to this first message according to next skip list.Next skip list can be routing table.When next skip list is routing table, next skip list can comprise multiple route table items, and each route table items comprises logic outgoing interface corresponding to object IP address and this object IP address.Logic outgoing interface can comprise multiple physics outgoing interface.Described logic outgoing interface can be TRUNK mouth.When logic outgoing interface is TRUNK mouth, multiple physics outgoing interfaces that logic outgoing interface comprises are all the members of this logic outgoing interface.
First logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface.Token table can comprise multiple token list item, and each token list item can comprise the physics outgoing interface token corresponding with this physics outgoing interface.
See Fig. 1 and Fig. 2, the network equipment can be router R1, and the IP grouping of the first message can be destination be router R5, the first logic outgoing interface can be converge mouth 1.The destination that the upstream network device that router R1 receives router R1 by GE1 sends is the IP grouping of router R5, such as, after the first message, can find according to the destination address of the first message the list item mated with the destination address of the first message in next skip list, thus obtain the logic outgoing interface of the first message.When the destination address of the first message is object IP address 1, the logic outgoing interface of the first message is logic outgoing interface 1.Logic outgoing interface 1 is for converging mouth 1, and converging mouth 1 and comprise three physics outgoing interfaces, is GE2, GE3 and GE4 respectively.GE2, GE3 and GE4 token corresponding respectively can be obtained according to token table.
202: according to the one or more fields in the source Internet protocol IP address of this first message, object IP address, source port number, destination slogan and protocol number, in stream table, search the first-class table list item mated with this first message.The list item of this stream table comprises Hash keys and stream table outgoing interface.This stream table outgoing interface is a physics outgoing interface in the plurality of physics outgoing interface.
Stream epi-position is in the network equipment, and stream table can comprise multiple stream table list item, and each stream table list item can comprise Hash keys and stream table outgoing interface corresponding to this Hash keys.Hash keys can comprise in source IP address, object IP address, source port number, destination slogan and protocol number one or more.Stream table outgoing interface is physics outgoing interface.When flow in table there is the first-class table list item mated with the first message time, the stream table outgoing interface in this first-class table list item is one in multiple physics outgoing interfaces of comprising of the first logic outgoing interface.Hash keys in this first-class table list item is equal with the corresponding field of the first message.Such as, when the Hash keys of first-class table list item comprises source IP address and object IP address, the source IP address of first-class table list item equals the source IP address of the first message, and the object IP address of first-class table list item equals the object IP address of the first message.
See Fig. 1 and Fig. 2, router R1 is according to the five-tuple of the first message, i.e. source port number, destination slogan, source IP address, object IP address and protocol number, searches the first-class table list item that Hash keys is mated with the five-tuple of the first message in stream table.Stream table comprises multiple stream table list item, and each stream table list item comprises Hash keys and stream table outgoing interface.Hash keys comprises source port number, destination slogan, source IP address, object IP address and protocol number.The stream table outgoing interface of first-class table list item is GE2, GE3 or GE4.The source port number of the Hash keys of first-class table list item, destination slogan, source IP address, object IP address and protocol number equal the source port number of the first message, destination slogan, source IP address, object IP address and protocol number respectively.
203: if find this first-class table list item in this stream table, and the length of the token of the stream table outgoing interface of first-class table list item is more than or equal to the length of this first message, the stream table outgoing interface of this first message by this first-class table list item is sent.If the length of the token of the stream table outgoing interface of first-class table list item is less than the length of this first message, selected first physics outgoing interface from described multiple physics outgoing interface, the length of the token of this first physics outgoing interface is more than or equal to the length of this first message, the stream table outgoing interface of this first-class table list item is replaced with this first physics outgoing interface, sends this first message by this first physics outgoing interface.
Token algorithm may be used for traffic shaping (Traffic Shaping) and rate limit (RateLimiting), and token may be used for the size indicating whether to allow transmitted traffic and allow the flow sent.Specific token can corresponding specific length.Such as, token is 1 for representing the flow allowing transmission 1 byte, or for representing the flow allowing transmission 2 bytes.When token is 1 expression permission transmission 1 byte, if message is less than or equal to 1 byte, then this message can send from the physics outgoing interface that token is corresponding.
See Fig. 1 and Fig. 2, the stream table list item mated with the first message in stream table is first-class table list item.The stream table outgoing interface of this first-class table list item is first-class table outgoing interface.Wherein, the Hash keys of first-class table list item is message 1-Hash keys; First-class table outgoing interface is stream table outgoing interface 1.When the length of the token of stream table outgoing interface 1 is greater than or equal to the length of the first message, the first message is sent by stream table outgoing interface 1.The length of such as the first message is 1000 bits, and stream table outgoing interface 1 is the length that the token of GE1, GE1 is corresponding is 2000 bits, then send the first message by GE1; When the length of the token of stream table outgoing interface 1 is less than the length of the first message, the stream table outgoing interface 1 of first-class table list item is replaced with the first physics outgoing interface.The length of the token of the first physics outgoing interface is more than or equal to the length of the first message, is sent by the first message by the first physics outgoing interface.The length of the token of such as GE1 is 2000 bits, and the length of the first message is 3000 bits, and the length of the token of GE1 is less than the length of the first message.In this case the stream table outgoing interface 1 of first-class table list item can be replaced with the first physics outgoing interface, such as stream table outgoing interface 2.Stream table outgoing interface 2 is the length of the token of GE2, GE2 is 3000 bits, and the length of the token of GE2 equals the length of the first message.The first message is sent by GE2.
Visible, the load sharing method proposed by the embodiment of the present invention is forwarded message, can obtain preferred physics outgoing interface for forwarding this message by searching stream table, and the length that the token of this physics outgoing interface is corresponding is more than or equal to the length of this message.In addition, if not used for the preferred physics outgoing interface forwarding this message in stream table, can upgrade by convection current table.Stream table after renewal has possessed the preferred physics outgoing interface for forwarding this message.Therefore, the load sharing method that the embodiment of the present invention proposes can solve the load imbalance problem caused flow Hash, improves the overall utilization rate of physics outgoing interface
In addition, before forwarding message, by searching the physics outgoing interface of stream table acquisition for forwarding this message.As long as stream table does not upgrade, the physics outgoing interface of the subsequent packet identical with the Hash factor of this message would not change.The physics outgoing interface of the subsequent packet identical with the Hash factor of this message is relatively fixing, will reduce the generation of packet out-ordering.
Alternatively, load sharing method can also comprise:
If do not find the stream table list item mated with this first message in this stream table, selected second physics outgoing interface from described multiple physics outgoing interface, the length of the token of the second physics outgoing interface is more than or equal to the length of the first message, add the list item comprising this second physics outgoing interface to this stream table, send this first message by this second physics outgoing interface.
Like this, when there is not the list item mated with the first message in stream table, be the physics outgoing interface that the first message finds applicable transmission first message, and convection current table upgrade.The message that in subsequent packet, five-tuple is identical with the first message directly can search the stream table list item of coupling in stream table.
See Fig. 1 and Fig. 2, if router R1 does not find the list item mated with the first message in stream table, R1 can search the physics outgoing interface of applicable transmission first message in token table.The length of such as the first message is 1500 bits.R1 finds the second physics outgoing interface in token table, and the second physics outgoing interface is GE3.The length that the token of GE3 is corresponding is 2000 bits.R1 adds the list item of the physics outgoing interface comprising message 1-Hash keys and GE3 to this stream table.R1 sends the first message by GE3.
Alternatively, selected first physics outgoing interface, specifically comprises:
With a field in the source IP address of this first message, object IP address, source port number, destination slogan and protocol number or multiple field for the Hash factor carries out Hash operation, obtain the first Hash result;
In token table, search the token list item that hash index mates with this first Hash result, the list item of token table comprises hash index, the token of physics outgoing interface and this physics outgoing interface;
In the token list item mated with the first Hash result from token table, choose the first token list item.In this first token list item, the length of token is more than or equal to the length of this first message.
Optionally,
The token of this first physics outgoing interface can be the maximum of the token of each physics outgoing interface in the plurality of physics outgoing interface.
Like this, in the multiple physics outgoing interfaces selecting the first logic outgoing interface corresponding, the maximum physics outgoing interface of token, as the first physics outgoing interface, can guarantee the physics outgoing interface preferentially utilizing relative free.
Optionally,
This first logic outgoing interface can for converging mouth, and in the plurality of physics outgoing interface, each physics outgoing interface is the member of this first logic outgoing interface.
Optionally,
The token of this second physics outgoing interface can be the maximum of the token of each physics outgoing interface in the plurality of physics outgoing interface.
In the multiple physics outgoing interfaces selecting the first logic outgoing interface corresponding, the maximum physics outgoing interface of token, as the second physics outgoing interface, can guarantee the physics outgoing interface preferentially utilizing relative free.
Embodiment two:
Embodiments provide a kind of load sharing method, may be used in the network equipment of the TRUNK mouth with multiple member, be the load sharing method flow chart that the embodiment of the present invention provides see Fig. 5, Fig. 5, the method comprises:
501: according to the destination address of the first message, in next skip list, search the first logic outgoing interface that this first message is corresponding, this first logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface;
During specific implementation, according to the destination address of the first message, the first logic outgoing interface searching this first message corresponding in next skip list can have multiple implementation, and the present invention does not do concrete restriction.The network equipment can be switch.First message can be the message that the network equipment generates.First message also can be the message that the network equipment receives from upstream network device.First message can be the two layer message of osi model definition, such as medium education (Media Access Control, MAC) frame.
The network equipment can find the first logic outgoing interface corresponding to this first message according to next skip list.Next skip list can be MAC table.When next skip list is MAC table, next skip list can comprise multiple MAC address entries, and each MAC address entries comprises target MAC (Media Access Control) address and logic outgoing interface corresponding to this target MAC (Media Access Control) address.Logic outgoing interface can comprise multiple physics outgoing interface.Described logic outgoing interface can be TRUNK mouth.When logic outgoing interface is TRUNK mouth, multiple physics outgoing interfaces that logic outgoing interface comprises are all the members of this logic outgoing interface.
First logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface.Token table can comprise multiple token list item, and each token list item can comprise the physics outgoing interface token corresponding with this physics outgoing interface.
See Fig. 4 and Fig. 5, the network equipment can be switch S1, and the mac frame of the first message can be destination be switch S5, the first logic outgoing interface can be converge mouth 1.The destination that the upstream network device that switch S1 receives switch S1 by GE1 sends is the mac frame of switch S5, such as, after the first message, can find according to the destination address of the first message the list item mated with the destination address of the first message in next skip list, thus obtain the logic outgoing interface of the first message.When the destination address of the first message is object IP address 1, the logic outgoing interface of the first message is logic outgoing interface 1.Logic outgoing interface 1 is for converging mouth 1, and converging mouth 1 and comprise three physics outgoing interfaces, is GE2, GE3 and GE4 respectively.GE2, GE3 and GE4 token corresponding respectively can be obtained according to token table.
502: according to the one or more fields in the source MAC address of this first message, target MAC (Media Access Control) address and virtual LAN VLAN, in stream table, search the first-class table list item mated with this first message.The list item of this stream table comprises Hash keys and stream table outgoing interface.This stream table outgoing interface is a physics outgoing interface in the plurality of physics outgoing interface.
Stream epi-position is in the network equipment, and stream table can comprise multiple stream table list item, and each stream table list item can comprise Hash keys and stream table outgoing interface corresponding to this Hash keys.Hash keys can comprise in source MAC, target MAC (Media Access Control) address and VLAN (Virtual Local Area Network, VLAN) one or more.This VLAN can be customer Virtual Local Area Network (Customer Virtual Local AreaNetwork, CVLAN) or operator's VLAN (Service Virtual Local AreaNetwork, SVLAN).Specifically please refer to IEEE802.1ad.Stream table outgoing interface is physics outgoing interface.When flow in table there is the first-class table list item mated with the first message time, the stream table outgoing interface in this first-class table list item is one in multiple physics outgoing interfaces of comprising of the first logic outgoing interface.Hash keys in this first-class table list item is equal with the corresponding field of the first message.Such as, when the Hash keys of first-class table list item comprises source MAC and target MAC (Media Access Control) address, the source MAC of first-class table list item equals the source MAC of the first message, and the target MAC (Media Access Control) address of first-class table list item equals the target MAC (Media Access Control) address of the first message.
See Fig. 4 and Fig. 5, switch S1, according to the source MAC of the first message and target MAC (Media Access Control) address, searches the first-class table list item that Hash keys is mated with the first message in stream table.Stream table comprises multiple stream table list item, and each stream table list item comprises Hash keys and stream table outgoing interface.Hash keys comprises source MAC and target MAC (Media Access Control) address.The stream table outgoing interface of first-class table list item is GE2, GE3 or GE4.The source MAC of the Hash keys of first-class table list item and target MAC (Media Access Control) address equal source MAC and the target MAC (Media Access Control) address of the first message respectively.
503: if find this first-class table list item in this stream table, and the length of the token of the stream table outgoing interface of first-class table list item is more than or equal to the length of this first message, the stream table outgoing interface of this first message by this first-class table list item is sent.If the length of the token of the stream table outgoing interface of first-class table list item is less than the length of this first message, selected first physics outgoing interface from described multiple physics outgoing interface, the length of the token of this first physics outgoing interface is more than or equal to the length of this first message, the stream table outgoing interface of this first-class table list item is replaced with this first physics outgoing interface, sends this first message by this first physics outgoing interface.
Token algorithm may be used for traffic shaping and rate limit, and token may be used for the size indicating whether to allow transmitted traffic and allow the flow sent.Specific token can corresponding specific length.Such as, token is 1 for representing the flow allowing transmission 1 byte, or for representing the flow allowing transmission 2 bytes.When token is 1 expression permission transmission 1 byte, if message is less than or equal to 1 byte, then this message can send from the physics outgoing interface that token is corresponding.
See Fig. 4 and Fig. 5, the stream table list item mated with the first message in stream table is first-class table list item.The stream table outgoing interface of this first-class table list item is first-class table outgoing interface.Wherein, the Hash keys of first-class table list item is message 1-Hash keys; First-class table outgoing interface is stream table outgoing interface 1.When the length of the token of stream table outgoing interface 1 is greater than or equal to the length of the first message, the first message is sent by stream table outgoing interface 1.The length of such as the first message is 1000 bits, and stream table outgoing interface 1 is the length that the token of GE1, GE1 is corresponding is 2000 bits, then send the first message by GE1; When the length of the token of stream table outgoing interface 1 is less than the length of the first message, the stream table outgoing interface 1 of first-class table list item is replaced with the first physics outgoing interface.The length of the token of the first physics outgoing interface is more than or equal to the length of the first message, is sent by the first message by the first physics outgoing interface.The length of the token of such as GE1 is 2000 bits, and the length of the first message is 3000 bits, and the length of the token of GE1 is less than the length of the first message.In this case the stream table outgoing interface 1 of first-class table list item can be replaced with the first physics outgoing interface, such as stream table outgoing interface 2.Stream table outgoing interface 2 is the length of the token of GE2, GE2 is 3000 bits, and the length of the token of GE2 equals the length of the first message.The first message is sent by GE2.
Visible, the load sharing method proposed by the embodiment of the present invention is forwarded message, can obtain preferred physics outgoing interface for forwarding this message by searching stream table, and the length that the token of this physics outgoing interface is corresponding is more than or equal to the length of this message.In addition, if not used for the preferred physics outgoing interface forwarding this message in stream table, can upgrade by convection current table.Stream table after renewal has possessed the preferred physics outgoing interface for forwarding this message.Therefore, the load sharing method that the embodiment of the present invention proposes can solve the load imbalance problem caused flow Hash, improves the overall utilization rate of physics outgoing interface
In addition, before forwarding message, by searching the physics outgoing interface of stream table acquisition for forwarding this message.As long as stream table does not upgrade, the physics outgoing interface of the subsequent packet identical with the Hash factor of this message would not change.The physics outgoing interface of the subsequent packet identical with the Hash factor of this message is relatively fixing, will reduce the generation of packet out-ordering.
Embodiment three:
Embodiments provide a kind of load balancing device, may be used in the network equipment of the TRUNK mouth with multiple member.This load balancing device can be the R1 in Fig. 1.The load balancing device schematic diagram that the embodiment of the present invention provides see Fig. 7, Fig. 7; This device comprises:
First searches unit 701, and for the destination address according to the first message, search the first logic outgoing interface that this first message is corresponding in next skip list, this first logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface;
During specific implementation, according to the destination address of the first message, the first logic outgoing interface searching this first message corresponding can have multiple implementation, and the present invention does not do concrete restriction.The network equipment can be router.First message can be the message that this network equipment generates, and also can be the message that this network equipment receives from upstream network device.First message can be the three-tier message of osi model definition, such as IP grouping.
The network equipment can find the first logic outgoing interface corresponding to this first message according to next skip list.Next skip list can be routing table.When next skip list is routing table, next skip list can comprise multiple route table items, and each route table items comprises logic outgoing interface corresponding to object IP address and this object IP address.Logic outgoing interface can comprise multiple physics outgoing interface.Described logic outgoing interface can be TRUNK mouth.When logic outgoing interface is TRUNK mouth, multiple physics outgoing interfaces that logic outgoing interface comprises are all the members of this logic outgoing interface.
First logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface.Token table can comprise multiple token list item, and each token list item can comprise the physics outgoing interface token corresponding with this physics outgoing interface.
See Fig. 1 and Fig. 3, the network equipment can be router R1, and the IP grouping of the first message can be destination be router R5, the first logic outgoing interface can be converge mouth 1.The destination that the upstream network device that router R1 receives router R1 by GE1 sends is the IP grouping of router R5, such as, after the first message, can according to the destination address of the first message, in next skip list, find the list item mated with the destination address of the first message, thus obtain the logic outgoing interface of the first message.When the destination address of the first message is object IP address 1, the logic outgoing interface of the first message is logic outgoing interface 1.Logic outgoing interface 1 is for converging mouth 1, and converging mouth 1 and comprise three physics outgoing interfaces, is GE2, GE3 and GE4 respectively.GE2, GE3 and GE4 token corresponding respectively can be obtained according to token table.
Second searches unit 702, for the one or more fields in the IP address according to this first message, object IP address, source port number, destination slogan and protocol number, searches the first-class table list item mated with this first message in this stream table.The list item of this stream table comprises Hash keys and stream table outgoing interface.This stream table outgoing interface is a physics outgoing interface in the plurality of physics outgoing interface.
Stream epi-position is in the network equipment, and stream table can comprise multiple stream table list item, and each stream table list item can comprise Hash keys and stream table outgoing interface corresponding to this Hash keys.Hash keys can comprise in source port number, destination slogan, source IP address, object IP address and protocol number one or more.Stream table outgoing interface is physics outgoing interface.When flow in table there is the first-class table list item mated with the first message time, the stream table outgoing interface in this first-class table list item is one in multiple physics outgoing interfaces of comprising of the first logic outgoing interface.Hash keys in this first-class table list item is equal with the corresponding field of the first message.Such as, when the Hash keys of first-class table list item comprises source IP address and object IP address, the source IP address of first-class table list item equals the source IP address of the first message, and the object IP address of first-class table list item equals the object IP address of the first message.
See Fig. 1 and Fig. 3, router R1 is according to the five-tuple of the first message, i.e. source port number, destination slogan, source IP address, object IP address and protocol number, searches the first-class table list item that Hash keys is mated with the five-tuple of the first message in stream table.Stream table comprises multiple stream table list item, and each stream table list item comprises Hash keys and stream table outgoing interface.Hash keys comprises source port number, destination slogan, source IP address, object IP address and protocol number.The stream table outgoing interface of first-class table list item is GE2, GE3 or GE4.The source port number of the Hash keys of first-class table list item, destination slogan, source IP address, object IP address and protocol number equal the source port number of the first message, destination slogan, source IP address, object IP address and protocol number respectively.
First transmitter 703, if for finding this first-class table list item in this stream table, and the length of the token of the stream table outgoing interface of this first-class table list item is more than or equal to the length of this first message, the stream table outgoing interface of this first message by this first-class table list item is sent.If the length of the token of the stream table outgoing interface of first-class table list item is less than the length of this first message, selected first physics outgoing interface from described multiple physics outgoing interface, the length of the token of this first physics outgoing interface is more than or equal to the length of this first message, the stream table outgoing interface of this first-class table list item is replaced with this first physics outgoing interface, sends this first message by this first physics outgoing interface.
Token algorithm may be used for traffic shaping and rate limit, and token may be used for the size indicating whether to allow transmitted traffic and allow the flow sent.Specific token can corresponding specific length.Such as, token is 1 for representing the flow allowing transmission 1 byte, or for representing the flow allowing transmission 2 bytes.When token is 1 expression permission transmission 1 byte, if message is less than or equal to 1 byte, then this message can send from the physics outgoing interface that token is corresponding.
See Fig. 1 and Fig. 3, the stream table list item mated with the first message in stream table is first-class table list item.The stream table outgoing interface of this first-class table list item is first-class table outgoing interface.Wherein, the Hash keys of first-class table list item is message 1-Hash keys; First-class table outgoing interface is stream table outgoing interface 1.When the length of the token of stream table outgoing interface 1 is greater than or equal to the length of the first message, the first message is sent by stream table outgoing interface 1.The length of such as the first message is 1000 bits, and stream table outgoing interface 1 is the length that the token of GE1, GE1 is corresponding is 2000 bits, then send message by GE1; When the length that the token of stream table outgoing interface 1 is corresponding is less than the length of the first message, the stream table outgoing interface 1 of first-class table list item is replaced with the first physics outgoing interface.The length of the token of the first physics outgoing interface is more than or equal to the length of the first message, is sent by the first message by the first physics outgoing interface.The length that the token of such as GE1 is corresponding is 2000 bits, and the length of the first message is 3000 bits, and the length that the token of GE1 is corresponding is less than the length of the first message.In this case the stream table outgoing interface 1 of first-class table list item can be replaced with the first physics outgoing interface, such as stream table outgoing interface 2.Stream table outgoing interface 2 is the length that the token of GE2, GE2 is corresponding is 3000 bits, and the length that the token of GE2 is corresponding equals the length of the first message.The first message is sent by GE2.
Visible, the load balancing device proposed by the embodiment of the present invention is forwarded message, can obtain preferred physics outgoing interface for forwarding this message by searching stream table, and the length that the token of this physics outgoing interface is corresponding is more than or equal to the length of this message.In addition, if not used for the preferred physics outgoing interface forwarding this message in stream table, can upgrade by convection current table.Stream table after renewal has possessed the preferred physics outgoing interface for forwarding this message.Therefore, the load balancing device that the embodiment of the present invention proposes can solve the load imbalance problem caused flow Hash, improves the overall utilization rate of physics outgoing interface
In addition, before forwarding message, by searching the physics outgoing interface of stream table acquisition for forwarding this message.As long as stream table does not upgrade, the physics outgoing interface of the subsequent packet identical with the Hash factor of this message would not change.The physics outgoing interface of the subsequent packet identical with the Hash factor of this message is relatively fixing, will reduce the generation of packet out-ordering.
Optionally, load balancing device can also comprise:
Second transmitter, if for not finding the stream table list item mated with this first message in this stream table, selected second physics outgoing interface from described multiple physics outgoing interface, the length of the token of the second physics outgoing interface is more than or equal to the length of the first message, add the list item comprising this second physics outgoing interface to this stream table, send this first message by this second physics outgoing interface.
Like this, when there is not the list item mated with the first message in stream table, be the physics outgoing interface that the first message finds applicable transmission first message, and convection current table upgrade.The stream table list item directly can searching coupling in stream table of five-tuple and the identical message of the first message in subsequent packet.
See Fig. 1 and Fig. 3, if router R1 does not find the list item mated with the first message in stream table, R1 can search the physics outgoing interface of applicable transmission first message in token table.The length of such as the first message is 1500 bits.R1 finds the second physics outgoing interface in token table, and the second physics outgoing interface is GE3.The length that the token of GE3 is corresponding is 2000 bits.R1 adds the list item of the physics outgoing interface comprising message 1-Hash keys and GE3 to this stream table.R1 sends the first message by GE3.
Optionally,
This first logic outgoing interface is for converging mouth, and in the plurality of physics outgoing interface, each physics outgoing interface is the member of this first logic outgoing interface.
Embodiment four:
Embodiments provide a kind of load balancing device, may be used in the network equipment of the TRUNK mouth with multiple member.This load balancing device can be the S1 in Fig. 8.The load balancing device schematic diagram that the embodiment of the present invention provides see Fig. 8, Fig. 8; This device comprises:
First searches unit 801, and for the destination address according to the first message, search the first logic outgoing interface that this first message is corresponding in next skip list, this first logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface;
During specific implementation, according to the destination address of the first message, the first logic outgoing interface searching this first message corresponding in next skip list can have multiple implementation, and the present invention does not do concrete restriction.The network equipment can be switch.First message can be the message that the network equipment generates.First message also can be the message that the network equipment receives from upstream network device.First message can be the two layer message of osi model definition, such as mac frame.
The network equipment can find the first logic outgoing interface corresponding to this first message according to next skip list.Next skip list can be MAC table.When next skip list is MAC table, next skip list can comprise multiple MAC address entries, and each MAC address entries comprises target MAC (Media Access Control) address and logic outgoing interface corresponding to this target MAC (Media Access Control) address.Logic outgoing interface can comprise multiple physics outgoing interface.Described logic outgoing interface can be TRUNK mouth.When logic outgoing interface is TRUNK mouth, multiple physics outgoing interfaces that logic outgoing interface comprises are all the members of this logic outgoing interface.
First logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface.Token table can comprise multiple token list item, and each token list item can comprise the physics outgoing interface token corresponding with this physics outgoing interface.
See Fig. 4 and Fig. 6, the network equipment can be switch S1, and the mac frame of the first message can be destination be switch S5, the first logic outgoing interface can be converge mouth 1.The destination that the upstream network device that switch S1 receives switch S1 by GE1 sends is the mac frame of switch S5, such as, after the first message, can find according to the destination address of the first message the list item mated with the destination address of the first message in next skip list, thus obtain the logic outgoing interface of the first message.When the destination address of the first message is object IP address 1, the logic outgoing interface of the first message is logic outgoing interface 1.Logic outgoing interface 1 is that TRUNK mouth 1, TRUNK mouth 1 comprises three physics outgoing interfaces, is GE2, GE3 and GE4 respectively.GE2, GE3 and GE4 token corresponding respectively can be obtained according to token table.
Second searches unit 802, for the one or more fields in the source MAC according to this first message, target MAC (Media Access Control) address and VLAN, the first-class table list item mated with this first message is searched in stream table, the list item of this stream table comprises Hash keys and stream table outgoing interface, and this stream table outgoing interface is a physics outgoing interface in this plurality of physics outgoing interface;
Stream epi-position is in the network equipment, and stream table can comprise multiple stream table list item, and each stream table list item can comprise Hash keys and stream table outgoing interface corresponding to this Hash keys.Hash keys can comprise in source MAC, target MAC (Media Access Control) address and VLAN one or more.This VLAN can be CVLAN or SVLAN.Specifically please refer to IEEE802.1ad.Stream table outgoing interface is physics outgoing interface.When flow in table there is the first-class table list item mated with the first message time, the stream table outgoing interface in this first-class table list item is one in multiple physics outgoing interfaces of comprising of the first logic outgoing interface.Hash keys in this first-class table list item is equal with the corresponding field of the first message.Such as, when the Hash keys of first-class table list item comprises source MAC and target MAC (Media Access Control) address, the source MAC of first-class table list item equals the source MAC of the first message, and the target MAC (Media Access Control) address of first-class table list item equals the target MAC (Media Access Control) address of the first message.
See Fig. 4 and Fig. 6, switch S1, according to the source MAC of the first message and target MAC (Media Access Control) address, searches the first-class table list item that Hash keys is mated with the first message in stream table.Stream table comprises multiple stream table list item, and each stream table list item comprises Hash keys and stream table outgoing interface.Hash keys comprises source MAC and target MAC (Media Access Control) address.The stream table outgoing interface of first-class table list item is GE2, GE3 or GE4.The source MAC of the Hash keys of first-class table list item and target MAC (Media Access Control) address equal source MAC and the target MAC (Media Access Control) address of the first message respectively.
First transmitter 803, if for finding this first-class table list item in this stream table, and the length of the token of the stream table outgoing interface of this first-class table list item is more than or equal to the length of this first message, the stream table outgoing interface of this first message by this first-class table list item is sent, if the length of the token of the stream table outgoing interface of this first-class table list item is less than the length of this first message, selected first physics outgoing interface from the plurality of physics outgoing interface, the length of the token of this first physics outgoing interface is more than or equal to the length of this first message, the stream table outgoing interface of this first-class table list item is replaced with this first physics outgoing interface, this the first message is sent by this first physics outgoing interface.
See Fig. 4 and Fig. 6, the stream table list item mated with the first message in stream table is first-class table list item.The stream table outgoing interface of this first-class table list item is first-class table outgoing interface.Wherein, the Hash keys of first-class table list item is message 1-Hash keys; First-class table outgoing interface is stream table outgoing interface 1.When the length of the token of stream table outgoing interface 1 is greater than or equal to the length of the first message, the first message is sent by stream table outgoing interface 1.The length of such as the first message is 1000 bits, and stream table outgoing interface 1 is the length that the token of GE1, GE1 is corresponding is 2000 bits, then send the first message by GE1; When the length of the token of stream table outgoing interface 1 is less than the length of the first message, the stream table outgoing interface 1 of first-class table list item is replaced with the first physics outgoing interface.The length of the token of the first physics outgoing interface is more than or equal to the length of the first message, is sent by the first message by the first physics outgoing interface.The length of the token of such as GE1 is 2000 bits, and the length of the first message is 3000 bits, and the length of the token of GE1 is less than the length of the first message.In this case the stream table outgoing interface 1 of first-class table list item can be replaced with the first physics outgoing interface, such as stream table outgoing interface 2.Stream table outgoing interface 2 is the length of the token of GE2, GE2 is 3000 bits, and the length of the token of GE2 equals the length of the first message.The first message is sent by GE2.
Visible, the load sharing method proposed by the embodiment of the present invention is forwarded message, can obtain preferred physics outgoing interface for forwarding this message by searching stream table, and the length that the token of this physics outgoing interface is corresponding is more than or equal to the length of this message.In addition, if not used for the preferred physics outgoing interface forwarding this message in stream table, can upgrade by convection current table.Stream table after renewal has possessed the preferred physics outgoing interface for forwarding this message.Therefore, the load sharing method that the embodiment of the present invention proposes can solve the load imbalance problem caused flow Hash, improves the overall utilization rate of physics outgoing interface
In addition, before forwarding message, by searching the physics outgoing interface of stream table acquisition for forwarding this message.As long as stream table does not upgrade, the physics outgoing interface of the subsequent packet identical with the Hash factor of this message would not change.The physics outgoing interface of the subsequent packet identical with the Hash factor of this message is relatively fixing, will reduce the generation of packet out-ordering.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can have been come by the hardware that programmed instruction is relevant, foregoing routine can be stored in a computer read/write memory medium, this program, when performing, performs the step comprising said method embodiment; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (7)

1. a load sharing method, is characterized in that:
According to the destination address of the first message, search the first logic outgoing interface that described first message is corresponding in next skip list, described first logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface;
According to the one or more fields in the source Internet protocol IP address of described first message, object IP address, source port number, destination slogan and protocol number, the first-class table list item mated with described first message is searched in stream table, the list item of described stream table comprises Hash keys and stream table outgoing interface, and described stream table outgoing interface is a physics outgoing interface in described multiple physics outgoing interface;
If find described first-class table list item in described stream table, and the length of the token of the stream table outgoing interface of described first-class table list item is more than or equal to the length of described first message, the stream table outgoing interface of described first message by described first-class table list item is sent, if the length of the token of the stream table outgoing interface of described first-class table list item is less than the length of described first message, selected first physics outgoing interface from described multiple physics outgoing interface, the length of the token of described first physics outgoing interface is more than or equal to the length of described first message, the stream table outgoing interface of the described first-class table list item in described first-class table list item is replaced with described first physics outgoing interface, described first message is sent by described first physics outgoing interface,
Wherein, described first logic outgoing interface is for converging mouth, and in described multiple physics outgoing interface, each physics outgoing interface is the member of described first logic outgoing interface;
If do not find the stream table list item mated with described first message in described stream table, selected second physics outgoing interface from described multiple physics outgoing interface, the length of the token of described second physics outgoing interface is more than or equal to the length of described first message, add the list item comprising described second physics outgoing interface to described stream table, send described first message by described second physics outgoing interface.
2. method according to claim 1, is characterized in that:
Described selected first physics outgoing interface, specifically comprises:
With a field in the IP address of described first message, object IP address, source port number, destination slogan and protocol number or multiple field for the Hash factor carries out Hash operation, obtain the first Hash result;
In token table, search the list item that hash index mates with described first Hash result, the list item of described token table comprises hash index, the token of physics outgoing interface and this physics outgoing interface;
Choose the first token list item in the list item mated with described first Hash result from described token table, in described first token list item, the length of token is more than or equal to the length of described first message.
3. method according to claim 1, is characterized in that:
The token of described first physics outgoing interface is the maximum of the token of each physics outgoing interface in described multiple physics outgoing interface.
4. method according to claim 1, is characterized in that:
The token of described second physics outgoing interface is the maximum of the token of each physics outgoing interface in described multiple physics outgoing interface.
5. a load sharing method, is characterized in that:
According to the destination address of the first message, search the first logic outgoing interface that described first message is corresponding in next skip list, described first logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface;
According to the one or more fields in the source MAC address of described first message, target MAC (Media Access Control) address and virtual LAN VLAN, the first-class table list item mated with described first message is searched in stream table, the list item of described stream table comprises Hash keys and stream table outgoing interface, and described stream table outgoing interface is a physics outgoing interface in described multiple physics outgoing interface;
If find described first-class table list item in described stream table, and the length of the token of the stream table outgoing interface of described first-class table list item is more than or equal to the length of described first message, the stream table outgoing interface of described first message by described first-class table list item is sent, if the length of the token of the stream table outgoing interface of described first-class table list item is less than the length of described first message, selected first physics outgoing interface from described multiple physics outgoing interface, the length of the token of described first physics outgoing interface is more than or equal to the length of described first message, the stream table outgoing interface of the described first-class table list item in described first-class table list item is replaced with described first physics outgoing interface, described first message is sent by described first physics outgoing interface,
Wherein, described first logic outgoing interface is for converging mouth, and in described multiple physics outgoing interface, each physics outgoing interface is the member of described first logic outgoing interface.
6. a load balancing device, is characterized in that, comprising:
First searches unit, and for the destination address according to the first message, search the first logic outgoing interface that described first message is corresponding in next skip list, described first logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface;
Second searches unit, for the one or more fields in the source IP address according to described first message, object IP address, source port number, destination slogan and protocol number, the first-class table list item mated with described first message is searched in stream table, the list item of described stream table comprises Hash keys and stream table outgoing interface, and described stream table outgoing interface is a physics outgoing interface in described the plurality of physics outgoing interface;
First transmitter, if for finding described first-class table list item in described stream table, and the length of the token of the stream table outgoing interface of described first-class table list item is more than or equal to the length of described first message, the stream table outgoing interface of described first message by described first-class table list item is sent, if the length of the token of the stream table outgoing interface of described first-class table list item is less than the length of described first message, selected first physics outgoing interface from described multiple physics outgoing interface, the length of the token of described first physics outgoing interface is more than or equal to the length of described first message, the stream table outgoing interface of described first-class table list item is replaced with described first physics outgoing interface, described first message is sent by described first physics outgoing interface,
Wherein, described first logic outgoing interface is for converging mouth, and in described multiple physics outgoing interface, each physics outgoing interface is the member of described first logic outgoing interface;
Second transmitter, if for not finding the list item mated with described first message in described stream table, selected second physics outgoing interface from described multiple physics outgoing interface, add the list item comprising described second physics outgoing interface to described stream table, send described first message by described second physics outgoing interface.
7. a load balancing device, is characterized in that, comprising:
First searches unit, and for the destination address according to the first message, search the first logic outgoing interface that described first message is corresponding in next skip list, described first logic outgoing interface comprises multiple physics outgoing interface, the corresponding token of each physics outgoing interface;
Second searches unit, for the one or more fields in the source MAC according to described first message, target MAC (Media Access Control) address and VLAN, the first-class table list item mated with described first message is searched in stream table, the list item of described stream table comprises Hash keys and stream table outgoing interface, and described stream table outgoing interface is a physics outgoing interface in described the plurality of physics outgoing interface;
First transmitter, if for finding described first-class table list item in described stream table, and the length of the token of the stream table outgoing interface of described first-class table list item is more than or equal to the length of described first message, the stream table outgoing interface of described first message by described first-class table list item is sent, if the length of the token of the stream table outgoing interface of described first-class table list item is less than the length of described first message, selected first physics outgoing interface from described multiple physics outgoing interface, the length of the token of described first physics outgoing interface is more than or equal to the length of described first message, the stream table outgoing interface of described first-class table list item is replaced with described first physics outgoing interface, described first message is sent by described first physics outgoing interface,
Wherein, described first logic outgoing interface is for converging mouth, and in described multiple physics outgoing interface, each physics outgoing interface is the member of described first logic outgoing interface.
CN201110238078.3A 2011-08-18 2011-08-18 Method and device for load sharing Expired - Fee Related CN102255816B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110238078.3A CN102255816B (en) 2011-08-18 2011-08-18 Method and device for load sharing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110238078.3A CN102255816B (en) 2011-08-18 2011-08-18 Method and device for load sharing

Publications (2)

Publication Number Publication Date
CN102255816A CN102255816A (en) 2011-11-23
CN102255816B true CN102255816B (en) 2015-03-25

Family

ID=44982819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110238078.3A Expired - Fee Related CN102255816B (en) 2011-08-18 2011-08-18 Method and device for load sharing

Country Status (1)

Country Link
CN (1) CN102255816B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3200407B1 (en) 2014-10-17 2019-08-28 Huawei Technologies Co., Ltd. Data flow distribution method and device
CN105897610A (en) * 2016-03-31 2016-08-24 乐视控股(北京)有限公司 Flow control method and device
CN107046503B (en) * 2017-04-24 2020-08-04 新华三技术有限公司 Message transmission method, system and device
CN107623640A (en) * 2017-11-07 2018-01-23 北京锐安科技有限公司 A kind of method and device for strengthening hash algorithm
CN108809849B (en) * 2018-08-30 2022-07-29 新华三技术有限公司 Flow rate limiting method and device and controller
CN113595919A (en) * 2020-04-30 2021-11-02 华为技术有限公司 Load sharing method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1216472C (en) * 2003-03-31 2005-08-24 中国科学院计算机网络信息中心 Control method for layered switching network node region
CN101286947B (en) * 2008-05-30 2010-12-01 杭州华三通信技术有限公司 Data output controlling method and device therefor

Also Published As

Publication number Publication date
CN102255816A (en) 2011-11-23

Similar Documents

Publication Publication Date Title
KR102205882B1 (en) System and method for routing traffic between distinct infiniband subnets based on fat-tree routing
CN102255816B (en) Method and device for load sharing
CN102594664B (en) Flow forwarding method and device
US6757742B1 (en) Computer-based system for validating hash-based table lookup schemes in a network switch
JP5373625B2 (en) Method and apparatus for multicast routing
EP2849397A1 (en) Communication system, control device, communication method, and program
US20070086429A1 (en) Systems and Methods for Network Routing in a Multiple Backbone Network Architecture
US10116567B1 (en) Load balancing for multipath group routed flows by re-routing the congested route
CN107864061A (en) A kind of method of virtual machine port speed constraint and mirror image in private clound
EP2928130B1 (en) Systems and methods for load balancing multicast traffic
US10547547B1 (en) Uniform route distribution for a forwarding table
US20150281088A1 (en) Systems and methods for multipath load balancing
US10819640B1 (en) Congestion avoidance in multipath routed flows using virtual output queue statistics
CN111147372B (en) Downlink message sending and forwarding method and device
US7606230B1 (en) Link aggregation for routed ports
CN102724131A (en) Method and device for achieving internet protocol (IP) message equal-cost multi-path routing balancing
US10003526B1 (en) Methods and apparatus for efficient use of link aggregation groups
CN106453091B (en) The equivalent route management method and device of router Forwarding plane
JP5164744B2 (en) Communication network system and bandwidth control method for inter-base communication
WO2017084228A1 (en) Method for managing traffic item in software-defined networking
WO2023011153A1 (en) Method and apparatus for determining hash algorithm information for load balancing, and storage medium
CN105207904B (en) Processing method, device and the router of message
Faghani et al. Shortcut switching strategy in metro Ethernet networks
FI124398B (en) Method and apparatus for determining implementation of a search table for a network element of software-defined network
US9246820B1 (en) Methods and apparatus for implementing multiple loopback links

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 100085 Beijing, Haidian District on the road, No. 3

Applicant after: Beijing Huawei Digital Technology Co.,Ltd.

Address before: 100085 Beijing, Haidian District on the road, No. 3

Applicant before: Huawei Digit Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: HUAWEI DIGIT TECHNOLOGY CO., LTD. TO: BEIJING HUAWEI DIGITAL TECHNOLOGY CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150325

Termination date: 20190818

CF01 Termination of patent right due to non-payment of annual fee