CN102594671B - A kind of method and apparatus that speed limit is carried out to user - Google Patents
A kind of method and apparatus that speed limit is carried out to user Download PDFInfo
- Publication number
- CN102594671B CN102594671B CN201210027130.5A CN201210027130A CN102594671B CN 102594671 B CN102594671 B CN 102594671B CN 201210027130 A CN201210027130 A CN 201210027130A CN 102594671 B CN102594671 B CN 102594671B
- Authority
- CN
- China
- Prior art keywords
- interface
- link aggregation
- user
- weight
- speed limit
- 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
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a kind of method and apparatus that speed limit is carried out to user, including:The port speed and the interface board of interface board according to belonging to the interface member that link aggregation interface is bound are bundled in the number of the port under the link aggregation interface, determine total weight of the link aggregation interface and the weight of each interface member;User rate is configured for each interface member of link aggregation interface according to the weight of the speed limit rate value of user, total weight of the link aggregation interface and each interface member;According to the user rate of each interface member of link aggregation interface, forwarding speed limit is carried out by corresponding user rate docking port member on the interface board belonging to interface member.The present invention more accurately can carry out speed limit to the user of straddle link aggregation interface access, and can carry out weight processing to the ports of different rates, so as to avoid to each member of link aggregation interface can not uniform speed limit the problem of.
Description
Technical field
The present invention relates to computer network data communication technical field, more particularly to a kind of method that speed limit is carried out to user
And device.
Background technology
Due to the continuous development of network, under ethernet environment, in order to improve the communication capacity of link, router device needs
Multiple ether interfaces are tied to an interface, referred to as link aggregation interface.The total bandwidth of link aggregation interface is each member
Bandwidth sum, in this way, the bandwidth of interface can be increased.Link aggregation interface can improve link communication capacity and
Save IP address.Flow is distributed on different links by link aggregation interface, finally reaches unified destination.So can be with
Flow is avoided all to walk the same road blocked-flow caused by footpath, here it is so-called packet-by-packet attribute.
Multiple physical interfaces for accessing a link aggregation interface on router, if do not connect to link aggregation interface
The user that enters carries out speed limit, then be linked into all users on link aggregation interface all can shared link aggregation interface band
Width, cause mutual bandwidth-hogging between user, user benefit can not be ensured, and easily cause potential safety hazard (such as dos attack)
Deng.Meanwhile multiple physical interfaces in access link aggregation interface are packet-by-packet sending out the ring of stream when belonging to multiple different interface boards
Under border, if do not handled straddle user (user of access link aggregation interface), can cause link aggregation interface into
Each network processing unit where member on interface board handles big flow as user's speed limit, the outflow of such user
The speed limit of user will be exceeded, cause user's speed limit inaccurate, and the maximum bandwidth of user is (network processing unit number) *
(user's speed limit), cause to be assigned with more than the actual bandwidth for being provided to user, therefore, how in link aggregation for user
One of router device developer's concern is become to user's progress speed limit of access on interface.
The interface board of several different port speed can be inserted in existing network, on router, to link aggregation interface in user
, it is necessary to which the speed of the physical port bundled according to link aggregation interface and port number are come to each user setting when straddle is reached the standard grade
Speed limit, the problem of this relates to straddle speed limit, and do not carry out the management of straddle speed limit in current router to user.
The content of the invention
, can be to link the technical problem to be solved in the present invention is to provide a kind of method and apparatus that speed limit is carried out to user
The speed and port number for the physical port that user under aggregation interface bundlees according to link aggregation interface carry out speed limit.
In order to solve the above technical problems, a kind of method that speed limit is carried out to user of the present invention, including:
The port speed for the interface board belonging to interface member bound according to link aggregation interface and interface board binding
The number of port under the link aggregation interface, determine total weight of the link aggregation interface and the power of each interface member
Weight;
Weight according to the speed limit rate value of user, total weight of the link aggregation interface and each interface member is link
Each interface member of aggregation interface configures user rate;
According to the user rate of each interface member of link aggregation interface, by corresponding on the interface board belonging to interface member
User rate docking port member carry out forwarding speed limit.
Further, it is described according to the speed limit rate value of user, total weight of the link aggregation interface and each interface into
The weight of member configures user rate for each interface member of link aggregation interface, including:
The user rate of each interface member of the link aggregation interface is weight/total weight * user of each interface member
Speed limit rate value.
Further, in addition to:
It is determined that before total weight of the link aggregation interface and the weight of each interface member, obtain the link aggregation and connect
The information of each interface member of mouth, obtain the port speed of the interface board belonging to the interface member of the link aggregation interface binding
Rate, and the interface member bound according to the link aggregation interface, obtain the interface board and are bundled in the link aggregation interface
Under port number.
Further, in addition to:
After the information of each interface member of the link aggregation interface is obtained, member is established for the link aggregation interface
Doubly linked list, by the information record of each interface member of the link aggregation interface into member's doubly linked list, and true
After total weight of the fixed link aggregation interface and the weight of each interface member, by total weight and the weight of each interface member
It recorded in member's doubly linked list.
Further, member's doubly linked list is using the mark of the link aggregation interface as linked list head, in linked list head
Total weight is recorded in node, chained list node is using the port-mark of each interface member of the link aggregation interface as index, note
Record the information and weight of interface member.
Further, in addition to:
Before user rate is configured for each interface member of link aggregation interface, used from the access of the link aggregation interface
Configuration data is obtained in the user configuration at family, the speed limit rate value of the user is obtained according to the configuration data.
Further, a kind of device that speed limit is carried out to user, including:User rate processing module, wherein:
The user rate processing module, for the interface board belonging to the interface member that is bound according to link aggregation interface
Port speed and the interface board are bundled in the number of the port under the link aggregation interface, determine the link aggregation interface
Total weight and each interface member weight;According to the speed limit rate value of user, total weight of the link aggregation interface and each
The weight of interface member configures user rate for each interface member of link aggregation interface;According to each interface of link aggregation interface
The user rate of member, forwarding limit is carried out by corresponding user rate docking port member on the interface board belonging to interface member
Speed.
Further, the user rate processing module, used specifically for the weight according to each interface member/total weight *
The speed limit rate value at family determines the user rate of each interface member of the link aggregation interface.
Further, in addition to configuration management module, wherein:
The configuration management module, the information of each interface member for obtaining the link aggregation interface, and from described
Configuration data is obtained in the user configuration of the accessing user of link aggregation interface, obtains the user's according to the configuration data
Speed limit rate value;
The user rate processing module, specifically for the information of the interface member according to the link aggregation interface, obtain
To the port speed of the interface board belonging to the interface member of link aggregation interface binding, tied up according to the link aggregation interface
Fixed interface member, obtain the number for the port that the interface board is bundled under the link aggregation interface.
Further, in addition to link aggregation interface member management module, wherein:
The link aggregation interface member management module, for establishing member's doubly linked list for the link aggregation interface,
By the information record of each interface member of the link aggregation interface into member's doubly linked list;
The user rate processing module, it is additionally operable to it is determined that total weight and each interface member of the link aggregation interface
Weight after, the weight of total weight and each interface member recorded in member's doubly linked list.
In summary, the present invention more accurately can carry out speed limit to the user of straddle link aggregation interface access, and
Weight processing can be carried out to the port of different rates, can not uniform speed limit to each member of link aggregation interface so as to avoid
The problem of.
Brief description of the drawings
Fig. 1 is the flow chart of the method that speed limit is carried out to user of present embodiment;
Fig. 2 is the structural representation of member's doubly linked list of the link aggregation interface of present embodiment;
Fig. 3 is the Organization Chart of the device that speed limit is carried out to user of present embodiment.
Embodiment
The method that speed limit is carried out to user of present embodiment is illustrated below in conjunction with the accompanying drawings.
As shown in figure 1, the method for speed limit is carried out to user, including:
Step 101:Configuration management module enters the binding of line interface member to link aggregation interface, obtains the link aggregation and connects
The information of each interface member under mouthful;
Link aggregation interface lower interface member is bundled in present embodiment and belongs to multiple different interface boards, link aggregation
Interface can be described as straddle link aggregation interface.
The information of interface member includes:The information of interface board belonging to interface member and the interface message of interface member.
Step 102:Configuration management module is after user reaches the standard grade, from the user configuration of the accessing user of link aggregation interface
Configuration data is obtained, the speed limit rate value of user is obtained according to configuration data;
Configuration management module (is held according to CIR (committed access rate), PIR (peak information rate), token bucket size CBS
Promise burst size) and the configuration data such as PBS (peak burst size) obtain the speed limit rate value of user.
Step 103:Link aggregation interface member management module receives the straddle link aggregation that configuration management module issues and connect
The information of the interface member of mouth, apply for doubly linked list internal memory, member's doubly linked list is established, by the interface member of link aggregation interface
Information record into the member's doubly linked list for uniquely representing the link aggregation interface;
As shown in Fig. 2 the structure for the member's doubly linked list established for link aggregation interface member management module, gathers to link
The interface member of splice grafting mouth is allocated mounting so that the link aggregation interface enters line interface member mounting.
Member's doubly linked list is using the mark of link aggregation interface as linked list head, and total weight is recorded in linked list head node,
Chained list node is using the port-mark of each interface member as index, the information and weight of record interface member, step below
In can by weight write member's doubly linked list in.
Step 104:The interface member's of link aggregation interface of the user rate processing module in configuration management module
Information, the port speed for the interface board belonging to interface member bound;
Connecing belonging to interface member of the user rate processing module in the information of the interface member of link aggregation interface
The information of oralia, get the port speed of each interface board.
Step 105:The interface member that user rate processing module is bound according to link aggregation interface, obtains each interface board
The number for the port being bundled under link aggregation interface;
Step 106:Interface board of the user rate processing module according to belonging to the interface member that link aggregation interface is bound
Port speed and each interface board are bundled in the number of the port under link aggregation interface, calculate total weight of link aggregation interface
And the weight of each interface member, total weight and the weight of each interface member are write into member's doubly linked list;
The computational methods of total weight and the weight of each interface member are not limited specifically in present embodiment, for example,
The port speed for the interface board being bundled under link aggregation interface is respectively 10G and 1G, and 10G interface boards are bundled in link aggregation and connect
The number of port under mouthful is that the number for the port that 3,1G interface boards are bundled under link aggregation interface is 2, and total weight can be
The weight of the port being bundled under link aggregation interface of 10 × 3+1 × 2=32,10G interface board is tying up for 10,1G interface boards
The weight for the port being scheduled under link aggregation interface is 1.Likewise it is possible to tied up according to the port speed of interface board and interface board
The number for the port being scheduled under link aggregation interface carries out some other transports, it is determined that total weight and the weight of each interface member.
Step 107:User rate processing module according to the speed limit rate value of user, total weight and the weight of interface member,
User rate is configured for each interface member of link aggregation interface;
User rate processing module includes the network processing unit on each interface board, is by the network processing unit on interface board
The port configuration speed limit itself being bundled under link aggregation interface.
For example, accessing a user under link aggregation interface, speed limit rate value is 32M, is bound below link aggregation interface
The interface board of two different port speeds, respectively 1G interface board and 10G interface board, bind on 1G interface board
Two interfaces bind three interfaces on this link aggregation interface on this link aggregation interface on 10G interface board,
It it is three on 1,10G interface boards in the weight that total weight of link aggregation interface is two ports on 32,1G interface boards
In the case that the weight of port is 10, according to the speed limit rate value of weight/total weight * user, obtain:Two of 1G interface boards
The user rate of port is 1M, and the user rates of three ports of 10G interface boards is 10M, 1M*2+10M*3=32M, that is,
The speed limit rate value of user, has reached speed limit effect.
Step 108:User rate processing module connects according to the user rate of each interface member of link aggregation interface each
On oralia forwarding speed limit is carried out by relative users speed;
User's speed by the network processing unit on each interface board according to the port itself being bundled under link aggregation interface
Rate docking port member carries out forwarding speed limit.
When the interface member of link aggregation interface changes, it is necessary to refresh the information of link aggregation interface member, and
Re-computation is carried out to the user rate of total weight, the weight of each interface member and each interface member, it is each further according to what is recalculated
The user rate of interface member carries out speed limit processing to user.
As shown in figure 3, the device that speed limit is carried out to user of present embodiment, including:Configuration management module, link aggregation
Interface member management module and user rate processing module, wherein:
Configuration management module, to the mark of configuration link aggregation interface, and to link aggregation interface is entered line interface into
The binding of member, obtains the information of each interface member under the link aggregation interface, after user reaches the standard grade, from link aggregation interface
Accessing user user configuration in obtain configuration data, the speed limit rate value of user is obtained according to configuration data, connect each
The information of mouth member is handed down to link aggregation interface member management module and user rate processing module, by the speed limit speed of user
Value is handed down to user rate processing module.
Link aggregation interface member management module, to receive the interface for the link aggregation interface that configuration management module issues
The information of member, apply for doubly linked list internal memory, establish member's doubly linked list, the information of the interface member of link aggregation interface is remembered
Record in the member's doubly linked list for uniquely representing the link aggregation interface.
User rate processing module, to the letter of the interface member of the link aggregation interface in configuration management module
Breath, the port speed for the interface board belonging to interface member bound, the interface member bound according to link aggregation interface, obtain
The number of the port under link aggregation interface is bundled in each interface board, the interface member institute bound according to link aggregation interface
The port speed of the interface board of category and each interface board are bundled in the number of the port under link aggregation interface, calculate link aggregation
Total weight of interface and the weight of each interface member, total weight and the weight of each interface member are write into member's doubly linked list;And
And it is that each interface member of link aggregation interface configures according to the speed limit rate value of user, total weight and the weight of interface member
User rate, according to the user rate of each interface member of link aggregation interface, relative users speed pair is pressed on each interface board
Interface member carries out forwarding speed limit.
In present embodiment, according to the quantity of interface member, the port speed and straddle of the affiliated interface board of interface member
Situation carrys out the flow of equilibrium assignment user as radix, so both improves network resource utilization, at the same it also avoid due to
Network traffic congestion caused by interface member's disposal ability difference.Present embodiment can be on the router distinct interface speed
On rate card, configure a link aggregation interface, bind interface board on phase critical point carry out user flow forwarding when, link is gathered
User on splice grafting mouth, corresponding speed limit is configured, forwarding speed limit is carried out to user.
Claims (10)
- A kind of 1. method that speed limit is carried out to user, it is characterised in that including:The port speed and the interface board of interface board according to belonging to the interface member that link aggregation interface is bound are bundled in institute The number of the port under link aggregation interface is stated, determines total weight of the link aggregation interface and the weight of each interface member;Weight according to the speed limit rate value of user, total weight of the link aggregation interface and each interface member is link aggregation Each interface member of interface configures user rate;According to the user rate of each interface member of link aggregation interface, used on the interface board belonging to interface member by corresponding Family speed docking port member carries out forwarding speed limit;The number of interface board is more than 1.
- 2. the method as described in claim 1, it is characterised in that speed limit rate value, the link aggregation according to user Total weight of interface and the weight of each interface member configure user rate for each interface member of link aggregation interface, including:The user rate of each interface member of the link aggregation interface is the limit of weight/total weight * user of each interface member Fast rate value.
- 3. the method as described in claim 1, it is characterised in that also include:It is determined that before total weight of the link aggregation interface and the weight of each interface member, the link aggregation interface is obtained The information of each interface member, the port speed of the interface board belonging to the interface member of the link aggregation interface binding is obtained, and The interface member bound according to the link aggregation interface, obtains the end that the interface board is bundled under the link aggregation interface The number of mouth.
- 4. method as claimed in claim 3, it is characterised in that also include:After the information of each interface member of the link aggregation interface is obtained, it is two-way to establish member for the link aggregation interface Chained list, by the information record of each interface member of the link aggregation interface into member's doubly linked list, and it is determined that institute After stating total weight of link aggregation interface and the weight of each interface member, total weight and the weight of each interface member are recorded Into member's doubly linked list.
- 5. method as claimed in claim 4, it is characterised in that:Member's doubly linked list is using the mark of the link aggregation interface as linked list head, in linked list head node described in record Total weight, chained list node is using the port-mark of each interface member of the link aggregation interface as index, the letter of record interface member Breath and weight.
- 6. the method as described in claim 1, it is characterised in that also include:Before user rate is configured for each interface member of link aggregation interface, from the accessing user's of the link aggregation interface Configuration data is obtained in user configuration, the speed limit rate value of the user is obtained according to the configuration data.
- A kind of 7. device that speed limit is carried out to user, it is characterised in that including:User rate processing module, wherein:The user rate processing module, the port for the interface board belonging to the interface member that is bound according to link aggregation interface Speed and the interface board are bundled in the number of the port under the link aggregation interface, determine the total of the link aggregation interface Weight and the weight of each interface member;According to the speed limit rate value of user, total weight of the link aggregation interface and each interface The weight of member configures user rate for each interface member of link aggregation interface;According to each interface member of link aggregation interface User rate, carry out forwarding speed limit by corresponding user rate docking port member on the interface board belonging to interface member;The number of interface board is more than 1.
- 8. device as claimed in claim 7, it is characterised in that:The user rate processing module, specifically for the speed limit rate value of the weight according to each interface member/total weight * user Determine the user rate of each interface member of the link aggregation interface.
- 9. device as claimed in claim 7, it is characterised in that also including configuration management module, wherein:The configuration management module, the information of each interface member for obtaining the link aggregation interface, and from the link Configuration data is obtained in the user configuration of the accessing user of aggregation interface, the speed limit of the user is obtained according to the configuration data Rate value;The user rate processing module, specifically for the information of the interface member according to the link aggregation interface, obtain institute The port speed of the interface board belonging to the interface member of link aggregation interface binding is stated, is bound according to the link aggregation interface Interface member, obtain the number for the port that the interface board is bundled under the link aggregation interface.
- 10. device as claimed in claim 7, it is characterised in that also including link aggregation interface member management module, wherein:The link aggregation interface member management module, for establishing member's doubly linked list for the link aggregation interface, by institute The information record of each interface member of link aggregation interface is stated into member's doubly linked list;The user rate processing module, it is additionally operable to it is determined that total weight of the link aggregation interface and the power of each interface member After weight, the weight of total weight and each interface member recorded in member's doubly linked list.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210027130.5A CN102594671B (en) | 2012-02-08 | 2012-02-08 | A kind of method and apparatus that speed limit is carried out to user |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210027130.5A CN102594671B (en) | 2012-02-08 | 2012-02-08 | A kind of method and apparatus that speed limit is carried out to user |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102594671A CN102594671A (en) | 2012-07-18 |
CN102594671B true CN102594671B (en) | 2018-03-20 |
Family
ID=46482887
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210027130.5A Active CN102594671B (en) | 2012-02-08 | 2012-02-08 | A kind of method and apparatus that speed limit is carried out to user |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102594671B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104426686B (en) * | 2013-08-22 | 2018-06-08 | 中国电信股份有限公司 | Broad access network gate user access method, device and broad access network gate |
CN104852859B (en) * | 2015-04-30 | 2019-03-15 | 新华三技术有限公司 | A kind of aggregation interface method for processing business and equipment |
CN104852862B (en) * | 2015-05-28 | 2018-08-24 | 新华三技术有限公司 | A kind of network speed limit method and device |
CN106375236A (en) * | 2016-09-29 | 2017-02-01 | 乐视控股(北京)有限公司 | Method and device for limiting speeds of Internet-connected devices |
CN106878116B (en) * | 2016-12-06 | 2019-12-06 | 新华三技术有限公司 | flow rate limiting method and device |
CN107547423B (en) * | 2017-06-05 | 2020-04-28 | 新华三技术有限公司 | Flow forwarding control method and device |
CN110401603B (en) * | 2019-07-25 | 2023-07-28 | 北京百度网讯科技有限公司 | Method and device for processing information |
CN114629841B (en) * | 2020-11-27 | 2023-05-16 | 华为技术有限公司 | Communication method, device and system |
CN114006861B (en) * | 2021-09-15 | 2023-08-04 | 苏州浪潮智能科技有限公司 | Link aggregation load balancing method, device and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101022456A (en) * | 2007-03-22 | 2007-08-22 | 华为技术有限公司 | Link junction method, port load equalizing method and apparatus thereof |
CN101411132A (en) * | 2006-07-24 | 2009-04-15 | 华为技术有限公司 | System for rate management of aggregate-rate communication services |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101645880B (en) * | 2008-08-06 | 2013-09-11 | 华为技术有限公司 | Method and device for forwarding data frame based on line bundle |
CN101877667B (en) * | 2009-04-30 | 2013-01-09 | 华为技术有限公司 | Message forwarding method, device and system |
CN102185784A (en) * | 2011-05-26 | 2011-09-14 | 杭州华三通信技术有限公司 | Automatic protection switching method and device |
-
2012
- 2012-02-08 CN CN201210027130.5A patent/CN102594671B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101411132A (en) * | 2006-07-24 | 2009-04-15 | 华为技术有限公司 | System for rate management of aggregate-rate communication services |
CN101022456A (en) * | 2007-03-22 | 2007-08-22 | 华为技术有限公司 | Link junction method, port load equalizing method and apparatus thereof |
Also Published As
Publication number | Publication date |
---|---|
CN102594671A (en) | 2012-07-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102594671B (en) | A kind of method and apparatus that speed limit is carried out to user | |
CN104243265B (en) | A kind of gateway control method, apparatus and system based on virtual machine (vm) migration | |
CN105706044B (en) | Work based on ranking keeps scheduler | |
CN104954247B (en) | Mainframe network accelerator for data center's overlay network | |
CN104205767B (en) | Support software defined network and application layer service optimization | |
CN106936857A (en) | A kind of connection management method of mixed cloud, SDN controllers and mixing cloud system | |
CN103281252B (en) | Message flow control method and device based on multi-path transmission | |
CN104184663B (en) | Communication means and device based on software defined network and integrated identification network | |
CN104954253A (en) | PCIe-based host network accelerators (HNAS) for data center overlay network | |
CN107276783A (en) | A kind of methods, devices and systems for realizing virtual machine unified management and intercommunication | |
CN112600684B (en) | Bandwidth management and configuration method of cloud service and related device | |
CN102255903A (en) | Safety isolation method for virtual network and physical network of cloud computing | |
CN107959582A (en) | A kind of management method and device of example of cutting into slices | |
CN107547439A (en) | A kind of method for controlling network flow and calculate node | |
CN107276826A (en) | A kind of capacitor network collocation method and device | |
CN104618231B (en) | Deep packet identification method, device and system in the Wi-fi systems of high in the clouds | |
CN106155264A (en) | The computer approach of the power consumption of management storage subsystem and computer system | |
WO2016078246A1 (en) | Method and device for supporting diversified network data access, and terminal | |
CN108363611A (en) | Method for managing security, device and the omnidirectional system of virtual machine | |
CN106791679A (en) | A kind of determination method and device of video transmission path | |
US9143580B2 (en) | Brokering and provisioning in high-speed networks | |
CN106341339A (en) | End-to-end network flow control method | |
CN103795621B (en) | Virtual machine data exchange method and device, and physical host | |
CN109842503A (en) | Link-quality test method and system | |
CN104202263B (en) | A kind of multi-tenant data midbandwidth resource fairness distribution method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |