CN106130920A - A kind of message forwarding method and device - Google Patents

A kind of message forwarding method and device Download PDF

Info

Publication number
CN106130920A
CN106130920A CN201610556291.1A CN201610556291A CN106130920A CN 106130920 A CN106130920 A CN 106130920A CN 201610556291 A CN201610556291 A CN 201610556291A CN 106130920 A CN106130920 A CN 106130920A
Authority
CN
China
Prior art keywords
forwarded
gateway
message
routing gateway
routing
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.)
Pending
Application number
CN201610556291.1A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610556291.1A priority Critical patent/CN106130920A/en
Publication of CN106130920A publication Critical patent/CN106130920A/en
Pending 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
    • 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

Landscapes

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

Abstract

The embodiment of the invention discloses a kind of message forwarding method, including: obtain the characteristic attribute of message to be forwarded and forward the route bar number of described message to be forwarded, described characteristic attribute to include at least one in source address, destination address, protocol number, source port number and destination slogan;Characteristic attribute according to described message to be forwarded and the route bar number of the described message to be forwarded of described forwarding, calculate gateway key value;From the routing gateway of available described route bar number, select the routing gateway corresponding with described gateway key value, and use the described routing gateway of selection that described message to be forwarded is forwarded.The embodiment of the invention also discloses a kind of apparatus for forwarding message.Use the embodiment of the present invention, improve the flow load balance that message forwards, improve the handling capacity of network.

Description

A kind of message forwarding method and device
Technical field
The present invention relates to electronic technology field, particularly relate to a kind of message forwarding method and device.
Background technology
The overlay network of many tenants exists a large amount of with the communication of underlay network, all rely on overlay and Routing gateway between underlay, when processing state service, routing gateway needs to dispose main equipment and from equipment, to improve Reliability, when needs expanding treatment ability, needs to increase routing gateway, to improve autgmentability.In the prior art scheme, road Can be connected with the multiple routing gateways in down hop cluster by device, but, for going to the same target route (network address The most identical with mask) message, same routing gateway in down hop cluster can only be forwarded the packet to, other routing gateway is in Status of Backups or disarmed state, and do not support dilatation and disaster tolerance, cause flow load unbalanced and network throughput is low.
Summary of the invention
The embodiment of the present invention provides a kind of message forwarding method and device.Flow load in prior art can be solved The problem that unbalanced and network throughput is low.
Embodiments provide a kind of message forwarding method, including:
Obtain the characteristic attribute of message to be forwarded and forward the route bar number of described message to be forwarded, described characteristic attribute Including at least one in source address, destination address, protocol number, source port number and destination slogan;
Characteristic attribute according to described message to be forwarded and the route bar number of the described message to be forwarded of described forwarding, calculate Gateway key value;
The routing gateway corresponding with described gateway key value is selected from the routing gateway of available described route bar number, and Use the described routing gateway selected that described message to be forwarded is forwarded.
Wherein, the described characteristic attribute according to described message to be forwarded and the route of the described message to be forwarded of described forwarding Bar number, calculates gateway key value and includes:
According to the characteristic attribute of described message to be forwarded, calculate the cryptographic Hash of described message to be forwarded;
Cryptographic Hash according to described message to be forwarded and the route bar number of the described message to be forwarded of described forwarding, calculate institute State gateway key value.
Wherein, the described cryptographic Hash according to described message to be forwarded and the route bar of the described message to be forwarded of described forwarding Number, calculates described gateway key value and includes:
By the cryptographic Hash of described message to be forwarded divided by described route bar number remainder number, and using described remainder as described net Close key value.
Wherein, the described routing gateway of described selection includes that N bar routing gateway, described message to be forwarded include multiple data Bag, described N is the positive integer more than or equal to 1;
The described described routing gateway using selection carries out forwarding to described message to be forwarded and includes:
Obtain the weighted value of every routing gateway in described N bar routing gateway;
According to the weighted value of every routing gateway in described N bar routing gateway, by the plurality of allocation of packets to described N Bar routing gateway forwards.
Wherein, the described routing gateway of described selection includes that N bar routing gateway, described message to be forwarded include multiple data Bag, described N is the positive integer more than or equal to 1;
The described described routing gateway using selection carries out forwarding to described message to be forwarded and includes:
Record forwards the target in the described N bar routing gateway that first packet in the plurality of packet is used Routing gateway;
Other packets in the plurality of packet are fully allocated to described target routing gateway forward.
Correspondingly, embodiments provide a kind of apparatus for forwarding message, including:
Data obtaining module, for obtaining the characteristic attribute of message to be forwarded and forwarding the route of described message to be forwarded Bar number, described characteristic attribute includes at least in source address, destination address, protocol number, source port number and destination slogan Kind;
Information computational module, for the characteristic attribute according to described message to be forwarded and the described report to be forwarded of described forwarding The route bar number of literary composition, calculates gateway key value;
Packet forwarding module, for selecting and described gateway key value from the routing gateway of available described route bar number Corresponding routing gateway, and use the described routing gateway of selection that described message to be forwarded is forwarded.
Wherein, described information computational module includes:
Cryptographic Hash computing unit, for the characteristic attribute according to described message to be forwarded, calculates described message to be forwarded Cryptographic Hash;
Key value computing unit, for the cryptographic Hash according to described message to be forwarded and the described report to be forwarded of described forwarding The route bar number of literary composition, calculates described gateway key value.
Wherein, described key value computing unit specifically for:
By the cryptographic Hash of described message to be forwarded divided by described route bar number remainder number, and using described remainder as described net Close key value.
Wherein, the described routing gateway of described selection includes that N bar routing gateway, described message to be forwarded include multiple data Bag, described N is the positive integer more than or equal to 1;
Described packet forwarding module, is additionally operable to obtain the weighted value of every routing gateway in described N bar routing gateway;According to The weighted value of every routing gateway in described N bar routing gateway, puts into the plurality of allocation of packets to described N bar routing network Row forwards.
Wherein, the described routing gateway of described selection includes that N bar routing gateway, described message to be forwarded include multiple data Bag, described N is the positive integer more than or equal to 1;
Described packet forwarding module, is additionally operable to record and forwards first packet in the plurality of packet to be used Target routing gateway in described N bar routing gateway;Other packets in the plurality of packet are fully allocated to described Target routing gateway forwards.
Correspondingly, embodiments providing a kind of apparatus for forwarding message, described device includes interface circuit, memorizer And processor, wherein, memorizer stores batch processing code, and processor is for calling the program generation of storage in memorizer Code, is used for performing following operation:
Obtain the characteristic attribute of message to be forwarded and forward the route bar number of described message to be forwarded, described characteristic attribute Including at least one in source address, destination address, protocol number, source port number and destination slogan;
Characteristic attribute according to described message to be forwarded and the route bar number of the described message to be forwarded of described forwarding, calculate Gateway key value;
The routing gateway corresponding with described gateway key value is selected from the routing gateway of available described route bar number, and Use the described routing gateway selected that described message to be forwarded is forwarded.
Implement the embodiment of the present invention, first obtain the characteristic attribute of message to be forwarded and forward the route of message to be forwarded Bar number;Then according to the characteristic attribute of message to be forwarded and the route bar number that forwards message to be forwarded, gateway key value is calculated; Finally from the routing gateway of available route bar number, select the routing gateway corresponding with gateway key value, and use the road of selection Treated to E-Packet by gateway and forward, owing to the characteristic attribute of each message to be forwarded is different, and then can be calculated Different gateway key values, and select different routing gateways, by the multiple routes in flow load balance to down hop cluster Gateway, each routing gateway undertakes the process of a part of flow, thus realizes flow equalization load, improves the handling capacity of network.
Accompanying drawing explanation
In order to be illustrated more clearly that the technical scheme of the embodiment of the present invention, required use in embodiment being described below Accompanying drawing be briefly described, it should be apparent that, below describe in accompanying drawing be some embodiments of the present invention, for this area From the point of view of those of ordinary skill, on the premise of not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is what the embodiment of the present invention provided the configuration diagram at a kind of VPC networking;
Fig. 2 is the flow chart of a kind of message forwarding method that first embodiment of the invention provides;
Fig. 3 is what the embodiment of the present invention provided the configuration diagram at another kind of VPC networking;
Fig. 4 is the flow chart of a kind of message forwarding method that second embodiment of the invention provides;
Fig. 5 is the structural representation of a kind of apparatus for forwarding message that the embodiment of the present invention provides;
Fig. 6 is the structural representation of information computational module in the device that the embodiment of the present invention provides;
Fig. 7 is the configuration diagram of the another kind of apparatus for forwarding message that the embodiment of the present invention provides.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Describe, it is clear that described embodiment is a part of embodiment of the present invention rather than whole embodiments wholely.Based on this Embodiment in bright, the every other enforcement that those of ordinary skill in the art are obtained under not making creative work premise Example, broadly falls into the scope of protection of the invention.
As it is shown in figure 1, Fig. 1 is a kind of VPC (Virtual Private Cloud, the virtual private that inventive embodiments provides Cloud) configuration diagram of network, this system includes control equipment Controller, proxy module Agent, virtual machine VM, route Device and down hop cluster (include gateway A, gateway B ..., gateway N etc.), control equipment Controller and be responsible for route Switching, distribute, manage and adjustment etc., proxy module Agent is responsible for receiving the routing iinformation that Controller issues, and root Forward the packet to processing module according to routing iinformation and carry out the whole network deployment.Such as, main frame Host can receive what source device sent Message, controls equipment Controller and selects a gateway from down hop cluster according to routing iinformation, and by the net selected Close the purpose equipment that is forwarded to by this message, thus realize the purpose that message forwards.Based on this VPC network, the embodiment of the present invention carries Having gone out a kind of message forwarding method, comprising the following steps that of the embodiment of the present invention is shown.
Refer to the flow chart that Fig. 2, Fig. 2 are a kind of message forwarding methods that first embodiment of the invention provides.The present invention The main body of embodiment can be with the controller Controller in VPC network, and the embodiment of the present invention provides a kind of ECMP (Equal Cost Multi path Routing, equal cost multipath) method for routing, as it can be seen, the method bag in the embodiment of the present invention Include:
S101, obtains the characteristic attribute of message to be forwarded and forwards the route bar number of described message to be forwarded, described spy Levy attribute and include at least one in source address, destination address, protocol number, source port number and destination slogan.
In implementing, as it is shown in figure 1, main frame Host receives the message of the transmission of source device, this message carries active setting Standby source address and source port number, the destination address of purpose equipment and destination slogan and use the association of agreement (such as TCP, UDP) View number, can choose the characteristic attribute of message to be forwarded, such as: characteristic attribute can include five yuan according to different application scenarios Group (source address, source port number, destination address, destination slogan, protocol number), tlv triple (source address, destination address, agreement Number), tuple (source address) etc., and it is possible to the route bar number of the routing gateway in statistics down hop cluster, such as Fig. 1 institute Show, gateway A, route B can be added up ..., the route bar number of whole gateways of route N.
S102, according to characteristic attribute and the route bar of the described message to be forwarded of described forwarding of described message to be forwarded Number, calculates gateway key value.
In implementing, the Hash of described message to be forwarded can be calculated according to the characteristic attribute of described message to be forwarded Value;Cryptographic Hash according to described message to be forwarded and the route bar number of the described message to be forwarded of described forwarding, calculate described net Close key value.Further, can be by the cryptographic Hash of described message to be forwarded divided by described route bar number remainder number, and by described Remainder is as described gateway key value.Wherein, cryptographic Hash is the numerical value of a regular length according to characteristic attribute output, Hash Value can include informative abstract MD2 value, informative abstract MD4 value or informative abstract MD5 value etc..
It should be noted that owing to message to be forwarded from different source devices or mails to different address device, institute With the most different according to the calculated cryptographic Hash of characteristic attribute, so by cryptographic Hash divided by route bar number can obtain different more than Number, thus finally give different gateway key values.
S103, selects the routing network corresponding with described gateway key value from the routing gateway of available described route bar number Close, and use the described routing gateway of selection that described message to be forwarded is forwarded.Wherein, the described routing gateway bag of selection Including N bar routing gateway, described message to be forwarded includes that multiple packet, described N are the positive integer more than or equal to 1.
In implementing, main frame Host can select and described gateway key value according to the route mapping table pre-build Corresponding routing gateway, wherein, route mapping table includes the corresponding relation routeing key value with gateway identification, is being calculated net After closing key value, can search from route mapping table and identify with calculated gateway key value corresponding gateway, then select The routing gateway that the gateway identification that finds is corresponding, and use the described routing gateway of selection to carry out described message to be forwarded turning Send out.
Such as, VPC network includes 5 routing gateways, including gateway A, gateway B, gateway C, gateway D and gateway E, route Mapping table can include 1 corresponding gateway A, 2 corresponding gateway B, 3 corresponding gateway C, 4 corresponding gateway D, 0 corresponding gateway E, if calculated The cryptographic Hash obtained is 6, and just cryptographic Hash 6 obtains remainder divided by route bar number 5 is 1, then gateway A can be selected report to be forwarded Literary composition forwards, if calculated cryptographic Hash is 5, divided by route bar number 5, cryptographic Hash 5 is obtained remainder is 0, then select net Pass E treats to E-Packet and forwards.
Optionally, after being calculated gateway key value, can search and calculated gateway from route mapping table Key value corresponding gateway identifies, and then selects routing gateway that the gateway identification that finds is corresponding and neighbouring with this routing gateway A plurality of routing gateway, finally use this routing gateway found and neighbouring a plurality of routing gateway jointly forward described in treat E-Packet.
Further alternative, after selecting N number of routing gateway, the forwarded in the plurality of packet can be recorded Target routing gateway in the described N bar routing gateway that one packet is used;By other numbers in the plurality of packet It is fully allocated to described target routing gateway according to bag forward, thus can be by the institute of same session when processing state service Flow is had to be fully allocated to same routing gateway.
It should be noted that owing to different cryptographic Hash, report to be forwarded can be calculated according to different characteristic attributes The number of literary composition is the most, the number being calculated various remainder tends to identical, and then each routing gateway is chosen to E-Packet Number of times also tends to identical, therefore can be by the routing gateway in flow load balance to multiple down hop clusters, each routing network Close the process undertaking a part of flow.
The embodiment of the present invention can also increase routing gateway on the basis of down hop cluster.Such as, as it is shown on figure 3, Down hop cluster increases routing gateway X and routing gateway Y, therefore forwards the route bar number of described message to be forwarded to increase by 2, as The most calculated gateway key value is corresponding with route Y, then routing gateway Y can be selected to treat to E-Packet and forward, from And do not only reached the purpose of dilatation, and routing gateway A, routing gateway B can be reduced ..., the load of routing gateway N.
In embodiments of the present invention, first obtain the characteristic attribute of message to be forwarded and forward the route of message to be forwarded Bar number;Then according to the characteristic attribute of message to be forwarded and the route bar number that forwards message to be forwarded, gateway key value is calculated; Finally from the routing gateway of available route bar number, select the routing gateway corresponding with gateway key value, and use the road of selection Treated to E-Packet by gateway and forward, owing to the characteristic attribute of each message to be forwarded is different, and then can be calculated Different gateway key values, and select different routing gateways, by the route in flow load balance to multiple down hop clusters Gateway, each routing gateway undertakes the process of a part of flow, thus realizes flow equalization load, improves the handling capacity of network.
Refer to the flow chart that Fig. 4, Fig. 4 are a kind of message forwarding methods that second embodiment of the invention provides.The present invention The main body of embodiment can be with the controller Controller in VPC network, and the embodiment of the present invention provides a kind of ECMP (Equal Cost Multi path Routing, equal cost multipath) method for routing.As it can be seen, the method bag in the embodiment of the present invention Include:
S401, obtains the characteristic attribute of message to be forwarded and forwards the route bar number of described message to be forwarded, described spy Levy attribute and include at least one in source address, destination address, protocol number, source port number and destination slogan.
In implementing, as it is shown in figure 1, main frame Host receives the message of the transmission of source device, this message carries active setting Standby source address and source port number, the destination address of purpose equipment and destination slogan and use the association of agreement (such as TCP, UDP) View number, can choose the characteristic attribute of message to be forwarded, such as: characteristic attribute can include five yuan according to different application scenarios Group (source address, source port number, destination address, destination slogan, protocol number), tlv triple (source address, destination address, agreement Number), tuple (source address) etc..And it is possible to the route bar number of the routing gateway in statistics down hop cluster, such as Fig. 1 institute Show, gateway A, route B can be added up ..., the route bar number of whole gateways of route N.
S402, according to characteristic attribute and the route bar of the described message to be forwarded of described forwarding of described message to be forwarded Number, calculates gateway key value.
In implementing, the Hash of described message to be forwarded can be calculated according to the characteristic attribute of described message to be forwarded Value;Cryptographic Hash according to described message to be forwarded and the route bar number of the described message to be forwarded of described forwarding, calculate described net Close key value.Further, can be by the cryptographic Hash of described message to be forwarded divided by described route bar number remainder number, and by described Remainder is as described gateway key value.Wherein, cryptographic Hash is the numerical value of a regular length according to characteristic attribute output, Hash Value can include informative abstract MD2 value, informative abstract MD4 value or informative abstract MD5 value etc..
It should be noted that owing to message to be forwarded from different source devices or mails to different address device, institute With the most different according to the calculated cryptographic Hash of characteristic attribute, so by cryptographic Hash divided by route bar number can obtain different more than Number, thus finally give different gateway key values.
S403, selects the routing network corresponding with described gateway key value from the routing gateway of available described route bar number Close.Wherein, the described routing gateway of selection includes that N bar routing gateway, described message to be forwarded include multiple packet, and N is big In the positive integer equal to 1.
In implementing, main frame Host can select and described gateway key value according to the route mapping table pre-build Corresponding routing gateway, wherein, route mapping table includes the corresponding relation routeing key value with gateway identification, is being calculated net After closing key value, can search from route mapping table and identify with calculated gateway key value corresponding gateway, then select The routing gateway that the gateway identification that finds is corresponding, and use the described routing gateway of selection to carry out described message to be forwarded turning Send out.
Such as, VPC network includes 5 routing gateways, including gateway A, gateway B, gateway C, gateway D and gateway E, route Mapping table can include 1 corresponding gateway A, 2 corresponding gateway B, 3 corresponding gateway C, 4 corresponding gateway D, 0 corresponding gateway E, if calculated The cryptographic Hash obtained is 6, and just cryptographic Hash 6 obtains remainder divided by route bar number 5 is 1, then gateway A can be selected report to be forwarded Literary composition forwards, if calculated cryptographic Hash is 5, divided by route bar number 5, cryptographic Hash 5 is obtained remainder is 0, then select net Pass E treats to E-Packet and forwards.
Optionally, after being calculated gateway key value, can search and calculated gateway from route mapping table Key value corresponding gateway identifies, and then selects routing gateway that the gateway identification that finds is corresponding and neighbouring with this routing gateway A plurality of routing gateway, finally use this routing gateway found and neighbouring a plurality of routing gateway jointly forward described in treat E-Packet.
It should be noted that owing to different cryptographic Hash, report to be forwarded can be calculated according to different characteristic attributes The number of literary composition is the most, the number being calculated various remainder tends to identical, and then each routing gateway is chosen to E-Packet Number of times also tends to identical, therefore can be by the routing gateway in flow load balance to multiple down hop clusters, each routing network Close the process undertaking a part of flow.
S404, obtains the weighted value of every routing gateway in described N bar routing gateway.
In implementing, previously according to the bearing capacity of routing gateway each in down hop cluster, next can be collected The weighted value of each routing gateway in Qun configures, and then obtains the weighted value of every the routing gateway being pre-configured with.
S405, according to the weighted value of every routing gateway in described N bar routing gateway, arrives the plurality of allocation of packets Described N bar routing gateway forwards.
In implementing, described N bar can be calculated according to the weighted value of every routing gateway in described N bar routing gateway Weight ratio between every routing gateway in routing gateway, then according to this weight ratio, distribution carries multiple packets Quantity, therefore, the packet that the routing gateway carrying that weighted value is big forwards is the most, the number that the routing gateway carrying that weight is little forwards The fewest according to bag.
It should be noted that can divide in message repeating process in the associated host of all these method for routing of use Cloth performs the method for above-mentioned flow equalization load, so that the whole route system overall situation reaches the effect of load balancing.
It should be noted that owing to different cryptographic Hash, report to be forwarded can be calculated according to different characteristic attributes The number of literary composition is the most, the number being calculated various remainder tends to identical, and then each routing gateway is chosen to E-Packet Number of times also tends to identical, therefore can be by the routing gateway in flow load balance to multiple down hop clusters, each routing network Close the process undertaking a part of flow.
In embodiments of the present invention, first obtain the characteristic attribute of message to be forwarded and forward the route of message to be forwarded Bar number;Then according to the characteristic attribute of message to be forwarded and the route bar number that forwards message to be forwarded, gateway key value is calculated; Finally from the routing gateway of available route bar number, select the routing gateway corresponding with gateway key value, and use the road of selection Treated to E-Packet by gateway and forward, owing to the characteristic attribute of each message to be forwarded is different, and then can be calculated Different gateway key values, and select different routing gateways, by the route in flow load balance to multiple down hop clusters Gateway, each routing gateway undertakes the process of a part of flow, thus realizes flow equalization load, improves the handling capacity of network.
Refer to the structural representation that Fig. 5, Fig. 5 are a kind of apparatus for forwarding message that the embodiment of the present invention provides.As schemed Showing, the device in the embodiment of the present invention includes:
Data obtaining module 501, for obtaining the characteristic attribute of message to be forwarded and forwarding described message to be forwarded Route bar number, described characteristic attribute includes in source address, destination address, protocol number, source port number and destination slogan extremely Few one.
In implementing, as it is shown in figure 1, main frame Host receives the message of the transmission of source device, this message carries active setting Standby source address and source port number, the destination address of purpose equipment and destination slogan and use the association of agreement (such as TCP, UDP) View number, can choose the characteristic attribute of message to be forwarded, such as: characteristic attribute can include five yuan according to different application scenarios Group (source address, source port number, destination address, destination slogan, protocol number), tlv triple (source address, destination address, agreement Number), tuple (source address) etc..And it is possible to the route bar number of the routing gateway in statistics down hop cluster, such as Fig. 1 institute Show, gateway A, route B can be added up ..., the route bar number of whole gateways of route N.
Information computational module 502, for waiting to turn described in the characteristic attribute according to described message to be forwarded and described forwarding Transmit messages literary composition route bar number, calculate gateway key value.
In implementing, as shown in Figure 6, information computational module 502 may further include:
Cryptographic Hash computing unit 601, for the characteristic attribute according to described message to be forwarded, calculates described message to be forwarded Cryptographic Hash.
Key value computing unit 602, for waiting to turn described in the cryptographic Hash according to described message to be forwarded and described forwarding Transmit messages literary composition route bar number, calculate described gateway key value.
In implementing, can be by the cryptographic Hash of described message to be forwarded divided by described route bar number remainder number, and by institute State remainder as described gateway key value.Wherein, cryptographic Hash is the numerical value of a regular length according to characteristic attribute output, breathes out Uncommon value can include informative abstract MD2 value, informative abstract MD4 value or informative abstract MD5 value etc..
It should be noted that owing to message to be forwarded from different source devices or mails to different address device, institute With the most different according to the calculated cryptographic Hash of characteristic attribute, so by cryptographic Hash divided by route bar number can obtain different more than Number, thus finally give different gateway key values.
Packet forwarding module 503, for selecting and described gateway pass from the routing gateway of available described route bar number The routing gateway that key-value pair is answered, and use the described routing gateway of selection that described message to be forwarded is forwarded.
In implementing, main frame Host can select and described gateway key value according to the route mapping table pre-build Corresponding routing gateway, wherein, route mapping table includes the corresponding relation routeing key value with gateway identification, is being calculated net After closing key value, can search from route mapping table and identify with calculated gateway key value corresponding gateway, then select The routing gateway that the gateway identification that finds is corresponding, and use the described routing gateway of selection to carry out described message to be forwarded turning Send out.
Such as, VPC network includes 5 routing gateways, including gateway A, gateway B, gateway C, gateway D and gateway E, route Mapping table can include 1 corresponding gateway A, 2 corresponding gateway B, 3 corresponding gateway C, 4 corresponding gateway D, 0 corresponding gateway E, if calculated The cryptographic Hash obtained is 6, and just cryptographic Hash 6 obtains remainder divided by route bar number 5 is 1, then gateway A can be selected report to be forwarded Literary composition forwards, if calculated cryptographic Hash is 5, divided by route bar number 5, cryptographic Hash 5 is obtained remainder is 0, then select net Pass E treats to E-Packet and forwards.
Optionally, after being calculated gateway key value, can search and calculated gateway from route mapping table Key value corresponding gateway identifies, and then selects routing gateway that the gateway identification that finds is corresponding and neighbouring with this routing gateway A plurality of routing gateway, finally use this routing gateway found and neighbouring a plurality of routing gateway jointly forward described in treat E-Packet.
Further alternative, after selecting N number of routing gateway, the forwarded in the plurality of packet can be recorded Target routing gateway in the described N bar routing gateway that one packet is used;By other numbers in the plurality of packet It is fully allocated to described target routing gateway according to bag forward, thus can be by the institute of same session when processing state service Flow is had to be fully allocated to same routing gateway.
Optionally, the weighted value of every routing gateway in described N bar routing gateway can be obtained, route according to described N bar The weighted value of every routing gateway in gateway, forwards the plurality of allocation of packets to described N bar routing gateway.
In implementing, previously according to the bearing capacity of routing gateway each in down hop cluster, next can be collected The weighted value of each routing gateway in Qun configures, and then obtains the weighted value of every the routing gateway being pre-configured with, so Afterwards according to the weighted value of every routing gateway in described N bar routing gateway, calculate every routing gateway in described N bar routing gateway Between weight ratio, then according to this weight ratio, distribution carry multiple packets quantity, therefore, the road that weighted value is big The packet forwarded by gateway carrying is the most, and the packet that the routing gateway carrying that weight is little forwards is the fewest.
It should be noted that owing to different cryptographic Hash, report to be forwarded can be calculated according to different characteristic attributes The number of literary composition is the most, the number being calculated various remainder tends to identical, and then each routing gateway is chosen to E-Packet Number of times also tends to identical, therefore can be by the routing gateway in flow load balance to multiple down hop clusters, each routing network Close the process undertaking a part of flow.
In embodiments of the present invention, first obtain the characteristic attribute of message to be forwarded and forward the route of message to be forwarded Bar number;Then according to the characteristic attribute of message to be forwarded and the route bar number that forwards message to be forwarded, gateway key value is calculated; Finally from the routing gateway of available route bar number, select the routing gateway corresponding with gateway key value, and use the road of selection Treated to E-Packet by gateway and forward, owing to the characteristic attribute of each message to be forwarded is different, and then can be calculated Different gateway key values, and select different routing gateways, by the route in flow load balance to multiple down hop clusters Gateway, each routing gateway undertakes the process of a part of flow, thus realizes flow equalization load, improves the handling capacity of network.
Refer to the configuration diagram that Fig. 7, Fig. 7 are a kind of apparatus for forwarding message that the embodiment of the present invention provides.As schemed Showing, this device may include that at least one processor 701, such as CPU, at least one interface circuit 702, at least one storage Device 703, at least one bus 704.Wherein, communication bus 704 is for realizing the connection communication between these assemblies.Wherein, originally Interface circuit 702 in inventive embodiments can be wired transmission port, it is also possible to for wireless device, such as, include that it is traditional thread binding Put, for carrying out the communication of signaling or data with other node devices.Memorizer 703 can be high-speed RAM memorizer, it is also possible to It is non-labile memorizer (non-volatile memory), for example, at least one disk memory.Memorizer 703 is optional Can also is that at least one is located remotely from the storage device of aforementioned processor 701.Memorizer 703 stores batch processing generation Code, and processor 701 is for calling the program code of storage in memorizer, is used for performing following operation:
Obtain the characteristic attribute of message to be forwarded and forward the route bar number of described message to be forwarded, described characteristic attribute Including at least one in source address, destination address, protocol number, source port number and destination slogan;
Characteristic attribute according to described message to be forwarded and the route bar number of the described message to be forwarded of described forwarding, calculate Gateway key value;
The routing gateway corresponding with described gateway key value is selected from the routing gateway of available described route bar number, and Use the described routing gateway selected that described message to be forwarded is forwarded.
Wherein, processor 701 is used for performing following operating procedure:
According to the characteristic attribute of described message to be forwarded, calculate the cryptographic Hash of described message to be forwarded;
Cryptographic Hash according to described message to be forwarded and the route bar number of the described message to be forwarded of described forwarding, calculate institute State gateway key value.
Wherein, processor 701 is used for performing following operating procedure:
By the cryptographic Hash of described message to be forwarded divided by described route bar number remainder number, and using described remainder as described net Close key value.
Wherein, processor 701 is used for performing following operating procedure:
Obtain the weighted value of every routing gateway in described N bar routing gateway;
According to the weighted value of every routing gateway in described N bar routing gateway, by the plurality of allocation of packets to described N Bar routing gateway forwards.
Wherein, processor 701 is used for performing following operating procedure:
Record forwards the target in the described N bar routing gateway that first packet in the plurality of packet is used Routing gateway;
Other packets in the plurality of packet are fully allocated to described target routing gateway forward.
It should be noted that for each embodiment of the method aforesaid, in order to be briefly described, therefore it is all expressed as one it be The combination of actions of row, but those skilled in the art should know, and the present invention is not limited by described sequence of movement, because of For according to the present invention, certain some step can use other orders or carry out simultaneously.Secondly, those skilled in the art also should Knowing, embodiment described in this description belongs to preferred embodiment, involved action and module not necessarily this Bright necessary.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and is not described in certain embodiment Part, may refer to the associated description of other embodiments.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment is can Completing instructing relevant hardware by program, this program can be stored in a computer-readable recording medium, storage Medium may include that flash disk, read only memory (English: Read-Only Memory, ROM), random access device (English be called for short: RAM), disk or CD etc. literary composition: Random Access Memory, is called for short:.
The content download method provided the embodiment of the present invention above and relevant device, system are described in detail, Principle and the embodiment of the present invention are set forth by specific case used herein, and the explanation of above example is simply used In helping to understand method and the core concept thereof of the present invention;Simultaneously for one of ordinary skill in the art, according to the present invention's Thought, the most all will change, and in sum, this specification content should not be construed as Limitation of the present invention.

