CN102404214B - Bandwidth distribution method, device and network equipment - Google Patents

Bandwidth distribution method, device and network equipment Download PDF

Info

Publication number
CN102404214B
CN102404214B CN201110369294.1A CN201110369294A CN102404214B CN 102404214 B CN102404214 B CN 102404214B CN 201110369294 A CN201110369294 A CN 201110369294A CN 102404214 B CN102404214 B CN 102404214B
Authority
CN
China
Prior art keywords
user
ethernet frame
data volume
sent
output queue
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.)
Active
Application number
CN201110369294.1A
Other languages
Chinese (zh)
Other versions
CN102404214A (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.)
Fujian Star Net Communication Co Ltd
Original Assignee
Fujian Star Net Communication 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 Fujian Star Net Communication Co Ltd filed Critical Fujian Star Net Communication Co Ltd
Priority to CN201110369294.1A priority Critical patent/CN102404214B/en
Publication of CN102404214A publication Critical patent/CN102404214A/en
Application granted granted Critical
Publication of CN102404214B publication Critical patent/CN102404214B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a bandwidth distribution method, a device and a piece of network equipment. The method comprises the following steps: classifying the Ethernet frames in the output queues on an Ethernet port according to user characteristics, and generating the output queues corresponding to each user; respectively determining the Ethernet frames of each user to be transmitted according to the distributed bandwidth of each user and the length of the Ethernet frame in the output queue corresponding to the user; and adding the Ethernet frames of each user to be transmitted to a hardware transmitting queue and transmitting to Ethernet lines. The device comprises a classifying module, a calculating module and a transmitting module. The network equipment comprises the bandwidth distribution device. The bandwidth distribution mechanism of the invention is simple, so the calculation resource consumption of the system is little.

Description

Bandwidth allocation methods, device and the network equipment
Technical field
The present invention relates to the communication technology, relate in particular to a kind of bandwidth allocation methods, device and the network equipment.
Background technology
Ethernet (Ethernet) is as a kind of LAN (Local Area Network) networking technology, it is the local area network technology that current application is the most general, IEEE802.3 standard has provided the technical standard of Ethernet, and it has stipulated to comprise the content of line, the signal of telecommunication and the medium access layer protocol of physical layer.The standard topology structure of Ethernet is bus-type topology, but current Fast Ethernet is in order farthest to reduce conflict, farthest improve network speed and service efficiency, use switch (switch hub) to carry out network connection and tissue, so just, form star-like Ethernet topological structure, but logically still used bus-type topological sum csma/cd (Carrier Sense Multiple Access/Collision Detect; Hereinafter to be referred as: bus conflict technology CSMA/CD).Allocated bandwidth is a kind of technology conventional on current various communication line, for controlling the bandwidth of the shared circuit of certain Business Stream.
In prior art, be (the Quality of Service of configuration service quality on Ethernet interface for the most frequently used Bandwidth sharing mechanism of Ethernet; Hereinafter to be referred as: QoS) business, to formulate the priority of the IP load of each ethernet frame by identification services stream, then enter different queues according to different priorities, the bandwidth taking according to each queue is calculated the quantity of the frame that send to circuit.
But, the Bandwidth sharing mechanism more complicated of prior art is larger to the calculation resources consumption of system.
Summary of the invention
First aspect of the present invention is to provide a kind of bandwidth allocation methods, comprising:
According to user characteristics, the ethernet frame in output queue on Ethernet interface is classified, and generate output queue corresponding to each user;
The length of each ethernet frame in output queue corresponding to the bandwidth being assigned with according to described each user and described each user, determines respectively described each user's ethernet frame to be sent;
Successively described each user's ethernet frame to be sent is joined in hardware transmit queue and sent to ether circuit.
Another aspect of the present invention is to provide a kind of allocated bandwidth device, comprising:
Sort module, for according to user characteristics, the ethernet frame of output queue on Ethernet interface being classified, and generates output queue corresponding to each user;
Computing module, for the length of the bandwidth that is assigned with according to described each user and the each ethernet frame of output queue corresponding to described each user, determines respectively described each user's ethernet frame to be sent;
Sending module, sends to ether circuit for successively described each user's ethernet frame to be sent being joined to hardware transmit queue.
Another aspect of the present invention is to provide a kind of network equipment, comprises above-mentioned allocated bandwidth device.
Technique effect of the present invention is: according to user characteristics, the ethernet frame in output queue on Ethernet interface is divided in output queue corresponding to each user, the length of each ethernet frame in the bandwidth being assigned with according to user and corresponding output queue, determine user's ethernet frame to be sent, and each user's ethernet frame to be sent is joined in hardware transmit queue and sent to ether circuit; The present invention carries out simple analysis calculating by the length of ethernet frame in bandwidth that user is assigned with and output queue, just can realize the accurate control of the band width in physical that the data of different user are taken on ether circuit, Bandwidth sharing mechanism of the present invention is fairly simple, consumes less to the calculation resources of system.
Accompanying drawing explanation
Fig. 1 is the flow chart of bandwidth allocation methods embodiment mono-of the present invention;
Fig. 2 is the flow chart of bandwidth allocation methods embodiment bis-of the present invention;
Fig. 3 is bandwidth allocation schematic diagram one in bandwidth allocation methods embodiment bis-of the present invention;
Fig. 4 is bandwidth allocation schematic diagram two in bandwidth allocation methods embodiment bis-of the present invention;
Fig. 5 is the transformat schematic diagram of ethernet frame in bandwidth allocation methods embodiment bis-of the present invention;
Fig. 6 is bandwidth allocation schematic diagram three in bandwidth allocation methods embodiment bis-of the present invention;
Fig. 7 is bandwidth allocation schematic diagram four in bandwidth allocation methods embodiment bis-of the present invention;
Fig. 8 is the structural representation of allocated bandwidth device embodiment mono-of the present invention;
Fig. 9 is the structural representation of allocated bandwidth device embodiment bis-of the present invention.
Embodiment
Fig. 1 is the flow chart of bandwidth allocation methods embodiment mono-of the present invention, and as shown in Figure 1, the present embodiment provides a kind of bandwidth allocation methods, can specifically comprise the steps:
Step 101, classifies the ethernet frame in output queue on Ethernet interface according to user characteristics, and generates output queue corresponding to each user.
The present embodiment provides a kind of Bandwidth sharing mechanism at Ethernet transmitting data, and Ethernet herein can be specially two Ethernets that website connects in a system, does not comprise the Ethernet that connects multiple autonomous systems.Transmit data between any two ethernet devices time, the bandwidth that need to take every service traffics is controlled, concrete by the scheduling controlling to each ethernet frame, within the bandwidth of each CU is limited in respectively to the bandwidth being assigned with separately.This step describes with the example that is scheduling to of the ethernet frame in output queue on certain Ethernet interface, according to user characteristics, the ethernet frame in output queue on Ethernet interface is classified, specifically can be according to the VLAN of ethernet frame in output queue (Virtual Local Area Network; Hereinafter to be referred as: VLAN) mark (Identifier; Hereinafter to be referred as: ID) classify, also can be according to the medium access control of ethernet frame (Media Access Control; Hereinafter to be referred as: MAC) classify in address, and generate output queue corresponding to each user, is about to classification ethernet frame afterwards and keeps in respectively in different output queues, the corresponding output queue of each user.
Step 102, the length of each ethernet frame in output queue corresponding to the bandwidth being assigned with according to described each user and described each user, determines respectively described each user's ethernet frame to be sent.
Ethernet frame is being classified after processing, according to the length of each ethernet frame and the bandwidth that each user is assigned with in output queue corresponding to each user after classification, determining respectively each user's ethernet frame to be sent.In output queue corresponding to each user, may comprise the ethernet frame of varying number, in output queue, the length of ethernet frame is different, and bandwidth shared when each ethernet frame transmits on physical circuit is different, and the bandwidth that system is each user assignment is not identical yet.This step is by the length of each ethernet frame in output queue corresponding to analysis user, the bandwidth being assigned with in conjunction with user, determine this user's ethernet frame to be sent, within making the restriction of the bandwidth that the data volume summation of the ethernet frame to be sent of determining is assigned with this user.The present embodiment, take each dispatching cycle as unit, carrys out the ethernet frame that the each user of Analysis deterrmination can send in each dispatching cycle.
Step 103, joins described each user's ethernet frame to be sent in hardware transmit queue and sends to ether circuit successively.
Determining after each user's ethernet frame to be sent, successively the each user's who determines ethernet frame to be sent is joined in hardware transmit queue, complete the once scheduling to ethernet frame in output queue, ethernet frame to be sent is sent to ether circuit by the follow-up sequencing that enters queue according to each ethernet frame to be sent in hardware transmit queue.
The present embodiment provides a kind of bandwidth allocation methods, according to user characteristics, the ethernet frame in output queue on Ethernet interface is divided in output queue corresponding to each user, the length of each ethernet frame in the bandwidth being assigned with according to user and corresponding output queue, determine user's ethernet frame to be sent, and each user's ethernet frame to be sent is joined in hardware transmit queue and sent to ether circuit; The present embodiment carries out simple analysis calculating by the length of ethernet frame in bandwidth that user is assigned with and output queue, just can realize the accurate control of the band width in physical that the data of different user are taken on ether circuit, the Bandwidth sharing mechanism of the present embodiment is fairly simple, consumes less to the calculation resources of system.
Fig. 2 is the flow chart of bandwidth allocation methods embodiment bis-of the present invention, and as shown in Figure 2, the present embodiment provides a kind of bandwidth allocation methods, can specifically comprise the steps:
Step 201, classifies the ethernet frame in output queue on Ethernet interface according to user characteristics, and generates output queue corresponding to each user.
This step describes with the example that is scheduling to of the ethernet frame in output queue on certain Ethernet interface, according to user characteristics, the ethernet frame in output queue on Ethernet interface is classified, and generate output queue corresponding to each user, be about to classification ethernet frame afterwards and keep in respectively in different output queues, the corresponding output queue of each user.Fig. 3 is bandwidth allocation schematic diagram one in bandwidth allocation methods embodiment bis-of the present invention, as shown in Figure 3, after ethernet frame 1-22 in output queue on certain ether interface is classified, be divided into respectively in output queue corresponding to each user, be divided into user's 1 output queue by ethernet frame 1,2,5,6,7, ethernet frame 3,4,8,9,10 is divided into user's 2 output queues, ethernet frame 11,12,13,14,15,17 is divided into user's 3 output queues, ethernet frame 16,18,19,20,21,22 is divided into user's 4 output queues.
Step 202 is calculated this interval according to the system time of this scheduling of record and the system time of last scheduled scheduling time.
In the present embodiment, take dispatching cycle as unit, the ethernet frame in output queue corresponding to each user is sent to control, in system, each user's dispatching cycle is identical, but the time of each dispatching cycle may be different, specifically adjusted according to actual schedule situation by system, be generally 100us left and right.In first dispatching cycle, current system for the first time dispatched users output queue sends, and supposes not 150us dispatching cycle.In first dispatching cycle, only record the system time of this scheduling, and local scheduling does not carry out any processing to user's data, will or not join in hardware transmit queue user's data.In the time dispatching for the second time, still record the system time of this scheduling, calculate this interval according to the system time of this scheduling and the system time of last scheduled of record, two system times that are about to record are got difference, can suppose that difference is 160us herein scheduling time.
Step 203, according to described this scheduling time interval and the bandwidth that is assigned with of described each user calculate respectively the data volume that described each user can send in this dispatching cycle.
Calculating behind this interval, this step is the bandwidth being assigned with according to the local scheduling time interval and each user, specifically calculates the data volume that each user can send in this dispatching cycle scheduling time.Fig. 4 is bandwidth allocation schematic diagram two in bandwidth allocation methods embodiment bis-of the present invention, as shown in Figure 4, the bandwidth that user 1, user 2, user 3 and user 4 are assigned with is respectively 16Mbps, 10Mbps, 4Mbps and 30Mbps, this scheduling time of calculating due to above-mentioned steps 202 is spaced apart 160us, the data volume that user 1 can send is 2560bit, the data volume that user 2 can send is 1600bit, the data volume that user 3 can send is 640bit, and the data volume that user 4 can send is 4800bit.
Step 204, obtain respectively data volume correction value corresponding to described each user, data volume correction value corresponding to described each user is respectively the difference of the data volume that data volume that described each user sends in the last scheduled cycle and described user can send in the last scheduled cycle.
In the present embodiment, the bandwidth that the user's who sends in each dispatching cycle data volume is assigned with take user is limit, but because the length of each ethernet frame in output queue corresponding to user is different, therefore the data volume that the definite user of above-mentioned steps 203 can send can is a bit larger tham or be slightly smaller than to the data volume sending in each dispatching cycle in the present embodiment, and the data volume that exists a correction value can send user is revised.This step is to obtain respectively data volume correction value corresponding to each user, and this data volume correction value is different for each dispatching cycle, need in each dispatching cycle, calculate respectively.In the present embodiment, data volume correction value corresponding to each user is respectively the difference of the data volume that data volume that each user sends in the last scheduled cycle and user can send in the last scheduled cycle.In the present embodiment, represent this interval take us as unit with t scheduling time; Represent with w the bandwidth that the user take Mbps as unit is assigned with; With s 1represent that the ethernet frame sending this dispatching cycle exceedes the quantity of the data volume that can send in this dispatching cycle, unit is bit; With s 2represent that the ethernet frame sending this dispatching cycle is less than the quantity of the data volume that can send in this dispatching cycle, unit is bit; With s 3represent that the ethernet frame of last scheduled cycle transmission exceedes the quantity of the data volume that can send in the last scheduled cycle, unit is bit; With s 4represent that the ethernet frame of last scheduled cycle transmission is less than the quantity of the data volume that can send in the last scheduled cycle, unit is bit.Data volume correction value corresponding to user of obtaining in this step can be expressed as (s 3-s 4).
Step 205, the length of each ethernet frame in output queue corresponding to data volume correction value corresponding to the data volume that can send in this dispatching cycle according to described each user, described each user, default data volume preset value and each user, determines respectively the quantity of the to be sent ethernet frame of described each user in this dispatching cycle.
Getting by above-mentioned steps after data volume correction value corresponding to data volume that each user can send in this dispatching cycle and each user, the length of each ethernet frame in output queue corresponding to data volume correction value corresponding to data volume, each user that this step can send according to user in this dispatching cycle, default data volume preset value and each user, determines respectively the quantity of the to be sent ethernet frame of each user in this dispatching cycle.Wherein, default data volume preset value can be used s 5represent, unit is bit, represents to send in predefined each dispatching cycle the quantity that band width in physical that ethernet frame takies can exceed bandwidth.
Fig. 5 is the transformat schematic diagram of ethernet frame in bandwidth allocation methods embodiment bis-of the present invention, as shown in Figure 5, ethernet frame transmits on physical circuit according to the form shown in figure, when an ethernet frame transmits on physical circuit, following field except seeing in system: destination address (Destination Address), source address (Source Address), type length (Type Length) and data (Data), also comprise cyclic redundancy check (CRC) (the Cyclic Redundancy Check of postamble; Hereinafter to be referred as: CRC) frame gap (the InterFrame Gap of field, frame front portion; Hereinafter to be referred as: IFG) field, leading (Preamble) field and starting-frame delimiter (Start Frame Delimiter; Hereinafter to be referred as: SFD) field, it is that an ethernet frame transmits shared band width in physical on the line that these fields are added together.
Continue referring to above-mentioned Fig. 4, in the transmit queue of user's 1 correspondence, the length of supposing frame 1 is 64 bytes, and the length of frame 2 is 70 bytes, and the length of frame 5 is 120 bytes, and the length of frame 6 is 110 bytes, and the length of frame 7 is 220 bytes; In the transmit queue of user's 2 correspondences, the length of supposing frame 3 is 80 bytes, and the length of frame 4 is 75 bytes, and the length of frame 8 is 160 bytes, and the length of frame 9 is 220 bytes, and the length of frame 10 is 260 bytes; In the transmit queue of user's 3 correspondences, the length of supposing frame 11 is 90 bytes, and the length of frame 12 is 100 bytes, and the length of frame 13 is 190 bytes, and the length of frame 14 is 700 bytes, and the length of frame 15 is 210 bytes, and the length of frame 17 is 90 bytes; In the transmit queue of user's 4 correspondences, the length of supposing frame 16 is 65 bytes, and the length of frame 18 is 90 bytes, and the length of frame 19 is 100 bytes, and the length of frame 20 is 110 bytes, and the length of frame 21 is 111 bytes, and the length of frame 22 is 590 bytes.
In this step, can specifically adopt following formula (1) to calculate the quantity of the to be sent ethernet frame of each user in this dispatching cycle:
&Sigma; i = 1 n F i < ( t &times; w - s 3 + s 4 + s 5 ) - - - ( 1 )
Wherein, F irepresent i ethernet frame in output queue, n is positive integer.By the length of each ethernet frame in output queue corresponding to each user is carried out to analytical calculation, can get the n value that meets condition shown in above-mentioned formula (1).The data volume of the user's who meets formula (1) condition who obtains n ethernet frame to be sent is less than difference and the data volume preset value sum of data volume that this user can send in this dispatching cycle data volume correction value corresponding with this user.Still take above-mentioned Fig. 4 as example, obtain by analytical calculation, the quantity n of the to be sent ethernet frame of user 1 in this dispatching cycle is 3, the quantity n of the to be sent ethernet frame of user 2 in this dispatching cycle is 2, the quantity n of the to be sent ethernet frame of user 3 in this dispatching cycle is 1, and the quantity n of the to be sent ethernet frame of user 4 in this dispatching cycle is 5.
Step 206, the quantity of the described ethernet frame to be sent according to described each user in this dispatching cycle, definite described each user's ethernet frame to be sent from output queue corresponding to described each user.
Getting after the quantity n of the ethernet frame to be sent of each user in this dispatching cycle, from output queue corresponding to each user, determining each user's ethernet frame to be sent according to this quantity, determining according to putting in order of ethernet frame in output queue.For user 1, the ethernet frame to be sent of determining is the frame 1,2,5 that comes first 3 of output queue; For user 2, the ethernet frame to be sent of determining is the frame 3,4 that comes first 2 of output queue; For user 3, the ethernet frame to be sent of determining is the frame 11 that comes first 1 of output queue; For user 4, the ethernet frame to be sent of determining is the frame 16,18,19,29,21 that comes first 5 of output queue.
Step 207, joins described each user's ethernet frame to be sent in hardware transmit queue and sends to ether circuit successively.
Determining after each user's ethernet frame to be sent, successively each user's ethernet frame to be sent is joined in hardware transmit queue according to user's order, as shown in Figure 4, and according to the front and back order that in hardware transmit queue, each frame is arranged ethernet frame to be sent is sent to ether circuit.
Further, the bandwidth allocation methods that the present embodiment provides can also comprise: in the time that the quantity of the to be sent ethernet frame of a user who determines in this dispatching cycle is zero, in described this dispatching cycle, the ethernet frame in output queue corresponding to described user is not dispatched.The i.e. analytical calculation of the length of ethernet frame in by bandwidth that user is assigned with and output queue corresponding to this user, can not find the n value that meets condition shown in above-mentioned formula (1), now represent that the data volume of the ethernet frame that will send in this dispatching cycle is considerably beyond this user operable data volume in this dispatching cycle, while only having dispatch the next time of wait, send again, and in next dispatching cycle, the each parameter in formula (1) is respectively as shown in the formula shown in (2) and (3):
s 3 = s 1 = &Sigma; 1 n F - ( t &times; w - s 3 + s 4 ) - - - ( 2 )
s 4 = s 2 = ( t &times; w - s 3 + s 4 ) - &Sigma; 1 n F - - - ( 3 )
It is to be noted, the step 201-207 of foregoing description is the data dispatch process of transmitting in the dispatching cycle in the present embodiment, when on to whole ether circuit, user data sends, need to repeat above-mentioned steps 201-207, to complete the transmission of all data by multiple dispatching cycles.After the scheduling transmission of ethernet frame that completes this dispatching cycle, can get parameter s 3, s 4value, use when calculating n in next dispatching cycle.Wherein, the ethernet frame that user 1 can send be numbered 1,2,5, obtain taking actual band width in physical for ((64+24)+(70+24)+(120+24)) * 8=2608bit on physical circuit by its frame length calculations, exceed user 1 actual 48bit that allows the data volume 2560bit sending in this dispatching cycle, i.e. s 3=48bit, s 4=0.The numbering of the ethernet frame that user 2 can send is 3,4, on physical circuit, take actual band width in physical for ((80+24)+(75+24)) * 8=1624bit, exceed user 2 actual 24bit that allows the data volume 1600bit sending in this dispatching cycle, i.e. s 3=24bit, s 4=0.The numbering of the ethernet frame that user 3 can send is 11, on physical circuit, take actual band width in physical ((90+24)) * 8=912bit, exceed user 3 actual 272bit that allows the data volume 640bit sending in this dispatching cycle, i.e. s 3=272bit, s 4=0.The numbering of the ethernet frame that user 4 can send is 16,18,19,29,21, on physical circuit, take actual band width in physical ((65+24)+(90+24)+(100+24)+(110+24)+(111+24)) * 8=4768bit, than user 4 actual few 32bit of data volume 4800bit that allows transmission in this dispatching cycle, i.e. s 3=0, s 4=32bit.
Fig. 6 is bandwidth allocation schematic diagram three in bandwidth allocation methods embodiment bis-of the present invention, as shown in Figure 6, in the time dispatching for the third time, records current system time, and the frame of output queue is divided into respectively in output queue corresponding to each user.The time interval of supposing the system time of current record and the system time of a front dispatching record is 155us, can calculate the data volume that user 1 can send in this dispatching cycle is 16*155-48=2480-48=2432bit, the data volume that user 2 can send in this dispatching cycle is 10*155-24=1550-24=1526bit, the data volume that user 3 can send in this dispatching cycle is 4*155-272=620-272=348bit, the data volume that user 4 can send in this dispatching cycle is 40*155+32=4650+32=4682bit.
Fig. 7 is bandwidth allocation schematic diagram four in bandwidth allocation methods embodiment bis-of the present invention, as shown in Figure 7, in the output queue of user's 1 correspondence, suppose that frame 6 length are 90 bytes, the length of frame 7 is 80 bytes, the length of frame 25 is 120 bytes, and frame 28 length are 110 bytes, and the length of frame 31 is 230 bytes.In the output queue of user's 2 correspondences, suppose that frame 8 length are 80 bytes, frame 9 length are 85 bytes, and frame 10 length are 170 bytes, and frame 32 length are 120 bytes, and frame 33 length are 710 bytes.In the output queue of user's 3 correspondences, suppose that frame 12 is 100 bytes, frame 13 is 190 bytes, and frame 14 is 700 bytes, and frame 15 length are 210 bytes, and frame 17 length are 90 bytes, frame 17 length are 76 bytes.In the output queue of user's 4 correspondences, suppose that frame 22 length are 590 bytes, frame 23 length are 190 bytes, and frame 24 length are 180 bytes, and frame 27 length are 220 bytes, frame 29 length are 124 bytes, frame 30 length are 106 bytes, and frame 35 length are 170 bytes, and frame 36 length are 490 bytes, frame 37 length are 690 bytes, and frame 38 length are 890 bytes.Suppose s in this dispatching cycle 5can value be 500bit, obtain by analytical calculation, the frame number that user 1 can send is 1,2,5, it takies actual band width in physical for ((90+24)+(80+24)+(120+24)) * 8=2896bit on physical circuit, exceedes user 1 actual 464bit that allows the data volume sending in this dispatching cycle.The frame number that user 2 can send is 8,9, on physical circuit, take actual band width in physical for ((80+24)+(85+24)) * 8=1704bit, exceed user 1 actual 178bit that allows the data volume sending in this dispatching cycle.User's 3 these scheduling can not send frame, because this frame 12 sending in user 3 needs bandwidth 992bit, and user 3 allows the bandwidth using to only have 348bit in this dispatching cycle, according to known 992 > of above-mentioned computing formula (1) (348+500), the n value not satisfying condition, when the next time scheduling such as therefore only having, could send frame 12; Because this scheduling does not send frame, therefore the bandwidth of 348bit has been saved in this scheduling, can in scheduling next time, use.The frame number that user 4 can send is 22, takies actual band width in physical for ((590+24)) * 8=4912bit on physical circuit, exceedes actual bandwidth 230bit.
The present embodiment provides a kind of bandwidth allocation methods, according to user characteristics, the ethernet frame in output queue on Ethernet interface is divided in output queue corresponding to each user, the length of each ethernet frame in the bandwidth being assigned with according to user and corresponding output queue, determine user's ethernet frame to be sent, and each user's ethernet frame to be sent is joined in hardware transmit queue and sent to ether circuit; The present embodiment carries out simple analysis calculating by the length of ethernet frame in bandwidth that user is assigned with and output queue, just can realize the accurate control of the band width in physical that the data of different user are taken on ether circuit, the Bandwidth sharing mechanism of the present embodiment is fairly simple, consumes less to the calculation resources of system.
One of ordinary skill in the art will appreciate that: all or part of step that realizes above-mentioned each embodiment of the method can complete by the relevant hardware of program command.Aforesaid program can be stored in a computer read/write memory medium.This program, in the time carrying out, is carried out the step that comprises above-mentioned each embodiment of the method; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CDs.
Fig. 8 is the structural representation of allocated bandwidth device embodiment mono-of the present invention, and as shown in Figure 8, the present embodiment provides a kind of allocated bandwidth device, can specifically carry out each step in said method embodiment mono-, repeats no more herein.The allocated bandwidth device that the present embodiment provides can specifically comprise sort module 801, computing module 802 and sending module 803.Wherein, sort module 801 is for according to user characteristics, the ethernet frame of output queue on Ethernet interface being classified, and generates output queue corresponding to each user.Computing module 802, for the length of the bandwidth that is assigned with according to described each user and the each ethernet frame of output queue corresponding to described each user, is determined respectively described each user's ethernet frame to be sent.Sending module 803 sends to ether circuit for successively described each user's ethernet frame to be sent being joined to hardware transmit queue.
Fig. 9 is the structural representation of allocated bandwidth device embodiment bis-of the present invention, and as shown in Figure 9, the present embodiment provides a kind of allocated bandwidth device, can specifically carry out each step in said method embodiment bis-, repeats no more herein.The allocated bandwidth device that the present embodiment provides is on the basis shown in above-mentioned Fig. 8, and computing module 802 can specifically comprise the first computing unit 812, the second computing unit 822 and frame determining unit 832.Wherein, the first computing unit 812 for calculating this interval according to the system time of this scheduling of record and the system time of last scheduled scheduling time.The second computing unit 822 for according to described this scheduling time interval and the bandwidth that is assigned with of described each user calculate respectively the data volume that described each user can send in this dispatching cycle.Frame determining unit 832, for the length of each ethernet frame in the data volume that can send in this dispatching cycle according to described each user and output queue corresponding to described each user, is determined respectively described each user's ethernet frame to be sent.
More specifically, the frame determining unit 832 in the present embodiment can specifically comprise that obtaining subelement 8321, number of frames determines that subelement 8322 and frame determine subelement 8323.Wherein, obtain subelement 8321 for obtaining respectively data volume correction value corresponding to described each user, data volume correction value corresponding to described each user is respectively the difference of the data volume that data volume that described each user sends in the last scheduled cycle and described user can send in the last scheduled cycle.Number of frames is determined the length of subelement 8322 for each ethernet frame in output queue corresponding to data volume correction value corresponding to the data volume that can send in this dispatching cycle according to described each user, described each user, default data volume preset value and each user, determines respectively the quantity of the to be sent ethernet frame of described each user in this dispatching cycle.Frame determines that subelement 8323 is for the ethernet frame to be sent quantity definite described each user from output queue corresponding to described each user of the described ethernet frame to be sent of this dispatching cycle according to described each user.Wherein, the data volume of a user's ethernet frame to be sent is less than difference and the described data volume preset value sum of data volume that user can send in this dispatching cycle data volume correction value corresponding with described user.
Further, the allocated bandwidth device that the present embodiment provides can also comprise dispatching control module 804, dispatching control module 804, for when a user who determines is in the time that the quantity of the ethernet frame to be sent of this dispatching cycle is zero, is not dispatched the ethernet frame in output queue corresponding to described user in described this dispatching cycle.
The present embodiment provides a kind of allocated bandwidth device, according to user characteristics, the ethernet frame in output queue on Ethernet interface is divided in output queue corresponding to each user, the length of each ethernet frame in the bandwidth being assigned with according to user and corresponding output queue, determine user's ethernet frame to be sent, and each user's ethernet frame to be sent is joined in hardware transmit queue and sent to ether circuit; The present embodiment carries out simple analysis calculating by the length of ethernet frame in bandwidth that user is assigned with and output queue, just can realize the accurate control of the band width in physical that the data of different user are taken on ether circuit, the Bandwidth sharing mechanism of the present embodiment is fairly simple, consumes less to the calculation resources of system.
The present embodiment also provides a kind of network equipment, such as switch, router etc., and this network equipment can specifically comprise the allocated bandwidth device shown in above-mentioned Fig. 8 or Fig. 9.
Finally it should be noted that: above each embodiment, only in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to aforementioned each embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or some or all of technical characterictic is wherein equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (7)

1. a bandwidth allocation methods, is characterized in that, comprising:
According to user characteristics, the ethernet frame in output queue on Ethernet interface is classified, and generate output queue corresponding to each user;
The length of each ethernet frame in output queue corresponding to the bandwidth being assigned with according to described each user and described each user, determines respectively described each user's ethernet frame to be sent;
Successively described each user's ethernet frame to be sent is joined in hardware transmit queue and sent to ether circuit;
Wherein, the length of each ethernet frame in output queue corresponding to the described bandwidth being assigned with according to described each user and described each user, determine that respectively described each user's ethernet frame to be sent comprises:
Calculate this interval according to the system time of this scheduling of record and the system time of last scheduled scheduling time;
According to described this scheduling time interval and the bandwidth that is assigned with of described each user calculate respectively the data volume that described each user can send in this dispatching cycle;
The length of each ethernet frame in output queue corresponding to the data volume that can send in this dispatching cycle according to described each user and described each user, determines respectively described each user's ethernet frame to be sent.
2. method according to claim 1, it is characterized in that, the length of each ethernet frame in output queue corresponding to the described data volume that can send in this dispatching cycle according to described each user and described each user, determine that respectively described each user's ethernet frame to be sent comprises:
Obtain respectively data volume correction value corresponding to described each user, data volume correction value corresponding to described each user is respectively the difference of the data volume that data volume that described each user sends in the last scheduled cycle and described user can send in the last scheduled cycle;
The length of each ethernet frame in output queue corresponding to data volume correction value corresponding to the data volume that can send in this dispatching cycle according to described each user, described each user, default data volume preset value and described each user, determines respectively the quantity of the to be sent ethernet frame of described each user in this dispatching cycle;
The quantity of the described ethernet frame to be sent according to described each user in this dispatching cycle, definite described each user's ethernet frame to be sent from output queue corresponding to described each user;
Wherein, the data volume of a user's ethernet frame to be sent is less than difference and the described data volume preset value sum of data volume that described user can send in this dispatching cycle data volume correction value corresponding with described user.
3. method according to claim 2, it is characterized in that, also comprise: in the time that the quantity of the to be sent ethernet frame of a user who determines in this dispatching cycle is zero, in described this dispatching cycle, the ethernet frame in output queue corresponding to described user is not dispatched.
4. an allocated bandwidth device, is characterized in that, comprising:
Sort module, for according to user characteristics, the ethernet frame of output queue on Ethernet interface being classified, and generates output queue corresponding to each user;
Computing module, for the length of the bandwidth that is assigned with according to described each user and the each ethernet frame of output queue corresponding to described each user, determines respectively described each user's ethernet frame to be sent;
Sending module, sends to ether circuit for successively described each user's ethernet frame to be sent being joined to hardware transmit queue;
Described computing module comprises:
The first computing unit, for calculating this interval according to the system time of this scheduling of record and the system time of last scheduled scheduling time;
The second computing unit, for according to described this scheduling time interval and the bandwidth that is assigned with of described each user calculate respectively the data volume that described each user can send in this dispatching cycle;
Frame determining unit, for the length of each ethernet frame in the data volume that can send in this dispatching cycle according to described each user and output queue corresponding to described each user, determines respectively described each user's ethernet frame to be sent.
5. device according to claim 4, is characterized in that, described frame determining unit comprises:
Obtain subelement, for obtaining respectively data volume correction value corresponding to described each user, data volume correction value corresponding to described each user is respectively the difference of the data volume that data volume that described each user sends in the last scheduled cycle and described user can send in the last scheduled cycle;
Number of frames is determined subelement, for the length of each ethernet frame in output queue corresponding to data volume correction value corresponding to data volume, described each user that can send in this dispatching cycle according to described each user, default data volume preset value and described each user, the quantity of the to be sent ethernet frame of definite described each user in this dispatching cycle respectively;
Frame is determined subelement, for the quantity at the described ethernet frame to be sent of this dispatching cycle according to described each user, determines described each user's ethernet frame to be sent from output queue corresponding to described each user;
Wherein, the data volume of a user's ethernet frame to be sent is less than difference and the described data volume preset value sum of data volume that described user can send in this dispatching cycle data volume correction value corresponding with described user.
6. device according to claim 5, is characterized in that, also comprises:
Dispatching control module for when a user who determines is in the time that the quantity of the ethernet frame to be sent of this dispatching cycle is zero, is not dispatched the ethernet frame in output queue corresponding to described user in described this dispatching cycle.
7. a network equipment, is characterized in that, comprises the allocated bandwidth device described in any one in claim 4-6.
CN201110369294.1A 2011-11-18 2011-11-18 Bandwidth distribution method, device and network equipment Active CN102404214B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110369294.1A CN102404214B (en) 2011-11-18 2011-11-18 Bandwidth distribution method, device and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110369294.1A CN102404214B (en) 2011-11-18 2011-11-18 Bandwidth distribution method, device and network equipment

Publications (2)

Publication Number Publication Date
CN102404214A CN102404214A (en) 2012-04-04
CN102404214B true CN102404214B (en) 2014-06-04

Family

ID=45886017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110369294.1A Active CN102404214B (en) 2011-11-18 2011-11-18 Bandwidth distribution method, device and network equipment

Country Status (1)

Country Link
CN (1) CN102404214B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051567A (en) * 2012-12-28 2013-04-17 武汉烽火网络有限责任公司 Method for realizing non-loss interconnection between exchanged chips of different factories
CN112311695B (en) * 2020-10-21 2022-09-30 中国科学院计算技术研究所 On-chip bandwidth dynamic allocation method and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101888342A (en) * 2010-07-23 2010-11-17 中兴通讯股份有限公司 Bandwidth distribution method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100421151B1 (en) * 2002-01-17 2004-03-04 삼성전자주식회사 Method for implementation procedure in giga bit ethernet passive optical network and ethernet frame structure thereof
CN100518083C (en) * 2005-11-08 2009-07-22 中兴通讯股份有限公司 A realization method to dynamically change maximum length of bandwidth request
JP4659657B2 (en) * 2006-03-28 2011-03-30 富士通株式会社 Frame multiplexer
US20080062988A1 (en) * 2006-09-12 2008-03-13 Brian Daigle Methods, computer program products, and modules for dynamically allocating bandwidth of a subscriber line
CN101465789B (en) * 2007-12-17 2011-06-01 大唐移动通信设备有限公司 Bandwidth distribution control method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101888342A (en) * 2010-07-23 2010-11-17 中兴通讯股份有限公司 Bandwidth distribution method and device

Also Published As

Publication number Publication date
CN102404214A (en) 2012-04-04

Similar Documents

Publication Publication Date Title
CN108965171B (en) Industrial wireless WIA-PA network and time sensitive network conversion method and device
CN112105080B (en) Time-sensitive network data transmission system and transmission method
CN109842868B (en) Frame aggregation and network setting frame sending method and equipment
KR102360461B1 (en) Central network cofigurator, and time-sensitive networking control system including the same
CN109618375B (en) UAV ad hoc network time slot scheduling method based on service priority and channel interruption probability
Wang et al. Low complexity multi-resource fair queueing with bounded delay
US20200396152A1 (en) Shaping outgoing traffic of network packets in a network management system
CN113950104A (en) Satellite network service deterministic scheduling method based on dynamic period mapping
CN103354528B (en) Method and device for multi-stream synchronization
CN109921972A (en) The method that data packet transfers and/or receives
US10085273B2 (en) Method and device for transmitting enhanced transmission selection standard configuration information
CN102404214B (en) Bandwidth distribution method, device and network equipment
Hariharan et al. Maximizing information in unreliable sensor networks under deadline and energy constraints
Nikolova et al. Bonded deficit round robin scheduling for multi-channel networks
Cavalieri Modelling and analysing congestion in KNXnet/IP
CN114531399B (en) Memory blocking balancing method and device, electronic equipment and storage medium
CN112688868B (en) Periodic sensing TSN routing method for power Internet of things
CN102377665B (en) IPv6-based radio frequency identification (RFID) router quality of service (QoS) method
Azizi et al. Maximizing bandwidth in wireless sensor networks using TDMA protocol
Geng DPDSN: data plane deadline-sensitive scheduling in data center networks
Maksić et al. M/M/1 model of Energy-Efficient Ethernet with byte-based coalescing
WO2024021990A1 (en) Path determination method and related device
CN103023811B (en) The switching method and device of queue scheduling strategy
WO2023207628A1 (en) Packet transmission method and packet forwarding device
Sedaghat et al. R2T-DSDN: reliable real-time distributed controller-based SDN

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