CN107959634A - A kind of IP data packet shunt methods based on Hash technologies - Google Patents

A kind of IP data packet shunt methods based on Hash technologies Download PDF

Info

Publication number
CN107959634A
CN107959634A CN201610900206.9A CN201610900206A CN107959634A CN 107959634 A CN107959634 A CN 107959634A CN 201610900206 A CN201610900206 A CN 201610900206A CN 107959634 A CN107959634 A CN 107959634A
Authority
CN
China
Prior art keywords
shunting
data packets
shunted
processing board
hash value
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
CN201610900206.9A
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 Institute of Computer Technology and Applications
Original Assignee
Beijing Institute of Computer Technology and Applications
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 Institute of Computer Technology and Applications filed Critical Beijing Institute of Computer Technology and Applications
Priority to CN201610900206.9A priority Critical patent/CN107959634A/en
Publication of CN107959634A publication Critical patent/CN107959634A/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
    • 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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Landscapes

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

Abstract

The invention belongs to data distribution field, and in particular to a kind of IP data packet shunt methods based on Hash technologies.Including:Shunting routing table is set, and shunting route table items include the hash value of five-tuple;Establish IP data packet queues to be shunted, it is taken out IP data packets, obtain the five-tuple of IP data packets and calculate hash value, the IP data packets are deleted from IP data packet queues to be shunted, shunting routing table is searched according to the hash value of IP data packets, if can find, according to corresponding shunting route table items, IP data packets are shunted;If can not find, increase new shunting route table items, and according to new shunting route table items, IP data packets are shunted;Judge whether IP data packet queues to be shunted are empty, if not empty, then repeat the 3rd step, if it is empty then terminate.Table selection processing board is loaded according to processing board in shunting.The present invention can realize the effect of data stabilization transmission and the load of equilibrium treatment plate.

Description

A kind of IP data packet shunt methods based on Hash technologies
Technical field
The invention belongs to data distribution field, and in particular to a kind of IP data packet shunt methods based on Hash technologies.
Background technology
With the rapid development of network technology, the number of components for accessing network system is on the increase, to transmission speed kimonos The demand of business quality is also constantly lifted.Wherein there are three key issues to restrict network performance, i.e. network connection speed, height always The route switching of speed and packet handling rate.Gateway class product is located at the intersection of network, and it is direct that it handles the speed of data Affect the speed of whole network.Gateway class product generally use multi-processing board or the mode of multi-core parallel concurrent processing are handled in network Huge data flow, it is necessary first to shunted to data packet.
For power board processing data packets flow, in processing function, power board can be divided into data packet and receive dress Put, data packet de-encapsulating devices, data packet part flow arrangement, data envelope assembling device, data packet dispatching and dispensing device and dynamic 6 devices such as managing device.Fig. 1 gives the functional mode that power board performs task, from figure 1 it appears that each function fills Put and data packet is handled in a pipeline fashion, this tupe can give full play to the property of power board network processing unit Energy, greatly improves the data throughput capabilities of power board.
Power board groundwork process is as follows:
1) data packet in power board interface buffering area is received data packet reception device real time high-speed, will be connect Received data packet is saved in local memory after carrying out frame restructuring, and phases such as the base address of data packet, offset, bag sizes Close the ring-like chained list afterbody that information is saved in memory record packet information.
2) data packet de-encapsulating devices take out pending data bag from the ring-like chained list of record packet information first The relevant informations such as base address are simultaneously saved in the tuple information table for being located locally memory, then inclined by changing the address of data packet Shifting amount and bag size remove the header information of frame.Then abnormality detection is carried out to data packet, gives normal IP data packets to number Continue with according to bag part flow arrangement, then directly abandoned there are abnormal data packet.
3) data packet part flow arrangement performs data distribution method, realizes the shunting processing of data packet.
4) data envelope assembling device and is re-packaged into according to data distribution as a result, give data packet addition ethernet packet header Target Ether frame.
5) data frame after data packet dispatching and dispensing device encapsulate shunting according to shunting result carry out queue management with Scheduling, is sequentially sent to the transmission buffering area of power board transmission interface, is sent to corresponding shunting purpose at high speed by transmission interface Processing board.
In addition, dynamic management device, which is mainly responsible for, receives the real-time of the load sensing agency's transmission for being diverted to purpose processing board Processing board load information, updates the load table for being diverted to purpose processing board into Mobile state according to real-time processing board load information, Improve the load equilibrium of data distribution.
The design of data packet shunt method is the key of power board processing data packet speed, its task is by real-time reception To mass data bag be rapidly forwarded in the purpose processing board of rear end according to predetermined distributing strategy.Each back-end processing plate needs Safety analysis and processing are carried out to the data for being diverted to present treatment plate, and the integrality of data content for safety analysis and is sentenced Disconnected accuracy will produce considerable influence.Therefore, data packet shunt method must first ensure that all data packets of same connection Be divided to same back-end processing plate, next consider further that everywhere manage plate load balancing and execution efficiency the problems such as.
The content of the invention
(1) technical problems to be solved
It is steady to solve data transfer the purpose of the present invention is to propose to a kind of IP data packet shunt methods based on Hash technologies The problem of determining.
(2) technical solution
In order to solve the above technical problems, the present invention proposes a kind of IP data packet shunt methods based on Hash technologies, the party Method includes the following steps:
The first step, set shunting routing table, and shunting routing table is used to record the shunting route for shunting IP data packets List item, shunting route table items include the hash value of five-tuple;
Second step, establish IP data packet queues to be shunted;
3rd step, take out IP data packets from IP data packet queues to be shunted, obtains the five-tuple of IP data packets, and calculate The hash value of five-tuple, the IP data packets taken out in IP data packet queues to be shunted is deleted, according to the hash value of IP data packets Search shunting routing table, if it is possible to find corresponding hash value in routing table is shunted, then basis has corresponding hash value Shunting route table items, IP data packets are shunted;If can not find corresponding hash value in routing table is shunted, dividing Increase new shunting route table items in stream routing table, and according to new shunting route table items, IP data packets are shunted;
4th step, judge whether IP data packet queues to be shunted are empty, if not empty, then repeats the 3rd step, if It is empty then terminate.
Preferably, shunting route table items further include shunting transmission interface mark, last access time and effective marker position.
Preferably, if corresponding hash value can be found in routing table is shunted, to IP data packets in the 3rd step When being shunted, last access time is updated.
Preferably, when increasing new shunting route table items in the 3rd step, by the hash value of IP data packets, shunting transmission interface Mark, last access time and effective marker position recorded in new shunting route table items.
Preferably, setting processing board loads table in the first step, and processing board load table is used to record and equilibrium treatment plate Load, processing board receive and handle corresponding IP data packets after shunting;In the third step, if can not find in routing table is shunted Corresponding hash value, then search processing board load table, using the processing board of load value minimum described in it as shunt purpose at Plate is managed, increases load value of the processing board in processing board load table, increases new shunting route table items in routing table is shunted, IP data packets are shunted.
Preferably, shunting work end signal is fed back to processing board load table, dropped by processing board after completing to shunt work Load value of the reduction process plate in processing board loads table.
Preferably, streaming buffer area is set in the third step, and it is slow to be admitted to shunting when being shunted for multiple IP data packets Rush in area, and shunted successively according to the sequencing for entering streaming buffer area.
Preferably, the hash value of five-tuple is the hash value of 48,64 or 128.
(3) beneficial effect
The present invention can constantly take out IP data packets from IP data packet queues to be shunted, and according to shunting route table items Calculating shunting is carried out to IP data packets, realizes the effect of data stabilization transmission.In addition, by setting processing board load table, may be used also To realize the effect of equilibrium treatment plate load.
Brief description of the drawings
Fig. 1 is that power board performs task function model;
Fig. 2 is the basic handling flow of IP data packets shunting of the present invention.
Embodiment
To make the purpose of the present invention, content and advantage clearer, with reference to the accompanying drawings and examples, to the present invention's Embodiment is described in further detail.
The present invention proposes a kind of IP data packet shunt methods based on Hash technologies, the basic handling stream of IP data packets shunting Journey, as shown in Fig. 2, specifically comprising the following steps:
The first step, set shunting routing table and processing board load table, and shunting routing table, which is used to record, carries out IP data packets The shunting route table items of shunting, when shunting route table items include the hash value of five-tuple, shunting transmission interface mark, finally access Between and effective marker position (0 represents invalid, and 1 represents effective), processing board load table is used to record and the load of equilibrium treatment plate, place To manage plate reception and handle corresponding IP data packets after shunting, the load initial value of each processing board is zero in processing board load table, Shunting routing table is initially empty.
Second step, establish IP data packet queues to be shunted.
3rd step, take out IP data packets from IP data packet queues to be shunted, obtains the five-tuple of IP data packets, and calculate 64 hash values of five-tuple, the IP data packets taken out in IP data packet queues to be shunted are deleted, according to IP data packets Hash value searches shunting routing table, if it is possible to find corresponding hash value in routing table is shunted, then it is corresponding according to having The shunting route table items of hash value, shunt IP data packets, update last access time;If looked in routing table is shunted Less than corresponding hash value, then processing board load table is searched, shunting mesh is used as using the processing board of the load value minimum described in it Processing board, increase load value of the processing board in processing board load table, increase new shunting route in routing table is shunted List item, new point is recorded by the hash value of IP data packets, shunting transmission interface mark, last access time and effective marker position Flow in route table items, IP data packets are shunted.Processing board is after completing to shunt work, by shunting work end signal feedback Table is loaded to processing board, reduces load value of the processing board in processing board loads table.
When being shunted to IP data packets, streaming buffer area is set, multiple IP data packets are admitted to when being shunted In streaming buffer area, and shunted successively according to the sequencing for entering streaming buffer area.
4th step, judge whether IP data packet queues to be shunted are empty, if not empty, then repeats the 3rd step, if It is empty then terminate.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, without departing from the technical principles of the invention, some improvement and deformation can also be made, these are improved and deformation Also it should be regarded as protection scope of the present invention.

Claims (8)

1. a kind of IP data packet shunt methods based on Hash technologies, it is characterised in that described method includes following steps:
The first step, set shunting routing table, and the shunting routing table is used to record the shunting route for shunting IP data packets List item, the shunting route table items include the hash value of five-tuple;
Second step, establish IP data packet queues to be shunted;
3rd step, take out IP data packets from the IP data packet queues to be shunted, obtains the five-tuple of the IP data packets, and The hash value of the five-tuple is calculated, the IP data packets taken out in the IP data packet queues to be shunted are deleted, according to The hash value of the IP data packets searches the shunting routing table, if it is possible to finds correspondence in the shunting routing table Hash value, then according to have the corresponding hash value shunting route table items, the IP data packets are shunted;If Corresponding hash value is can not find in the shunting routing table, then increases new shunting routing table in the shunting routing table , and according to the new shunting route table items, the IP data packets are shunted;
4th step, judge whether the IP data packet queues to be shunted are empty, if not empty, then repeats the 3rd step, if It is empty then terminate.
2. shunt method as claimed in claim 1, it is characterised in that the shunting route table items further include shunting transmission interface Mark, last access time and effective marker position.
3. shunt method as claimed in claim 2, it is characterised in that if can be in the shunting route in the 3rd step Corresponding hash value is found in table, then when being shunted to the IP data packets, updates the last access time.
4. shunt method as claimed in claim 2, it is characterised in that increase new shunting route table items in the 3rd step When, the hash value of the IP data packets, shunting transmission interface mark, last access time and effective marker position recorded In the new shunting route table items.
5. shunt method as claimed in claim 1, it is characterised in that set processing board to load table, institute in the first step State processing board load table be used for record and equilibrium treatment plate load, the processing board receive and processing shunting after it is corresponding described in IP data packets;In the 3rd step, if can not find corresponding hash value in the shunting routing table, the place is searched Plate load table is managed, using the processing board of the load value minimum described in it as shunting purpose processing board, increases the processing board and exists Load value in the processing board load table.
6. shunt method as claimed in claim 5, it is characterised in that the processing board will shunt after completing to shunt work Work end signal feeds back to the processing board load table, reduces load of the processing board in the processing board load table Value.
7. shunt method as claimed in claim 1, it is characterised in that streaming buffer area is set in the 3rd step, it is multiple The IP data packets are admitted in streaming buffer area when being shunted, and suitable according to the priority for entering the streaming buffer area Sequence is shunted successively.
8. shunt method as claimed in claim 1, it is characterised in that the hash value of the five-tuple is 48,64 or 128 The hash value of position.
CN201610900206.9A 2016-10-14 2016-10-14 A kind of IP data packet shunt methods based on Hash technologies Pending CN107959634A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610900206.9A CN107959634A (en) 2016-10-14 2016-10-14 A kind of IP data packet shunt methods based on Hash technologies

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610900206.9A CN107959634A (en) 2016-10-14 2016-10-14 A kind of IP data packet shunt methods based on Hash technologies

Publications (1)

Publication Number Publication Date
CN107959634A true CN107959634A (en) 2018-04-24

Family

ID=61953746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610900206.9A Pending CN107959634A (en) 2016-10-14 2016-10-14 A kind of IP data packet shunt methods based on Hash technologies

Country Status (1)

Country Link
CN (1) CN107959634A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112313910A (en) * 2018-06-13 2021-02-02 华为技术有限公司 Multi-path selection system and method for data center centric metropolitan area networks

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201114153Y (en) * 2007-09-29 2008-09-10 华为技术有限公司 Veneer for accomplishing load balancing
CN101616083A (en) * 2009-08-06 2009-12-30 杭州华三通信技术有限公司 A kind of message forwarding method and device
CN101729573A (en) * 2009-12-18 2010-06-09 四川长虹电器股份有限公司 Dynamic load balancing method of network intrusion detection
CN102035743A (en) * 2010-12-17 2011-04-27 天津曙光计算机产业有限公司 Dynamic load balanced distribution method
US8238250B2 (en) * 2009-10-16 2012-08-07 Hei Tao Fung QoS-aware flow-based dynamic load balancing for link aggregation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201114153Y (en) * 2007-09-29 2008-09-10 华为技术有限公司 Veneer for accomplishing load balancing
CN101616083A (en) * 2009-08-06 2009-12-30 杭州华三通信技术有限公司 A kind of message forwarding method and device
US8238250B2 (en) * 2009-10-16 2012-08-07 Hei Tao Fung QoS-aware flow-based dynamic load balancing for link aggregation
CN101729573A (en) * 2009-12-18 2010-06-09 四川长虹电器股份有限公司 Dynamic load balancing method of network intrusion detection
CN102035743A (en) * 2010-12-17 2011-04-27 天津曙光计算机产业有限公司 Dynamic load balanced distribution method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112313910A (en) * 2018-06-13 2021-02-02 华为技术有限公司 Multi-path selection system and method for data center centric metropolitan area networks
CN112313910B (en) * 2018-06-13 2022-08-19 华为技术有限公司 Multi-path selection system and method for data center centric metropolitan area networks

Similar Documents

Publication Publication Date Title
CN106713185B (en) A kind of load-balancing method and device of multi-core CPU
CN104348740B (en) Data package processing method and system
CN104205080B (en) Unloading packet transaction is virtualized for networked devices
CN108476177A (en) Data plane for processing function scalability
CN107077340A (en) Load balancing
CN102739518B (en) A kind of flow load sharing method and apparatus
US8929372B2 (en) Grid router
CN104519125B (en) Distributed load distribution in order flexible for change in topology
CN104202351B (en) Distributed virtual safety device and the repeater system based on stream using virtual machine
CN106341330A (en) Topology discovery method and system of SDN controller
CN101426010A (en) Information processing apparatus and information processing system
CN102664815A (en) Load sharing method, device and system for message traffic
CN103685053B (en) Network processor load balancing and scheduling method based on residual task processing time compensation
EP3559833B1 (en) Best-efforts database functions
CN105099957B (en) A kind of data packet forwarding method based on software checking book
CN102970242A (en) Method for achieving load balancing
US20140068205A1 (en) Systems and methods for managing queues
CN107948087A (en) A kind of method and apparatus of load balancing
CN109729022A (en) A kind of data transmission method for uplink based on software defined network, apparatus and system
CN107241305A (en) A kind of network protocol analysis system and its analysis method based on polycaryon processor
EP3560148B1 (en) Database functions-defined network switch
CN114398174A (en) Dynamic energy-saving scheduling method and system for data center network in SDN environment
CN104350488A (en) Systems and methods for selective data redundancy elimination for resource constrained hosts
CN104836741A (en) Method and processing board for processing fragmented messages in network message diverting equipment
CN101217486B (en) A mobile Internet data load allocation method based on network processor

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180424