Claims (11)

1. a message forwarding method, it is characterised in that described method includes:
Obtaining the characteristic attribute of message to be forwarded and forward the route bar number of described message to be forwarded, described characteristic attribute includes At least one in source address, destination address, protocol number, source port number and destination slogan;
Characteristic attribute according to described message to be forwarded and the route bar number of the described message to be forwarded of described forwarding, calculate gateway Key value;
From the routing gateway of available described route bar number, select the routing gateway corresponding with described gateway key value, and use Described message to be forwarded is forwarded by the described routing gateway selected.
2. method as claimed in claim 1, it is characterised in that the described characteristic attribute according to described message to be forwarded and described turn The route bar number sending out message to be forwarded described, calculates gateway key value and includes:
According to the characteristic attribute of described message to be forwarded, calculate the cryptographic Hash of described message to be forwarded;
Cryptographic Hash according to described message to be forwarded and the route bar number of the described message to be forwarded of described forwarding, calculate described net Close key value.
3. method as claimed in claim 2, it is characterised in that the described cryptographic Hash according to described message to be forwarded and described Forward the route bar number of described message to be forwarded, calculate described gateway key value and include:
By the cryptographic Hash of described message to be forwarded divided by described route bar number remainder number, and described remainder is closed as described gateway Key assignments.
4. the method for claim 1, it is characterised in that the described routing gateway of described selection includes N bar routing gateway, Described message to be forwarded includes that multiple packet, described N are the positive integer more than or equal to 1;
The described described routing gateway using selection carries out forwarding to described message to be forwarded and includes:
Obtain the weighted value of every routing gateway in described N bar routing gateway;
According to the weighted value of every routing gateway in described N bar routing gateway, by the plurality of allocation of packets to described N bar road Forwarded by gateway.
5. the method for claim 1, it is characterised in that the described routing gateway of described selection includes N bar routing gateway, Described message to be forwarded includes that multiple packet, described N are the positive integer more than or equal to 1;
The described described routing gateway using selection carries out forwarding to described message to be forwarded and includes:
Record forwards the target route in the described N bar routing gateway that first packet in the plurality of packet is used Gateway;
Other packets in the plurality of packet are fully allocated to described target routing gateway forward.
6. an apparatus for forwarding message, it is characterised in that described device includes:
Data obtaining module, for obtaining the characteristic attribute of message to be forwarded and forwarding the route bar of described message to be forwarded Number, described characteristic attribute includes at least one in source address, destination address, protocol number, source port number and destination slogan;
Information computational module, for according to the characteristic attribute of described message to be forwarded and the described message to be forwarded of described forwarding Route bar number, calculates gateway key value;
Packet forwarding module is corresponding with described gateway key value for selecting from the routing gateway of available described route bar number Routing gateway, and use the described routing gateway of selection that described message to be forwarded is forwarded.
7. device as claimed in claim 6, it is characterised in that described information computational module includes:
Cryptographic Hash computing unit, for the characteristic attribute according to described message to be forwarded, calculates the Hash of described message to be forwarded Value;
Key value computing unit, for according to the cryptographic Hash of described message to be forwarded and the described message to be forwarded of described forwarding Route bar number, calculates described gateway key value.
8. device as claimed in claim 7, it is characterised in that described key value computing unit specifically for:
By the cryptographic Hash of described message to be forwarded divided by described route bar number remainder number, and described remainder is closed as described gateway Key assignments.
9. device as claimed in claim 6, it is characterised in that the described routing gateway of described selection includes N bar routing gateway, Described message to be forwarded includes that multiple packet, described N are the positive integer more than or equal to 1;
Described packet forwarding module, is additionally operable to obtain the weighted value of every routing gateway in described N bar routing gateway;According to described The weighted value of every routing gateway in N bar routing gateway, carries out the plurality of allocation of packets to described N bar routing gateway turning Send out.
10. device as claimed in claim 6, it is characterised in that the described routing gateway of described selection includes N bar routing network Closing, described message to be forwarded includes that multiple packet, described N are the positive integer more than or equal to 1;
Described packet forwarding module, it is described that first packet being additionally operable in the record the plurality of packet of forwarding is used Target routing gateway in N bar routing gateway;Other packets in the plurality of packet are fully allocated to described target Routing gateway forwards.
11. 1 kinds of apparatus for forwarding message, it is characterised in that described device includes interface circuit, memorizer and processor, its In, memorizer stores batch processing code, and processor is for calling in memorizer the program code of storage, for perform with Lower operation:
Obtaining the characteristic attribute of message to be forwarded and forward the route bar number of described message to be forwarded, described characteristic attribute includes At least one in source address, destination address, protocol number, source port number and destination slogan;
Characteristic attribute according to described message to be forwarded and the route bar number of the described message to be forwarded of described forwarding, calculate gateway Key value;
From the routing gateway of available described route bar number, select the routing gateway corresponding with described gateway key value, and use Described message to be forwarded is forwarded by the described routing gateway selected.
CN201610556291.1A 2016-07-14 2016-07-14 A kind of message forwarding method and device Pending CN106130920A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610556291.1A CN106130920A (en) 2016-07-14 2016-07-14 A kind of message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610556291.1A CN106130920A (en) 2016-07-14 2016-07-14 A kind of message forwarding method and device

Publications (1)

Publication Number Publication Date
CN106130920A true CN106130920A (en) 2016-11-16

Family

ID=57283811

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610556291.1A Pending CN106130920A (en) 2016-07-14 2016-07-14 A kind of message forwarding method and device

Country Status (1)

Country Link
CN (1) CN106130920A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108282412A (en) * 2018-01-19 2018-07-13 世纪龙信息网络有限责任公司 Network shunt method, apparatus, system and computer equipment
CN109245984A (en) * 2018-07-13 2019-01-18 华为技术有限公司 A kind of message transmitting method, a kind of information processing method and its relevant device
CN109669775A (en) * 2018-12-10 2019-04-23 平安科技(深圳)有限公司 Distributed task dispatching method, system and storage medium
WO2022007550A1 (en) * 2020-07-06 2022-01-13 华为技术有限公司 Load balancing method, apparatus, network device, and system
WO2022170877A1 (en) * 2021-02-09 2022-08-18 华为技术有限公司 Message forwarding method, device and system
WO2023029485A1 (en) * 2021-08-31 2023-03-09 华为技术有限公司 Data processing method and apparatus, computer device, and computer-readable storage medium
CN115955439A (en) * 2023-03-13 2023-04-11 苏州浪潮智能科技有限公司 Transmission control method, system, device and storage medium of data message

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1595906A (en) * 2003-12-17 2005-03-16 浪潮电子信息产业股份有限公司 Single address traffic distributor of cluster network
CN102447638A (en) * 2012-01-12 2012-05-09 中兴通讯股份有限公司 Load balancing method and forwarding apparatus
CN102710507A (en) * 2012-05-17 2012-10-03 杭州华三通信技术有限公司 Method and network equipment for achieving consistency of message forwarding paths

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1595906A (en) * 2003-12-17 2005-03-16 浪潮电子信息产业股份有限公司 Single address traffic distributor of cluster network
CN102447638A (en) * 2012-01-12 2012-05-09 中兴通讯股份有限公司 Load balancing method and forwarding apparatus
CN102710507A (en) * 2012-05-17 2012-10-03 杭州华三通信技术有限公司 Method and network equipment for achieving consistency of message forwarding paths

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108282412A (en) * 2018-01-19 2018-07-13 世纪龙信息网络有限责任公司 Network shunt method, apparatus, system and computer equipment
CN109245984A (en) * 2018-07-13 2019-01-18 华为技术有限公司 A kind of message transmitting method, a kind of information processing method and its relevant device
CN109245984B (en) * 2018-07-13 2021-07-09 华为技术有限公司 Message transmission method, information processing method and related equipment thereof
CN109669775A (en) * 2018-12-10 2019-04-23 平安科技(深圳)有限公司 Distributed task dispatching method, system and storage medium
WO2022007550A1 (en) * 2020-07-06 2022-01-13 华为技术有限公司 Load balancing method, apparatus, network device, and system
WO2022170877A1 (en) * 2021-02-09 2022-08-18 华为技术有限公司 Message forwarding method, device and system
WO2023029485A1 (en) * 2021-08-31 2023-03-09 华为技术有限公司 Data processing method and apparatus, computer device, and computer-readable storage medium
CN115955439A (en) * 2023-03-13 2023-04-11 苏州浪潮智能科技有限公司 Transmission control method, system, device and storage medium of data message
CN115955439B (en) * 2023-03-13 2023-05-23 苏州浪潮智能科技有限公司 Data message transmission control method, system, device and storage medium

