A kind of device and method of dynamic adjustment ONU equipment port speed constraint threshold values
Technical field
The present invention relates to technical field of network communication, adjust ONU equipment port speed constraint threshold values more particularly to a kind of dynamic
Device and method.
Background technique
PON (Passive Optical Network) passive optical network is a kind of TDMA access of point-to-multipoint optical transport
Mode can carry the broadband network of full-service.What the communication in network was all made of various application streams, these applications are to net
Network service and the requirement of performance are different, for example FTP downloading service wishes to obtain bandwidth more as far as possible, and VOIP voice industry
It is engaged in then wishing to can guarantee delay and jitter etc. few as far as possible, Internet resources are always limited, simply by the presence of plunder Internet resources
Situation just will appear the requirement of service quality.In order to guarantee the bandwidth of transmission, the time delay of transmission is reduced, the packet loss of data is reduced
Rate and delay variation, PON system should provide necessary QoS mechanism.When network over loading or congestion, in uplink and downlink direction
The QoS of various priority services can be provided according to SLA agreement, guarantee that important service is not postponed or abandoned, while guaranteeing net
The efficient operation of network.Existing QoS mechanism, including service stream classification, priority label, traffic policing and scheduling, traffic shaping
With flow management, Congestion Avoidance, cache management and PONMAC control etc..
Congestion avoidance mechanism refers to that when congestion occurs, packet loss releases queue resource as soon as possible, while not putting message as far as possible
Enter in long-delay queue, to eliminate congestion.Common method are as follows:
1. tail drop (Tail-Drop) is tactful: when message is more than queue messages upper limit queue length, system begins to lose
The message after upper limit queue length is abandoned, this algorithm does not consider discard level.
2. Weighted random early stage (WRED) strategy: WRED is a kind of mechanism according to priority processing congestion.Go out in flow
When before existing congestion but having exceeded the flow threshold values of interface, just start to abandon data frame from the stream selected.It can be according to priority
Height abandoned, abandoned according to the weight of each priority, the business discarding amount of high priority can be made minimum, thus
Guaranteed qos.
But the mode of both Congestion Avoidances is all after congestion generation, in outlet to according to service priority information
Deng progress Congestion Avoidance.It is encountering: 1, when different ports similarly hereinafter hangs server and common PC at present, needing to guarantee server flows
Measure the priority scheduling of information;2, when ordinary user distinguishes with the user area VIP in Internet bar, it should preferential guarantee VIP subscriber channel
When data information energy prioritised transmission etc., existing scheme is unable to satisfy demand.
Summary of the invention
In order to solve the shortcomings of the prior art, the purpose of the present invention is to provide a kind of dynamics to adjust ONU equipment end
The device and method of mouth speed limit threshold values can carry out priority according to the importance of port traffic when needing to carry out Congestion Avoidance
Setting carries out speed limit entering at port, and can be according to port flow size dynamic adjustment speed limit threshold values, to guarantee Gao You
The priority scheduling to greatest extent of first grade port traffic.
To achieve the above object, the device of dynamic adjustment ONU equipment port speed constraint threshold values provided by the invention, including, stream
Amount real-time monitoring statistical module, flow compare computing module and speed limit threshold values dynamic adjustment module, which is characterized in that
The flow real-time monitoring statistical module obtains bandwidth information that OLT issues, is sent to PON mouthfuls of each port flow
Information is measured, and the priority and weighted value of port are set;
The flow compares computing module, according to the priority of each port, flow and weighted value, sets governor valve
Value;
The speed limit threshold values dynamic adjustment module carries out the speed limit threshold values of each port according to the speed limit threshold values
Dynamic adjusts.
Further, the flow real-time monitoring statistical module, the priority of port and weighted value is associated preferential
Grade height is positively correlated with weighted value size, and the port of minimum priority is not provided with weighted value.
Further, the flow compares computing module, is compared, judges whether to flow information, bandwidth information
It needs to carry out speed limit adjustment, when amount of bandwidth is less than port total flow, needs to carry out port speed constraint adjustment.
Further, the flow compares computing module, counts the total flow information of current highest priority port, and with
The size of calculated current unassigned bandwidth × weighted value compares;Port flow is greater than current unassigned bandwidth × weight
Value, using current unassigned bandwidth × weighted value as speed limit threshold values;Otherwise, speed limit threshold values is set as port flow.
Further, the flow real-time monitoring statistical module obtains entering for ONU equipment and believes to the flow of port
Breath, and the priority and weighted value of each of which port are set;
The flow compares computing module, according to priority, flow information and the weighted value of each port, if
Fixed limit speed threshold values;
The speed limit threshold values dynamic adjustment module, according to the speed limit threshold values, to the speed limit threshold values of each port
Carry out dynamic adjustment.
To achieve the above object, dynamic provided by the invention adjusts ONU equipment port speed constraint method, comprising the following steps:
It obtains bandwidth information and is sent to PON mouthfuls of flow information, and be set into priority and weighted value to port;
Compare bandwidth information and flow information, speed limit threshold values is determined according to comparison result;
Unified adjustment is carried out to all of the port according to speed limit threshold values.
Further, the size of the weighted value is associated with priority, and priority height is positively correlated with weighted value size,
Lowest priority is not provided with weighted value.
Further, described the step of comparing bandwidth information and flow information, speed limit threshold values is determined according to comparison result, packet
Include following steps: by the flow of the current highest priority port of statistics and calculated current unassigned bandwidth × weighted value
Size compares;When port flow is greater than current unassigned bandwidth × weighted value, current unassigned bandwidth × weighted value is made
For speed limit threshold values;When port flow is less than current unassigned bandwidth × weighted value, using port flow as speed limit threshold values.
Further, described the step of comparing bandwidth information and flow information, speed limit threshold values is determined according to comparison result,
Further include: when the unallocated port of current residual is lowest priority port, remaining bandwidth is distributed into present port;When all
When the priority of port is the same, by port flow ratio-dependent speed limit threshold values.
Dynamic of the invention adjusts ONU equipment port speed constraint device and method, overcomes in existing PON ONU equipment and exists
Following problems: 1. when network heavy congestion needs packet loss, often exit carry out packet loss, cannot to enter to port carry out
Speed limit.2. configured fixed rate can only be supported in the case where supporting into port speed constraint, without being adapted dynamically, from
And the case where causing unreasonable speed limit, when solving ONU equipment upstream bandwidth deficiency and needing to abandon data frame, usually in exit
Whole data packet is abandoned (including tail drop or abandoned based on priority height), is entered to port at some
When lower business is important, it cannot be guaranteed that the business of the port can maximum priority scheduling the problem of.
The device and method of dynamic adjustment ONU equipment port speed constraint threshold values of the invention has such as compared with prior art
Under technical effect:
Entering to port to entering to flow to carry out speed limit, carly fruit drop can carried out to entering to flow to avoiding congestion
Occur;
It is set into the priority and weighted value to port, priority height is positively correlated with weighted value size, ensure that Gao You
The priority scheduling to greatest extent of first grade port traffic;
It can be according to the speed limit value entered to port flow size and the adjustment of bandwidth information dynamic, distribution port, rationally effectively
Dynamic allocation port speed constraint value, can either guarantee the priority scheduling of high priority port traffic, and it is a large amount of to alleviate CPU processing
Burden when data.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
It obtains it is clear that understand through the implementation of the invention.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and constitutes part of specification, and with it is of the invention
Embodiment together, is used to explain the present invention, and is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the apparatus structure schematic diagram that dynamic according to the present invention adjusts ONU equipment port speed constraint threshold values;
Fig. 2 is the method flow diagram that dynamic according to the present invention adjusts ONU equipment port speed constraint threshold values.
Specific embodiment
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings, it should be understood that preferred reality described herein
Apply example only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.
Fig. 1 is the apparatus structure schematic diagram that dynamic according to the present invention adjusts ONU equipment port speed constraint threshold values, such as Fig. 1 institute
Show, the device of dynamic adjustment ONU equipment port speed constraint threshold values of the invention, including, flow real-time monitoring statistical module 101, stream
Amount compares computing module 102, speed limit threshold values dynamic adjustment module 103, enters to port 104, caching management module 105, flow prison
Pipe scheduler module 106, PONMAC control module 107 and CPU108, wherein
Flow real-time monitoring statistical module 101 obtains bandwidth information that OLT issues, enters each port to port 104
It is sent to PON mouthfuls of flow information before speed limit, and is set into priority and weighted value size to each port of port 104,
And it is positively correlated priority height with weighted value size.Wherein, bandwidth information includes service channel and bandwidth length.
For example, port can be set as to 4 kinds of priority, respectively P1, P2, P3, P4, P1 > P2 > P3 > P4 is associated
Weighted value size is followed successively by 0.8 (P1), 0.7 (P2), 0.6 (P3), and P4 priority is not provided with weighted value.Weighted value takes highest preferential
The corresponding weighted value size in grade port, i.e., in the case where there is P1 priority port, weighted value is set as 0.8;No P1 has P2 excellent
It is set as 0.7 in the case where first grade port, no P1, P2 are set as 0.6 in the case where having P3 priority.It presses equal priority port
According to port flow size fair competition.
Flow compares computing module 102, according to the bandwidth information and flow information that get judge whether to need into
Row port speed constraint, in the case where needing speed limit, according to precedence information, weighted value and amount of bandwidth are calculated and are entered and left to port
The speed limit threshold values of 104 each port.
Flow of the invention compares computing module 102, after being compared to flow information and bandwidth length, with roomy
When being less than port total flow, then it is assumed that need to carry out port speed constraint adjustment, according to the priority of each port, flow and power
Weight values set the speed limit threshold values of each port.
According to the sequence of priority P 1-P4, the total flow information of current highest priority port is counted.It calculates currently not
Bandwidth allocation × weighted value size, and be compared with the port flow of statistics.If port flow is greater than current unallocated
Bandwidth × weighted value illustrates to need port flow that cannot all pass through, and needs to carry out speed limit, and speed limit threshold values is current unallocated band
Width × weighted value;Otherwise, illustrate that port flow can pass through completely under this priority, speed limit threshold values is set as port flow i.e.
It can.
Speed limit threshold values dynamic adjustment module 103, compares computing module 102 according to flow and calculates discrepancy to port 104
The speed limit threshold values of each port carries out dynamic adjustment to entering to the speed limit value of each port of port 104.
Fig. 2 is the method flow diagram that dynamic according to the present invention adjusts ONU equipment port speed constraint threshold values, below with reference to figure
2, the method for dynamic adjustment ONU equipment port speed constraint threshold values of the invention is described in detail.
Firstly, configuring maximum speed limit threshold values in step 201 to enter to port 104, and each port is arranged according to demand
Priority and weighted value.
When weighted value is for single port rate is arranged more than amount of bandwidth, port can account for the maximum of current residual bandwidth
The size of ratio, weighted value is associated with priority, and priority height and the size of weighted value are positively correlated.
The priority height of each port is set, and priority can be identical.It is set as 4 kinds of priority, respectively P1, P2,
P3, P4, P1 > P2 > P3 > P4, associated weighted value size are followed successively by 0.8 (P1), and 0.7 (P2), 0.6 (P3), P4 priority is not
Weighted value is set.Weighted value takes the corresponding weighted value size in highest priority port, i.e., in the case where there is P1 priority port,
Weighted value is set as 0.8;No P1 is set as 0.7, in the case that no P1, P2 have P3 priority in the case where having P2 priority port
It is set as 0.6.Equal priority port is according to port flow size fair competition.
In step 202, flow real-time monitoring statistical module 101 monitors the bandwidth information that OLT device issues in real time, and in real time
Ground is received into the flow information sent to each port of port 104.
In the step, ONU after the completion of registration, by operational administrative control interface (OMCI) get that OLT issues it is logical
Road configuration.Flow real-time monitoring statistical module 101 obtains the bandwidth information (service channel and bandwidth length) that OLT is issued in real time,
And each port is sent to PON mouthfuls of flow information (uninterrupted).
In step 203, flow real-time monitoring statistical module 101 sends out port flow information, priority and bandwidth information
It gives flow and compares computing module 102, flow compares computing module 102 to be believed according to the port flow information and bandwidth got
Breath is compared, and judges whether to need to carry out speed limit adjustment.When amount of bandwidth is less than port total flow, need to carry out port limit
Velocity modulation is whole, enters step 204, and port speed constraint threshold values is otherwise restored to maximum (i.e. not speed limit).
In step 204, the speed limit threshold values of each port is set according to the priority of each port, flow and weighted value.
In the step, according to the sequence of priority P 1-P4, the total flow information of current highest priority port is counted.Meter
The size of current unassigned bandwidth × weighted value is calculated, and is compared with the port flow of statistics.If port flow is greater than
Current unassigned bandwidth × weighted value, illustrates to need port flow that cannot all pass through, and needs to carry out speed limit, and speed limit threshold values is to work as
Preceding unassigned bandwidth × weighted value;Otherwise, illustrate that port flow can pass through completely under this priority, speed limit threshold values is set as holding
Mouth flow.Such as:
The bandwidth currently distributed is 2M, and uplink port total flow is 4M, and the port flow that wherein priority is P1 is 1.5M,
Weighted value should be set as 0.8 at this time, and the amount of bandwidth preferentially pre-allocated is 2*0.8=1.6M, be greater than required for port
1.5M, therefore port flow can pass through completely, port speed constraint threshold value setting is 1.5M;It is unexcellent under same band flow
First grade is P1 but has the port that priority is P2, and the port flow that priority is P2 is 1.5M, and weighted value should be set as at this time
0.7, the amount of bandwidth preferentially pre-allocated is 2*0.7=1.4M, is less than 1.5M required for port, therefore port flow cannot be complete
Full by needing to carry out speed limit setting, port speed constraint threshold values needs to be set as 1.4M at this time.
Speed limit threshold value setting successively is carried out to each port, until the unallocated port of current residual is lowest priority end
When mouth, the calculating for carrying out weighted value is not needed, remaining bandwidth is directly distributed into present port.It is preferential when all of the port
When grade is the same, the setting of speed limit threshold values will be carried out in port flow ratio as common port speed constraint.
In step 205, each port speed constraint threshold values information completed will be calculated and be sent to speed limit threshold values dynamic adjustment module
103, speed limit threshold values dynamic adjustment module 103 carries out unified distribution adjustment to all of the port according to current speed limit threshold values, to reach
The effect of dynamic adjustment.
The device of dynamic adjustment ONU equipment port speed constraint threshold values of the invention, is arranged in entering at port for ONU equipment,
By flow real-time monitoring statistical module 101, bandwidth information, each port entered to port to ONU equipment that OLT is issued are obtained
The monitoring of flow information is carried out, priority and weighted value size are set;Flow compares computing module 102 according to the bandwidth got
Information and flow information judge whether to need to carry out port speed constraint, in the case where needing speed limit, according to precedence information, power
Weight values and amount of bandwidth calculate the speed limit threshold values entered and left to each port of port 104;Speed limit threshold values dynamic adjustment module 103
According to it is calculated enter to port 104 each port speed limit threshold values, to the speed limit value entered to each port of port 104 into
Mobile state adjustment, guarantees the priority scheduling to greatest extent of its high priority port traffic.
Those of ordinary skill in the art will appreciate that: the foregoing is only a preferred embodiment of the present invention, and does not have to
In the limitation present invention, although the present invention is described in detail referring to the foregoing embodiments, for those skilled in the art
For, still can to foregoing embodiments record technical solution modify, or to part of technical characteristic into
Row equivalent replacement.All within the spirits and principles of the present invention, any modification, equivalent replacement, improvement and so on should all include
Within protection scope of the present invention.