CN101483593B - Method and apparatus for distributing cache based on aggregated links in switch device - Google Patents
Method and apparatus for distributing cache based on aggregated links in switch device Download PDFInfo
- Publication number
- CN101483593B CN101483593B CN2009100069487A CN200910006948A CN101483593B CN 101483593 B CN101483593 B CN 101483593B CN 2009100069487 A CN2009100069487 A CN 2009100069487A CN 200910006948 A CN200910006948 A CN 200910006948A CN 101483593 B CN101483593 B CN 101483593B
- Authority
- CN
- China
- Prior art keywords
- buffer memory
- port
- aggregation group
- switching equipment
- buffer
- 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
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a method for distributing buffer on the basis of aggregation link in a switching device and a device thereof. The method comprises that when messages enter from one port in a link aggregation group, the switching device shares all buffers that can be occupied by all the ports in the link aggregation group as the buffers that can be occupied of the link aggregation group with each port in the link aggregation group, if the number of occupied buffers in the link aggregation group does not reach the whole number of the buffers that can be occupied of the link aggregation group, buffer storing messages with corresponding capacities are distributed, or the messages are discarded. According to the invention, the conventional static and dynamic buffer distribution method is improved, forwarding performance of the switch link aggregation group is further improved by sharing the buffers of all the ports in the aggregation link with each port in the link aggregation group, at the same time, it has no effects on other common ports or other aggregation groups.
Description
Technical field
The present invention relates to network equipment method of allocating resources such as switch, relate in particular to the method and the device that distribute buffer memory in the exchange chip based on aggregated links.
Background technology
There is the buffer memory (buffer) of some in exchange chip inside, after message enters switch from the source port of switch, if available buffer is arranged, message can be buffered in the buffer the inside of switch so, up to switch sent message from all destination interfaces after, this buffer just can be released.
Distribute the method for buffer roughly to have three kinds in the exchange chip: first kind is that the buffer of exchange chip is shared by its all of the port overall situation, as long as idle buffer is arranged, all of the port can go to seize; Second kind is that static buffer distributes, and promptly by port quiescent value is set the buffer number that on average can take is set; The third is that dynamic buffer distributes, and promptly the port buffer and the exchange chip residue buffer that can take is linear, that is to say that buffer that port can take is along with exchange chip residue buffer reduces and reduces.
Though more than second kind, the third method have better effect and more excellent performance compared with first method, but the two does not all consider a kind of situation: two switches are by Link Aggregation Control Protocol (LACP, Link Aggregation Control Protocol), can become an aggregation group (trunk) to a plurality of port trunkings.In this case, if realize buffer sharing in the port trunking group, then can further improve the message forwarding performance of link aggregation group, if and still not based on the aggregation group distribution, then can be unfavorable for the further raising of the forwarding performance of link aggregation group based on port assignment according to said method.
Summary of the invention
Technical problem to be solved by this invention provides method and the device that distributes buffer memory in a kind of switching equipment based on aggregated links, can further improve the forwarding performance of link aggregation group port.
In order to solve the problems of the technologies described above, the invention provides the method for distributing buffer memory in a kind of switching equipment based on aggregated links, comprise: when message enters from the port in the link aggregation group, the buffer memory that the buffer memory summation that switching equipment can take all of the port in this aggregation group can take as aggregation group is shared to each port in this aggregation group, as judge that the buffer memory number that has taken in this aggregation group does not reach the total number of the buffer memory that this aggregation group can take as yet, the buffer memory message that then distributes respective volume, otherwise dropping packets.
Further, according to the buffer memory number that the port number in the aggregation group and switching equipment inner port on average take, calculate the port number in buffer memory number * this aggregation group that the total number=switching equipment inner port of the buffer memory that this aggregation group can take on average takies; Port number in buffer memory number=switching equipment that the switching equipment inner port on average takies in the total number/switching equipment of buffer memory.
Further, according to the summation of the number of the current buffer memory that takies of each port in the aggregation group, calculate the total number of the buffer memory that this aggregation group can take; Buffer memory number * current the active degree of this aggregation group inner port of the number=switching equipment current residual of the current buffer memory that takies of each port in this aggregation group.
Further, when message enters from the common port the port in aggregation group, then
Calculate the buffer memory number of determining that the switching equipment inner port on average takies, perhaps, calculate the current buffer memory number that takies of this common port according to the buffer memory number and the current active degree of this common port of switching equipment current residual; And, the buffer memory number that has taken when this common port does not reach the buffer memory number that the switching equipment inner port on average takies as yet, perhaps the buffer memory number that has taken when this common port does not reach the current buffer memory number that takies of this common port as yet, the buffer memory message that then distributes respective volume, otherwise dropping packets.
Further, before the buffer memory that distributes respective volume, also comprise: whether remain in free buffer in the inquiry switching equipment, then distribute buffer memory as existing, otherwise dropping packets.
In order to solve the problems of the technologies described above, the invention provides the device that distributes buffer memory in a kind of switching equipment based on aggregated links, comprise the Port Management unit, buffer memory allocation units and the buffer unit that connect successively; Wherein:
The Port Management unit, be used to manage all of the port in the switching equipment, and when to be divided into the ports zone that enters message be the link aggregation group port, then the buffer memory summation that all of the port in the aggregation group can the be taken buffer memory that can take as aggregation group is shared to each port in the aggregation group; When inquiring by the buffer memory allocation units, the buffer memory number that has taken in this aggregation group does not reach the total number of the buffer memory that this aggregation group can take as yet, then distributes the buffer memory message of respective volume to the application of buffer memory allocation units, otherwise dropping packets;
The buffer memory allocation units are used for the application according to the Port Management unit, and the buffer memory that distributes is offered the Port Management unit;
Buffer unit is used to provide the buffer memory of stored messages.
Further, device of the present invention also comprises respectively the computing unit that is connected with the buffer memory allocation units with the Port Management unit, be used for according to the port number in the switching equipment that obtains from the Port Management unit, and the total number of the buffer memory in the switching equipment that obtains from the buffer memory allocation units, calculate the port number in the total number/switching equipment of the buffer memory in buffer memory number=switching equipment that the switching equipment inner port on average takies; The buffer memory number that on average takies according to the switching equipment inner port of port number in the aggregation group of obtaining from the Port Management unit and calculating then, calculate the port number in buffer memory number * this aggregation group that the total number=switching equipment inner port of the buffer memory that this aggregation group can take on average takies, and result of calculation is exported to the Port Management unit.
Further,
Computing unit, or be used for buffer memory number according to the switching equipment current residual of obtaining from the buffer memory allocation units, and the current active degree of aggregation group inner port that obtains from the Port Management unit, calculate the buffer memory number * current active degree of this aggregation group inner port of the number=switching equipment current residual of the current buffer memory that takies of each port in this aggregation group, then the number of the current buffer memory that takies of each port in this aggregation group is sued for peace, calculate the total number of the buffer memory that this aggregation group can take, and result of calculation is exported to the Port Management unit.
Further,
The Port Management unit, when the ports zone that enters message is divided into is common port the port in described aggregation group, the buffer memory number that on average takies according to switching equipment inner port then from computing unit input, or the current buffer memory number that takies of common port of indication computing unit output calculating, when inquiring by the buffer memory allocation units, the buffer memory number that this common port has taken does not reach the buffer memory number that the switching equipment inner port on average takies as yet, perhaps the buffer memory number that taken of this common port does not reach the current buffer memory number that takies of this common port as yet, the buffer memory message that then distributes respective volume, otherwise dropping packets to the application of buffer memory allocation units;
Computing unit, also be used for indication according to the Port Management unit, buffer memory number by the switching equipment current residual obtained from the buffer memory allocation units, and the current active degree of this common port that obtains from the Port Management unit, calculate and obtain the current buffer memory number that takies of this common port, and result of calculation is exported to the Port Management unit.
Further,
The buffer memory allocation units also were used for before distributing buffer memory, and whether the inquiry switching equipment remains in free buffer, existed and then distributed buffer memory, otherwise return the information of distributing failure to the Port Management unit;
The Port Management unit, after the information of receiving this distribution failure, dropping packets.
The present invention improves traditional static state, dynamic buffering distribution method, by the buffer memory summation of all of the port in the link aggregation group is shared to each port in the aggregation group, realization distributes based on the buffer memory of aggregated links, further improved the forwarding performance of switch-link aggregation group thus, also can not have any impact simultaneously other common port or other aggregation group.
Description of drawings
Fig. 1 is the method embodiment flow chart that distributes buffer memory in the switching equipment of the present invention based on aggregated links;
Fig. 2 the present invention is based on the device example structure block diagram that aggregated links is distributed buffer memory.
Embodiment
The present invention has introduced method and the device that distributes buffer memory in a kind of switching equipment based on aggregated links, and its inventive concept is that the buffer memory that switching equipment can take all of the port in the link aggregation group is shared to each port in the aggregation group; When message enters from the port in the switching equipment aggregation group, and switching equipment judges that the buffer memory number that has taken in the aggregation group does not reach the total number of aggregation group shared buffer memory as yet, then distributes the buffer memory message, otherwise dropping packets.
Below in conjunction with accompanying drawing and preferred embodiment, above-mentioned design of the present invention is launched to be described in detail, with the technical scheme of the present invention that gets across.In order to set forth conveniently, following examples are only set forth on the basis of existing second method.In fact, technical scheme of the present invention all is suitable for for existing second kind, the third buffer distribution method.
See also Fig. 1, distribute the method for buffer memory may further comprise the steps based on aggregated links in the switching equipment of the present invention:
Step 101:, calculate the interior buffer total number/port number of buffer number=exchange chip that port on average takies according to buffer total number and port number in the exchange chip;
In fact, if dynamic assignment buffer, then step 101 is buffer number and the current active degrees (receiving the frequency of message) of port according to the exchange chip current residual, calculate the current active degree of buffer number * port of the current buffer number=exchange chip current residual that takies of port, if the i.e. current active degree height of port, the buffer number that then can take in the buffer of current residual is just big, and vice versa.
Step 102,103: message enters from port, if be judged as the port in the link aggregation group, execution in step 104 is if judge it is common port the port in link aggregation group, execution in step 109;
If dynamic assignment buffer, then step 104 is according to the current buffer number that takies of each port in the aggregation group of step 101 calculating, the buffer total number that the aggregation group of determining can take equals the current buffer number sum that takies of each port in the aggregation group.
Step 109: judge that this port has taken the buffer number and whether reached the buffer number that port on average takies, reach then execution in step 108, i.e. dropping packets; Do not reach then execution in step 106, promptly continue to judge whether remain in the exchange chip, exist and then obtain buffer and buffer memory message in free buffer, otherwise dropping packets.
Above-mentioned steps 106 is as optional step, is used for guaranteeing that port in the aggregation group or common port when the buffer buffer memory message that distributes, can not produce the buffer resource contention with other port, that is guarantee can not exert an influence to other port.
Provide an application example with regard to said method embodiment below and help further understand technical scheme of the present invention.
Suppose that switch has 2000 buffer, each buffer 256 byte; Switch has 20 physical ports, and port one, port 2, port 3 and port 4 are all in link aggregation group 1 the inside.
Suppose that message enters from aggregation group 1, then distribute the method for buffer memory just to carry out as follows based on aggregated links:
Step 1: calculate buffer number=2000/20=100 that port on average takies, promptly each port on average can take 100 buffer;
Step 2: if message enters from any one port of port one~port 4, then switch judges that this port belongs to the port in the link aggregation group, port number=100 * 4=400 in buffer number * aggregation group that buffer total number=port that elder generation's calculating link aggregation group can take on average takies, promptly link aggregation group can take 400 buffer;
Step 3: judge whether port one~port 4 current buffer total numbers that taken reach 400,, otherwise abandon the message of coming in from aggregation group 1 if do not reach then switch distributes buffer memory and stored messages.
As shown in Figure 2, the present invention correspondingly a kind ofly distributes the embodiment of the device of buffer memory based on aggregated links for what switch provided according to method shown in Figure 1, and this device 200 comprises computing unit 210, Port Management unit 220, buffer memory allocation units 230 and the buffer unit 240 of connection successively; Wherein:
Buffer total number/port number in the N=exchange chip;
Port number in buffer number * aggregation group that the M=port on average takies.
Certainly, if adopt the method for dynamic assignment buffer, 210 of computing units can calculate the buffer total number that the current buffer number that takies of port and aggregation group can take respectively, concrete grammar as previously mentioned, so repeat no more.
Buffer memory allocation units 230 are used for the buffer according to the application distribution respective volume of Port Management unit 220, and discharge corresponding buffer according to the request of Port Management unit 220.
The present invention has introduced a kind of cache allocation method based on aggregated links compared with prior art, can realize the sharing in aggregation group to the port buffer in the link aggregation group, thereby improves the message forwarding performance of link aggregation group.
Certainly; the present invention can also have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.
Claims (10)
1. the method for distributing buffer memory in the switching equipment based on aggregated links, comprise: when message enters from the port in the link aggregation group, switching equipment shares the buffer memory summation that all of the port in the described aggregation group can take with each port of giving in the described aggregation group as the buffer memory that aggregation group can take, as the buffer memory number that has taken in the aggregation group as described in judging do not reach as yet as described in the total number of the aggregation group buffer memory that can take, then distribute the described message of buffer memory of respective volume, otherwise abandon described message.
2. in accordance with the method for claim 1, it is characterized in that, according to the buffer memory number that the port number in the described aggregation group and described switching equipment inner port on average take, calculate the port number in the buffer memory number * described aggregation group that total number=described switching equipment inner port on average takies of the buffer memory that described aggregation group can take; Port number in the buffer memory number that described switching equipment inner port on average takies=described switching equipment in the total number/described switching equipment of buffer memory.
3. in accordance with the method for claim 1, it is characterized in that, according to the summation of the number of the current buffer memory that takies of each port in the aggregation group, calculate the total number of the buffer memory that described aggregation group can take; Buffer memory number * current the active degree of described aggregation group inner port of the number=described switching equipment current residual of the current buffer memory that takies of each port in the described aggregation group.
4. in accordance with the method for claim 2, it is characterized in that, when message enters from the common port the port in described aggregation group, then
Calculate the buffer memory number of determining that described switching equipment inner port on average takies, perhaps, calculate the current buffer memory number that takies of described common port according to the buffer memory number and the current active degree of described common port of switching equipment current residual; And, the buffer memory number that has taken when described common port does not reach the buffer memory number that described switching equipment inner port on average takies as yet, perhaps the buffer memory number that has taken when described common port does not reach the current buffer memory number that takies of described common port as yet, then distribute the described message of buffer memory of respective volume, otherwise abandon described message.
5. according to each described method of claim 1 to 4, it is characterized in that, before the buffer memory that distributes respective volume, also comprise: inquire about whether remaining in the described switching equipment in free buffer, buffer memory as described in then distributing as existence, otherwise abandon described message.
6. distribute the device of buffer memory in the switching equipment based on aggregated links, it is characterized in that, described device comprises Port Management unit, buffer memory allocation units and the buffer unit that connects successively; Wherein:
Described Port Management unit, be used to manage all of the port in the switching equipment, and when to be divided into the ports zone that enters message be the link aggregation group port, then the buffer memory summation that all of the port in the described aggregation group can be taken is shared each port of giving in the described aggregation group as the buffer memory that aggregation group can take; When inquiring by described buffer memory allocation units, the buffer memory number that has taken in the described aggregation group does not reach the total number of the buffer memory that described aggregation group can take as yet, then distribute the described message of buffer memory of respective volume, otherwise abandon described message to described buffer memory allocation units application;
Described buffer memory allocation units are used for the application according to described Port Management unit, and the described buffer memory that distributes is offered described Port Management unit;
Described buffer unit is used to provide the described buffer memory of stored messages.
7. according to the described device of claim 6, it is characterized in that described device also comprises respectively with described Port Management unit and being connected with described buffer memory allocation units
Computing unit, be used for according to the port number in the described switching equipment that obtains from described Port Management unit, and the total number of the buffer memory in the described switching equipment that obtains from described buffer memory allocation units, calculate the port number in the total number/described switching equipment of the buffer memory in buffer memory number=described switching equipment that described switching equipment inner port on average takies; The buffer memory number that on average takies according to the described switching equipment inner port of port number in the aggregation group of obtaining from described Port Management unit and calculating then, calculate the port number in the buffer memory number * described aggregation group that total number=described switching equipment inner port on average takies of the buffer memory that described aggregation group can take, and result of calculation is exported to described Port Management unit.
8. according to the described device of claim 7, it is characterized in that,
Described computing unit, or be used for buffer memory number according to the described switching equipment current residual of obtaining from described buffer memory allocation units, and the current active degree of described aggregation group inner port that obtains from described Port Management unit, calculate the buffer memory number * current active degree of described aggregation group inner port of the number=described switching equipment current residual of the current buffer memory that takies of each port in the described aggregation group, then the number of the current buffer memory that takies of each port in the described aggregation group is sued for peace, calculate the total number of the buffer memory that described aggregation group can take, and result of calculation is exported to described Port Management unit.
9. according to the described device of claim 7, it is characterized in that,
Described Port Management unit, when the ports zone that enters message is divided into is common port the port in described aggregation group, the buffer memory number that on average takies according to described switching equipment inner port then from the input of described computing unit, or the current buffer memory number that takies of common port of indicating described computing unit output to calculate, when inquiring by described buffer memory allocation units, the buffer memory number that described common port has taken does not reach the buffer memory number that described switching equipment inner port on average takies as yet, the buffer memory number that perhaps described common port has taken does not reach the current buffer memory number that takies of described common port as yet, then distribute the described message of buffer memory of respective volume, otherwise abandon described message to described buffer memory allocation units application;
Described computing unit, also be used for indication according to described Port Management unit, buffer memory number by the described switching equipment current residual obtained from described buffer memory allocation units, and the current active degree of described common port that obtains from described Port Management unit, calculate and obtain the current buffer memory number that takies of described common port, and result of calculation is exported to described Port Management unit.
10. according to each described device of claim 6 to 9, it is characterized in that,
Whether described buffer memory allocation units also are used for inquiring about described switching equipment and remaining in free buffer before distributing buffer memory, exist and then distribute described buffer memory, otherwise return the information of distributing failure to described Port Management unit;
Described Port Management unit after the information of receiving described distribution failure, abandons described message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009100069487A CN101483593B (en) | 2009-02-13 | 2009-02-13 | Method and apparatus for distributing cache based on aggregated links in switch device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009100069487A CN101483593B (en) | 2009-02-13 | 2009-02-13 | Method and apparatus for distributing cache based on aggregated links in switch device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101483593A CN101483593A (en) | 2009-07-15 |
CN101483593B true CN101483593B (en) | 2011-10-26 |
Family
ID=40880531
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009100069487A Active CN101483593B (en) | 2009-02-13 | 2009-02-13 | Method and apparatus for distributing cache based on aggregated links in switch device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101483593B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102045253B (en) * | 2010-12-06 | 2013-01-09 | 浙江宇视科技有限公司 | Method and device for sending video surveillance service messages in link aggregation network |
CN103179178B (en) * | 2011-12-26 | 2016-06-15 | 杭州华三通信技术有限公司 | The method and apparatus of aggregation group member port between extension cluster |
CN103139098B (en) * | 2013-03-07 | 2017-08-25 | 华为技术有限公司 | Data transfer control method, device and system and fibre channel media |
CN104394100B (en) * | 2014-11-07 | 2017-12-08 | 深圳市国微电子有限公司 | Credit assignment method and interchanger |
CN105991470B (en) | 2015-02-10 | 2019-12-06 | 新华三技术有限公司 | method and device for caching message by Ethernet equipment |
CN104852863B (en) * | 2015-04-15 | 2018-04-10 | 清华大学 | Dynamic threshold management method and device in a kind of shared buffer memory interchanger |
CN107948063B (en) * | 2017-12-07 | 2021-01-15 | 锐捷网络股份有限公司 | Method for establishing aggregation link and access equipment |
CN112737945B (en) * | 2020-12-30 | 2022-09-30 | 杭州迪普信息技术有限公司 | Server connection control method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6363077B1 (en) * | 1998-02-13 | 2002-03-26 | Broadcom Corporation | Load balancing in link aggregation and trunking |
CN1780252A (en) * | 2004-11-18 | 2006-05-31 | 华为技术有限公司 | Buffer resource management for grouping converter |
-
2009
- 2009-02-13 CN CN2009100069487A patent/CN101483593B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6363077B1 (en) * | 1998-02-13 | 2002-03-26 | Broadcom Corporation | Load balancing in link aggregation and trunking |
CN1780252A (en) * | 2004-11-18 | 2006-05-31 | 华为技术有限公司 | Buffer resource management for grouping converter |
Also Published As
Publication number | Publication date |
---|---|
CN101483593A (en) | 2009-07-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101483593B (en) | Method and apparatus for distributing cache based on aggregated links in switch device | |
US6122279A (en) | Asynchronous transfer mode switch | |
CN101227402B (en) | Method and apparatus for sharing polymerization link circuit flow | |
CN101873269B (en) | Data retransmission device and method for distributing buffer to ports | |
CN101572673B (en) | Distributed packet switching system and distributed packet switching method of expanded switching bandwidth | |
JPH07297843A (en) | Atm communication equipment | |
CN104461727A (en) | Memory module access method and device | |
JPH08307432A (en) | Communication method | |
US6490264B1 (en) | Data transmission method and system | |
US6747990B1 (en) | Packet communication system, network-side apparatus to be used therein, and time slot allocation control method | |
CN101848158B (en) | Load balance method and device for data channels and network exchange equipment | |
EP1154671A1 (en) | Switching matrix for a telecommunications network and method of connection handling in a switching matrix | |
CN101272338A (en) | Method for port band width configuration on non-line speed interface plate and non-line speed interface plate | |
CN103117962A (en) | Satellite borne shared storage exchange device | |
CN101729609B (en) | Method for realizing vector exchange | |
US20030099261A1 (en) | Multi-link segmentation and reassembly sublayer for bonding asynchronous transfer mode permanent virtual circuits | |
JP2014011666A (en) | Method for allocating band for uplink data and communication device | |
CN102780611A (en) | Packet switching circuit and packet switching method | |
CN102025609A (en) | Packet message-based load balancing distribution system and method thereof | |
WO2014169691A1 (en) | Cell data processing method, device and switching network element | |
CN101534303B (en) | Method, device and single board for sending data | |
US7505467B1 (en) | Method and apparatus for dynamic bandwidth management for voice traffic in a digital communications network | |
KR0169042B1 (en) | Cell transmitting method according to priority control | |
JP2940400B2 (en) | Communication system and communication method using cross-connect network | |
CN100499600C (en) | Method for transmitting back-pressure information in switched network |
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 |