Similar Documents

Publication Publication Date Title
CN106130920A (en) A kind of message forwarding method and device
US11436037B2 (en) Learning of tunnel endpoint selections
US10938748B2 (en) Packet processing method, computing device, and packet processing apparatus
US10230667B2 (en) Pre-sorter systems and methods for distributing GTP packets
US9231781B2 (en) Flow distribution algorithm for aggregated links in an ethernet switch
US9912616B2 (en) Grouping tunnel endpoints of a bridge cluster
US20160337236A1 (en) Data center network system based on software-defined network and packet forwarding method, address resolution method, routing controller thereof
US10164885B2 (en) Load balancing over multiple tunnel endpoints
KR20170060102A (en) Data forwarding method, device and system in software-defined networking
US10826823B2 (en) Centralized label-based software defined network
CN105262681A (en) Distributed routing architecture
CN108337179B (en) Link flow control method and device
US11444840B2 (en) Virtualized networking application and infrastructure
CN106105162A (en) Load equalizer based on switch
CN107959625A (en) Virtual router with dynamic stream relieving capacity
CN106549780B (en) Network configuration method, device and system
CN112753198B (en) Load balancing and message reordering method and device in network
US11184283B2 (en) Service function chaining congestion tracking
CN103929367A (en) Load balancing method and device
CN106357542A (en) Method for providing multicast service and software defined network controller
CN105745874A (en) Method and device for determining service function path
CN104348737B (en) The transmission method and interchanger of a kind of multicast message
CN106209634B (en) Learning method and device of address mapping relation
CN111464443A (en) Message forwarding method, device, equipment and storage medium based on service function chain
WO2019165855A1 (en) Message transmission method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20161116

RJ01 Rejection of invention patent application after publication