CN108512771A - A kind of method and apparatus that data stream load is shared - Google Patents

A kind of method and apparatus that data stream load is shared Download PDF

Info

Publication number
CN108512771A
CN108512771A CN201710114911.0A CN201710114911A CN108512771A CN 108512771 A CN108512771 A CN 108512771A CN 201710114911 A CN201710114911 A CN 201710114911A CN 108512771 A CN108512771 A CN 108512771A
Authority
CN
China
Prior art keywords
data flow
physical port
sub
port
network 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.)
Withdrawn
Application number
CN201710114911.0A
Other languages
Chinese (zh)
Inventor
黄建国
张义飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201710114911.0A priority Critical patent/CN108512771A/en
Publication of CN108512771A publication Critical patent/CN108512771A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/65Re-configuration of fast packet switches

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

An embodiment of the present invention provides a kind of method that data stream load is shared, the network equipment determines that the physical port of transmission data stream sends the data flow according to the first Load Sharing Algorithm.During the network equipment sends the data flow according to the physical port that the first Load Sharing Algorithm determines, if first physical port breaks down, then the network equipment determines the physical port for sending second data flow according to the first Load Sharing Algorithm, and the physical port for sending the first sub-data flow is determined according to the second Load Sharing Algorithm, first sub-data flow is assigned to second port set by second Load Sharing Algorithm.The network equipment sends first sub-data flow via the physical port for sending first sub-data flow, and sends second sub-data flow via the physical port for sending second sub-data flow.Said program can reduce the unstability of link transmission data stream, meet the needs of business transmission.

Description

