CN103269320A - Data forwarding method and access router - Google Patents

Data forwarding method and access router Download PDF

Info

Publication number
CN103269320A
CN103269320A CN2013101481733A CN201310148173A CN103269320A CN 103269320 A CN103269320 A CN 103269320A CN 2013101481733 A CN2013101481733 A CN 2013101481733A CN 201310148173 A CN201310148173 A CN 201310148173A CN 103269320 A CN103269320 A CN 103269320A
Authority
CN
China
Prior art keywords
priority
packet
router
comprehensive
couple
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2013101481733A
Other languages
Chinese (zh)
Other versions
CN103269320B (en
Inventor
彭伟
苏金树
吴逸伦
胡晓峰
王小峰
赵锋
王宝生
王雯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
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 National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN201310148173.3A priority Critical patent/CN103269320B/en
Publication of CN103269320A publication Critical patent/CN103269320A/en
Application granted granted Critical
Publication of CN103269320B publication Critical patent/CN103269320B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a data forwarding method and an access router. The method includes the steps that a data package sent by a terminal is received by the access router and carries a source internet protocol (IP) address, a purpose IP address and data type information; the access router calculates comprehensive priority according to a priority of a terminal corresponding to the source IP address and a priority of a data type corresponding to the data type information and adds the comprehensive priority to the data package; the data package is added to a buffering queue corresponding to the comprehensive priority by the access router, different comprehensive priorities correspond to different buffering queues, and bandwidths of the different buffering queues are divided according to high-low sequences of corresponding comprehensive priorities; the data package is forwarded according to a joining sequence of the data package in the buffering queue by the access router. Priorities of the data package are determined through calculation, the bandwidths are distributed according to the high-low sequences of the priorities by the data package, thus a data package with a high priority obtains a bandwidth with a large ratio, and the forwarding method is flexible.

Description

Data forwarding method and couple in router
Technical field
The present invention relates to areas of information technology, relate in particular to a kind of data forwarding method and couple in router.
Background technology
Along with development and the application of the network information technology, network just progressively becomes the important tool of people's routine work, studying and living.But for different services, they also are inequality to the requirement of network, and network need be formulated the service quality guarantee strategy according to different should being used for, with the different demands of user on the As soon as possible Promising Policy network and application.
In the prior art, network is divided into different differential service (Differentiated Service, be called for short DS) territory, when data flow to into to a DS territory time, type according to data flow is differential operation code point (Differential Services Code Point of this distribution of flows, abbreviation DSCP) value is come flag data stream, according to the DSCP value of each data flow message is dispatched forwarding again.
Yet prior art lacks flexibility based on the retransmission method of data stream type, and network service quality is not high.
Summary of the invention
The invention provides a kind of data forwarding method and couple in router, in order to the problem that exists on the network service quality that improves user in the prior art.
First aspect, the embodiment of the invention provide a kind of data forwarding method, comprising:
The packet that the couple in router receiving terminal sends carries source internet protocol IP address, purpose IP address and data type information in the described packet;
Described couple in router calculates comprehensive priority according to the priority of the described terminal of described source IP address correspondence and described data type information to priority that should data type, and described comprehensive priority is added in the described packet;
Described couple in router adds described packet in the buffer queue of described comprehensive priority correspondence, the buffer queue that different comprehensive priorities is corresponding different, and the bandwidth of different buffer queues is divided according to corresponding comprehensive priority height order;
Described couple in router is transmitted described packet according to the addition sequence of described packet in affiliated buffer queue.
In first kind of first aspect possible implementation, described couple in router calculates after the comprehensive priority priority that should data type according to the priority of the described terminal of described source IP address correspondence and described data type information, also comprises:
Described couple in router is checked the buffer queue of the comprehensive priority correspondence that has described packet whether;
If exist, then described packet is added the buffer queue afterbody of the comprehensive priority correspondence of described packet; If do not exist, the buffer queue of the comprehensive priority correspondence of the newly-built described packet of described couple in router then, and according to the comprehensive priority height order of the buffer queue correspondence of remain to be transmitted data, remain to be transmitted the buffer queue distribution bandwidth of data again for institute.
According to first kind of first aspect possible implementation, in second kind of possible implementation:
If transmitting, finish above setting-up time all packets in the buffer queue of free generalization priority correspondence, then according to the comprehensive priority height order of the buffer queue correspondence of remain to be transmitted data, remain to be transmitted the buffer queue distribution bandwidth of data again for institute.
According to any one of first kind and second kind possible implementation of first aspect, first aspect, in the third possible implementation:
Also carry priority in the described packet, then described couple in router calculates after the comprehensive priority priority that should data type according to the priority of the described terminal of described source IP address correspondence and described data type information, also comprises:
Described couple in router is compared the priority of carrying in the described packet with the comprehensive priority that calculates, if the priority of carrying is higher than described comprehensive priority in the described packet, then with the priority of carrying in the described packet as comprehensive priority.
According to any one of first aspect, first aspect first kind, second kind and the third possible implementation, in the 4th kind of possible implementation:
Before the packet that described couple in router receiving terminal sends, also comprise:
Described couple in router receives the network service quality request that described terminal sends, and carries IP address, account information and the encrypted message of described terminal in the described network service quality request;
Described couple in router carries out two-way authentication according to IP address, account information and encrypted message and the described terminal of described terminal;
If described two-way authentication is passed through, described couple in router sends to certificate server with IP address, account information and the encrypted message of described terminal, so that described certificate server is inquired about the priority of described terminal according to IP address, account information and the encrypted message of described terminal;
Described couple in router receives the precedence information of the described terminal that described certificate server returns.
Second aspect, the embodiment of the invention provide a kind of couple in router, comprising:
Receiver module is used for the packet that receiving terminal sends, and carries source internet protocol IP address, purpose IP address and data type information in the described packet;
Computing module is used for according to the priority of the described terminal of described source IP address correspondence and described data type information priority that should data type being calculated comprehensive priority, and described comprehensive priority is added in the described packet;
Distribution module, for the buffer queue that described packet is added described comprehensive priority correspondence, the buffer queue that different comprehensive priorities is corresponding different, the bandwidth of different buffer queues is divided according to corresponding comprehensive priority height order;
Forwarding module is used for transmitting described packet according to described packet at the addition sequence of affiliated buffer queue.
In first kind of second aspect possible implementation, described distribution module comprises:
Search the unit, be used for checking the buffer queue of the comprehensive priority correspondence that has described packet whether;
Allocation units are used for described packet being added the buffer queue afterbody of the comprehensive priority correspondence of described packet when the buffer queue of the comprehensive priority correspondence of described packet has existed; When not existing, the buffer queue of the comprehensive priority correspondence of newly-built described packet, and according to the comprehensive priority height order of the buffer queue correspondence of remain to be transmitted data, remain to be transmitted the buffer queue distribution bandwidth of data again for institute.
According to first kind of second aspect possible implementation, in second kind of possible implementation:
Described allocation units also are used for:
When all packets forwardings in the buffer queue of free generalization priority correspondence are finished above setting-up time, according to the comprehensive priority height order of the buffer queue correspondence of remain to be transmitted data, remain to be transmitted the buffer queue distribution bandwidth of data again for institute.
According to first kind and second kind possible implementation of second aspect, second aspect any one, in the third possible implementation: described computing module specifically comprises:
Computing unit is used for according to the priority of the described terminal of described source IP address correspondence and described data type information priority that should data type being calculated comprehensive priority;
Also comprise:
Comparing unit, be used for when described packet also carries priority, the priority of carrying in the described packet is compared with the comprehensive priority that calculates, if the priority of carrying in the described packet is higher than described comprehensive priority, then with the priority of carrying in the described packet as comprehensive priority.
According to any one of second aspect, second aspect first kind, second kind and the third possible implementation, in the 4th kind of possible implementation:
Described receiver module also is used for receiving the network service quality request that described terminal sends, and carries IP address, account information and the encrypted message of described terminal in the described network service quality request;
Described couple in router also comprises:
Authentication module is used for carrying out two-way authentication according to IP address, account information and encrypted message and the described terminal of described terminal;
Sending module, be used for when described two-way authentication is passed through, IP address, account information and the encrypted message of described terminal are sent to certificate server, so that described certificate server is inquired about the priority of described terminal according to IP address, account information and the encrypted message of described terminal;
Described receiver module also be used for to receive the precedence information of the described terminal that described certificate server returns.
The data forwarding method that the embodiment of the invention provides and couple in router, after couple in router receives the terminal data bag, calculate comprehensive priority according to the terminal PRI of source IP address correspondence in the packet and the data type information corresponding data types priority in the packet, and distribute bandwidth by the order of comprehensive priority height, retransmission method is flexible, has effectively improved the quality of network service.
Description of drawings
The flow chart of the data forwarding method that Fig. 1 provides for the embodiment of the invention one;
The flow chart of the data forwarding method that Fig. 2 provides for the embodiment of the invention two;
The network architecture schematic diagram that Fig. 3 relates to for the embodiment of the invention;
Fig. 4 is the process chart of couple in router in user data transmission of the embodiment of the invention;
The structural representation of the couple in router that Fig. 5 provides for the embodiment of the invention four.
Embodiment
The flow chart of the data forwarding method that Fig. 1 provides for the embodiment of the invention one.As shown in Figure 1, the method for present embodiment comprises:
Step 101: the packet that the couple in router receiving terminal sends, carry source internet protocol IP address, purpose IP address and data type information in the packet.
Particularly, can carry contents such as source internet protocol IP address, purpose IP address and data type information in this packet.Usually above information can be carried at the IP header of packet.
Step 102: couple in router calculates comprehensive priority according to the priority of the terminal of source IP address correspondence and data type information to priority that should data type, and comprehensive priority is added in the packet.
In the embodiment of the invention, each user terminal correspondence different priority, and different data type (being different business) is corresponding different priority also.Therefore, couple in router can be taken all factors into consideration according to the priority of above-mentioned user terminal and the priority of data type.Particularly, after couple in router receives packet, can determine user terminal according to source IP address, thereby determine the corresponding priority of this user terminal.In addition, couple in router can also be determined priority that should data type according to data type information.Further, couple in router can calculate comprehensive priority according to the priority of user terminal and the priority of data type, and the comprehensive priority that calculates is added in the packet, to make things convenient for the follow-up forwarding of packet.
Optionally, couple in router can adopt the method for weighted calculation to calculate comprehensive priority, for example: can give different weights respectively to the priority of the priority of user terminal and data type and be weighted to calculate and obtain comprehensive priority.
Optionally, couple in router can also extract and carry source internet protocol IP address, purpose IP address and data type information in this packet, and with its comprehensive priority with the calculating gained, deposits the packet priority list in.When this packet priority list can make things convenient for same user terminal to carry out the forwarding of packet of the same type afterwards, directly extract this priority, and need not calculate again.
Step 103: couple in router adds packet in the buffer queue of comprehensive priority correspondence, the buffer queue that different comprehensive priorities is corresponding different, and the bandwidth of different buffer queues is divided according to corresponding comprehensive priority height order.
Particularly, couple in router can be created different buffer queues for different comprehensive priorities, and each buffer queue can be dispatched the transmission packet according to the order that packet adds.After couple in router is determined comprehensive priority, packet can be joined the tail of the queue of the buffer queue of its comprehensive priority correspondence, to wait for the forwarding scheduling of packet.Wherein, and different bufferings is distributed according to corresponding comprehensive priority height order being listed as corresponding bandwidth.
Step 104: couple in router is transmitted packet according to the addition sequence of packet in affiliated buffer queue.
Particularly, couple in router is when transmitting packet, and the sequencing that adds in the affiliated buffer queue according to packet carries out, i.e. the forwarding of the packet of same priority is carried out sequentially.For a buffer queue, can dispatch the transmission packet from this queue heads to rear of queue successively.
The data forwarding method that the embodiment of the invention provides and couple in router, after couple in router receives the terminal data bag, calculate comprehensive priority according to the terminal PRI of source IP address correspondence in the packet and the data type information corresponding data types priority in the packet, and distribute bandwidth by the order of comprehensive priority height, retransmission method is flexible, has effectively improved the quality of network service.
The flow chart of the data forwarding method that Fig. 2 provides for the embodiment of the invention two, wherein, the process that 201-202 carries out two-way authentication for user and couple in router; 203-204 is that two-way authentication is passed through the back couple in router to the process of the priority of certificate server inquiry terminal; 205-206 is that couple in router is to the process of carrying out priority flag and affirmation of packet; 207-211 is the process that couple in router is transmitted and dispatched packet; 212 transmit the process that exits network of finishing for user data.The network architecture schematic diagram that Fig. 3 relates to for the embodiment of the invention, as shown in Figure 3, this network comprises router one, router two, router three and certificate server.Fig. 4 is the process chart of couple in router in user data transmission of the embodiment of the invention.In conjunction with Fig. 2, Fig. 3 and shown in Figure 4, the method for present embodiment comprises:
Step 201: the network service quality request that the couple in router receiving terminal sends, IP address, account information and the encrypted message of carried terminal in the network service quality request.
Particularly, the user at first needs to carry out authentication when needing transmitting and receiving data and obtain the service of priority.In this step, user terminal sends the network service quality request to couple in router, and the authentication informations such as IP address, account information and encrypted message of carried terminal in this network service quality request are so that couple in router is confirmed the identity of user terminal according to this authentication information.Wherein, this couple in router can be any one router shown in Figure 3.
Step 202: couple in router carries out two-way authentication according to IP address, account information and encrypted message and the terminal of terminal.
Particularly, the information that comprises in the network service quality request that couple in router sends according to user terminal authenticates the identity of user terminal, with the legitimacy of verification terminal identity, namely this terminal has authority to carry out the forwarding and reception operation of data in this system.Optionally, couple in router also can read local certificate and sends to terminal, by terminal its identity is authenticated, thereby finishes two-way authentication.If two-way authentication is unsuccessful, then couple in router is to this user terminal return authentication failure.
Step 203: if two-way authentication is passed through, couple in router sends to certificate server with IP address, account information and the encrypted message of terminal, so that certificate server is according to the priority of IP address, account information and the encrypted message inquiry terminal of terminal.
Particularly, if the two-way authentication of couple in router and terminal is passed through, then couple in router sends to certificate server with IP address, account information and the encrypted message of terminal, certificate server can be according to the identity of these information inquiring user terminal in local data base, and obtains the precedence information of this user terminal.Need to prove, in the router shown in Figure 3, router three can with the certificate server direct communication, router one can be communicated by letter with certificate server by router three with router two.
Step 204: the precedence information of the terminal that couple in router reception certificate server returns.
Particularly, after certificate server inquired the identity of terminal and obtains the precedence information of terminal, certificate server returned to couple in router with the corresponding precedence information of this terminal.After couple in router receives this information, IP address of terminal and corresponding precedence information can be deposited in the User Priority tabulation of self safeguarding, to make things convenient for the forwarding of terminal follow-up data.
Step 205: the packet that the couple in router receiving terminal sends, carry source internet protocol IP address, purpose IP address and data type information in the packet.
Particularly, after the user terminal identity authentication success, user terminal can send, receive the operation of packet.Particularly, can carry contents such as source internet protocol IP address, purpose IP address and data type information in this packet.Usually above information can be carried at the IP header of packet.
Step 206: couple in router calculates comprehensive priority according to the priority of the terminal of source IP address correspondence and data type information to priority that should data type, and comprehensive priority is added in the packet.
In the embodiment of the invention, each user terminal correspondence different priority, and different data type (being different business) is corresponding different priority also.Therefore, couple in router can need be taken all factors into consideration according to the priority of above-mentioned user terminal and the priority of data type.Particularly, after couple in router receives packet, can determine user terminal according to source IP address, thereby determine the corresponding priority of this user terminal.In addition, couple in router can also be determined priority that should data type according to data type information.Further, couple in router can calculate comprehensive priority according to the priority of user terminal and the priority of data type, and the comprehensive priority that calculates is added in the packet, to make things convenient for the follow-up forwarding of packet.
Optionally, when couple in router determines that according to source IP address user terminal does not appear in the User Priority tabulation, can determine that this user terminal does not have the operating right of priority, namely need not this packet is calculated comprehensive priority, only the corresponding priority of this packet is carried out data as comprehensive priority and transmit.
Optionally, couple in router can adopt the method for weighted calculation to calculate comprehensive priority, for example: can give different weights respectively to the priority of the priority of user terminal and data type and be weighted to calculate and obtain comprehensive priority.
Particularly, can be as follows to the computing formula of data packet priority:
z = x · y max m · n m · n > max x · y , m · n > max , Wherein, 0<x≤m, 0<y≤n (1)
Wherein, z is comprehensive priority, and x is the corresponding priority of user terminal, and y is the corresponding priority of data type; M is user's priority sum, and n is the priority sum of data type, and max=256 is priority query's sum that router allows.Particularly, this is the position owing to memory priority level information in the packet, for example can be COS (Type of Service the is called for short TOS) territory of packet, and one has 8, so the maximum queue quantity that router is supported is 256.The value of x and y can preferentially be arranged according to specific requirement by system.
Particularly, after the comprehensive priority of calculated data bag, a kind of possible implementation is:
Couple in router can extract and carry source internet protocol IP address, purpose IP address and data type information in this packet, and with its comprehensive priority with the calculating gained, deposits the packet priority list in.When this packet priority list can make things convenient for same user terminal to carry out the forwarding of packet of the same type afterwards, directly extract this priority, and need not calculate again.
Another kind of possible implementation is:
Also carry priority in the packet, then after couple in router calculates comprehensive priority according to the priority of the terminal of source IP address correspondence and data type information to priority that should data type, couple in router is compared the priority of carrying in the packet with the comprehensive priority that calculates, if the priority of carrying in the packet is higher than comprehensive priority, then with the priority of carrying in the packet as comprehensive priority; If the priority of carrying in the packet is lower than comprehensive priority, then this comprehensive priority is write the position of memory priority level in packet priority list and the packet, and transmit this packet with this comprehensive priority as priority.
Step 207: couple in router is checked the buffer queue of the comprehensive priority correspondence that has packet whether.
Particularly, because the corresponding different buffer queue of different comprehensive priorities, therefore, couple in router can continue to check the buffer queue of the comprehensive priority correspondence that has packet whether after confirming the priority of received data packet.
Step 208: if exist, then packet is added the buffer queue afterbody of the comprehensive priority correspondence of packet;
Particularly, in this step, when the buffer queue of the comprehensive priority correspondence that has this packet, this packet can be joined corresponding buffer queue afterbody, to wait for the forwarding scheduling of packet.
Step 209: if do not exist, the buffer queue of the comprehensive priority correspondence of couple in router newdata bag then, and according to the comprehensive priority height order of the buffer queue correspondence of remain to be transmitted data, remain to be transmitted the buffer queue distribution bandwidth of data again for institute.
Particularly, couple in router chained list L_queue mark pool of buffer formation, each element in the chained list is a buffer queue.Element among the chained list L_queue is arranged according to priority orders, and wherein linked list head portion priority is the highest, and afterbody priority is minimum.
When the buffer queue of the comprehensive priority correspondence of couple in router newdata bag, at first according to priority of data packets, the node of newly-built chained list L_queue, travel through L_queue then, find adjacent node A and the B of this newly-built node, make the priority of this newly-built node between the priority of A node and B node, and newly-built node is inserted between node A and the Node B, simultaneously packet is added in the newly-built node, form a buffer queue.
Particularly, when distributing bandwidth for the buffer queue of waiting to transmit data, traversal chained list L_queue extracts the priority of the buffer queue that remains to be transmitted data among the chained list L_queue.The priority of supposing respectively to wait to transmit the buffer queue of data is P i, wherein, 0≤i≤queue_num, queue_num represent to wait to transmit the buffer queue quantity of data.Calculate the bandwidth that each formation can obtain, wherein the formation i allocated bandwidth ratio that can be assigned to is
q i = P i P 1 + . . . P queue _ num , 0 ≤ i ≤ queue _ num - - - ( 2 )
Allocated bandwidth is upgraded bandwidth distribution list than after calculating end.
Particularly, for example currently have 3 buffer queues, and corresponding priority is respectively 5,3 and 2, and then couple in router is 5:3:2 to the allocated bandwidth ratio of these 3 formations, namely can be respectively 50%, 30% and 20% of current bandwidth in the bandwidth that these 3 formations are distributed.
Step 210: couple in router is transmitted packet according to the addition sequence of packet in affiliated buffer queue.
Particularly, couple in router is after distributing bandwidth for each buffer queue, can transmit packet, and the order of transmitting can add according to packet under sequencing in the buffer queue carry out, i.e. the forwarding of the packet of same priority is carried out sequentially.
Step 211: finish above setting-up time if all packets in the buffer queue of free generalization priority correspondence are transmitted, then according to the comprehensive priority height order of the buffer queue correspondence of remain to be transmitted data, remain to be transmitted the buffer queue distribution bandwidth of data again for institute.
Particularly, after all packets in the buffer queue of any comprehensive priority correspondence are transmitted and are finished, if surpass the time of setting, during the packet that no longer remains in this buffer queue to be transmitted, then delete this formation, and according to the comprehensive priority height order of the buffer queue correspondence of remain to be transmitted data, remain to be transmitted the buffer queue distribution bandwidth of data again for other institute.
Step 212: the user withdraws from and deletes priority.
Particularly, when user's end of operation, in the time of need exitting network, at first sent to couple in router by the user and withdraw from request, couple in router receives this request, and returns a response to the user, and the user exits network.Simultaneously, because may having a plurality of users, same terminal shares, therefore, when the user exits network, couple in router will be deleted in User Priority tabulation and the packet priority list simultaneously about this user's data, so that other users of shared this terminal can obtain self corresponding priority.
The data forwarding method that the embodiment of the invention provides and couple in router, after couple in router receives the terminal data bag, calculate comprehensive priority according to the terminal PRI of source IP address correspondence in the packet and the data type information corresponding data types priority in the packet, and distribute bandwidth by the order of comprehensive priority height, retransmission method is flexible, has effectively improved the quality of network service.
With a specific embodiment data forwarding method of the present invention is described below.
Referring to Fig. 3.In this scene, can realize that different priority users uses this data forwarding method to send the process of packet.As shown in Figure 3, in this scene, advanced level user's priority is 3, and customer group 1 priority is 1, and customer group 2 priority are 2.Advanced level user, customer group 1 and customer group 2 are all carried out the data interaction of same type with application server, wherein the priority of this data type is 5.In router one, the packet of advanced level user and customer group 1 is carried out allocation schedule; In router two, only send the packet of customer group 2; In router three, the packet of customer group 1, customer group 2 and advanced level user is carried out allocation schedule.
Following mask body describes by the data forwarding process of advanced level user.Concrete steps can be as follows:
The first, advanced level user sends the network service quality request to router one, and carries the IP address of advanced users terminal, account information and the encrypted message of this advanced level user in this network service quality request.Router one carries out two-way authentication according to this IP address, account information and encrypted message and advanced users terminal.Behind the authentication success, couple in router 1 sends to certificate server with IP address, account information and the encrypted message etc. of advanced users terminal, and certificate server can be 3 to the priority of this advanced level user according to this information inquiry just.
After the inquiry, certificate server returns to router one with the precedence information of this advanced users terminal, router one deposits IP address and the corresponding priority 3 of this advanced users terminal in the User Priority tabulation of self safeguarding, to make things convenient for the forwarding of this advanced level user's follow-up data in.
Particularly, the form of User Priority tabulation can be as shown in table 1 below.
Table 1
The User Priority tabulation
The IP address User Priority
? ?
? ?
? ?
The second, priority of data packets is carried out mark and affirmation.
Particularly, after the authentication of advanced level user finished, advanced level user can send packet, particularly, and source IP address, purpose IP address and data type information that this packet of the IP header portability of the packet of this transmission sends.Router one receives this packet, and extracts source IP address, purpose IP address and data type information in the packet.
First packet for this advanced level user's transmission, the comprehensive priority that router one can calculate this packet according to priority 3 and the data type information corresponding priorities 5 of formula (1) and this advanced level user is 15, and 4 above-mentioned information are write in the packet priority list, simultaneously, comprehensive priority information is write the position of memory priority level information in this packet, for example can write in the TOS territory of packet.Particularly, the form of packet priority list can be as shown in table 2 below.
Table 2
The packet priority list
Source IP address Purpose IP address Data type Priority value
? ? ? ?
? ? ? ?
? ? ? ?
Non-first packet for this advanced level user's transmission, only need be by searching the packet priority list, can know this priority of data packets information, and the position that corresponding priorities information writes memory priority level information in the packet in will tabulating gets final product, and for example writes in the TOS territory of packet.
And for carrying priority in the packet, be generally the packet that is sent to this advanced level user by other users, may be owing to both sides' priority is inconsistent, the priority that makes wherein entrained priority and this advanced level user's side calculate is inconsistent, therefore, at this moment, router one can calculate acquisition comprehensive priority 15 according to priority 3 and the data type information corresponding priorities 5 of formula (1) and this advanced level user.Then, router one is compared the priority of carrying in the packet with the comprehensive priority 15 that calculates, if the priority of carrying in the packet is higher than comprehensive priority, then with the priority of carrying in the packet as comprehensive priority, and write in the packet priority list; If the priority of carrying in the packet is lower than comprehensive priority, then this comprehensive priority is write the position of memory priority level in packet priority list and the packet, and transmit this packet with this comprehensive priority as priority.
After priority of data packets was determined, packet advanced formation, prepared scheduling.
The 3rd, because the packet priority of advanced level user is 15, customer group 1 priority of data packets that sends is 5, therefore, in router one, can comprise priority be 5 and priority be two formations of 15.If no priority is 15 buffer queue in router one, then can a newly-built formation deposit priority and be 15 packet.Then, according to priority size and the formula (2) of two formations, can calculate and obtain the allocated bandwidth ratio.Wherein, the allocated bandwidth of advanced level user ratio is 75%, and customer group 1 is 25%.Concrete bandwidth is joined table can be as shown in table 3.
Table 3
The bandwidth allocation table
Formation Distribute bandwidth ratio
Priority is 5 25%
Priority is 15 75%
? ?
Customer group 2 sends data through router two, is 10 buffer queue owing to only there is a priority, so need not distribute bandwidth.
Packet is sent to router three, and bandwidth is shared by customer group 1, customer group 2 and advanced level user.Because the priority of customer group 2 is 10,3 buffer queues then appear in the router three.The computation bandwidth distribution ratio, the allocated bandwidth ratio that can get advanced level user is 50%, and customer group 2 is 33.3%, and customer group 1 is 16.7%, and namely router three sends packet with the allocated bandwidth ratio of 3:2:1.
At last, when advanced level user's end of operation, in the time of need exitting network, send to router one earlier and withdraw from request, router one receives this request, and returns a response to the user, and the user exits network.Simultaneously, about the data of this advanced level user, can obtain self corresponding priority so that share other users of this terminal in router one deletion User Priority tabulation and the packet priority list.
The data forwarding method that the embodiment of the invention provides and couple in router, after couple in router receives the terminal data bag, calculate comprehensive priority according to the terminal PRI of source IP address correspondence in the packet and the data type information corresponding data types priority in the packet, and distribute bandwidth by the order of comprehensive priority height, retransmission method is flexible, has effectively improved the quality of network service.
The structural representation of the couple in router that Fig. 5 provides for the embodiment of the invention four.As shown in Figure 5, this couple in router can comprise: receiver module 501, computing module 502, distribution module 503 and forwarding module 504.
Wherein, receiver module 501 is used for the packet that receiving terminal sends, and carries source internet protocol IP address, purpose IP address and data type information in the described packet;
Computing module 502 is used for according to the priority of the described terminal of described source IP address correspondence and described data type information priority that should data type being calculated comprehensive priority, and described comprehensive priority is added in the described packet;
Distribution module 503 is used for described packet is added the buffer queue of described comprehensive priority correspondence, the buffer queue that different comprehensive priorities is corresponding different, and the bandwidth of different buffer queues is divided according to corresponding comprehensive priority height order;
Forwarding module 504 is used for transmitting described packet according to described packet at the addition sequence of affiliated buffer queue.
The couple in router of present embodiment can be for the technical scheme of carrying out method embodiment shown in Figure 1, and its realization principle and technique effect are similar, repeat no more herein.
On the basis of above-described embodiment, further, the distribution module of this couple in router specifically can comprise: search unit and allocation units.
Wherein, search the unit and be used for checking the buffer queue of the comprehensive priority correspondence that has described packet whether.
Allocation units are used for described packet being added the buffer queue afterbody of the comprehensive priority correspondence of described packet when the buffer queue of the comprehensive priority correspondence of described packet has existed; When not existing, the buffer queue of the comprehensive priority correspondence of newly-built described packet, and according to the comprehensive priority height order of the buffer queue correspondence of remain to be transmitted data, remain to be transmitted the buffer queue distribution bandwidth of data again for institute.
Further, allocation units also are used for:
When all packets forwardings in the buffer queue of free generalization priority correspondence are finished above setting-up time, according to the comprehensive priority height order of the buffer queue correspondence of remain to be transmitted data, remain to be transmitted the buffer queue distribution bandwidth of data again for institute.
The computing module of couple in router specifically comprises: computing unit and comparing unit.
Wherein, computing unit is used for according to the priority of the described terminal of described source IP address correspondence and described data type information priority that should data type being calculated comprehensive priority.
Comparing unit is used for when described packet also carries priority, the priority of carrying in the described packet is compared with the comprehensive priority that calculates, if the priority of carrying in the described packet is higher than described comprehensive priority, then with the priority of carrying in the described packet as comprehensive priority.
Further, the receiver module of couple in router also is used for receiving the network service quality request that described terminal sends, and carries IP address, account information and the encrypted message of described terminal in the described network service quality request.
On the basis of above-described embodiment, this couple in router also comprises authentication module and sending module.
Wherein, authentication module is used for carrying out two-way authentication according to IP address, account information and encrypted message and the described terminal of described terminal.
Sending module is used for when described two-way authentication is passed through, IP address, account information and the encrypted message of described terminal are sent to certificate server, so that described certificate server is inquired about the priority of described terminal according to IP address, account information and the encrypted message of described terminal.
Further, receiver module also be used for to receive the precedence information of the described terminal that described certificate server returns.
The couple in router of present embodiment can be for the technical scheme of carrying out above-mentioned arbitrary method embodiment, and its realization principle and technique effect are similar, repeat no more herein.
One of ordinary skill in the art will appreciate that: all or part of step that realizes above-mentioned each method embodiment can be finished by the relevant hardware of program command.Aforesaid program can be stored in the computer read/write memory medium.This program is carried out the step that comprises above-mentioned each method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above each embodiment is not intended to limit only in order to technical scheme of the present invention to be described; Although the present invention has been described in detail with reference to aforementioned each embodiment, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment puts down in writing, and perhaps some or all of technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the scope of various embodiments of the present invention technical scheme.

Claims (10)

1. a data forwarding method is characterized in that, comprising:
The packet that the couple in router receiving terminal sends carries source internet protocol IP address, purpose IP address and data type information in the described packet;
Described couple in router calculates comprehensive priority according to the priority of the described terminal of described source IP address correspondence and described data type information to priority that should data type, and described comprehensive priority is added in the described packet;
Described couple in router adds described packet in the buffer queue of described comprehensive priority correspondence, the buffer queue that different comprehensive priorities is corresponding different, and the bandwidth of different buffer queues is divided according to corresponding comprehensive priority height order;
Described couple in router is transmitted described packet according to the addition sequence of described packet in affiliated buffer queue.
2. method according to claim 1 is characterized in that, described couple in router calculates after the comprehensive priority priority that should data type according to the priority of the described terminal of described source IP address correspondence and described data type information, also comprises:
Described couple in router is checked the buffer queue of the comprehensive priority correspondence that has described packet whether;
If exist, then described packet is added the buffer queue afterbody of the comprehensive priority correspondence of described packet; If do not exist, the buffer queue of the comprehensive priority correspondence of the newly-built described packet of described couple in router then, and according to the comprehensive priority height order of the buffer queue correspondence of remain to be transmitted data, remain to be transmitted the buffer queue distribution bandwidth of data again for institute.
3. method according to claim 2 is characterized in that, described method also comprises:
If transmitting, finish above setting-up time all packets in the buffer queue of free generalization priority correspondence, then according to the comprehensive priority height order of the buffer queue correspondence of remain to be transmitted data, remain to be transmitted the buffer queue distribution bandwidth of data again for institute.
4. according to each described method of claim 1-3, it is characterized in that, also carry priority in the described packet, then described couple in router calculates after the comprehensive priority priority that should data type according to the priority of the described terminal of described source IP address correspondence and described data type information, also comprises:
Described couple in router is compared the priority of carrying in the described packet with the comprehensive priority that calculates, if the priority of carrying is higher than described comprehensive priority in the described packet, then with the priority of carrying in the described packet as comprehensive priority.
5. according to each described method of claim 1-4, it is characterized in that, before the packet that described couple in router receiving terminal sends, also comprise:
Described couple in router receives the network service quality request that described terminal sends, and carries IP address, account information and the encrypted message of described terminal in the described network service quality request;
Described couple in router carries out two-way authentication according to IP address, account information and encrypted message and the described terminal of described terminal;
If described two-way authentication is passed through, described couple in router sends to certificate server with IP address, account information and the encrypted message of described terminal, so that described certificate server is inquired about the priority of described terminal according to IP address, account information and the encrypted message of described terminal;
Described couple in router receives the precedence information of the described terminal that described certificate server returns.
6. a couple in router is characterized in that, comprising:
Receiver module is used for the packet that receiving terminal sends, and carries source internet protocol IP address, purpose IP address and data type information in the described packet;
Computing module is used for according to the priority of the described terminal of described source IP address correspondence and described data type information priority that should data type being calculated comprehensive priority, and described comprehensive priority is added in the described packet;
Distribution module, for the buffer queue that described packet is added described comprehensive priority correspondence, the buffer queue that different comprehensive priorities is corresponding different, the bandwidth of different buffer queues is divided according to corresponding comprehensive priority height order;
Forwarding module is used for transmitting described packet according to described packet at the addition sequence of affiliated buffer queue.
7. couple in router according to claim 6 is characterized in that, described distribution module comprises:
Search the unit, be used for checking the buffer queue of the comprehensive priority correspondence that has described packet whether;
Allocation units are used for described packet being added the buffer queue afterbody of the comprehensive priority correspondence of described packet when the buffer queue of the comprehensive priority correspondence of described packet has existed; When not existing, the buffer queue of the comprehensive priority correspondence of newly-built described packet, and according to the comprehensive priority height order of the buffer queue correspondence of remain to be transmitted data, remain to be transmitted the buffer queue distribution bandwidth of data again for institute.
8. couple in router according to claim 7 is characterized in that, described allocation units also are used for:
When all packets forwardings in the buffer queue of free generalization priority correspondence are finished above setting-up time, according to the comprehensive priority height order of the buffer queue correspondence of remain to be transmitted data, remain to be transmitted the buffer queue distribution bandwidth of data again for institute.
9. according to each described couple in router of claim 6-8, it is characterized in that described computing module specifically comprises:
Computing unit is used for according to the priority of the described terminal of described source IP address correspondence and described data type information priority that should data type being calculated comprehensive priority;
Also comprise:
Comparing unit, be used for when described packet also carries priority, the priority of carrying in the described packet is compared with the comprehensive priority that calculates, if the priority of carrying in the described packet is higher than described comprehensive priority, then with the priority of carrying in the described packet as comprehensive priority.
10. according to each described couple in router of claim 6-9, it is characterized in that:
Described receiver module also is used for receiving the network service quality request that described terminal sends, and carries IP address, account information and the encrypted message of described terminal in the described network service quality request;
Described couple in router also comprises:
Authentication module is used for carrying out two-way authentication according to IP address, account information and encrypted message and the described terminal of described terminal;
Sending module, be used for when described two-way authentication is passed through, IP address, account information and the encrypted message of described terminal are sent to certificate server, so that described certificate server is inquired about the priority of described terminal according to IP address, account information and the encrypted message of described terminal;
Described receiver module also be used for to receive the precedence information of the described terminal that described certificate server returns.
CN201310148173.3A 2013-04-25 2013-04-25 Data forwarding method and couple in router Active CN103269320B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310148173.3A CN103269320B (en) 2013-04-25 2013-04-25 Data forwarding method and couple in router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310148173.3A CN103269320B (en) 2013-04-25 2013-04-25 Data forwarding method and couple in router

Publications (2)

Publication Number Publication Date
CN103269320A true CN103269320A (en) 2013-08-28
CN103269320B CN103269320B (en) 2016-01-20

Family

ID=49012929

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310148173.3A Active CN103269320B (en) 2013-04-25 2013-04-25 Data forwarding method and couple in router

Country Status (1)

Country Link
CN (1) CN103269320B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104320354A (en) * 2014-10-21 2015-01-28 中国联合网络通信集团有限公司 Data processing method and device
CN105450550A (en) * 2015-11-10 2016-03-30 北京奇虎科技有限公司 Channel priority adjustment method and device for router
CN105516018A (en) * 2014-09-23 2016-04-20 博雅网络游戏开发(深圳)有限公司 Network data transmission method and apparatus
CN105743788A (en) * 2016-01-26 2016-07-06 北京小米移动软件有限公司 Data packet forwarding method and device
CN107634915A (en) * 2017-08-25 2018-01-26 中国科学院计算机网络信息中心 Data transmission method, device and storage medium
CN108848009A (en) * 2018-05-11 2018-11-20 郑州易湃科技有限公司 Networking management method and networking managing device based on router
CN109391562A (en) * 2017-08-10 2019-02-26 东软集团股份有限公司 A kind of priority dispatching method, device and firewall
CN112291092A (en) * 2020-10-28 2021-01-29 太仓市同维电子有限公司 Dynamic service quality priority classification method based on user behavior analysis
CN113315720A (en) * 2021-04-23 2021-08-27 深圳震有科技股份有限公司 Data flow control method, system and equipment
CN115150282A (en) * 2021-03-30 2022-10-04 南宁富联富桂精密工业有限公司 Bandwidth dynamics a distribution method Router and computer-readable storage medium
CN115357410A (en) * 2022-08-24 2022-11-18 北京科云时代信息技术有限公司 Data cross-process compression storage method and system based on big data
WO2023240998A1 (en) * 2022-06-15 2023-12-21 Oppo广东移动通信有限公司 Data packet processing method, communication chip and computer device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1422061A (en) * 2002-12-27 2003-06-04 北京邮电大学 Method of ensuring service grade protocol in multijob multiuser service platform
CN1531250A (en) * 2003-03-13 2004-09-22 ��Ϊ�������޹�˾ Repeating controlling method for customer message
CN102136096A (en) * 2010-12-15 2011-07-27 华为软件技术有限公司 Dynamic traffic control method and device for service and concurrency control system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1422061A (en) * 2002-12-27 2003-06-04 北京邮电大学 Method of ensuring service grade protocol in multijob multiuser service platform
CN1531250A (en) * 2003-03-13 2004-09-22 ��Ϊ�������޹�˾ Repeating controlling method for customer message
CN102136096A (en) * 2010-12-15 2011-07-27 华为软件技术有限公司 Dynamic traffic control method and device for service and concurrency control system

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105516018A (en) * 2014-09-23 2016-04-20 博雅网络游戏开发(深圳)有限公司 Network data transmission method and apparatus
CN105516018B (en) * 2014-09-23 2018-12-18 博雅网络游戏开发(深圳)有限公司 network data transmission method and device
CN104320354B (en) * 2014-10-21 2018-01-12 中国联合网络通信集团有限公司 A kind of processing method and processing device of data
CN104320354A (en) * 2014-10-21 2015-01-28 中国联合网络通信集团有限公司 Data processing method and device
CN105450550B (en) * 2015-11-10 2019-02-12 北京奇虎科技有限公司 The channel priorities method of adjustment and device of router
CN105450550A (en) * 2015-11-10 2016-03-30 北京奇虎科技有限公司 Channel priority adjustment method and device for router
CN109510783A (en) * 2015-11-10 2019-03-22 北京奇虎科技有限公司 The channel priorities method of adjustment and device of router
CN105743788A (en) * 2016-01-26 2016-07-06 北京小米移动软件有限公司 Data packet forwarding method and device
CN109391562B (en) * 2017-08-10 2022-04-05 东软集团股份有限公司 Priority scheduling method and device and firewall
CN109391562A (en) * 2017-08-10 2019-02-26 东软集团股份有限公司 A kind of priority dispatching method, device and firewall
CN107634915A (en) * 2017-08-25 2018-01-26 中国科学院计算机网络信息中心 Data transmission method, device and storage medium
CN108848009A (en) * 2018-05-11 2018-11-20 郑州易湃科技有限公司 Networking management method and networking managing device based on router
CN112291092A (en) * 2020-10-28 2021-01-29 太仓市同维电子有限公司 Dynamic service quality priority classification method based on user behavior analysis
CN115150282A (en) * 2021-03-30 2022-10-04 南宁富联富桂精密工业有限公司 Bandwidth dynamics a distribution method Router and computer-readable storage medium
CN113315720A (en) * 2021-04-23 2021-08-27 深圳震有科技股份有限公司 Data flow control method, system and equipment
WO2023240998A1 (en) * 2022-06-15 2023-12-21 Oppo广东移动通信有限公司 Data packet processing method, communication chip and computer device
CN115357410A (en) * 2022-08-24 2022-11-18 北京科云时代信息技术有限公司 Data cross-process compression storage method and system based on big data
CN115357410B (en) * 2022-08-24 2024-03-29 锐仕方达人才科技集团有限公司 Data cross-process compressed storage method and system based on big data

Also Published As

Publication number Publication date
CN103269320B (en) 2016-01-20

Similar Documents

Publication Publication Date Title
CN103269320A (en) Data forwarding method and access router
Acer et al. Timely data delivery in a realistic bus network
CN106067858B (en) Communication means, apparatus and system between container
CN102857414B (en) A kind of forwarding table write-in, message forwarding method and device
CN109088829A (en) A kind of data dispatching method, device, storage medium and equipment
CN101163117B (en) Packet management method, packet resource sharing method and instant communication equipment
CN109684408A (en) Data managing method, device, medium and the electronic equipment of block catenary system
Chen et al. CrowdExpress: a probabilistic framework for on-time crowdsourced package deliveries
CN108429701A (en) network acceleration system
CN101854299A (en) Dynamic load balancing method of release/subscription system
CN111126988B (en) Block chain-based transfer method, device, equipment and computer medium
CN109041248A (en) A kind of car networking resource allocation methods, device, computing device and storage medium
CN109818917A (en) A kind of communication means and its device
CN104184663A (en) Communication method and device based on software-defined network and integrated identification network
CN107959695A (en) A kind of data transmission method and device
CN104009928A (en) Method and device for limiting speed of data flow
CN111507747A (en) Block chain point exchange mileage system
Manna et al. Online stochastic planning for taxi and ridesharing
CN107483355B (en) Data center-oriented online scene low-bandwidth overhead traffic scheduling scheme
CN105991755A (en) Service message distribution method and service message distribution device
Lin et al. Scheduling algorithms for time-constrained big-file transfers in the Internet of Vehicles
CN106169137A (en) A kind of resource transfers method, Apparatus and system
CN103905375B (en) Data encryption request distribution method and device in concentrating type data encryption system
CN109005122A (en) File transmitting method, device and the network equipment
CN110139242A (en) A kind of data transmission method, device, equipment and computer readable storage medium

Legal Events

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