CN106533959B - The determination method and switching equipment of a kind of switching equipment outlet end rate - Google Patents

The determination method and switching equipment of a kind of switching equipment outlet end rate Download PDF

Info

Publication number
CN106533959B
CN106533959B CN201611208309.5A CN201611208309A CN106533959B CN 106533959 B CN106533959 B CN 106533959B CN 201611208309 A CN201611208309 A CN 201611208309A CN 106533959 B CN106533959 B CN 106533959B
Authority
CN
China
Prior art keywords
moment
congestion
message
switching equipment
target outlet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611208309.5A
Other languages
Chinese (zh)
Other versions
CN106533959A (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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN201611208309.5A priority Critical patent/CN106533959B/en
Publication of CN106533959A publication Critical patent/CN106533959A/en
Application granted granted Critical
Publication of CN106533959B publication Critical patent/CN106533959B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames

Abstract

The embodiment of the present invention provides the determination method and switching equipment of a kind of switching equipment outlet end rate, is related to field of communication technology, solves the problems, such as that existing CPU cannot accurately calculate outlet end message transmission rate when congestion occurs for switching equipment.The first moment when the program includes: the target outlet queue generation congestion for obtaining switching equipment, obtain the second moment when target outlet queue is equal to first threshold to the size of corresponding target outlet end output data after the first moment, according to the second moment and the first moment and first threshold got, the message transmission rate at target outlet end is determined.The present invention is applied to switching equipment.

Description

The determination method and switching equipment of a kind of switching equipment outlet end rate
Technical field
The present invention relates to field of communication technology more particularly to the determination methods and exchange of a kind of switching equipment outlet end rate Equipment.
Background technique
Switching equipment in existing network includes multiple ports, different according to the transmission direction of data, can be incited somebody to action according to function Port is divided into arrival end and outlet end, when multiple arrival ends of the switching equipment transmit data to one outlet end, Huo Zheyi When a Entry to motorway end is to a low speed outlet end transmission data, cause the overall data transmission rate of the switching equipment arrival end big Message transmission rate in the outlet end of the switching equipment will cause the corresponding gate region on switching equipment to generate heap Product, when accumulating to a certain extent, congestion will occur for the gate region of switching equipment, and user wants to know about exchange under congestion and sets It when transmission rate (i.e. the rate of the gate region of switching equipment) of standby outlet end, is checked by the CPU of switching equipment, The CPU of switching equipment can calculate the message transmission rate of switching equipment outlet end.
But the limitation of the CPU ability due to switching equipment, CPU can only be per second or the primary exchange of calculating was set per several seconds The message transmission rate of standby outlet end, it is per second or every in CPU calculating at the time of congestion occurs for the gate region of switching equipment When at the time of among several seconds, CPU cannot calculate message transmission rate when switching equipment gate region congestion, i.e., existing CPU cannot accurately calculate outlet end message transmission rate when congestion occurs for switching equipment gate region.
Summary of the invention
The embodiment of the present invention provides the determination method and switching equipment of a kind of switching equipment outlet end rate, solves existing CPU cannot accurately calculate switching equipment gate region occur congestion when outlet end message transmission rate the problem of.
In order to achieve the above objectives, the embodiment of the present invention adopts the following technical scheme that
In a first aspect, providing a kind of determination method of switching equipment outlet end rate, it is applied to switching equipment, comprising:
Obtain the first moment when the target outlet queue generation congestion of the switching equipment;Wherein, first moment It is the switching equipment according to the first congestion Receive message, the first congestion message is by the exchange in the switching equipment What chip was generated when congestion occurs for the target outlet queue;
The target outlet queue is obtained after first moment to the size etc. of corresponding target outlet end output data The second moment when first threshold;Wherein, second moment is the switching equipment according to the second congestion Receive message, The second congestion message be from the exchange chip in the target outlet queue after first moment to the target It is generated when the size of data of outlet end output is equal to first threshold;
According to the time interval and the first threshold between second moment and first moment, the mesh is determined Mark the message transmission rate of outlet end.
Second aspect provides a kind of switching equipment, comprising:
Module is obtained, the first moment when congestion occurs for the target outlet queue for obtaining the switching equipment;Wherein, First moment is the switching equipment according to the first congestion Receive message, and the first congestion message is by the exchange What the exchange chip in equipment was generated when congestion occurs for the target outlet queue;
The acquisition module is also used to obtain the target outlet queue after first moment to corresponding target outlet The second moment when the size of output data being held to be equal to first threshold;Wherein, second moment be the switching equipment according to Second congestion Receive message, the second congestion message is in the target outlet queue by the exchange chip described It is generated when the size of data that one moment, the target outlet end exported backward is equal to first threshold;
Determining module, for according between acquisition module second moment and first moment that get when Between interval and the first threshold, determine the message transmission rate at the target outlet end.
The determination method and switching equipment of switching equipment outlet end provided in an embodiment of the present invention rate are exchanged by obtaining First moment of congestion occurs for the target outlet queue of equipment, obtains target outlet queue and goes out after the first moment to corresponding target The size of mouthful end output data is equal to the second moment when first threshold, according to the second moment and the first moment got and First threshold determines the message transmission rate at target outlet end.Due to the gate region that the first moment of acquisition is switching equipment At the time of congestion occurs, the data at the target outlet end determined according to the first moment, the second moment and first threshold are transmitted Rate is exactly therefore target outlet end transmission rate when congestion occurs for switching equipment target outlet queue solves existing CPU Cannot accurately calculate switching equipment occur congestion when outlet end message transmission rate the problem of.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be in embodiment or description of the prior art Required attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some realities of the invention Example is applied, it for those of ordinary skill in the art, without creative efforts, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is a kind of switching equipment structural schematic diagram provided in an embodiment of the present invention;
Fig. 2 is a kind of determination method schematic diagram of switching equipment outlet end rate provided in an embodiment of the present invention;
Fig. 3 is the message format schematic diagram of CNM message provided in an embodiment of the present invention;
Fig. 4 is the determination method schematic diagram of another switching equipment outlet end provided in an embodiment of the present invention rate;
Fig. 5 is a kind of structural schematic diagram of switching equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Fig. 1 is a kind of switching equipment structural schematic diagram provided in an embodiment of the present invention, exchange provided in an embodiment of the present invention Equipment 01 includes at least one arrival end 11 (TE0/1 of example as shown in figure 1), at least one outlet end 12 (example as shown in figure 1 one G0/1), gate region 13 and exchange chip 14 wherein, the corresponding one outlet end 12 of each gate region 13, specifically, it is above-mentioned go out Mouth queue 13 is used to store the data FLOW1 of 01 arrival end 11 of switching equipment input, and exports to corresponding outlet end 12 Data.
For the ease of clearly describing the technical solution of the embodiment of the present invention, in an embodiment of the present invention, use " the One ", the printed words such as " second " distinguish function or the essentially identical identical entry of effect or similar item, and those skilled in the art can To understand that the printed words such as " first ", " second " are not defined quantity and execution order.
It should be noted that in the embodiment of the present invention, " illustrative " or " such as " etc. words make example, example for indicating Card or explanation.Be described as in the embodiment of the present invention " illustrative " or " such as " any embodiment or design scheme do not answer It is interpreted than other embodiments or design scheme more preferably or more advantage.Specifically, " illustrative " or " example are used Such as " word is intended to that related notion is presented in specific ways.
It should be noted that in the embodiment of the present invention, " (English: of) ", " corresponding (English: corresponding, It relevant) " sometimes can be mixed with " corresponding (English: corresponding) ", it is noted that do not emphasizing it When difference, meaning to be expressed is consistent.
Based on switching equipment structural schematic diagram shown in FIG. 1, the embodiment of the present invention provides a kind of switching equipment outlet end speed The determination method of rate, as shown in Fig. 2, this method specifically comprises the following steps:
101, the first moment when the target outlet queue generation congestion of switching equipment is obtained.
In the present embodiment, the first moment was switching equipment according to the first congestion Receive message, the first congestion message be by What the exchange chip in switching equipment was generated when congestion occurs for target outlet queue.
Illustratively, before the first moment when switching equipment acquisition target outlet queue generation congestion, to target outlet The congestion situation of queue is monitored, and when monitoring that congestion occurs for target outlet queue, exchange chip can be by target outlet team Column are recorded at the time of generation, and the current data information in sampled targets gate region.At the time of exchange chip will be above-mentioned And above-mentioned current data information is packaged, to generate the first congestion message.Therefore, go out when switching equipment obtains target When first moment of congestion occurs for mouth queue, it can be obtained from the first congestion message that exchange chip generates.
Illustratively, before the first moment of the switching equipment when switching equipment obtains target outlet queue generation congestion, It, can be by judging the length of target outlet queue, to realize to mesh when being monitored to target outlet queue congestion situation The congestion situation of mark gate region is monitored.
Based on above content, before step 101, switching equipment is monitored the congestion situation of target outlet queue, tool Body can be achieved by the steps of:
101a1, the data that target entries end inputs are stored into target outlet queue.
101a2, judge whether the size of the data stored in target outlet queue is more than or equal to second threshold.
Specifically, determining mesh when the size for the data for judging to store in target outlet queue is more than or equal to second threshold It marks gate region and congestion occurs;When the size for the data for determining to store in target outlet queue is less than second threshold, exchange is set It is standby to carry out normal data forwarding.
102, the target outlet queue of acquisition switching equipment is after the first moment to corresponding target outlet end output data Size is equal to the second moment when first threshold.
In the present embodiment, the second moment was switching equipment according to the second congestion Receive message, and the second congestion message is From exchange chip when the size of data that target outlet queue exports after the first moment to target outlet end is equal to first threshold It generates.
Illustratively, switching equipment can export target outlet queue to target outlet end after getting for the first moment Size of data be monitored, when monitoring that size of data that target outlet queue is exported to target outlet end is equal to first threshold When, exchange chip will can be carved at this time and be recorded, and the current data information of sampled targets gate region.Exchange chip will be above-mentioned At the time of and above-mentioned current data information be packaged, thus generate the second congestion message, therefore, when switching equipment obtains mesh Mark the second moment when gate region is equal to first threshold to the size of corresponding target outlet end output data after the first moment When, it can be obtained from the second congestion message that exchange chip generates.
103, according to the time interval and first threshold between the second moment and the first moment, the number at target outlet end is determined According to transmission rate.
Specifically, the determination formula of the message transmission rate at switching equipment target outlet end are as follows:
Switching equipment target outlet end data transmission rate=first threshold/(the second-the first moment of moment)
It should be noted that the first threshold in above-mentioned steps is an example of the invention, it can be according to practical need Setting is asked, to simply changing all within protection of the invention for above data, which is not described herein again.
The determination method of the switching equipment outlet end transmission rate of the embodiment of the present invention, by the target for obtaining switching equipment The first moment when congestion occurs for gate region, obtains target outlet queue and exports after the first moment to corresponding target outlet end The size of data is equal to the second moment when first threshold, according to the second moment and the first moment and the first threshold got Value, determines the message transmission rate at target outlet end.Since the target outlet queue that the first moment was switching equipment is gathered around At the time of when plug, in this way, by record switching equipment gate region occur congestion at the time of, i.e. the first moment, using this first Moment, the second above-mentioned moment and above-mentioned first threshold, so that it may determine when congestion occurs for switching equipment gate region Outlet end message transmission rate, therefore, switching equipment generation congestion objective outlet team cannot accurately be calculated by solving existing CPU The problem of arranging target outlet end data transmission rate when congestion occurs.
Optionally, since existing exchange chip does not have the function of record time, switching equipment can not be from exchange Acquisition time in chip, still, switching equipment can carry out realization acquisition time by flow table by increasing flow table wherein. Specifically, before step 101, this method further include:
101b1, the type of message mark of the first congestion message is matched with the flow table in switching equipment, it is determined whether Timestamp is added for the first congestion message.
101b2, it is stabbed at the first time if so, being added in the first congestion message.
Illustratively, if the type of message mark of the first congestion message is matched with the type of message mark for including in flow table When, it is determined that the first congestion message needs to add timestamp, at this point, the switching equipment adds first in the first congestion message Timestamp.
Based on above-mentioned steps 101b1,101b2, step 101 is specifically included:
101b3, it parses from the first congestion message and stabs at the first time, stabbed according to first time and determined for the first moment.
Further, before step 102, this method further include:
102a1, the congestion type of message mark of the second congestion message is matched with the flow table in switching equipment, is determined It whether is the second congestion message addition timestamp.
102a2, if so, adding the second timestamp in the second congestion message.
Illustratively, if the type of message mark of the second congestion message is matched with the type of message mark for including in flow table When, it is determined that the second congestion message needs to add timestamp, at this point, the switching equipment adds second in the second congestion message Timestamp.
Based on above-mentioned steps 102a1,102a2, step 102 is specifically included:
102a3, the second timestamp is parsed from the second congestion message, the second moment was determined according to the second timestamp.
Wherein, above-mentioned flow table includes to need to add the congestion type of message mark of the congestion message of timestamp.
In a kind of example, which includes the type of message mark of congestion message, and includes the congestion type of message mark The corresponding processing mode of congestion message of knowledge.Illustratively, which can be made of matching rule and controlling behavior two parts, In general, being then directed to should when needing the type of message for carrying out matched message mark to meet matching rule defined by flow table Message executes the corresponding controlling behavior of the matching rule, wherein above-mentioned controlling behavior can be to abandon (drop), do not abandon (drop cancle), it redirects, modify the operation behaviors such as message content, traffic statistics.For example, flow table as shown in table 1 below is shown It is intended to it is found that when needing the type of message mark of matched message to meet the matching rule of flow table, i.e. the message class of the message When the format of type mark is made of specified byte and user's designated ends slogan, then the message redirecting is controlled to CPU.
Table 1
Flow table in the embodiment of the present invention, which is applied, is sending the direction Egress, and the matching rule in flow table is congestion message class Type mark, controlling behavior be redirect switching equipment CPU (due to existing exchange chip do not have record the time function, And the CPU of switching equipment has the function of record time, it is therefore desirable to by the CPU of congestion message redirecting to switching equipment), because This switching equipment matches congestion message by flow table, and when determining addition timestamp, congestion message is sent to CPU, Timestamp is added to congestion message by CPU.Switching equipment parses the congestion message by CPU addition timestamp, obtains phase At the time of answering.
It should be noted that flow table can be applied in both direction: receiving Ingress and send Egress.When flow table is answered Used in the direction Ingress is received, then this flow table only matches the message of receiving direction;It applies and is sending when flow table The direction Egress, then this flow table only matches the message of sending direction.
In addition, above-mentioned timestamp is the timestamp of the Microsecond grade of switching equipment CPU addition or the time of higher precision Stamp.
It in the present embodiment, is the timestamp of Microsecond grade or higher precision with the second timestamp due to first time stamp, because This, the interval for stabbing the second moment corresponding with the second timestamp at corresponding first moment at the first time is also Microsecond grade or more high-precision The time interval of degree then transmits momentary rate according to the data that the message transmission rate above determined is switching equipment outlet end, The message transmission rate of outlet end when the momentary rate can more accurately embody switching equipment congestion.
Optionally, above-mentioned congestion message can be by integrating congestion notification function, for example, exchange core on exchange chip When on piece integrates CN (English: Congestion Notification, Chinese: congestion notification agreement) function, when the unlatching CN function When energy, congestion message CNM (English: Congestion can be generated when congestion occurs for the gate region of switching equipment Notification Message, Chinese: congestion notification message) message.In the present embodiment, in switching equipment in exchange chip Generated first congestion message and the second congestion message can be CNM message.Wherein, the message format of CNM message such as Fig. 3 Shown, the content that each field of CNM message indicates is as shown in table 2.
Table 2
Illustratively, above-mentioned CNM message is that the data information from exchange chip sampled targets gate region obtains, In:
The address purpose mac=sampled data information source address mac of CNM message;
The local address mac of the address mac=interchanger in the source of CNM message;
CnmQOffset=Qcur-the Qeq, Qcur of CNM message indicate queue length when present sample;
CnmQDelta=Qcur-the Qold, Qold of CNM message indicate queue length when last sampling;
The exit port of congestion and the queue at place occur for the cnmCPID of CNM message, CPID;
Preceding 64 bytes of CNM message Encapsulated MSDU=sampling message.
Illustratively, as it appears from the above, switching equipment parse congestion message, i.e., above-mentioned CNM message, such as:
1, as the Encapsulated MSDU for parsing above-mentioned CNM message, it can be deduced that the relevant information of data source such as source The mac/l4 port numbers etc. of the source the ip/ mac/ mesh of ip/ mesh.
2, as the CPID for parsing above-mentioned CNM message, it can be deduced that the position for generating congestion, such as outlet end and outlet team Column.
3, when the cnmQOffset for parsing above-mentioned CNM message, the congestion situation of available congestion queue.
From the foregoing, it will be observed that by the CNM message for parsing exchange chip generation and feeding back to user, user can recognize out The concrete condition of congestion occurs for mouth queue.
Optionally, above-mentioned congestion message be switching equipment open congestion notification function period in generate, but It is the limitation due to exchanges device capabilities, when above-mentioned first threshold is smaller, due to the message mistake of exchange chip generation It is more, it will lead to switching equipment and break down, it is therefore desirable to the congestion notification function of exchange chip be limited, can be passed through Following two ways are limited.
Mode 1: congestion notification function is periodically opened and closed.
Illustratively, first time interval and the second time interval can be set by being configured to exchange chip. Wherein, first time interval is that congestion notification function opens a duration, and the second time interval is congestion notification function Close a duration.
Mode 2: when exchange chip generates the congestion message of fixed quantity, closing the congestion notification function of exchange chip, And exchange chip congestion notification function is opened at the time of fixing.
Illustratively, the first data and third time interval can be set by being configured to exchange chip.Its In, the first data are the population size of the congestion message generated when congestion notification function is opened, and third time interval is logical for congestion It accuses function and closes a duration.
The realization of above two mode can make this programme be suitable for more switching equipment.
It should be noted that the use of user for convenience, when user needs not look at switching equipment outlet end transmission speed When rate, the congestion notification function of exchange chip is closed, when user needs to check switching equipment outlet end transmission rate, opens and hands over Change the congestion notification function of chip.In the present embodiment, congestion notification function is to open.
The determination method of the switching equipment outlet end transmission rate of the embodiment of the present invention, by the target for obtaining switching equipment The first moment when congestion occurs for gate region, obtains target outlet queue and exports after the first moment to corresponding target outlet end The size of data is equal to the second moment when first threshold, according to the second moment and the first moment and the first threshold got Value, determines the message transmission rate at target outlet end.Since the target outlet queue that the first moment was switching equipment is gathered around At the time of when plug, in this way, by record switching equipment gate region occur congestion at the time of, i.e. the first moment, using this first Moment, the second above-mentioned moment and above-mentioned first threshold, so that it may determine when congestion occurs for switching equipment gate region Outlet end message transmission rate, therefore, switching equipment generation congestion objective outlet team cannot accurately be calculated by solving existing CPU The problem of arranging target outlet end data transmission rate when congestion occurs.
Optionally, when the exchange chip of switching equipment generates the second congestion message, the congestion for being not turned off switching equipment is logical Accuse function when, since exchange chip is after generating the second congestion message, switching equipment target outlet queue at the second moment When the size of backward corresponding target outlet end output data is equal to first threshold, congestion message can be also generated.Based on this, below will Referring to each function and other associated descriptions in the above method, to another switching equipment outlet end provided in an embodiment of the present invention The determination method of rate is introduced, and the explanation of technical term relevant to above-described embodiment, concept etc. can in following embodiment With referring to the above embodiments, which is not described herein again.
The embodiment of the present invention provides the determination method of another switching equipment outlet end rate, as shown in figure 4, this method has Body includes the following steps:
201, the inquiry request for inquiring the message transmission rate at target outlet end is received.
Illustratively, the outlet end message transmission rate when user checks the target outlet queue congestion of switching equipment Afterwards, it is desirable to when persistently checking the message transmission rate at switching equipment target outlet end, send inquiry request to switching equipment, this is looked into It askes request instruction switching equipment and the message transmission rate at target outlet end is fed back into user.
202, according to the mark at the target outlet end carried in inquiry request, obtained for the 4th moment;Wherein, target outlet end Target outlet queue between third moment and the 4th moment at the time of section in, to target outlet end export data size Equal to the first threshold, the third moment be at the time of receiving inquiry request before exchange chip generate the last one and need to add At the time of the congestion message of timestamp.
203, according to the time interval and first threshold between the 4th moment and third moment, the number at target outlet end is determined According to transmission rate.
Through the above scheme, switching equipment outlet end provided in an embodiment of the present invention message transmission rate can not only determine Target outlet end transmission rate when congestion out, can also be according to the time interval and the first threshold between the 4th moment and third moment Value determines corresponding switching equipment outlet end transmission rate at the time of exchange chip unlatching is gathered around after congestion notification function.
The embodiment of the present invention provides a kind of switching equipment, switching equipment structural schematic diagram as shown in Figure 5, the switching equipment Including obtaining module 31, determining module 32, in which:
Module 31 is obtained, the first moment when congestion occurs for the target outlet queue for obtaining switching equipment;Wherein, One moment was switching equipment according to the first congestion Receive message, and the first congestion message is existed by the exchange chip in switching equipment It is generated when target outlet queue generation congestion.
Module 31 is obtained, is also used to obtain target outlet queue after the first moment to corresponding target outlet end output data Size be equal to first threshold when the second moment;Wherein, the second moment was switching equipment according to the second congestion Receive message, Second congestion message is the size of data exported after the first moment to target outlet end from exchange chip in target outlet queue It is generated when equal to first threshold.
Determining module 32, for according to the time interval obtained between module 31 the second moment and the first moment that get and First threshold determines the message transmission rate at target outlet end.
Optionally, switching equipment further includes processing module 33, in which:
Processing module 33, before the first moment when for congestion to occur in the target outlet queue for obtaining switching equipment, The type of message of first congestion message is identified and is matched with the flow table in switching equipment, it is determined whether is the first congestion message Add timestamp;Wherein, flow table includes to need to add the type of message mark of the congestion message of timestamp;If so, first Addition is stabbed at the first time in congestion message.
When obtaining first moment of the module 31 when obtaining the queue of switching equipment target outlet and congestion occurring, processing module 33 For:
The first time stamp is parsed from the first congestion message, is stabbed according to first time and was determined for the first moment.
Optionally, processing module 33 are also used to obtaining target outlet queue after the first moment to the target outlet Before the second moment when the size of data of end output is equal to first threshold, the congestion type of message of the second congestion message is identified It is matched with the flow table in switching equipment, it is determined whether add timestamp for the second congestion message;Wherein, flow table includes to need Add the congestion type of message mark of the congestion message of timestamp;If so, adding the second timestamp in the second congestion message.
It obtains module 31 and is equal to the obtaining the size of data that gate region exports after the first moment to target outlet end When the second moment when one threshold value, processing module 33 is used for:
The second timestamp is parsed from the second congestion message, second moment is determined according to the second timestamp.
Optionally, which further includes receiving module 34, in which:
Receiving module 34, for receiving the inquiry request of the message transmission rate for inquiring target outlet end;
Obtain module 31, the mark at the target outlet end carried in the inquiry request for being also used to receive according to receiving module 34 Know, obtained for the 4th moment;Wherein, section at the time of the target outlet queue at target outlet end is between third moment and the 4th moment It is interior, to target outlet end export data size be equal to first threshold, the third moment be receive inquiry request at the time of before At the time of exchange chip generates the congestion message that the last one needs to add timestamp.
Determining module 32 is also used to according to the time interval obtained between the 4th moment got of module 31 and third moment And first threshold, determine the message transmission rate at target outlet end.
Optionally, switching equipment further includes memory module 35, judgment module 36, in which:
Memory module 35, before the first moment when for congestion to occur in the target outlet queue for obtaining switching equipment, The data that target entries end inputs are stored into target outlet queue;
Judgment module 36, for judging whether the size of data that memory module 35 stores in target outlet queue is greater than Equal to second threshold;If so, determining target outlet queue congestion.
The embodiment of the present invention is by a kind of switching equipment, including obtains module and determining module, is obtained by obtaining module The first moment when congestion occurs for the target outlet queue of switching equipment, with target outlet queue after the first moment to corresponding mesh It marks the second moment when the size of outlet end output data is equal to first threshold, determining module is according to obtain that module gets the Two moment and the first moment and first threshold, determine the message transmission rate at target outlet end.Since the first moment was to hand over At the time of when the target outlet queue generation congestion of exchange device, in this way, exporting team by obtaining the switching equipment that module is got At the time of congestion occurs for column, i.e. the first moment, determining module utilizes first moment, the second above-mentioned moment and above-mentioned first Threshold value, so that it may determine outlet end message transmission rate when congestion occurs for switching equipment gate region, therefore, solve existing The target outlet end data transmission rate for having CPU that cannot accurately calculate when congestion occurs for switching equipment target outlet queue is asked Topic, therefore, the outlet end message transmission rate for solving existing CPU when cannot accurately calculate switching equipment generation congestion are asked Topic.
It should be noted that during specific implementation, it is above-mentioned such as switching equipment in Fig. 2 and method flow shown in Fig. 4 Performed each step can be held by the computer that the processor of example, in hardware executes the software form stored in memory Row instruction realizes that, to avoid repeating, details are not described herein again.And program corresponding to movement performed by above-mentioned switching equipment Be stored in the memory of the switching equipment in a software form, in order to which processor calls the above modules of execution corresponding Operation.
Memory above may include volatile memory (volatile memory), such as random access memory Device (random-access memory, RAM);It also may include nonvolatile memory (non-volatile memory), example Such as read-only memory (read-only memory, ROM), flash memory (flash memory), hard disk (hard disk Drive, HDD) or solid state hard disk (solid-state drive, SSD);It can also include the combination of the memory of mentioned kind.
Processor in switching equipment presented above can be a processor, be also possible to multiple processing elements It is referred to as.For example, processor can be central processing unit (central processing unit, CPU;Or other are general Processor, digital signal processor (digital signal processing, DSP), specific integrated circuit (application Specific integrated circuit, ASIC), field programmable gate array (field-programmable gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components etc..It is logical It can be microprocessor with processor or the processor be also possible to any conventional processor etc.;It can also be dedicated processes Device, the application specific processor may include at least one of baseband processing chip, radio frequency processing chip etc..
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description It with the specific work process of module, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that the independent physics of each unit includes, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (10)

1. a kind of determination method of switching equipment outlet end rate, which is characterized in that be applied to switching equipment, the method packet It includes:
Obtain the first moment when the target outlet queue generation congestion of the switching equipment;Wherein, first moment is institute Switching equipment is stated according to the first congestion Receive message, the first congestion message is by the exchange chip in the switching equipment It is generated when congestion occurs for the target outlet queue;
It obtains the target outlet queue and is equal to the to the size of corresponding target outlet end output data after first moment The second moment when one threshold value;Wherein, second moment is the switching equipment according to the second congestion Receive message, described Second congestion message be from the exchange chip in the target outlet queue after first moment to the target outlet It is generated when the size of data of end output is equal to first threshold;
According to the time interval and the first threshold between second moment and first moment, determine that the target goes out The message transmission rate at mouth end.
2. the method according to claim 1, wherein the target outlet queue hair for obtaining the switching equipment Before the first moment when raw congestion, the method also includes:
The type of message of the first congestion message is identified and is matched with the flow table in the switching equipment, it is determined whether is The first congestion message adds timestamp;Wherein, the flow table includes to need to add the message class of the congestion message of timestamp Type mark;
If so, addition is stabbed at the first time in the first congestion message;
The first moment when congestion occurs for the target outlet queue for obtaining the switching equipment, comprising:
The first time stamp is parsed from the first congestion message, when determining described first according to first time stamp It carves.
3. according to the method described in claim 2, it is characterized in that, described obtain the target outlet queue at described first Before the second moment when the size of data exported after quarter to the target outlet end is equal to first threshold, the method is also wrapped It includes:
The congestion type of message of the second congestion message is identified and is matched with the flow table in the switching equipment, determination is It is no to add timestamp for the second congestion message;Wherein, the flow table includes and needs to add the congestion message of timestamp to gather around Fill in type of message mark;
If so, adding the second timestamp in the second congestion message;
The data that the acquisition target outlet queue exports after first moment to the correspondence target outlet end are big It is small be equal to first threshold when the second moment, comprising:
The second timestamp is parsed from the second congestion message, second moment is determined according to second timestamp.
4. the method according to claim 1, wherein the method also includes:
Receive the inquiry request for inquiring the message transmission rate at the target outlet end;
According to the mark at the target outlet end carried in the inquiry request, obtained for the 4th moment;Wherein, the target goes out At the time of mouth queue is between third moment and the 4th moment in section, the size of the data of Xiang Suoshu target outlet end output Equal to the first threshold, the third moment is that foregoing description exchange chip generates finally at the time of receiving the inquiry request One at the time of need to add the congestion message of timestamp;
According to the time interval and the first threshold between the 4th moment and the third moment, determine that the target goes out The message transmission rate at mouth end.
5. the method according to claim 1, wherein the target outlet queue hair for obtaining the switching equipment Before the first moment when raw congestion, the method also includes:
The data that target entries end inputs are stored into the target outlet queue;
Judge whether the size of the data stored in the target outlet queue is more than or equal to second threshold;
If so, determining the target outlet queue congestion.
6. a kind of switching equipment characterized by comprising
Module is obtained, the first moment when congestion occurs for the target outlet queue for obtaining the switching equipment;Wherein, described First moment was the switching equipment according to the first congestion Receive message, and the first congestion message is by the switching equipment In exchange chip generated when congestion occurs for the target outlet queue;
It is defeated to corresponding target outlet end after first moment to be also used to obtain the target outlet queue for the acquisition module The second moment when the size of data is equal to first threshold out;Wherein, second moment is the switching equipment according to second Congestion Receive message, the second congestion message be by the exchange chip when the target outlet queue is described first What the size of data exported after quarter to the target outlet end generated when being equal to first threshold;
Determining module, between the time between second moment and first moment for being got according to the acquisition module Every with the first threshold, determine the message transmission rate at the target outlet end.
7. switching equipment according to claim 6, which is characterized in that the switching equipment, further includes:
Processing module will before the first moment when for congestion to occur in the target outlet queue for obtaining the switching equipment The type of message mark of the first congestion message is matched with the flow table in the switching equipment, it is determined whether is described the One congestion message adds timestamp;Wherein, the flow table includes to need to add the type of message mark of the congestion message of timestamp; If so, addition is stabbed at the first time in the first congestion message;
When first moment for obtaining module when obtaining the switching equipment target outlet queue and congestion occurring, the processing Module is used for:
The first time stamp is parsed from the first congestion message, when determining described first according to first time stamp It carves.
8. switching equipment according to claim 7, it is characterised in that:
The processing module is also used to obtaining the target outlet queue after first moment to the target outlet end Before the second moment when the size of data of output is equal to first threshold, by the congestion type of message mark of the second congestion message Knowledge is matched with the flow table in the switching equipment, it is determined whether adds timestamp for the second congestion message;Wherein, institute Stating flow table includes to need to add the congestion type of message mark of the congestion message of timestamp;If so, in the second congestion report The second timestamp is added in text;
The module that obtains is obtaining what the target outlet queue exported after first moment to the target outlet end Size of data be equal to first threshold when the second moment when, the processing module is used for:
The second timestamp is parsed from the second congestion message, second moment is determined according to second timestamp.
9. switching equipment according to claim 6, which is characterized in that the switching equipment further include:
Receiving module, for receiving the inquiry request of the message transmission rate for inquiring the target outlet end;
The acquisition module, the target carried in the inquiry request for being also used to be received according to the receiving module go out The mark at mouth end, obtained for the 4th moment;Wherein, the target outlet queue between third moment and the 4th moment when It carves in section, the size of the data of Xiang Suoshu target outlet end output is equal to the first threshold, and the third moment is to receive institute At the time of foregoing description exchange chip generates the congestion message that the last one needs to add timestamp at the time of stating inquiry request;
The determining module, be also used to according to it is described acquisition module obtain the 4th moment and the third moment between when Between interval and the first threshold, determine the message transmission rate at the target outlet end.
10. switching equipment according to claim 6, which is characterized in that the switching equipment, further includes:
Memory module will before the first moment when for congestion to occur in the target outlet queue for obtaining the switching equipment The data of target entries end input are stored into the target outlet queue;
Judgment module, for judging whether the size of the data stored in the target outlet queue is more than or equal to second threshold; If so, determining the target outlet queue congestion.
CN201611208309.5A 2016-12-23 2016-12-23 The determination method and switching equipment of a kind of switching equipment outlet end rate Active CN106533959B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611208309.5A CN106533959B (en) 2016-12-23 2016-12-23 The determination method and switching equipment of a kind of switching equipment outlet end rate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611208309.5A CN106533959B (en) 2016-12-23 2016-12-23 The determination method and switching equipment of a kind of switching equipment outlet end rate

Publications (2)

Publication Number Publication Date
CN106533959A CN106533959A (en) 2017-03-22
CN106533959B true CN106533959B (en) 2019-07-19

Family

ID=58338611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611208309.5A Active CN106533959B (en) 2016-12-23 2016-12-23 The determination method and switching equipment of a kind of switching equipment outlet end rate

Country Status (1)

Country Link
CN (1) CN106533959B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110290072B (en) * 2018-03-19 2021-06-08 华为技术有限公司 Flow control method, flow control device, network equipment and storage medium
CN113162862A (en) * 2020-01-23 2021-07-23 华为技术有限公司 Congestion control method and device
CN114244852B (en) * 2021-11-09 2024-01-30 北京罗克维尔斯科技有限公司 Data transmission method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101414957A (en) * 2007-10-17 2009-04-22 北京中电华大电子设计有限责任公司 Buffering queue management method for wireless LAN
CN101459933A (en) * 2009-01-04 2009-06-17 北京航空航天大学 Congestion control method
CN101860488A (en) * 2010-06-08 2010-10-13 电子科技大学 Network congestion control method
CN102413056A (en) * 2011-12-21 2012-04-11 北京星网锐捷网络技术有限公司 Method and device for controlling network flow as well as breakout gateway equipment
CN103997465A (en) * 2014-05-27 2014-08-20 华为技术有限公司 Method and device for generating CNM
CN104581422A (en) * 2015-02-05 2015-04-29 成都金本华科技股份有限公司 Method and device for processing network data transmission
CN104618258A (en) * 2015-02-05 2015-05-13 成都金本华科技股份有限公司 Control method of data transmission rate

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101414957A (en) * 2007-10-17 2009-04-22 北京中电华大电子设计有限责任公司 Buffering queue management method for wireless LAN
CN101459933A (en) * 2009-01-04 2009-06-17 北京航空航天大学 Congestion control method
CN101860488A (en) * 2010-06-08 2010-10-13 电子科技大学 Network congestion control method
CN102413056A (en) * 2011-12-21 2012-04-11 北京星网锐捷网络技术有限公司 Method and device for controlling network flow as well as breakout gateway equipment
CN103997465A (en) * 2014-05-27 2014-08-20 华为技术有限公司 Method and device for generating CNM
CN104581422A (en) * 2015-02-05 2015-04-29 成都金本华科技股份有限公司 Method and device for processing network data transmission
CN104618258A (en) * 2015-02-05 2015-05-13 成都金本华科技股份有限公司 Control method of data transmission rate

Also Published As

Publication number Publication date
CN106533959A (en) 2017-03-22

Similar Documents

Publication Publication Date Title
US8665869B2 (en) System, apparatus, and methods for inserting information into captured data packets
CN106533959B (en) The determination method and switching equipment of a kind of switching equipment outlet end rate
US10742532B2 (en) Non-intrusive mechanism to measure network function packet processing delay
US7668107B2 (en) Hardware implementation of network testing and performance monitoring in a network device
CN104092697B (en) A kind of time-based anti-replay method and device
EP3735762B1 (en) In-band telemetry with limited extra bytes
CN106921637A (en) The recognition methods of the application message in network traffics and device
US8477648B2 (en) Systems, apparatus, and methods for monitoring network capacity
US20150131445A1 (en) Similarity matching method and related device and communication system
CN111245675B (en) Network delay and lost data packet detection method and system
WO2015184890A1 (en) Packet loss measurement method and apparatus
CN110505161A (en) A kind of message processing method and equipment
WO2016078312A1 (en) Single board testing method and device
CN108683558A (en) Railway security Communication Protocol Conformance Testing Methodology
CN104486243A (en) Data transmission method, equipment and system
EP3975483A1 (en) Congestion measurement method and network node
EP2709320B1 (en) Method and apparatus for sending packet
CN104052676B (en) A kind of data processing method of transmission path device and transmission path
WO2019144803A1 (en) Traffic statistics method and apparatus, storage medium, and electronic apparatus
WO2013078873A1 (en) Method and device for identifying response message
CN103580959B (en) Distributed statistical reporting implementation method
WO2016202025A1 (en) Trap message processing method and apparatus
US10812601B2 (en) Method and system for signaling and radio connection optimization over a cellular network
CN116723133B (en) Data transmitting and receiving equipment, network state information extraction method and device
Tong et al. A Protection Method Based on Message Identification and Flow Monitoring for Managing the Congestion Arising From Network Attacks on Smart Substation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant