CN102209040A - Multi-network-port-based load sharing method and device - Google Patents

Multi-network-port-based load sharing method and device Download PDF

Info

Publication number
CN102209040A
CN102209040A CN2011101948385A CN201110194838A CN102209040A CN 102209040 A CN102209040 A CN 102209040A CN 2011101948385 A CN2011101948385 A CN 2011101948385A CN 201110194838 A CN201110194838 A CN 201110194838A CN 102209040 A CN102209040 A CN 102209040A
Authority
CN
China
Prior art keywords
flow data
port
message
network port
terminal equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011101948385A
Other languages
Chinese (zh)
Other versions
CN102209040B (en
Inventor
王军
周迪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Information Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN 201110194838 priority Critical patent/CN102209040B/en
Publication of CN102209040A publication Critical patent/CN102209040A/en
Application granted granted Critical
Publication of CN102209040B publication Critical patent/CN102209040B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The invention discloses a multi-network-port-based load sharing method and a multi-network-port-based load sharing device. In the method and the device, at least two network ports are connected with external switching equipment, and are divided into different virtual local area networks (VLAN); the network ports are isolated by utilizing the different VLANs, thereby avoiding loops being formed between each network port and the external switching equipment and further avoiding broadcast storms caused by the loops; moreover, forwarding with any network port can be realized by utilizing corresponding VLANs, and specifically, normal forwarding still can be realized in a conventional way of searching for a media access control (MAC) forwarding table, while the forwarding requiring load sharing can be realized by forced forwarding in the corresponding VLANs. Therefore, reliable load sharing can be realized without utilizing the related properties of Smart-link, port aggregation and the like.

Description

Realize the method and apparatus of load balancing based on many network ports
Technical field
The present invention relates to the load balancing technology, particularly a kind of method and a kind of device of realizing load balancing based on many network ports of realizing load balancing based on many network ports.
Background technology
In the prior art for example EC (Encoder, video encoder) etc. the terminal equipment of flow data can be provided, can have at least two network ports that are used to connect switching equipment usually, and form thus and switching equipment between at least two links.For networking mode, a kind of port trunking technology is provided in the prior art, has also wished at least two links, to realize load balancing with this with at least two links.
But the above-mentioned terminal equipment that is provided in the prior art is not supported the characteristic of port trunking usually, thereby causes can't realizing load balancing between above-mentioned terminal equipment and the switching equipment.
And, because intercommunication between at least two network ports of terminal equipment, therefore, at least two network ports and switching equipment for fear of intercommunication constitute loops and cause broadcast storm, can only keep link between a network port and the switching equipment and open and utilize the STP characteristic with the link-down between all the other network ports and the switching equipment.After the link occurs fault of opening, utilize STP to switch again and a new link of opening.For the comparatively responsive situation of flow continuity, STP can't meet the demands long switching time for some, at this moment, and the Smart-link characteristic that just need utilize Millisecond to switch.
As seen, prior art not only can't realize load balancing for the terminal equipment of not supporting the port trunking characteristic, and, for example also must adopt other characteristics such as Smart-link to avoid causing broadcast storm.
Summary of the invention
In view of this, the invention provides a kind of method and a kind of device, can make the terminal equipment of not network enabled port trunking realize load balancing based on many network ports realization load balancings based on many network ports realization load balancings.
A kind of method that realizes load balancing based on many network ports provided by the invention, this method is applied to provide in the terminal equipment of flow data, this terminal equipment comprises at least two network ports and an internal port, same outer switching equipment of described at least two network ports and terminal equipment links to each other, and internal port links to each other with processor in the terminal equipment;
At least two network ports are divided to different VLAN, internal port respectively and are divided to VLAN under the all-network port simultaneously; And this method comprises:
The flow data request message of a1, the destination that flows automatically that will receive from arbitrary network port port internally is forwarded to processor; Wherein, the flow data request message can identify the flow data of representing its request and needs load balancing by carrying a load balancing, so that whether processor carries out load balancing and carry VLAN mark head in the flow data encapsulated message of load balancing is carried out in decision according to this sign decision;
A2, when in the flow data encapsulated message, carrying VLAN mark head, the network port that is subordinated to corresponding VLAN after the VLAN mark head that the flow data encapsulated message is carried divests is transmitted.
When described step a2 does not further carry described VLAN mark head in the flow data encapsulated message, the flow data encapsulated message is transmitted from the network port of correspondence and transmitted by searching MAC.
This method further comprised before described step a1: a0, will be internally the register requirement message that receives of port transmit from the network port of correspondence and transmit by searching MAC; Wherein, carry in this register requirement message the information that is used for representing the terminal equipment holding load and shares, carry described load balancing sign to allow the flow data request message.
This method further comprises after described step a0: but b0, only there is a time spent in all network interface ports, and the fault notification message that port is internally received is transmitted from only available network port and is transmitted by searching MAC; Wherein, carry in this fault notification message be used for representing terminal equipment not the information shared of holding load, carry described load balancing sign to forbid the flow data request message.
A kind of device of realizing load balancing based on many network ports provided by the invention, this device is carried in the terminal equipment that flow data can be provided, this terminal equipment comprises at least two network ports and an internal port, same outer switching equipment of described at least two network ports and terminal equipment links to each other, and internal port links to each other with processor in the terminal equipment;
At least two network ports are divided to different VLAN, internal port respectively and are divided to VLAN under the all-network port simultaneously; And this device comprises:
The request forwarding module, the flow data request message of the destination that flows automatically that will receive from arbitrary network port port internally is forwarded to processor; Wherein, the flow data request message can identify the flow data of representing its request and needs load balancing by carrying a load balancing, so that whether processor carries out load balancing and carry VLAN mark head in the flow data encapsulated message of load balancing is carried out in decision according to this sign decision;
Data forwarding module, when carrying VLAN mark head in the flow data encapsulated message, the network port that is subordinated to corresponding VLAN after the VLAN mark head that the flow data encapsulated message is carried divests is transmitted.
When described data forwarding module further carries described VLAN mark head in the flow data encapsulated message flow data encapsulated message is not transmitted from the network port of correspondence and transmitted by searching MAC.
This device further comprises: the registration forwarding module, and the register requirement message that port is internally received is transmitted from the network port of correspondence and is transmitted by searching MAC; Wherein, carry in this register requirement message the information that is used for representing the terminal equipment holding load and shares, carry described load balancing sign to allow the flow data request message.
This device further comprises: the announcement forwarding module, but a time spent is only arranged in all network interface ports, the fault notification message of port reception is internally transmitted from an only available network port forwarding by searching MAC; Wherein, carry in this fault notification message be used for representing terminal equipment not the information shared of holding load, carry described load balancing sign to forbid the flow data request message.
A kind of method that realizes load balancing based on many network ports provided by the invention, this method is used for terminal equipment provides flow data to server, described terminal equipment has at least two network ports, and described at least two network ports are used to realize that with same the mutual switching equipment of server and terminal equipment links to each other;
At least two network ports are divided to different VLAN respectively; And this method comprises:
A1, reception server are sent to the flow data request message of arbitrary network port by switching equipment; Wherein, the flow data request message can identify the flow data of representing its request and needs load balancing by carrying a load balancing;
A2, when in the flow data request message, carrying described load balancing sign, in the flow data encapsulated message that encapsulation obtains, carry VLAN mark head and the VLAN by this VLAN mark head correspondence be sent to the network port that belongs to this VLAN, again VLAN mark head is divested the back from this network port by switching equipment to server forwards.
When described steps A 2 is not further carried described load balancing sign in the flow data request message, the flow data encapsulated message that encapsulation is obtained by search MAC transmit be sent to the corresponding network port, again from this network port by switching equipment to server forwards.
This method further comprised before described steps A 1: A0, with the register requirement message that generates by search MAC transmit be sent to the corresponding network port, again from this network port by switching equipment to server forwards; Wherein, carry in this register requirement message the information that is used for representing the terminal equipment holding load and shares, carry described load balancing sign to allow the flow data request message.
This method further comprises after described steps A 0: but B0, only arranged a time spent in all network interface ports, with the fault notification message that generates by search MAC transmit be sent to only available network port and from this network port by switching equipment to server forwards; Wherein, carry in this fault notification message be used for representing terminal equipment not the information shared of holding load, carry described load balancing sign to forbid the flow data request message.
A kind of system that realizes load balancing based on many network ports provided by the invention, this system comprises server, is used for the terminal equipment of flow data being provided and being used to realize server and the mutual switching equipment of terminal equipment to server, and described terminal equipment has at least two network ports, described at least two network ports link to each other with same switching equipment;
At least two network ports are divided to different VLAN respectively;
Server is used for sending the flow data request message to switching equipment; Wherein, the flow data request message can identify the flow data of representing its request and needs load balancing by carrying a load balancing;
Switching equipment is used for the flow data request message is sent to arbitrary network port of terminal equipment;
Terminal equipment, be used for when the flow data request message carries described load balancing sign, in the flow data encapsulated message that encapsulation obtains, carry VLAN mark head and the VLAN by this VLAN mark head correspondence be sent to the network port that belongs to this VLAN, again VLAN mark head is divested the back from this network port by switching equipment to server forwards.
When terminal equipment does not further carry described load balancing sign in the flow data request message, the flow data encapsulated message that encapsulation is obtained by search MAC transmit be sent to the corresponding network port, again from this network port by switching equipment to server forwards.
Terminal equipment further before the receiving stream-oriented data request message with the register requirement message that generates by search MAC transmit be sent to the corresponding network port, again from this network port by switching equipment to server forwards; Wherein, carry in this register requirement message the information that is used for representing the terminal equipment holding load and shares, carry described load balancing sign to allow the flow data request message.
But terminal equipment further in all network interface ports, only have a time spent with the fault notification message that generates by search MAC transmit be sent to only available network port and from this network port by switching equipment to server forwards; Wherein, carry in this fault notification message be used for representing terminal equipment not the information shared of holding load, carry described load balancing sign to forbid the flow data request message.
As seen from the above technical solution, in the present invention, at least two network ports connect outside switching equipment and are divided to different VLAN, thereby can utilize different VLAN to avoid each network port and outside switching equipment formation loop can avoid the broadcast storm that causes by loop to the isolation of each network port, and, can also utilize and realize between corresponding VLAN and the arbitrary network port transmitting.Like this, for normal forwarding, still can realize by searching the usual manner that MAC transmits; And for the forwarding that needs load balancing, then can realize by the forwarding by force in the VLAN of correspondence.Thus, need not to utilize correlation properties such as Smart-link, port trunking can realize reliable load balancing.
Description of drawings
Fig. 1 a to Fig. 1 e is the principle schematic diagram in the embodiment of the invention;
Fig. 2 is an exemplary flow schematic diagram of realizing the method for load balancing in the embodiment of the invention;
Fig. 3 is at the schematic flow sheet of the list item learning process of flow process as shown in Figure 2;
Fig. 4 is at the schematic flow sheet of the capability advertisement process of flow process as shown in Figure 2;
Fig. 5 is at the schematic flow sheet of the fault notification process of flow process as shown in Figure 2.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is described in more detail.
Fig. 1 a to Fig. 1 e is the principle schematic diagram in the embodiment of the invention.In Fig. 1 a to Fig. 1 e: for example EC etc. can provide in the terminal equipment of flow data and be provided with an exchange chip.This exchange chip provides at least two network port P1~Pn (n is the positive integer greater than 1) and an internal port P0 for terminal equipment.
At least two network port P1~Pn belong to different VLAN1~VLANn respectively and link to each other with corresponding port SP1~SPn on outer same the switching equipment of terminal equipment, that is, each network port Pi belongs to corresponding VLANi (i for more than or equal to 1 and smaller or equal to the positive integer of n) and links to each other with corresponding port SPi on the switching equipment.Like this, owing to isolating mutually between the network port P1~Pn network port that belongs to different VLAN, therefore, even if the arbitrary port SPi on the switching equipment has sent broadcasting packet to the network port Pi of correspondence, the broadcasting packet that corresponding network port Pi receives also can not transmitted to switching equipment from other network ports again, thereby avoids and network port P1~Pn and switching equipment formation loop and the broadcast storm that caused by loop.
Internal port P0 belongs to the VLAN1~VLANn under all-network port P1~Pn simultaneously and links to each other with processor in the terminal equipment.Like this, can carry out ARP study by internal port P0 and guarantee that internal port P0 can utilize realization forwarding between corresponding VLANi and the arbitrary network port Pi by processor.
After terminal equipment powers on, ask successively referring to Fig. 1 a and Fig. 1 b:
1) do not learn any three layers ARP list item in the processor as yet, therefore, sending with the terminal equipment MAC Address to the internal port P0 of exchange chip is the ARP request message of source address; Wherein, because the exchange chip of this moment is not learnt any two layers MAC forwarding-table item as yet yet, therefore, the source address of ARP request message is that terminal equipment MAC Address, destination address are broadcast address;
2) exchange chip internally port P0 receive ARP request message that processor sends and in the source address of internal port P0 study ARP request message, that is, set up down direction MAC forwarding-table item (" down direction " as herein described is meant the direction from the switching equipment side to terminal equipment side) according to index and the terminal equipment MAC Address of internal port P0.And the exchange chip foundation is transmitted the ARP request message successively as the broadcast address of the destination address of ARP request message from each network port P0~Pn.
3) because the ARP request message is to transmit from each network port P0~Pn successively, thus the time that the corresponding port SP1 of switching equipment~SPn receives the ARP request message have certain interval.So, if the corresponding port SP1~SPn of switching equipment does not carry out polymerization, then finally can be in the end learn the terminal equipment MAC Address on a port SPi who receives the ARP request message; If the corresponding port SP1~SPn of switching equipment is aggregated, then can on the logic port of polymerization, learn the terminal equipment MAC Address.
4) switching equipment continues broadcasting with the ARP request message, makes the ARP request message finally can arrive the stream destination.Wherein, the server that need obtain flow data for terminal equipment and for example VM (Video Management, video management) server etc. is in the situation of same IP network section, and the stream destination can be exactly this server; And being in the disconnected situation of different IP networks for terminal equipment and server, the stream destination can be a gateway.
5) switching equipment receives the arp response message of the destination that flows automatically, and the source address of this arp response message is the terminal equipment MAC Address for stream destination MAC Address, destination address.If the corresponding port SP1~SPn of switching equipment does not carry out polymerization, then switching equipment utilizes its corresponding port SPi that finally learns the terminal equipment MAC Address that the arp response message is transmitted to terminal equipment; If the corresponding port SP1~SPn of switching equipment is aggregated, then switching equipment utilizes the optional corresponding port SPi of predetermined algorithm that the arp response message is transmitted to terminal equipment.
6) exchange chip receives the arp response message and in the source address of the network port Pi study arp response message that receives the arp response message from the arbitrary network port Pi corresponding to corresponding port SPi, that is, set up up direction MAC forwarding-table item (" up direction " as herein described is meant the direction from terminal equipment side to the switching equipment side) according to index and the stream destination MAC Address of the network port Pi that receives the arp response message.And, because the destination address of arp response message is the terminal equipment MAC Address, therefore, utilize the down direction MAC forwarding-table item corresponding set up with internal port P0 can with the arp response message internally port P0 be forwarded to processor.
7) processor utilizes the arp response message to carry out three layers ARP study, set up the ARP list item.
Through above-mentioned process shown in Fig. 1 a and Fig. 1 b, promptly realized in the exchange chip in two layers the study of MAC forwarding-table item and the processor study of three layers ARP list item.
Based on three layers the ARP list item of learning in two layers that learn in the exchange chip MAC forwarding-table items and the processor, promptly exchange chip can utilize the network port Pi that learns stream destination MAC Address to realize normal flow data forwarding; And based on three layers the ARP list item of learning in each VLAN that divides in the exchange chip and the processor, exchange chip can also utilize other network ports Pj that does not learn stream destination MAC Address to realize the flow data forwarding of load balancing.
Can know that in order to make the server that needs to obtain flow data terminal equipment has the ability of load balancing and the load balancing of triggering terminal equipment, also need to realize that by optimizing existing login mechanism terminal equipment reports its ability with load balancing, please again referring to Fig. 1 c:
8) to send with stream destination MAC Address be the register requirement message of destination address to processor, carries the information that is used for representing the terminal equipment holding load and shares in this register requirement message, carries the load balancing sign that is used to need to represent load balancing at the flow data request message to allow server.
9), exchange chip is after portion's port P0 receives the register requirement message within it, can utilize its destination address, promptly flow the destination MAC Address and find the up direction MAC forwarding-table item corresponding, and the network port Pi of register requirement message from correspondence be transmitted according to the up direction MAC forwarding-table item that finds with network port Pi.
10), because server can know that terminal equipment has the ability of load balancing, therefore, server both can send conventional flow data request message so that terminal equipment is realized normal the forwarding, also can send the flow data request message that carries the load balancing sign so that terminal equipment is realized the forwarding of load balancing.
According to the requirement of server, terminal equipment can be realized normal the forwarding or the load balancing forwarding, and specific implementation sees also Fig. 1 d and Fig. 1 e:
11) switching equipment receives the flow data request message that need obtain the server of flow data from the stream destination, and the source address of this flow data request message is the terminal equipment MAC Address for stream destination MAC Address, destination address.If the corresponding port SP1~SPn of switching equipment does not carry out polymerization, then for the flow data request message that receives from the stream destination at every turn, switching equipment all can utilize its corresponding port SPi that finally learns the terminal equipment MAC Address to transmit to terminal equipment; If the corresponding port SP1~SPn of switching equipment is aggregated, then for the flow data request message that receives from the stream destination at every turn, switching equipment all can utilize a corresponding port SPi who selectes when transmitting the arp response message before it to transmit to terminal equipment usually.
12) exchange chip is from its network port Pi receiving stream-oriented data request message.Wherein, because the corresponding port SPi and the normally same port of corresponding port SPi of transmitting the arp response message before of switching equipment forwarding flow request of data message, therefore, exchange chip receive the network port Pi of flow data request message with receive before the arp response message, and the network port Pi that has learnt stream destination MAC Address also can be same port usually.So, exchange chip utilize the flow data request message destination address, be that the terminal equipment MAC Address is searched MAC and transmitted, then, according to the down direction MAC forwarding-table item corresponding that find with internal port P0 with the flow data request message internally port P0 be forwarded to processor.
13) processor receives and knows behind the flow data request message and need to send flow data, and according to whether carrying load balancing in the flow data request identifies to identify and need whether load balancing of the data flow that sends.
For the situation that does not need load balancing, processor only needs in a conventional manner, utilize flow automatically the in the future flow data of data source of its ARP forwarding-table item of learning to be encapsulated as the flow data encapsulated message, and the source address that the flow data encapsulated message is set is that MAC Address, the destination address of terminal equipment is stream destination MAC Address.Like this, owing to only have a network port Pi to learn stream destination MAC Address in the exchange chip, so the flow data encapsulated message that processor encapsulates in a conventional manner can carry out conventional forwarding from network port Pi.
For the situation that needs load balancing, processor still need encapsulate out earlier the flow data encapsulated message according to above-mentioned usual manner, but also can further in the flow data encapsulated message, carry Tag (mark) head of VLANj so that carry the flow data encapsulated message of the Tag head of VLANj can transmit from other network ports Pj (j for more than or equal to 1 and be not equal to i) smaller or equal to positive integer, the j of n, with load balancing.
Suppose, server is that VM server, the network equipment are EC, the network port of EC has 2, one of them learns the gateway MAC Address, another does not learn the gateway MAC Address, and the VM server is after receiving the register requirement message that carries the information that is used to represent that network equipment holding load is shared:
The VM server is received the request 1 of obtaining live video to EC, and any request provides the flow data encapsulated message if this fashion of EC has no basis, and then the VM server sends the flow data request message 1 of the routine of not carrying mark;
The VM server is received the request 2 of obtaining live video to EC, EC provides the flow data encapsulated message at flow data request message 1 this moment, then the VM server is thought and need be carried out load balancing, therefore sends the flow data request message 2 that the expression of carrying mark needs load balancing;
After this, the VM server sends conventional data flow request message, sends the flow data request message that expression needs load balancing at the request of even number time at the request of odd number time, realizes transmitting, utilize another network port of not learning the gateway MAC Address to realize the forwarding of load balancing normally with a network port that requires EC alternately to utilize to learn the gateway MAC Address.
14) behind the exchange chip flow data encapsulated message that port P0 receiving processor sends internally, judge earlier whether this flow data encapsulated message carries the Tag head at the VLANj of load balancing sign;
When in the flow data encapsulated message, not carrying Tag of VLANj, exchange chip utilizes the destination address of flow data encapsulated message, promptly flow the destination MAC Address searches MAC and transmits, then, according to the up direction MAC forwarding-table item corresponding that finds the flow data encapsulated message is normally transmitted from corresponding network port Pi with Pi;
When in the flow data encapsulated message, carrying Tag of VLANj, exchange chip utilizes the destination address of flow data encapsulated message, promptly flows the MAC forwarding-table item that the destination MAC Address can't find any coupling, therefore, the network port Pj that the flow data encapsulated message is subordinated to corresponding VLANj transmits by force, and, before transmitting, also need to divest the Tag head of the VLANj that the flow data encapsulated message carries so that switching equipment need not to discern VLANj the Tag head, and the flow data encapsulated message that can transmit network port Pj in a conventional manner handle.
In the practical application, can allow the flow data encapsulated message to carry the Tag head of VLANj, can be set to Trunk (main line) attribute or hybrid (mixing) attribute by internal port P0 in order to make internal port P0; And, all-network port P1~Pn all can be set to Access (access) attribute for the Tag head that makes the VLANj that the flow data encapsulated message carries can be divested before transmitting.
15) the corresponding port SPi of switching equipment or SPj are receiving the flow data encapsulated message, can transmit to the stream destination in a conventional manner.
If the corresponding port SP1~SPn of switching equipment does not carry out polymerization, then:
Under the situation of load balancing, switching equipment can receive the flow data encapsulated message from corresponding port SPj, at this moment, switching equipment will be deleted the terminal equipment MAC Address learnt at port SPi and relearn the terminal equipment MAC Address at corresponding port SPj, that is, switching equipment its port of finally learning the terminal equipment MAC Address that refreshes, makes that need carry out the terminal equipment MAC Address changes to SPj by SPi; After this, switching equipment will utilize port SPj to transmit when the flow data request message that receives from the stream destination;
Correspondingly, when exchange chip is not the up direction MAC forwarding-table item pairing networking port Pi that has set up at the network port Pj that receives the data flow request message, need flow refreshing of destination MAC Address equally, make its network port of learning stream destination MAC Address change to Pj by Pi, promptly, the pairing up direction MAC of deletion network port Pi forwarding-table item, and according to the index that receives the network port Pj of flow data request message, and rebulid new up direction MAC forwarding-table item as the stream destination MAC Address of the source address of flow data request message, so, follow-up normal forwarding realizes by Pj exactly, network port Pi then is used in the forwarding of load balancing.
That is to say, not carry out under the situation of polymerization that the flow data that utilizes Pj to carry out load balancing is transmitted and can be caused switching equipment and exchange chip generation MAC Address to refresh usually, but can't influence the realization of load balancing at the corresponding port SP1~SPn of switching equipment.
If the corresponding port SP1~SPn of switching equipment is polymerized to a logic port, then:
Under the situation of load balancing, can not cause switching equipment to carry out refreshing of terminal equipment MAC Address; But nonetheless, switching equipment is when transmitting from flow data request message that the stream destination receives, also still might use other corresponding port SPk except that corresponding port SPi selected when transmitting the arp response message (k for more than or equal to 1 and be not equal to i), even each employed corresponding port SPk of forwarding flow request of data message might be different smaller or equal to positive integer, the k of n;
Correspondingly, even if switching equipment does not carry out refreshing of terminal equipment MAC Address, but as long as exchange chip receives the network port Pk of data flow request message is not the up direction MAC forwarding-table item pairing networking port Pi that has set up, also still need flow refreshing of destination MAC Address, make its network port of learning stream destination MAC Address change to Pk by Pi, promptly, the pairing up direction MAC of deletion network port Pi forwarding-table item, and according to the index that receives the network port Pk of flow data request message, and rebulid new up direction MAC forwarding-table item as the stream destination MAC Address of the source address of flow data request message, so, follow-up normal forwarding realizes by Pk exactly, network port Pi then is used in the forwarding of load balancing.
That is to say, be polymerized under the situation of a logic port that exchange chip MAC Address also might take place at any time refreshes, but can't influence the realization of load balancing at the corresponding port SP1~SPn of switching equipment.
As above as seen, there is a network port Pi can learn stream destination MAC Address mutually among the all-network port P1~Pn that isolates, thereby utilizes the usual manner of searching the MAC forwarding-table item to realize normal the forwarding by a network port Pi who learns stream destination MAC Address; Though and network port Pj other do not learn stream destination MAC Address, can realize load balancing by the forwarding by force in the VLANj of correspondence.Thereby, because all-network port P1~Pn all can realize broadcast storm can taking place owing to being isolated by VLAN between forwarding and the all-network port P1~Pn by searching MAC forwarding-table item or VLAN, thereby need not to utilize correlation properties such as port trunking, Smart-link can realize reliable load balancing.
In addition, network port P1~Pn is all might be owing to link failure etc. former thereby become unavailable (promptly becoming " Down " by " Up ") by available.
If learn the network port Pi of stream destination MAC Address become unavailable, exchange chip can be not again by network port Pi place link forwarding flow request of data message and delete the pairing up direction MAC of network port Pi forwarding-table item.Correspondingly, switching equipment can not pass through network port Pi place link forwarding flow request of data message more yet, but need be from other network port Pk place link forwarding flow request of data message, so, after other network port Pk receives the flow data request message, can learn stream destination MAC Address at the network port Pk that receives the flow data request message as the source address of flow data request message, that is, according to the index that receives the network port Pk of flow data request message, and set up new up direction MAC forwarding-table item as the stream destination MAC Address of the source address of flow data request message.That is to say, learn the network port Pi of stream destination MAC Address unavailable after, can cause switching equipment and exchange chip generation MAC Address to refresh, but can't influence the realization of load balancing.
If not learning other network ports Pj of stream destination MAC Address becomes unavailable, then because processor can be by knowing the state-detection of all-network port P1~Pn, thereby processor can guarantee can not utilize this network port Pj to carry out load balancing again after other network ports Pj that does not learn stream destination MAC Address is unavailable.Therefore, when occurring disabled network port Pi or Pj among network port P1~Pn, but as long as available sum is at least two, just can not influence normal forwarding and be used for the forwarding of load balancing.
But, but in all network interface port P1~Pn, only remain a time spent, even if server requirement carries out load balancing, terminal equipment also can't be realized the forwarding of load balancing.Therefore, present embodiment also provides a kind of fault notification mechanism.
Specifically, it is the fault notification of destination address that processor need send with stream destination MAC Address, carry in this fault notification message be used for representing terminal equipment not the information shared of holding load so that above-mentioned server or client cancellation are carried the load balancing sign at the flow data request message; Exchange chip can be transmitted from an only surplus available network port Pk according to the up direction MAC forwarding-table item that finds (relearning on an only surplus network port according to foregoing mode) after port P0 receives the fault notification message internally.
Suppose that still server is that VM server, terminal equipment are EC, the network port of EC has 2, and one of them learns stream destination MAC Address, another does not learn stream destination MAC Address.After a network port learning stream destination MAC Address is unavailable, can delete the stream destination MAC Address of learning at this network port, and pass through an only surplus available network port to VM server transmission fault notification message, can't realize the forwarding of load balancing at present and forbid that the VM server carries the load balancing sign in the flow data request message to inform this EC of VM server.
Based on above basic principle, present embodiment provides a kind of and realizes that based on many network ports the exchange chip to the terminal equipment of the provided flow data shown in Fig. 1 c as Fig. 1 a is provided for the method for load balancings, this method.As shown in Figure 2, this method includes the following steps in this exchange chip trip at each time flow data request:
Step 231 receives the flow data request message of the destination that flows automatically from arbitrary network port Pi, and this flow data request message can identify the flow data of representing its request and needs load balancing by carrying a load balancing.Wherein, load balancing that the flow data request message carries sign is added by the server that needs obtain flow data, this server can be flow destination, also can be to be used as flowing destination by gateway.
If the network port Pi of receiving stream-oriented data request message is not and the current pairing network port of having set up of up direction MAC forwarding-table item in this step, the up direction MAC forwarding-table item that then needs further deletion to set up, and set up new up direction MAC forwarding-table item according to index and the stream destination MAC Address of the network port Pi that receives the flow data request message in this step.
In addition, if the pairing network port of having set up of up direction MAC forwarding-table item is promptly unavailable before this step, then before step, promptly can delete the up direction MAC forwarding-table item of having set up, and set up new up direction MAC forwarding-table item according to index and the stream destination MAC Address of the network port Pi that receives the flow data request message in this step.
Step 232, because the request of data message that receives is source address, is destination address with the terminal equipment MAC Address with stream destination MAC Address, therefore, the flow data request message that will receive from arbitrary network port Pi is forwarded to processor by the usual manner of searching MAC and transmitting from the pairing internal port P0 of down direction MAC forwarding-table item.
After this step, processor is according to its ARP list item of learning, and the flow data of the data source of flowing automatically in the future is encapsulated as the flow data encapsulated message.
And, because the flow data request message that receives can identify the flow data of representing its request and needs load balancing by carrying a load balancing, therefore, if the flow data request message further carries expression load balancing sign, processor also can carry the Tag head of VLANj in the flow data message, do not utilize the pairing network port Pi of current up direction MAC forwarding-table item to realize transmitting but utilizing other network ports Pj that does not learn stream destination MAC Address to carry out the forwarding of load balancing normally with expression.Wherein, VLANj is the arbitrary VLAN except that the described VLANi of network port Pi of up direction MAC forwarding-table item correspondence.
Step 233, port reception internally is the flow data encapsulated message of destination address with stream destination MAC Address, and judges the Tag head that whether carries in the flow data encapsulated message at the VLANj of load balancing sign, if, then execution in step 235, otherwise execution in step 234.
Step 234, when in the flow data encapsulated message, not carrying Tag of VLANj, adopt the conventional mode that MAC transmits of searching, according to the up direction MAC forwarding-table item that finds the network port Pi of flow data encapsulated message from correspondence transmitted, finish flow process then at this flow data request.
Step 235, when carrying Tag of VLANj in the flow data encapsulated message, the network port Pj that is subordinated to corresponding VLANj after the Tag head of the VLANj that the flow data encapsulated message is carried divests transmits, and finishes the flow process at this flow data request then.Wherein, the network port j that belongs to corresponding VLANj is the arbitrary network port except that the network port Pi of up direction MAC forwarding-table item correspondence.
So far, the flow process at a flow data request finishes.
Certainly, for the normal forwarding that does not need load balancing, processor also can carry the Tag head of VLANi in the flow data encapsulated message, can guarantee that still this flow data message is divested the network port Pi of back from up direction MAC forwarding-table item correspondence at the Tag head that carries and transmits.
Below as shown in Figure 2 in the flow process employed up direction MAC forwarding-table item and down direction MAC forwarding-table item can be in flow process as shown in Figure 3, to set up.As shown in Figure 3, the method that realizes load balancings based on many network ports in the present embodiment also need be carried out the following steps that can be used for setting up the MAC forwarding-table item at exchange chip before carrying out as shown in Figure 2 flow process:
Step 211, the ARP request message of port P0 receiving processor transmission internally.
Step 212 is set up down direction MAC forwarding-table item according to the index of internal port P0 and as the terminal equipment MAC Address of the source address of ARP request message.
Step 213, foundation is forwarded to switching equipment from each network port P1~Pn as the broadcast address of the destination address of ARP request message successively with the ARP request message.
Step 214 is from the arp response message of arbitrary network port Pi reception from switching equipment.Wherein, this step receive the network port Pi of step 231 receiving stream-oriented data request message among the network port Pi of arp response message and Fig. 2 may be same, also may not be same.
Step 215 is set up up direction MAC forwarding-table item according to the index of the network port Pi that receives the arp response message and as the stream destination MAC Address of the source address of arp response message.
Step 216, according to down direction MAC forwarding-table item with destination address be the terminal equipment MAC Address the arp response message internally port P0 be forwarded to processor, utilize arp response message study ARP list item for processor.
So far, above-mentioned flow process finishes.
Certainly, employed up direction MAC forwarding-table item and down direction MAC forwarding-table item in the flow process also can be set up not according to mode as shown in Figure 3 as shown in Figure 2, but adopt those skilled in the art other modes that can realize set up.
In addition, after setting up up direction MAC forwarding-table item and down direction MAC forwarding-table item, can know that in order to make the server that need obtain flow data terminal equipment possesses the ability of load balancing, can utilize to the login mechanism of this server and announce this server.Therefore, realize that based on many network ports the method for load balancing can also be used to utilize registration to realize the following steps of load balancing capability advertisement in the exchange chip execution according to flow process as shown in Figure 4 in the present embodiment:
Step 221, what port P0 receiving processor sent internally is the register requirement message of destination address with stream destination MAC Address, carries the information that is used for representing the terminal equipment holding load and shares in this register requirement message, carries the load balancing sign to allow the flow data request message.
Step 222 is forwarded to switching equipment with the register requirement message from the network port Pi of correspondence according to the up direction MAC forwarding-table item that finds, so that the register requirement message can arrive the server that need obtain flow data.
So far, above-mentioned flow process finishes.
After above-mentioned flow process as shown in Figure 4, if among the network port P1~Pn of terminal equipment only surplus one available, then need to make server to know the current ability that does not possess load balancing of terminal equipment, can utilize a new fault notification mechanism to inform this server.Therefore, realize that based on many network ports the method for load balancing can also be used to realize the following steps of fault notification according to flow process as shown in Figure 5 in the exchange chip execution in the present embodiment:
Step 241, but in all network interface port P1~Pn, only there is a time spent, what port P0 received that processor sends internally is the fault notification message of destination address with stream destination MAC Address, carry in this fault notification message be used for representing terminal equipment not the information shared of holding load, carry with cancellation flow data request message and to be used to represent that the flow data encapsulated message needs the sign of load balancing.
Step 242, according to the up direction MAC forwarding-table item that finds (refreshing and a corresponding only available map network port Pk) through MAC Address repeatedly, the fault notification message fault notification message is forwarded to switching equipment from an only available map network port Pk, so that can arrive the server that need obtain flow data.
In addition, but in all network interface port P1~Pn only arranged a time spent, the VLAN that can also cancel all-network port P1~Pn and internal port P0 divides.
So far, above-mentioned flow process finishes.
The above-mentioned method based on many network ports realization load balancings that present embodiment provides can utilize computer program to realize.Correspondingly, what present embodiment also provided a kind of correspondence realizes that based on many network ports the exchange chip to the terminal equipment of the provided flow data shown in Fig. 1 e as Fig. 1 a is provided for the device of load balancings, this device, and comprises:
The request forwarding module, the destination and be the flow data request message of destination address with the terminal equipment MAC Address of flowing automatically that will receive from arbitrary network port Pi is forwarded to processor by searching the mode that MAC transmits from the pairing internal port P0 of down direction MAC forwarding-table item.Wherein, the flow data request message can identify the flow data of representing its request and needs load balancing by carrying a load balancing, so that whether processor carries out load balancing and carry VLAN mark head in the flow data encapsulated message of load balancing is carried out in decision according to this sign decision.
In addition, if the network port Pi of request of data receiver module receiving stream-oriented data request message is not and the current pairing network port of having set up of up direction MAC forwarding-table item, the up direction MAC forwarding-table item that then needs list item removing module deletion to set up, and receive according to the request of data receiver module by a list item refresh module flow data request message network port Pi index and set up new up direction MAC forwarding-table item as the stream destination MAC Address of the source address of flow data request message.
In addition, if the pairing network port of having set up of up direction MAC forwarding-table item becomes unavailable, then the list item removing module also can be deleted the up direction MAC forwarding-table item of having set up, and still by the list item refresh module receive according to the request of data receiver module flow data request message network port Pi index and set up new up direction MAC forwarding-table item as the stream destination MAC Address of the source address of flow data request message.
Transmit judge module, decision processor sends to the Tag head that whether carries in the flow data encapsulated message of internal port P0 at the VLANj of load balancing sign.Wherein, when carrying the load balancing sign in the flow data request message, processor can carry the Tag head of VLANj in the flow data encapsulated message corresponding with this flow data request message.
Data forwarding module, when carrying VLAN mark head in the flow data encapsulated message, the network port Pj that is subordinated to corresponding VLANj after the Tag head of the VLANj that the flow data encapsulated message is carried divests transmits; The network port Pj that belongs to corresponding VLANj is the arbitrary network port except that the network port Pi of up direction MAC forwarding-table item correspondence.
Data forwarding module, when also further in the flow data encapsulated message, not carrying Tag of VLANj, the flow data encapsulated message of Tag head that do not carry VLANj according to searching the usual manner that MAC transmits, is transmitted from the network port Pi of up direction MAC forwarding-table item correspondence.Certainly, for the normal forwarding that does not need load balancing, processor also can carry the Tag head of VLANi in the flow data encapsulated message, can guarantee that still this flow data message is divested the network port Pi of back from up direction MAC forwarding-table item correspondence at the Tag head that carries and transmits.
And for the study to the ARP list item of the foundation that realizes up MAC forwarding-table item and descending MAC forwarding-table item and processor, this device also comprises:
The ARP forwarding module is source address, is that the ARP request message of destination address is transmitted from each network port P1~Pn successively with the broadcast address with the terminal equipment MAC Address what port P0 receiving processor internally sent.
First entry module is set up down direction MAC forwarding-table item according to the index of internal port P0 and as the network equipment MAC Address of the source address of ARP request message.
The ARP forwarding module, also will be source address, be the arp response message of destination address with the terminal equipment MAC Address with stream destination MAC Address from what arbitrary network port Pi received, be forwarded to processor by searching mode that MAC transmits from the internal port P0 of down direction MAC forwarding-table item correspondence, utilize arp response message study ARP list item for processor; Wherein, the network port Pi that receives the network port Pi of arp response message and request of data receiver module receiving stream-oriented data request message may be same, also may not be same.
Second entry module is set up up direction MAC forwarding-table item according to the index of the network port Pi that receives the arp response message and as the stream destination MAC Address of the source address of arp response message.
In order to need to obtain the server registration of flow data and whether can share by holding load to this server announcement terminal equipment in network, this device can also comprise:
The registration forwarding module, receiving port P0 internally with stream destination MAC Address is the register requirement message of destination address, transmits from the network port Pi of up direction MAC forwarding-table item correspondence to search mode that MAC transmits.Wherein, carry in this register requirement message the information that is used for representing the terminal equipment holding load and shares, carry the load balancing sign to allow the flow data request message.
The announcement forwarding module, but in all network interface port P1~Pn, only there is a time spent, what port P0 receiving processor was internally sent is the fault notification message of destination address with stream destination MAC Address, transmits from the only surplus available network port Pk of up direction MAC forwarding-table item correspondence to search mode that MAC transmits.Wherein, carry in this fault notification message be used for representing terminal equipment not the information shared of holding load, carry the load balancing sign with cancellation flow data request message.
The foregoing description all is to comprise that with the internal structure in the terminal equipment exchange chip and processor are example, and in the practical application, terminal equipment also can adopt structure arbitrarily.So, in order to be applicable to the terminal equipment of various structures, also based on same basic principle, provide more general a kind of method and a kind of system that realizes load balancing based on many network ports that realizes load balancing based on many network ports in the embodiment of the invention.
A kind of method that realizes load balancing based on many network ports that present embodiment provides, this method is used for terminal equipment (for example EC) provides flow data to server (for example VM server), this terminal equipment has at least two network port P1~Pn, and at least two network port P1~Pn are used to realize that with same the mutual switching equipment of server and terminal equipment links to each other;
And at least two network port P1~Pn are divided to different VLAN1~VLANn respectively, and preferably all are set to the Access attribute; And this method is included in the following steps that terminal equipment is carried out:
A1, reception server are sent to the flow data request message of arbitrary network port Pi by switching equipment; Wherein, from MAC transmits, can find down direction MAC forwarding-table item (mode of setting up this down direction MAC forwarding-table item adopts identical principle with previously described mode), this down direction MAC forwarding-table item and can point to any position that is used to handle the flow data request message in the terminal equipment.
If the network port Pi of receiving stream-oriented data request message is not and the pairing network port of the current up direction MAC forwarding-table item of having set up (mode and the previously described mode of setting up this up direction MAC forwarding-table item adopt identical principle) in this step, the up direction MAC forwarding-table item that then needs further deletion to set up, and set up new up direction MAC forwarding-table item at the network port Pi that receives the flow data request message in this step.
In addition, if the pairing network port of having set up of up direction MAC forwarding-table item is promptly unavailable before this step, then before step, promptly can delete the up direction MAC forwarding-table item of having set up, and set up new up direction MAC forwarding-table item at the network port Pi that this step receives the flow data request message.
After steps A 1, terminal equipment can judge that the flow data whether its request of expression is arranged in the flow data request message needs the load balancing sign of load balancing.
A2, when in the flow data request message, carrying described load balancing sign, in the flow data encapsulated message that encapsulation obtains, carry the Tag head of VLANj and flow data encapsulated message that encapsulation the is obtained VLANj by this Tag head correspondence be sent to the network port j that belongs to this VLANj, again this Tag head is divested the back from this network port j by switching equipment to server forwards.
When above-mentioned steps A2 can also further not carry described load balancing sign in the flow data request message, the flow data encapsulated message that encapsulation is obtained by search MAC transmit be sent to corresponding network port Pi, again from this network port Pi by switching equipment to server forwards; Wherein, the up direction MAC forwarding-table item that is found from MAC transmits promptly points to this network port Pi.Certainly, for the normal forwarding that does not need load balancing, processor also can carry the Tag head of VLANi in the flow data encapsulated message, can guarantee that still this flow data message is divested the network port Pi of back from up direction MAC forwarding-table item correspondence at the Tag head that carries and transmits.
This method before steps A 1, further comprise the step that is used for reporting to server the load balancing ability: A0 by login mechanism, with the register requirement message that generates by search MAC transmit be sent to corresponding network port Pi, again from this network port Pi by switching equipment to server forwards; Wherein, carry in this register requirement message the information that is used for representing the terminal equipment holding load and shares, carry described load balancing sign to allow the flow data request message.
This method further comprises the step that is used for to server announcement fault after described steps A 0: but B0, only arranged a time spent at all network interface port P1~Pn, with the fault notification message that generates by search MAC transmit be sent to an only available network port Pk and from this network port Pk by switching equipment to server forwards; Wherein, carry in this fault notification message be used for representing terminal equipment not the information shared of holding load, carry described load balancing sign to forbid the flow data request message.
A kind of system that realizes load balancing based on many network ports that provides in the embodiment of the invention, this system comprises server (for example VM server), is used for the terminal equipment (for example EC) of flow data being provided and being used to realize server and the mutual switching equipment of terminal equipment to server, and described terminal equipment has at least two network port Pi~Pn, described at least two network port Pi~Pn link to each other with same switching equipment;
At least two network port Pi~Pn are divided to different VLAN1~VLANn respectively, and preferably all are set to the Access attribute;
Server is used for sending the flow data request message to switching equipment; Wherein, the flow data request message can identify the flow data of representing its request and needs load balancing by carrying a load balancing;
Switching equipment is used for the flow data request message is sent to arbitrary network port Pi of terminal equipment;
Terminal equipment is used for reception server is sent to arbitrary network port Pi by switching equipment flow data request message; Wherein, from MAC transmits, can find down direction MAC forwarding-table item (mode of setting up this down direction MAC forwarding-table item adopts identical principle with previously described mode), this down direction MAC forwarding-table item and can point to any position that is used to handle the flow data request message in the terminal equipment.
If the network port Pi of current receiving stream-oriented data request message is not and the pairing network port of the current up direction MAC forwarding-table item of having set up (mode and the previously described mode of setting up this up direction MAC forwarding-table item adopt identical principle), then terminal equipment needs the up direction MAC forwarding-table item that further deletion has been set up, and sets up new up direction MAC forwarding-table item at the current network port Pi that receives the flow data request message.
In addition, if the pairing network port of having set up of up direction MAC forwarding-table item is promptly unavailable before current receiving stream-oriented data request message, then promptly can delete the up direction MAC forwarding-table item of having set up before this, and need terminal equipment further to set up new up direction MAC forwarding-table item at the current network port Pi that receives the flow data request message.
Terminal equipment is used for also judging whether the flow data request message has the flow data of its request of expression to need the load balancing sign of load balancing.
When in the flow data request message, carrying described load balancing sign, terminal equipment in the flow data encapsulated message that encapsulation obtains, carry the Tag head of VLANj and the VLANj by this Tag head correspondence be sent to the network port Pj that belongs to this VLANj, again this Tag head is divested the back from this network port Pj by switching equipment to server forwards;
And, when in the flow data request message, not carrying described load balancing sign, the flow data encapsulated message that terminal equipment obtains encapsulation by search MAC transmit be sent to corresponding network port Pi, again from this network port Pi by switching equipment to server forwards.Wherein, the up direction MAC forwarding-table item that is found from MAC transmits promptly points to this network port Pi.Certainly, for the normal forwarding that does not need load balancing, processor also can carry the Tag head of VLANi in the flow data encapsulated message, can guarantee that still this flow data message is divested the network port Pi of back from up direction MAC forwarding-table item correspondence at the Tag head that carries and transmits.
In order to report the load balancing ability to server, before the receiving stream-oriented data request message, terminal equipment can also be further with the register requirement message that generates by search MAC transmit be sent to corresponding network port Pi, again from this network port Pi by switching equipment to server forwards; Wherein, carry in this register requirement message the information that is used for representing the terminal equipment holding load and shares, carry described load balancing sign to allow the flow data request message.
In order to circulate a notice of fault to server, after reporting the load balancing ability by login mechanism, but terminal equipment can also further only have a time spent in all network interface port P1~Pn, with the fault notification message that generates by search MAC transmit be sent to an only available network port Pk and from this network port Pk by switching equipment to server forwards; Wherein, carry in this fault notification message be used for representing terminal equipment not the information shared of holding load, carry described load balancing sign to forbid the flow data request message.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to and replace and improvement etc., all should be included within protection scope of the present invention.

Claims (16)

1. method that realizes load balancings based on many network ports, this method is applied to provide in the terminal equipment of flow data, this terminal equipment comprises at least two network ports and an internal port, same outer switching equipment of described at least two network ports and terminal equipment links to each other, and internal port links to each other with processor in the terminal equipment;
It is characterized in that at least two network ports are divided to different VLAN, internal port respectively and are divided to VLAN under the all-network port simultaneously; And this method comprises:
The flow data request message of a1, the destination that flows automatically that will receive from arbitrary network port port internally is forwarded to processor; Wherein, the flow data request message can identify the flow data of representing its request and needs load balancing by carrying a load balancing, so that whether processor carries out load balancing and carry VLAN mark head in the flow data encapsulated message of load balancing is carried out in decision according to this sign decision;
A2, when in the flow data encapsulated message, carrying VLAN mark head, the network port that is subordinated to corresponding VLAN after the VLAN mark head that the flow data encapsulated message is carried divests is transmitted.
2. the method for claim 1 is characterized in that, when described step a2 does not further carry described VLAN mark head in the flow data encapsulated message, the flow data encapsulated message is transmitted from the network port of correspondence and is transmitted by searching MAC.
3. method as claimed in claim 1 or 2 is characterized in that, this method further comprised before described step a1:
A0, will be internally the register requirement message that receives of port transmit from the network port of correspondence and transmit by searching MAC; Wherein, carry in this register requirement message the information that is used for representing the terminal equipment holding load and shares, carry described load balancing sign to allow the flow data request message.
4. method as claimed in claim 3 is characterized in that, this method further comprises after described step a0:
But b0, only arranged a time spent in all network interface ports, the fault notification message that port is internally received is transmitted from only available network port and is transmitted by searching MAC; Wherein, carry in this fault notification message be used for representing terminal equipment not the information shared of holding load, carry described load balancing sign to forbid the flow data request message.
5. device of realizing load balancings based on many network ports, this device is carried in the terminal equipment that flow data can be provided, this terminal equipment comprises at least two network ports and an internal port, same outer switching equipment of described at least two network ports and terminal equipment links to each other, and internal port links to each other with processor in the terminal equipment;
It is characterized in that at least two network ports are divided to different VLAN, internal port respectively and are divided to VLAN under the all-network port simultaneously; And this device comprises:
The request forwarding module, the flow data request message of the destination that flows automatically that will receive from arbitrary network port port internally is forwarded to processor; Wherein, the flow data request message can identify the flow data of representing its request and needs load balancing by carrying a load balancing, so that whether processor carries out load balancing and carry VLAN mark head in the flow data encapsulated message of load balancing is carried out in decision according to this sign decision;
Data forwarding module, when carrying VLAN mark head in the flow data encapsulated message, the network port that is subordinated to corresponding VLAN after the VLAN mark head that the flow data encapsulated message is carried divests is transmitted.
6. device as claimed in claim 5 is characterized in that, when described data forwarding module further carries described VLAN mark head in the flow data encapsulated message flow data encapsulated message is not transmitted from the network port of correspondence and is transmitted by searching MAC.
7. as claim 5 or 6 described devices, it is characterized in that this device further comprises:
The registration forwarding module, the register requirement message that port is internally received is transmitted from the network port of correspondence and is transmitted by searching MAC; Wherein, carry in this register requirement message the information that is used for representing the terminal equipment holding load and shares, carry described load balancing sign to allow the flow data request message.。
8. device as claimed in claim 7 is characterized in that, this device further comprises:
The announcement forwarding module, but a time spent is only arranged in all network interface ports, the fault notification message of port reception is internally transmitted from an only available network port forwarding by searching MAC; Wherein, carry in this fault notification message be used for representing terminal equipment not the information shared of holding load, carry described load balancing sign to forbid the flow data request message.
9. method that realizes load balancings based on many network ports, this method is used for terminal equipment provides flow data to server, described terminal equipment has at least two network ports, and described at least two network ports are used to realize that with same the mutual switching equipment of server and terminal equipment links to each other;
It is characterized in that at least two network ports are divided to different VLAN respectively; And this method comprises:
A1, reception server are sent to the flow data request message of arbitrary network port by switching equipment; Wherein, the flow data request message can identify the flow data of representing its request and needs load balancing by carrying a load balancing;
A2, when in the flow data request message, carrying described load balancing sign, in the flow data encapsulated message that encapsulation obtains, carry VLAN mark head and the VLAN by this VLAN mark head correspondence be sent to the network port that belongs to this VLAN, again VLAN mark head is divested the back from this network port by switching equipment to server forwards.
10. method as claimed in claim 9, it is characterized in that, when described steps A 2 is not further carried described load balancing sign in the flow data request message, the flow data encapsulated message that encapsulation is obtained by search MAC transmit be sent to the corresponding network port, again from this network port by switching equipment to server forwards.
11., it is characterized in that this method further comprised as claim 9 or 10 described methods before described steps A 1:
A0, with the register requirement message that generates by search MAC transmit be sent to the corresponding network port, again from this network port by switching equipment to server forwards; Wherein, carry in this register requirement message the information that is used for representing the terminal equipment holding load and shares, carry described load balancing sign to allow the flow data request message.
12. method as claimed in claim 11 is characterized in that, this method further comprises after described steps A 0:
But B0, only arranged a time spent in all network interface ports, with the fault notification message that generates by search MAC transmit be sent to only available network port and from this network port by switching equipment to server forwards; Wherein, carry in this fault notification message be used for representing terminal equipment not the information shared of holding load, carry described load balancing sign to forbid the flow data request message.
13. system that realizes load balancing based on many network ports, this system comprises server, is used for the terminal equipment of flow data being provided and being used to realize server and the mutual switching equipment of terminal equipment to server, and described terminal equipment has at least two network ports, described at least two network ports link to each other with same switching equipment;
It is characterized in that at least two network ports are divided to different VLAN respectively;
Server is used for sending the flow data request message to switching equipment; Wherein, the flow data request message can identify the flow data of representing its request and needs load balancing by carrying a load balancing;
Switching equipment is used for the flow data request message is sent to arbitrary network port of terminal equipment;
Terminal equipment, be used for when the flow data request message carries described load balancing sign, in the flow data encapsulated message that encapsulation obtains, carry VLAN mark head and the VLAN by this VLAN mark head correspondence be sent to the network port that belongs to this VLAN, again VLAN mark head is divested the back from this network port by switching equipment to server forwards.
14. system as claimed in claim 13, it is characterized in that, when terminal equipment does not further carry described load balancing sign in the flow data request message, the flow data encapsulated message that encapsulation is obtained by search MAC transmit be sent to the corresponding network port, again from this network port by switching equipment to server forwards.
15. as claim 13 or 14 described systems, it is characterized in that, terminal equipment further before the receiving stream-oriented data request message with the register requirement message that generates by search MAC transmit be sent to the corresponding network port, again from this network port by switching equipment to server forwards; Wherein, carry in this register requirement message the information that is used for representing the terminal equipment holding load and shares, carry described load balancing sign to allow the flow data request message.
16. system as claimed in claim 15, it is characterized in that, but terminal equipment further only has a time spent in all network interface ports, with the fault notification message that generates by search MAC transmit be sent to only available network port and from this network port by switching equipment to server forwards; Wherein, carry in this fault notification message be used for representing terminal equipment not the information shared of holding load, carry described load balancing sign to forbid the flow data request message.
CN 201110194838 2011-07-12 2011-07-12 Multi-network-port-based load sharing method and device Active CN102209040B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110194838 CN102209040B (en) 2011-07-12 2011-07-12 Multi-network-port-based load sharing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110194838 CN102209040B (en) 2011-07-12 2011-07-12 Multi-network-port-based load sharing method and device

Publications (2)

Publication Number Publication Date
CN102209040A true CN102209040A (en) 2011-10-05
CN102209040B CN102209040B (en) 2013-12-25

Family

ID=44697709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110194838 Active CN102209040B (en) 2011-07-12 2011-07-12 Multi-network-port-based load sharing method and device

Country Status (1)

Country Link
CN (1) CN102209040B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102316119A (en) * 2011-10-12 2012-01-11 杭州华三通信技术有限公司 Security control method and equipment
CN102546813A (en) * 2012-03-15 2012-07-04 北京神州数码思特奇信息技术股份有限公司 High-performance cluster computing system based on x86PC framework
CN103516617A (en) * 2012-06-25 2014-01-15 国基电子(上海)有限公司 Router, network connection recovering system and network connection recovering method
CN103780444A (en) * 2012-10-19 2014-05-07 上海未来宽带技术股份有限公司 Loop automatic detection device and method in EoC network
CN105049367A (en) * 2015-09-10 2015-11-11 北京星网锐捷网络技术有限公司 Traffic distribution method of aggregated link and access device
CN105812275A (en) * 2016-03-10 2016-07-27 盛科网络(苏州)有限公司 Stream-based TAP (test access point) implementation method
CN106330547A (en) * 2016-08-26 2017-01-11 浙江宇视科技有限公司 Redundant link data packet forwarding method and device
CN107154896A (en) * 2016-03-02 2017-09-12 华为技术有限公司 A kind of data transmission method and forwarding unit
CN109347987A (en) * 2018-12-07 2019-02-15 迈普通信技术股份有限公司 Access request retransmission method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925496A (en) * 2006-09-15 2007-03-07 杭州华为三康技术有限公司 System and method for load sharing of network layer with multiple network interface cards terminal equipment
CN101056246A (en) * 2007-05-28 2007-10-17 杭州华三通信技术有限公司 A method and device for realizing the load share
CN101170394A (en) * 2007-11-27 2008-04-30 华为技术有限公司 A method and device for realizing inter-board interconnection
CN101453415A (en) * 2007-11-29 2009-06-10 华为技术有限公司 Protection method, system and equipment for access network
CN101605091A (en) * 2009-02-13 2009-12-16 华为技术有限公司 A kind of multi-port load sharing method, device and network system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1925496A (en) * 2006-09-15 2007-03-07 杭州华为三康技术有限公司 System and method for load sharing of network layer with multiple network interface cards terminal equipment
CN101056246A (en) * 2007-05-28 2007-10-17 杭州华三通信技术有限公司 A method and device for realizing the load share
CN101170394A (en) * 2007-11-27 2008-04-30 华为技术有限公司 A method and device for realizing inter-board interconnection
CN101453415A (en) * 2007-11-29 2009-06-10 华为技术有限公司 Protection method, system and equipment for access network
CN101605091A (en) * 2009-02-13 2009-12-16 华为技术有限公司 A kind of multi-port load sharing method, device and network system

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102316119A (en) * 2011-10-12 2012-01-11 杭州华三通信技术有限公司 Security control method and equipment
CN102316119B (en) * 2011-10-12 2014-06-25 杭州华三通信技术有限公司 Security control method and equipment
CN102546813B (en) * 2012-03-15 2016-03-16 北京思特奇信息技术股份有限公司 A kind of High-Performance Computing Cluster computing system based on x86 PC framework
CN102546813A (en) * 2012-03-15 2012-07-04 北京神州数码思特奇信息技术股份有限公司 High-performance cluster computing system based on x86PC framework
CN103516617A (en) * 2012-06-25 2014-01-15 国基电子(上海)有限公司 Router, network connection recovering system and network connection recovering method
CN103780444A (en) * 2012-10-19 2014-05-07 上海未来宽带技术股份有限公司 Loop automatic detection device and method in EoC network
CN105049367A (en) * 2015-09-10 2015-11-11 北京星网锐捷网络技术有限公司 Traffic distribution method of aggregated link and access device
CN105049367B (en) * 2015-09-10 2019-01-29 北京星网锐捷网络技术有限公司 A kind of flow allocation method and access device of aggregated links
CN107154896A (en) * 2016-03-02 2017-09-12 华为技术有限公司 A kind of data transmission method and forwarding unit
CN107154896B (en) * 2016-03-02 2021-03-05 华为技术有限公司 Data transmission method and forwarding equipment
CN105812275A (en) * 2016-03-10 2016-07-27 盛科网络(苏州)有限公司 Stream-based TAP (test access point) implementation method
CN105812275B (en) * 2016-03-10 2018-11-16 盛科网络(苏州)有限公司 A kind of TAP implementation method based on stream
CN106330547A (en) * 2016-08-26 2017-01-11 浙江宇视科技有限公司 Redundant link data packet forwarding method and device
CN106330547B (en) * 2016-08-26 2020-06-19 浙江宇视科技有限公司 Method and device for forwarding redundant link data packet
CN109347987A (en) * 2018-12-07 2019-02-15 迈普通信技术股份有限公司 Access request retransmission method and system

Also Published As

Publication number Publication date
CN102209040B (en) 2013-12-25

Similar Documents

Publication Publication Date Title
CN102209040B (en) Multi-network-port-based load sharing method and device
US8134919B2 (en) Method and device for protecting ethernet tree services
US20080068985A1 (en) Network redundancy method and middle switch apparatus
US20090252170A1 (en) Method and device of link aggregation and method and system for transceiving mac frames
CN102984057B (en) A kind of Multi-service integration dual-redundancy network system
CN108023974B (en) Address aging method and device
US20160142225A1 (en) Communication system, communication apparatus, and protection method
CN105376154A (en) Progressive MAC address learning
JP2009005053A (en) Packet ring network system and packet transfer method
WO2021141348A1 (en) Method and apparatus for providing plurality of virtual networks for single application in mobile communication network
CN103401781B (en) It is applied to cut-in method and the equipment of multilink transparent interconnection network
US20150319042A1 (en) Virtual Local Area Network Mismatch Detection in Networks
CN108259635B (en) ARP (Address resolution protocol) table item learning method and DR (digital radiography) equipment
CN102420762B (en) Message forwarding method, message forwarding system, network equipment and firewall wire card
CN102780615B (en) Link backup method and routing forwarding device
CN101247351B (en) Load sharing method and device
CN105187311A (en) Message forwarding method and message forwarding device
US9860160B2 (en) Multipath switching using per-hop virtual local area network classification
CN104009903A (en) Flow forwarding method and device for RPR network
CN215956407U (en) Networking system based on 5G local area network
US20120224488A1 (en) Method of connectivity monitoring by subscriber line terminating apparatus
CN109167693B (en) Isolation configuration method and device based on cross-chassis link aggregation group (MLAG)
US9998367B2 (en) Communication control system, communication control method, and communication control program
CN102104533B (en) Method for optimizing RRPP (rapid ring protection protocol) single ring network data transmitting path and ring network node
WO2014040422A1 (en) Control method and device for medium access control address learning and route bridge

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: NEW H3C TECHNOLOGIES Co.,Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: HANGZHOU H3C TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230625

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.