CN104780077A - Flow control method and device - Google Patents

Flow control method and device Download PDF

Info

Publication number
CN104780077A
CN104780077A CN201510130006.5A CN201510130006A CN104780077A CN 104780077 A CN104780077 A CN 104780077A CN 201510130006 A CN201510130006 A CN 201510130006A CN 104780077 A CN104780077 A CN 104780077A
Authority
CN
China
Prior art keywords
port
access device
client
default
flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510130006.5A
Other languages
Chinese (zh)
Other versions
CN104780077B (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201510130006.5A priority Critical patent/CN104780077B/en
Publication of CN104780077A publication Critical patent/CN104780077A/en
Application granted granted Critical
Publication of CN104780077B publication Critical patent/CN104780077B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a flow control method and a device. The method comprises the following steps: monitoring flow of a port connected with a client side, by an access device; clearing corresponding cache data of the port by the access device when the number of PAUSE frames received by the access device from the port in the predetermined time is larger than a first predetermined value and the data sent to the client side from the port in the predetermined time is not larger than a second predetermined value. According to the flow control method and the device thereof, the influence of the abnormity of the client side on data transmission from the server to the other client sides is avoided; the range of the influence caused by the abnormity of the client sides is reduced; the losses of the clients are reduced.

Description

A kind of method and apparatus of flow control
Technical field
The present invention relates to communication technical field, especially relate to a kind of method and apparatus of flow control.
Background technology
IEEE (Institute of Electrical and Electronics Engineers, Institute of Electrical and Electric Engineers) 802.3X is the flow control methods of FDX Ethernet data link layer, after user end to server sends request, if client its own system or network produce congested, client can send PAUSE (time-out) frame to server, to delay the transfer of data of server to client, reduce packet loss and occur.
As shown in Figure 1, suppose client (as Client-1, Client-2 ..., Client-N) by access device (as access switch) be connected to server (as Server-1, Server-2 ..., Server-N), and equal turn-on flow rate controlling functions on each client, each server and access device.If the network interface card of client cannot process the data from server in time, then this client can carry out flow control, and namely client sends PAUSE frame to access device.Access device is after receiving PAUSE frame, and the port be connected with this client will carry out reduction of speed process, and it is congested to cause this port to occur.Further, access device sends PAUSE frame by the port be connected with server to server, and server is after receiving PAUSE frame, and server will carry out reduction of speed process, thus reaches the reduction of speed effect of whole flow path.
After the network interface card of client goes wrong, client can transmission PAUSE frame continuously and healthily, cause access device to receive a large amount of Pause frame, and the speed causing the port be connected with this client to send data reduces to 0.Access device, by the port transmission PAUSE frame be continuously and healthily connected with server, causes server to receive a large amount of Pause frame, and the speed causing server to send data reduces to 0.In actual applications, server is not that the client only gone wrong to network interface card sends data, also need to send data to other client, and server is when to send the speed of data be 0, server can be caused cannot to send data to other client, affect the normal data transfer process of other client, cause the service disconnection of other client.
Summary of the invention
The embodiment of the present invention provides a kind of method of flow control, said method comprising the steps of:
The flow of the access device pair port be connected with client is monitored;
The quantity of the time-out PAUSE frame received from described port in Preset Time when described access device is greater than default first numerical value, and when being not more than default second value from described port to the data that described client sends in Preset Time, described access device removes corresponding data cached of described port.
The process that the flow of the described access device pair port be connected with client is monitored, specifically comprise: described access device is after receiving the order monitored the flow of the port be connected with client, then described access device starts to monitor the flow of described port.
After the flow of the described access device pair port be connected with client is monitored, described method comprises further: the quantity of the PAUSE frame received from described port in Preset Time when described access device is greater than default first numerical value, and when being greater than default second value from described port to the data that described client sends in Preset Time, described access device sends PAUSE frame to server.
Described access device removes data cached process corresponding to described port, specifically comprises:
Described access device makes described port down, more described port is reached the standard grade; Or,
Described access device restarts the traffic monitoring function to described port.
Described default second value is 0.
The embodiment of the present invention provides a kind of access device, and described access device specifically comprises:
Monitoring module, for monitoring the flow of the port be connected with client;
Processing module, for being greater than default first numerical value when the quantity of the time-out PAUSE frame received from described port in Preset Time, and when being not more than default second value from described port to the data that described client sends in Preset Time, then remove corresponding data cached of described port.
Described monitoring module, specifically for after receiving the order monitored the flow of the port be connected with client, then starts to monitor the flow of described port.
Described processing module, also for after monitoring the flow of the port be connected with client, when the quantity of the PAUSE frame received from described port in Preset Time is greater than default first numerical value, and when being greater than default second value from described port to the data that described client sends in Preset Time, then send PAUSE frame to server.
Described processing module, specifically for removing in data cached process corresponding to described port, making described port down, more described port is reached the standard grade; Or, restart the traffic monitoring function to described port.
Described default second value is 0.
Based on technique scheme, in the embodiment of the present invention, access device is by monitoring the flow of the port be connected with client, when the quantity of the PAUSE frame received from port in Preset Time is greater than default first numerical value, and when the data sent from port to client in Preset Time are not more than default second value, remove corresponding data cached of port, thus make access device not need to send PAUSE frame to server, avoid server cannot send data to the client do not gone wrong, that avoids a client anomaly affects the transmission of server to other client datas, lower coverage during client exception, the affected client of the whole network is made to be reduced to one, greatly reduce the loss of client.
Accompanying drawing explanation
Fig. 1 is application scenarios schematic diagram of the prior art;
Fig. 2 is the method flow schematic diagram of a kind of flow control proposed in the embodiment of the present invention;
Fig. 3 is the application scenarios schematic diagram proposed in the embodiment of the present invention;
Fig. 4 is the structural representation of a kind of access device proposed in the embodiment of the present invention.
Embodiment
For problems of the prior art, the embodiment of the present invention provides a kind of method of flow control, the method is applied in the network comprising client (can be multiple client), access device (as access switch) and server (can be multiple server), and each client, each server and access device all open flow control function.Under above-mentioned application scenarios, as shown in Figure 2, the method for this flow control specifically can comprise the following steps:
Step 201, the flow of the access device pair port be connected with client (port namely this access device is connected with client) is monitored.
In the embodiment of the present invention, the process that the flow of the access device pair port be connected with client is monitored, specifically include but not limited to as under type: access device is after receiving the order monitored the flow of the port be connected with client, then access device starts to monitor the flow of port.
Step 202, the quantity of the PAUSE frame received from this port in Preset Time when access device is greater than default first numerical value, and when the data sent from this port to client in Preset Time are not more than default second value, then access device removes corresponding data cached of this port.
In the embodiment of the present invention, after the flow of the access device pair port be connected with client is monitored, the quantity of the PAUSE frame received from this port in Preset Time when access device is greater than default first numerical value, and when the data sent from this port to client in Preset Time are greater than default second value, then access device can send PAUSE frame to server.
In the embodiment of the present invention, after the flow of the access device pair port be connected with client is monitored, the quantity of the PAUSE frame received from this port in Preset Time when access device is not more than default first numerical value, and when the data sent from this port to client in Preset Time are greater than default second value or are not more than default second value, then access device can not send PAUSE frame to server, also corresponding data cached of this port can not be removed, according to existing procedure process, this process repeats no more.
In the said process of the embodiment of the present invention, default second value is specifically as follows 0.
In the embodiment of the present invention, access device removes data cached process corresponding to port, specifically includes but not limited to: access device makes port down, then port is reached the standard grade, i.e. access device Down (rolling off the production line) port, then UP (reaching the standard grade) port.Or access device restarts the traffic monitoring function to port, namely access device closes the traffic monitoring function to port, then opens the traffic monitoring function to port.
In the embodiment of the present invention, the quantity of the PAUSE frame received from this port in Preset Time when access device is greater than default first numerical value, and when the data sent from this port to client in Preset Time are not more than default second value, then access device determines that the network interface card of the client that this port is corresponding goes wrong, and the transmission PAUSE frame that this client is continuing.Further, access device is when knowing the transmission PAUSE frame that this client is continuing, then access device removes corresponding data cached of port.
Due to when corresponding data cached of port exceeds predetermined threshold value, access device just can send PAUSE frame to server.Therefore, access device is after removing corresponding data cached of port, and will corresponding data cached of this port be caused not exceed predetermined threshold value, namely access device can not send PAUSE frame to server.
Based on technique scheme, in the embodiment of the present invention, access device is by monitoring the flow of the port be connected with client, when the quantity of the PAUSE frame received from port in Preset Time is greater than default first numerical value, and when the data sent from port to client in Preset Time are not more than default second value, remove corresponding data cached of port, thus make access device not need to send PAUSE frame to server, avoid server cannot send data to the client do not gone wrong, that avoids a client anomaly affects the transmission of server to other client datas, lower coverage during client exception, the affected client of the whole network is made to be reduced to one, greatly reduce the loss of client.
Below in conjunction with concrete application scenarios, said process is described in detail.Application scenarios schematic diagram as shown in Figure 3, client (as Client-1, Client-2 ..., Client-N) by access device (as access switch) be connected to server (as Server-1, Server-2 ..., Server-N), and equal turn-on flow rate controlling functions on client, server and access device.Under above-mentioned application scenarios, the method for the flow control proposed in the embodiment of the present invention, specifically can comprise the following steps:
Step 1, Client-1 by access device to Server-1 acquisition request data.
The data that Client-1 asks are sent to Client-1 by access device by step 2, Server-1.
If the network interface card of step 3 Client-1 cannot process the data from Server-1 timely, namely the network interface card of this Client-1 go wrong (i.e. network interface card occur abnormal) time, then this Client-1 can carry out flow control, and namely Client-1 can send a large amount of PAUSE frames to access device continuously and healthily.
Step 4, access device receives the PAUSE frame from Client-1 by port G1/0/1 (port be namely connected with Client-1), the quantity of the PAUSE frame that access device receives from port G1/0/1 in Preset Time is greater than default first numerical value, and access device all sends data (at this less than from port G1/0/1 to Client-1 in Preset Time, default second value is set to 0, namely the data that access device sends from port G1/0/1 in Preset Time are not more than default second value), therefore access device removes corresponding data cached of port G1/0/1.
Access device is in the process monitored the traffic conditions of port G1/0/1, because Client-1 can send a large amount of PAUSE frames to access device continuously and healthily, therefore port G1/0/1 will receive a large amount of PAUSE frames, and the quantity of PAUSE frame that namely access device receives from port G1/0/1 in Preset Time is greater than default first numerical value.
In the process of practical application, when the network interface card of Client-1 goes wrong, Client-1 only can send PAUSE frame to access device, and can not by access device to Server-1 acquisition request data, the data that Client-1 asks also would not be sent to Client-1 by access device by Server-1, application on Client-1 loses with the application on Server-1 and is connected, and Server-1 itself can not send data to Client-1 again.Therefore, access device will not have data to need to send to Client-1 by port G1/0/1, and namely access device all will send data less than from port G1/0/1 to Client-1 in Preset Time.
Wherein, the data cached mode that access device removes port G1/0/1 corresponding comprises: access device closes the traffic monitoring function of this port G1/0/1, then opens the traffic monitoring function of this port G1/0/1; Or access device Down falls this port G1/0/1, then this port of UP G1/0/1.
Access device is greater than default first numerical value by the PAUSE frame that port G1/0/1 receives, and when the outflow sending data from port G1/0/1 to client is not more than default second value, then thinks that the network interface card of the Client-1 that port G1/0/1 is corresponding goes wrong.Afterwards, access device removes corresponding data cached of port G1/0/1.After corresponding data cached of port G1/0/1 is eliminated, be connected because the application on Client-1 loses with the application on Server-1, Server-1 itself can not send data to Client-1 again, therefore access device also would not receive data sending to Client-1 from Server-1 by port G1/0/2, thus the traffic monitoring interaction relation between port G1/0/1 and port G1/0/2 is cancelled, start the effect of traffic monitoring to reach the port G1/0/1 up going port that do not link.Further, access device no longer will send PAUSE frame by port G1/0/2 to Server-1.
In said process, because access device can not send PAUSE frame to Server-1, therefore, Server-1 sends to the data of other client (as Client-2, Client-3) still can send to access device, sends the data to other client by access device.Therefore, aforesaid way can not affect the data transmission procedure of other client (as Client-2, Client-3), avoids the service disconnection of these clients.
Based on the inventive concept same with said method, additionally provide a kind of access device in the embodiment of the present invention, as shown in Figure 4, described access device specifically comprises:
Monitoring module 11, for monitoring the flow of the port be connected with client;
Processing module 12, for being greater than default first numerical value when the quantity of the time-out PAUSE frame received from described port in Preset Time, and when being not more than default second value from described port to the data that described client sends in Preset Time, then remove corresponding data cached of described port.
Described monitoring module 11, specifically for after receiving the order monitored the flow of the port be connected with client, then starts to monitor the flow of described port.
Described processing module 12, also for after monitoring the flow of the port be connected with client, when the quantity of the PAUSE frame received from described port in Preset Time is greater than default first numerical value, and when being greater than default second value from described port to the data that described client sends in Preset Time, then send PAUSE frame to server.
Described processing module 12, specifically for removing data cached process corresponding to described port, making described port down, more described port is reached the standard grade; Or, restart the traffic monitoring function to described port.
In the embodiment of the present invention, described default second value is 0.
Wherein, the modules of apparatus of the present invention can be integrated in one, and also can be separated deployment.Above-mentioned module can merge into a module, also can split into multiple submodule further.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add required general hardware platform by software and realize, and can certainly pass through hardware, but in a lot of situation, the former is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform method described in each embodiment of the present invention.It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the module in accompanying drawing or flow process might not be that enforcement the present invention is necessary.It will be appreciated by those skilled in the art that the module in the device in embodiment can carry out being distributed in the device of embodiment according to embodiment description, also can carry out respective change and be arranged in the one or more devices being different from the present embodiment.The module of above-described embodiment can merge into a module, also can split into multiple submodule further.The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.Be only several specific embodiment of the present invention above, but the present invention is not limited thereto, the changes that any person skilled in the art can think of all should fall into protection scope of the present invention.

Claims (10)

1. a method for flow control, is characterized in that, said method comprising the steps of:
The flow of the access device pair port be connected with client is monitored;
The quantity of the time-out PAUSE frame received from described port in Preset Time when described access device is greater than default first numerical value, and when being not more than default second value from described port to the data that described client sends in Preset Time, described access device removes corresponding data cached of described port.
2. the method for claim 1, is characterized in that, the process that the flow of the described access device pair port be connected with client is monitored, and specifically comprises:
Described access device is after receiving the order monitored the flow of the port be connected with client, then described access device starts to monitor the flow of described port.
3. the method for claim 1, is characterized in that, after the flow of the described access device pair port be connected with client is monitored, described method comprises further:
The quantity of the PAUSE frame received from described port in Preset Time when described access device is greater than default first numerical value, and when being greater than default second value from described port to the data that described client sends in Preset Time, described access device sends PAUSE frame to server.
4. the method for claim 1, is characterized in that, described access device removes data cached process corresponding to described port, specifically comprises:
Described access device makes described port down, more described port is reached the standard grade; Or,
Described access device restarts the traffic monitoring function to described port.
5. the method as described in claim 1-4 any one, is characterized in that, described default second value is 0.
6. an access device, is characterized in that, described access device specifically comprises:
Monitoring module, for monitoring the flow of the port be connected with client;
Processing module, for being greater than default first numerical value when the quantity of the time-out PAUSE frame received from described port in Preset Time, and when being not more than default second value from described port to the data that described client sends in Preset Time, then remove corresponding data cached of described port.
7. access device as claimed in claim 6, is characterized in that,
Described monitoring module, specifically for after receiving the order monitored the flow of the port be connected with client, then starts to monitor the flow of described port.
8. access device as claimed in claim 6, is characterized in that,
Described processing module, also for after monitoring the flow of the port be connected with client, when the quantity of the PAUSE frame received from described port in Preset Time is greater than default first numerical value, and when being greater than default second value from described port to the data that described client sends in Preset Time, then send PAUSE frame to server.
9. access device as claimed in claim 6, is characterized in that,
Described processing module, specifically for removing in data cached process corresponding to described port, making described port down, more described port is reached the standard grade; Or, restart the traffic monitoring function to described port.
10. the access device as described in claim 6-9 any one, is characterized in that, described default second value is 0.
CN201510130006.5A 2015-03-24 2015-03-24 Flow control method and device Active CN104780077B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510130006.5A CN104780077B (en) 2015-03-24 2015-03-24 Flow control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510130006.5A CN104780077B (en) 2015-03-24 2015-03-24 Flow control method and device

Publications (2)

Publication Number Publication Date
CN104780077A true CN104780077A (en) 2015-07-15
CN104780077B CN104780077B (en) 2019-12-06

Family

ID=53621332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510130006.5A Active CN104780077B (en) 2015-03-24 2015-03-24 Flow control method and device

Country Status (1)

Country Link
CN (1) CN104780077B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1917477A (en) * 2006-09-14 2007-02-21 杭州华为三康技术有限公司 Method and device of preventing interference of flow control frames
CN101800706A (en) * 2010-03-25 2010-08-11 中兴通讯股份有限公司 Method and system for obtaining threshold of flow control buffer area
CN101848168A (en) * 2010-06-11 2010-09-29 杭州华三通信技术有限公司 Target MAC (Media Access Control) address based flow control method, system and equipment
CN101945037A (en) * 2010-03-16 2011-01-12 深圳市普联技术有限公司 Flow rate control method, system, switch and router
CN102014045A (en) * 2009-09-07 2011-04-13 杭州华三通信技术有限公司 Exchanger and method for controlling flow of same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1917477A (en) * 2006-09-14 2007-02-21 杭州华为三康技术有限公司 Method and device of preventing interference of flow control frames
CN102014045A (en) * 2009-09-07 2011-04-13 杭州华三通信技术有限公司 Exchanger and method for controlling flow of same
CN101945037A (en) * 2010-03-16 2011-01-12 深圳市普联技术有限公司 Flow rate control method, system, switch and router
CN101800706A (en) * 2010-03-25 2010-08-11 中兴通讯股份有限公司 Method and system for obtaining threshold of flow control buffer area
CN101848168A (en) * 2010-06-11 2010-09-29 杭州华三通信技术有限公司 Target MAC (Media Access Control) address based flow control method, system and equipment

Also Published As

Publication number Publication date
CN104780077B (en) 2019-12-06

Similar Documents

Publication Publication Date Title
CN105897836A (en) Back source request processing method and device
CN112511456B (en) Flow control method, apparatus, device, storage medium, and computer program product
CN104468201B (en) A kind of offline auto-deleted method of network equipment and equipment
CN107920366A (en) The method and device that a kind of business to mobile terminal is shunted
CN104468231A (en) SDN interchanger and controller dynamic registration method
CN103825839A (en) Message transmission method and equipment based on aggregated link
CN105721304A (en) Adaptive routing adjustment method and system and service device
CN111130979B (en) Method and equipment for connecting branch node with central node in SDWAN (software development wide area network) scene
CN115226132A (en) Data transmission method and device, computer equipment and storage medium
CN108683561B (en) Site state detection method and device
CN108667640B (en) Communication method and device, and network access system
CN104780077A (en) Flow control method and device
CN105515869A (en) Out-of-band management method and device for virtual switching unit
CN111130917B (en) Line testing method, device and system
CN116506860A (en) Base station network slice management system based on dynamic resource allocation
CN103746842A (en) Method and system for detecting fault restarting of line card
CN108881011B (en) LACP (Link aggregation control protocol) switching method and device applied to cross-device
CN107231655B (en) Method and system for reducing load of wireless controller
CN105490955A (en) Flow switching method and flow switching equipment
DE102017219770A1 (en) Method for operating an Ethernet communication device and Ethernet communication device
CN110166368B (en) Cloud storage network bandwidth control system and method
US10361967B2 (en) Communication system using audio video bridging
CN103795650A (en) Configuration information migration method and setting method and device of configuration information migration method and setting method
CN104580530A (en) Cloud caching system and realization method thereof
JP2016010088A (en) Network control device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant before: Huasan Communication Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant