CN1192577C - Network frame quick distribution method with flow rate control in network equipment - Google Patents

Network frame quick distribution method with flow rate control in network equipment Download PDF

Info

Publication number
CN1192577C
CN1192577C CN 02117842 CN02117842A CN1192577C CN 1192577 C CN1192577 C CN 1192577C CN 02117842 CN02117842 CN 02117842 CN 02117842 A CN02117842 A CN 02117842A CN 1192577 C CN1192577 C CN 1192577C
Authority
CN
China
Prior art keywords
frame
ethernet
network
network equipment
interface
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.)
Expired - Fee Related
Application number
CN 02117842
Other languages
Chinese (zh)
Other versions
CN1412999A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 02117842 priority Critical patent/CN1192577C/en
Publication of CN1412999A publication Critical patent/CN1412999A/en
Application granted granted Critical
Publication of CN1192577C publication Critical patent/CN1192577C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Abstract

The present invention relates to a network frame quick distributing method with flow rate control in network equipment, which comprises: firstly, network frames received by network equipment are recorded into corresponding virtual interfaces queue according to entry interface information of the network frames; besides, the operating state of network equipment interfaces corresponding to the virtual interface queues is adjusted; then, after the network frames are added to corresponding protocol queues, analyzed and processed, the network frames are taken out and distributed, and furthermore, the total quantity of the network frames in the virtual interface queues corresponding to the network frames is adjusted; meanwhile, the operating state of the network equipment interfaces corresponding to the virtual interface queues is adjusted. The present invention can protect a router against abnormal work because of the flow rate exceeding own processing capability and enhance the router stability under the impact of data in high flow rate for a long time. Meanwhile, the present invention can also reduce processing steps in the procedure of distributing Ethernet frames and enhance the distributing speed of the network equipment to the Ethernet frames. As a result, the present invention enhances the processing speed of routers.

Description

The method of the Network frame quick distribution of band flow control in the network equipment
Technical field
The present invention relates to a kind of network data transmission technology, relate in particular to the method for the Network frame quick distribution of band flow control in a kind of network equipment.
Background technology
Ethernet protocol belongs to link layer protocol, it receive from ethernet physical layer be the data of unit with the frame after, it is handled and is distributed to network layer or other link layer protocol modules.Wherein, ethernet link layer will influence router to processing speed of data to the processing and the ways of distribution of ethernet frame; And when on the Ethernet being the flow of unit when having surpassed the disposal ability of router with " frame/second ", router need carry out self-protection, otherwise can produce unpredictable consequence, reduces, occurs packet loss phenomenon etc. as message transmissions speed.So how ethernet frame being distributed fast and Ethernet interface is carried out flow control is the key factor that determines the router key property.
In the technology, the process of handling the distribution ethernet frame mainly contains two kinds at present:
A kind of processing procedure as shown in Figure 1, this method all is provided with one at each Ethernet interface and receives formation, carries out traffic statistics with the ethernet frame that Ethernet interface is received, and then is convenient to router and carries out flow control, then, this ethernet frame adds the corresponding protocol formation again.This processing method makes each ethernet frame arrive protocol layer must go into twice formation before, produces software interrupt twice, therefore, has increased the processing links of ethernet frame, has influenced the distribution speed of ethernet frame.
The processing procedure of another kind of ethernet frame as shown in Figure 2, with respect to said method, this method is not at the reception formation of Ethernet interface, but the adding of the ethernet frame after directly will analyzing protocol queue; As long as each ethernet frame is gone into a formation before arriving protocol layer, produce one time software interrupt.Though this method does not increase the processing links of ethernet frame, can't realize Ethernet interface is carried out reliable flow control, and then can not effectively protect router, make it not to be in hard service.
Summary of the invention
The purpose of this invention is to provide in a kind of network equipment the method for the Network frame quick distribution of band flow control, thereby the network equipment such as router can will be distributed from the ethernet frame that Ethernet interface receives in normal operation fast.
The object of the present invention is achieved like this: the method for the Network frame quick distribution of band flow control comprises the steps: in the network equipment
(1) network equipment receives the net frame;
(2) reading this net frame incoming interface information determines and its corresponding virtual interface queue, whether the total amount of judging net frame in the virtual interface formation is greater than the pass threshold value of setting, if greater than the pass threshold value of setting, then abandon this Ethernet, and the Ethernet interface of this virtual interface formation correspondence continues to receive the net frame in the prohibited network devices, if less than the pass threshold value of setting, then allow the net frame to add the virtual interface formation;
(3) protocol type according to the net frame adds the corresponding protocol formation with it;
(4) this net frame is carried out from protocol queue, take out and distribution after the analyzing and processing;
(5) the net frame total amount in this net frame corresponding virtual interface queue is adjusted, and judge whether net frame total amount opens threshold value less than setting in this virtual interface formation, if the threshold value of opening less than setting then makes this Ethernet interface allow to accept the Ethernet state, otherwise does not process.
The network equipment in the described step (1) is the ethernet device of router, and the net frame that is received is an ethernet frame, and the net frame total amount in the step (5) is the ethernet frame total amount.
Described step (2) concrete steps are:
(21), and the total amount of the ethernet frame in this virtual interface formation is added 1 if allow this ethernet frame to add the virtual interface formation.
Described step (5) also needs following steps before:
(51) the incoming interface information of definite ethernet frame of being distributed;
(52) determine and this ethernet frame corresponding virtual interface queue according to this incoming interface information;
(53) total amount with the ethernet frame in this virtual interface formation subtracts 1.
The counter of described virtual interface formation for creating at the Ethernet interface of the network equipment.
Step (3) is described, and ethernet frame is added the corresponding protocol formation is to be that the ethernet frame of MBUF (a kind of data structure of storaging data information) adds the corresponding protocol formation with version.
The incoming interface information of the content of in store ethernet frame and ethernet frame in the ethernet frame of MUBF structure.
Ethernet frame total amount in the step (5) be meant receive from Ethernet interface and be added into each protocol queue, but the ethernet frame total amount of also from protocol queue, not taking out.
By technique scheme as can be seen, the Ethernet interface that the present invention is directed to the network equipments such as router has been set up a virtual interface formation, utilize this virtual interface formation that the ethernet frame that receives from this Ethernet interface is carried out traffic statistics, make router be in rational flow status all the time according to the disposal ability control ethernet frame of self, thereby the disposal ability that can avoid router to surpass self because of flow causes can't operate as normal, improved router in big data on flows is long-time under impacting stability.The method that has adopted the virtual interface formation that the flow of ethernet frame is added up among the present invention makes ethernet frame only need go into a formation before arriving protocol layer, produce one time software interrupt, reduced ethernet frame has been carried out processing links in the distribution procedure, thereby increase the distribution speed of the network equipment, promptly improved the processing speed of router ethernet frame.
Description of drawings
Fig. 1 is the method schematic diagram A that handles the distribution ethernet frame in the prior art;
Fig. 2 is the method schematic diagram B that handles the distribution ethernet frame in the prior art;
Fig. 3 is for handling the method schematic diagram of distribution ethernet frame among the present invention;
Fig. 4 handles the workflow diagram of distribution ethernet frame for the present invention.
Embodiment
The embodiment of the method for the Network frame quick distribution of band flow control is described below in conjunction with the accompanying drawings in the network equipment of the present invention, referring to Fig. 3, Fig. 4, after the ethernet device of router is received a complete frame, produce Ethernet and receive interruption, this is a kind of hardware interrupts; Receive in the interruption at hardware, analyze the frame head of ethernet frame, read the protocol type of the protocol layer data that are packaged into ethernet frame, the ethernet frame that will analyze according to the protocol type that obtains joins the reception formation of corresponding agreement then, produces the software interrupt of this agreement correspondence simultaneously; Analyzed intact ethernet frame is called as message after arriving protocol layer, in the software interrupt of protocol layer, message is taken out from protocol queue.So far the present invention has just finished the distribution of frame between Ethernet interface layer and protocol layer of Ethernet input.
Technical scheme provided by the present invention realizes that the key of flow control strategy has been to propose the mechanism of Ethernet virtual interface formation.
Protocol queue among Fig. 3 is not the formation at interface, but at the formation of agreement, and promptly the message from same a kind of agreement of different Ethernet interfaces will enter same protocol queue; And the ethernet frame that joins protocol queue is that the version with MBUF (a kind of data structure of storaging data information) adds, and the MBUF structure not only can be preserved ethernet frame, has indicated also simultaneously this frame is from which interface.
For the interface queue of realizing that Ethernet is virtual, we create the counter of an overall situation on each interface, be interface virtual queue length, be used for noting down the total amount of the ethernet frame that receives from this Ethernet interface and also do not take out from protocol queue when being added into each protocol queue.When frame was joined protocol queue, interface virtual queue length just added 1; When frame is taken out from protocol queue, promptly from the MBUF structure, take out, the incoming interface information of this frame of being indicated according to the MBUF structure, promptly this frame is from which interface, and the interface virtual queue length of this frame correspondence is subtracted 1.This counter has been arranged, we just know the current quantity that is stored in the frame the formation by protocol layer processing in time that receives from certain Ethernet interface, reception formation at interface has so just been arranged, but in fact this formation does not exist, therefore claim that this formation is the interface virtual queue, the counters count of being created be interface virtual queue length.
Virtual interface formation and virtual interface queue length have been arranged, carried out flow control at interface and just can realize.We can realize the present invention by the simplest threshold value Flow Control: each interface all has one to open threshold value and a pass threshold value; Whenever in hardware interrupts, frame is joined before the protocol queue, judge that whether the virtual interface queue length is greater than closing threshold value, if the virtual interface queue length is greater than closing threshold value, just abandon this frame, and forbid that corresponding Ethernet interface receives, this interface just temporarily can not produce ethernet hardware again and receive interruption like this; Whenever in protocol layer software interrupts, after frame taken out from protocol queue, judge that whether the virtual interface queue length is less than opening threshold value, if interface queue length is less than opening threshold value, just allow Ethernet interface to receive, so just can produce ethernet hardware again and receive interruption, so just on the interface virtual queue, realize true and effective flow control.
Concrete handling process at the ethernet frame that ethernet device received of router among the present invention is as follows, referring to Fig. 4:
Step 1: the ethernet device of router receives complete ethernet frame;
Step 2: the incoming interface information that reads the ethernet frame that is received;
Step 3: the incoming interface information according to ethernet frame is determined and its corresponding virtual interface queue;
Step 4: whether the total amount of judging the ethernet frame in the virtual interface formation promptly closes threshold value greater than set point, if greater than the pass threshold value, and execution in step 5, otherwise, execution in step 6;
Step 5: abandon this ethernet frame, and this Ethernet interface continues to receive ethernet frame in the prohibited network devices;
Step 6: the total amount of the ethernet frame in this virtual interface formation is added 1
Step 7: the protocol type according to ethernet frame adds the corresponding protocol formation with it;
Step 8: this ethernet frame is carried out taking out from protocol queue and distribution after the analyzing and processing;
Step 9: the incoming interface information that reads the ethernet frame of being distributed;
Step 10: determine and this ethernet frame corresponding virtual interface queue according to this incoming interface information;
Step 11: the total amount of the ethernet frame in this virtual interface formation is subtracted 1;
Step 12: whether the ethernet frame total amount of judging this virtual interface formation is less than opening threshold value, if less than opening threshold value, then execution in step 13, otherwise, execution in step 14;
Step 13: make this Ethernet interface for allowing to receive the ethernet frame state;
Step 14: do not process, make this Ethernet interface keep forbidding receiving the state of ethernet frame.
By the concrete processing procedure of the above-mentioned complete ethernet frame that ethernet device received at router, realized quick distribution to the ethernet frame of band flow control.In addition, the pass threshold value in the above-mentioned processing procedure with open threshold value and can adopt identical value, also can adopt different values.

Claims (8)

1, the method for the Network frame quick distribution of band flow control in a kind of network equipment is characterized in that this method comprises the steps:
(1) network equipment receives the net frame;
(2) reading this net frame incoming interface information determines and its corresponding virtual interface queue, whether the total amount of judging net frame in the virtual interface formation is greater than the pass threshold value of setting, if greater than the pass threshold value of setting, then abandon this Ethernet, and the Ethernet interface of this virtual interface formation correspondence continues to receive the net frame in the prohibited network devices, if less than the pass threshold value of setting, then allow the net frame to add the virtual interface formation;
(3) protocol type according to the net frame adds the corresponding protocol formation with it;
(4) this net frame is carried out from protocol queue, take out and distribution after the analyzing and processing;
(5) the net frame total amount in this net frame corresponding virtual interface queue is adjusted, and judge whether net frame total amount opens threshold value less than setting in this virtual interface formation, if the threshold value of opening less than setting then makes this Ethernet interface allow to accept the Ethernet state, otherwise does not process.
2, the method for the Network frame quick distribution of band flow control in the network equipment according to claim 1, it is characterized in that: the network equipment in the described step (1) is the ethernet device of router, the net frame that is received is an ethernet frame, and the net frame total amount in the step (5) is the ethernet frame total amount.
3, the method for the Network frame quick distribution of band flow control in the network equipment according to claim 2, it is characterized in that: described step (2) concrete steps are:
(21) if allow ethernet frame to add the virtual interface formation, then the total amount with the ethernet frame in this virtual interface formation adds 1.
4, the method for the Network frame quick distribution of band flow control in the network equipment according to claim 1, it is characterized in that: described step (5) also needs following steps before:
(51) the incoming interface information of definite ethernet frame of being distributed;
(52) determine and this ethernet frame corresponding virtual interface queue according to this incoming interface information;
(53) total amount with the ethernet frame in this virtual interface formation subtracts 1.
5, the method for the Network frame quick distribution of band flow control in the network equipment according to claim 2 is characterized in that: the counter of described virtual interface formation for creating at the Ethernet interface of the network equipment.
6, the method for Network frame quick distribution of band flow control in the network equipment according to claim 2 is characterized in that: step (3) is described, and ethernet frame is added the corresponding protocol formation is to be that the ethernet frame of MBUF (a kind of data structure of storaging data information) adds the corresponding protocol formation with version.
7. the method for the Network frame quick distribution of band flow control is characterized in that: the incoming interface information of the content of in store ethernet frame and ethernet frame in the ethernet frame of MUBF structure in the network equipment according to claim 6.
8. the method for the Network frame quick distribution of band flow control in the network equipment according to claim 2, it is characterized in that: the ethernet frame total amount in the step (5) be meant receive from Ethernet interface and be added into each protocol queue, but the ethernet frame total amount of also from protocol queue, not taking out.
CN 02117842 2002-05-22 2002-05-22 Network frame quick distribution method with flow rate control in network equipment Expired - Fee Related CN1192577C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 02117842 CN1192577C (en) 2002-05-22 2002-05-22 Network frame quick distribution method with flow rate control in network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 02117842 CN1192577C (en) 2002-05-22 2002-05-22 Network frame quick distribution method with flow rate control in network equipment

Publications (2)

Publication Number Publication Date
CN1412999A CN1412999A (en) 2003-04-23
CN1192577C true CN1192577C (en) 2005-03-09

Family

ID=4744538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 02117842 Expired - Fee Related CN1192577C (en) 2002-05-22 2002-05-22 Network frame quick distribution method with flow rate control in network equipment

Country Status (1)

Country Link
CN (1) CN1192577C (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1298149C (en) * 2003-07-31 2007-01-31 中兴通讯股份有限公司 Flow control device and method based on packet mode
CN100433702C (en) * 2003-09-01 2008-11-12 日本电信电话株式会社 Packet communication method
CN100464511C (en) * 2004-01-05 2009-02-25 联想(北京)有限公司 Ether net communication system and method
CN101958843A (en) * 2010-11-01 2011-01-26 南京邮电大学 Intelligent routing selection method based on flow analysis and node trust degree
CN102546412A (en) * 2012-01-04 2012-07-04 深圳市共进电子股份有限公司 Flow control method and flow controller

Also Published As

Publication number Publication date
CN1412999A (en) 2003-04-23

Similar Documents

Publication Publication Date Title
CN1210653C (en) Method for protecting a network from data packet overload
CN1297097C (en) Method for raising data transmission performance when the network is congested
CN100428688C (en) Protective method for network attack
CN100433711C (en) Message speed limit method
CN100579003C (en) Method and system for preventing TCP attack by utilizing network stream technology
CN1282331C (en) Device and method for realizing abnormal flow control
CN101060531A (en) A method and device for avoiding the attack of network equipment
CN102291389A (en) Cross-layer congestion control method in satellite network
CN1889510A (en) Method for raising network security via message processing
CN102970118B (en) Transmission control protocol acknowledgement (TCP ACK) message processing method and device and wireless network equipment
CN103023806A (en) Control method and control device of cache resource of shared cache type Ethernet switch
CN102510385A (en) Method for preventing fragment attack of IP (Internet Protocol) datagram
CN1297098C (en) System flow controlling method
CN1192577C (en) Network frame quick distribution method with flow rate control in network equipment
CN1194509C (en) Method for controlling message transmitting spped rate in router interface
CN1812368A (en) Method for transmitting message data by IP facsimile gateway
CN102299850A (en) Method and device for protecting central processing unit (CPU)
CN101771575B (en) Method, device and system for processing IP partitioned message
CN1221099C (en) Method for controlling service priority for tunneling data packet in general packet wireless service
CN1705295A (en) Packet transmission system having priority and method therefor
CN1553662A (en) Method for preventing refusal service attack
CN1317855C (en) Invasion detecting system and its invasion detecting method
CN1956410A (en) Method for implementing information interaction between single boards
CN111817973B (en) Data center network load balancing method
CN116193000B (en) FPGA-based intelligent packet rapid forwarding system and forwarding method

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20050309

Termination date: 20150522

EXPY Termination of patent right or utility model