A kind of method and apparatus that data stream load is shared
Technical field
The present invention relates to field of communication technology, more particularly to a kind of method and apparatus that data stream load is shared.
Background technology
By using load balancing technology to data flow, the reliability of network and the utilization to link bandwidth can be improved. Valley-fill load balancing refers to being used the type of message identified fixed on the basis of the protocol type to message is identifiable Flow the selection of characteristic element field method and the Load Sharing Algorithm progress load balancing path that can configure based on veneer/interface.
It is physical port distribution data flow based on equipment that present load, which is shared, is carried out to data stream according to five-tuple information Load balancing calculates.For example, there are four physical ports for forwarding unit, four physical ports of the forwarding unit can be born Load shares calculating.If a physical port of the forwarding unit breaks down when being unable to transmission data stream, need to data Stream re-starts load balancing calculating, and data flow is evenly distributed to other three physical ports, can make to hash originally in this way The data flow of other three physical ports can not all continue to hash in original physical port, lead to data flow because path becomes Change the portion that the flow transition brought cannot be satisfied the business networks such as finance, electric power, wireless to data stream transmitting performance and stability Administration requires.
Invention content
The embodiment of the present application provides a kind of method of load balancing, equipment and storage medium, can reduce because of link Variation causes the unstability of flow transition generation and performance to influence.
In a first aspect, this application provides a kind of method that data stream load is shared, the method includes network equipment roots The physical port for transmission data stream is determined according to the first Load Sharing Algorithm.It is determined according to first Load Sharing Algorithm Physical port is that first port set determines physical port.It is multiple in the first port set including the first physical port Port is the physical port of the network equipment.
The network equipment is via the object for sending the data flow determined according to first Load Sharing Algorithm It manages port and sends the data flow.
In the network equipment data flow is sent via the physical port determined according to the first Load Sharing Algorithm In the process, if first physical port breaks down, the network equipment is true according to first Load Sharing Algorithm The fixed physical port for sending the second sub-data flow, and determined according to the second Load Sharing Algorithm for sending the first subnumber According to the physical port of stream.The physical port determined according to second Load Sharing Algorithm is the physics end in second port set Mouthful.The second port set does not include first physical port.Multiple ports that the second port set includes are institutes State the physical port of the network equipment.First sub-data flow is to be determined by described first according to first Load Sharing Algorithm The sub-data flow that physical port is sent.Second sub-data flow is to be determined by described the according to first Load Sharing Algorithm The sub-data flow that other physical ports in Single port set in addition to first physical port are sent.First subdata Stream and second sub-data flow are the sub-data flows in the data flow.
The physical port for sending first sub-data flow that the network equipment is determined via the network equipment Send first sub-data flow, and the physics for sending second sub-data flow determined via the network equipment Port sends second sub-data flow.
Through the above scheme, it is possible to reduce because port failure needs again to carry out data stream in data stream transmission process Load balancing calculates the unstability for leading to data stream transmitting.If the physical port of transmission flow in data stream transmission process It breaks down, it is only necessary to load balancing calculating be carried out to the data flow transmitted by the physical port that breaks down, by these data Stream is evenly distributed to other physical ports for capableing of normal transmission data stream, can thus reduce the shakiness of data stream transmitting It is qualitative, meet the requirement of business transmission.
With reference to first aspect, in the first possible implementation, the network equipment is calculated according to the first load balancing Method determines that the physical port for transmission data stream includes:
The data flow is divided into M sub-data flow by the network equipment, and M is the physical port of the first port set The positive integer times of N.
The network equipment determines the corresponding physical port of the M sub-data flow, and the network equipment is according to described One Load Sharing Algorithm determines that the physical port for sending the data flow is the corresponding physics end of the M sub-data flow Mouthful.Each sub-data flow corresponds to a physical port in the first port set.Each of described first port set The quantity of the corresponding sub-data flow of physical port is M/N.
Through the above scheme, the network equipment obtains the least common multiple of the physical port number of transmission data stream by calculating The data flow, is then divided into and least common multiple equal parts by the first load balancing by number.In this way in the network equipment In the case that physical port breaks down, the data flow that non-working port is sent can be evenly distributed to other normal transmission numbers According to the physical port of stream.
With reference to first aspect, in second of possible realization method, this method further includes working as first physical port When restoring to send the ability of the data flow, first time load balancing is calculated the sorted data flow by the network equipment It is sent according to the physical port determined after calculating.
Through the above scheme, after non-working port recovery and can normal transmission data stream when, continue to close according to first Key field carries out load balancing Hash calculating to data stream, and the data flow is evenly distributed to the physical port of the network equipment On, it is restored to the distribution to data flow before physical port failure, reduces unstable because of the data stream transmitting that link change is brought Property.
With reference to first aspect, in the third possible realization method, the network equipment is calculated according to the first load balancing Method determines that the physical port for transmission data stream includes:
The network equipment, using the field of the message in the data flow as Hash keys, and determines institute according to hash algorithm State the cryptographic Hash of hash algorithm.
The network equipment determines the physical port for sending the data flow, the field packet according to the cryptographic Hash Include source Internet protocol IP address, purpose IP address, source port number, destination slogan and protocol number.
Second aspect, an embodiment of the present invention provides a kind of network equipment that data stream load is shared, the network equipments Including determination unit and transmission unit.
Determination unit is used to determine the physical port for being used for transmission data stream according to the first Load Sharing Algorithm, according to described The physical port that first Load Sharing Algorithm determines is that first port set determines physical port, includes the institute of the first physical port State the physical port that multiple ports in first port set are the network equipments.
Transmission unit is used for for being used to send the data flow via what is determined according to first Load Sharing Algorithm Physical port send the data flow.
The determination unit is additionally operable to send the data via the physical port determined according to the first Load Sharing Algorithm During stream, if first physical port breaks down, determined according to first Load Sharing Algorithm for sending out The physical port of the second sub-data flow is sent, and the object for sending the first sub-data flow is determined according to the second Load Sharing Algorithm Manage port.The physical port determined according to second Load Sharing Algorithm is the physical port in second port set.It is described Second port set does not include first physical port.Multiple ports that the second port set includes are that the network is set Standby physical port.First sub-data flow is to be determined by first physical port according to first Load Sharing Algorithm The sub-data flow of transmission.Second sub-data flow is to be determined by the first port collection according to first Load Sharing Algorithm The sub-data flow that other physical ports in conjunction in addition to first physical port are sent.First sub-data flow and described Second sub-data flow is the sub-data flow in the data flow.
The transmission unit is additionally operable to be sent out according to the physical port that the first Load Sharing Algorithm determines in the network equipment During sending the data flow, if first physical port breaks down, the result determined according to determination unit is by sending out The physical port of first sub-data flow is sent to send first sub-data flow, and the hair determined via the network equipment The physical port of second sub-data flow is sent to send second sub-data flow.
Through the above scheme, can reducing data flow, data stream transmitting is unstable caused by port failure in transmission process It is qualitative.
In conjunction with second aspect, in the first possible implementation, the equipment also packet allocation unit.
The allocation unit is used to the data flow being divided into M sub-data flow, and M is the physics of the first port set The positive integer times of port N.
The determination unit is additionally operable to determine the corresponding physical port of the M sub-data flow, and negative according to described first It carries Sharing Algorithm and determines that the physical port for sending the data flow is the corresponding physical port of the M sub-data flow.Often A sub-data flow corresponds to a physical port in the first port set.Each physics end in the first port set The quantity of the corresponding sub-data flow of mouth is M/N.
In conjunction with second aspect, in second of possible realization method, the determination unit is used for will according to hash algorithm The field of message in the data flow determines the cryptographic Hash of the hash algorithm, and according to the cryptographic Hash as Hash keys Determine the physical port for sending the data flow, the field includes source Internet protocol IP address, purpose IP address, source Slogan, destination slogan and protocol number.
The third aspect, the application's provides a kind of computer readable storage medium, the computer-readable storage medium again Instruction is stored in matter, when run on a computer so that computer execute above-mentioned first aspect and second aspect and The method of each possible realization method.
Description of the drawings
Fig. 1 is that a kind of data stream load provided by the embodiments of the present application shares schematic diagram of a scenario;
Fig. 2 is that another data stream load provided in an embodiment of the present invention shares schematic diagram of a scenario;
Fig. 3 is a kind of method flow schematic diagram that data stream load is shared provided in an embodiment of the present invention;
Fig. 4 is a kind of network equipment infrastructure schematic diagram provided in an embodiment of the present invention;
Fig. 5 is another network equipment infrastructure schematic diagram provided in an embodiment of the present invention.
Specific implementation mode
The present invention will be describe below in further detail with reference to the accompanying drawings.Obviously, described embodiment is only this A part of the embodiment of invention, rather than whole embodiments.
A kind of data stream load burden schematic diagram of a scenario is provided for the embodiment of the present application referring to Fig. 1, which can Think such as IPRAN (English:Internet Protocol Radio Access Network)/Metropolitan Area Network (MAN), PTN (English: Packet Transport Network), SDH (English:Synchronous Optical Networking) network, optical transport Any network scenarios such as data transmission networks or bearer network such as net.The network system includes that first network equipment and the second network are set It is standby.It should be noted that the first network equipment and second network equipment in the embodiment of the present application are specifically as follows router, hand over It changes planes the equipment of equal forwarding services flow, but also the friendship being included under SDN (Software Defined Network) scene It changes planes, in SDN, which can be composed of together controller and corresponding forwarding unit.First After the network equipment receives data flow, load balancing Hash meters can be carried out to the data flow according to the characteristic element field of data flow It calculates, obtain the path of the data flow and determines the physical port for sending the data flow.
For example, the first network equipment in Fig. 1 can be according to the characteristic element of data flow after receiving the data flow Field carries out load balancing calculating to the data flow, and wherein characteristic element can be IP five-tuples, can also be bis- tuples of IP.According to Four paths for forwarding the data flow, four physical ports pair of this four paths and first network equipment are obtained according to result of calculation It answers, and is respectively connected with four physical ports of first network equipment.The data flow is calculated by load balancing, such as Hash meters It calculates, is divided into four parts, including the first data flow, second data Liu, third data flow and the 4th data flow.By sorted data Stream sends the first data flow by the first physical port to second network equipment, by the second physical port to the second network equipment The second data flow is sent, third data flow is sent to the third network equipment by third physical port, passes through the 4th physical port The 4th data flow is sent to second network equipment, it is same by four paths that data flow is evenly distributed to four physical ports in this way When send, the reliability of network and the utilization to link bandwidth can be improved.It is understood that if first network equipment has A physical port transmission data streams of N (N be more than zero integer), then first network equipment can data flow be subjected to load balancing It calculates, obtains the N paths for forwarding the data flow.It is current normal if the first physical port of first network equipment breaks down It is that the data flow is re-started load balancing to calculate with technology, again the data flow is distinguished, then will be distinguished Data flow is evenly distributed to the second physical port, third physical port and the 4th physical port three above physical port.So Data flow is redistributed to cause to hash originally and is calculated by load balancing again in the second data flow of the second physical port It is assigned to the 4th physical port or the 5th physical port, is unable to ensure in this way before the first physical port failure and is assigned to Second data flow of two physical ports all continues to be assigned to the second physical port, therefore will reduce the stabilization of flow transition Property.But in the business networks such as finance, electric power, wireless, there is very high requirement to the performance and stability of transmission, it is negative in deployment Carry the unstability and performance influence for often requiring that the flow transition for reducing and being brought because of link change generates after sharing.
To solve the above-mentioned problems, ensure that the physical port in first network equipment makes to be hashed originally the after breaking down The data flow of two physical ports, third physical port and the 4th physical port can continue to hash in original physical port, subtract The unstability that few data flow transition generates, increases the stability of data stream transmitting, meets the needs of business transmission.Fig. 2 is directed to The above problem in Fig. 1 provides a kind of data stream load and shares schematic diagram of a scenario, in this embodiment, if first network First physical port of equipment breaks down, and still carries out load balancing calculating to the data flow, obtains four hairs of data flow Path is sent, then proceedes to carry out a load balancing calculating again to the first data flow that the first physical port is sent, by the first number Other three physical ports are evenly distributed to according to stream, i.e., the first data flow are evenly distributed to the second physical port, third object Manage port and the 4th physical port.The second data flow sent by the second physical port originally continues through the second physics end Mouth is sent, and the third data flow sent originally by third physical port continues through the transmission of third round physical port, originally The 4th data flow sent by the 4th physical port continues through the 4th physical port and sends.
To solve the above-mentioned problems, an embodiment of the present invention provides a kind of method that data stream load is shared, referring to Fig. 3, In conjunction with the network scenarios schematic diagram in Fig. 1 and Fig. 2, the first network equipment in the present embodiment is the first network in Fig. 1 and Fig. 2 Equipment, the first physical port, the second physical port, third physical port and the 4th physical port of first network equipment are Fig. 1 With the first physical port, the second physical port, third physical port and the 4th physical port in Fig. 2, this method includes as follows Content:
S301:The network equipment determines the physical port for transmission data stream according to the first Load Sharing Algorithm, according to institute The physical port for stating the determination of the first Load Sharing Algorithm is that first port set determines physical port.Including the first physical port Multiple ports in the first port set are the physical ports of the network equipment.
In a specific embodiment, the network equipment bears data stream according to the critical field of data flow Load shares calculating, determines the physical port of transmission data stream.The critical field is the characteristic element field of data flow, the spy Sign element field is located in data stream message head, and the characteristic element field divides data flow for distinguishing data flow, realization Class.For example, the characteristic element field of data flow can be IP five-tuples, can also be bis- tuples of IP.As the spy of data flow When to levy element field be IP five-tuples, the critical field is purpose IP address, destination slogan, source IP address, source port number, Protocol number.IP five-tuples are mainly for User Data Protocol (User Datagram Protocol, UDP) or non-transmitting control Agreement (Transmission Control Protocol, TCP) message carries out the differentiation of data flow.When the characteristic element of data flow When plain field is bis- tuples of IP, the critical field is source IP address and purpose IP address, and wherein bis- tuples of IP are mainly for non- UDP, TCP message carry out the differentiation of data flow.The network equipment can also be directed to multiprotocol label switching (Multiprotocol Label Switching, MPLS) message carries out data flow characteristics element field based on each layer label Selection.
In a specific embodiment, the network equipment equipment is according to above-mentioned data flow characteristics element field logarithm Load balancing calculating is carried out according to stream.For example, the network equipment can be determined according to the physical port of the network equipment The routing policy of transmission data stream carries out load balancing calculating, by data then in conjunction with the IP five-tuples of data flow to data stream Stream distinguishes and obtains the transmitting path of data flow, determines the corresponding physical port of each paths of transmission data stream.
S302:The network equipment is used to send the data flow via what is determined according to first Load Sharing Algorithm Physical port send the data flow.
In a specific embodiment, the network equipment sends institute according to the physical port determined in above-mentioned S301 State data flow.
S303:The network equipment sends the data flow via the physical port determined according to the first Load Sharing Algorithm During, if first physical port breaks down, the network equipment is according to first Load Sharing Algorithm It determines the physical port for sending the second sub-data flow, and is determined according to the second Load Sharing Algorithm for sending the first son The physical port of data flow, the physical port determined according to second Load Sharing Algorithm are the physics in second port set Port, the second port set do not include first physical port, and multiple ports that the second port set includes are The physical port of the network equipment, first sub-data flow are to be determined by described the according to first Load Sharing Algorithm The sub-data flow that one physical port is sent, second sub-data flow are to be determined by described according to first Load Sharing Algorithm The sub-data flow that other physical ports in first port set in addition to first physical port are sent, first subnumber It is the sub-data flow in the data flow according to stream and second sub-data flow.
In a specific embodiment, when event occurs in the first physical port of the network equipment transmission data stream Barrier, when cannot continue transmitting data flow, continues according to first keyword of the network equipment described in above-mentioned S301 according to data flow Section carries out load balancing calculating to data stream, obtains the forward-path of data flow, determines the corresponding object in forwarding data flow path Port is managed, above-mentioned steps are referring to S301, and details are not described herein again.Then the data flow for being assigned to the first physical port is carried out again Load balancing calculates, can be according to characteristic elements fields pair such as bis- tuples of IP or IP five-tuples when carrying out load balancing calculating Flow distinguishes, and the data flow calculated by second is evenly distributed to other physical ports normally sent.
Table 1
For example, the step is described in detail by taking content shown in table 1 as an example below, if destination address is 1.2.3.4 data stream packets contain four road equivalent route strategies, then can match network segment routing (1.2.3.0/24), and according to number The data flow that destination address is 1.2.3.4 is subjected to load balancing calculating according to stream characteristic element field and index calculated values, it is described Load balancing calculating can be that Hash is calculated, and data flow is passed through the first physical port of the network equipment, the second object respectively Manage port, third physical port and the 4th physical port transmission data stream.Such as data flow Hash then may be used to the first physical port To establish fast-turn construction list item, outgoing interface is the first physical port, next-hop 2.2.2.2, for this feature element field phase Same data flow is sent according to above-mentioned fast-turn construction list item again by the first physical port.Equally, the second physical port can be established Fast-turn construction list item, outgoing interface be the second physical port, next-hop 3.3.3.3, for the second physical port transmission data stream The identical data flow of characteristic element field is sent according to the fast-turn construction list item again by the second physical port.Third physical port is same Sample can establish fast-turn construction list item, and outgoing interface is third physical port, next-hop 4.4.4.4, for third physical port institute The identical data flow of characteristic element field of the data flow of transmission is sent again by third physical port.4th physical port Fast-turn construction list item can be established, outgoing interface is the 4th physical port, next-hop 5.5.5.5, for being sent with the 4th physical port The identical data flow of characteristic element field of data flow sent again by the 4th physical port.The network equipment as a result, The first physical port send the first data flow, the second physical port send the second data flow, third physical port send third Data flow, the 4th physical port send the 4th data flow.When the first physical port, which breaks down, to continue transmitted traffic, lead Cause the first data flow for being assigned to the first physical port after first time load balancing Hash calculates that cannot continue through the One physical port is sent.The network equipment also has three road equivalent route strategies at this time, and the network equipment can be according to data The characteristic element field of stream carries out second of load balancing Hash to first data flow and calculates, that is, will be under fast-turn construction list item One jump is 2.2.2.2, and outgoing interface is that the data flow of the first physical port carries out a load balancing again according to characteristic element field Hash is calculated, and first data flow is sent by the second physical port, third physical port and the 4th physical port.With table 2 For be explained, due to the first physical port failure cannot continue transmission data stream, need to by the first physics The data flow that port is sent proceeds through second of load balancing Hash and calculates, by the first data flow Hash to the second physics Port, third physical port and the 4th physical port, that is, by fast-turn construction list item outgoing interface be the first physical port, next-hop is 2.2.2.2 data flow Hash is to the second physical port, third physical port and the 4th physical port.It can be understood that passing through First time load balancing, it is the second physical port to establish fast-turn construction list item outgoing interface, and next-hop is that the data flow of 3.3.3.3 continues to lead to The transmission of the second physical port is crossed, by first time load balancing, it is third physical port, next-hop to establish fast-turn construction list item outgoing interface The transmission of third physical port is continued through for the data flow of 4.4.4.4, by first time load balancing, fast-turn construction list item is established and goes out to connect Mouth is the 4th physical port, and the data flow that next-hop is 5.5.5.5 continues through the transmission of the 4th physical port, loads divide for the second time It is the first physical port just for fast-turn construction list item outgoing interface to carry on a shoulder pole Hash and calculate also, and next-hop is the data flow of 2.2.2.2.Accordingly It is found that after the first physical port breaks down, the second physical port, third physical port and the 4th physical port will not only be sent The data flow for the distribution that first time load balancing Hash calculates, but also to send to calculate by second of load balancing Hash and divide The data flow matched.
Table 2
In another particular embodiment of the invention, the first physical port that the data flow is sent in the network equipment goes out Before sending sorted data flow according to determining physical port to the network equipment after existing failure, the method is also Including:
When the network equipment send the data flow the second physical port break down when, the network equipment according to Third critical field carries out third time load balancing Hash to the data flow sent by first physical port and calculates, will be by institute The data flow for stating the transmission of the second physical port is evenly distributed to other physical ports of the network equipment.
Table three
This is described by taking content shown in table 3 as an example below, after the failure of the first physical port, the second physics Port equally break down cannot continue transmitted traffic in the case of, the network equipment need to the second physical port failure it Preceding transmitted data flow carries out third time load balancing Hash and calculates, the data flow that will be sent before the second physical port failure The physical port of the data flow can normally be sent by being evenly distributed to other, as shown in table 3, be referred to the event of the second physical port Hinder the data flow sent before and is assigned to other third physical ports and the 4th physical port for capableing of normal transmitting data flow.This When, third physical port will not only be sent by calculating distributed data flow with second of load balancing Has for the first time, also be wanted Send the data flow that assigned third physical port is calculated by third time load balancing Hash.4th physical port is equally not The data flow by calculating assigned 4th physical port with second of load balancing Hash for the first time is only sent, also to be sent out The data flow that third time load balancing Hash calculates assigned 4th physical port is crossed in the warp let-off.
In another specific implementation mode, when first physical port restores to send the ability of the data flow, institute State the hair that first time load balancing Hash is calculated the sorted data flow according to the physical port after calculating by the network equipment It send.
For example, when the first physical port fault recovery, and when can continue to transmission data stream, then the network is set Standby only to carry out a load balancing Hash calculating to the data flow received, the network equipment carries out data stream negative for the first time Load shares calculating process and can refer to above-mentioned associated description content, and details are not described herein again.Accordingly it is found that the of the network equipment After one physical port restores the function of transmission data stream, it is only necessary to carry out a load balancing Hash to the data flow of reception and calculate Data flow is evenly distributed to the physical port of the network equipment, without network by the path that can be obtained data flow Equipment carries out load balancing Hash calculating to data stream for the second time.
S304:The physical port for transmission first sub-data flow that the network equipment is determined via the network equipment Send first sub-data flow, and the physical port of transmission second sub-data flow determined via the network equipment Send second sub-data flow.
In a specific embodiment, according to the path obtained in above-mentioned S303 that the first sub-data flow and second is sub Data flow is sent from corresponding physical port.For example, if the network equipment passes through four road equivalent route strategies Load balancing is carried out to data stream, then data flow is subjected to load balancing calculating according to the characteristic element fields of data flow, The transmitting path of the data flow is obtained, then sends the data flow from physical port corresponding with transmitting path. If the network equipment carries out load balancing by four road equivalent route strategies to data stream, when event occurs in the first physical port When barrier cannot continue transmission data stream, first time load balancing of the network equipment according to S301 calculates and second negative It carries sharing calculating as a result, obtaining the path of the transmission of data flow, and data flow is passed through into physics corresponding with path end Mouth is sent.
For example, the network equipment carries out the first Load Sharing Algorithm by four road equivalent route strategies to data stream It calculates, and determines the physical port of transmission data stream, wherein the data flow that the first physical port of the network equipment is sent is First sub-data flow, the data flow that other physical ports of the network equipment are sent is the second sub-data flow.If the net The first physical port failure of network equipment cannot continue transmission data stream, then need to sent by the first physical port the One sub-data flow carries out the second load balancing calculating, and the first sub-data flow is assigned to other physics ends of the network equipment Mouthful.Data flow is calculated by the first Load Sharing Algorithm determines the physical port for sending the second sub-data flow, and negative by second It carries Sharing Algorithm and determines the physical port for sending the first sub-data flow.The physical port that data flow determines according to the method described above carries out It sends.
In a specific embodiment, if the network equipment flows into data by four road equivalent route strategies Row load balancing, after the failure of the first physical port, when the second physical port also breaks down, the network equipment pair The third sub-data flow progress third load balancing calculating sent by the second physical port is determined according to the first load balancing, by the Three sub-data flows are assigned to the other physical ports for capableing of normal transmission data stream of the network equipment.The network equipment according to The physical port that first load balancing, the second load balancing and third load balancing determine sends the data flow.
During carrying out load balancing to data stream, the network equipment and the network described in purpose of transmission data stream Multiple and different links can be formed between equipment, if demand carries out TCP to the data flow of particular link accelerates business, it is necessary to Business is accelerated to this link establishment TCP that above-mentioned specific data stream is passed through.When the network equipment and mesh of transmission data stream The network equipment between a certain link break down and when cannot continue transmission data stream, transmission data stream it is described Great changes will take place if the link for carrying out data flow again data flow can be caused to send if load balancing calculates for the network equipment, It may result in those in this way and rely on the TCP that data flows are established and accelerate business that can not stablize and come into force.By above method step, work as hair When sending a physical port of the network equipment of data flow that cannot continue transmission data stream because of breaking down, to occurring Data flow transmitted by failed physical port re-starts load balancing calculating, without the data flow sent to other physical ports Load balancing calculating is carried out, the unstability of data flow transition generation can be thus reduced, keep its of the network equipment The data flow that its physical port is sent, increases the stability of data stream transmitting, can meet the needs of business transmission.
In a specific embodiment, the network equipment is determined according to the first Load Sharing Algorithm for sending number According to the physical port of stream, including:
The data flow is divided into M sub-data flow by the network equipment.M is the physical port of the first port set The positive integer times of N.
The network equipment determines the corresponding physical port of the M sub-data flow.The network equipment is according to described One Load Sharing Algorithm determines that the physical port for sending the data flow is the corresponding physics end of the M sub-data flow Mouthful.Each sub-data flow corresponds to a physical port in the first port set.Each of described first port set The quantity of the corresponding sub-data flow of physical port is M/N.
For example, four road routing policy transmission data stream of the network equipments configuration, this four roads routing policy correspond to institute State four physical ports of the network equipment.It is 12 to calculate and obtain 4 least common multiple, therefore the network equipment is closed according to first The data flow is equally divided into 12 parts by key field, this 12 parts of data streams are then evenly distributed to 4 of the network equipment Physical port, that is to say, that 3 parts of data flows are assigned in each physical port.If a physics end of the network equipment It, can be equal by 3 parts of data levellings of the physical port to break down when mouth cannot continue transmission data stream because breaking down The physical ports of other three normal works are assigned to, the data flow of non-working port is assigned to other can normally send in this way Physical port, do not interfere with the stability of other physical port data stream transmittings.
Fig. 4 is a kind of 400 structural schematic diagram of the network equipment that data stream load is shared provided by the embodiments of the present application.Fig. 4 Shown in equipment can be preceding method embodiment in the network equipment, may be implemented to realize the network equipment described above Function.The network equipment includes determination unit 401 and transmission unit 402.
Determination unit 401 is used for the physical port for transmission data stream according to the determination of the first Load Sharing Algorithm, according to The physical port that first Load Sharing Algorithm determines is that first port set determines physical port.Including the first physical port The first port set in multiple ports be the network equipment physical port.
Transmission unit 402 is used to be used to send the data flow via what is determined according to first Load Sharing Algorithm Physical port sends the data flow.
Determination unit 401 is additionally operable to send the data flow via the physical port determined according to the first Load Sharing Algorithm During, if first physical port breaks down, determined according to first Load Sharing Algorithm for sending The physical port of second sub-data flow, and the physics for sending the first sub-data flow is determined according to the second Load Sharing Algorithm Port.The physical port determined according to second Load Sharing Algorithm is the physical port in second port set.Described Two-port netwerk set does not include first physical port.Multiple ports that the second port set includes are the network equipments Physical port.First sub-data flow is to be determined to be sent out by first physical port according to first Load Sharing Algorithm The sub-data flow sent.Second sub-data flow is to be determined by the first port set according to first Load Sharing Algorithm In the sub-data flow that sends of other physical ports in addition to first physical port.First sub-data flow and described Two sub-data flows are the sub-data flows in the data flow.
Transmission unit 402 is additionally operable to send the data flow in the physical port determined according to the first Load Sharing Algorithm In the process, if first physical port breaks down, the result determined according to determination unit is by sending first subnumber First sub-data flow is sent according to the physical port of stream, and via the physics end of determining transmission second sub-data flow Mouth sends second sub-data flow.
In a specific embodiment, when the equipment further includes allocation unit.
The allocation unit 403 is used to the data flow being divided into M sub-data flow.M is the first port set The positive integer times of physical port N.
The determination unit 401 is additionally operable to determine the corresponding physical port of the M sub-data flow.It is negative according to described first It carries Sharing Algorithm and determines that the physical port for sending the data flow is the corresponding physical port of the M sub-data flow.Often A sub-data flow corresponds to a physical port in the first port set, each physics end in the first port set The quantity of the corresponding sub-data flow of mouth is M/N.
In a specific embodiment, the determination unit 401 is for will be in the data flow according to hash algorithm The field of message determines the cryptographic Hash of the hash algorithm as Hash keys.
The network equipment determines the physical port for sending the data flow according to the cryptographic Hash.The field packet Include source Internet protocol IP address, purpose IP address, source port number, destination slogan and protocol number.
In specific implementation mode, the specific implementation mode of the determination unit 401 and the transmission unit 402 can join The function and implementation steps for examining the network equipment described in Fig. 3 method Structure and Process schematic diagrams repeat no more for brief introduction.
Fig. 5 provides another data stream load for the embodiment of the present application and shares 500 structural schematic diagram of equipment.Shown in Fig. 5 Equipment can be first network equipment in preceding method embodiment in Fig. 1 and Fig. 2, can also be the network equipment in Fig. 3, The function of the network equipment may be implemented.The equipment includes processor 501 and transceiver 502 and connection processing device 501 With the various connecting lines 503 of transceiver 502, wherein processor 501 is connected with transceiver 502 by bus.
In a kind of possible embodiment, the equipment 500 further includes memory 504.Memory 504 is for storing journey Sequence instructs or program 505, and memory 504 may include that high-speed random access memory device 504 may include high random access Memory (RAM:Random Access Memory), it is also possible to further include non-labile memory (non-volatile Memory), a for example, at least magnetic disk storage, processor 501 can call the program instruction stored in memory 504 to execute Corresponding function.
In a kind of specific embodiment:
The processor 501 is used to determine the physical port for transmission data stream according to the first Load Sharing Algorithm.Root The physical port determined according to first Load Sharing Algorithm is that first port set determines physical port.Including the first physics end Multiple ports in the first port set of mouth are the physical ports of the network equipment.
The transceiver 502 is used to be used to send the data flow via what is determined according to first Load Sharing Algorithm Physical port send the data flow.
The processor 501 is additionally operable to send the data via the physical port determined according to the first Load Sharing Algorithm During stream, if first physical port breaks down, the network equipment is calculated according to first load balancing Method determines the physical port for sending the second sub-data flow, and is determined according to the second Load Sharing Algorithm for sending first The physical port of sub-data flow, the physical port determined according to second Load Sharing Algorithm are the objects in second port set Manage port.The second port set does not include first physical port, multiple ports that the second port set includes It is the physical port of the network equipment.First sub-data flow is to be determined by described according to first Load Sharing Algorithm The sub-data flow that first physical port is sent.Second sub-data flow for according to first Load Sharing Algorithm determine by institute State the sub-data flow that other physical ports in first port set in addition to first physical port are sent.First son Data flow and second sub-data flow are the sub-data flows in the data flow.
The transceiver 502 is additionally operable to the object for sending first sub-data flow determined via the network equipment It manages port and sends first sub-data flow, and be used to send second sub-data flow via what the network equipment determined Physical port send second sub-data flow.
In the specific implementation mode, the specific implementation of the transceiver and the processor can be with institute in reference chart 1 and Fig. 2 It states first network equipment and is repeated no more for brief introduction with the function and implementation steps of the network equipment described in Fig. 3.
In several embodiments provided herein, it should be understood that disclosed system and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the module, only Only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple module or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be the INDIRECT COUPLING or logical by some interfaces, device or unit Letter connection can be electrical, machinery or other forms.
The module illustrated as separating component may or may not be physically separated, aobvious as module The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each function module in each embodiment of the present invention can be integrated in a processing unit, it can also It is that modules physically exist alone, it can also be during two or more modules be integrated in one unit.Above-mentioned integrated mould The form that hardware had both may be used in block is realized, can also be realized in the form of hardware adds SFU software functional unit.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or its arbitrary combination real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer can be with Storage in a computer-readable storage medium, or from a computer readable storage medium to another computer-readable storage Medium transmits, for example, the computer instruction can be from a web-site, computer, server or data center by having Line (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as red line, Wireless microwave etc.) mode to another Web-site, computer, server or data center are transmitted.The computer readable storage medium can be computer capacity Any usable medium enough accessed is either deposited comprising data such as one or more usable mediums integrated server, data centers Store up equipment.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (such as DVD) or Semiconductor medium (such as solid state disk Solid State Disk (SSD)) etc..

Claims (6)

1. a kind of method that data stream load is shared, which is characterized in that the method includes:
The network equipment determines the physical port for transmission data stream according to the first Load Sharing Algorithm, is loaded according to described first The physical port that Sharing Algorithm determines is that first port set determines physical port, includes the first end of the first physical port Multiple ports in mouth set are the physical ports of the network equipment;
The network equipment is via the physics end for sending the data flow determined according to first Load Sharing Algorithm Mouth sends the data flow;
The process of the data flow is sent via the physical port determined according to the first Load Sharing Algorithm in the network equipment In, if first physical port breaks down, the network equipment is determined according to first Load Sharing Algorithm and is used It is determined in the physical port for sending the second sub-data flow, and according to the second Load Sharing Algorithm for sending the first sub-data flow Physical port, the physical port determined according to second Load Sharing Algorithm is physical port in second port set, The second port set does not include first physical port, and multiple ports that the second port set includes are the nets The physical port of network equipment, first sub-data flow are to be determined by first physics according to first Load Sharing Algorithm The sub-data flow that port is sent, second sub-data flow are to be determined by the first end according to first Load Sharing Algorithm The sub-data flow that other physical ports in addition to first physical port are sent in mouthful set, first sub-data flow and Second sub-data flow is the sub-data flow in the data flow;
The network equipment is sent via the physical port for sending first sub-data flow that the network equipment determines First sub-data flow, and the physical port for sending second sub-data flow determined via the network equipment Send second sub-data flow.
2. according to the method described in claim 1, it is characterized in that, the network equipment is determined according to the first Load Sharing Algorithm For the physical port of transmission data stream, including:
The data flow is divided into M sub-data flow by the network equipment, and M is the physical port N's of the first port set Positive integer times;
The network equipment determines that the corresponding physical port of the M sub-data flow, the network equipment are negative according to described first It carries Sharing Algorithm and determines that the physical port for sending the data flow is the corresponding physical port of the M sub-data flow, often A sub-data flow corresponds to a physical port in the first port set, each physics end in the first port set The quantity of the corresponding sub-data flow of mouth is M/N.
3. method according to claim 1 or 2, which is characterized in that the network equipment is according to the first Load Sharing Algorithm Determine the physical port for transmission data stream, including:
The network equipment, using the field of the message in the data flow as Hash keys, determines the Hash according to hash algorithm The cryptographic Hash of algorithm;
The network equipment determines the physical port for sending the data flow according to the cryptographic Hash, and the field includes source Internet protocol IP address, purpose IP address, source port number, destination slogan and protocol number.
4. a kind of network equipment, which is characterized in that the network equipment includes:
Determination unit, for determining the physical port for transmission data stream according to the first Load Sharing Algorithm, according to described the The physical port that one Load Sharing Algorithm determines is that first port set determines physical port, including described in the first physical port Multiple ports in first port set are the physical ports of the network equipment;
Transmission unit, for via the physics end for sending the data flow determined according to first Load Sharing Algorithm Mouth sends the data flow;
The determination unit is additionally operable to send the data flow via the physical port determined according to the first Load Sharing Algorithm In the process, it if first physical port breaks down, is determined according to first Load Sharing Algorithm for sending the The physical port of two sub-data flows, and the physics end for sending the first sub-data flow is determined according to the second Load Sharing Algorithm Mouthful, the physical port determined according to second Load Sharing Algorithm is physical port in second port set, described second Port set does not include first physical port, and multiple ports that the second port set includes are the network equipments Physical port, first sub-data flow are to be determined to be sent by first physical port according to first Load Sharing Algorithm Sub-data flow, second sub-data flow be according to first Load Sharing Algorithm determine by the first port set The sub-data flow that other physical ports in addition to first physical port are sent, first sub-data flow and described second Sub-data flow is the sub-data flow in the data flow;
The transmission unit is additionally operable to send the mistake of the data flow in the physical port determined according to the first Load Sharing Algorithm Cheng Zhong, if first physical port breaks down, the result determined according to determination unit is by sending first subdata The physical port of stream sends first sub-data flow, and via the physical port of determining transmission second sub-data flow Send second sub-data flow.
5. equipment according to claim 4, which is characterized in that the equipment also packet allocation unit, wherein
The allocation unit, for the data flow to be divided into M sub-data flow, M is the physics end of the first port set The positive integer times of mouth N;
The determination unit is additionally operable to determine the corresponding physical port of the M sub-data flow, according to first load balancing Algorithm determines that the physical port for sending the data flow is the corresponding physical port of the M sub-data flow, each subnumber According to a physical port in the corresponding first port set of stream, each physical port in the first port set corresponds to Sub-data flow quantity be M/N.
6. equipment according to claim 4 or 5, which is characterized in that
The determination unit, for, using the field of the message in the data flow as Hash keys, determining institute according to hash algorithm The cryptographic Hash of hash algorithm is stated, and the physical port for sending the data flow, the field are determined according to the cryptographic Hash Including source Internet protocol IP address, purpose IP address, source port number, destination slogan and protocol number.
CN201710114911.0A 2017-02-28 2017-02-28 A kind of method and apparatus that data stream load is shared Withdrawn CN108512771A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710114911.0A CN108512771A (en) 2017-02-28 2017-02-28 A kind of method and apparatus that data stream load is shared

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710114911.0A CN108512771A (en) 2017-02-28 2017-02-28 A kind of method and apparatus that data stream load is shared

Publications (1)

Publication Number Publication Date
CN108512771A true CN108512771A (en) 2018-09-07

Family

ID=63373303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710114911.0A Withdrawn CN108512771A (en) 2017-02-28 2017-02-28 A kind of method and apparatus that data stream load is shared

Country Status (1)

Country Link
CN (1) CN108512771A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109714259A (en) * 2018-12-27 2019-05-03 新华三技术有限公司 A kind of flow processing method and device
CN111416776A (en) * 2019-01-07 2020-07-14 华为技术有限公司 Method and network device for transmitting data

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109714259A (en) * 2018-12-27 2019-05-03 新华三技术有限公司 A kind of flow processing method and device
CN109714259B (en) * 2018-12-27 2021-04-27 新华三技术有限公司 Traffic processing method and device
CN111416776A (en) * 2019-01-07 2020-07-14 华为技术有限公司 Method and network device for transmitting data
US12015560B2 (en) 2019-01-07 2024-06-18 Huawei Technologies Co., Ltd. Data transmission method and network device

Similar Documents

Publication Publication Date Title
US11012353B2 (en) Using in-band operations data to signal packet processing departures in a network
US11949599B2 (en) Method and system of implementing conversation-sensitive collection for a link aggregation group
US10270686B2 (en) Method and system of updating conversation allocation in link aggregation
US8705551B2 (en) Method and system for management of flood traffic over multiple 0:N link aggregation groups
US8611232B2 (en) Method of simple and efficient failure resilient load balancing
US20150043348A1 (en) Traffic Flow Redirection between Border Routers using Routing Encapsulation
US8462636B2 (en) Systems and methods for communication of management traffic over link aggregation group interface for a network element with distributed architecture
CN107580769A (en) Method and apparatus for the load balancing in the network switch
CN105706393A (en) Method and system of supporting operator commands in link aggregation group
CN112868205B (en) Operation processing of multiprotocol packets
US11228524B1 (en) Methods and apparatus for efficient use of link aggregation groups
US20160014032A1 (en) Method and Device for Flow Path Negotiation in Link Aggregation Group
Mohan et al. Fault tolerance in TCAM-limited software defined networks
KR102455886B1 (en) Service Feature Chaining Congestion Feedback
CN116112426A (en) Intelligent network card assembly, physical machine, cloud service system and message sending method
US11706193B2 (en) Intelligent flow state synchronization to improve resiliency, availability, and/or performance of redundant network security devices
CN108512771A (en) A kind of method and apparatus that data stream load is shared
CN109861912B (en) Optimizing fabric path forwarding for virtual nodes within an electronic device
US9246820B1 (en) Methods and apparatus for implementing multiple loopback links
CN115842876A (en) Method, system, device and storage medium for processing message
RU2678470C1 (en) Data blocks in the switched network multi-routing method
CN108092866B (en) Method, equipment and system for switching tunnel
Iqbal et al. VRPR: A New Data Center Protocol for Enhanced Network Performance, Resilience and Recovery

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20180907