CN117278480A - Method and device for network equipment cooperative speed limiting - Google Patents

Method and device for network equipment cooperative speed limiting Download PDF

Info

Publication number
CN117278480A
CN117278480A CN202311043914.1A CN202311043914A CN117278480A CN 117278480 A CN117278480 A CN 117278480A CN 202311043914 A CN202311043914 A CN 202311043914A CN 117278480 A CN117278480 A CN 117278480A
Authority
CN
China
Prior art keywords
tenant
bandwidth
network device
actual rate
controller
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.)
Pending
Application number
CN202311043914.1A
Other languages
Chinese (zh)
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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202311043914.1A priority Critical patent/CN117278480A/en
Publication of CN117278480A publication Critical patent/CN117278480A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/215Flow control; Congestion control using token-bucket
    • 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/22Traffic shaping

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a method and a device for network equipment collaborative speed limiting, wherein the method comprises the following steps: receiving a first message sent by each network device through the netcon channel, wherein the first message comprises a first actual rate and a tenant identifier corresponding to the first actual rate; acquiring total bandwidth allocated to a tenant corresponding to the tenant identification according to the tenant identification, and acquiring at least one second actual rate from the plurality of first actual rates, wherein the tenant identification corresponding to each second actual rate is the same; calculating an allocated bandwidth of each network device according to the total bandwidth and at least one second actual rate; and sending a second message to each network device through the NETCONF channel, wherein the second message comprises the allocated bandwidth and the tenant identification, so that each network device uses the allocated bandwidth to forward the service traffic of the tenant corresponding to the tenant identification.

Description

Method and device for network equipment cooperative speed limiting
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for collaborative speed limiting of a network device.
Background
The network configuration protocol (english: network Configuration Protocol, simply referred to as netcon) is an XML-based network management protocol that provides a programmable and network device configuration and management method. The manager can configure the network device attribute through the protocol, acquire the network device attribute value, acquire the information of the network device statistics, and the like.
For network traffic, factors affecting quality of service (English: quality of Service, qoS for short) include bandwidth of transmission, delay of transmission, packet loss rate of data, and so on. In a network, the service quality can be improved by ensuring the transmission bandwidth, reducing the transmission delay, reducing the packet loss rate of data, and the like. Network resources are always limited and the quality of service of certain classes of traffic may be compromised while the quality of service of other traffic is guaranteed. Therefore, the manager needs to reasonably plan and allocate the network resources according to the characteristics of various services, so that the network resources are efficiently utilized.
QoS techniques include flow classification, traffic policing, traffic shaping, speed limiting, congestion management, congestion avoidance, and the like. Among the above QoS techniques, traffic policing, also referred to as speed limiting, refers to policing traffic entering or exiting a network device to protect network resources from damage.
Currently, when traffic of a single tenant across multiple network devices is speed-limited, the problem of traffic doubling occurs. For example, the bandwidth allocated by the operator to the tenant is 10M, and the service traffic of the tenant flows through two network devices. At this time, the total bandwidth used by the tenant reaches 20M, and the bandwidth is doubled. The reason for doubling the actual flow is that: the token buckets of the two network devices are calculated independently, that is, one 10M token bucket is configured in each network device, so that as long as each token bucket contains enough tokens, the two token buckets can output 20M actual traffic.
With the large-scale increase of the number of tenants in a network, the increase of traffic and the expansion of network equipment, the above problems are gradually attracting attention of operators, and new technologies are needed to solve the problems. In the prior art, the flow belonging to the same tenant is drained to the same network equipment through the drainage device, so as to realize speed limitation.
However, the above prior art solutions also expose the following problems: 1) Operators need to purchase the drainage device, so that the cost of the operators is increased; 2) After the drainage device is added in networking, the influence on networking structure is larger, and the performance requirement on the drainage device is higher.
Disclosure of Invention
In view of this, the application provides a method and a device for network equipment collaborative speed limiting, which are used for solving the problems of increased cost and larger influence on a networking architecture caused by adding a drainage device to realize speed limiting in the prior art.
In a first aspect, the present application provides a method for network device cooperative speed limiting, where the method is applied to a controller, and the controller and a plurality of network devices have established a netcon f channel, and the method includes:
receiving a first message sent by each network device through the netcon f channel, wherein the first message comprises a first actual rate and a tenant identifier corresponding to the first actual rate, and the first actual rate is an actual rate of the service flow obtained when the network device receives the service flow of the tenant;
Acquiring a total bandwidth allocated to a tenant corresponding to the tenant identification according to the tenant identification, and acquiring at least one second actual rate from a plurality of first actual rates, wherein the tenant identification corresponding to each second actual rate is the same;
calculating an allocated bandwidth of each network device according to the total bandwidth and the at least one second actual rate;
and sending a second message to each network device through the NETCONF channel, wherein the second message comprises the allocated bandwidth and the tenant identification, so that each network device uses the allocated bandwidth to forward the service traffic of the tenant corresponding to the tenant identification.
In a second aspect, the present application provides a method for network device cooperative speed limiting, where the method is applied to a network device, and the network device has established a netcon f channel with a controller, and the method includes:
when receiving service traffic of a tenant, acquiring a first actual rate of the service traffic;
sending a first message to the controller through the netcon f channel, wherein the first message comprises the first actual rate and a tenant identifier of the tenant, and the first actual rate corresponds to the tenant identifier;
Receiving a second message sent by the controller through the NETCONF channel, wherein the second message comprises the allocated bandwidth calculated by the controller and the tenant identification;
forwarding the service traffic of the tenant corresponding to the tenant identifier by utilizing the allocated bandwidth according to the tenant identifier;
the allocation bandwidth is calculated by the controller by using a total bandwidth allocated to the tenant corresponding to the tenant identifier and at least one second actual rate corresponding to the same tenant identifier, wherein the second actual rate is selected by the controller from the received plurality of first actual rates, and the tenant identifiers are the same.
In a third aspect, the present application provides an apparatus for network device cooperative speed limiting, where the apparatus is applied to a controller, and the controller and a plurality of network devices have established a netcon f channel, and the apparatus includes:
a receiving unit, configured to receive, through the netcon channel, a first packet sent by each network device, where the first packet includes a first actual rate and a tenant identifier corresponding to the first actual rate, where the first actual rate is an actual rate of a service flow obtained when the network device receives the service flow of a tenant;
The system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring total bandwidth allocated to a tenant corresponding to a tenant identifier according to the tenant identifier, and acquiring at least one second actual rate from a plurality of first actual rates, wherein the tenant identifier corresponding to each second actual rate is the same;
a calculating unit, configured to calculate an allocated bandwidth of each network device according to the total bandwidth and the at least one second actual rate;
and the sending unit is used for sending a second message to each network device through the NETCONF channel, wherein the second message comprises the allocated bandwidth and the tenant identification, so that each network device uses the allocated bandwidth to forward the service traffic of the tenant corresponding to the tenant identification.
In a fourth aspect, the present application provides an apparatus for network device cooperative speed limiting, where the apparatus is applied to a network device, and the network device has established a netcon f channel with a controller, and the apparatus includes:
the system comprises an acquisition unit, a control unit and a control unit, wherein the acquisition unit is used for acquiring a first actual rate of service flow when receiving the service flow of a tenant;
a sending unit, configured to send a first packet to the controller through the netcon channel, where the first packet includes the first actual rate and a tenant identifier of the tenant, and the first actual rate corresponds to the tenant identifier;
The receiving unit is used for receiving a second message sent by the controller through the NETCONF channel, wherein the second message comprises the allocated bandwidth calculated by the controller and the tenant identification;
the sending unit is further configured to forward, according to the tenant identifier, service traffic of a tenant corresponding to the tenant identifier by using the allocated bandwidth;
the allocation bandwidth is calculated by the controller by using a total bandwidth allocated to the tenant corresponding to the tenant identifier and at least one second actual rate corresponding to the same tenant identifier, wherein the second actual rate is selected by the controller from the received plurality of first actual rates, and the tenant identifiers are the same.
In a fifth aspect, the present application provides a network device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor to cause the processor to perform the method provided in the first aspect of the present application.
In a sixth aspect, the present application provides a network device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor to cause the processor to perform the method provided in the second aspect of the present application.
Therefore, by using the method and the device for network equipment collaborative speed limit, through the NETCONF channel, the controller receives the first message sent by each network equipment, wherein the first message comprises a first actual rate and a tenant identifier corresponding to the first actual rate, and the first actual rate is the actual rate of the acquired service flow when the network equipment receives the service flow of the tenant; according to the tenant identification, the controller obtains the total bandwidth allocated to the tenant corresponding to the tenant identification, and obtains at least one second actual rate from the plurality of first actual rates, wherein the tenant identification corresponding to each second actual rate is the same; the controller calculates an allocated bandwidth for each network device based on the total bandwidth and the at least one second actual rate; and the controller sends a second message to each network device through the NETCONF channel, wherein the second message comprises the allocated bandwidth and the tenant identification, so that each network device uses the allocated bandwidth to forward the service traffic of the tenant corresponding to the tenant identification.
Thus, by using the netcon protocol, the controller collects the actual rate of the traffic handled by each network device, and dynamically allocates the bandwidth of the tenant in each network device, so as to achieve the purpose of speed limitation. The problems of the current drainage device that the speed limit is realized, the cost is increased and the influence on the networking structure is large are solved.
Drawings
Fig. 1 is a flowchart of a method for network device collaborative speed limit provided in an embodiment of the present application;
fig. 2 is a networking schematic diagram of network device collaborative speed limit provided in an embodiment of the present application;
fig. 3 is a flowchart of another method for network device collaborative speed limit provided in an embodiment of the present application;
fig. 4 is a block diagram of a device for network device cooperative speed limiting according to an embodiment of the present application;
fig. 5 is a block diagram of another device for collaborative speed limiting of network equipment according to an embodiment of the present application;
fig. 6 is a hardware structure of a network device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the corresponding listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The method for network equipment cooperative speed limiting provided by the embodiment of the application is described in detail below. Referring to fig. 1, fig. 1 is a flowchart of a method for network device collaborative speed limit according to an embodiment of the present application. The method is applied to a controller, and the method for the network equipment collaborative speed limit provided by the embodiment of the application can comprise the following steps.
Step 110, receiving a first message sent by each network device through the netcon channel, where the first message includes a first actual rate and a tenant identifier corresponding to the first actual rate, where the first actual rate is an actual rate of the service traffic obtained when the network device receives the service traffic of the tenant;
Specifically, as shown in fig. 2, fig. 2 is a networking schematic diagram of a network device cooperative line speed provided in an embodiment of the present application. In fig. 2, a first network device and a second network device are illustrated as examples. The first network device and the second network device are both devices for forwarding the same tenant traffic. Each network device has established a netcon f channel with the controller via the netcon f protocol.
Optionally, before performing this step, the controller further performs the step of storing the total bandwidth allocated for the tenant, the tenant identification, and the controller configures the initial bandwidth for each network device.
Further, the controller receives a configuration instruction input by the manager, where the configuration instruction includes a total bandwidth allocated by the operator for the tenant, for example, 10M and a tenant identifier of the tenant. The controller locally stores the total bandwidth allocated for the tenant and the tenant identity of the tenant.
Optionally, the configuration instruction further includes an identifier of a network device and the number of network devices forwarding the same tenant traffic. The controller calculates the initial bandwidth of each network device according to the total bandwidth and the number of network devices forwarding the same tenant service flow.
According to the identification of the network equipment for forwarding the same tenant service flow, the controller sends a third message to the network equipment for forwarding the same tenant service flow through the NETCONF channel, wherein the third message comprises the initial bandwidth and the tenant identification, so that the network equipment for forwarding the same tenant service flow uses the initial bandwidth to forward the service flow of the tenant corresponding to the tenant identification.
The initial bandwidth is the quotient of the total bandwidth and the number of network devices forwarding the same tenant service traffic. In the embodiment of the present application, the total bandwidth is 10M, and the number of network devices forwarding the same tenant service traffic is 2. Thus, the initial bandwidth of each network device is 5M. Each network device automatically configures a bucket depth CBS of a token bucket corresponding to the initial bandwidth according to the initial bandwidth. And each network device forwards the service traffic of the tenant according to the initial bandwidth.
After the first network device is configured in the foregoing manner, when the first network device receives the service traffic of the tenant, the first network device obtains the actual rate 1 of the service traffic.
The actual rate 1 may be calculated by a tenant rate collection module included in the first network device. The tenant rate collection module counts the number of the messages sent in the nth second and the number of the messages sent in the (n+1) th second. The tenant rate collection module calculates the difference between the number of the n-th second transmitted messages and the number of the n+1th second transmitted messages, and takes the quotient of the difference and 1 second as the actual rate 1.
Similarly, when the second network device receives the service traffic of the tenant, the second network device obtains the actual rate 2 of the service traffic.
The actual rate 2 may be calculated by a tenant rate collection module included in the second network device. The tenant rate collection module counts the number of the messages sent in the nth second and the number of the messages sent in the (n+1) th second. The tenant rate collection module calculates the difference between the number of the n-th second transmitted messages and the number of the n+1th second transmitted messages, and takes the quotient of the difference and 1 second as the actual rate 2.
It will be appreciated that the function of the tenant rate collection module to calculate the actual rate is the flow rate statistics function of the flow classification.
For example, in fig. 2, the actual rate 1 of traffic in the first network device is 20M; the actual rate 2 of traffic in the second network device is 5M.
After each network device obtains the actual rate of the self forwarding service flow, a first message is generated, and the first message comprises the first actual rate and the tenant identification corresponding to the first actual rate. The first actual rate is the actual rate 1 and the actual rate 2.
And each network device respectively sends a first message to the controller through the NETCONF channel. After the controller receives a plurality of first messages, a first actual rate and tenant identifications corresponding to the first actual rate are obtained from each first message.
Further, the tenant rate collection module included in each network device generates and sends a first message to the controller.
Step 120, acquiring a total bandwidth allocated to a tenant corresponding to the tenant identifier according to the tenant identifier, and acquiring at least one second actual rate from a plurality of first actual rates, wherein the tenant identifier corresponding to each second actual rate is the same;
specifically, according to the description of step 110, after acquiring the first actual rate and the tenant identifier corresponding to the first actual rate from each first packet, the controller selects at least one second actual rate corresponding to the same tenant identifier from the plurality of first actual rates through the tenant identifier. And then, according to the tenant identification, the controller locally acquires the total bandwidth allocated to the tenant corresponding to the tenant identification.
For example, the controller receives 5 first messages sent by 5 network devices respectively, which are message 1, message 2, message 3, message 4 and message 5 respectively. The tenant identifications included in the messages 1-3 are tenant 1, the tenant identifications included in the message 4 are tenant 2, and the tenant identifications included in the message 5 are tenant 3. The controller selects 3 second actual rates from the 5 first actual rates, wherein the 3 second actual rates all correspond to the same tenant identification, namely tenant 1.
Step 130, calculating an allocated bandwidth of each network device according to the total bandwidth and the at least one second actual rate;
specifically, after the controller obtains the total bandwidth and the at least one second actual rate, the controller calculates an allocated bandwidth for each network device according to the description of step 120.
Optionally, the specific process of calculating the allocated bandwidth of each network device by the controller according to the total bandwidth and at least one second actual rate is as follows: the controller calculates a sum of at least one second actual rate; the controller calculates the quotient of each second actual rate and the sum value; the controller takes the product of the quotient and the total bandwidth as the allocated bandwidth for each network device.
For example, in fig. 2, the total bandwidth is 10M, the actual rate 1 is 20M, the actual rate 2 is 5M, and the allocated bandwidth of the first network device is 10m×20/(20+5))=8m; the allocated bandwidth of the second network device is 10m×5/(20+5))=2m.
And 140, sending a second message to each network device through the netcon channel, where the second message includes the allocated bandwidth and the tenant identifier, so that each network device uses the allocated bandwidth to forward the service traffic of the tenant corresponding to the tenant identifier.
Specifically, according to the description of step 130, after the controller calculates the allocated bandwidth of each network device, a plurality of second messages are generated, where each second message includes the allocated bandwidth of the network device and the tenant identifier. And respectively sending a second message to each network device by the controller through the NETCONF channel.
And after the network equipment receives the second message, acquiring the allocated bandwidth and the tenant identification from the second message. According to the allocated bandwidth, the network device automatically adjusts the bucket depth CBS of the token bucket corresponding to the allocated bandwidth. And according to the tenant identification, the network equipment forwards the service traffic of the tenant corresponding to the tenant identification by using the allocated bandwidth.
In an embodiment of the present application, the network device further includes a tenant bandwidth allocation module. And after the controller generates the second message, the controller sends the second message to the tenant bandwidth allocation module included in each network device. And after the tenant bandwidth allocation module receives the second message, acquiring the allocation bandwidth and the tenant identification from the second message. According to the allocated bandwidth, the tenant bandwidth allocation module automatically adjusts the bucket depth CBS of the token bucket corresponding to the allocated bandwidth.
For example, in fig. 2, a token bucket is further included in the first network device, where the bucket depth of the token bucket corresponds to the initial bandwidth. And after the tenant bandwidth allocation module included in the first network device acquires the allocated bandwidth, automatically adjusting the bucket depth of the token bucket to correspond to the allocated bandwidth (8M). Similarly, a token bucket is also included in the second network device, the bucket depth of the token bucket corresponding to the initial bandwidth. And after the tenant bandwidth allocation module included in the second network device acquires the allocated bandwidth, automatically adjusting the bucket depth of the token bucket to correspond to the allocated bandwidth (2M).
Therefore, by applying the method for network equipment collaborative speed limit provided by the application, through the NETCONF channel, the controller receives a first message sent by each network equipment, wherein the first message comprises a first actual rate and a tenant identifier corresponding to the first actual rate, and the first actual rate is the actual rate of the acquired service flow when the network equipment receives the service flow of the tenant; according to the tenant identification, the controller obtains the total bandwidth allocated to the tenant corresponding to the tenant identification, and obtains at least one second actual rate from the plurality of first actual rates, wherein the tenant identification corresponding to each second actual rate is the same; the controller calculates an allocated bandwidth for each network device based on the total bandwidth and the at least one second actual rate; and the controller sends a second message to each network device through the NETCONF channel, wherein the second message comprises the allocated bandwidth and the tenant identification, so that each network device uses the allocated bandwidth to forward the service traffic of the tenant corresponding to the tenant identification.
Thus, by using the netcon protocol, the controller collects the actual rate of the traffic handled by each network device, and dynamically allocates the bandwidth of the tenant in each network device, so as to achieve the purpose of speed limitation. The problems of the current drainage device that the speed limit is realized, the cost is increased and the influence on the networking structure is large are solved.
The method for network equipment cooperative speed limiting provided by the embodiment of the application is described in detail below. Referring to fig. 3, fig. 3 is a flowchart of another method for network device collaborative speed limit according to an embodiment of the present application. The method is applied to the network equipment, and the method for the network equipment collaborative speed limit provided by the embodiment of the application can comprise the following steps.
Step 310, when receiving service traffic of a tenant, acquiring a first actual rate of the service traffic;
specifically, the network device is configured to forward the service traffic of the tenant. The network device establishes a netcon f channel with the controller via the netcon f protocol.
Optionally, the controller configures the initial bandwidth for the network device prior to performing this step. In the foregoing embodiments, the process of configuring the initial bandwidth for the network device by the controller is described in detail, and will not be repeated here.
After the network device configures the initial bandwidth, when the network device receives the service traffic of the tenant, the network device obtains a first actual rate of the service traffic.
The first actual rate may be calculated by a tenant rate collection module included in the network device. The tenant rate collection module counts the number of the messages sent in the nth second and the number of the messages sent in the (n+1) th second. The tenant rate collection module calculates the difference between the number of the n-th second transmitted messages and the number of the n+1th second transmitted messages, and takes the quotient of the difference and 1 second as a first actual rate.
It will be appreciated that the function of the tenant rate collection module to calculate the actual rate is the flow rate statistics function of the flow classification.
Further, after the tenant rate collection module calculates the first actual rate, a first message is generated and sent to the controller.
Step 320, sending a first message to the controller through the netcon f channel, where the first message includes the first actual rate and a tenant identifier of the tenant, and the first actual rate corresponds to the tenant identifier;
specifically, according to the description of step 310, after the network device obtains the first actual rate, a first packet is generated, where the first packet includes the first actual rate and the tenant identifier of the tenant. And the network equipment sends a first message to the controller through the NETCONF channel.
After receiving the first message, the controller obtains the total bandwidth allocated to the tenant corresponding to the tenant identifier from the local according to the tenant identifier. The controller calculates an allocated bandwidth for the network device using the total bandwidth and, first, the actual rate.
In the foregoing embodiment, steps 120-130, the process of calculating the allocated bandwidth for the network device by the controller has been described in detail, and will not be repeated here.
And after the controller calculates the allocated bandwidth of the network equipment, generating a second message. The second message includes an allocated bandwidth of the network device and a tenant identity. And the controller sends a second message to the network equipment through the NETCONF channel.
Further, the network device further comprises a tenant bandwidth allocation module. And after the controller generates the second message, the controller sends the second message to a tenant bandwidth allocation module included in the network equipment.
Step 330, receiving, by the netcon channel, a second packet sent by the controller, where the second packet includes the allocated bandwidth calculated by the controller and the tenant identifier;
specifically, according to the description of step 320, the network device obtains, through the netcon channel, the allocated bandwidth and the tenant identifier calculated by the controller after receiving the second packet.
Further, after the tenant bandwidth allocation module receives the second message, the allocated bandwidth and the tenant identification are obtained from the second message.
And 340, forwarding the service traffic of the tenant corresponding to the tenant identifier by utilizing the allocated bandwidth according to the tenant identifier.
Specifically, after the network device obtains the allocated bandwidth and the tenant identifier according to the description of step 330, the network device automatically adjusts the bucket depth CBS of the token bucket corresponding to the allocated bandwidth according to the allocated bandwidth. And according to the tenant identification, the network equipment forwards the service traffic of the tenant corresponding to the tenant identification by using the allocated bandwidth.
Further, after the tenant bandwidth allocation module receives the second message, the allocated bandwidth and the tenant identification are obtained from the second message. According to the allocated bandwidth, the tenant bandwidth allocation module automatically adjusts the bucket depth CBS of the token bucket corresponding to the allocated bandwidth.
For example, in fig. 2, a token bucket is further included in the first network device, where the bucket depth of the token bucket corresponds to the initial bandwidth. And after the tenant bandwidth allocation module included in the first network device acquires the allocated bandwidth, automatically adjusting the bucket depth of the token bucket to correspond to the allocated bandwidth (8M). Similarly, a token bucket is also included in the second network device, the bucket depth of the token bucket corresponding to the initial bandwidth. And after the tenant bandwidth allocation module included in the second network device acquires the allocated bandwidth, automatically adjusting the bucket depth of the token bucket to correspond to the allocated bandwidth (2M).
Optionally, in the embodiment of the present application, a procedure of adjusting the allocated bandwidth by the network device when the netcon f channel fails is further included.
Specifically, if the netcon channel fails, the network device keeps the currently used allocated bandwidth unchanged; if the failure time exceeds the time threshold, the network equipment restores the allocated bandwidth to the initial bandwidth; and forwarding the received service traffic by the network equipment by utilizing the initial bandwidth.
Wherein, the time threshold may be specifically 5-10 seconds.
In the embodiment of the present application, the netcon f channel is a netcon f connection. And determining whether the connection with the opposite terminal is normal or not through the mutual sending keep-alive message between the network equipment and the controller. When the network device or the controller does not receive the keep-alive message sent by the opposite terminal, the network device or the controller determines that the NETCONF channel fails, and the network device keeps the currently used allocated bandwidth unchanged.
The network equipment starts a timer and counts the fault time, and if the fault time exceeds a time threshold, the network equipment restores the allocated bandwidth to the initial bandwidth and automatically adjusts the barrel depth CBS of the token barrel.
If the failure time does not exceed the time threshold and the keep-alive message sent by the controller is received, the network device determines that the netcon channel fails to recover, and at this time, the network device repeatedly executes the processes of the foregoing steps 310 to 340 again, and requests the control to calculate the current allocated bandwidth.
Based on the same inventive concept, the embodiment of the application also provides a device for limiting the speed of the network equipment system, which corresponds to the method for limiting the speed of the network equipment system. Referring to fig. 4, fig. 4 is an apparatus for limiting speed of a network device system, where the apparatus is applied to a controller, and the controller and a plurality of network devices have established a netcon f channel, and the apparatus includes:
A receiving unit 410, configured to receive, through the netcon channel, a first packet sent by each network device, where the first packet includes a first actual rate and a tenant identifier corresponding to the first actual rate, where the first actual rate is an actual rate of a service flow obtained when the network device receives the service flow of a tenant;
the obtaining unit 420 is configured to obtain, according to a tenant identifier, a total bandwidth allocated to a tenant corresponding to the tenant identifier, and obtain at least one second actual rate from a plurality of first actual rates, where tenant identifiers corresponding to each second actual rate are the same;
a calculating unit 430, configured to calculate an allocated bandwidth of each network device according to the total bandwidth and the at least one second actual rate;
and a sending unit 440, configured to send, through the netcon channel, a second packet to each network device, where the second packet includes the allocated bandwidth and the tenant identifier, so that each network device uses the allocated bandwidth to forward the service traffic of the tenant corresponding to the tenant identifier.
Optionally, the calculating unit 430 is specifically configured to calculate a sum of the at least one second actual rate;
Calculating a quotient of said each second actual rate and said sum;
taking the product of the quotient and the total bandwidth as the allocated bandwidth of each network device.
Optionally, the receiving unit 410 is further configured to receive a configuration instruction input by a manager, where the configuration instruction includes a total bandwidth allocated to a tenant and a tenant identifier of the tenant;
the apparatus further comprises: and a storage unit (not shown in the figure) for storing the total bandwidth allocated to the tenant and the tenant identification of the tenant.
Optionally, the configuration instruction further includes an identifier of a network device and the number of network devices forwarding the same tenant service traffic;
the calculating unit 430 is further configured to calculate, according to the total bandwidth and the number of network devices forwarding the same tenant traffic, an initial bandwidth of each network device, where the initial bandwidth is a quotient of the total bandwidth and the number of network devices forwarding the same tenant traffic;
the sending unit 440 is further configured to send, according to an identifier of a network device forwarding the same tenant traffic, a third packet to the network device forwarding the same tenant traffic through the netcon channel, where the third packet includes the initial bandwidth and the tenant identifier, so that the network device forwarding the same tenant traffic uses the initial bandwidth to perform forwarding processing on the tenant traffic corresponding to the tenant identifier.
Based on the same inventive concept, the embodiment of the application also provides a device for limiting the speed of the network equipment system, which corresponds to the method for limiting the speed of the network equipment system. Referring to fig. 5, fig. 5 is a schematic diagram of another apparatus for limiting speed of a network device system, where the apparatus is applied to a network device, and the network device has established a netcon f channel with a controller, and the apparatus includes:
an obtaining unit 510, configured to obtain, when receiving a service traffic of a tenant, a first actual rate of the service traffic;
a sending unit 520, configured to send a first packet to the controller through the netcon channel, where the first packet includes the first actual rate and a tenant identifier of the tenant, and the first actual rate corresponds to the tenant identifier;
a receiving unit 530, configured to receive, through the netcon channel, a second packet sent by the controller, where the second packet includes the allocated bandwidth calculated by the controller and the tenant identifier;
the sending unit 520 is further configured to forward, according to the tenant identifier, the service traffic of the tenant corresponding to the tenant identifier by using the allocated bandwidth;
Wherein the allocated bandwidth is calculated by the controller by using a total bandwidth allocated to the tenant corresponding to the tenant identifier and at least one second actual rate corresponding to the same tenant identifier, the second actual rate is selected by the controller from the received plurality of first actual rates, and the tenant identifiers are the same
Optionally, the receiving unit 530 is further configured to receive, through the netcon f channel, a third packet sent by the controller, where the third packet includes an initial bandwidth calculated by the controller and the tenant identifier;
the sending unit 520 is further configured to forward, by using the initial bandwidth, the service traffic of the tenant corresponding to the tenant identifier;
the initial bandwidth is the quotient of the total bandwidth and the number of network devices forwarding the same tenant service flow.
Optionally, the apparatus further comprises: a holding unit (not shown in the figure) for holding the allocated bandwidth if the netcon f channel fails;
a recovery unit (not shown in the figure) for recovering the allocated bandwidth to the initial bandwidth if the failure time exceeds a time threshold;
The sending unit 520 is further configured to forward the received traffic using the initial bandwidth.
Therefore, by using the network device collaborative speed limiting device provided by the application, through the NETCONF channel, the controller receives a first message sent by each network device, wherein the first message comprises a first actual rate and a tenant identifier corresponding to the first actual rate, and the first actual rate is the actual rate of the acquired service flow when the network device receives the service flow of the tenant; according to the tenant identification, the controller obtains the total bandwidth allocated to the tenant corresponding to the tenant identification, and obtains at least one second actual rate from the plurality of first actual rates, wherein the tenant identification corresponding to each second actual rate is the same; the controller calculates an allocated bandwidth for each network device based on the total bandwidth and the at least one second actual rate; and the controller sends a second message to each network device through the NETCONF channel, wherein the second message comprises the allocated bandwidth and the tenant identification, so that each network device uses the allocated bandwidth to forward the service traffic of the tenant corresponding to the tenant identification.
Thus, by using the netcon protocol, the controller collects the actual rate of the traffic handled by each network device, and dynamically allocates the bandwidth of the tenant in each network device, so as to achieve the purpose of speed limitation. Solves the problems of the current drainage device that the speed limit is realized, the cost is increased and the influence on the networking structure is larger
Based on the same inventive concept, the embodiment of the present application further provides a network device, as shown in fig. 6, including a processor 610, a transceiver 620, and a machine-readable storage medium 630, where the machine-readable storage medium 630 stores machine executable instructions capable of being executed by the processor 610, and the processor 610 is caused by the machine executable instructions to perform the method for collaborative speed limiting of the network device provided by the embodiment of the present application. The device for limiting the speed by the network device shown in fig. 4 and fig. 5 can be implemented by adopting the hardware structure of the network device shown in fig. 6.
The computer readable storage medium 630 may include a random access Memory (in english: random Access Memory, abbreviated as RAM) or a nonvolatile Memory (in english: non-volatile Memory, abbreviated as NVM), such as at least one magnetic disk Memory. Optionally, the computer readable storage medium 630 may also be at least one storage device located remotely from the aforementioned processor 610.
The processor 610 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it may also be a digital signal processor (English: digital Signal Processor; DSP; for short), an application specific integrated circuit (English: application Specific Integrated Circuit; ASIC; for short), a Field programmable gate array (English: field-Programmable Gate Array; FPGA; for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In this embodiment, processor 610, by reading machine-executable instructions stored in machine-readable storage medium 630, is caused by the machine-executable instructions to implement processor 610 itself and invoke transceiver 620 to perform the method of network device co-speed limiting described in the previous embodiments of the present application.
Additionally, embodiments of the present application provide a machine-readable storage medium 630, the machine-readable storage medium 630 storing machine-executable instructions that, when invoked and executed by the processor 610, cause the processor 610 itself and the invoking transceiver 620 to perform the method of network device co-speed limiting described in the embodiments of the present application described above.
The implementation process of the functions and roles of each unit in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
For the network device cooperative speed limiting apparatus and the machine readable storage medium embodiment, since the related method content is basically similar to the method embodiment, the description is relatively simple, and the relevant point is referred to the part of the description of the method embodiment.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims (14)

1. A method for network device cooperative speed limiting, wherein the method is applied to a controller, and the controller and a plurality of network devices have established netcon f channels, the method comprising:
receiving a first message sent by each network device through the netcon f channel, wherein the first message comprises a first actual rate and a tenant identifier corresponding to the first actual rate, and the first actual rate is an actual rate of the service flow obtained when the network device receives the service flow of the tenant;
acquiring a total bandwidth allocated to a tenant corresponding to the tenant identification according to the tenant identification, and acquiring at least one second actual rate from a plurality of first actual rates, wherein the tenant identification corresponding to each second actual rate is the same;
calculating an allocated bandwidth of each network device according to the total bandwidth and the at least one second actual rate;
and sending a second message to each network device through the NETCONF channel, wherein the second message comprises the allocated bandwidth and the tenant identification, so that each network device uses the allocated bandwidth to forward the service traffic of the tenant corresponding to the tenant identification.
2. The method according to claim 1, wherein said calculating an allocated bandwidth for each network device based on said total bandwidth and said at least one second actual rate comprises:
calculating a sum of the at least one second actual rate;
calculating a quotient of said each second actual rate and said sum;
taking the product of the quotient and the total bandwidth as the allocated bandwidth of each network device.
3. The method of claim 1, wherein prior to receiving the first message sent by each network device via the netcon f channel, the method further comprises:
receiving a configuration instruction input by a manager, wherein the configuration instruction comprises a total bandwidth allocated to a tenant and a tenant identification of the tenant;
and storing the total bandwidth allocated to the tenant and the tenant identification of the tenant.
4. The method of claim 3, wherein the configuration instructions further comprise an identification of network devices and a number of network devices forwarding the same tenant traffic;
before receiving the first message sent by each network device through the netcon f channel, the method further includes:
According to the total bandwidth and the number of network devices forwarding the same tenant service flow, calculating an initial bandwidth of each network device, wherein the initial bandwidth is a quotient of the total bandwidth and the number of network devices forwarding the same tenant service flow;
according to the identification of the network equipment for forwarding the same tenant service flow, a third message is sent to the network equipment for forwarding the same tenant service flow through the NETCONF channel, wherein the third message comprises the initial bandwidth and the tenant identification, so that the network equipment for forwarding the same tenant service flow uses the initial bandwidth to forward the service flow of the tenant corresponding to the tenant identification.
5. A method of network device co-operation speed limiting, wherein the method is applied to a network device that has established a netcon f channel with a controller, the method comprising:
when receiving service traffic of a tenant, acquiring a first actual rate of the service traffic;
sending a first message to the controller through the netcon f channel, wherein the first message comprises the first actual rate and a tenant identifier of the tenant, and the first actual rate corresponds to the tenant identifier;
Receiving a second message sent by the controller through the NETCONF channel, wherein the second message comprises the allocated bandwidth calculated by the controller and the tenant identification;
forwarding the service traffic of the tenant corresponding to the tenant identifier by utilizing the allocated bandwidth according to the tenant identifier;
the allocation bandwidth is calculated by the controller by using a total bandwidth allocated to the tenant corresponding to the tenant identifier and at least one second actual rate corresponding to the same tenant identifier, wherein the second actual rate is selected by the controller from the received plurality of first actual rates, and the tenant identifiers are the same.
6. The method of claim 5, wherein prior to said obtaining the first actual rate of traffic flow, the method further comprises:
receiving a third message sent by the controller through the NETCONF channel, wherein the third message comprises an initial bandwidth calculated by the controller and the tenant identification;
forwarding the service traffic of the tenant corresponding to the tenant identifier by utilizing the initial bandwidth;
the initial bandwidth is the quotient of the total bandwidth and the number of network devices forwarding the same tenant service flow.
7. The method of claim 6, wherein the method further comprises:
if the NETCONF channel fails, maintaining the allocated bandwidth;
if the failure time exceeds a time threshold, recovering the allocated bandwidth to the initial bandwidth;
and forwarding the received service flow by utilizing the initial bandwidth.
8. An apparatus for network device coordinated speed limiting, the apparatus being applied to a controller, the controller having established a netcon f channel with a plurality of network devices, the apparatus comprising:
a receiving unit, configured to receive, through the netcon channel, a first packet sent by each network device, where the first packet includes a first actual rate and a tenant identifier corresponding to the first actual rate, where the first actual rate is an actual rate of a service flow obtained when the network device receives the service flow of a tenant;
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring total bandwidth allocated to a tenant corresponding to a tenant identifier according to the tenant identifier, and acquiring at least one second actual rate from a plurality of first actual rates, wherein the tenant identifier corresponding to each second actual rate is the same;
A calculating unit, configured to calculate an allocated bandwidth of each network device according to the total bandwidth and the at least one second actual rate;
and the sending unit is used for sending a second message to each network device through the NETCONF channel, wherein the second message comprises the allocated bandwidth and the tenant identification, so that each network device uses the allocated bandwidth to forward the service traffic of the tenant corresponding to the tenant identification.
9. The apparatus according to claim 8, wherein the calculation unit is specifically configured to calculate a sum of the at least one second actual rate;
calculating a quotient of said each second actual rate and said sum;
taking the product of the quotient and the total bandwidth as the allocated bandwidth of each network device.
10. The apparatus of claim 8, wherein the receiving unit is further configured to receive a configuration instruction input by a manager, the configuration instruction including a total bandwidth allocated for a tenant and a tenant identification of the tenant;
the apparatus further comprises: and the storage unit is used for storing the total bandwidth allocated to the tenant and the tenant identification of the tenant.
11. The apparatus of claim 10, wherein the configuration instructions further comprise an identification of network devices and a number of network devices forwarding the same tenant traffic;
the calculating unit is further configured to calculate an initial bandwidth of each network device according to the total bandwidth and the number of network devices forwarding the same tenant traffic, where the initial bandwidth is a quotient of the total bandwidth and the number of network devices forwarding the same tenant traffic;
the sending unit is further configured to send a third packet to a network device forwarding the same tenant service traffic through the netcon channel according to an identifier of the network device forwarding the same tenant service traffic, where the third packet includes the initial bandwidth and the tenant identifier, so that the network device forwarding the same tenant traffic uses the initial bandwidth to perform forwarding processing for the tenant service traffic corresponding to the tenant identifier.
12. An apparatus for network device co-operation speed limiting, wherein the apparatus is applied to a network device, the network device having established a netcon f channel with a controller, the apparatus comprising:
the system comprises an acquisition unit, a control unit and a control unit, wherein the acquisition unit is used for acquiring a first actual rate of service flow when receiving the service flow of a tenant;
A sending unit, configured to send a first packet to the controller through the netcon channel, where the first packet includes the first actual rate and a tenant identifier of the tenant, and the first actual rate corresponds to the tenant identifier;
the receiving unit is used for receiving a second message sent by the controller through the NETCONF channel, wherein the second message comprises the allocated bandwidth calculated by the controller and the tenant identification;
the sending unit is further configured to forward, according to the tenant identifier, service traffic of a tenant corresponding to the tenant identifier by using the allocated bandwidth;
the allocation bandwidth is calculated by the controller by using a total bandwidth allocated to the tenant corresponding to the tenant identifier and at least one second actual rate corresponding to the same tenant identifier, wherein the second actual rate is selected by the controller from the received plurality of first actual rates, and the tenant identifiers are the same.
13. The apparatus of claim 12, wherein the receiving unit is further configured to receive, through the netcon f channel, a third packet sent by the controller, the third packet including an initial bandwidth calculated by the controller and the tenant identity;
The sending unit is further configured to forward, by using the initial bandwidth, a service flow of a tenant corresponding to the tenant identifier;
the initial bandwidth is the quotient of the total bandwidth and the number of network devices forwarding the same tenant service flow.
14. The apparatus of claim 13, wherein the apparatus further comprises:
a holding unit, configured to hold the allocated bandwidth if the netcon f channel fails;
a recovery unit, configured to recover the allocated bandwidth to the initial bandwidth if the failure time exceeds a time threshold;
the sending unit is further configured to forward the received service traffic by using the initial bandwidth.
CN202311043914.1A 2023-08-17 2023-08-17 Method and device for network equipment cooperative speed limiting Pending CN117278480A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311043914.1A CN117278480A (en) 2023-08-17 2023-08-17 Method and device for network equipment cooperative speed limiting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311043914.1A CN117278480A (en) 2023-08-17 2023-08-17 Method and device for network equipment cooperative speed limiting

Publications (1)

Publication Number Publication Date
CN117278480A true CN117278480A (en) 2023-12-22

Family

ID=89213317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311043914.1A Pending CN117278480A (en) 2023-08-17 2023-08-17 Method and device for network equipment cooperative speed limiting

Country Status (1)

Country Link
CN (1) CN117278480A (en)

Similar Documents

Publication Publication Date Title
CN109391560B (en) Network congestion notification method, proxy node and computer equipment
US11272396B2 (en) Frame aggregation method, network setting frame sending method, and device
US8908522B2 (en) Transmission rate control
EP4024778A1 (en) Method for determining required bandwidth for data stream transmission, and devices and system
CN102136959B (en) Ethernet link management method, device and system
CN108243106A (en) Control method, forwarding unit, control device and the communication system of network slice
CN111092840B (en) Processing strategy generation method, system and storage medium
US11177976B2 (en) Method and device for automatically implementing IOAM encapsulation and storage medium
EP3295612B1 (en) Uplink performance management
US10812349B2 (en) Methods, systems and computer readable media for triggering on-demand dynamic activation of cloud-based network visibility tools
CN112039796B (en) Data packet transmission method and device, storage medium and electronic equipment
EP3742786A1 (en) Network alarm method, device, system and terminal
CN103416022A (en) In-service throughput testing in distributed router/switch architectures
CN113824576A (en) Slice data transmission method and device, electronic equipment and readable medium
CN113055293A (en) Routing method and device in software defined wide area network and communication system
CN117278482A (en) Token bucket implementation method and device
CN112615789A (en) Out-of-band flow control method and device
CN109547287B (en) Bandwidth testing method and device and storage medium
CN112202896A (en) Edge calculation method, frame, terminal and storage medium
CN117278480A (en) Method and device for network equipment cooperative speed limiting
US11012378B2 (en) Methods and apparatus for shared buffer allocation in a transport node
CN117278481A (en) Method and device for network equipment cooperative speed limiting
CN106712983B (en) OAM message processing method and device for operation, management and maintenance
CN114143903A (en) Method, device, equipment and medium for configuring network slice PDU session
CN115037692A (en) Communication method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination