WO2024193427A1 - 流量控制方法、装置及系统 - Google Patents

流量控制方法、装置及系统 Download PDF

Info

Publication number
WO2024193427A1
WO2024193427A1 PCT/CN2024/081608 CN2024081608W WO2024193427A1 WO 2024193427 A1 WO2024193427 A1 WO 2024193427A1 CN 2024081608 W CN2024081608 W CN 2024081608W WO 2024193427 A1 WO2024193427 A1 WO 2024193427A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
service flow
port
flow
target service
Prior art date
Application number
PCT/CN2024/081608
Other languages
English (en)
French (fr)
Inventor
张大胜
杨平安
盛成
贺行健
高远
朱彤
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024193427A1 publication Critical patent/WO2024193427A1/zh

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/22Traffic shaping
    • 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/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA

Definitions

  • the present application relates to the field of network technology, and in particular to a flow control method, device and system.
  • Microbursts are a common type of traffic in the network, usually referring to bursts of very short duration (burst traffic or burst flow or bursts).
  • bursts For a detailed explanation of bursts, please refer to the request for comments (RFC) document numbered 8033 (RFC 8033 for short).
  • RRC request for comments
  • the present application provides a flow control method, device and system, which can solve the problem of affecting service transmission efficiency due to the emergence of micro-burst flow in the network.
  • a flow control method includes: a first network device obtains a flow control requirement corresponding to a target service flow.
  • the flow control requirement includes a maximum receiving rate of a second network device for the target service flow.
  • the first network device and the second network device are both located on a transmission path of the target service flow, and the second network device is located downstream of the first network device.
  • the first network device performs flow shaping on the target service flow according to the flow control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.
  • the target service flow is a service flow that requires important protection (referred to as the important protection service flow), such as a high-priority service flow.
  • the upstream device performs flow rate limiting on the important protection service flow according to the flow control requirements of the downstream device for the important protection service flow, thereby avoiding packet loss caused by buffer overflow of the downstream device due to micro-bursts of the important protection service flow, thereby ensuring the transmission efficiency of the important protection service flow.
  • the target service flow is a service flow that does not require important protection (referred to as non-re-protected service flow), such as a low-priority service flow.
  • the upstream device performs flow rate limiting on the non-re-protected service flow according to the flow control requirements of the downstream device for the non-re-protected service flow, so as to avoid the non-re-protected service flow occupying too much bandwidth resources and cache resources of the downstream device, and reserve more bandwidth resources and cache resources for the re-protected service flow, thereby ensuring the transmission efficiency of the re-protected service flow.
  • the present application uses network-level collaborative flow control, and the upstream equipment limits the flow rate of the important security business flow or the non-important security business flow, which can improve the transmission stability of the important security business flow, thereby improving the transmission efficiency of the important security business flow.
  • the available cache of the first port of the first network device is larger than the available cache of the second port of the second network device, the first port is the egress port on the first network device for forwarding the target service flow, and the second port is the egress port on the second network device for forwarding the target service flow.
  • the upstream large cache devices can smooth the peaks and fill the valleys of service flows. On the one hand, this can avoid drastic changes in traffic on the downstream small cache devices and reduce packet loss on the downstream small cache devices, so that the service flows are pre-speed-limited and shaped by the large cache devices before passing through the small cache devices, thereby avoiding or alleviating packet loss on the small cache devices due to microbursts.
  • the upstream large cache devices can cache more traffic when limiting the traffic speed, and the possibility of microbursts causing packet loss on the large cache devices is relatively small, so the risk of service traffic suppression affecting service throughput can be avoided or reduced, thereby improving service experience.
  • the traffic control requirement also includes an allocation cache requirement corresponding to the target service flow.
  • the implementation method of the first network device for traffic shaping the target service flow according to the traffic control requirement includes: when the actual cache of the target service flow on the first network device exceeds the allocation cache requirement, the first network device drops packets for the target service flow.
  • the first network device drops packets for the target service flow when the actual cache of the target service flow exceeds the allocated cache requirement, which can reduce the impact of the delay and jitter on the target service flow due to excessive cache, and also avoid the target service flow consuming too many cache resources.
  • the first network device obtains a flow control requirement corresponding to a target service flow, including: the first network device receives a first message sent by a control device, the first message includes an identifier of the target service flow and a flow control requirement, and the first message is used to instruct the first network device to perform flow shaping on the target service flow.
  • the flow control requirement obtained by the first network device comes from the control device, and the above-mentioned flow control method is implemented through management plane collaboration.
  • the first network device receives a second message sent by the control device, where the second message is used to instruct the first network device to end traffic shaping for the target service flow.
  • the first network device can passively end traffic shaping for the target service flow under the control of the control device.
  • the first network device sends port information to the control device, where the port information includes port rates of one or more ports on the first network device.
  • the port information may also include available buffers of one or more ports on the first network device.
  • the one or more ports include a first port on the first network device for forwarding a target service flow.
  • a second possible implementation method is that the first network device obtains the flow control requirement corresponding to the target business flow, including: the first network device receives a third message sent by the second network device, the third message includes the identifier and flow control requirement of the target business flow, and the third message is used to request the first network device to perform flow shaping on the target business flow.
  • the flow control demand obtained by the first network device comes from the second network device, and the above flow control method is implemented through the collaboration of the control plane or the forwarding plane.
  • the third message is a control message.
  • the present application can implement the above-mentioned flow control method through control plane collaboration.
  • the third message is a border gateway protocol (BGP) update message
  • BGP border gateway protocol
  • the identifier of the business flow that needs to be traffic shaped and the flow control requirements corresponding to the business flow are transmitted between network devices through an extended BGP update message, without the need to design a new protocol, and the implementation is simple.
  • the identifier of the business flow that needs to be traffic shaped and the flow control requirements corresponding to the business flow can also be transmitted between network devices based on a newly designed control protocol.
  • the protocol has better scalability and can flexibly expand more strategies.
  • the third message is a service message
  • the service message includes an application-aware networking (APN) field
  • the APN field includes an APN identification subfield and an APN parameter subfield
  • the identifier of the target service flow is in the APN identification subfield and/or the APN parameter subfield
  • the flow control requirement is in the APN parameter subfield.
  • the present application can realize the above-mentioned flow control method through the collaboration of the forwarding plane.
  • the network device transmits the identifier of the service flow that needs to be traffic shaped and the flow control requirement corresponding to the service flow in the service message. For example, if the service flow that needs to be traffic shaped is a downstream flow, the network device can carry the identifier of the service flow and the flow control requirement corresponding to the service flow in the upstream service message. In this way, there is no need to transmit additional messages in the communication network to transmit information, which can save network transmission resources.
  • the network device determines that it meets the flow control requirement corresponding to the target service flow, it deletes the flow control requirement in the APN parameter subfield of the received service message and then forwards it, which can avoid the subsequent network devices from misidentifying the flow control requirement.
  • the APN field also carries a target indication, and the target indication is used to indicate that the APN parameter subfield includes a flow control requirement.
  • the APN field further includes a flag subfield and an APN parameter type subfield, and the target is indicated in the flag subfield and/or the APN parameter type subfield.
  • a third possible implementation method is that the first network device obtains the flow control requirement corresponding to the target business flow, including: the first network device receives the fifth message sent by the second network device.
  • the fifth message includes the identifier of the target business flow and the port rate of the second port of the second network device.
  • the second port is an egress port on the second network device for forwarding the target business flow.
  • the fifth message is used to request the first network device to perform traffic shaping on the target business flow.
  • the first network device determines the flow control requirement based on the business requirement of the target business flow and the port rate of the second port.
  • the maximum receiving rate of the second network device for the target business flow is less than or equal to the port rate of the second port.
  • the flow control requirement obtained by the first network device is determined by the first network device according to information provided by the second network device.
  • the above flow control method is implemented through the collaboration of the control plane or the forwarding plane.
  • the business requirements of the target business flow include the transmission rate requirements of the target business flow.
  • the first network device determines the implementation method of the flow control requirements based on the business requirements of the target business flow and the port rate of the second port, including: the first network device determines the maximum receiving rate based on the smaller value of the transmission rate requirement and the port rate of the second port.
  • the first network device may use the smaller value of the transmission rate requirement and the port rate of the second port as the maximum receiving rate of the second network device for the target service flow.
  • the sending rate of the flow is used as the maximum receiving rate of the second network device for the target business flow, so that the first network device can limit the target business flow to a maximum of the sending rate of the second network device for the target business flow, so that the receiving rate of the second network device for the target business flow is less than or equal to the sending rate, so as to avoid packet loss of the target business flow on the second network device.
  • the flow control requirement corresponding to the target business flow also includes an allocation cache requirement corresponding to the target business flow
  • the business requirement includes a delay requirement of the target business flow.
  • the first network device determines an implementation method for the flow control requirement based on the business requirement of the target business flow and the port rate of the second port, including: the first network device determines the allocation cache requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate, and the delay requirement.
  • the flow control requirement corresponding to the target business flow includes an allocation buffer requirement corresponding to the target business flow
  • the implementation method of the first network device performing traffic shaping on the target business flow according to the flow control requirement includes: when the available buffer of the egress port on the first network device used to forward the target business flow is greater than or equal to the allocation buffer requirement, the first network device performs traffic shaping on the target business flow according to the flow control requirement.
  • the upstream device In a distributed control scheme, it may happen that the upstream device requested by the downstream device for collaborative traffic shaping cannot meet the traffic control requirements of the downstream device. Therefore, after receiving the traffic shaping request, the upstream device can first determine whether it meets the traffic control requirements.
  • the first network device when the available buffer of the egress port on the first network device for forwarding the target service flow is less than the allocated buffer requirement, the first network device sends a third message to a third network device located on the transmission path of the target service flow and the first network device is located downstream of the third network device.
  • the upstream device when the upstream device cannot meet the flow control requirements of the downstream device, the upstream device can continue to forward messages for requesting flow shaping to the upstream device to achieve the diffusion transmission of the flow shaping requirements.
  • the first network device sends a request response message to the second network device, which is used to indicate that the first network device cannot perform traffic shaping on the target service flow.
  • the first network device receives a sixth message sent by the second network device, where the sixth message is used to instruct the first network device to end traffic shaping for the target service flow.
  • the first network device can passively end traffic shaping for the target service flow under the instruction of the second network device.
  • the first network device when the first network device does not receive a message belonging to the target service flow within a target duration, the first network device ends traffic shaping for the target service flow.
  • the target duration may be an aging duration set in the first network device.
  • the first network device can actively end traffic shaping for the target service flow.
  • the identification processing of the target service flow is ended, so as to release processing resources in time.
  • a flow control method includes: a control device acquires port information of multiple network devices.
  • the multiple network devices include a first network device and a second network device located on a transmission path of a target service flow, and the second network device is located downstream of the first network device.
  • the port information of the first network device includes a port rate of a first port of the first network device.
  • the port information of the second network device includes a port rate of a second port of the second network device.
  • the first port is an egress port on the first network device for forwarding the target service flow.
  • the second port is an egress port on the second network device for forwarding the target service flow.
  • the control device determines the flow control requirement corresponding to the target service flow according to the service requirement of the target service flow and the port rate of the second port.
  • the flow control requirement includes a maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate of the second port.
  • the control device sends a first message to the first network device.
  • the first message includes an identifier of the target service flow and a flow control requirement. The first message is used to instruct the first network device to perform flow shaping on the target service flow.
  • the control device selects the upstream device to perform traffic shaping on the target service flow.
  • the upstream device performs traffic speed limiting on the re-secure service flow according to the traffic control requirements of the downstream device for the re-secure service flow, thereby avoiding packet loss caused by the buffer overflow of the downstream device due to micro-bursts of the re-secure service flow, thereby ensuring the transmission efficiency of the re-secure service flow.
  • the upstream device performs traffic speed limiting on the non-re-secure service flow according to the traffic control requirements of the downstream device for the non-re-secure service flow, thereby avoiding the non-re-secure service flow from occupying too many bandwidth resources and cache resources of the downstream device, and reserving more bandwidth resources and cache resources for the re-secure service flow, thereby ensuring the transmission efficiency of the re-secure service flow.
  • the present application realizes traffic control through the collaboration between the control device and multiple network devices in the communication network, which can improve the transmission stability of the re-secure service flow, thereby improving the transmission of the re-secure service flow. efficiency.
  • the service demand includes a transmission rate demand of the target service flow.
  • the control device determines the implementation method of the flow control demand corresponding to the target service flow according to the service demand of the target service flow and the port rate of the second port, including: the control device determines the maximum receiving rate according to the smaller value of the transmission rate demand and the port rate of the second port.
  • the control device may use the smaller value of the transmission rate requirement and the port rate of the second port as the maximum receiving rate of the second network device for the target service flow.
  • the sending rate of the second network device for the target service flow may be used as the maximum receiving rate of the second network device for the target service flow, so that the first network device can limit the speed of the target service flow to a maximum of the sending rate of the second network device for the target service flow, thereby making the receiving rate of the second network device for the target service flow less than or equal to the sending rate, so as to avoid packet loss of the target service flow on the second network device.
  • the port information of the first network device also includes an available buffer of the first port
  • the port information of the second network device also includes an available buffer of the second port.
  • the implementation method of controlling the device to send the first message to the first network device includes: when the available buffer of the first port is greater than the available buffer of the second port, the control device sends the first message to the first network device.
  • the control device selects the upstream large cache device to perform traffic shaping on the service flow, which can avoid drastic changes in traffic on the downstream small cache device and reduce packet loss in the downstream small cache device. That is to say, before the service flow passes through the small cache device, it is speed-limited and shaped in advance by the large cache device when passing through the large cache device, thereby avoiding or alleviating packet loss in the small cache device due to micro-burst flow. In addition, since the large cache device can cache more messages, it can better cope with burst traffic. Compared with the small cache device, the large cache device has a lower risk of packet loss when dealing with burst traffic and less packet loss, so it can improve the stability of service transmission.
  • the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow.
  • the business requirement of the target business flow includes the delay requirement of the target business flow.
  • the control device determines the implementation method of the flow control requirement corresponding to the target business flow according to the business requirement of the target business flow and the port rate of the second port, including: the control device determines the allocation buffer requirement corresponding to the target business flow according to the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate of the second network device for the target business flow, and the delay requirement of the target business flow.
  • the allocation buffer requirement is used for the first network device to drop packets for the target business flow when the actual buffer of the target business flow exceeds the allocation buffer requirement.
  • the first network device drops packets for the target business flow when the actual cache of the target business flow exceeds the allocated cache requirement. This can reduce the impact of the delay and jitter of the target business flow due to excessive cache, and can also prevent the target business flow from consuming too many cache resources.
  • the second network device is an access layer device
  • the first network device is an aggregation layer device or a core layer device. Since the port cache of the access layer device in the communication network is often smaller than that of the aggregation layer device and the core layer device, the access layer device usually has a flow control requirement in the downlink communication scenario.
  • This implementation method can basically meet the flow control requirements in the communication network by pre-configuring a policy in the control device to select an upstream device for the access layer device to perform traffic shaping.
  • the first network device is a pre-configured network device for performing traffic shaping on the service flow passing through the first network device.
  • a network device used to perform traffic shaping for downstream devices in the communication network is pre-determined, and some configurations are made in advance for the network device, such as configuring a single board for the network device, which is dedicated to port caching, so that when the network device performs traffic shaping, it can have as much cache space as possible to cache burst traffic, thereby reducing the risk of packet loss.
  • the first network device is a network device with the largest available buffer memory of an egress port for forwarding the target service flow among the network devices on the transmission path.
  • the control device can reduce the risk of packet loss by selecting a network device with more buffer memory to buffer burst traffic for traffic shaping.
  • the second network device is a pre-configured network device with a flow control requirement
  • the second port is a pre-configured egress port with a flow control requirement
  • control device may actively select an upstream device for the second network device to perform traffic shaping.
  • the control device receives a traffic shaping request sent by the second network device.
  • the traffic shaping request includes an identifier of a target service flow.
  • the traffic shaping request is used to request traffic shaping of the target service flow.
  • control device can passively select an upstream device for the second network device to perform traffic shaping on the target service flow under the triggering of the traffic shaping request sent by the second network device.
  • control device receives a traffic shaping cancellation request sent by the second network device, the traffic shaping cancellation request is used to request to end traffic shaping of the target service flow.
  • the control device sends a second message to the first network device, the second message is used to instruct the first network device to end traffic shaping of the target service flow.
  • control device can passively send an instruction to end traffic shaping of the target service flow to the first network device under the triggering of the traffic shaping cancellation request sent by the second network device.
  • a flow control method is provided.
  • the method is applied to a network device or a control device.
  • the method includes: obtaining port information of a first network device.
  • the first network device is located on the transmission path of a target service flow.
  • the port information includes a port rate of a target port.
  • the target port is an egress port on the first network device for forwarding a target service flow.
  • a flow control requirement corresponding to the target service flow is determined.
  • the flow control requirement includes a maximum receiving rate of the first network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate.
  • the downstream device provides the flow control demand corresponding to the service flow to the upstream device to trigger the upstream device to perform flow shaping on the service flow according to the flow control demand.
  • the upstream device performs flow rate limiting on the re-secured service flow according to the flow control demand of the downstream device for the re-secured service flow, which can avoid packet loss caused by the buffer overflow of the downstream device due to the micro-burst of the re-secured service flow, thereby ensuring the transmission efficiency of the re-secured service flow.
  • the upstream device performs flow rate limiting on the non-re-secured service flow according to the flow control demand of the downstream device for the non-re-secured service flow, which can avoid the non-re-secured service flow occupying too much bandwidth resources and cache resources of the downstream device, and reserve more bandwidth resources and cache resources for the re-secured service flow, thereby ensuring the transmission efficiency of the re-secured service flow.
  • the present application realizes flow control by coordinating between the control device and multiple network devices in the communication network, which can improve the transmission stability of the re-secured service flow, thereby improving the transmission efficiency of the re-secured service flow.
  • the business requirements of the target business flow include the transmission rate requirements of the target business flow.
  • the implementation method of the flow control requirements corresponding to the target business flow is determined, including: determining the maximum receiving rate according to the smaller value of the transmission rate requirement of the target business flow and the port rate.
  • the first network device can use the smaller value of the transmission rate requirement and the port rate of the second port as the maximum receiving rate of the second network device for the target service flow.
  • the sending rate of the first network device for the target service flow can be used as the maximum receiving rate of the first network device for the target service flow, so that the upstream device can limit the speed of the target service flow to a maximum of the sending rate of the first network device for the target service flow, thereby making the receiving rate of the first network device for the target service flow less than or equal to the sending rate, so as to avoid packet loss of the target service flow on the first network device.
  • the flow control requirement corresponding to the target service flow also includes an allocation buffer requirement corresponding to the target service flow
  • the service requirement includes a delay requirement of the target service flow.
  • the implementation method of the flow control requirement corresponding to the target service flow is determined, including: according to the round-trip delay between the sending end of the target service flow and the receiving end of the target service flow, the maximum receiving rate and the delay requirement, the allocation buffer requirement is determined, and the allocation buffer requirement is used to drop packets of the target service flow when the actual buffer of the target service flow exceeds the allocation buffer requirement.
  • the above method is applied to a first network device.
  • the first network device After determining the flow control requirement corresponding to the target service flow according to the service requirement and port rate of the target service flow, the first network device sends a first message to a second network device, the first message including the identifier and flow control requirement of the target service flow, the second network device is located on the transmission path of the target service flow, and the first network device is located downstream of the second network device, and the first message is used to request the second network device to perform flow shaping on the target service flow.
  • a network device with flow control requirements determines the flow control requirements corresponding to the business flow, and then provides the flow control requirements corresponding to the business flow to the upstream device to trigger the upstream device to perform flow shaping on the business flow according to the flow control requirements.
  • the implementation method of the first network device sending the first message to the second network device includes: in response to the first network device receiving a message belonging to a target service flow, or the target service flow losing packets on the first network device, sending the first message to the second network device.
  • the first network device may send the first message to the second network device when triggered by the first packet of the target service flow, or the first network device may send the first message to the second network device when triggered by packet loss of the target service flow.
  • the first message is a control message.
  • the first message is a BGP update message
  • the identifier and flow control requirement of the target service flow are in a path attribute field of the BGP update message.
  • the first message is a service message
  • the service message includes an APN field
  • the APN field includes an APN identification subfield and an APN parameter subfield
  • the identifier of the target service flow is in the APN identification subfield and/or the APN parameter subfield
  • the traffic control requirement is in the APN parameter subfield.
  • the APN field also carries an indication, which is used to indicate that the APN parameter subfield includes a flow control requirement.
  • the APN field also includes a flag subfield and an APN parameter type subfield, and the indication is in the flag subfield and/or the APN parameter type subfield.
  • the first network device receives a request response message corresponding to the first message sent by the second network device, and the request response message is used to indicate that the second network device cannot perform traffic shaping on the target service flow.
  • the first network device sends a second message to the third network device, and the second message includes an identifier of the target service flow and a traffic control requirement corresponding to the target service flow.
  • the third network device is located on the transmission path of the target service flow and the first network device is located downstream of the third network device, and the second message is used to request the first network device to perform traffic shaping on the target service flow.
  • the downstream device may select other upstream devices on the transmission path of the service flow to perform traffic shaping on the service flow.
  • the first network device when the first network device does not receive a message belonging to the target service flow within a target time period, the first network device sends a third message to the second network device, and the third message is used to instruct the second network device to end traffic shaping for the target service flow.
  • the first network device may actively send a message to the second network device to end traffic shaping of the target service flow, so as to instruct the second network device to end traffic shaping of the target service flow.
  • a flow control method includes: a first network device obtains port information of the first network device.
  • the first network device is located on the transmission path of the target service flow.
  • the port information includes the port rate of the target port.
  • the target port is an egress port on the first network device for forwarding the target service flow.
  • the first network device sends a target message to a second network device.
  • the target message includes an identifier and port information of the target service flow.
  • the second network device is located on the transmission path of the target service flow, and the first network device is located downstream of the second network device.
  • the target message is used to request the second network device to perform traffic shaping on the target service flow.
  • the downstream device provides the upstream device with port information for calculating the flow control demand corresponding to the service flow, so as to trigger the upstream device to calculate the flow control demand corresponding to the service flow, and further perform flow shaping on the service flow according to the flow control demand.
  • the upstream device performs flow rate limiting on the re-secure service flow according to the flow control demand of the downstream device for the re-secure service flow, which can avoid packet loss caused by the buffer overflow of the downstream device due to the micro-burst of the re-secure service flow, thereby ensuring the transmission efficiency of the re-secure service flow.
  • the upstream device performs flow rate limiting on the non-re-secure service flow according to the flow control demand of the downstream device for the non-re-secure service flow, which can avoid the non-re-secure service flow occupying too much bandwidth resources and cache resources of the downstream device, and reserve more bandwidth resources and cache resources for the re-secure service flow, thereby ensuring the transmission efficiency of the re-secure service flow.
  • the present application realizes flow control by coordinating between the control device and multiple network devices in the communication network, which can improve the transmission stability of the re-secure service flow, thereby improving the transmission efficiency of the re-secure service flow.
  • the target message is a control message.
  • the target message is a BGP update message
  • the identifier and port information of the target service flow are in a path attribute field of the BGP update message.
  • the target message is a service message
  • the service message includes an APN field
  • the APN field includes an APN identification subfield and an APN parameter subfield
  • the identifier of the target service flow is in the APN identification subfield and/or the APN parameter subfield
  • the port information is in the APN parameter subfield.
  • the APN field also carries a target indication, and the target indication is used to indicate that the APN parameter subfield includes port information.
  • the APN field further includes a flag subfield and an APN parameter type subfield, and the target is indicated in the flag subfield and/or the APN parameter type subfield.
  • a flow control device is provided, the device is applied to a first network device, the device comprises: an acquisition module, used to acquire the flow control requirement corresponding to the target service flow, the flow control requirement comprises the maximum receiving rate of the second network device for the target service flow, the first network device and the second network device are both located on the transmission path of the target service flow, and the second network device is located downstream of the first network device.
  • a flow shaping module used to flow shape the target service flow according to the flow control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.
  • the available cache of the first port of the first network device is larger than the available cache of the second port of the second network device, the first port is the egress port on the first network device used to forward the target service flow, and the second port is the egress port on the second network device used to forward the target service flow.
  • the traffic control requirement also includes an allocation buffer requirement corresponding to the target service flow
  • the traffic shaping module is used to: when the actual buffer of the target service flow on the first network device exceeds the allocation buffer requirement, drop packets of the target service flow.
  • the acquisition module includes a receiving module, which is used to receive a first message sent by a control device, wherein the first message includes an identifier of the target service flow and the flow control requirement, and the first message is used to instruct the first network device to perform traffic shaping on the target service flow.
  • the receiving module is further configured to receive a second message sent by the control device, wherein the second message is used to indicate the first
  • the network device ends traffic shaping for the target service flow.
  • the apparatus further includes: a sending module; the sending module is used to send port information to the control device, where the port information includes port rates of one or more ports on the first network device.
  • the acquisition module includes a receiving module, which is used to receive a third message sent by the second network device, the third message including the identifier of the target business flow and the flow control requirement, and the third message is used to request the first network device to perform traffic shaping on the target business flow.
  • the third message is a control message.
  • the third message is a BGP update message
  • the identifier of the target service flow and the traffic control requirement are in a path attribute field of the BGP update message.
  • the third message is a service message
  • the service message includes an APN field
  • the APN field includes an APN identification subfield and an APN parameter subfield
  • the identifier of the target service flow is in the APN identification subfield and/or the APN parameter subfield
  • the flow control requirement is in the APN parameter subfield
  • the device also includes: a deletion module and a sending module; the deletion module is used to delete the flow control requirement in the APN parameter subfield of the third message to obtain a fourth message; the sending module is used to forward the fourth message.
  • the APN field also carries a target indication, and the target indication is used to indicate that the APN parameter subfield includes the flow control requirement.
  • the APN field further includes a flag subfield and an APN parameter type subfield, and the target indication is in the flag subfield and/or the APN parameter type subfield.
  • the acquisition module includes a receiving module and a determination module; the receiving module is used to receive a fifth message sent by the second network device, the fifth message including an identifier of the target business flow and a port rate of a second port of the second network device, the second port being an egress port on the second network device for forwarding the target business flow, and the fifth message being used to request the first network device to perform traffic shaping on the target business flow; the determination module is used to determine the flow control requirement based on the business requirement of the target business flow and the port rate of the second port, the maximum receiving rate being less than or equal to the port rate of the second port.
  • the service requirement includes a transmission rate requirement of the target service flow
  • the determination module is used to determine the maximum receiving rate according to a smaller value between the transmission rate requirement and a port rate of the second port.
  • the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow
  • the business requirement includes a delay requirement of the target business flow
  • the determination module is used to determine the allocation buffer requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement.
  • the flow control requirement includes an allocation buffer requirement corresponding to the target business flow
  • the traffic shaping module is used to perform traffic shaping on the target business flow according to the flow control requirement when the available buffer of the egress port on the first network device used to forward the target business flow is greater than or equal to the allocation buffer requirement.
  • the device also includes: a sending module; the sending module is used to send the third message to a third network device when the available cache of the egress port on the first network device for forwarding the target business flow is less than the allocated cache requirement, the third network device is located on the transmission path of the target business flow, and the first network device is located downstream of the third network device.
  • the device also includes: a sending module; the sending module is used to send a request response message to the second network device when the available cache of the egress port on the first network device used to forward the target service flow is less than the allocated cache requirement, and the request response message is used to indicate that the first network device cannot perform traffic shaping on the target service flow.
  • a sending module is used to send a request response message to the second network device when the available cache of the egress port on the first network device used to forward the target service flow is less than the allocated cache requirement, and the request response message is used to indicate that the first network device cannot perform traffic shaping on the target service flow.
  • the receiving module is further used to receive a sixth message sent by the second network device, and the sixth message is used to instruct the first network device to end traffic shaping for the target service flow.
  • the traffic shaping module is further used to end traffic shaping of the target service flow when the first network device does not receive a message belonging to the target service flow within a target time period.
  • a flow control device which is applied to a control device, and the device includes: an acquisition module, which is used to acquire port information of multiple network devices, the multiple network devices include a first network device and a second network device located on the transmission path of the target business flow, and the second network device is located downstream of the first network device, the port information of the first network device includes the port rate of the first port of the first network device, the port information of the second network device includes the port rate of the second port of the second network device, the first port is the outbound port on the first network device for forwarding the target business flow, and the second port is the outbound port of the first network device for forwarding the target business flow.
  • An output port on the second network device for forwarding the target business flow for forwarding the target business flow; a determination module, used to determine the flow control requirement corresponding to the target business flow based on the port rate of the second port being less than the port rate of the first port, according to the business requirements of the target business flow and the port rate of the second port, the flow control requirement including the maximum receiving rate of the second network device for the target business flow, the maximum receiving rate being less than or equal to the port rate of the second port; a sending module, used to send a first message to the first network device, the first message including the identifier of the target business flow and the flow control requirement, the first message being used to instruct the first network device to perform traffic shaping on the target business flow.
  • the service requirement includes a transmission rate requirement of the target service flow
  • the determination module is used to determine the maximum receiving rate according to a smaller value between the transmission rate requirement and a port rate of the second port.
  • the port information of the first network device also includes the available cache of the first port
  • the port information of the second network device also includes the available cache of the second port.
  • the sending module is used to send the first message to the first network device when the available cache of the first port is greater than the available cache of the second port.
  • the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow, and the business requirement includes a delay requirement of the target business flow.
  • the determination module is used to determine the allocation buffer requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement.
  • the allocation buffer requirement is used by the first network device to drop packets for the target business flow when the actual cache of the target business flow exceeds the allocation buffer requirement.
  • the second network device is an access layer device
  • the first network device is a convergence layer device or a core layer device.
  • the first network device is a preconfigured network device for performing traffic shaping on a service flow passing through the first network device.
  • the first network device is a network device on the transmission path having a largest available buffer memory at an egress port for forwarding the target service flow.
  • the second network device is a pre-configured network device with a flow control requirement
  • the second port is a pre-configured egress port with a flow control requirement
  • the device also includes: a receiving module, used to receive a traffic shaping request sent by the second network device before the control device sends a first message to the first network device, the traffic shaping request includes an identifier of the target service flow, and the traffic shaping request is used to request traffic shaping of the target service flow.
  • a receiving module used to receive a traffic shaping request sent by the second network device before the control device sends a first message to the first network device, the traffic shaping request includes an identifier of the target service flow, and the traffic shaping request is used to request traffic shaping of the target service flow.
  • the receiving module is also used to receive a traffic shaping cancellation request sent by the second network device, and the traffic shaping cancellation request is used to request to end traffic shaping of the target business flow;
  • the sending module is also used to send a second message to the first network device, and the second message is used to instruct the first network device to end traffic shaping of the target business flow.
  • a flow control device which includes: an acquisition module for acquiring port information of a first network device, wherein the first network device is located on the transmission path of a target business flow, and the port information includes a port rate of a target port, and the target port is an egress port on the first network device for forwarding the target business flow; a determination module for determining a flow control requirement corresponding to the target business flow based on the business requirements of the target business flow and the port rate, wherein the flow control requirement includes a maximum receiving rate of the first network device for the target business flow, and the maximum receiving rate is less than or equal to the port rate.
  • the service requirement includes a transmission rate requirement of the target service flow
  • the determination module is used to determine the maximum receiving rate according to a smaller value between the transmission rate requirement and the port rate.
  • the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow
  • the business requirement includes a delay requirement of the target business flow
  • the determination module is used to determine the allocation buffer requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement.
  • the allocation buffer requirement is used to drop packets for the target business flow when the actual cache of the target business flow exceeds the allocation buffer requirement.
  • the device is applied to the first network device, and the device also includes: a sending module; the sending module is used to send a first message to the second network device after determining the flow control requirements corresponding to the target business flow based on the business requirements of the target business flow and the port rate, the first message including the identifier of the target business flow and the flow control requirements, the second network device is located on the transmission path of the target business flow, and the first network device is located downstream of the second network device, and the first message is used to request the second network device to perform traffic shaping on the target business flow.
  • a sending module is used to send a first message to the second network device after determining the flow control requirements corresponding to the target business flow based on the business requirements of the target business flow and the port rate, the first message including the identifier of the target business flow and the flow control requirements, the second network device is located on the transmission path of the target business flow, and the first network device is located downstream of the second network device, and the first message is used to request the second network device to perform traffic shaping on the
  • the sending module is used to send the first message to the second network device in response to the first network device receiving a message belonging to the target service flow, or the target service flow experiencing packet loss on the first network device.
  • the first message is a control message.
  • the first message is a BGP update message
  • the identifier of the target service flow and the traffic control requirement are in a path attribute field of the BGP update message.
  • the first message is a service message
  • the service message includes an APN field
  • the APN field includes an APN identification subfield and an APN parameter subfield
  • the identifier of the target service flow is in the APN identification subfield and/or the APN parameter subfield
  • the traffic control requirement is in the APN parameter subfield.
  • the APN field also carries an indication, where the indication is used to indicate that the APN parameter subfield includes the flow control requirement.
  • the APN field further includes a flag subfield and an APN parameter type subfield, and the indication is in the flag subfield and/or the APN parameter type subfield.
  • the device also includes: a receiving module; the receiving module is used to receive a request response message corresponding to the first message sent by the second network device, and the request response message is used to indicate that the second network device cannot perform traffic shaping on the target business flow; the sending module is also used to send a second message to a third network device, and the second message includes an identifier of the target business flow and the traffic control requirement.
  • the third network device is located on the transmission path of the target business flow, and the first network device is located downstream of the third network device.
  • the second message is used to request the first network device to perform traffic shaping on the target business flow.
  • the sending module is also used to send a third message to the second network device when the first network device does not receive a message belonging to the target service flow within a target time period, and the third message is used to instruct the second network device to end traffic shaping for the target service flow.
  • a flow control device which is applied to a first network device, and the device includes: an acquisition module, used to acquire port information of the first network device, the first network device is located on the transmission path of the target business flow, the port information includes the port rate of the target port, and the target port is the egress port on the first network device used to forward the target business flow; a sending module, used to send a target message to a second network device, the target message includes an identifier of the target business flow and the port information, the second network device is located on the transmission path of the target business flow, and the first network device is located downstream of the second network device, and the target message is used to request the second network device to perform traffic shaping on the target business flow.
  • the sending module is used to send the target message to the second network device in response to the first network device receiving a message belonging to the target service flow, or the target service flow experiencing packet loss on the first network device.
  • the target message is a BGP update message
  • the identifier of the target service flow and the port information are in a path attribute field of the BGP update message.
  • the target message is a service message
  • the service message includes an APN field
  • the APN field includes an APN identification subfield and an APN parameter subfield
  • the identifier of the target service flow is in the APN identification subfield and/or the APN parameter subfield
  • the port information is in the APN parameter subfield.
  • the APN field further carries a target indication, where the target indication is used to indicate that the APN parameter subfield includes the port information.
  • the APN field further includes a flag subfield and an APN parameter type subfield, and the target indication is in the flag subfield and/or the APN parameter type subfield.
  • the modules in the fifth to eighth aspects mentioned above can be implemented based on software, hardware or a combination of software and hardware, and the modules can be arbitrarily combined or divided based on the specific implementation.
  • a flow control system comprising: a control device and a plurality of network devices;
  • the control device is used to obtain port information of the multiple network devices, the multiple network devices include a first network device and a second network device located on a transmission path of a target service flow, and the second network device is located downstream of the first network device, the port information of the first network device includes a port rate of a first port of the first network device, the port information of the second network device includes a port rate of a second port of the second network device, the first port is an egress port on the first network device for forwarding the target service flow, and the second port is an egress port on the second network device for forwarding the target service flow;
  • the control device is further configured to determine, when the port rate of the second port is less than the port rate of the first port, a flow control requirement corresponding to the target service flow according to the service requirement of the target service flow and the port rate of the second port, wherein the flow control requirement includes a maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate of the first port.
  • the flow control requirement includes a maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate of the first port.
  • the control device is further used to send a message to the first network device, where the message includes an identifier of the target service flow and the flow control requirement, and the message is used to instruct the first network device to perform flow shaping on the target service flow;
  • the first network device is used to perform traffic shaping on the target service flow according to the traffic control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.
  • the flow control device provided in the fifth aspect can be used as the first network device in the flow control system
  • the flow control device provided in the sixth aspect can be used as the control device in the flow control system.
  • a flow control system comprising: a plurality of network devices, the plurality of network devices comprising a first network device and a second network device, the first network device and the second network device are both located on a transmission path of a target service flow, and the second network device is located downstream of the first network device;
  • the second network device is used to obtain port information of the second network device, where the port information includes a port rate of a target port, and the target port is an egress port on the second network device used to forward the target service flow;
  • the second network device is further used to determine the flow control requirement corresponding to the target service flow according to the service requirement of the target service flow and the port rate, wherein the flow control requirement includes a maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate;
  • the second network device is further used to send a message to the first network device, where the message includes an identifier of the target service flow and the flow control requirement, and the message is used to request the first network device to perform flow shaping on the target service flow;
  • the first network device is used to perform traffic shaping on the target service flow according to the traffic control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.
  • the flow control device provided in the fifth aspect can be used as the first network device in the flow control system, and the flow control device provided in the seventh aspect can be used as the second network device in the flow control system.
  • a traffic control system comprising: a plurality of network devices, the plurality of network devices comprising a first network device and a second network device, the first network device and the second network device are both located on a transmission path of a target service flow, and the second network device is located downstream of the first network device;
  • the second network device is used to obtain port information of the second network device, where the port information includes a port rate of a target port, and the target port is an egress port on the second network device used to forward the target service flow;
  • the second network device is further used to send a message to the first network device, where the message includes the identifier of the target service flow and the port information, and the message is used to request the first network device to perform traffic shaping on the target service flow;
  • the first network device is used to determine the flow control requirement corresponding to the target service flow according to the service requirement of the target service flow and the port rate, wherein the flow control requirement includes a maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate;
  • the first network device is further used to perform traffic shaping on the target service flow according to the traffic control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.
  • the flow control device provided in the fifth aspect can be used as the first network device in the flow control system, and the flow control device provided in the eighth aspect can be used as the second network device in the flow control system.
  • a flow control device comprising: a memory and a processor
  • the memory is used to store computer programs
  • the processor is used to execute the computer program stored in the memory so that the flow control device performs the flow control method provided by the first aspect or any optional manner of the first aspect.
  • a flow control device comprising: a memory and a processor
  • the memory is used to store computer programs
  • the processor is used to execute the computer program stored in the memory so that the flow control device performs the flow control method provided by the second aspect or any optional manner of the second aspect.
  • a flow control device comprising: a memory and a processor
  • the memory is used to store computer programs
  • the processor is used to execute the computer program stored in the memory so that the flow control device performs the flow control method provided by the third aspect or any optional manner of the third aspect.
  • a flow control device comprising: a memory and a processor
  • the memory is used to store computer programs
  • the processor is used to execute the computer program stored in the memory so that the flow control device performs the flow control method provided by the fourth aspect or any optional manner of the fourth aspect.
  • a computer-readable storage medium in which a computer program is stored.
  • the flow control method provided in the first aspect or any optional aspect of the first aspect is implemented, or the flow control method provided in the second aspect or any optional aspect of the second aspect is implemented, or the flow control method provided in the third aspect or any optional aspect of the third aspect is implemented, or the flow control method provided in the fourth aspect or any optional aspect of the fourth aspect is implemented.
  • a computer program product which includes a program or code.
  • the program or code When the program or code is executed, it implements the flow control method provided by the first aspect or any optional method of the first aspect, or implements the flow control method provided by the second aspect or any optional method of the second aspect, or implements the flow control method provided by the third aspect or any optional method of the third aspect, or implements the flow control method provided by the fourth aspect or any optional method of the fourth aspect.
  • a chip which includes a programmable logic circuit and/or program instructions. When the chip is running, it implements the flow control method provided by the first aspect or any optional method of the first aspect, or implements the flow control method provided by the second aspect or any optional method of the second aspect, or implements the flow control method provided by the third aspect or any optional method of the third aspect, or implements the flow control method provided by the fourth aspect or any optional method of the fourth aspect.
  • FIG1 is a schematic diagram of a flow rate of network traffic varying over time provided by an embodiment of the present application
  • FIG2 is a schematic diagram of another type of network traffic flow rate variation over time provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a flow rate of another network flow varying over time provided by an embodiment of the present application.
  • FIG4 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • FIG5 is a schematic diagram of an implementation flow of a flow control method provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of an implementation flow of another flow control method provided in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of the structure of a BGP update message provided in an embodiment of the present application.
  • FIG8 is a schematic diagram of the structure of another BGP update message provided in an embodiment of the present application.
  • FIG9 is a schematic diagram of the structure of a control message provided in an embodiment of the present application.
  • FIG10 is a schematic diagram of the structure of an APN field provided in an embodiment of the present application.
  • FIG11 is a schematic diagram of a flow chart of another flow control method according to an embodiment of the present application.
  • FIG12 is a flow chart of a flow control method provided in another embodiment of the present application.
  • FIG13 is a flow chart of another flow control method provided by another embodiment of the present application.
  • FIG14 is a flow chart of another flow control method provided in another embodiment of the present application.
  • FIG15 is a flow chart of another flow control method provided in another embodiment of the present application.
  • FIG16 is a schematic structural diagram of a flow control device provided in an embodiment of the present application.
  • FIG17 is a schematic diagram of the structure of another flow control device provided in an embodiment of the present application.
  • FIG18 is a schematic structural diagram of another flow control device provided in an embodiment of the present application.
  • FIG19 is a schematic structural diagram of another flow control device provided in an embodiment of the present application.
  • FIG20 is a schematic diagram of the hardware structure of a network device provided in an embodiment of the present application.
  • FIG. 21 is a schematic diagram of the hardware structure of a control device provided in an embodiment of the present application.
  • FIGS 1 to 3 are schematic diagrams of the flow rate of a network traffic provided by an embodiment of the present application over time. Among them, the ordinate represents the flow rate, the unit is million bits per second (Mbps), and the abscissa represents time.
  • the time unit of the abscissa in Figure 1 is minutes. As shown in Figure 1, the flow rate-time change curve looks flat, indicating that the network traffic tends to be uniform. The time unit of the abscissa in Figure 2 is seconds. As shown in Figure 2, the flow rate-time change curve looks like there are obvious peaks and troughs, indicating that the network traffic has certain fluctuations. The time unit of the horizontal axis in Figure 3 is milliseconds. As shown in Figure 3, the traffic rate-time change curve appears to vibrate violently with peaks and troughs, indicating that the network traffic fluctuates violently, wherein each peak is a micro-burst of the network traffic, that is, micro-burst traffic is common in the network.
  • the network device has multiple ports.
  • the network device forwards messages through the ports.
  • the ports of the network device are usually configured with a cache, and the cache is used to store messages received by the network device.
  • the port on the network device for receiving messages is an inbound port, and the port on the network device for sending messages is an outbound port.
  • the port cache of the network device refers to the port cache of the port.
  • the port cache of the network device can be statically configured, such as the network device has an 8G (gigabyte) cache, the network device has 8 ports, and the cache allocated to each port is 1G respectively. Then, for a port, the available cache of the port is the remaining cache in the allocated cache.
  • the port cache of the network device can also be dynamically configured, such as the network device has an 8G cache, the network device has 8 ports, and the initial cache allocated to each port is 512M (megabytes) respectively.
  • the remaining 4G cache is the shared cache of the 8 ports.
  • the available cache of the port is the sum of the remaining cache in the allocated cache and the remaining cache in the shared cache.
  • the port cache of the network device includes multiple egress port queues (also called forwarding queues). After receiving a message, the network device caches the message in the corresponding egress port queue, and then forwards the messages in the egress port queue in sequence. When micro-burst traffic occurs in the network, it may cause the port cache of the network device to overflow instantly, resulting in packet loss.
  • the network traffic flows from the input port with large bandwidth to the egress port with small bandwidth (large hitting small), or when the number of input ports of the network device is greater than the number of egress ports, and the network traffic flows from multiple input ports to one egress port (many hitting few), the micro-burst of traffic at the micro level is superimposed.
  • the cache of the egress port is small and the peak traffic cannot be cached, packet loss will occur on the network device. Once packet loss occurs in the network device, retransmission may be triggered. The service delay caused by retransmission is much greater than the round trip time (RTT), which will affect the service transmission efficiency.
  • RTT round trip time
  • the sender since microburst traffic may cause congestion in a very short period of time, leading to misjudgment of congestion, the sender triggers a rapid speed reduction through the TCP sliding window, suppressing the service traffic, resulting in the inability to fully utilize network bandwidth resources and reducing service throughput.
  • the port cache of some network devices in the network is small.
  • the port cache of access layer devices is usually smaller than that of aggregation layer devices and core layer devices.
  • the occurrence of micro-burst traffic is more likely to cause packet loss.
  • the overall cache of campus access switches is generally small, and the cache allocated to each port is less than 2M or 2G. Packet loss caused by micro-burst traffic is more common, especially in the scenario where an access switch with a small cache is connected to multiple access points (AP).
  • AP access points
  • the root cause is that the access switch with a small cache is connected to the AP, which aggravates the micro-burst packet loss.
  • the explicit congestion notification (ECN) mechanism can reduce network packet loss
  • SAC smart application control
  • the ECN mechanism there are two ways to implement the ECN mechanism.
  • One is to perform back pressure when congestion occurs, and notify the sending source to control the sending speed.
  • this implementation method performs back pressure after congestion packet loss occurs, on the one hand, it has already caused business losses, and on the other hand, it performs back pressure when congestion occurs, which is less timely.
  • the other is to predict the possibility of congestion in advance based on queues and delays, and perform back pressure in advance, but the implementation algorithm of congestion prediction is relatively complex, and it is difficult to ensure the accuracy of congestion prediction.
  • slicing technology can only ensure that services outside the slice cannot occupy the bandwidth and forwarding resources of services within the slice, but it cannot solve the packet loss problem caused by bursts of service traffic within the slice.
  • slicing technology allocates the cache of the entire network device to different slices, each slice has independent cache resources, and the caches of different slices cannot be shared with each other, it will reduce the ability of the entire network device to smooth the peaks and fill the valleys of network traffic.
  • SAC technology can realize intelligent application identification and classification, use deep packet inspection technology to identify and analyze packets, and then perform refined quality of service (QoS) control on high-priority services, thereby achieving high-priority service assurance.
  • QoS quality of service
  • SAC technology requires deep analysis of packets, if the packets are encrypted, deep analysis of packets is not possible, that is, SAC technology cannot be applied to scenarios where packets are encrypted, and its application is highly limited.
  • the embodiment of the present application provides a technical solution, in which an upstream device located on the transmission path of the service flow obtains the flow control demand corresponding to the service flow, and performs traffic shaping (traffic shaping) on the service flow according to the flow control demand, so that the sending rate of the upstream device for the service flow is less than or equal to the maximum receiving rate of the downstream device for the service flow located on the transmission path of the service flow, that is, the flow rate is limited by the upstream device to achieve the flow control effect.
  • traffic shaping traffic shaping
  • the upstream device performing flow rate limiting on the re-secured service flow according to the flow control demand of the downstream device for the re-secured service flow, the packet loss caused by the buffer overflow of the downstream device due to the micro-burst of the re-secured service flow can be avoided, thereby ensuring the transmission efficiency of the re-secured service flow.
  • the upstream device performing flow rate limiting on the non-re-secured service flow according to the flow control demand of the downstream device for the non-re-secured service flow, it can be avoided that the non-re-secured service flow occupies too much bandwidth resources and cache resources of the downstream device, and more bandwidth resources and cache resources are reserved for the re-secured service flow, thereby ensuring the transmission efficiency of the re-secured service flow.
  • the present application realizes flow control by coordinating between a control device and multiple network devices in a communication network, which can improve the transmission stability of the important security service flow, thereby improving the transmission efficiency of the important security service flow.
  • the available cache of the egress port for forwarding the service flow on the upstream device located on the transmission path of the service flow is larger than the available cache of the egress port for forwarding the service flow on the downstream device, that is, the upstream device is a large cache device and the downstream device is a small cache device. Since the large cache device can cache more traffic than the small cache device, the upstream large cache device can smooth the peaks and fill the valleys of the service flow.
  • the upstream large cache device can cache more traffic when limiting the traffic speed, and the possibility of micro-burst traffic causing packet loss in the large cache device is relatively small, so the risk of service traffic suppression affecting service throughput can be avoided or reduced, thereby improving service experience.
  • the traffic control method provided in the embodiments of the present application can be applied to various types of communication networks, including but not limited to radio access network (RAN), Internet Protocol (IP) (IP RAN) network, data center network (DCN), metropolitan area network, wide area network or campus network, etc.
  • RAN radio access network
  • IP Internet Protocol
  • DCN data center network
  • metropolitan area network wide area network or campus network, etc.
  • the communication network may adopt a three-layer network architecture, that is, the communication network may be a three-layer network, including a core layer, a convergence layer and an access layer.
  • the core layer is a high-speed switching backbone of the communication network, connected to a backbone network (also referred to as a core network), for example, it may be connected to a controller in the backbone network.
  • the convergence layer is used to provide a convergence connection (connecting the access layer and the core layer).
  • the access layer is used to connect a workstation to the communication network.
  • the workstation may be a base station, an AP, a server or a terminal, etc.
  • a network device located in the access layer is referred to as an access layer device
  • a network device located in the convergence layer is referred to as a convergence layer device
  • a network device located in the core layer is referred to as a core layer device.
  • the communication network may also adopt a two-layer network architecture, that is, the communication network may be a two-layer network, including a core layer and an access layer, the core layer is a high-speed switching backbone of the communication network, and the access layer is used to connect a workstation to the communication network.
  • the embodiment of the present application does not limit the network architecture adopted by the communication network.
  • the communication network provided in the following embodiments of the present application is obtained based on an abstract generalization of the communication network in the related art and is only used as an exemplary description and is not intended to limit the communication scenario.
  • FIG. 4 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • the application scenario includes multiple network devices 401A-401C (collectively referred to as network devices 401) in a communication network.
  • network device 401A is a core layer device.
  • Network device 401B is a convergence layer device.
  • Network device 401C is an access layer device.
  • the number and type of network devices in this application scenario are only used as an exemplary illustration and are not intended to limit the application scenario involved in the embodiment of the present application.
  • the network device 401 is, for example, a router or a switch.
  • the network device 401A, the network device 401B and the network device 401C are connected in sequence.
  • network device 401A is connected to the backbone network.
  • Network device 401C is connected to the workstation.
  • Each network device 401 includes an uplink port and a downlink port.
  • Network device 401A is connected to the backbone network through the uplink port, and is connected to network device 401B through the downlink port.
  • Network device 401B is connected to network device 401A through the uplink port, and is connected to network device 401C through the downlink port.
  • Network device 401C is connected to network device 401B through the uplink port, and is connected to the workstation through the downlink port.
  • the uplink port of network device 401 is the input port
  • the downlink port is the output port, that is, network device 401 receives the message through the downlink port and sends the message through the uplink port.
  • the access layer device can receive the message sent by the workstation through the downlink port, and send the message to the aggregation layer device through the uplink port.
  • the downlink port of the network device 401 is an ingress port
  • the uplink port is an egress port, that is, the network device 401 receives a message through the uplink port and sends the message through the downlink port.
  • the access layer device can receive a message sent by the aggregation layer device through the uplink port and send the message through the downlink port.
  • the port rate of the uplink port of the network device 401 is usually greater than the port rate of the downlink port.
  • the port rates of the uplink port and the downlink port of the network device 401A are 100Gbps and 40Gbps, respectively.
  • the port rates of the uplink port and the downlink port of the network device 401B are 40Gbps and 10Gbps, respectively.
  • the port rates of the uplink port and the downlink port of the network device 401C are 10Gbps and 1Gbps, respectively.
  • the flow control method provided in the embodiment of the present application can be applied to the downlink communication scenario.
  • the flow control method is applied to the uplink communication scenario or other communication scenarios.
  • the application scenario also includes a control device 402.
  • the control device 402 can be a server, or a server cluster composed of several servers, or a cloud computing center.
  • the control device 402 is connected to the network device 401 in the communication network through a wired network or a wireless network.
  • the control device 402 is used to manage and control the network device 401, such as issuing configurations to the network device, collecting information about the network device, and issuing instructions to the network device.
  • the control device 402 is also called a network management device or a network controller, for example, it can be a cloud management and control platform, a software defined network (SDN) controller, or a network control engine (NCE).
  • SDN software defined network
  • NCE network control engine
  • the flow control method provided in the embodiment of the present application can be implemented based on the management plane, the control plane or the forwarding plane.
  • the flow control method based on the management plane collaborative implementation belongs to a centralized control scheme.
  • the control device selects a network device that performs traffic shaping on the service flow, and sends the flow control requirement corresponding to the service flow to the network device.
  • the flow control method based on the control plane or the forwarding plane collaborative implementation belongs to a distributed control scheme.
  • the downstream device with the traffic shaping requirement selects the upstream device that performs traffic shaping on the service flow, and sends the flow control requirement corresponding to the service flow or the information used to determine the flow control requirement to the upstream device.
  • the main difference between the flow control method based on the control plane collaborative implementation and the flow control method based on the forwarding plane collaborative implementation is that in the flow control method based on the control plane collaborative implementation, the downstream device transmits the flow control requirement corresponding to the service flow or the information used to determine the flow control requirement to the upstream device through the control message; in the flow control method based on the forwarding plane collaborative implementation, the downstream device transmits the flow control requirement corresponding to the service flow or the information used to determine the flow control requirement to the upstream device through the service message.
  • the following embodiments of the present application respectively illustrate the specific implementation methods of the flow control method based on the collaboration of the management plane, the control plane and the forwarding plane.
  • Figure 5 is a schematic diagram of the implementation process of a flow control method provided in an embodiment of the present application.
  • method 500 includes but is not limited to steps 501 to 504.
  • the method 500 is implemented based on management plane collaboration and can be applied to the application scenario shown in Figure 4.
  • the control device in the method 500 is, for example, the control device 402 shown in Figure 4.
  • the network device 2 in the method 500 is, for example, the network device 401C shown in Figure 4, and the network device 1 is, for example, the network device 401B or the network device 401A shown in Figure 4.
  • the network device 2 in the method 500 is, for example, the network device 401B shown in Figure 4, and the network device 1 is, for example, the network device 401A shown in Figure 4.
  • Step 501 A control device obtains port information of multiple network devices.
  • the multiple network devices include network device 1 and network device 2 located on the transmission path of service flow 1.
  • network device 2 On the transmission path of service flow 1, network device 2 is located downstream of network device 1, that is, when service flow 1 is transmitted in the communication network, it first reaches network device 1 and then reaches network device 2.
  • network device 1 is an upstream device located on the transmission path of service flow 1
  • network device 2 is a downstream device located on the transmission path of service flow 1.
  • the port information of the network device includes the port rate.
  • the port information of the network device 1 includes the port rate of one or more ports on the network device 1, and the one or more ports include port 1.
  • Port 1 is the egress port on the network device 1 for forwarding service flow 1.
  • the port information of the network device 2 includes the port rate of one or more ports on the network device, and the one or more ports include port 2.
  • Port 2 is the egress port on the network device 2 for forwarding service flow 1.
  • the port information of the network device also includes the available cache of the port.
  • the port information of network device 1 includes the available cache of one or more ports on network device 1, and the one or more ports include the above-mentioned port 1, that is, the port information of network device 1 may include the port rate and available cache of port 1 of network device 1.
  • the port information of network device 2 includes the available cache of one or more ports on the network device, and the one or more ports include the above-mentioned port 2, that is, the port information of network device 2 may include the port rate and available cache of port 2 of network device 2.
  • the available cache of the ports on the network device may come from the network device's own memory and/or an additionally configured single-board memory.
  • the network device 1 is a network device for performing traffic shaping on the service flow 1.
  • the network device 2 is a network device having a traffic control requirement for the service flow 1.
  • service flow 1 is any service flow flowing through the communication network managed by the control device.
  • service flow 1 is a designated service flow flowing through the communication network managed by the control device.
  • Service flow 1 may be a re-secured service flow.
  • a re-secured service flow may be a high-priority service flow, including but not limited to a service flow with a high service level agreement (SLA) level or a high user service level.
  • SLA service level agreement
  • a re-secured service flow may also be a service flow that accesses the communication network through a designated port or a designated access device.
  • the conference equipment in an important conference room communicates with the network through a designated port or a designated access device
  • the re-secured service flow may be a service flow flowing through the designated port or the designated access device, that is, the re-secured service flow may be a service flow whose sending end or receiving end is the conference equipment in the important conference room.
  • service flow 1 may also be a non-re-secured service flow.
  • a non-re-secured service flow may be a low-priority service flow, including but not limited to a service flow with a low SLA level or a low user service level.
  • network device 1 is located upstream of network device 2 on the transmission path of service flow 1 and has traffic shaping capability for service flow 1.
  • network device 2 is an access layer device
  • network device 1 is an aggregation layer device or a core layer device.
  • network device 2 is an aggregation layer device
  • network device 1 is a core layer device.
  • the control device may be configured with a strategy: for access layer devices with flow control requirements, select an aggregation layer device or a core layer device for traffic shaping; for aggregation layer devices with flow control requirements, select a core layer device for traffic shaping.
  • the control device automatically selects an aggregation layer device or a core layer device on the transmission path of service flow 1 to perform traffic shaping on service flow 1.
  • the control device stores the network topology of the communication network and the transmission path of the security service flow, so that the control device selects a suitable network device for traffic shaping.
  • the access layer device Since the port cache of the access layer device in the communication network is often smaller than the port cache of the aggregation layer device and the core layer device, the access layer device usually has a flow control demand in the downlink communication scenario.
  • This strategy can basically meet the flow control demand in the communication network by pre-configuring the strategy in the control device to select the upstream device for the access layer device to perform traffic shaping.
  • the port cache of the aggregation layer device is often smaller than the port cache of the core layer device. Therefore, in the downlink communication scenario, the aggregation layer device may also have a flow control demand.
  • the strategy can also be pre-configured in the control device to select the upstream device for the aggregation layer device to perform traffic shaping.
  • network device 1 is a pre-configured network device for performing traffic shaping on the service flow passing through network device 1.
  • network device 1 is a network device configured with a single board dedicated to port buffering.
  • the control device automatically selects network device 1 for traffic shaping.
  • network device 1 is the network device with the largest available cache for the egress port forwarding service flow 1 among the network devices on the transmission path of service flow 1.
  • the control device may select the network device with the largest available cache for the egress port forwarding service flow 1 to perform traffic shaping on service flow 1.
  • the network device is selected to perform traffic shaping on service flow 1, there is more cache to store the messages belonging to service flow 1, which can reduce the risk of packet loss for service flow 1.
  • network device 2 is a bandwidth bottleneck device on the transmission path of service flow 1.
  • network device 2 is a network device on the transmission path of service flow 1 whose port rate of an egress port for forwarding service flow 1 is the smallest among network devices on the transmission path of service flow 1.
  • service flow 1 is a statically arranged service flow, and the destination address and/or destination port of service flow 1 are preconfigured.
  • the destination address may be a destination IP address or a destination Media Access Control (MAC) address.
  • service flow 1 is a secured service flow sent to conference equipment in an important conference room.
  • the bandwidth bottleneck device on the transmission path of service flow 1 can be predetermined, so network device 2 can be a preconfigured network device with flow control requirements, and/or port 2 on network device 2 is a preconfigured egress port with flow control requirements.
  • network device 2 is an access point for conference equipment in an important conference room.
  • the network device 2 is a port for accessing a conference device in an important conference room, or the network device 2 has a flow control requirement for the service flow 1 sent to the conference device. Accordingly, the destination address of the service flow 1 is the conference device, and/or the destination port of the service flow 1 is the port 2 on the network device 2.
  • control device can actively select an upstream device for the network device 2 to perform traffic shaping.
  • service flow 1 is a dynamically arranged service flow.
  • the network administrator can input a command line to the control device, and the control device can realize dynamic identification of the service flow that needs to be controlled.
  • the command line input to the control device indicates that the flow of the important user's security service flow needs to be controlled, that is, service flow 1 is the important user's security service flow.
  • the control device can store the corresponding relationship between the important user and the device address of the login device.
  • the control device identifies the service flow with the destination address of the device address corresponding to the important user as the security service flow, and sends a notification to the network device in the communication network to detect whether there is a security service flow in the communication network.
  • the network device When the network device detects that the security service flow passes, or the security service flow loses packets, it can send a traffic shaping request to the control device to request the control device to perform traffic shaping on the security service flow.
  • the control device can receive a traffic shaping request sent by the network device 2, and the traffic shaping request includes the identifier of the service flow 1, and the traffic shaping request is used to request traffic shaping for the service flow 1.
  • the control device determines that network device 2 is a network device that has a traffic control requirement for service flow 1 .
  • control device can passively select an upstream device for network device 2 to perform traffic shaping on service flow 1 under the triggering of the traffic shaping request sent by network device 2.
  • the multiple network devices in the above step 501 include network devices within the management domain of the control device, such as network device 1 within the management domain of the control device.
  • the multiple network devices may also include network devices that are not within the management domain of the control device, such as network device 2 may be within the management domain of the control device or may not be within the management domain of the control device.
  • the control device may obtain the port information of the network device by receiving the port information sent by the network device. For example, if network device 1 is within the management domain of the control device, network device 1 may send the port information of network device 1 to the control device, and the control device receives and stores the port information of network device 1.
  • the control device may actively collect the port information of network devices within the management domain. For example, the control device may periodically collect the port information of network devices within the management domain, including but not limited to querying the network device for port information through the network configuration protocol (NetConf), telemetry technology, or simple network management protocol (SNMP).
  • the network device may also actively send port information to the control device. For example, when the port information of the network device changes, the network device actively reports the changed port information to the control device.
  • the control device may obtain the port information of the network device by receiving the port information sent by other control devices, and the network device is within the management domain of the other control devices.
  • network device 2 is within the management domain of other control devices, and network device 2 may send the port information of network device 2 to other control devices, and the other control devices may then send the port information of network device 2 to the control device.
  • the way in which other control devices obtain the port information of network device 2 may refer to the way in which the above-mentioned control device obtains the port information of network device 1, and the embodiments of the present application will not be repeated here.
  • Step 502 Based on the fact that the port rate of port 2 on network device 2 used to forward service flow 1 is less than the port rate of port 1 on network device 1 used to forward service flow 1, the control device determines the flow control requirement corresponding to service flow 1 according to the service requirements of service flow 1 and the port rate of port 2, and the flow control requirement includes the maximum receiving rate of network device 2 for service flow 1.
  • the maximum receiving rate of the network device 2 for the service flow 1 is less than or equal to the port rate of the port 2 of the network device 2.
  • the maximum receiving rate of the network device 2 for the service flow 1 may be the maximum sending rate of the network device 2 for the service flow 1, for example, the port bandwidth allocated to the service flow 1 by the network device 2.
  • the service requirements of the service flow 1 include but are not limited to delay requirements, transmission rate requirements or jitter requirements.
  • the service demand of service flow 1 includes a transmission rate demand of service flow 1.
  • the control device determines, according to the service demand of service flow 1 and the port rate of port 2, a method for implementing the flow control demand corresponding to service flow 1, including: the control device determines, according to the smaller value of the transmission rate demand of service flow 1 and the port rate of port 2, a maximum receiving rate of network device 2 for service flow 1.
  • the control device may use the smaller value of the transmission rate requirement of service flow 1 and the port rate of port 2 as the maximum receiving rate of network device 2 for service flow 1. For example, if the transmission rate requirement of service flow 1 is 50Mbps, and the port rate of port 2 of network device 2 is 100Mbps, the control device determines that the maximum receiving rate of network device 2 for service flow 1 is 50Mbps. For another example, if the transmission rate requirement of service flow 1 is 10Gbps or the higher the transmission rate, the better, and the port rate of port 2 of network device 2 is 1Gbps, the control device determines that the maximum receiving rate of network device 2 for service flow 1 is 1Gbps.
  • the principle followed by the network equipment when forwarding the service flow should be to try to meet the service requirements of the service flow within the equipment capacity.
  • Some important security service flows may have clear transmission rate requirements, such as important conference audio and video streams.
  • Some important security service flows may not have clear transmission rate requirements or set a larger transmission rate requirement to achieve the maximum transmission rate that the communication network can meet, such as Such as important file services.
  • the control device uses the smaller value of the transmission rate requirement of business flow 1 and the port rate of port 2 as the maximum receiving rate of network device 2 for business flow 1.
  • the sending rate of network device 2 for business flow 1 is used as the maximum receiving rate of network device 2 for business flow 1.
  • the upstream device can limit the speed of business flow 1 to a maximum of the sending rate of network device 2 for business flow 1, so that the receiving rate of network device 2 for business flow 1 is less than or equal to the sending rate, so as to avoid packet loss of business flow 1 on network device 2.
  • the control device can determine that the maximum receiving rate of network device 2 for service flow 1 is less than or equal to the smaller value of the transmission rate requirement of service flow 1 and the port rate of port 2.
  • the flow control requirement corresponding to service flow 1 also includes an allocation buffer requirement corresponding to service flow 1.
  • the service requirement of service flow 1 includes a delay requirement of service flow 1.
  • the control device determines the implementation method of the flow control requirement corresponding to service flow 1 according to the service requirement of service flow 1 and the port rate of port 2, including: the control device determines the allocation buffer requirement corresponding to service flow 1 according to the round trip time (RTT) between the sending end of service flow 1 and the receiving end of service flow 1, the maximum receiving rate of network device 2 for service flow 1, and the delay requirement of service flow 1.
  • the allocation buffer requirement is used for network device 1 to drop packets for service flow 1 when the actual buffer of service flow 1 exceeds the allocation buffer requirement. For example, the allocation buffer requirement ⁇ RTT*maximum receiving rate/delay requirement.
  • the above method can be used to calculate the allocation cache demand.
  • delay-insensitive services such as audio and video conferencing
  • the above method can be used to calculate the allocation cache demand, or the allocation cache demand can be directly set.
  • the cache allocation principle can be that when the port cache resources of the network device are sufficient, the larger the cache is, the better.
  • the control device may also comprehensively consider other factors such as the burst characteristics of the service flow.
  • the burst characteristics include but are not limited to the burst flow size, burst duration, adjacent burst interval or burst rate.
  • the embodiment of the present application does not limit the manner in which the control device determines the allocation buffer requirement corresponding to the service flow.
  • control device may determine whether the available buffer of port 2 on network device 2 meets the allocation buffer requirement corresponding to service flow 1. After determining that the available buffer of port 2 on network device 2 does not meet the allocation buffer requirement corresponding to service flow 1, the control device may continue to perform the following step 503.
  • the control device executes the following step 503 without determining whether the available buffer of port 2 on network device 2 meets the allocation buffer requirement corresponding to service flow 1. For example, when network device 2 is a pre-configured network device with flow control requirements, and/or port 2 on network device 2 is a pre-configured egress port with flow control requirements, the control device may directly execute the following step 503 after determining the flow control requirement corresponding to service flow 1.
  • Step 503 The control device sends a message 11 to the network device 1 .
  • the message 11 includes an identifier of the service flow 1 and a flow control requirement corresponding to the service flow 1 .
  • the message 11 is used to instruct the network device 1 to perform flow shaping on the service flow 1 .
  • the identifier of service flow 1 can be represented by one or more of the five-tuple of service flow 1, or can be represented by an IPv4 flow identifier or an IPv6 flow identifier, or can be represented by an APN identifier.
  • the five-tuple includes a source IP address, a destination IP address, a source port, a destination port, and a transport layer protocol.
  • message 11 can be obtained based on the expansion of an existing management message. For example, an indication can be carried in the management message to indicate traffic shaping. Alternatively, message 11 can also be a custom management message, which itself has the function of indicating traffic shaping.
  • the port information of the network device 1 includes the available buffer of the port 1.
  • the port information of the network device 2 includes the available buffer of the port 2.
  • the above step 503 is performed when the available buffer of the port 1 of the network device 1 is larger than the available buffer of the port 2 of the network device 2, that is, after determining that the available buffer of the port 1 of the network device 1 is larger than the available buffer of the port 2 of the network device 2, the control device sends the message 11 to the network device 1.
  • the network device 1 used for traffic shaping of the service flow 1 is a large buffer device
  • the network device 2 having a traffic control requirement for the service flow 1 is a small buffer device.
  • the control device selects the upstream large cache device to perform traffic shaping on the service flow, which can avoid the downstream small cache
  • the traffic on the device changes dramatically, reducing the packet loss of the downstream small cache device. That is to say, the service flow is pre-speed-limited and shaped by the large cache device before passing through the small cache device, thus avoiding or alleviating the packet loss of the small cache device due to micro-burst flow.
  • the large cache device can cache more messages, it can better cope with burst traffic. Compared with the small cache device, the large cache device has a lower risk of packet loss when dealing with burst traffic and a smaller number of packet losses, thus improving the stability of service transmission.
  • Step 504 Network device 1 performs traffic shaping on service flow 1 according to the traffic control requirement corresponding to service flow 1 , so that the sending rate of network device 1 for service flow 1 is less than or equal to the maximum receiving rate of network device 2 for service flow 1 .
  • the network device 1 when the flow control requirement corresponding to the service flow 1 includes the allocation buffer requirement corresponding to the service flow 1, the network device 1 performs flow shaping on the service flow 1 according to the flow control requirement corresponding to the service flow 1, including: when the actual buffer of the service flow 1 on the network device 1 exceeds the allocation buffer requirement corresponding to the service flow 1, the network device 1 drops packets of the service flow 1.
  • the allocation buffer requirement corresponding to the service flow by setting the allocation buffer requirement corresponding to the service flow, the influence of the delay and jitter of the service flow due to the excessive buffer can be reduced, and the consumption of too many buffer resources by a single service flow can be avoided.
  • network device 1 stores flow control requirements corresponding to n service flows, where n is a positive integer.
  • the maximum receiving rate of network device 2 for service flow 1 is R1
  • the allocation buffer requirement corresponding to service flow 1 is C1.
  • the forwarding rules of network device 1 for service flow 1 based on the flow control collaborative requirement table are as follows: If the receiving rate of network device 1 for service flow 1 is greater than R1, network device 1 uses R1 as the sending rate to send service flow 1 to the downstream device, and caches the remaining messages of service flow 1 locally. In addition, if the actual cache of service flow 1 on network device 1 exceeds C1, network device 1 discards the messages in service flow 1 that exceed C1. If the receiving rate of network device 1 for service flow 1 is less than or equal to R1, network device 1 uses the receiving rate of service flow 1 as the sending rate to send service flow 1 to the downstream device.
  • the upstream device located on the transmission path of the service flow obtains the flow control demand corresponding to the service flow, and performs flow shaping on the service flow according to the flow control demand, so that the sending rate of the upstream device for the service flow is less than or equal to the maximum receiving rate of the downstream device for the service flow on the transmission path of the service flow, that is, flow rate limiting is performed.
  • the upstream device performing flow rate limiting on the re-protected service flow according to the flow control demand of the downstream device for the re-protected service flow, the packet loss caused by the buffer overflow of the downstream device due to the micro-burst of the re-protected service flow can be avoided, thereby ensuring the transmission efficiency of the re-protected service flow.
  • the non-re-protected service flow can be avoided from occupying too much bandwidth resources and cache resources of the downstream device, and more bandwidth resources and cache resources are reserved for the re-protected service flow, thereby ensuring the transmission efficiency of the re-protected service flow.
  • the present application realizes flow control by coordinating between the control device and multiple network devices in the communication network, which can improve the transmission stability of the re-protected service flow, thereby improving the transmission efficiency of the re-protected service flow.
  • the network device 1 ends the traffic shaping for the service flow 1. There are many ways to trigger the network device 1 to end the traffic shaping for the service flow 1.
  • network device 1 actively terminates traffic shaping for service flow 1.
  • network device 1 does not receive a message belonging to service flow 1 within a target duration
  • network device 1 terminates traffic shaping for service flow 1.
  • the target duration may be an aging duration set in network device 1.
  • the network device 1 by setting the aging time in the network device 1, when the network device 1 does not receive the message belonging to the service flow 1 within the aging time, the identification processing of the service flow 1 is terminated to release the processing resources in time.
  • the network device 1 can also delete the corresponding relationship between the identification of the service flow 1 and the flow control requirement stored to release the storage resources.
  • the control device controls the network device 1 to stop the traffic shaping of the service flow 1.
  • the network device 1 receives the control device Message 12 is sent.
  • Message 12 is used to instruct network device 1 to end traffic shaping for service flow 1.
  • message 12 may carry the identifier of service flow 1 to instruct network device 1 to end traffic shaping for service flow 1.
  • network device 1 currently only performs traffic shaping on service flow 1, then message 12 may not carry the identifier of service flow 1.
  • message 12 indicates service flow 1 that is currently undergoing traffic shaping by default. Therefore, this case can also be regarded as message 12 being used to instruct network device 1 to end traffic shaping for service flow 1.
  • message 12 can be obtained based on the expansion of existing management messages.
  • an indication can be carried in the management message to indicate the end of traffic shaping.
  • the indication for indicating the end of traffic shaping is different from the above-mentioned indication for indicating traffic shaping.
  • message 12 can also be a customized management message, which itself has the function of indicating the end of traffic shaping.
  • a second implementation method may be that the control device receives a traffic shaping cancellation request sent by the network device 2, and the traffic shaping cancellation request is used to request to end the traffic shaping of the service flow 1. After that, the control device sends a message 12 to the network device 1.
  • the traffic shaping cancellation request may include the identifier of the service flow 1, or, if there is only one service flow undergoing traffic shaping on the network device 2, then the traffic shaping cancellation request may not include the identifier of the service flow 1.
  • the control device may determine that the service flow 1 is requested to end the traffic shaping by the network device 2 according to the flow control coordination requirement table.
  • the control device selects the upstream device to perform flow shaping on the target service flow.
  • the upstream device performs flow rate limiting on the re-secure service flow according to the flow control requirements of the downstream device for the re-secure service flow, which can avoid packet loss caused by the buffer overflow of the downstream device due to the micro-burst of the re-secure service flow, thereby ensuring the transmission efficiency of the re-secure service flow.
  • the upstream device performs flow rate limiting on the non-re-secure service flow according to the flow control requirements of the downstream device for the non-re-secure service flow, which can avoid the non-re-secure service flow occupying too much bandwidth resources and cache resources of the downstream device, and reserve more bandwidth resources and cache resources for the re-secure service flow, thereby ensuring the transmission efficiency of the re-secure service flow.
  • the present application realizes flow control through the collaboration between the control device and multiple network devices in the communication network, which can improve the transmission stability of the re-secure service flow, thereby improving the transmission efficiency of the re-secure service flow.
  • the different control devices can collaborate with each other, and the control device that manages the downstream device provides the port information of the downstream device to the control device that manages the upstream device, and then the control device that manages the upstream device executes the above method 500 to achieve collaborative control of business traffic by multiple network devices.
  • FIG6 is a schematic diagram of an implementation flow of another flow control method provided in an embodiment of the present application.
  • method 600 includes but is not limited to steps 601 to 604.
  • the method 600 is implemented based on the collaboration of the control plane or the forwarding plane, and can be applied to the application scenario shown in FIG4.
  • a control device may not be provided in the application scenario.
  • the network device 3 in the method 600 is, for example, the network device 401C shown in FIG4, and the network device 4 is, for example, the network device 401B or the network device 401A shown in FIG4.
  • the network device 3 in the method 600 is, for example, the network device 401B shown in FIG4, and the network device 4 is, for example, the network device 401A shown in FIG4.
  • Step 601 Network device 3 obtains port information of network device 3 , where network device 3 is located on the transmission path of service flow 2 .
  • the port information of the network device 3 includes the port rate of the port 3.
  • the port 3 is an egress port on the network device 3 for forwarding the service flow 2.
  • the port information of the network device 3 also includes the available buffer of the port 3.
  • service flow 2 is any service flow in the communication network.
  • service flow 2 is a specified service flow in the communication network.
  • Service flow 2 may be a re-secured service flow, or service flow 2 may be a non-re-secured service flow.
  • service flow 1 in step 501 above, and the present embodiment of the application will not be repeated here.
  • network device 3 is an access layer device or a convergence layer device.
  • network device 3 is a pre-configured network device that has a flow control requirement for service flow 2.
  • service flow 2 is a statically orchestrated service flow.
  • the network device 3 may store an identifier of service flow 2. When network device 3 detects service flow 2, port information of a port on network device 3 used to forward service flow 2 is obtained.
  • service flow 2 is a dynamically orchestrated service flow.
  • the network device 3 may pre-store a correspondence between a user and a device address of a login device.
  • Network device 3 identifies a service flow whose destination address is the device address corresponding to the user as service flow 2, and after detecting service flow 2, obtains port information of a port on network device 3 used to forward service flow 2.
  • Service flow 2 is any service flow identified by network device 3 as being sent to the user.
  • Step 602 network device 3 determines the flow control requirement corresponding to business flow 2 according to the business requirement of business flow 2 and the port rate of port 3 on network device 3 used to forward business flow 2, and the flow control requirement includes the maximum receiving rate of network device 3 for business flow 2.
  • the maximum receiving rate of the network device 3 for the service flow 2 is less than or equal to the port rate of the port 3 of the network device 3.
  • the maximum receiving rate for service flow 2 may be the maximum sending rate of network device 3 for service flow 2, for example, the port bandwidth allocated by network device 3 to service flow 2.
  • the service requirements of service flow 2 include but are not limited to delay requirements, transmission rate requirements or jitter requirements.
  • the service demand of service flow 2 includes a transmission rate demand of service flow 2.
  • the network device 3 determines the implementation method of the flow control demand corresponding to the service flow 3 according to the service demand of service flow 2 and the port rate of port 3, including: the network device 3 determines the maximum receiving rate of the network device 3 for service flow 2 according to the smaller value of the transmission rate demand of service flow 2 and the port rate of port 2.
  • the flow control demand corresponding to service flow 2 also includes an allocation buffer demand corresponding to service flow 2.
  • the service demand of service flow 2 includes the delay demand of service flow 2.
  • Network device 3 determines the implementation method of the flow control demand corresponding to service flow 2 according to the service demand of service flow 2 and the port rate of port 2, including: network device 3 determines the allocation buffer demand corresponding to service flow 2 according to the round-trip delay between the sending end of service flow 2 and the receiving end of service flow 2, the maximum receiving rate of network device 3 for service flow 2, and the delay demand of service flow 2.
  • the allocation buffer demand is used to drop packets of service flow 2 when the actual buffer of service flow 2 exceeds the allocation buffer demand.
  • the network device 3 determines the implementation method of the flow control demand corresponding to the business flow 2 according to the business demand of the business flow 2 and the port rate of the port 3.
  • the implementation method of the flow control demand corresponding to the business flow 1 according to the business demand of the business flow 1 and the port rate of the port 2 in the above step 502 can be referred to.
  • the embodiments of the present application will not be repeated here.
  • the network device 3 may determine whether the available buffer of the port 3 on the network device 3 meets the allocation buffer requirement corresponding to the service flow 2. After determining that the available buffer of the port 3 on the network device 3 does not meet the allocation buffer requirement corresponding to the service flow 2, the network device 3 may continue to perform the following step 603.
  • the network device 3 executes the following step 603, without determining whether the available buffer of the port 3 on the network device 3 meets the allocation buffer requirement corresponding to the service flow 2. For example, after the network device 3 receives the first packet of the service flow 2, or detects that the service flow 2 has packet loss in the network device 2 or the number of packet losses reaches a certain threshold, the network device 3 requests the network device 4 to perform traffic shaping on the service flow 2, that is, the following step 603 is executed.
  • Step 603 Network device 3 sends message 21 to network device 4 .
  • Message 21 includes the identifier of service flow 2 and the flow control requirement corresponding to service flow 2 .
  • Message 21 is used to request network device 4 to perform flow shaping on service flow 2 .
  • network device 4 is located on the transmission path of service flow 2, and network device 3 is located downstream of network device 4, that is, when service flow 2 is transmitted in the communication network, it first reaches network device 4 and then reaches network device 3.
  • network device 4 is an upstream device located on the transmission path of service flow 2
  • network device 3 is a downstream device located on the transmission path of service flow 2.
  • the identifier of service flow 2 can be represented by one or more of the five-tuple of service flow 2, or can be represented by an IPv4 flow identifier or an IPv6 flow identifier, or can be represented by an APN identifier.
  • network device 4 is a convergence layer device or a core layer device.
  • service flow 2 is a downstream flow
  • message 21 is an upstream message.
  • method 600 is implemented based on control plane collaboration, and message 21 is a control message.
  • the message 21 may be implemented based on an existing control protocol.
  • the control message 21 is a BGP update message, and the identifier of the service flow 2 and the flow control requirement corresponding to the service flow 2 are in the path attribute field of the BGP update message.
  • FIG. 7 and FIG. 8 are schematic diagrams of the structure of a BGP update message provided in an embodiment of the present application.
  • the BGP update message includes an Ethernet header, an IP header, a Transmission Control Protocol (TCP) header, a BGP data packet, and a frame check sequence (FCS).
  • the BGP data packet includes a BGP header and a BGP message field.
  • the BGP header includes a maker field, a length field, and a type field (not shown in the figure).
  • FIG. 7 shows the format of the BGP message field defined in the RFC 4271 document. As shown in FIG.
  • the BGP message field includes an unreachable route length field, an unreachable route field, a total path attribute length field, a path attribute field, and a network layer reachability information (NLRI) field.
  • FIG8 shows the format of the BGP message field defined in the RFC 4760 document.
  • the BGP message field includes an address family identifier field, a subsequent address family identifier field, a next hop network address length field, a next hop network address field, a reserved field, an NLRI field, and a path attribute field.
  • the path attribute field in the BGP message field can be extended, and the service flow identifier and the flow control requirement corresponding to the service flow are carried in the path attribute field as extended attributes.
  • network device 3 can first establish a BGP Ethernet virtual private network (EVPN) neighbor with network device 4, and then transmit the identifier of the service flow that needs to be traffic shaped and the traffic control requirements corresponding to the service flow through an extended BGP update message.
  • 4 establishes a BGP EVPN peer relationship.
  • the communication network also includes a route reflector, and a BGP EVPN neighbor is established between network device 3 and network device 4, or network device 3 and network device 4 respectively establish a BGP peer relationship with the route reflector, that is, network device 3 and network device 4 are indirectly connected in communication through the route reflector.
  • the route reflector is used to forward messages transmitted between different network devices, and the route reflector does not modify the received message during the forwarding process.
  • the identifier of the business flow that needs to be traffic shaped and the traffic control requirements corresponding to the business flow are transmitted between network devices through extended BGP update messages, without the need to design a new protocol, and the implementation is simple.
  • the BGP EVPN neighbor is a long connection based on TCP, relying on the security mechanism of EVPN, there is no need to consider security issues when transmitting information, and secure transmission of information can be achieved.
  • the embodiment of the present application may also design a new control protocol, and the message 21 may be implemented based on the new control protocol.
  • the new control protocol may be an overlay protocol, which is used to transmit network cooperation information between network devices, for example, it may be called a network cooperation protocol (NCP).
  • NCP network cooperation protocol
  • FIG. 9 is a schematic diagram of the structure of a control message provided in an embodiment of the present application.
  • the control message may be called an NCP message.
  • the control message includes an Ethernet header, an IP header, a TCP header or a User Datagram Protocol (UDP) header (TCP/UDP header) and network-level flow control information.
  • UDP User Datagram Protocol
  • the network-level flow control information includes a flow type (flow type) or a bitmap field (flow type/bitmap field), a service identifier field, and a flow control information field.
  • the value of the flow type or bitmap field is used to indicate which flow identifier is carried in the service identifier field, including but not limited to an IPv4 flow identifier, an IPv6 flow identifier, or an APN identifier.
  • the service identifier field is used to carry the flow identifier of the service flow.
  • the flow control information field is used to carry the flow control requirements corresponding to the service flow.
  • network device 3 can first establish a UDP neighbor or a TCP neighbor with network device 4, and then transmit the identifier of service flow 2 and the flow control requirements corresponding to service flow 2 through the NCP message shown in Figure 9. If a UDP neighbor is established between network device 3 and network device 4, then the transport layer protocol header of the NCP message is a UDP header accordingly. Compared with TCP, this implementation method has lower resource overhead.
  • the aggregation layer device or core layer device can listen to more access layer devices or provide traffic shaping services for more access layer devices. For example, the aggregation layer device or core layer device can listen to 2000 to 6000 access layer devices. If a TCP neighbor is established between network device 3 and network device 4, then the transport layer protocol header of the NCP message is a TCP header accordingly.
  • This implementation method can refer to the BGP protocol.
  • network devices transmit identifiers of business flows that require traffic shaping and traffic control requirements corresponding to the business flows based on a new control protocol.
  • the protocol has better scalability and can flexibly expand more strategies.
  • method 600 is implemented based on forwarding plane collaboration, and message 21 is a service message.
  • the service message includes an APN field.
  • the APN field includes an APN identifier (APN ID) subfield and an APN parameter subfield.
  • the identifier of service flow 2 is in the APN identifier subfield and/or the APN parameter subfield.
  • the flow control requirement corresponding to service flow 2 is in the APN parameter subfield.
  • the identifier of service flow 2 is in the APN identifier subfield and/or the APN parameter subfield, including the three situations that the identifier of service flow 2 is only in the APN identifier subfield, or the identifier of service flow 2 is only in the APN parameter subfield, or the identifier of service flow 2 is in the APN identifier subfield and the APN parameter subfield.
  • the scenario where the identifier of service flow 2 is only in the APN identifier subfield is that the APN identifier of service flow 2 is the same as the APN identifier of the service flow to which message 21 belongs. In this case, the identifier of service flow 2 does not need to be additionally carried in the APN parameter subfield.
  • network device 4 After network device 4 receives message 21, it parses and finds that the APN parameter subfield does not carry the service flow identifier, and then uses the APN identifier in the APN identifier subfield as the identifier of the service flow that needs to be traffic shaped by default.
  • the scenario where the identifier of service flow 2 is only in the APN parameter subfield is that the APN identifier of service flow 2 is different from the APN identifier of the service flow to which message 21 belongs. In this case, the identifier of service flow 2 needs to be additionally carried in the APN parameter subfield.
  • network device 4 After network device 4 receives message 21, it parses and obtains the service flow identifier carried in the APN parameter subfield, and uses the service flow identifier carried in the APN parameter subfield as the identifier of the service flow that needs to be traffic shaped.
  • the scenario in which the identifier of service flow 2 is in the APN identifier subfield and the APN parameter subfield is that the APN identifier of service flow 2 is the same as the APN identifier of the service flow to which message 21 belongs.
  • the identifier of service flow 2 can be additionally carried in the APN parameter subfield.
  • the service flow identifier carried in the APN parameter subfield can be used as the identifier of the service flow that needs traffic shaping.
  • the network device transmits the identifier of the service flow that needs to be traffic shaped and the flow control requirement corresponding to the service flow in the service message. For example, if the service flow that needs to be traffic shaped is a downlink flow, the network device can carry the identifier of the service flow and the flow control requirement corresponding to the service flow in the uplink service message. In this way, there is no need to transmit additional messages in the communication network to transmit information, which can save network transmission resources.
  • the APN field also carries a target indication, which is used to indicate that the APN parameter subfield includes a flow control requirement.
  • the APN field also includes a flag subfield and an APN parameter type subfield. The target indication is in the flag subfield and/or the APN parameter type subfield.
  • FIG10 is a schematic diagram of the structure of an APN field provided in an embodiment of the present application.
  • the APN field includes an APN tag.
  • the APN parameter type subfield includes an identification type subfield, a flag subfield, an APN parameter type subfield, an APN ID subfield, an intent subfield, and an APN parameter subfield.
  • the length of the APN identification type subfield and the length of the flag subfield are both 8 bits, and the length of the APN parameter type subfield is 16 bits.
  • the APN parameter subfield is used to carry the identification of the service flow that needs to be traffic shaped and the flow control requirements corresponding to the service flow.
  • the flag subfield can be used to indicate the type of APN parameters carried in the APN parameter subfield, such as the flag subfield is set to "V", indicating that the APN parameter subfield includes flow control requirements.
  • the APN parameter type subfield can also be used to indicate the type of APN parameters carried in the APN parameter subfield, such as pre-defining or pre-negotiating that the APN parameter subfield is set to a certain specific value to indicate that the APN parameter subfield includes flow control requirements.
  • the definitions and explanations of other subfields in the APN field can refer to the relevant document (draft-li-apn-header-03-Application-aware Networking (APN) Header), and the embodiments of the present application will not be repeated here.
  • the implementation of the network device 3 sending the message 21 to the network device 4 includes: in response to the network device 3 receiving the message belonging to the service flow 2, or the service flow 2 having packet loss on the network device 3, the network device 3 sends the message 21 to the network device 4. That is, the network device 3 can send the message 21 to the network device 4 under the trigger of the first packet of the service flow 2, or the network device 3 can send the message 21 to the network device 4 under the trigger of the packet loss of the service flow 2.
  • Step 604 network device 4 performs traffic shaping on service flow 2 according to the traffic control requirement corresponding to service flow 2 , so that the sending rate of network device 4 for service flow 2 is less than or equal to the maximum receiving rate of network device 3 for service flow 2 .
  • the available buffer of port 4 of network device 4 is greater than the available buffer of port 3 of network device 3.
  • Port 4 is an egress port on network device 4 for forwarding service flow 2.
  • the flow control demand corresponding to service flow 2 includes the allocation buffer demand corresponding to service flow 2
  • one implementation manner of network device 4 performing flow shaping on service flow 2 according to the flow control demand corresponding to service flow 2 is that when the available buffer of the egress port on network device 4 for forwarding service flow 2 is greater than or equal to the allocation buffer demand corresponding to service flow 2, network device 4 performs flow shaping on service flow 2 according to the flow control demand corresponding to service flow 2.
  • the implementation manner of network device 4 performing flow shaping on service flow 2 according to the flow control demand corresponding to service flow 2 in this step 604 can refer to the implementation manner of network device 1 performing flow shaping on service flow 1 according to the flow control demand corresponding to service flow 1 in the above step 504, and the embodiments of the present application will not be repeated here.
  • the upstream device requested by the downstream device for collaborative traffic shaping may not meet the traffic control requirements of the downstream device, the upstream device may first determine whether it meets the traffic control requirements after receiving the traffic shaping request.
  • message 21 is a service message. After network device 4 receives message 21, if it determines that it meets the traffic control requirements of the downstream device for service flow 2, it deletes the traffic control requirements corresponding to service flow 2 in the APN parameter subfield of message 21, obtains message 22, and then network device 4 continues to forward message 22. This can avoid the subsequent network devices from misidentifying the traffic control requirements.
  • network device 4 After network device 4 performs traffic shaping on service flow 2 according to the traffic control requirement corresponding to service flow 2, when service flow 2 does not exist in the communication network, network device 4 ends traffic shaping on service flow 2. There are multiple ways to trigger network device 4 to end traffic shaping on service flow 2.
  • the network device 4 actively terminates traffic shaping for the service flow 2.
  • the network device 4 does not receive a message belonging to the service flow 2 within a target duration, the network device 4 terminates traffic shaping for the service flow 2.
  • the target duration may be an aging duration set in the network device 4.
  • the network device 4 by setting the aging time in the network device 4, when the network device 4 does not receive the message belonging to the service flow 2 within the aging time, the identification processing of the service flow 2 is terminated to release the processing resources in time.
  • the network device 2 can also delete the corresponding relationship between the identification of the service flow 2 and the flow control requirement stored to release the storage resources.
  • the network device 3 triggers the network device 4 to end the traffic shaping for the service flow 2.
  • the network device 3 sends the message 23 to the network device 4.
  • the message 23 is used to instruct the network device 4 to end the traffic shaping for the service flow 2.
  • the message 23 is a control message or a service message.
  • the implementation of the message 23 can refer to the implementation of the message 21, and the embodiment of the present application will not be repeated here.
  • the network device 4 sends the message 21 to the network device 5.
  • the network device 5 is located on the transmission path of the service flow 2, and the network device 4 is located downstream of the network device 5.
  • the network device 3 is an access layer device
  • the network device 4 is an aggregation layer device
  • the network device 5 is a core layer device.
  • the upstream device may continue to forward messages for requesting flow shaping to the upstream device to achieve diffusion transmission of flow shaping requirements.
  • the flow control requirement corresponding to the service flow 2 includes the allocation buffer requirement corresponding to the service flow 2
  • network device 4 uses When the available buffer of the outbound port forwarding service flow 2 is less than the allocated buffer requirement corresponding to service flow 2, network device 4 sends a request response message to network device 3, which is used to indicate that network device 4 cannot perform traffic shaping on service flow 2.
  • network device 4 only has 100M buffer for collaborative flow control, and has now helped 50 re-secured service flows to perform collaborative flow control. On average, each re-secured service flow consumes 2M buffer. If a new flow control collaborative request comes in, network device 4 may reject it.
  • the convergence ratio if the buffer convergence ratio on network device 4 is 2:1, then network device 4 can also accept multiple re-secured service flows with a total buffer consumption of no more than 100M.
  • the network device 3 may send a message 24 to the network device 6.
  • the message 24 includes the identifier of the service flow 2 and the traffic control requirement corresponding to the service flow 2.
  • the network device 6 is located on the transmission path of the service flow 2, and the network device 3 is located downstream of the network device 6.
  • the message 24 is used to request the network device 6 to perform traffic shaping on the service flow 2.
  • the message 24 is a control message or a service message.
  • the implementation method of the message 24 can refer to the implementation method of the message 21, and the embodiment of the present application will not be repeated here.
  • the downstream device when a downstream device fails to request an upstream device to perform traffic shaping on a service flow, the downstream device may select other upstream devices on the transmission path of the service flow to perform traffic shaping on the service flow.
  • a main collaborative flow control device and a backup collaborative flow control device may be configured in the downstream device.
  • the convergence layer device may be configured as the main collaborative flow control device
  • the core layer device may be configured as the backup collaborative flow control device.
  • the downstream device provides the flow control demand corresponding to the service flow to the upstream device to trigger the upstream device to perform flow shaping on the service flow according to the flow control demand.
  • the upstream device performs flow rate limiting on the re-secure service flow according to the flow control demand of the downstream device for the re-secure service flow, which can avoid packet loss caused by the buffer overflow of the downstream device due to the micro-burst of the re-secure service flow, thereby ensuring the transmission efficiency of the re-secure service flow.
  • the upstream device performs flow rate limiting on the non-re-secure service flow according to the flow control demand of the downstream device for the non-re-secure service flow, which can avoid the non-re-secure service flow occupying too much bandwidth resources and cache resources of the downstream device, and reserve more bandwidth resources and cache resources for the re-secure service flow, thereby ensuring the transmission efficiency of the re-secure service flow.
  • the present application realizes flow control by coordinating between the control device and multiple network devices in the communication network, which can improve the transmission stability of the re-secure service flow, thereby improving the transmission efficiency of the re-secure service flow.
  • the solution provided in the embodiment of the present application does not require management involvement during implementation and has high application flexibility.
  • Figure 11 is a schematic diagram of the implementation flow of another flow control method provided in an embodiment of the present application.
  • method 1100 includes but is not limited to steps 1101 to 1104.
  • the method 1100 is implemented based on the collaboration of the control plane or the forwarding plane, and can be applied to the application scenario shown in Figure 4.
  • a control device may not be set in the application scenario.
  • the network device 7 in the method 1100 is, for example, the network device 401C shown in Figure 4, and the network device 8 is, for example, the network device 401B or the network device 401A shown in Figure 4.
  • the network device 7 in the method 1100 is, for example, the network device 401B shown in Figure 4, and the network device 8 is, for example, the network device 401A shown in Figure 4.
  • Step 1101 Network device 7 obtains port information of network device 7, and network device 7 is located on the transmission path of service flow 3.
  • the port information of the network device 7 includes the port rate of the port 7.
  • the port 7 is an egress port on the network device 7 for forwarding the service flow 3.
  • the port information of the network device 7 also includes the available buffer of the port 7.
  • service flow 3 is any service flow in the communication network.
  • service flow 3 is a designated service flow in the communication network.
  • Service flow 3 may be a re-secured service flow, or service flow 2 may be a non-re-secured service flow.
  • service flow 3 reference may be made to the explanation of service flow 1 in step 501 above, and the present embodiment of the application will not be repeated here.
  • the implementation method of this step 1101 can refer to the implementation method of the above-mentioned step 601, and the embodiment of the present application will not be repeated here.
  • Step 1102 network device 7 sends message 31 to network device 8, message 31 includes the identifier of service flow 3 and port information of network device 7, the port information includes the port rate of port 7 on network device 7 used to forward service flow 3, and message 31 is used to request network device 8 to perform traffic shaping on service flow 3.
  • network device 8 is located on the transmission path of service flow 3, and network device 7 is located downstream of network device 8, that is, when service flow 3 is transmitted in the communication network, it first reaches network device 8 and then reaches network device 7.
  • network device 8 is an upstream device located on the transmission path of service flow 3
  • network device 7 is a downstream device located on the transmission path of service flow 3.
  • the identifier of service flow 3 can be represented by one or more of the five-tuple of service flow 3, or can be represented by an IPv4 flow identifier or an IPv6 flow identifier, or can be represented by an APN identifier.
  • network device 7 is an access layer device
  • network device 8 is a convergence layer device or a core layer device.
  • service flow 3 is a downstream flow
  • message 31 is an upstream message.
  • message 31 is a control message or a service message.
  • the implementation of message 31 may refer to the implementation of message 21.
  • the difference between message 31 and message 21 is that message 31 carries the port information of network device 7, replacing the flow control requirement corresponding to service flow 2 carried in message 21.
  • Step 1103 network device 8 determines the flow control requirement corresponding to service flow 3 according to the service requirement of service flow 3 and the port rate of port 7 on network device 7 used to forward service flow 3, and the flow control requirement includes the maximum receiving rate of network device 7 for service flow 3.
  • the maximum receiving rate of the network device 7 for the service flow 3 is less than or equal to the port rate of the port 7 of the network device 7.
  • the service demand of the service flow 3 can be carried in the message 31 and sent by the network device 7 to the network device 8.
  • the network device 8 can also obtain the service demand of the service flow 3 through other means.
  • the message belonging to the service flow 3 can carry the service demand.
  • the implementation method of this step 1103 can refer to the implementation method of the above-mentioned step 602, and the embodiment of the present application will not be repeated here.
  • Step 1104 network device 8 performs traffic shaping on service flow 3 according to the traffic control requirements corresponding to service flow 3 , so that the sending rate of network device 8 for service flow 3 is less than or equal to the maximum receiving rate of network device 7 for service flow 3 .
  • the implementation method of this step 1104 can refer to the implementation method of the above-mentioned step 604, and the embodiment of the present application will not be repeated here.
  • the network device 8 may forward the message 31 to the network device 9, or the network device 8 may also send the message 32 to the network device 9, the message 32 including the identifier of the service flow 3 and the flow control requirement corresponding to the service flow 3, so that the network device 9 does not need to calculate the flow control requirement corresponding to the service flow 3, and the processing resources of the network device can be saved.
  • the network device 9 is located on the transmission path of the service flow 3, and the network device 8 is located downstream of the network device 9.
  • the downstream device provides the upstream device with port information for calculating the flow control demand corresponding to the service flow, so as to trigger the upstream device to calculate the flow control demand corresponding to the service flow, and further perform flow shaping on the service flow according to the flow control demand.
  • the upstream device performs flow rate limiting on the re-protected service flow according to the flow control demand of the downstream device for the re-protected service flow, which can avoid packet loss caused by the buffer overflow of the downstream device due to the micro-burst of the re-protected service flow, thereby ensuring the transmission efficiency of the re-protected service flow.
  • the upstream device performs flow rate limiting on the non-re-protected service flow according to the flow control demand of the downstream device for the non-re-protected service flow, which can avoid the non-re-protected service flow from occupying too much bandwidth resources and cache resources of the downstream device, and reserve more bandwidth resources and cache resources for the re-protected service flow, thereby ensuring the transmission efficiency of the re-protected service flow.
  • the present application realizes flow control by coordinating between the control device and multiple network devices in the communication network, which can improve the transmission stability of the re-protected service flow, thereby improving the transmission efficiency of the re-protected service flow.
  • the solution provided in the embodiment of the present application does not require management involvement during implementation and has high application flexibility.
  • Fig. 12 is a flow chart of a flow control method provided by another embodiment of the present application.
  • the method can be specifically used to implement the above method 500, method 600 or method 1100. As shown in Fig. 12, the method includes the following steps 1201 to 1202.
  • Step 1201 The first network device obtains a flow control requirement corresponding to a target service flow, wherein the flow control requirement includes a maximum receiving rate of the second network device for the target service flow.
  • the first network device and the second network device are both located on a transmission path of the target service flow, and the second network device is located downstream of the first network device.
  • Step 1202 The first network device performs traffic shaping on the target service flow according to the traffic control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.
  • the first network device may be, for example, network device 1, the second network device may be, for example, network device 2, and the target service flow may be, for example, service flow 1.
  • the first network device may be, for example, network device 4, the second network device may be, for example, network device 3, and the target service flow may be, for example, service flow 2.
  • the first network device may be, for example, network device 8
  • the second network device may be, for example, network device 7, and the target service flow may be, for example, service flow 3.
  • the available cache of the first port of the first network device is larger than the available cache of the second port of the second network device, the first port is the egress port on the first network device for forwarding the target service flow, and the second port is the egress port on the second network device for forwarding the target service flow.
  • the traffic control requirement corresponding to the target service flow also includes an allocation cache requirement corresponding to the target service flow.
  • the implementation method of the first network device for traffic shaping the target service flow according to the traffic control requirement includes: when the actual cache of the target service flow on the first network device exceeds the allocation cache requirement, the first network device drops packets for the target service flow.
  • an implementation manner in which the first network device obtains a flow control requirement corresponding to a target service flow includes: the first network device receives a first message sent by a control device, the first message includes an identifier of the target service flow and a flow control requirement, and the first message is used to instruct the first network device to perform flow shaping on the target service flow.
  • This implementation manner is specifically used to implement the above method 500, and the first network device can be, for example, a network
  • the target service flow may be, for example, service flow 1
  • the first message may be, for example, message 11.
  • the method further includes: the first network device receives a second message sent by the control device, the second message being used to instruct the first network device to end traffic shaping for the target service flow.
  • the first network device may be, for example, network device 1
  • the target service flow may be, for example, service flow 1
  • the second message may be, for example, message 12.
  • the method further includes: the first network device sends port information to the control device, the port information including port rates of one or more ports on the first network device.
  • the first network device may be, for example, network device 1.
  • another implementation manner in which the first network device obtains the flow control requirement corresponding to the target service flow includes: the first network device receives a third message sent by the second network device, the third message includes an identifier of the target service flow and the flow control requirement, and the third message is used to request the first network device to perform flow shaping on the target service flow.
  • the first network device may be, for example, network device 4
  • the second network device may be, for example, network device 3
  • the target service flow may be, for example, service flow 2
  • the third message may be, for example, message 21.
  • the third message is a control message.
  • the third message is a BGP update message
  • the identifier and flow control requirement of the target service flow are in a path attribute field of the BGP update message.
  • the third message is a service message
  • the service message includes an APN field
  • the APN field includes an APN identification subfield and an APN parameter subfield
  • the identifier of the target service flow is in the APN identification subfield and/or the APN parameter subfield
  • the flow control requirement is in the APN parameter subfield.
  • the above method also includes: the first network device deletes the flow control requirement in the APN parameter subfield of the third message to obtain a fourth message; the first network device forwards the fourth message.
  • the first network device can be, for example, network device 4
  • the third message can be, for example, message 21
  • the fourth message can be, for example, message 22.
  • the APN field also carries a target indication, and the target indication is used to indicate that the APN parameter subfield includes a flow control requirement.
  • the APN field further includes a flag subfield and an APN parameter type subfield, and the target is indicated in the flag subfield and/or the APN parameter type subfield.
  • another implementation method for the first network device to obtain the flow control demand corresponding to the target business flow includes: the first network device receives a fifth message sent by the second network device, the fifth message includes the identifier of the target business flow and the port rate of the second port of the second network device, the second port is the egress port on the second network device for forwarding the target business flow, and the fifth message is used to request the first network device to perform traffic shaping on the target business flow; the first network device determines the flow control demand according to the business demand of the target business flow and the port rate of the second port, and the maximum receiving rate is less than or equal to the port rate of the second port.
  • the first network device can be, for example, network device 8
  • the second network device can be, for example, network device 7
  • the target business flow can be, for example, business flow 3
  • the fifth message can be, for example, message 31.
  • the business requirements include a transmission rate requirement for a target business flow
  • the first network device determines an implementation method for the flow control requirement based on the business requirements of the target business flow and the port rate of the second port, including: the first network device determines the maximum receiving rate based on the smaller value of the transmission rate requirement and the port rate of the second port.
  • the flow control requirement also includes an allocation cache requirement corresponding to the target business flow
  • the business requirement includes a delay requirement of the target business flow.
  • the first network device determines an implementation method for the flow control requirement based on the business requirement of the target business flow and the port rate of the second port, including: the first network device determines the allocation cache requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate, and the delay requirement.
  • the traffic control requirement includes an allocation buffer requirement corresponding to the target service flow
  • the implementation method of the first network device performing traffic shaping on the target service flow according to the traffic control requirement includes: when the available buffer of the egress port on the first network device used to forward the target service flow is greater than or equal to the allocation buffer requirement, the first network device performs traffic shaping on the target service flow according to the traffic control requirement.
  • the method further includes: when the available buffer of the egress port on the first network device for forwarding the target service flow is less than the allocated buffer requirement, the first network device sends a third message to a third network device, the third network device is located on the transmission path of the target service flow, and the first network device is located downstream of the third network device.
  • the first network device may be, for example, network device 4, the second network device may be, for example, network device 3, the third network device may be, for example, network device 5, the target service flow may be, for example, service flow 2, and the third message may be, for example, message 21.
  • the method further includes: when the available buffer of the egress port on the first network device for forwarding the target service flow is less than the allocated buffer requirement, the first network device sends a request response message to the second network device, and the request response message is used to indicate that the first network device cannot perform traffic shaping on the target service flow.
  • the first network device may be, for example, network device 4, the second network device may be, for example, network device 3, and the target service flow may be, for example, service flow 2.
  • the first network device may be, for example, network device 8
  • the second network device may be, for example, network device 7, and the target service flow may be, for example, service flow 3.
  • the method further includes: the first network device receives a sixth message sent by the second network device, the sixth message being used to instruct the first network device to end traffic shaping of the target service flow.
  • the first network device may be, for example, network device 4
  • the second network device may be, for example, network device 3
  • the target service flow may be, for example, service flow 2
  • the sixth message may be, for example, message 23.
  • the above method also includes: when the first network device does not receive a message belonging to the target service flow within the target time period, the first network device ends traffic shaping for the target service flow.
  • Fig. 13 is a flow chart of another flow control method provided by another embodiment of the present application.
  • the method can be specifically used to implement the above method 500. As shown in Fig. 13, the method includes the following steps 1301 to 1303.
  • Step 1301 the control device obtains port information of multiple network devices, the multiple network devices include a first network device and a second network device located on a transmission path of a target service flow, and the second network device is located downstream of the first network device, the port information of the first network device includes a port rate of a first port of the first network device, the port information of the second network device includes a port rate of a second port of the second network device, the first port is an egress port on the first network device for forwarding the target service flow, and the second port is an egress port on the second network device for forwarding the target service flow.
  • Step 1302 Based on the fact that the port rate of the second port is less than the port rate of the first port, the control device determines the flow control requirement corresponding to the target business flow according to the business requirements of the target business flow and the port rate of the second port.
  • the flow control requirement includes the maximum receiving rate of the second network device for the target business flow, and the maximum receiving rate is less than or equal to the port rate of the second port.
  • Step 1303 The control device sends a first message to the first network device.
  • the first message includes an identifier of a target service flow and a flow control requirement.
  • the first message is used to instruct the first network device to perform flow shaping on the target service flow.
  • the method is specifically used to implement the above method 500.
  • the first network device may be, for example, network device 1
  • the second network device may be, for example, network device 2
  • the target service flow may be, for example, service flow 1
  • the first message may be, for example, message 11.
  • the business requirements include a transmission rate requirement for a target business flow.
  • the control device determines an implementation method for the flow control requirement corresponding to the target business flow based on the business requirements of the target business flow and the port rate of the second port, including: the control device determines the maximum receiving rate based on the smaller value of the transmission rate requirement and the port rate of the second port.
  • the port information of the first network device also includes the available cache of the first port
  • the port information of the second network device also includes the available cache of the second port.
  • the implementation method of the control device sending the first message to the first network device includes: when the available cache of the first port is greater than the available cache of the second port, the control device sends the first message to the first network device.
  • the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow
  • the business requirement includes a delay requirement of the target business flow.
  • the control device determines the implementation method of the flow control requirement corresponding to the target business flow according to the business requirement of the target business flow and the port rate of the second port, including: the control device determines the allocation buffer requirement according to the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement.
  • the allocation buffer requirement is used by the first network device to drop packets for the target business flow when the actual cache of the target business flow exceeds the allocation buffer requirement.
  • the second network device is an access layer device
  • the first network device is a convergence layer device or a core layer device.
  • the first network device is a preconfigured network device for performing traffic shaping on a service flow passing through the first network device.
  • the first network device is a network device with the largest available buffer memory at an egress port for forwarding the target service flow among the network devices on the transmission path.
  • the second network device is a pre-configured network device with a flow control requirement
  • the second port is a pre-configured egress port with a flow control requirement
  • the above method also includes: the control device receives a traffic shaping request sent by the second network device, the traffic shaping request includes an identifier of the target service flow, and the traffic shaping request is used to request traffic shaping of the target service flow.
  • the method further includes: the control device receives a traffic shaping cancellation request sent by the second network device, the traffic shaping cancellation request is used to request to end traffic shaping of the target service flow; the control device sends a second message to the first network device, the second message is used to instruct the first network device to end traffic shaping of the target service flow.
  • the method is specifically used to implement the method 500, and the second message can be, for example, a message Article 12.
  • Step 1401 Acquire port information of a first network device, where the first network device is located on a transmission path of a target service flow.
  • the port information includes a port rate of a target port, where the target port is an egress port on the first network device for forwarding the target service flow.
  • Step 1402 determine the flow control requirement corresponding to the target business flow based on the business requirements and port rate of the target business flow, where the flow control requirement includes the maximum receiving rate of the first network device for the target business flow, which is less than or equal to the port rate.
  • the method can be applied to a control device
  • the first network device can be, for example, network device 2
  • the target service flow can be, for example, service flow 1.
  • the method can be applied to network device 3
  • the first network device can be, for example, network device 3
  • the target service flow can be, for example, service flow 2.
  • the method can be applied to network device 8
  • the first network device can be, for example, network device 7, and the target service flow can be, for example, service flow 3.
  • the business requirements include a transmission rate requirement for a target business flow.
  • an implementation method for the flow control requirement corresponding to the target business flow is determined, including: determining the maximum receiving rate based on the smaller value of the transmission rate requirement and the port rate.
  • the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow
  • the business requirement includes a delay requirement of the target business flow.
  • the implementation method of the flow control requirement corresponding to the target business flow is determined based on the business requirement and port rate of the target business flow, including: determining the allocation buffer requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement.
  • the allocation buffer requirement is used to drop packets for the target business flow when the actual cache of the target business flow exceeds the allocation buffer requirement.
  • the method is applied to a first network device, and after determining the flow control requirements corresponding to the target service flow according to the service requirements and port rate of the target service flow, the method further includes: sending a first message to a second network device, the first message including the identifier and flow control requirements of the target service flow, the second network device is located on the transmission path of the target service flow, and the first network device is located downstream of the second network device, and the first message is used to request the second network device to perform flow shaping on the target service flow.
  • the first network device can be, for example, network device 3
  • the second network device can be, for example, network device 4
  • the target service flow can be, for example, service flow 2
  • the first message can be, for example, message 21.
  • the implementation method of the first network device sending the first message to the second network device includes: in response to the first network device receiving a message belonging to a target service flow, or the target service flow losing packets on the first network device, the first network device sends the first message to the second network device.
  • the first message is a control message.
  • the first message is a BGP update message
  • the identifier and flow control requirement of the target service flow are in a path attribute field of the BGP update message.
  • the first message is a service message
  • the service message includes an APN field
  • the APN field includes an APN identification subfield and an APN parameter subfield
  • the identifier of the target service flow is in the APN identification subfield and/or the APN parameter subfield
  • the traffic control requirement is in the APN parameter subfield.
  • the APN field also carries an indication, which is used to indicate that the APN parameter subfield includes a flow control requirement.
  • the APN field also includes a flag subfield and an APN parameter type subfield, which is indicated in the flag subfield and/or the APN parameter type subfield.
  • the method further includes: the first network device receives a request response message corresponding to the first message sent by the second network device, the request response message is used to indicate that the second network device cannot perform traffic shaping on the target service flow; the first network device sends a second message to a third network device, the second message includes an identifier of the target service flow and a traffic control requirement, the third network device is located on the transmission path of the target service flow, and the first network device is located downstream of the third network device, and the second message is used to request the first network device to perform traffic shaping on the target service flow.
  • the first network device can be, for example, network device 3
  • the second network device can be, for example, network device 4
  • the third network device can be, for example, network device 6
  • the target service flow can be, for example, service flow 2
  • the second message can be, for example, message 24.
  • the method further includes: when the first network device does not receive a message belonging to the target service flow within the target time length, the first network device sends a third message to the second network device, the third message is used to instruct the second network device to end traffic shaping for the target service flow.
  • the first network device can be, for example, network device 3
  • the second network device can be, for example, network device 4
  • the target service flow can be, for example, service flow 2
  • the third message can be, for example, message 23.
  • Fig. 15 is a flow chart of another flow control method provided by another embodiment of the present application. The method can be specifically used to implement the above method 1100. As shown in Fig. 15, the method includes the following steps 1501 to 1502.
  • Step 1501 The first network device obtains port information of the first network device, where the first network device is located on a transmission path of a target service flow.
  • the port information includes a port rate of a target port, where the target port is an egress port on the first network device for forwarding the target service flow.
  • Step 1502 The first network device sends a target message to the second network device, where the target message includes an identifier of a target service flow and the port information.
  • the second network device is located on a transmission path of the target service flow, and the first network device is located downstream of the second network device.
  • the target message is used to request the second network device to perform traffic shaping on the target service flow.
  • the method is specifically used to implement the above method 1100.
  • the first network device may be, for example, network device 7
  • the second network device may be, for example, network device 8
  • the target service flow may be, for example, service flow 3
  • the target message may be, for example, message 31.
  • the target message is a BGP update message
  • the identifier and port information of the target service flow are in a path attribute field of the BGP update message.
  • the target message is a service message
  • the service message includes an APN field
  • the APN field includes an APN identification subfield and an APN parameter subfield
  • the identifier of the target service flow is in the APN identification subfield and/or the APN parameter subfield
  • the port information is in the APN parameter subfield.
  • the APN field also carries a target indication, and the target indication is used to indicate that the APN parameter subfield includes port information.
  • the APN field further includes a flag subfield and an APN parameter type subfield, and the target is indicated in the flag subfield and/or the APN parameter type subfield.
  • FIG16 is a schematic diagram of the structure of a flow control device provided in an embodiment of the present application.
  • the device is applied to a first network device.
  • the device 1600 includes but is not limited to: an acquisition module 1601 and a flow shaping module 1602.
  • the device 1600 further includes a sending module 1603 and/or a deleting module 1604.
  • the acquisition module 1601 includes a receiving module, and the acquisition module 1601 may also include a determining module.
  • the acquisition module 1601 is used to obtain the flow control requirement corresponding to the target service flow, the flow control requirement includes the maximum receiving rate of the second network device for the target service flow, the first network device and the second network device are both located on the transmission path of the target service flow, and the second network device is located downstream of the first network device.
  • the specific implementation process can refer to the detailed description of step 503 in method 500, or the detailed description of step 603 in method 600, or the detailed description of steps 1102 to 1103 in method 1100, which will not be repeated here.
  • the traffic shaping module 1602 is used to perform traffic shaping on the target service flow according to the traffic control requirement so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.
  • the specific implementation process can refer to the detailed description of step 504 in method 500, or the detailed description of step 604 in method 600, or the detailed description of step 1104 in method 1100, which will not be repeated here.
  • the available cache of the first port of the first network device is larger than the available cache of the second port of the second network device, the first port is the egress port on the first network device for forwarding the target service flow, and the second port is the egress port on the second network device for forwarding the target service flow.
  • the traffic control requirement also includes an allocation buffer requirement corresponding to the target service flow
  • the traffic shaping module 1602 is used to: when the actual buffer of the target service flow on the first network device exceeds the allocation buffer requirement, drop packets of the target service flow.
  • the receiving module is used to receive a first message sent by the control device, the first message includes an identifier of a target service flow and a flow control requirement, and the first message is used to instruct the first network device to perform flow shaping on the target service flow.
  • the receiving module is further used to receive a second message sent by the control device, where the second message is used to instruct the first network device to end traffic shaping for the target service flow.
  • the sending module 1603 is used to send port information to the control device, where the port information includes port rates of one or more ports on the first network device.
  • the receiving module is used to receive a third message sent by the second network device, the third message includes an identifier of the target service flow and a flow control requirement, and the third message is used to request the first network device to perform flow shaping on the target service flow.
  • the third message is a control message.
  • the third message is a BGP update message
  • the identifier and flow control requirement of the target service flow are in a path attribute field of the BGP update message.
  • the third message is a service message
  • the service message includes an APN field
  • the APN field includes an APN identification subfield and an APN parameter subfield
  • the identifier of the target service flow is in the APN identification subfield and/or the APN parameter subfield
  • the flow control requirement is in the APN parameter subfield.
  • the deleting module 1604 is used to delete the flow control requirement in the APN parameter subfield of the third message to obtain a fourth message
  • the sending module 1603 is used to forward the fourth message.
  • the APN field also carries a target indication, and the target indication is used to indicate that the APN parameter subfield includes a flow control requirement.
  • the APN field further includes a flag subfield and an APN parameter type subfield, and the target is indicated in the flag subfield and/or the APN parameter type subfield.
  • the receiving module is used to receive a fifth message sent by the second network device, the fifth message includes an identifier of the target business flow and a port rate of a second port of the second network device, the second port is an egress port on the second network device for forwarding the target business flow, and the fifth message is used to request the first network device to perform traffic shaping on the target business flow; the determining module is used to determine the flow control requirement based on the business requirement of the target business flow and the port rate of the second port, and the maximum receiving rate is less than or equal to the port rate of the second port.
  • the service requirement includes a transmission rate requirement of the target service flow
  • the determination module is used to determine the maximum receiving rate according to a smaller value between the transmission rate requirement and the port rate of the second port.
  • the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow, and the business requirement includes a delay requirement of the target business flow.
  • the determination module is used to determine the allocation buffer requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement.
  • the flow control requirement includes an allocation buffer requirement corresponding to the target service flow
  • the traffic shaping module 1602 is used to perform traffic shaping on the target service flow according to the flow control requirement when the available buffer of the egress port on the first network device used to forward the target service flow is greater than or equal to the allocation buffer requirement.
  • the sending module 1603 is used to send a third message to a third network device when the available cache of the egress port on the first network device for forwarding the target business flow is less than the allocated cache requirement, and the third network device is located on the transmission path of the target business flow and the first network device is located downstream of the third network device.
  • the sending module 1603 is used to send a request response message to the second network device when the available cache of the egress port on the first network device used to forward the target service flow is less than the allocated cache requirement, and the request response message is used to indicate that the first network device cannot perform traffic shaping on the target service flow.
  • the receiving module is further used to receive a sixth message sent by the second network device, where the sixth message is used to instruct the first network device to end traffic shaping for the target service flow.
  • the traffic shaping module 1602 is further configured to terminate traffic shaping of the target service flow when the first network device does not receive a message belonging to the target service flow within a target time period.
  • FIG17 is a schematic diagram of the structure of another flow control device provided in an embodiment of the present application.
  • the device is applied to a control device.
  • the device 1700 includes but is not limited to: an acquisition module 1701, a determination module 1702, and a sending module 1703.
  • the device 1700 also includes a receiving module 1704.
  • the acquisition module 1701 is used to acquire port information of multiple network devices, the multiple network devices include a first network device and a second network device located on the transmission path of the target service flow, and the second network device is located downstream of the first network device, the port information of the first network device includes the port rate of the first port of the first network device, the port information of the second network device includes the port rate of the second port of the second network device, the first port is an egress port on the first network device for forwarding the target service flow, and the second port is an egress port on the second network device for forwarding the target service flow.
  • the specific implementation process can refer to the detailed description of step 501 in method 500, which will not be repeated here.
  • the determination module 1702 is used to determine the flow control requirement corresponding to the target service flow based on the port rate of the second port being less than the port rate of the first port, according to the service demand of the target service flow and the port rate of the second port, the flow control requirement includes the maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate of the second port.
  • the specific implementation process can refer to the detailed description of step 502 in method 500, which will not be repeated here.
  • the sending module 1703 is used to send a first message to the first network device, the first message includes the identifier of the target service flow and the flow control requirement, and the first message is used to instruct the first network device to perform flow shaping on the target service flow.
  • the specific implementation process can refer to the detailed description of step 503 in method 500, which will not be repeated here.
  • the service requirement includes a transmission rate requirement of the target service flow
  • the determination module 1702 is configured to determine the maximum receiving rate according to a smaller value between the transmission rate requirement and the port rate of the second port.
  • the port information of the first network device also includes the available cache of the first port
  • the port information of the second network device also includes the available cache of the second port.
  • the sending module 1703 is used to send the first message to the first network device when the available cache of the first port is greater than the available cache of the second port.
  • the flow control requirement also includes an allocation buffer requirement corresponding to the target service flow, and the service requirement includes a delay requirement of the target service flow.
  • Determination module 1702 is used to: determine the allocation buffer requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement, and the allocation buffer requirement is used for the first network device to drop packets for the target business flow when the actual cache of the target business flow exceeds the allocation buffer requirement.
  • the second network device is an access layer device
  • the first network device is a convergence layer device or a core layer device.
  • the first network device is a preconfigured network device for performing traffic shaping on a service flow passing through the first network device.
  • the first network device is a network device with the largest available buffer memory at an egress port for forwarding the target service flow among the network devices on the transmission path.
  • the second network device is a pre-configured network device with a flow control requirement
  • the second port is a pre-configured egress port with a flow control requirement
  • the receiving module 1704 is used to receive a traffic shaping request sent by the second network device before the control device sends a first message to the first network device, the traffic shaping request includes an identifier of a target service flow, and the traffic shaping request is used to request traffic shaping of the target service flow.
  • the receiving module 1704 is also used to receive a traffic shaping cancellation request sent by the second network device, and the traffic shaping cancellation request is used to request to end traffic shaping of the target business flow; the sending module is also used to send a second message to the first network device, and the second message is used to instruct the first network device to end traffic shaping of the target business flow.
  • Fig. 18 is a schematic diagram of the structure of another flow control device provided in an embodiment of the present application.
  • the device 1800 includes but is not limited to: an acquisition module 1801 and a determination module 1802.
  • the device 1800 also includes a sending module 1803 and a receiving module 1804.
  • the acquisition module 1801 is used to acquire the port information of the first network device, the first network device is located on the transmission path of the target service flow, the port information includes the port rate of the target port, and the target port is the egress port on the first network device for forwarding the target service flow.
  • the specific implementation process can refer to the detailed description of step 501 in method 500, or the detailed description of step 601 in method 600, or the detailed description of step 1101 in method 1100, which will not be repeated here.
  • the determination module 1802 is used to determine the flow control requirement corresponding to the target service flow according to the service requirement and the port rate of the target service flow, and the flow control requirement includes the maximum receiving rate of the first network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate.
  • the specific implementation process can refer to the detailed description of step 502 in method 500, or the detailed description of step 602 in method 600, or the detailed description of step 1103 in method 1100, which will not be repeated here.
  • the service requirement includes a transmission rate requirement of the target service flow
  • the determination module 1802 is used to determine the maximum receiving rate according to a smaller value between the transmission rate requirement and the port rate.
  • the flow control requirement also includes an allocation buffer requirement corresponding to the target business flow
  • the business requirement includes a delay requirement of the target business flow.
  • Determination module 1802 is used to determine the allocation buffer requirement based on the round-trip delay between the sending end of the target business flow and the receiving end of the target business flow, the maximum receiving rate and the delay requirement.
  • the allocation buffer requirement is used to drop packets for the target business flow when the actual cache of the target business flow exceeds the allocation buffer requirement.
  • the device is applied to a first network device, and the sending module 1803 is used to send a first message to a second network device after determining the flow control requirement corresponding to the target business flow according to the business requirements and port rate of the target business flow, wherein the first message includes the identifier and flow control requirement of the target business flow, the second network device is located on the transmission path of the target business flow, and the first network device is located downstream of the second network device, and the first message is used to request the second network device to perform flow shaping on the target business flow.
  • the specific implementation process can refer to the detailed description of step 603 in method 600, which will not be repeated here.
  • the sending module 1803 is configured to send a first message to the second network device in response to the first network device receiving a message belonging to the target service flow, or packet loss of the target service flow occurring on the first network device.
  • the first message is a control message.
  • the first message is a BGP update message
  • the identifier and flow control requirement of the target service flow are in a path attribute field of the BGP update message.
  • the first message is a service message
  • the service message includes an APN field
  • the APN field includes an APN identification subfield and an APN parameter subfield
  • the identifier of the target service flow is in the APN identification subfield and/or the APN parameter subfield
  • the traffic control requirement is in the APN parameter subfield.
  • the APN field also carries an indication, which is used to indicate that the APN parameter subfield includes a flow control requirement.
  • the APN field also includes a flag subfield and an APN parameter type subfield, which is indicated in the flag subfield and/or the APN parameter type subfield.
  • the receiving module 1804 is used to receive a request response message corresponding to a first message sent by the second network device, and the request response message is used to indicate that the second network device cannot perform traffic shaping on the target business flow; the sending module 1803 is also used to send a second message to a third network device, and the second message includes an identifier and a traffic control requirement of the target business flow.
  • the third network device is located on the transmission path of the target business flow, and the first network device is located downstream of the third network device.
  • the second message is used to request the first network device to perform traffic shaping on the target business flow.
  • the sending module 1803 is also used to send a third message to the second network device when the first network device does not receive a message belonging to the target service flow within the target time period, and the third message is used to instruct the second network device to end traffic shaping for the target service flow.
  • Fig. 19 is a schematic diagram of the structure of another flow control device provided in an embodiment of the present application.
  • the device 1900 includes but is not limited to: an acquisition module 1901 and a sending module 1902 .
  • the acquisition module 1901 is used to acquire the port information of the first network device, the first network device is located on the transmission path of the target service flow, the port information includes the port rate of the target port, and the target port is the egress port on the first network device for forwarding the target service flow.
  • the specific implementation process can refer to the detailed description of step 1101 in method 1100, which will not be repeated here.
  • the sending module 1902 is used to send a target message to the second network device, the target message includes the identifier and port information of the target service flow, the second network device is located on the transmission path of the target service flow and the first network device is located downstream of the second network device, and the target message is used to request the second network device to perform traffic shaping on the target service flow.
  • the target message includes the identifier and port information of the target service flow
  • the second network device is located on the transmission path of the target service flow and the first network device is located downstream of the second network device
  • the target message is used to request the second network device to perform traffic shaping on the target service flow.
  • the sending module 1902 is configured to send a target message to the second network device in response to the first network device receiving a message belonging to the target service flow, or packet loss of the target service flow occurring on the first network device.
  • the target message is a BGP update message
  • the identifier and port information of the target service flow are in a path attribute field of the BGP update message.
  • the target message is a service message
  • the service message includes an APN field
  • the APN field includes an APN identification subfield and an APN parameter subfield
  • the identifier of the target service flow is in the APN identification subfield and/or the APN parameter subfield
  • the port information is in the APN parameter subfield.
  • the APN field also carries a target indication, and the target indication is used to indicate that the APN parameter subfield includes port information.
  • the APN field further includes a flag subfield and an APN parameter type subfield, and the target is indicated in the flag subfield and/or the APN parameter type subfield.
  • Fig. 20 is a schematic diagram of the hardware structure of a network device provided in an embodiment of the present application.
  • the network device 2000 includes a processor 2001, a forwarding chip 2002 and at least one network interface 2003.
  • the network device 2000 in Fig. 20 is any network device 401 shown in Fig. 4.
  • processor 2001 includes a central processing unit (CPU) and/or a dedicated hardware chip.
  • CPU refers to a general-purpose CPU with high scalability and flexibility.
  • the CPU is, for example, a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
  • the dedicated hardware chip is a high-performance processing hardware module.
  • the dedicated hardware chip includes at least one of an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a network processor (NP).
  • ASIC application-specific integrated circuit
  • FPGA field-programmable gate array
  • NP network processor
  • the forwarding chip 2002 is used to forward requests and data.
  • the forwarding chip 2002 is used for the network device 2000 to send and receive messages.
  • At least one network interface 2003 includes, for example, network interface 1, network interface 2, network interface 3, ... network interface n in FIG. 20.
  • Network interface 2003 uses any transceiver-like device for communicating with other devices or communication networks.
  • network interface 1 in FIG. 20 communicates with a control device
  • network interface 2 in FIG. 20 communicates with other network devices.
  • network interface 2003 includes at least one of a wired network interface or a wireless network interface.
  • the wired network interface is, for example, an Ethernet interface.
  • the Ethernet interface is, for example, an optical interface, an electrical interface, or a combination thereof.
  • the wireless network interface is, for example, a wireless local area network (WLAN) interface, a cellular network interface, or a combination thereof, etc.
  • WLAN wireless local area network
  • At least one network interface 2003 is connected to the forwarding chip 2002, and the forwarding chip 2002 is connected to the processor 2001 via an internal connection 2004.
  • the internal connection 2004 includes a path for transmitting data between the network interface 2003, the forwarding chip 2002, and the processor 2001.
  • the internal connection 2004 is a single board or a bus.
  • the internal connection 2004 is Ethernet, fiber channel, PCI-E (peripheral component interconnect express, PCI Express, a high-speed serial computer bus), RapidIO (a high-performance, low-pin data, packet-switched interconnect architecture), InfiniBand, or the XAUI bus (an interface extender that connects the Ethernet Media Access Control (MAC) layer to the physical layer).
  • PCI-E peripheral component interconnect express
  • PCI Express high-speed serial computer bus
  • RapidIO a high-performance, low-pin data, packet-switched interconnect architecture
  • InfiniBand or the XAUI bus (an interface extender that connects the Ethernet Media Access Control (MAC) layer to the physical layer
  • the network device 2000 further includes a content addressable memory (CAM) 2005.
  • the CAM 2005 is, for example, a ternary content addressable memory (TCAM).
  • TCAM ternary content addressable memory
  • the CAM 2005 is, for example, used to store and record the correspondence between the service flow identifier and the flow control requirement.
  • the CAM 2005 exists independently and is connected to the forwarding chip 2002 through the internal connection 2004.
  • the CAM 2005 and the forwarding chip 2002 are integrated together, that is, the CAM 2005 serves as a memory inside the forwarding chip 2002.
  • the network device 2000 further includes a memory 2006.
  • the memory 2006 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code 2008 in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
  • the memory 2006 is, for example, independent and connected to the processor 2001 through the internal connection 2004. Alternatively, the memory 2006 and the processor 2001 are integrated together.
  • the memory 2006 stores an operating system 2007 and a program code 2008.
  • the processor 2001 reads the operating system 2007 from the memory 2006 and runs the operating system 2007.
  • the processor 2001 also reads the program code 2008 from the memory 2006, and implements the actions performed by any network device in the above method provided in the embodiment of the present application by running the program code 2008 on the operating system 2007.
  • the above devices are respectively arranged on independent chips, or at least partially or completely arranged on the same chip. Whether each device is independently arranged on different chips or integrated on one or more chips often depends on the needs of product design.
  • the embodiments of the present application do not limit the specific implementation form of the above devices.
  • FIG21 is a schematic diagram of the hardware structure of a control device provided in an embodiment of the present application.
  • the control device 2100 includes a processor 2101 and a memory 2102, and the memory 2101 is connected to the memory 2102 via a bus 2103.
  • FIG21 illustrates the processor 2101 and the memory 2102 independently of each other.
  • the processor 2101 and the memory 2102 are integrated together.
  • the control device 2100 in FIG21 is the control device 402 shown in FIG4.
  • the memory 2102 is used to store computer programs, including operating systems and program codes.
  • the memory 2102 is a storage medium of various types, such as ROM, RAM, EEPROM, CD-ROM, flash memory, optical storage, register, optical disk storage, optical disk storage, magnetic disk or other magnetic storage device.
  • the processor 2101 is a general-purpose processor or a special-purpose processor.
  • the processor 2101 may be a single-core processor or a multi-core processor.
  • the processor 2101 includes at least one circuit to execute the actions executed by the control device in the above method 500 provided in the embodiment of the present application.
  • control device 2100 further includes a network interface 2104, which is connected to the processor 2101 and the memory 2102 via the bus 2103.
  • the network interface 2104 enables the control device 2100 to communicate with the network device.
  • the processor 2101 can interact with the network device through the network interface 2104 to control and manage the network device.
  • control device 2100 further includes an input/output (I/O) interface 2105, which is connected to the processor 2101 and the memory 2102 via the bus 2103.
  • the processor 2101 can receive input commands or data, etc. via the I/O interface 2105.
  • the I/O interface 2105 is used to connect the control device 2100 to input devices, such as keyboards, mice, etc.
  • the above-mentioned network interface 2104 and the I/O interface 2105 are collectively referred to as communication interfaces.
  • control device 2100 further includes a display 2106, which is connected to the processor 2101 and the memory 2102 via the bus 2103.
  • the display 2106 can be used to display the intermediate results and/or final results generated by the processor 2101 executing the above method.
  • the display 2106 is a touch display screen to provide a human-computer interaction interface.
  • the bus 2103 is any type of communication bus for interconnecting the internal devices of the control device 2100.
  • a system bus for example, a system bus.
  • the embodiment of the present application takes the interconnection of the above-mentioned devices inside the control device 2100 through the bus 2103 as an example.
  • the above-mentioned devices inside the control device 2100 are connected to each other in a communication manner other than the bus 2103, for example, the above-mentioned devices inside the control device 2100 are interconnected through a logical interface inside the control device 2100.
  • the above devices can be arranged on independent chips, or at least partially or completely on the same chip. Whether to arrange each device on different chips independently or to integrate them on one or more chips often depends on the needs of product design.
  • the embodiments of the present application do not limit the specific implementation form of the above-mentioned device.
  • the control device 2100 shown in Figure 21 is merely exemplary. During implementation, the control device 2100 includes other components, which are not listed here.
  • the control device 2100 shown in Figure 21 can implement flow control by executing steps 501 to 503 in the method 500 provided in the above embodiment.
  • the embodiment of the present application provides a flow control system, including: a control device and multiple network devices.
  • the control device is used to obtain port information of multiple network devices, the multiple network devices include a first network device and a second network device located on the transmission path of the target service flow, and the second network device is located downstream of the first network device, the port information of the first network device includes the port rate of the first port of the first network device, the port information of the second network device includes the port rate of the second port of the second network device, the first port is the egress port on the first network device for forwarding the target service flow, and the second port is the egress port on the second network device for forwarding the target service flow.
  • the control device is also used to determine the flow control requirement corresponding to the target service flow according to the service requirement of the target service flow and the port rate of the second port when the port rate of the second port is less than the port rate of the first port, the flow control requirement includes the maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate of the second port.
  • the control device is also used to send a message to the first network device, the message includes the identifier of the target service flow and the flow control requirement, and the message is used to instruct the first network device to perform flow shaping on the target service flow.
  • the first network device is used to perform traffic shaping on the target service flow according to the traffic control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.
  • control device in the traffic control system may be the control device in the above method 500
  • the first network device may be the network device 1 in the above method 500
  • the second network device may be the network device 2 in the above method 500 .
  • the embodiment of the present application also provides another flow control system, including: multiple network devices, the multiple network devices include a first network device and a second network device, the first network device and the second network device are both located on the transmission path of the target service flow, and the second network device is located downstream of the first network device.
  • the second network device is used to obtain the port information of the second network device, the port information includes the port rate of the target port, and the target port is the egress port on the second network device for forwarding the target service flow.
  • the second network device is also used to determine the flow control requirement corresponding to the target service flow according to the service demand and port rate of the target service flow, the flow control requirement includes the maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate.
  • the second network device is also used to send a message to the first network device, the message includes the identifier of the target service flow and the flow control requirement, and the message is used to request the first network device to perform flow shaping on the target service flow.
  • the first network device is used to perform flow shaping on the target service flow according to the flow control requirement, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.
  • the first network device in the traffic control system may be the network device 4 in the above method 600
  • the second network device may be the network device 3 in the above method 600 .
  • the embodiment of the present application also provides another flow control system, including: multiple network devices, the multiple network devices include a first network device and a second network device, the first network device and the second network device are both located on the transmission path of the target service flow, and the second network device is located downstream of the first network device.
  • the second network device is used to obtain the port information of the second network device, the port information includes the port rate of the target port, and the target port is the egress port on the second network device for forwarding the target service flow.
  • the second network device is also used to send a message to the first network device, the message includes the identifier and port information of the target service flow, and the message is used to request the first network device to perform traffic shaping on the target service flow.
  • the first network device is used to determine the flow control demand corresponding to the target service flow according to the service demand and port rate of the target service flow, the flow control demand includes the maximum receiving rate of the second network device for the target service flow, and the maximum receiving rate is less than or equal to the port rate.
  • the first network device is also used to perform traffic shaping on the target service flow according to the flow control demand, so that the sending rate of the first network device for the target service flow is less than or equal to the maximum receiving rate.
  • the first network device in the traffic control system may be the network device 8 in the above method 1100
  • the second network device may be the network device 7 in the above method 1100 .
  • a and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone.
  • the character "/" in this article generally indicates that the associated objects before and after are in an "or" relationship.
  • the information including but not limited to user device information, user personal information, etc.
  • data including but not limited to data used for analysis, stored data, displayed data, etc.
  • signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

Landscapes

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

Abstract

本申请公开了一种流量控制方法、装置及系统,属于网络技术领域。第一网络设备获取目标业务流对应的流量控制需求。该流量控制需求包括第二网络设备针对目标业务流的最大接收速率。第一网络设备和第二网络设备均位于目标业务流的传输路径上、且第二网络设备位于第一网络设备的下游。第一网络设备根据该流量控制需求对目标业务流进行流量整形,以使第一网络设备针对目标业务流的发送速率小于或等于该最大接收速率。通过上游设备根据下游设备的流量控制需求对业务流进行流量限速,以达到流量控制的效果,可以减少由于微突发流导致下游设备的缓存溢出所导致的丢包。通过网络级协同流量控制提高业务传输的稳定性,从而可以提高业务传输效率。

Description

流量控制方法、装置及系统
本申请要求于2023年03月22日提交的申请号为202310319186.6、发明名称为“一种网络级流控以解决小buffer设备在微突发场景下丢包的方案”,以及于2023年05月29日提交的申请号为202310619163.7、发明名称为“流量控制方法、装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及网络技术领域,特别涉及一种流量控制方法、装置及系统。
背景技术
微突发流量(英文:short-term bursts or micro bursts)是网络中一种常见的流量,通常指持续时间很短的突发流量(英文:burst traffic or burst flow or bursts)。对突发流量的具体解释可参考编号为8033的请求评论(request for comments,RFC)(简称:RFC 8033)文档。当网络中出现微突发流量时,可能会造成网络设备上缓存(英文:buffer)瞬时的溢出进而导致丢包,从而影响业务传输效率。
发明内容
本申请提供了一种流量控制方法、装置及系统,可以解决由于网络中微突发流量的出现影响业务传输效率的问题。
第一方面,提供了一种流量控制方法。该方法包括:第一网络设备获取目标业务流对应的流量控制需求。该流量控制需求包括第二网络设备针对目标业务流的最大接收速率。第一网络设备和第二网络设备均位于目标业务流的传输路径上、且第二网络设备位于第一网络设备的下游。第一网络设备根据该流量控制需求对目标业务流进行流量整形,以使第一网络设备针对目标业务流的发送速率小于或等于该最大接收速率。
可选地,目标业务流是需要重要保障的业务流(简称重保业务流),比如为高优先级业务流。本申请中,通过上游设备根据下游设备针对重保业务流的流量控制需求对重保业务流进行流量限速,可以避免由于重保业务流的微突发导致下游设备的缓存溢出所导致的丢包,从而保障重保业务流的传输效率。
可选地,目标业务流是不需要重要保障的业务流(简称非重保业务流),比如为低优先级业务流。本申请中,通过上游设备根据下游设备针对非重保业务流的流量控制需求对非重保业务流进行流量限速,可以避免非重保业务流占用下游设备过多的带宽资源和缓存资源,预留更多的带宽资源和缓存资源给重保业务流,从而保障重保业务流的传输效率。
本申请通过网络级协同流量控制,由上游设备对重保业务流或非重保业务流进行流量限速,可以提高重保业务流的传输稳定性,从而可以提高重保业务流的传输效率。
可选地,第一网络设备的第一端口的可用缓存大于第二网络设备的第二端口的可用缓存,第一端口为第一网络设备上用于转发目标业务流的出端口,第二端口为第二网络设备上用于转发目标业务流的出端口。
由于大缓存设备相较于小缓存设备能够缓存更多的流量,由上游的大缓存设备对业务流进行削峰填谷,一方面可以避免在下游的小缓存设备上流量剧烈变化,减少下游的小缓存设备的丢包,使得业务流在经过小缓存设备之前,在经过大缓存设备时被大缓存设备提前进行限速整形,因此避免或缓解小缓存设备因微突发流丢包。另一方面上游的大缓存设备在进行流量限速时可以缓存更多的流量,微突发流量导致大缓存设备丢包的可能性比较小,因此可以避免或降低业务流量压抑而影响业务吞吐量的风险,从而提高业务体验。
可选地,流量控制需求还包括目标业务流对应的分配缓存需求,第一网络设备根据流量控制需求对目标业务流进行流量整形的实现方式,包括:当第一网络设备上目标业务流的实际缓存超出分配缓存需求时,第一网络设备对目标业务流进行丢包。
本申请中,第一网络设备在目标业务流的实际缓存超出该分配缓存需求时对目标业务流进行丢包,可以降低由于缓存过大对目标业务流的时延和抖动的影响,另外可以避免目标业务流消耗过多缓存资源。
第一种可能实现方式,第一网络设备获取目标业务流对应的流量控制需求,包括:第一网络设备接收控制设备发送的第一报文,第一报文包括目标业务流的标识和流量控制需求,第一报文用于指示第一网络设备对目标业务流进行流量整形。这种实现方式下,第一网络设备获取的流量控制需求是来自控制设备的,通过管理面协同实现上述流量控制方法。
可选地,在第一网络设备接收控制设备发送的第一报文之后,第一网络设备接收控制设备发送的第二报文,第二报文用于指示第一网络设备结束对目标业务流进行流量整形。
本申请中,第一网络设备可以在控制设备的控制下被动结束对目标业务流进行流量整形。
可选地,第一网络设备向控制设备发送端口信息,该端口信息包括第一网络设备上一个或多个端口的端口速率。该端口信息还可以包括第一网络设备上一个或多个端口的可用缓存。该一个或多个端口包括第一网络设备上用于转发目标业务流的第一端口。
第二种可能实现方式,第一网络设备获取目标业务流对应的流量控制需求,包括:第一网络设备接收第二网络设备发送的第三报文,第三报文包括目标业务流的标识和流量控制需求,第三报文用于请求第一网络设备对目标业务流进行流量整形。
这种实现方式下,第一网络设备获取的流量控制需求是来自第二网络设备的,通过控制面或转发面协同实现上述流量控制方法。
可选地,第三报文为控制报文。本申请可以通过控制面协同实现上述流量控制方法。
可选地,第三报文为边界网关协议(border gateway protocol,BGP)更新消息,目标业务流的标识和流量控制需求在BGP更新消息的路径属性字段中。
本申请中,网络设备之间通过扩展的BGP更新消息传递需要进行流量整形的业务流的标识以及该业务流对应的流量控制需求,无需设计新协议,实现简单。或者,网络设备之间也可以基于新设计的控制协议传递需要进行流量整形的业务流的标识以及该业务流对应的流量控制需求,协议扩展性更好,可以灵活扩展更多的策略。
可选地,第三报文为业务报文,业务报文包括应用感知网络(application-aware networking,APN)字段,APN字段包括APN标识子字段和APN参数子字段,目标业务流的标识在APN标识子字段和/或APN参数子字段中,流量控制需求在APN参数子字段中。第一网络设备在接收到第三报文之后,可以删除第三报文的APN参数子字段中的流量控制需求,得到第四报文。然后第一网络设备转发第四报文。
本申请可以通过转发面协同实现上述流量控制方法。网络设备通过在业务报文传递需要进行流量整形的业务流的标识以及该业务流对应的流量控制需求,例如需要进行流量整形的业务流为下行流,则网络设备可以在上行的业务报文中携带该业务流的标识以及该业务流对应的流量控制需求。这样无需在通信网络中传输额外的报文来传递信息,可以节约网络传输资源。另外,网络设备确定自身满足目标业务流对应的流量控制需求之后,删除接收到的业务报文的APN参数子字段中的流量控制需求之后进行转发,可以避免之后的网络设备对流量控制需求误识别。
可选地,APN字段还携带有目标指示,目标指示用于指示APN参数子字段包括流量控制需求。
可选地,APN字段还包括标志子字段和APN参数类型子字段,目标指示在标志子字段和/或APN参数类型子字段中。
第三种可能实现方式,第一网络设备获取目标业务流对应的流量控制需求,包括:第一网络设备接收第二网络设备发送的第五报文。第五报文包括目标业务流的标识和第二网络设备的第二端口的端口速率。第二端口为第二网络设备上用于转发目标业务流的出端口。第五报文用于请求第一网络设备对目标业务流进行流量整形。第一网络设备根据目标业务流的业务需求和第二端口的端口速率,确定流量控制需求。第二网络设备针对目标业务流的最大接收速率小于或等于第二端口的端口速率。
这种实现方式下,第一网络设备获取的流量控制需求是由第一网络设备根据第二网络设备提供的信息确定的。通过控制面或转发面协同实现上述流量控制方法。
可选地,目标业务流的业务需求包括目标业务流的传输速率需求,第一网络设备根据目标业务流的业务需求和第二端口的端口速率,确定流量控制需求的实现方式,包括:第一网络设备根据传输速率需求与第二端口的端口速率中的较小值确定最大接收速率。
在目标业务流为重保业务流的情况下,第一网络设备可以将传输速率需求与第二端口的端口速率中的较小值作为第二网络设备针对目标业务流的最大接收速率。本申请中,可以将第二网络设备针对目标业务 流的发送速率作为第二网络设备针对目标业务流的最大接收速率,这样可以使第一网络设备将目标业务流限速至最大为第二网络设备针对目标业务流的发送速率,从而使得第二网络设备对目标业务流的接收速率小于或等于发送速率,以避免目标业务流在第二网络设备上发生丢包。
可选地,目标业务流对应的流量控制需求还包括目标业务流对应的分配缓存需求,业务需求包括目标业务流的时延需求,第一网络设备根据目标业务流的业务需求和第二端口的端口速率,确定流量控制需求的实现方式,包括:第一网络设备根据目标业务流的发送端与目标业务流的接收端之间的往返时延、最大接收速率以及时延需求,确定分配缓存需求。
可选地,目标业务流对应的流量控制需求包括目标业务流对应的分配缓存需求,第一网络设备根据流量控制需求对目标业务流进行流量整形的实现方式,包括:当第一网络设备上用于转发目标业务流的出端口的可用缓存大于或等于该分配缓存需求时,第一网络设备根据该流量控制需求对目标业务流进行流量整形。
由于分布式控制方案中,可能出现下游设备所请求进行协同流量整形的上游设备无法满足下游设备的流量控制需求的情况,因此上游设备接收到流量整形请求之后,可以先进行判断自身是否满足流量控制需求。
可选地,当第一网络设备上用于转发目标业务流的出端口的可用缓存小于该分配缓存需求时,第一网络设备向第三网络设备发送第三报文。第三网络设备位于目标业务流的传输路径上、且第一网络设备位于第三网络设备的下游。
本申请中,当上游设备无法满足下游设备的流量控制需求时,该上游设备可以继续向上游设备转发用于请求流量整形的报文,以实现流量整形需求的扩散传递。
或者,当第一网络设备上用于转发目标业务流的出端口的可用缓存小于该分配缓存需求时,第一网络设备向第二网络设备发送请求应答报文,该请求应答报文用于指示第一网络设备无法对目标业务流进行流量整形。
可选地,第一网络设备接收第二网络设备发送的第六报文,第六报文用于指示第一网络设备结束对目标业务流进行流量整形。
本申请中,第一网络设备可以在第二网络设备的指示下被动结束对目标业务流进行流量整形。
可选地,当第一网络设备在目标时长内未接收到属于目标业务流的报文时,第一网络设备结束对目标业务流进行流量整形。该目标时长可以是在第一网络设备中设置的老化时长。
本申请中,第一网络设备可以主动结束对目标业务流进行流量整形。通过在第一网络设备中设置老化时长,当第一网络设备在老化时长内未接收到属于目标业务流的报文时,结束对目标业务流的识别处理,以及时释放处理资源。
第二方面,提供了一种流量控制方法。该方法包括:控制设备获取多个网络设备的端口信息。该多个网络设备包括位于目标业务流的传输路径上的第一网络设备和第二网络设备、且第二网络设备位于第一网络设备的下游。第一网络设备的端口信息包括第一网络设备的第一端口的端口速率。第二网络设备的端口信息包括第二网络设备的第二端口的端口速率。第一端口为第一网络设备上用于转发目标业务流的出端口。第二端口为第二网络设备上用于转发目标业务流的出端口。基于第二端口的端口速率小于第一端口的端口速率,控制设备根据目标业务流的业务需求和第二端口的端口速率,确定目标业务流对应的流量控制需求。该流量控制需求包括第二网络设备针对目标业务流的最大接收速率,该最大接收速率小于或等于第二端口的端口速率。控制设备向第一网络设备发送第一报文。第一报文包括目标业务流的标识和流量控制需求。第一报文用于指示第一网络设备对目标业务流进行流量整形。
本申请中,由控制设备选择上游设备对目标业务流进行流量整形。在目标业务流是重保业务流的情况下,通过上游设备根据下游设备针对重保业务流的流量控制需求对重保业务流进行流量限速,可以避免由于重保业务流的微突发导致下游设备的缓存溢出所导致的丢包,从而保障重保业务流的传输效率。在目标业务流是非重保业务流的情况下,通过上游设备根据下游设备针对非重保业务流的流量控制需求对非重保业务流进行流量限速,可以避免非重保业务流占用下游设备过多的带宽资源和缓存资源,预留更多的带宽资源和缓存资源给重保业务流,从而保障重保业务流的传输效率。本申请通过控制设备与通信网络中多个网络设备之间的协同实现流量控制,可以提高重保业务流的传输稳定性,从而可以提高重保业务流的传输 效率。
可选地,业务需求包括目标业务流的传输速率需求。控制设备根据目标业务流的业务需求和第二端口的端口速率,确定目标业务流对应的流量控制需求的实现方式,包括:控制设备根据传输速率需求与第二端口的端口速率中的较小值确定最大接收速率。
在目标业务流为重保业务流的情况下,控制设备可以将传输速率需求与第二端口的端口速率中的较小值作为第二网络设备针对目标业务流的最大接收速率。本申请中,可以将第二网络设备针对目标业务流的发送速率作为第二网络设备针对目标业务流的最大接收速率,这样可以使第一网络设备将目标业务流限速至最大为第二网络设备针对目标业务流的发送速率,从而使得第二网络设备对目标业务流的接收速率小于或等于发送速率,以避免目标业务流在第二网络设备上发生丢包。
可选地,第一网络设备的端口信息还包括第一端口的可用缓存,第二网络设备的端口信息还包括第二端口的可用缓存。控制设备向第一网络设备发送第一报文的实现方式,包括:当第一端口的可用缓存大于第二端口的可用缓存时,控制设备向第一网络设备发送第一报文。
本申请中,控制设备选择上游的大缓存设备对业务流进行流量整形,可以避免在下游的小缓存设备上流量剧烈变化,减少下游的小缓存设备的丢包,也就是说,业务流在经过小缓存设备之前,在经过大缓存设备时被大缓存设备提前进行限速整形,因此避免或缓解小缓存设备因微突发流丢包。另外,由于大缓存设备可以缓存更多的报文,因此可以更好地应对突发流量,相较于小缓存设备,大缓存设备在应对突发流量时的丢包风险更低,丢包数量更少,因此可以提高业务传输稳定性。
可选地,流量控制需求还包括目标业务流对应的分配缓存需求。目标业务流的业务需求包括目标业务流的时延需求。控制设备根据目标业务流的业务需求和第二端口的端口速率,确定目标业务流对应的流量控制需求的实现方式,包括:控制设备根据目标业务流的发送端与目标业务流的接收端之间的往返时延、第二网络设备针对目标业务流的最大接收速率以及目标业务流的时延需求,确定目标业务流对应的分配缓存需求。该分配缓存需求用于第一网络设备在目标业务流的实际缓存超出该分配缓存需求时对目标业务流进行丢包。
本申请中,通过设置目标业务流对应的分配缓存需求,使得第一网络设备在目标业务流的实际缓存超出该分配缓存需求时对目标业务流进行丢包,可以降低由于缓存过大对目标业务流的时延和抖动的影响,另外可以避免目标业务流消耗过多缓存资源。
第一种可能实现方式,第二网络设备为接入层设备,第一网络设备为汇聚层设备或核心层设备。由于通信网络中接入层设备的端口缓存相较于汇聚层设备和核心层设备的端口缓存往往更小,因此通常在下行通信场景中,接入层设备会有流量控制需求。这种实现方式通过在控制设备中预先配置策略来为接入层设备选择进行流量整形的上游设备,可以基本满足通信网络中的流量控制需求。
第二种可能实现方式,第一网络设备为预先配置的用于对流经第一网络设备的业务流进行流量整形的网络设备。这种实现方式,通过预先确定通信网络中用来为下游设备进行流量整形的网络设备,针对该网络设备提前做些配置,比如为该网络设备配置单板,该单板专用于端口缓存,这样该网络设备进行流量整形时,可以有尽可能多的缓存空间来缓存突发流量,从而降低丢包风险。
第三种可能实现方式,第一网络设备为传输路径上的网络设备中用于转发目标业务流的出端口的可用缓存最大的网络设备。这种实现方式下,控制设备通过选择有更多的缓存空间来缓存突发流量的网络设备进行流量整形,可以降低丢包风险。
可选地,第二网络设备为预先配置的、具有流量控制需求的网络设备,和/或,第二端口为预先配置的、具有流量控制需求的出端口。
本申请中,控制设备可以主动为第二网络设备选择进行流量整形的上游设备。
可选地,在控制设备向第一网络设备发送第一报文之前,控制设备接收第二网络设备发送的流量整形请求。该流量整形请求包括目标业务流的标识。该流量整形请求用于请求对目标业务流进行流量整形。
本申请中,控制设备可以在第二网络设备发送的流量整形请求的触发下,被动为第二网络设备选择针对目标业务流进行流量整形的上游设备。
可选地,控制设备接收第二网络设备发送的流量整形撤销请求,该流量整形撤销请求用于请求结束对目标业务流进行流量整形。控制设备向第一网络设备发送第二报文,第二报文用于指示第一网络设备结束对目标业务流进行流量整形。
本申请中,控制设备可以在第二网络设备发送的流量整形撤销请求的触发下,被动向第一网络设备发送结束对目标业务流进行流量整形的指示。
第三方面,提供了一种流量控制方法。该方法应用于网络设备或控制设备。该方法包括:获取第一网络设备的端口信息。第一网络设备位于目标业务流的传输路径上。该端口信息包括目标端口的端口速率。目标端口为第一网络设备上用于转发目标业务流的出端口。根据目标业务流的业务需求和端口速率,确定目标业务流对应的流量控制需求。该流量控制需求包括第一网络设备针对目标业务流的最大接收速率,该最大接收速率小于或等于端口速率。
本申请中,由下游设备向上游设备提供业务流对应的流量控制需求,以触发上游设备根据该流量控制需求对业务流进行流量整形。在目标业务流是重保业务流的情况下,通过上游设备根据下游设备针对重保业务流的流量控制需求对重保业务流进行流量限速,可以避免由于重保业务流的微突发导致下游设备的缓存溢出所导致的丢包,从而保障重保业务流的传输效率。在目标业务流是非重保业务流的情况下,通过上游设备根据下游设备针对非重保业务流的流量控制需求对非重保业务流进行流量限速,可以避免非重保业务流占用下游设备过多的带宽资源和缓存资源,预留更多的带宽资源和缓存资源给重保业务流,从而保障重保业务流的传输效率。本申请通过控制设备与通信网络中多个网络设备之间的协同实现流量控制,可以提高重保业务流的传输稳定性,从而可以提高重保业务流的传输效率。
可选地,目标业务流的业务需求包括目标业务流的传输速率需求,根据目标业务流的业务需求和端口速率,确定目标业务流对应的流量控制需求的实现方式,包括:根据目标业务流的传输速率需求与该端口速率中的较小值确定最大接收速率。
在目标业务流为重保业务流的情况下,第一网络设备可以将传输速率需求与第二端口的端口速率中的较小值作为第二网络设备针对目标业务流的最大接收速率。本申请中,可以将第一网络设备针对目标业务流的发送速率作为第一网络设备针对目标业务流的最大接收速率,这样可以使上游设备将目标业务流限速至最大为第一网络设备针对目标业务流的发送速率,从而使得第一网络设备对目标业务流的接收速率小于或等于发送速率,以避免目标业务流在第一网络设备上发生丢包。
可选地,目标业务流对应的流量控制需求还包括目标业务流对应的分配缓存需求,业务需求包括目标业务流的时延需求。根据目标业务流的业务需求和端口速率,确定目标业务流对应的流量控制需求的实现方式,包括:根据目标业务流的发送端与目标业务流的接收端之间的往返时延、最大接收速率以及时延需求,确定分配缓存需求,分配缓存需求用于在目标业务流的实际缓存超出分配缓存需求时对目标业务流进行丢包。
可选地,上述方法应用于第一网络设备。第一网络设备在根据目标业务流的业务需求和端口速率,确定目标业务流对应的流量控制需求之后,向第二网络设备发送第一报文,第一报文包括目标业务流的标识和流量控制需求,第二网络设备位于目标业务流的传输路径上、且第一网络设备位于第二网络设备的下游,第一报文用于请求第二网络设备对目标业务流进行流量整形。
本申请中,由具有流量控制需求的网络设备确定业务流对应的流量控制需求,然后向上游设备提供业务流对应的流量控制需求,以触发上游设备根据该流量控制需求对业务流进行流量整形。
可选地,第一网络设备向第二网络设备发送第一报文的实现方式,包括:响应于第一网络设备接收到属于目标业务流的报文,或者目标业务流在第一网络设备上发生丢包,向第二网络设备发送第一报文。
本申请中,第一网络设备可以在目标业务流的首包触发下向第二网络设备发送第一报文,或者第一网络设备可以在目标业务流的丢包触发下向第二网络设备发送第一报文。
可选地,第一报文为控制报文。
可选地,第一报文为BGP更新消息,目标业务流的标识和流量控制需求在BGP更新消息的路径属性字段中。
可选地,第一报文为业务报文,业务报文包括APN字段,APN字段包括APN标识子字段和APN参数子字段,目标业务流的标识在APN标识子字段和/或APN参数子字段中,流量控制需求在APN参数子字段中。
可选地,APN字段还携带有指示,该指示用于指示APN参数子字段包括流量控制需求。
可选地,APN字段还包括标志子字段和APN参数类型子字段,该指示在标志子字段和/或APN参数类型子字段中。
可选地,第一网络设备接收第二网络设备发送的第一报文对应的请求应答报文,该请求应答报文用于指示第二网络设备无法对目标业务流进行流量整形。第一网络设备向第三网络设备发送第二报文,第二报文包括目标业务流的标识和目标业务流对应的流量控制需求。第三网络设备位于目标业务流的传输路径上、且第一网络设备位于第三网络设备的下游,第二报文用于请求第一网络设备对目标业务流进行流量整形。
本申请中,当下游设备向上游设备请求对业务流进行流量整形失败时,下游设备可以选择该业务流的传输路径上的其他上游设备对该业务流进行流量整形。
可选地,当第一网络设备在目标时长内未接收到属于目标业务流的报文时,第一网络设备向第二网络设备发送第三报文,第三报文用于指示第二网络设备结束对目标业务流进行流量整形。
本申请中,第一网络设备可以主动向第二网络设备发送结束对目标业务流进行流量整形的报文,以指示第二网络设备结束对目标业务流进行流量整形。
第四方面,提供了一种流量控制方法。该方法包括:第一网络设备获取第一网络设备的端口信息。第一网络设备位于目标业务流的传输路径上。该端口信息包括目标端口的端口速率。目标端口为第一网络设备上用于转发目标业务流的出端口。第一网络设备向第二网络设备发送目标报文。目标报文包括目标业务流的标识和端口信息。第二网络设备位于目标业务流的传输路径上、且第一网络设备位于第二网络设备的下游。目标报文用于请求第二网络设备对目标业务流进行流量整形。
本申请中,由下游设备向上游设备提供用于计算业务流对应的流量控制需求的端口信息,以触发上游设备计算该业务流对应的流量控制需求,进一步根据该流量控制需求对业务流进行流量整形。在目标业务流是重保业务流的情况下,通过上游设备根据下游设备针对重保业务流的流量控制需求对重保业务流进行流量限速,可以避免由于重保业务流的微突发导致下游设备的缓存溢出所导致的丢包,从而保障重保业务流的传输效率。在目标业务流是非重保业务流的情况下,通过上游设备根据下游设备针对非重保业务流的流量控制需求对非重保业务流进行流量限速,可以避免非重保业务流占用下游设备过多的带宽资源和缓存资源,预留更多的带宽资源和缓存资源给重保业务流,从而保障重保业务流的传输效率。本申请通过控制设备与通信网络中多个网络设备之间的协同实现流量控制,可以提高重保业务流的传输稳定性,从而可以提高重保业务流的传输效率。
可选地,目标报文为控制报文。
可选地,目标报文为BGP更新消息,目标业务流的标识和端口信息在BGP更新消息的路径属性字段中。
可选地,目标报文为业务报文,业务报文包括APN字段,APN字段包括APN标识子字段和APN参数子字段,目标业务流的标识在APN标识子字段和/或APN参数子字段中,端口信息在APN参数子字段中。
可选地,APN字段还携带有目标指示,目标指示用于指示APN参数子字段包括端口信息。
可选地,APN字段还包括标志子字段和APN参数类型子字段,目标指示在标志子字段和/或APN参数类型子字段中。
第五方面,提供了一种流量控制装置,所述装置应用于第一网络设备,所述装置包括:获取模块,用于获取目标业务流对应的流量控制需求,所述流量控制需求包括第二网络设备针对所述目标业务流的最大接收速率,所述第一网络设备和所述第二网络设备均位于所述目标业务流的传输路径上、且所述第二网络设备位于所述第一网络设备的下游。流量整形模块,用于根据所述流量控制需求对所述目标业务流进行流量整形,以使所述第一网络设备针对所述目标业务流的发送速率小于或等于所述最大接收速率。
可选地,所述第一网络设备的第一端口的可用缓存大于所述第二网络设备的第二端口的可用缓存,所述第一端口为所述第一网络设备上用于转发所述目标业务流的出端口,所述第二端口为所述第二网络设备上用于转发所述目标业务流的出端口。
可选地,所述流量控制需求还包括所述目标业务流对应的分配缓存需求,所述流量整形模块,用于:当所述第一网络设备上所述目标业务流的实际缓存超出所述分配缓存需求时,对所述目标业务流进行丢包。
可选地,所述获取模块包括接收模块,所述接收模块用于接收控制设备发送的第一报文,所述第一报文包括所述目标业务流的标识和所述流量控制需求,所述第一报文用于指示所述第一网络设备对所述目标业务流进行流量整形。
可选地,所述接收模块,还用于接收所述控制设备发送的第二报文,所述第二报文用于指示所述第一 网络设备结束对所述目标业务流进行流量整形。
可选地,所述装置还包括:发送模块;所述发送模块,用于向所述控制设备发送端口信息,所述端口信息包括所述第一网络设备上一个或多个端口的端口速率。
可选地,所述获取模块包括接收模块,所述接收模块用于接收所述第二网络设备发送的第三报文,所述第三报文包括所述目标业务流的标识和所述流量控制需求,所述第三报文用于请求所述第一网络设备对所述目标业务流进行流量整形。
可选地,所述第三报文为控制报文。
可选地,所述第三报文为BGP更新消息,所述目标业务流的标识和所述流量控制需求在所述BGP更新消息的路径属性字段中。
可选地,所述第三报文为业务报文,所述业务报文包括APN字段,所述APN字段包括APN标识子字段和APN参数子字段,所述目标业务流的标识在所述APN标识子字段和/或所述APN参数子字段中,所述流量控制需求在所述APN参数子字段中;所述装置还包括:删除模块和发送模块;所述删除模块,用于删除所述第三报文的所述APN参数子字段中的所述流量控制需求,得到第四报文;所述发送模块,用于转发所述第四报文。
可选地,所述APN字段还携带有目标指示,所述目标指示用于指示所述APN参数子字段包括所述流量控制需求。
可选地,所述APN字段还包括标志子字段和APN参数类型子字段,所述目标指示在所述标志子字段和/或所述APN参数类型子字段中。
可选地,所述获取模块包括接收模块和确定模块;所述接收模块,用于接收所述第二网络设备发送的第五报文,所述第五报文包括所述目标业务流的标识和所述第二网络设备的第二端口的端口速率,所述第二端口为所述第二网络设备上用于转发所述目标业务流的出端口,所述第五报文用于请求所述第一网络设备对所述目标业务流进行流量整形;所述确定模块,用于根据所述目标业务流的业务需求和所述第二端口的端口速率,确定所述流量控制需求,所述最大接收速率小于或等于所述第二端口的端口速率。
可选地,所述业务需求包括所述目标业务流的传输速率需求,所述确定模块,用于:根据所述传输速率需求与所述第二端口的端口速率中的较小值确定所述最大接收速率。
可选地,所述流量控制需求还包括所述目标业务流对应的分配缓存需求,所述业务需求包括所述目标业务流的时延需求,所述确定模块,用于:根据所述目标业务流的发送端与所述目标业务流的接收端之间的往返时延、所述最大接收速率以及所述时延需求,确定所述分配缓存需求。
可选地,所述流量控制需求包括所述目标业务流对应的分配缓存需求,所述流量整形模块,用于当所述第一网络设备上用于转发所述目标业务流的出端口的可用缓存大于或等于所述分配缓存需求时,根据所述流量控制需求对所述目标业务流进行流量整形。
可选地,所述装置还包括:发送模块;所述发送模块,用于当所述第一网络设备上用于转发所述目标业务流的出端口的可用缓存小于所述分配缓存需求时,向第三网络设备发送所述第三报文,所述第三网络设备位于所述目标业务流的传输路径上、且所述第一网络设备位于所述第三网络设备的下游。
可选地,所述装置还包括:发送模块;所述发送模块,用于当所述第一网络设备上用于转发所述目标业务流的出端口的可用缓存小于所述分配缓存需求时,向所述第二网络设备发送请求应答报文,所述请求应答报文用于指示所述第一网络设备无法对所述目标业务流进行流量整形。
可选地,所述接收模块,还用于接收所述第二网络设备发送的第六报文,所述第六报文用于指示所述第一网络设备结束对所述目标业务流进行流量整形。
可选地,所述流量整形模块,还用于当所述第一网络设备在目标时长内未接收到属于所述目标业务流的报文时,结束对所述目标业务流进行流量整形。
第六方面,提供了一种流量控制装置,所述装置应用于控制设备,所述装置包括:获取模块,用于获取多个网络设备的端口信息,所述多个网络设备包括位于目标业务流的传输路径上的第一网络设备和第二网络设备、且所述第二网络设备位于所述第一网络设备的下游,所述第一网络设备的端口信息包括所述第一网络设备的第一端口的端口速率,所述第二网络设备的端口信息包括所述第二网络设备的第二端口的端口速率,所述第一端口为所述第一网络设备上用于转发所述目标业务流的出端口,所述第二端口为所述第 二网络设备上用于转发所述目标业务流的出端口;确定模块,用于基于所述第二端口的端口速率小于所述第一端口的端口速率,根据所述目标业务流的业务需求和所述第二端口的端口速率,确定所述目标业务流对应的流量控制需求,所述流量控制需求包括所述第二网络设备针对所述目标业务流的最大接收速率,所述最大接收速率小于或等于所述第二端口的端口速率;发送模块,用于向所述第一网络设备发送第一报文,所述第一报文包括所述目标业务流的标识和所述流量控制需求,所述第一报文用于指示所述第一网络设备对所述目标业务流进行流量整形。
可选地,所述业务需求包括所述目标业务流的传输速率需求,所述确定模块,用于根据所述传输速率需求与所述第二端口的端口速率中的较小值确定所述最大接收速率。
可选地,所述第一网络设备的端口信息还包括所述第一端口的可用缓存,所述第二网络设备的端口信息还包括所述第二端口的可用缓存,所述发送模块,用于当所述第一端口的可用缓存大于所述第二端口的可用缓存时,向所述第一网络设备发送所述第一报文。
可选地,所述流量控制需求还包括所述目标业务流对应的分配缓存需求,所述业务需求包括所述目标业务流的时延需求,所述确定模块,用于:根据所述目标业务流的发送端与所述目标业务流的接收端之间的往返时延、所述最大接收速率以及所述时延需求,确定所述分配缓存需求,所述分配缓存需求用于所述第一网络设备在所述目标业务流的实际缓存超出所述分配缓存需求时对所述目标业务流进行丢包。
可选地,所述第二网络设备为接入层设备,所述第一网络设备为汇聚层设备或核心层设备。
可选地,所述第一网络设备为预先配置的用于对流经所述第一网络设备的业务流进行流量整形的网络设备。
可选地,所述第一网络设备为所述传输路径上的网络设备中用于转发所述目标业务流的出端口的可用缓存最大的网络设备。
可选地,所述第二网络设备为预先配置的、具有流量控制需求的网络设备,和/或,所述第二端口为预先配置的、具有流量控制需求的出端口。
可选地,所述装置还包括:接收模块,用于在所述控制设备向所述第一网络设备发送第一报文之前,接收所述第二网络设备发送的流量整形请求,所述流量整形请求包括所述目标业务流的标识,所述流量整形请求用于请求对所述目标业务流进行流量整形。
可选地,所述接收模块,还用于接收所述第二网络设备发送的流量整形撤销请求,所述流量整形撤销请求用于请求结束对所述目标业务流进行流量整形;所述发送模块,还用于向所述第一网络设备发送第二报文,所述第二报文用于指示所述第一网络设备结束对所述目标业务流进行流量整形。
第七方面,提供了一种流量控制装置,所述装置包括:获取模块,用于获取第一网络设备的端口信息,所述第一网络设备位于目标业务流的传输路径上,所述端口信息包括目标端口的端口速率,所述目标端口为所述第一网络设备上用于转发所述目标业务流的出端口;确定模块,用于根据所述目标业务流的业务需求和所述端口速率,确定所述目标业务流对应的流量控制需求,所述流量控制需求包括所述第一网络设备针对所述目标业务流的最大接收速率,所述最大接收速率小于或等于所述端口速率。
可选地,所述业务需求包括所述目标业务流的传输速率需求,所述确定模块,用于根据所述传输速率需求与所述端口速率中的较小值确定所述最大接收速率。
可选地,所述流量控制需求还包括所述目标业务流对应的分配缓存需求,所述业务需求包括所述目标业务流的时延需求,所述确定模块,用于根据所述目标业务流的发送端与所述目标业务流的接收端之间的往返时延、所述最大接收速率以及所述时延需求,确定所述分配缓存需求,所述分配缓存需求用于在所述目标业务流的实际缓存超出所述分配缓存需求时对所述目标业务流进行丢包。
可选地,所述装置应用于所述第一网络设备,所述装置还包括:发送模块;所述发送模块用于在所述根据所述目标业务流的业务需求和所述端口速率,确定所述目标业务流对应的流量控制需求之后,向第二网络设备发送第一报文,所述第一报文包括所述目标业务流的标识和所述流量控制需求,所述第二网络设备位于所述目标业务流的传输路径上、且所述第一网络设备位于所述第二网络设备的下游,所述第一报文用于请求所述第二网络设备对所述目标业务流进行流量整形。
可选地,所述发送模块,用于响应于所述第一网络设备接收到属于所述目标业务流的报文,或者所述目标业务流在所述第一网络设备上发生丢包,向所述第二网络设备发送所述第一报文。
可选地,所述第一报文为控制报文。
可选地,所述第一报文为BGP更新消息,所述目标业务流的标识和所述流量控制需求在所述BGP更新消息的路径属性字段中。
可选地,所述第一报文为业务报文,所述业务报文包括APN字段,所述APN字段包括APN标识子字段和APN参数子字段,所述目标业务流的标识在所述APN标识子字段和/或所述APN参数子字段中,所述流量控制需求在所述APN参数子字段中。
可选地,所述APN字段还携带有指示,所述指示用于指示所述APN参数子字段包括所述流量控制需求。
可选地,所述APN字段还包括标志子字段和APN参数类型子字段,所述指示在所述标志子字段和/或所述APN参数类型子字段中。
可选地,所述装置还包括:接收模块;所述接收模块,用于接收所述第二网络设备发送的所述第一报文对应的请求应答报文,所述请求应答报文用于指示所述第二网络设备无法对所述目标业务流进行流量整形;所述发送模块,还用于向第三网络设备发送第二报文,所述第二报文包括所述目标业务流的标识和所述流量控制需求,所述第三网络设备位于所述目标业务流的传输路径上、且所述第一网络设备位于所述第三网络设备的下游,所述第二报文用于请求所述第一网络设备对所述目标业务流进行流量整形。
可选地,所述发送模块,还用于当所述第一网络设备在目标时长内未接收到属于所述目标业务流的报文时,向所述第二网络设备发送第三报文,所述第三报文用于指示所述第二网络设备结束对所述目标业务流进行流量整形。
第八方面,提供了一种流量控制装置,所述装置应用于第一网络设备,所述装置包括:获取模块,用于获取所述第一网络设备的端口信息,所述第一网络设备位于目标业务流的传输路径上,所述端口信息包括目标端口的端口速率,所述目标端口为所述第一网络设备上用于转发所述目标业务流的出端口;发送模块,用于向第二网络设备发送目标报文,所述目标报文包括所述目标业务流的标识和所述端口信息,所述第二网络设备位于所述目标业务流的传输路径上、且所述第一网络设备位于所述第二网络设备的下游,所述目标报文用于请求所述第二网络设备对所述目标业务流进行流量整形。
可选地,所述发送模块,用于响应于所述第一网络设备接收到属于所述目标业务流的报文,或者所述目标业务流在所述第一网络设备上发生丢包,向所述第二网络设备发送所述目标报文。
可选地,所述目标报文为BGP更新消息,所述目标业务流的标识和所述端口信息在所述BGP更新消息的路径属性字段中。
可选地,所述目标报文为业务报文,所述业务报文包括APN字段,所述APN字段包括APN标识子字段和APN参数子字段,所述目标业务流的标识在所述APN标识子字段和/或所述APN参数子字段中,所述端口信息在所述APN参数子字段中。
可选地,所述APN字段还携带有目标指示,所述目标指示用于指示所述APN参数子字段包括所述端口信息。
可选地,所述APN字段还包括标志子字段和APN参数类型子字段,所述目标指示在所述标志子字段和/或所述APN参数类型子字段中。
上述第五方面至第八方面中的所述模块可以基于软件、硬件或软件和硬件的结合实现,且所述模块可以基于具体实现进行任意组合或分割。
第九方面,提供了一种流量控制系统,包括:控制设备和多个网络设备;
所述控制设备用于获取所述多个网络设备的端口信息,所述多个网络设备包括位于目标业务流的传输路径上的第一网络设备和第二网络设备、且所述第二网络设备位于所述第一网络设备的下游,所述第一网络设备的端口信息包括所述第一网络设备的第一端口的端口速率,所述第二网络设备的端口信息包括所述第二网络设备的第二端口的端口速率,所述第一端口为所述第一网络设备上用于转发所述目标业务流的出端口,所述第二端口为所述第二网络设备上用于转发所述目标业务流的出端口;
所述控制设备还用于在所述第二端口的端口速率小于所述第一端口的端口速率的情况下,根据所述目标业务流的业务需求和所述第二端口的端口速率,确定所述目标业务流对应的流量控制需求,所述流量控制需求包括所述第二网络设备针对所述目标业务流的最大接收速率,所述最大接收速率小于或等于所述第 二端口的端口速率;
所述控制设备还用于向所述第一网络设备发送报文,所述报文包括所述目标业务流的标识和所述流量控制需求,所述报文用于指示所述第一网络设备对所述目标业务流进行流量整形;
所述第一网络设备用于根据所述流量控制需求对所述目标业务流进行流量整形,以使所述第一网络设备针对所述目标业务流的发送速率小于或等于所述最大接收速率。
可选地,上述第五方面所提供的流量控制装置可以作为该流量控制系统中的第一网络设备,上述第六方面所提供的流量控制装置可以作为该流量控制系统中的控制设备。
第十方面,提供了一种流量控制系统,包括:多个网络设备,所述多个网络设备包括第一网络设备和第二网络设备,所述第一网络设备和所述第二网络设备均位于目标业务流的传输路径上、且所述第二网络设备位于所述第一网络设备的下游;
所述第二网络设备用于获取所述第二网络设备的端口信息,所述端口信息包括目标端口的端口速率,所述目标端口为所述第二网络设备上用于转发所述目标业务流的出端口;
所述第二网络设备还用于根据所述目标业务流的业务需求和所述端口速率,确定所述目标业务流对应的流量控制需求,所述流量控制需求包括所述第二网络设备针对所述目标业务流的最大接收速率,所述最大接收速率小于或等于所述端口速率;
所述第二网络设备还用于向所述第一网络设备发送报文,所述报文包括所述目标业务流的标识和所述流量控制需求,所述报文用于请求所述第一网络设备对所述目标业务流进行流量整形;
所述第一网络设备用于根据所述流量控制需求对所述目标业务流进行流量整形,以使所述第一网络设备针对所述目标业务流的发送速率小于或等于所述最大接收速率。
可选地,上述第五方面所提供的流量控制装置可以作为该流量控制系统中的第一网络设备,上述第七方面所提供的流量控制装置可以作为该流量控制系统中的第二网络设备。
第十一方面,提供了一种流量控制系统,包括:多个网络设备,所述多个网络设备包括第一网络设备和第二网络设备,所述第一网络设备和所述第二网络设备均位于目标业务流的传输路径上、且所述第二网络设备位于所述第一网络设备的下游;
所述第二网络设备用于获取所述第二网络设备的端口信息,所述端口信息包括目标端口的端口速率,所述目标端口为所述第二网络设备上用于转发所述目标业务流的出端口;
所述第二网络设备还用于向所述第一网络设备发送报文,所述报文包括所述目标业务流的标识和所述端口信息,所述报文用于请求所述第一网络设备对所述目标业务流进行流量整形;
所述第一网络设备用于根据所述目标业务流的业务需求和所述端口速率,确定所述目标业务流对应的流量控制需求,所述流量控制需求包括所述第二网络设备针对所述目标业务流的最大接收速率,所述最大接收速率小于或等于所述端口速率;
所述第一网络设备还用于根据所述流量控制需求对所述目标业务流进行流量整形,以使所述第一网络设备针对所述目标业务流的发送速率小于或等于所述最大接收速率。
可选地,上述第五方面所提供的流量控制装置可以作为该流量控制系统中的第一网络设备,上述第八方面所提供的流量控制装置可以作为该流量控制系统中的第二网络设备。
第十二方面,提供了一种流量控制装置,包括:存储器和处理器;
所述存储器用于存储计算机程序;
所述处理器用于执行所述存储器中存储的所述计算机程序以使得所述流量控制装置执行如上述第一方面或第一方面的任一可选方式所提供的流量控制方法。
第十三方面,提供了一种流量控制装置,包括:存储器和处理器;
所述存储器用于存储计算机程序;
所述处理器用于执行所述存储器中存储的所述计算机程序以使得所述流量控制装置执行如上述第二方面或第二方面的任一可选方式所提供的流量控制方法。
第十四方面,提供了一种流量控制装置,包括:存储器和处理器;
所述存储器用于存储计算机程序;
所述处理器用于执行所述存储器中存储的所述计算机程序以使得所述流量控制装置执行如上述第三方面或第三方面的任一可选方式所提供的流量控制方法。
第十五方面,提供了一种流量控制装置,包括:存储器和处理器;
所述存储器用于存储计算机程序;
所述处理器用于执行所述存储器中存储的所述计算机程序以使得所述流量控制装置执行如上述第四方面或第四方面的任一可选方式所提供的流量控制方法。
第十六方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,该计算机程序被执行时,实现如上述第一方面或第一方面的任一可选方式所提供的流量控制方法,或者实现如上述第二方面或第二方面的任一可选方式所提供的流量控制方法,或者实现如上述第三方面或第三方面的任一可选方式所提供的流量控制方法,或者实现如上述第四方面或第四方面的任一可选方式所提供的流量控制方法。
第十七方面,提供了一种计算机程序产品,该计算机程序产品包括程序或代码,该程序或代码被执行时,实现如上述第一方面或第一方面的任一可选方式所提供的流量控制方法,或者实现如上述第二方面或第二方面的任一可选方式所提供的流量控制方法,或者实现如上述第三方面或第三方面的任一可选方式所提供的流量控制方法,或者实现如上述第四方面或第四方面的任一可选方式所提供的流量控制方法。
第十八方面,提供了一种芯片,该芯片包括可编程逻辑电路和/或程序指令,该芯片运行时,实现如上述第一方面或第一方面的任一可选方式所提供的流量控制方法,或者实现如上述第二方面或第二方面的任一可选方式所提供的流量控制方法,或者实现如上述第三方面或第三方面的任一可选方式所提供的流量控制方法,或者实现如上述第四方面或第四方面的任一可选方式所提供的流量控制方法。
附图说明
图1是本申请实施例提供的一种网络流量的流量速率随时间变化的示意图;
图2是本申请实施例提供的另一种网络流量的流量速率随时间变化的示意图;
图3是本申请实施例提供的又一种网络流量的流量速率随时间变化的示意图;
图4是本申请实施例提供的一种应用场景的示意图;
图5是本申请实施例提供的一种流量控制方法的实现流程示意图;
图6是本申请实施例提供的另一种流量控制方法的实现流程示意图;
图7是本申请实施例提供的一种BGP更新消息的结构示意图;
图8是本申请实施例提供的另一种BGP更新消息的结构示意图;
图9是本申请实施例提供的一种控制报文的结构示意图;
图10是本申请实施例提供的一种APN字段的结构示意图;
图11是本申请实施例提供的又一种流量控制方法的实现流程示意图;
图12是本申请另一实施例提供的一种流量控制方法的流程示意图;
图13是本申请另一实施例提供的另一种流量控制方法的流程示意图;
图14是本申请另一实施例提供的又一种流量控制方法的流程示意图;
图15是本申请另一实施例提供的再一种流量控制方法的流程示意图;
图16是本申请实施例提供的一种流量控制装置的结构示意图;
图17是本申请实施例提供的另一种流量控制装置的结构示意图;
图18是本申请实施例提供的又一种流量控制装置的结构示意图;
图19是本申请实施例提供的再一种流量控制装置的结构示意图;
图20是本申请实施例提供的一种网络设备的硬件结构示意图;
图21是本申请实施例提供的一种控制设备的硬件结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
由于业务具有突发性以及传输控制协议(Transmission Control Protocol,TCP)滑动窗口机制(尽可能以最快的速度发送报文)等原因,导致网络中的流量通常不是匀速的。如果提高网络流量观察放大镜的倍数,从分钟级到秒级再到毫秒级,就会发现:在分钟级,网络流量趋于匀速;在秒级,网络流量存在一定波动;在毫秒级,网络流量剧烈波动。例如图1至图3分别是本申请实施例提供的一种网络流量的流量速率随时间变化的示意图。其中,纵坐标表示流量速率,单位为每秒百万比特(million bits per second,Mbps),横坐标表示时间。图1中横坐标的时间单位为分钟,如图1所示,流量速率-时间变化曲线看上去平坦,表示网络流量趋于匀速。图2中横坐标的时间单位为秒,如图2所示,流量速率-时间变化曲线看上去有明显的波峰波谷,表示网络流量存在一定波动。图3中横坐标的时间单位为毫秒,如图3所示,流量速率-时间变化曲线看上去波峰波谷剧烈震动,表示网络流量剧烈波动,其中,每个波峰分别为网络流量的一次微突发,也就是说,微突发流量在网络中普遍存在。
网络设备具有多个端口。网络设备通过端口转发报文。网络设备的端口通常配置有缓存,缓存用于存储网络设备接收到的报文。网络设备上用于接收报文的端口为入端口,网络设备上用于发送报文的端口为出端口。本申请实施例中,网络设备的端口缓存是指出端口的端口缓存。可选地,网络设备的端口缓存可以是静态配置的,比如网络设备有8G(吉)缓存,该网络设备有8个端口,分配给每个端口的缓存分别为1G,那么对于一个端口而言,该端口的可用缓存为分配缓存中的剩余缓存。或者,网络设备的端口缓存也可以是动态配置的,比如网络设备有8G缓存,该网络设备有8个端口,分配给每个端口的初始缓存分别为512M(兆),剩余4G缓存为该8个端口的共享缓存,那么对于一个端口而言,该端口的可用缓存为分配缓存中的剩余缓存与共享缓存中的剩余缓存之和。
可选地,网络设备的端口缓存包括多个出端口队列(也可称为转发队列),网络设备接收到报文之后,将报文缓存在对应的出端口队列中,然后依次转发出端口队列中的报文。当网络中出现微突发流量时,可能会造成网络设备的端口缓存瞬时的溢出进而导致丢包。比如,网络设备的入端口的带宽大于出端口的带宽,网络流量从大带宽的入端口流向小带宽的出端口(大打小),或者,网络设备的入端口的数量大于出端口的数量,网络流量从多个入端口流向一个出端口(多打少)时,叠加微观上的流量微突发,如果出端口的缓存小,无法将波峰流量缓存,网络设备上就会发生丢包。一旦网络设备发生丢包,可能会触发重传,重传带来的业务时延远大于往返时延(round trip time,RTT),进而会影响业务传输效率。另外,由于微突发流量可能会在极短的时间内造成拥塞,导致拥塞误判,使得发送端通过TCP滑动窗口触发快降速,对业务流量进行压抑,导致网络带宽资源无法被充分利用,降低业务的吞吐量。
受限于网络部署的硬件成本,网络中有些网络设备的端口缓存较小,比如接入层设备的端口缓存通常小于汇聚层设备和核心层设备的端口缓存。对于端口缓存较小的网络设备,微突发流量的出现更容易导致丢包。例如,不同于运营商的路由器,园区接入交换机一般整机缓存小,分配给每个端口的缓存小于2M或2G,微突发流量导致的丢包比较常见,尤其是在一个小缓存的接入交换机接入多个接入点(access point,AP)的场景下。统计某个园区,带宽利用率在30%的情况下,丢包的端口占比63.3%,根因就是小缓存的接入交换机下接AP,加剧了微突发丢包。
目前针对网络拥塞或网络流量微突发,关于如何减少网络丢包或如何进行高优先级业务保障,业界有很多方式。比如显式拥塞通知(explicit congestion notification,ECN)机制能够减少网络丢包,切片技术和智能应用控制(smart application control,SAC)技术等能够实现高优先级业务保障,但这些方式都有一定的弊端或不足。
例如,ECN机制有两种实现方式,一种是拥塞发生时进行反压,通告发送源头控制发送速度,但是由于这种实现方式是在发生拥塞丢包后再进行反压,一方面已经造成业务损失,另一方面拥塞发生时再反压,及时性较差。另一种是基于队列和时延等提前预测可能要发生拥塞,提前进行反压,但是拥塞预测的实现算法比较复杂,且难以保证拥塞预测的准确性。
又例如,切片技术只能保证切片外业务不能抢占切片内业务的带宽和转发资源,但无法解决切片内的业务流量突发导致的丢包问题。另外,由于切片技术是将网络设备整机缓存分配给不同切片,每个切片拥有独立的缓存资源,不同切片的缓存无法相互共享,因此会降低网络设备整机对网络流量进行削峰填谷的能力。
又例如,SAC技术能够实现智能应用识别与分类,利用深度报文检测技术对报文进行识别和解析,然后对高优先级业务进行精细化服务质量(quality of service,QoS)控制,从而实现高优先级业务保障。但是,由于SAC技术需要对报文进行深度解析,如果报文加密,则无法对报文深度解析,即SAC技术无法应用于报文加密的场景,应用局限性较高。
基于此,本申请实施例提供了一种技术方案,由位于业务流的传输路径上的上游设备获取该业务流对应的流量控制需求,并根据该流量控制需求对该业务流进行流量整形(traffic shaping),以使该上游设备针对该业务流的发送速率小于或等于位于该业务流的传输路径上的下游设备针对该业务流的最大接收速率,也即是通过上游设备进行流量限速以达到流量控制的效果。通过上游设备根据下游设备针对重保业务流的流量控制需求对重保业务流进行流量限速,可以避免由于重保业务流的微突发导致下游设备的缓存溢出所导致的丢包,从而保障重保业务流的传输效率。通过上游设备根据下游设备针对非重保业务流的流量控制需求对非重保业务流进行流量限速,可以避免非重保业务流占用下游设备过多的带宽资源和缓存资源,预留更多的带宽资源和缓存资源给重保业务流,从而保障重保业务流的传输效率。本申请通过控制设备与通信网络中多个网络设备之间的协同实现流量控制,可以提高重保业务流的传输稳定性,从而可以提高重保业务流的传输效率。另外,由于本申请实施例提供的技术方案无需更换网络设备的硬件,通过网络协同实现流量控制,一方面可以解决网络设备因微突发流丢包的问题,另一方面可以实现低成本地整网建网。
一种可能实施方式,位于业务流的传输路径上的上游设备上用于转发该业务流的出端口的可用缓存大于下游设备上用于转发该业务流的出端口的可用缓存,即上游设备为大缓存设备,下游设备为小缓存设备。由于大缓存设备相较于小缓存设备能够缓存更多的流量,由上游的大缓存设备对业务流进行削峰填谷,一方面可以避免在下游的小缓存设备上流量剧烈变化,减少下游的小缓存设备的丢包,使得业务流在经过小缓存设备之前,在经过大缓存设备时被大缓存设备提前进行限速整形,因此避免或缓解小缓存设备因微突发流丢包。另一方面上游的大缓存设备在进行流量限速时可以缓存更多的流量,微突发流量导致大缓存设备丢包的可能性比较小,因此可以避免或降低业务流量压抑而影响业务吞吐量的风险,从而提高业务体验。
下面从应用场景、方法流程、虚拟装置、实体装置、系统等多个角度对本申请技术方案进行详细介绍。
以下对本申请实施例涉及的应用场景举例说明。
本申请实施例提供的流量控制方法可以应用于多种类型的通信网络,包括但不限于无线接入网(radio access network,RAN)互联网协议(Internet Protocol,IP)化(IP RAN)网络、数据中心网络(data center network,DCN)、城域网络、广域网络或园区网络等。
可选地,该通信网络可以采用三层网络架构,即该通信网络可以是三层网络,包括核心层、汇聚层和接入层。核心层是通信网络的高速交换主干,与骨干网络(也可称为核心网)连接,例如可以与骨干网络中的控制器连接。汇聚层用于提供汇聚连接(连接接入层和核心层)。接入层用于将工作站接入通信网络。其中,工作站可以是基站、AP、服务器或终端等。本申请实施例中,将位于接入层的网络设备称为接入层设备,将位于汇聚层的网络设备称为汇聚层设备,将位于核心层的网络设备称为核心层设备。或者,该通信网络也可以采用二层网络架构,即该通信网络可以是二层网络,包括核心层和接入层,核心层是通信网络的高速交换主干,接入层用于将工作站接入通信网络。本申请实施例对通信网络所采用的网络架构不做限定。
本申请以下实施例提供的通信网络基于对相关技术中的通信网络抽象概括得到,仅用作示例性说明,不作为对通信场景的限定。
例如,图4是本申请实施例提供的一种应用场景的示意图。如图4所示,该应用场景包括通信网络中的多个网络设备401A-401C(统称为网络设备401)。其中,网络设备401A为核心层设备。网络设备401B为汇聚层设备。网络设备401C为接入层设备。该应用场景中网络设备的数量和类型仅用作示例性说明,不作为对本申请实施例涉及的应用场景的限制。
可选地,网络设备401例如是路由器或交换机等。参见图4,网络设备401A、网络设备401B和网络设备 401C依次连接。其中,网络设备401A连接骨干网络。网络设备401C连接工作站。每个网络设备401包括上行端口和下行端口。网络设备401A通过上行端口连接骨干网络,通过下行端口连接网络设备401B。网络设备401B通过上行端口连接网络设备401A,通过下行端口连接网络设备401C。网络设备401C通过上行端口连接网络设备401B,通过下行端口连接工作站。在上行通信场景下,网络设备401的上行端口为入端口,下行端口为出端口,即网络设备401通过下行端口接收报文,并通过上行端口发送该报文。例如,接入层设备可以通过下行端口接收工作站发送的报文,并通过上行端口向汇聚层设备发送该报文。在下行通信场景下,网络设备401的下行端口为入端口,上行端口为出端口,即网络设备401通过上行端口接收报文,并通过下行端口发送该报文。例如,接入层设备可以通过上行端口接收汇聚层设备发送的报文,并通过下行端口发送该报文。
网络设备401的上行端口的端口速率通常大于下行端口的端口速率。例如,网络设备401A的上行端口和下行端口的端口速率分别为100Gbps和40Gbps。网络设备401B的上行端口和下行端口的端口速率分别为40Gbps和10Gbps。网络设备401C的上行端口和下行端口的端口速率分别为10Gbps和1Gbps。在网络设备401的上行端口的端口速率大于下行端口的端口速率的情况下,下行通信场景中会出现网络流量大打小的情况,汇聚层设备和/或接入层设备可能会出现由于微突发流量导致丢包的问题。因此本申请实施例提供的流量控制方法可以应用于下行通信场景。当然,该流量控制方法应用于上行通信场景或其它通信场景。
可选地,请继续参见图4,该应用场景还包括控制设备402。控制设备402可以是一台服务器,或者由若干台服务器组成的服务器集群,或者是一个云计算中心。控制设备402与通信网络中的网络设备401通过有线网络或无线网络连接。控制设备402用于管理和控制网络设备401,比如向网络设备下发配置、收集网络设备的信息以及向网络设备下发指令等。控制设备402也称为网络管理设备或网络控制器,例如可以是云管控平台、软件定义网络(software defined network,SDN)控制器或网络控制引擎(network control engine,NCE)等。
以下对本申请实施例涉及的方法流程举例说明。
本申请实施例提供的流量控制方法可以基于管理面、控制面或转发面协同实现。基于管理面协同实现的流量控制方法属于集中式控制方案,方案具体实现时,由控制设备选择对业务流进行流量整形的网络设备,并向该网络设备下发该业务流对应的流量控制需求。基于控制面或转发面协同实现的流量控制方法属于分布式控制方案,方案具体实现时,由具有流量整形需求的下游设备选择对业务流进行流量整形的上游设备,并向该上游设备发送该业务流对应的流量控制需求或用于确定流量控制需求的信息。基于控制面协同实现的流量控制方法和基于转发面协同实现的流量控制方法的主要区别在于,在基于控制面协同实现的流量控制方法中,下游设备通过控制报文向上游设备传递业务流对应的流量控制需求或用于确定流量控制需求的信息;在基于转发面协同实现的流量控制方法中,下游设备通过业务报文向上游设备传递业务流对应的流量控制需求或用于确定流量控制需求的信息。本申请以下实施例分别对基于管理面、控制面和转发面协同实现的流量控制方法的具体实现方式进行说明。
例如,图5是本申请实施例提供的一种流量控制方法的实现流程示意图。如图5所示,方法500包括但不限于步骤501至步骤504。该方法500基于管理面协同实现,可以应用于如图4所示的应用场景。该方法500中的控制设备例如是图4示出的控制设备402。该方法500中的网络设备2例如是图4示出的网络设备401C,网络设备1例如是图4示出的网络设备401B或网络设备401A。或者,该方法500中的网络设备2例如是图4示出的网络设备401B,网络设备1例如是图4示出的网络设备401A。
步骤501、控制设备获取多个网络设备的端口信息。
该多个网络设备包括位于业务流1的传输路径上的网络设备1和网络设备2。在业务流1的传输路径上,网络设备2位于网络设备1的下游,即业务流1在通信网络中传输时,先到达网络设备1,后到达网络设备2。换句话来说,网络设备1为位于业务流1的传输路径上的上游设备,网络设备2为位于业务流1的传输路径上的下游设备。
网络设备的端口信息包括端口速率。比如,网络设备1的端口信息包括网络设备1上一个或多个端口的端口速率,该一个或多个端口包括端口1。端口1为网络设备1上用于转发业务流1的出端口。网络设备2的端口信息包括网络设备上一个或多个端口的端口速率,该一个或多个端口包括端口2。端口2为网络设备2上用于转发业务流1的出端口。
可选地,网络设备的端口信息还包括端口的可用缓存。比如,网络设备1的端口信息包括网络设备1上一个或多个端口的可用缓存,该一个或多个端口包括上述端口1,也就是说,网络设备1的端口信息可以包括网络设备1的端口1的端口速率和可用缓存。网络设备2的端口信息包括网络设备上一个或多个端口的可用缓存,该一个或多个端口包括上述端口2,也就是说,网络设备2的端口信息可以包括网络设备2的端口2的端口速率和可用缓存。其中,网络设备上端口的可用缓存可以来自网络设备的自身内存和/或额外配置的单板内存。
本申请实施例中,网络设备1为用于对业务流1进行流量整形的网络设备。网络设备2为针对业务流1具有流量控制需求的网络设备。
可选地,业务流1为流经控制设备所管理的通信网络的任一业务流。或者,业务流1为流经控制设备所管理的通信网络的指定业务流。业务流1可以是重保业务流。重保业务流可以是高优先级业务流,包括但不限于高服务等级协议(service level agreement,SLA)等级或高用户服务等级的业务流。或者,重保业务流也可以是通过指定端口或指定接入设备接入通信网络的业务流。比如重要会议室中的会议设备通过指定端口或指定接入设备通信网络,重保业务流可以是流经该指定端口或该指定接入设备的业务流,即重保业务流可以是发送端或接收端为该重要会议室中的会议设备的业务流。或者,业务流1也可以是非重保业务流。非重保业务流可以是低优先级业务流,包括但不限于低SLA等级或低用户服务等级的业务流。
可选地,网络设备1为业务流1的传输路径上位于网络设备2的上游、针对业务流1具有流量整形能力的网络设备。控制设备确定用于对业务流1进行流量整形的网络设备1的策略有多种,本申请实施例以下面三种策略为例进行说明。
第一种策略,网络设备2为接入层设备,网络设备1为汇聚层设备或核心层设备。或者,网络设备2为汇聚层设备,网络设备1为核心层设备。控制设备中可以配置有策略:对于具有流量控制需求的接入层设备,选择汇聚层设备或核心层设备进行流量整形;对于具有流量控制需求的汇聚层设备,选择核心层设备进行流量整形。例如,在针对业务流1具有流量控制需求的网络设备2为接入层设备的情况下,控制设备自动选择业务流1的传输路径上的汇聚层设备或核心层设备来对业务流1进行流量整形。可选地,控制设备中存储有通信网络的网络拓扑和重保业务流的传输路径,以便控制设备选择合适的网络设备进行流量整形。
由于通信网络中接入层设备的端口缓存相较于汇聚层设备和核心层设备的端口缓存往往更小,因此通常在下行通信场景中,接入层设备会有流量控制需求。这种策略通过在控制设备中预先配置策略来为接入层设备选择进行流量整形的上游设备,可以基本满足通信网络中的流量控制需求。同理,汇聚层设备的端口缓存相较于核心层设备的端口缓存往往更小,因此在下行通信场景中,汇聚层设备可能也会有流量控制需求,本申请实施例中还可以在控制设备中预先配置策略来为汇聚层设备选择进行流量整形的上游设备。
第二种策略,网络设备1为预先配置的用于对流经网络设备1的业务流进行流量整形的网络设备。比如网络设备1是配置有专用于端口缓存的单板的网络设备。这种策略下,当网络设备1的下游设备有流量控制需求时,控制设备自动选择网络设备1进行流量整形。
这种策略下,通过预先确定通信网络中用来为下游设备进行流量整形的网络设备,针对该网络设备提前做些配置,比如为该网络设备配置单板,该单板专用于端口缓存,这样该网络设备进行流量整形时,可以有尽可能多的缓存空间来缓存突发流量,从而降低丢包风险。
第三种策略,网络设备1为业务流1的传输路径上的网络设备中用于转发业务流1的出端口的可用缓存最大的网络设备。在业务流1的传输路径上位于网络设备2的上游、针对业务流1具有流量整形能力的网络设备有多个时,控制设备可以选择其中用于转发业务流1的出端口的可用缓存最大的网络设备来对业务流1进行流量整形。选择该网络设备对业务流1进行流量整形时,有更多的缓存来存储属于业务流1的报文,可以降低业务流1的丢包风险。
可选地,网络设备2为业务流1的传输路径上的带宽瓶颈设备。例如网络设备2为业务流1的传输路径上的网络设备中用于转发业务流1的出端口的端口速率最小的网络设备。
一种可能实现方式,业务流1是静态编排的业务流,业务流1的目的地址和/或目的端口都是预先配置好的。目的地址可以是目的IP地址或目的媒体访问控制(Media Access Control,MAC)地址。比如业务流1是发往重要会议室中的会议设备的重保业务流。这种实现方式下,业务流1的传输路径上的带宽瓶颈设备是可以预先确定的,因此网络设备2可以为预先配置的、具有流量控制需求的网络设备,和/或,网络设备2上的端口2为预先配置的、具有流量控制需求的出端口。比如网络设备2为接入重要会议室中的会议设备的接 入设备,或者,网络设备2上的端口2为接入重要会议室中的会议设备的端口,网络设备2针对发往该会议设备的业务流1具有流量控制需求。相应地,业务流1的目的地址为会议设备,和/或,业务流1的目的端口为网络设备2上的端口2。
这种实现方式下,控制设备可以主动为网络设备2选择进行流量整形的上游设备。
另一种可能实现方式,业务流1是动态编排的业务流。可以由网管人员向控制设备输入命令行,由控制设备实现对需要进行流量控制的业务流的动态识别。比如输入控制设备的命令行指示需要对发往某个重要用户的重保业务流进行流量控制,即业务流1是发往该重要用户的重保业务流。控制设备中可以存储有该重要用户与登录设备的设备地址的对应关系,控制设备将目的地址为该重要用户对应的设备地址的业务流识别为重保业务流,并下发通知给通信网络中的网络设备来检测通信网络中是否有重保业务流。当网络设备检测到重保业务流经过,或者重保业务流发生丢包时,可以向控制设备发送流量整形请求,以请求控制设备对该重保业务流进行流量整形。这种实现方式下,控制设备可以接收网络设备2发送的流量整形请求,该流量整形请求包括业务流1的标识,该流量整形请求用于请求对业务流1进行流量整形。控制设备在接收到网络设备2发送的流量整形请求之后,确定网络设备2为针对业务流1具有流量控制需求的网络设备。
这种实现方式下,控制设备可以在网络设备2发送的流量整形请求的触发下,被动为网络设备2选择针对业务流1进行流量整形的上游设备。
可选地,上述步骤501中的多个网络设备包括在控制设备的管理域内的网络设备,比如网络设备1在控制设备的管理域内。该多个网络设备还可以包括不在控制设备的管理域内的网络设备,比如网络设备2可以在控制设备的管理域内或者也可以不在控制设备的管理域内。
对于在控制设备的管理域内的网络设备,控制设备获取该网络设备的端口信息可以是接收该网络设备发送的端口信息。比如网络设备1在控制设备的管理域内,网络设备1可以向控制设备发送网络设备1的端口信息,控制设备接收并存储网络设备1的端口信息。控制设备可以主动采集管理域内网络设备的端口信息。比如控制设备可以周期性地采集管理域内网络设备的端口信息,包括但不限于通过网络配置协议(network configuration protocol,NetConf)、遥测(telemtry)技术或简单网络管理协议(simple network management protocol,SNMP)向网络设备查询端口信息。或者,网络设备也可以主动向控制设备发送端口信息。比如当网络设备的端口信息发生变更时,网络设备主动向控制设备上报变更后的端口信息。
对于不在控制设备的管理域内的网络设备,控制设备获取该网络设备的端口信息可以是接收其他控制设备发送的端口信息,该网络设备在该其他控制设备的管理域内。比如网络设备2在其他控制设备的管理域内,网络设备2可以向其他控制设备发送网络设备2的端口信息,其他控制设备再将网络设备2的端口信息发送给控制设备。其他控制设备获取网络设备2的端口信息的方式可参考上述控制设备获取网络设备1的端口信息的方式,本申请实施例在此不再赘述。
步骤502、基于网络设备2上用于转发业务流1的端口2的端口速率小于网络设备1上用于转发业务流1的端口1的端口速率,控制设备根据业务流1的业务需求和端口2的端口速率,确定业务流1对应的流量控制需求,该流量控制需求包括网络设备2针对业务流1的最大接收速率。
其中,网络设备2针对业务流1的最大接收速率小于或等于网络设备2的端口2的端口速率。网络设备2针对业务流1的最大接收速率可以是网络设备2针对业务流1的最大发送速率,例如为网络设备2分配给业务流1的端口带宽。可选地,业务流1的业务需求包括但不限于时延需求、传输速率需求或抖动需求。
可选地,业务流1的业务需求包括业务流1的传输速率需求。控制设备根据业务流1的业务需求和端口2的端口速率,确定业务流1对应的流量控制需求的实现方式,包括:控制设备根据业务流1的传输速率需求与端口2的端口速率中的较小值确定网络设备2针对业务流1的最大接收速率。
在业务流1是重保业务流的情况下,控制设备可以将业务流1的传输速率需求与端口2的端口速率中的较小值作为网络设备2针对业务流1的最大接收速率。例如,业务流1的传输速率需求为50Mbps,网络设备2的端口2的端口速率为100Mbps,则控制设备确定网络设备2针对业务流1的最大接收速率为50Mbps。又例如,业务流1的传输速率需求为10Gbps或者是传输速率越大越好,网络设备2的端口2的端口速率为1Gbps,则控制设备确定网络设备2针对业务流1的最大接收速率为1Gbps。
对于重保业务流,网络设备在转发该业务流时所遵循的原则应为,在设备能力范围内尽量满足该业务流的业务需求。有些重保业务流可能有明确的传输速率需求,比如重要会议音视频流,有些重保业务流可能没有明确的传输速率需求或者通过设置较大的传输速率需求来达到通信网络可满足的最大传输速率,比 如重要文件业务。网络设备在转发重保业务流时,在重保业务流的传输速率需求小于网络设备的端口速率的情况下,将该重保业务流的传输速率需求作为发送速率来发送该重保业务流,这样可以在满足重保业务传输效率的情况下,尽可能节约网络设备的端口带宽资源,以使网络设备剩余的端口带宽资源能够分配给其他业务,实现网络利益最大化。在重保业务流的传输速率需求大于网络设备的端口速率的情况下,将该端口速率(即网络设备支持的最大发送速率)作为发送速率来发送该重保业务流,这样能够使网络设备在端口带宽资源有限的情况下,尽量满足重保业务的传输速率需求。相应地,控制设备将业务流1的传输速率需求与端口2的端口速率中的较小值作为网络设备2针对业务流1的最大接收速率,可以理解为是将网络设备2针对业务流1的发送速率作为网络设备2针对业务流1的最大接收速率,这样可以使上游设备将业务流1限速至最大为网络设备2针对业务流1的发送速率,从而使得网络设备2对业务流1的接收速率小于或等于发送速率,以避免业务流1在网络设备2上发生丢包。
在业务流1是非重保业务流的情况下,控制设备可以确定网络设备2针对业务流1的最大接收速率小于或等于业务流1的传输速率需求与端口2的端口速率中的较小值。通过尽量降低非重保业务流的传输速率,可以减少非重保业务流在小缓存设备上所占用的带宽资源和缓存资源,从而更多的带宽资源和缓存资源给重保业务流,以保障重保业务流的传输效率。
可选地,业务流1对应的流量控制需求还包括业务流1对应的分配缓存需求。业务流1的业务需求包括业务流1的时延需求。控制设备根据业务流1的业务需求和端口2的端口速率,确定业务流1对应的流量控制需求的实现方式,包括:控制设备根据业务流1的发送端与业务流1的接收端之间的往返时延(round trip time,RTT)、网络设备2针对业务流1的最大接收速率以及业务流1的时延需求,确定业务流1对应的分配缓存需求。该分配缓存需求用于网络设备1在业务流1的实际缓存超出该分配缓存需求时对业务流1进行丢包。例如,分配缓存需求≤RTT*最大接收速率/时延需求。
对于时延敏感业务,比如音视频会议,可以采用上述方式计算分配缓存需求。对于时延不敏感业务,比如文件传输协议(file transfer protocol,FTP)下载业务,可以采用上述方式计算分配缓存需求,或者也可以直接设置分配缓存需求,缓存分配原则可以是在网络设备的端口缓存资源充分的情况下,分配缓存越大越好。
可选地,控制设备在确定业务流对应的分配缓存需求时,还可以综合考虑该业务流的突发特征等其他因素。其中,突发特征包括但不限于突发流量大小、突发持续时间、相邻突发间隔或突发速率。本申请实施例对控制设备确定业务流对应的分配缓存需求的方式不做限定。
进一步地,控制设备在确定业务流1对应的分配缓存需求之后,可以判断网络设备2上端口2的可用缓存是否满足业务流1对应的分配缓存需求。控制设备可以在确定网络设备2上端口2的可用缓存不满足业务流1对应的分配缓存需求之后,继续执行以下步骤503。
或者,控制设备在确定业务流1对应的流量控制需求之后,执行以下步骤503,无需判断网络设备2上端口2的可用缓存是否满足业务流1对应的分配缓存需求。比如在网络设备2是预先配置的具有流量控制需求的网络设备,和/或,网络设备2上的端口2为预先配置的、具有流量控制需求的出端口的情况下,控制设备在确定业务流1对应的流量控制需求之后,可以直接执行以下步骤503。
步骤503、控制设备向网络设备1发送报文11,报文11包括业务流1的标识和业务流1对应的流量控制需求,报文11用于指示网络设备1对业务流1进行流量整形。
其中,业务流1的标识可以采用业务流1的五元组中的一个或多个来表示,或者可以采用IPv4流标识或IPv6流标识来表示,又或者可以采用APN标识来表示。五元组包括源IP地址、目的IP地址、源端口、目的端口和传输层协议。可选地,报文11可以基于现有的管理报文扩展得到,例如可以在管理报文中携带一种指示,用于指示进行流量整形。或者,报文11也可以是一种自定义的管理报文,该管理报文自身具有指示流量整形的功能。
可选地,网络设备1的端口信息包括上述端口1的可用缓存。网络设备2的端口信息包括上述端口2的可用缓存。上述步骤503是在网络设备1的端口1的可用缓存大于网络设备2的端口2的可用缓存的情况下执行的,也即是,控制设备在确定网络设备1的端口1的可用缓存大于网络设备2的端口2的可用缓存之后,向网络设备1送报文11。也就是说,用于对业务流1进行流量整形的网络设备1为大缓存设备,针对业务流1具有流量控制需求的网络设备2为小缓存设备。
本申请实施例中,控制设备选择上游的大缓存设备对业务流进行流量整形,可以避免在下游的小缓存 设备上流量剧烈变化,减少下游的小缓存设备的丢包,也就是说,业务流在经过小缓存设备之前,在经过大缓存设备时被大缓存设备提前进行限速整形,因此避免或缓解小缓存设备因微突发流丢包。另外,由于大缓存设备可以缓存更多的报文,因此可以更好地应对突发流量,相较于小缓存设备,大缓存设备在应对突发流量时的丢包风险更低,丢包数量更少,因此可以提高业务传输稳定性。
步骤504、网络设备1根据业务流1对应的流量控制需求对业务流1进行流量整形,以使网络设备1针对业务流1的发送速率小于或等于网络设备2针对业务流1的最大接收速率。
可选地,在业务流1对应的流量控制需求包括业务流1对应的分配缓存需求的情况下,网络设备1根据业务流1对应的流量控制需求对业务流1进行流量整形,包括:当网络设备1上业务流1的实际缓存超出业务流1对应的分配缓存需求时,网络设备1对业务流1进行丢包。本申请实施例中,通过设置业务流对应的分配缓存需求,可以降低由于缓存过大对业务流的时延和抖动的影响,另外可以避免单条业务流消耗过多缓存资源。
网络设备1在接收到控制设备发送的报文11之后,可以在本地存储业务流1的标识与流量控制需求的对应关系。比如网络设备1可以建立流控协同需求表,该流控协同需求表用于存储业务流的标识与流量控制需求的对应关系,之后网络设备1基于流控协同需求表对相应的业务流进行流量整形。例如,表1示出了网络设备1中存储的流控协同需求表。参见表1,该流控协同需求表包括业务流标识、下游设备针对业务流的最大接收速率以及业务流对应的分配缓存需求。
表1
参见表1,网络设备1中存储有n条业务流对应的流量控制需求,n为正整数。其中,网络设备2针对业务流1的最大接收速率为R1,业务流1对应的分配缓存需求为C1。网络设备1基于该流控协同需求表对业务流1的转发规则如下:如果网络设备1对业务流1的接收速率大于R1,则网络设备1将R1作为发送速率向下游设备发送业务流1,并在本地缓存业务流1的剩余报文。此外,如果网络设备1上业务流1的实际缓存超出C1,则网络设备1丢弃业务流1中超出C1的报文。如果网络设备1对业务流1的接收速率小于或等于R1,则网络设备1将对业务流1的接收速率作为发送速率向下游设备发送业务流1。
本申请实施例中,由位于业务流的传输路径上的上游设备获取该业务流对应的流量控制需求,并根据该流量控制需求对该业务流进行流量整形,以使该上游设备针对该业务流的发送速率小于或等于位于该业务流的传输路径上的下游设备针对该业务流的最大接收速率,即进行流量限速。具体来说,通过上游设备根据下游设备针对重保业务流的流量控制需求对重保业务流进行流量限速,可以避免由于重保业务流的微突发导致下游设备的缓存溢出所导致的丢包,从而保障重保业务流的传输效率。通过上游设备根据下游设备针对非重保业务流的流量控制需求对非重保业务流进行流量限速,可以避免非重保业务流占用下游设备过多的带宽资源和缓存资源,预留更多的带宽资源和缓存资源给重保业务流,从而保障重保业务流的传输效率。本申请通过控制设备与通信网络中多个网络设备之间的协同实现流量控制,可以提高重保业务流的传输稳定性,从而可以提高重保业务流的传输效率。
进一步地,当通信网络中不存在业务流1时,网络设备1结束对业务流1进行流量整形。触发网络设备1结束对业务流1进行流量整形的方式有多种。
第一种实现方式,由网络设备1主动结束对业务流1进行流量整形。当网络设备1在目标时长内未接收到属于业务流1的报文时,网络设备1结束对业务流1进行流量整形。该目标时长可以是在网络设备1中设置的老化时长。
本申请实施例中,通过在网络设备1中设置老化时长,当网络设备1在老化时长内未接收到属于业务流1的报文时,结束对业务流1的识别处理,以及时释放处理资源。另外,网络设备1还可以删除存储的业务流1的标识与流量控制需求的对应关系,以释放存储资源。
第二种实现方式,由控制设备控制网络设备1结束对业务流1进行流量整形。网络设备1接收控制设备 发送的报文12。报文12用于指示网络设备1结束对业务流1进行流量整形。可选地,报文12可以携带业务流1的标识,以指示网络设备1结束对业务流1进行流量整形。或者,网络设备1当前只对业务流1进行流量整形,那么报文12也可以不携带业务流1的标识,这种情况下,网络设备1接收到指示结束流量整形的报文12之后,默认报文12指示的是对当前正在进行流量整形的业务流1,因此这种情况也可视为报文12用于指示网络设备1结束对业务流1进行流量整形。可选地,报文12可以基于现有的管理报文扩展得到,例如可以在管理报文中携带一种指示,用于指示结束流量整形。其中,用于指示结束流量整形的指示与上述用于指示进行流量整形的指示不同。或者,或者,报文12也可以是一种自定义的管理报文,该管理报文自身具有指示结束流量整形的功能。
可选地,第二种实现方式可以是,控制设备接收网络设备2发送的流量整形撤销请求,该流量整形撤销请求用于请求结束对业务流1进行流量整形。之后,控制设备再向网络设备1发送报文12。可选地,流量整形撤销请求可以包括业务流1的标识,或者,网络设备2上只有一条正在进行流量整形的业务流,那么流量整形撤销请求也可以不包括业务流1的标识,控制设备在接收到网络设备2发送的流量整形撤销请求之后,可以根据流控协同需求表确定网络设备2所请求结束流量整形的是业务流1。
在本申请实施例提供的流量控制方法中,由控制设备选择上游设备对目标业务流进行流量整形。在上述业务流1是重保业务流的情况下,通过上游设备根据下游设备针对重保业务流的流量控制需求对重保业务流进行流量限速,可以避免由于重保业务流的微突发导致下游设备的缓存溢出所导致的丢包,从而保障重保业务流的传输效率。在上述业务流1是非重保业务流的情况下,通过上游设备根据下游设备针对非重保业务流的流量控制需求对非重保业务流进行流量限速,可以避免非重保业务流占用下游设备过多的带宽资源和缓存资源,预留更多的带宽资源和缓存资源给重保业务流,从而保障重保业务流的传输效率。本申请通过控制设备与通信网络中多个网络设备之间的协同实现流量控制,可以提高重保业务流的传输稳定性,从而可以提高重保业务流的传输效率。本申请实施例提供的方案在实施时,大多开发工作在控制设备上完成,可以最大限度减少对网络设备的开发升级,现网升级改造的工作量较小。
在一些实施场景中,如果通信网络中有多个控制设备,且具有流量控制需求的下游设备和具备流量整形能力的上游设备位于不同控制设备的管理域中,那么不同控制设备之间可以协同,由管理下游设备的控制设备向管理上游设备的控制设备提供下游设备的端口信息,然后由管理上游设备的控制设备执行上述方法500,实现多个网络设备对业务流量的协同控制。
又例如,图6是本申请实施例提供的另一种流量控制方法的实现流程示意图。如图6所示,方法600包括但不限于步骤601至步骤604。该方法600基于控制面或转发面协同实现,可以应用于如图4所示的应用场景。这种实现方式下,应用场景中可以不设置控制设备。该方法600中的网络设备3例如是图4示出的网络设备401C,网络设备4例如是图4示出的网络设备401B或网络设备401A。或者,该方法600中的网络设备3例如是图4示出的网络设备401B,网络设备4例如是图4示出的网络设备401A。
步骤601、网络设备3获取网络设备3的端口信息,网络设备3位于业务流2的传输路径上。
网络设备3的端口信息包括端口3的端口速率。端口3为网络设备3上用于转发业务流2的出端口。可选地,网络设备3的端口信息还包括端口3的可用缓存。
可选地,业务流2为通信网络中的任一业务流。或者,业务流2为通信网络中的指定业务流。业务流2可以是重保业务流,或者业务流2也可以是非重保业务流。对业务流2的具体解释可参考上述步骤501中对业务流1的解释,本申请实施例在此不再赘述。
可选地,网络设备3为接入层设备或汇聚层设备。或者,网络设备3为预先配置的、对业务流2具有流量控制需求的网络设备。一种实现方式,业务流2为静态编排的业务流。网络设备3中可以存储有业务流2的标识,当网络设备3检测到业务流2时,获取网络设备3上用于转发业务流2的端口的端口信息。另一种实现方式,业务流2为动态编排的业务流。网络设备3中可以预先存储有某个用户与登录设备的设备地址的对应关系,网络设备3将目的地址为该用户对应的设备地址的业务流识别为业务流2,并在检测到业务流2后,获取网络设备3上用于转发业务流2的端口的端口信息,业务流2为网络设备3识别到发往该用户的任一业务流。
步骤602、网络设备3根据业务流2的业务需求和网络设备3上用于转发业务流2的端口3的端口速率,确定业务流2对应的流量控制需求,该流量控制需求包括网络设备3针对业务流2的最大接收速率。
其中,网络设备3针对业务流2的最大接收速率小于或等于网络设备3的端口3的端口速率。网络设备3 针对业务流2的最大接收速率可以是网络设备3针对业务流2的最大发送速率,例如为网络设备3分配给业务流2的端口带宽。可选地,业务流2的业务需求包括但不限于时延需求、传输速率需求或抖动需求。
可选地,业务流2的业务需求包括业务流2的传输速率需求。网络设备3根据业务流2的业务需求和端口3的端口速率,确定业务流3对应的流量控制需求的实现方式,包括:网络设备3根据业务流2的传输速率需求与端口2的端口速率中的较小值确定网络设备3针对业务流2的最大接收速率。
可选地,业务流2对应的流量控制需求还包括业务流2对应的分配缓存需求。业务流2的业务需求包括业务流2的时延需求。网络设备3根据业务流2的业务需求和端口2的端口速率,确定业务流2对应的流量控制需求的实现方式,包括:网络设备3根据业务流2的发送端与业务流2的接收端之间的往返时延、网络设备3针对业务流2的最大接收速率以及业务流2的时延需求,确定业务流2对应的分配缓存需求。该分配缓存需求用于在业务流2的实际缓存超出该分配缓存需求时对业务流2进行丢包。
此步骤602中网络设备3根据业务流2的业务需求和端口3的端口速率,确定业务流2对应的流量控制需求的实现方式,可参考上述步骤502中控制设备根据业务流1的业务需求和端口2的端口速率,确定业务流1对应的流量控制需求的实现方式,本申请实施例在此不再赘述。
进一步地,网络设备3在确定业务流2对应的分配缓存需求之后,可以判断网络设备3上端口3的可用缓存是否满足业务流2对应的分配缓存需求。网络设备3可以在确定网络设备3上端口3的可用缓存不满足业务流2对应的分配缓存需求之后,继续执行以下步骤603。
或者,网络设备3在检测到业务流2之后,执行以下步骤603,无需判断网络设备3上端口3的可用缓存是否满足业务流2对应的分配缓存需求。例如网络设备3接收到业务流2的首包,或者检测到业务流2在网络设备2发生丢包或丢包数量达到一定阈值之后,向网络设备4请求对业务流2进行流量整形,即执行以下步骤603。
步骤603、网络设备3向网络设备4发送报文21,报文21包括业务流2的标识和业务流2对应的流量控制需求,报文21用于请求网络设备4对业务流2进行流量整形。
其中,网络设备4位于业务流2的传输路径上,且网络设备3位于网络设备4的下游,即业务流2在通信网络中传输时,先到达网络设备4,后到达网络设备3。换句话来说,网络设备4为位于业务流2的传输路径上的上游设备,网络设备3为位于业务流2的传输路径上的下游设备。其中,业务流2的标识可以采用业务流2的五元组中的一个或多个来表示,或者可以采用IPv4流标识或IPv6流标识来表示,又或者可以采用APN标识来表示。在网络设备3为接入层设备的情况下,网络设备4为汇聚层设备或核心层设备。可选地,业务流2为下行流,报文21为上行报文。
第一种可能实现方式,方法600基于控制面协同实现,报文21为控制报文。
可选地,报文21可以基于现有的控制协议实现。例如控制报文21为BGP更新消息,业务流2的标识和业务流2对应的流量控制需求在BGP更新消息的路径属性字段中。
例如,图7和图8分别是本申请实施例提供的一种BGP更新消息的结构示意图。如图7和图8所示,该BGP更新消息包括以太网头部(Ethernet header)、IP头部(IP header)、传输控制协议(Transmission Control Protocol,TCP)头部(TCP header)、BGP数据包以及帧校验序列(frame check sequence,FCS)。其中,BGP数据包中包括BGP头部以及BGP消息字段。该BGP头部中包括标志(maker)字段、长度(length)字段和类型(type)字段(图中未示出)。图7示出了RFC 4271文档中定义的BGP消息字段的格式。如图7所示,该BGP消息字段中包括不可达路由长度(withdrawn routes length)字段、不可达路由(withdrawn routes)字段、总路径属性长度(total path attribute length)字段、路径属性(path attribute)字段以及网络层可达信息(network layer reachability information,NLRI)字段。图8示出了RFC 4760文档中定义的BGP消息字段的格式。如图8所示,该BGP消息字段包括地址族标识符(address family identifier)字段、后续地址族标识符(subsequent address family identifier)字段、下一跳网络地址长度(length of next hop network address)字段、下一跳网络地址(next hop network address)字段、保留(reserved)字段、NLRI字段以及路径属性字段。如图7或图8所示,本申请实施例中可以对BGP消息字段中的路径属性字段进行扩展,将业务流标识和业务流对应的流量控制需求作为扩展属性携带在路径属性字段中。
这种实现方式下,网络设备3可以先与网络设备4之间建立BGP以太虚拟专用网(Ethernet virtual private network,EVPN)邻居,再通过扩展的BGP更新消息传递需要进行流量整形的业务流的标识以及该业务流对应的流量控制需求。网络设备3与网络设备4之间建立BGP EVPN邻居,可以是网络设备3直接与网络设备 4建立有BGP EVPN对等关系。或者,通信网络中还包括路由反射器,网络设备3与网络设备4之间建立BGP EVPN邻居,也可以是网络设备3和网络设备4分别与该路由反射器建立有BGP对等关系,即网络设备3与网络设备4之间通过该路由反射器间接通信连接。其中,路由反射器用于转发不同网络设备之间传递的消息,且路由反射器在转发过程中不修改接收的消息。
本申请实施例中,网络设备之间通过扩展的BGP更新消息传递需要进行流量整形的业务流的标识以及该业务流对应的流量控制需求,无需设计新协议,实现简单。另外,由于BGP EVPN邻居是基于TCP的长连接,依托于EVPN的安全机制,在传递信息时无需额外考虑安全问题,可以实现信息的安全传输。
或者,本申请实施例也可以设计一种新的控制协议,报文21可以基于该新的控制协议实现。该新的控制协议可以是overlay(覆盖)协议,用于传递网络设备之间的网络协同信息,例如可称为网络协同协议(network cooperation protocol,NCP)。例如,图9是本申请实施例提供的一种控制报文的结构示意图。该控制报文可称为NCP报文。如图9所示,该控制报文包括以太网头部、IP头部、TCP头部或用户数据报协议(User Datagram Protocol,UDP)头部(TCP/UDP头部)和网络级流控信息。其中,网络级流控信息包括流类型(flow type)或位图(bitmap)字段(流类型/位图字段)、服务标识字段和流量控制信息字段。流类型或位图字段的值用于指示服务标识字段中携带的是哪种流标识,包括但不限于IPv4流标识、IPv6流标识或APN标识。服务标识字段用于承载业务流的流标识。流量控制信息字段用于承载业务流对应的流量控制需求。
在采用上述NCP协议实现报文21时,网络设备3可以先与网络设备4之间建立UDP邻居或TCP邻居,再通过图9示出的NCP报文传递业务流2的标识以及业务流2对应的流量控制需求。如果网络设备3与网络设备4之间建立UDP邻居,则相应地,NCP报文的传输层协议头为UDP头,这种实现方式相较于TCP,资源开销更低,汇聚层设备或核心层设备可以侦听更多接入层设备或为更多接入层设备提供流量整形服务,例如汇聚层设备或核心层设备可以侦听2000~6000台接入层设备。如果网络设备3与网络设备4之间建立TCP邻居,则相应地,NCP报文的传输层协议头为TCP头,这种实现方式可参考BGP协议。
本申请实施例中,网络设备之间基于新的控制协议传递需要进行流量整形的业务流的标识以及该业务流对应的流量控制需求,协议扩展性更好,可以灵活扩展更多的策略。
第二种可能实现方式,方法600基于转发面协同实现,报文21为业务报文。该业务报文包括APN字段。该APN字段包括APN标识(APN ID)子字段和APN参数子字段。业务流2的标识在APN标识子字段和/或APN参数子字段中。业务流2对应的流量控制需求在APN参数子字段中。其中,业务流2的标识在APN标识子字段和/或APN参数子字段中,包括业务流2的标识仅在APN标识子字段中,或者业务流2的标识仅在APN参数子字段中,或者业务流2的标识在APN标识子字段和APN参数子字段中这三种情况。业务流2的标识仅在APN标识子字段中的场景为,业务流2的APN标识与报文21所属业务流的APN标识相同,这种情况下可以不在APN参数子字段中额外携带业务流2的标识,网络设备4接收到报文21之后,解析发现APN参数子字段中未携带有业务流标识,则默认将APN标识子字段中的APN标识作为需要进行流量整形的业务流的标识。业务流2的标识仅在APN参数子字段中的场景为,业务流2的APN标识与报文21所属业务流的APN标识不同,这种情况下需要在APN参数子字段中额外携带业务流2的标识,网络设备4接收到报文21之后,解析得到APN参数子字段中携带的业务流标识,并将APN参数子字段中携带的业务流标识作为需要进行流量整形的业务流的标识。业务流2的标识在APN标识子字段和APN参数子字段中的场景为,业务流2的APN标识与报文21所属业务流的APN标识相同,这种情况下可以在APN参数子字段中额外携带业务流2的标识,网络设备4接收到报文21之后,解析发现APN参数子字段中携带有业务流标识,则可以将APN参数子字段中携带的业务流标识作为需要进行流量整形的业务流的标识。
本申请实施例中,网络设备通过在业务报文传递需要进行流量整形的业务流的标识以及该业务流对应的流量控制需求,例如需要进行流量整形的业务流为下行流,则网络设备可以在上行的业务报文中携带该业务流的标识以及该业务流对应的流量控制需求。这样无需在通信网络中传输额外的报文来传递信息,可以节约网络传输资源。
可选地,APN字段还携带有目标指示,该目标指示用于指示APN参数子字段包括流量控制需求。可选地,该APN字段还包括标志子字段和APN参数类型子字段。目标指示在标志子字段和/或APN参数类型子字段中。
例如,图10是本申请实施例提供的一种APN字段的结构示意图。如图10所示,该APN字段包括APN标 识类型子字段、标志子字段、APN参数类型子字段、APN ID子字段、意图(intent)子字段和APN参数子字段。APN标识类型子字段的长度和标志子字段的长度均为8比特,APN参数类型子字段的长度为16比特。其中,APN参数子字段用于承载需要进行流量整形的业务流的标识以及该业务流对应的流量控制需求。标志子字段可以用于指示APN参数子字段中携带的APN参数的类型,比如标志子字段设置为“V”,指示APN参数子字段包括流量控制需求。APN参数类型子字段也可以用于指示APN参数子字段中携带的APN参数的类型,比如预先定义或预先协商APN参数子字段设置为某个特定值,来指示APN参数子字段包括流量控制需求。APN字段中其他子字段的定义和解释可参考相关文献(draft-li-apn-header-03-Application-aware Networking(APN)Header),本申请实施例在此不再赘述。
可选地,网络设备3向网络设备4发送报文21的实现方式,包括:响应于网络设备3接收到属于业务流2的报文,或者业务流2在网络设备3上发生丢包,网络设备3向网络设备4发送报文21。也就是说,网络设备3可以在业务流2的首包触发下向网络设备4发送报文21,或者网络设备3可以在业务流2的丢包触发下向网络设备4发送报文21。
步骤604、网络设备4根据业务流2对应的流量控制需求对业务流2进行流量整形,以使网络设备4针对业务流2的发送速率小于或等于网络设备3针对业务流2的最大接收速率。
可选地,网络设备4的端口4的可用缓存大于网络设备3的端口3的可用缓存。端口4为网络设备4上用于转发业务流2的出端口。在业务流2对应的流量控制需求包括业务流2对应的分配缓存需求的情况下,网络设备4根据业务流2对应的流量控制需求对业务流2进行流量整形的一种实现方式为,当网络设备4上用于转发业务流2的出端口的可用缓存大于或等于业务流2对应的分配缓存需求时,网络设备4根据业务流2对应的流量控制需求对业务流2进行流量整形。此步骤604中网络设备4根据业务流2对应的流量控制需求对业务流2进行流量整形的实现方式,可参考上述步骤504中网络设备1根据业务流1对应的流量控制需求对业务流1进行流量整形的实现方式,本申请实施例在此不再赘述。
由于分布式控制方案中,可能出现下游设备所请求进行协同流量整形的上游设备无法满足下游设备的流量控制需求的情况,因此上游设备接收到流量整形请求之后,可以先进行判断自身是否满足流量控制需求。可选地,结合上述步骤603中的第二种可能实现方式,报文21为业务报文。网络设备4接收到报文21之后,在确定自身满足下游设备针对业务流2的流量控制需求的情况下,删除报文21的APN参数子字段中的业务流2对应的流量控制需求,得到报文22,然后网络设备4继续转发报文22。这样可以避免之后的网络设备对流量控制需求误识别。
进一步地,网络设备4根据业务流2对应的流量控制需求对业务流2进行流量整形之后,当通信网络中不存在业务流2时,网络设备4结束对业务流2进行流量整形。触发网络设备4结束对业务流2进行流量整形的方式有多种。
第一种实现方式,由网络设备4主动结束对业务流2进行流量整形。当网络设备4在目标时长内未接收到属于业务流2的报文时,网络设备4结束对业务流2进行流量整形。该目标时长可以是在网络设备4中设置的老化时长。
本申请实施例中,通过在网络设备4中设置老化时长,当网络设备4在老化时长内未接收到属于业务流2的报文时,结束对业务流2的识别处理,以及时释放处理资源。另外,网络设备2还可以删除存储的业务流2的标识与流量控制需求的对应关系,以释放存储资源。
第二种实现方式,由网络设备3触发网络设备4结束对业务流2进行流量整形。当网络设备3在目标时长内未接收到属于业务流2的报文时,网络设备3向网络设备4发送报文23。报文23用于指示网络设备4结束对业务流2进行流量整形。可选地,报文23为控制报文或业务报文,报文23的实现方式可参考报文21的实现方式,本申请实施例在此不再赘述。
可选地,在业务流2对应的流量控制需求包括业务流2对应的分配缓存需求的情况下,当网络设备4上用于转发业务流2的出端口的可用缓存小于业务流2对应的分配缓存需求时,网络设备4向网络设备5发送报文21。网络设备5位于业务流2的传输路径上、且网络设备4位于网络设备5的下游。比如,网络设备3为接入层设备,网络设备4为汇聚层设备,网络设备5为核心层设备。
本申请实施例中,当上游设备无法满足下游设备的流量控制需求时,该上游设备可以继续向上游设备转发用于请求流量整形的报文,以实现流量整形需求的扩散传递。
或者,在业务流2对应的流量控制需求包括业务流2对应的分配缓存需求的情况下,当网络设备4上用 于转发业务流2的出端口的可用缓存小于业务流2对应的分配缓存需求时,网络设备4向网络设备3发送请求应答报文,该请求应答报文用于指示网络设备4无法对业务流2进行流量整形。比如网络设备4只有100M缓存用于协同流量控制,现在已经帮助50条重保业务流进行协同流量控制,平均每条重保业务流耗费2M缓存,之后再来新的流控协同请求,网络设备4就可能拒绝。在考虑收敛比的情况下,如果网络设备4上的缓存收敛比为2:1,那么网络设备4还可以接受总耗费缓存不大于100M的多条重保业务流。
进一步地,网络设备3接收到用于指示网络设备4无法对业务流2进行流量整形的请求应答报文之后,可以向网络设备6发送报文24。报文24包括业务流2的标识和业务流2对应的流量控制需求。网络设备6位于业务流2的传输路径上、且网络设备3位于网络设备6的下游。报文24用于请求网络设备6对业务流2进行流量整形。可选地,报文24为控制报文或业务报文,报文24的实现方式可参考报文21的实现方式,本申请实施例在此不再赘述。
本申请实施例中,当下游设备向上游设备请求对业务流进行流量整形失败时,下游设备可以选择该业务流的传输路径上的其他上游设备对该业务流进行流量整形。例如,下游设备中可以配置有主协同流控设备和备协同流控设备,在下游设备为接入层设备的场景下,可以将汇聚层设备配置为主协同流控设备,将核心层设备配置为备协同流控设备。下游设备在向主协同流控设备请求流控协同失败后,再向备协同流控设备请求流控协同。
在本申请实施例提供的流量控制方法中,由下游设备向上游设备提供业务流对应的流量控制需求,以触发上游设备根据该流量控制需求对业务流进行流量整形。在上述业务流2是重保业务流的情况下,通过上游设备根据下游设备针对重保业务流的流量控制需求对重保业务流进行流量限速,可以避免由于重保业务流的微突发导致下游设备的缓存溢出所导致的丢包,从而保障重保业务流的传输效率。在上述业务流2是非重保业务流的情况下,通过上游设备根据下游设备针对非重保业务流的流量控制需求对非重保业务流进行流量限速,可以避免非重保业务流占用下游设备过多的带宽资源和缓存资源,预留更多的带宽资源和缓存资源给重保业务流,从而保障重保业务流的传输效率。本申请通过控制设备与通信网络中多个网络设备之间的协同实现流量控制,可以提高重保业务流的传输稳定性,从而可以提高重保业务流的传输效率。本申请实施例提供的方案在实施时,无需管理面参与,应用灵活性高。
又例如,图11是本申请实施例提供的又一种流量控制方法的实现流程示意图。如图11所示,方法1100包括但不限于步骤1101至步骤1104。该方法1100基于控制面或转发面协同实现,可以应用于如图4所示的应用场景。这种实现方式下,应用场景中可以不设置控制设备。该方法1100中的网络设备7例如是图4示出的网络设备401C,网络设备8例如是图4示出的网络设备401B或网络设备401A。或者,该方法1100中的网络设备7例如是图4示出的网络设备401B,网络设备8例如是图4示出的网络设备401A。
步骤1101、网络设备7获取网络设备7的端口信息,网络设备7位于业务流3的传输路径上。
网络设备7的端口信息包括端口7的端口速率。端口7为网络设备7上用于转发业务流3的出端口。可选地,网络设备7的端口信息还包括端口7的可用缓存。
可选地,业务流3为通信网络中的任一业务流。或者,业务流3为通信网络中的指定业务流。业务流3可以是重保业务流,或者业务流2也可以是非重保业务流。对业务流3的具体解释可参考上述步骤501中对业务流1的解释,本申请实施例在此不再赘述。
此步骤1101的实现方式可参考上述步骤601的实现方式,本申请实施例在此不再赘述。
步骤1102、网络设备7向网络设备8发送报文31,报文31包括业务流3的标识和网络设备7的端口信息,该端口信息包括网络设备7上用于转发业务流3的端口7的端口速率,报文31用于请求网络设备8对业务流3进行流量整形。
其中,网络设备8位于业务流3的传输路径上,且网络设备7位于网络设备8的下游,即业务流3在通信网络中传输时,先到达网络设备8,后到达网络设备7。换句话来说,网络设备8为位于业务流3的传输路径上的上游设备,网络设备7为位于业务流3的传输路径上的下游设备。其中,业务流3的标识可以采用业务流3的五元组中的一个或多个来表示,或者可以采用IPv4流标识或IPv6流标识来表示,又或者可以采用APN标识来表示。在网络设备7为接入层设备的情况下,网络设备8为汇聚层设备或核心层设备。可选地,业务流3为下行流,报文31为上行报文。
可选地,报文31为控制报文或业务报文。报文31的实现方式可参考报文21的实现方式,本申请实施例 在此不再赘述。报文31与报文21不同之处在于,报文31携带的是网络设备7的端口信息,取代报文21携带的业务流2对应的流量控制需求。
步骤1103、网络设备8根据业务流3的业务需求和网络设备7上用于转发业务流3的端口7的端口速率,确定业务流3对应的流量控制需求,该流量控制需求包括网络设备7针对业务流3的最大接收速率。
其中,网络设备7针对业务流3的最大接收速率小于或等于网络设备7的端口7的端口速率。可选地,业务流3的业务需求可以携带在报文31中由网络设备7发送给网络设备8。或者网络设备8也可以通过其它途径获取业务流3的业务需求。比如属于业务流3的报文中可以携带有业务需求。
此步骤1103的实现方式可参考上述步骤602的实现方式,本申请实施例在此不再赘述。
步骤1104、网络设备8根据业务流3对应的流量控制需求对业务流3进行流量整形,以使网络设备8针对业务流3的发送速率小于或等于网络设备7针对业务流3的最大接收速率。
此步骤1104的实现方式可参考上述步骤604的实现方式,本申请实施例在此不再赘述。
可选地,在业务流3对应的流量控制需求包括业务流3对应的分配缓存需求的情况下,当网络设备8上用于转发业务流3的出端口的可用缓存小于业务流3对应的分配缓存需求时,网络设备8可以向网络设备9转发报文31,或者,网络设备8也可以向网络设备9发送报文32,报文32包括业务流3的标识和业务流3对应的流量控制需求,这样无需网络设备9再计算业务流3对应的流量控制需求,可以节约网络设备的处理资源。网络设备9位于业务流3的传输路径上、且网络设备8位于网络设备9的下游。
在本申请实施例提供的流量控制方法中,由下游设备向上游设备提供用于计算业务流对应的流量控制需求的端口信息,以触发上游设备计算该业务流对应的流量控制需求,进一步根据该流量控制需求对业务流进行流量整形。在上述业务流3是重保业务流的情况下,通过上游设备根据下游设备针对重保业务流的流量控制需求对重保业务流进行流量限速,可以避免由于重保业务流的微突发导致下游设备的缓存溢出所导致的丢包,从而保障重保业务流的传输效率。在上述业务流3是非重保业务流的情况下,通过上游设备根据下游设备针对非重保业务流的流量控制需求对非重保业务流进行流量限速,可以避免非重保业务流占用下游设备过多的带宽资源和缓存资源,预留更多的带宽资源和缓存资源给重保业务流,从而保障重保业务流的传输效率。本申请通过控制设备与通信网络中多个网络设备之间的协同实现流量控制,可以提高重保业务流的传输稳定性,从而可以提高重保业务流的传输效率。本申请实施例提供的方案在实施时,无需管理面参与,应用灵活性高。
图12是本申请另一实施例提供的一种流量控制方法的流程示意图。该方法具体可以用于实现上述方法500、方法600或方法1100。如图12所示,该方法包括以下步骤1201至步骤1202。
步骤1201、第一网络设备获取目标业务流对应的流量控制需求,该流量控制需求包括第二网络设备针对目标业务流的最大接收速率,第一网络设备和第二网络设备均位于目标业务流的传输路径上、且第二网络设备位于第一网络设备的下游。
步骤1202、第一网络设备根据该流量控制需求对目标业务流进行流量整形,以使第一网络设备针对目标业务流的发送速率小于或等于最大接收速率。
当该方法具体用于实现上述方法500时,第一网络设备例如可以是网络设备1,第二网络设备例如可以是网络设备2,目标业务流例如可以是业务流1。当该方法具体用于实现上述方法600时,第一网络设备例如可以是网络设备4,第二网络设备例如可以是网络设备3,目标业务流例如可以是业务流2。当该方法具体用于实现上述方法1100时,第一网络设备例如可以是网络设备8,第二网络设备例如可以是网络设备7,目标业务流例如可以是业务流3。
可选地,第一网络设备的第一端口的可用缓存大于第二网络设备的第二端口的可用缓存,第一端口为第一网络设备上用于转发目标业务流的出端口,第二端口为第二网络设备上用于转发目标业务流的出端口。
可选地,目标业务流对应的流量控制需求还包括目标业务流对应的分配缓存需求,第一网络设备根据流量控制需求对目标业务流进行流量整形的实现方式,包括:当第一网络设备上目标业务流的实际缓存超出分配缓存需求时,第一网络设备对目标业务流进行丢包。
可选地,第一网络设备获取目标业务流对应的流量控制需求的一种实现方式,包括:第一网络设备接收控制设备发送的第一报文,第一报文包括目标业务流的标识和流量控制需求,第一报文用于指示第一网络设备对目标业务流进行流量整形。该实现方式具体用于实现上述方法500,第一网络设备例如可以是网 络设备1,目标业务流例如可以是业务流1,第一报文例如可以是报文11。
可选地,上述方法还包括:第一网络设备接收控制设备发送的第二报文,第二报文用于指示第一网络设备结束对目标业务流进行流量整形。该实现方式具体用于实现上述方法500,第一网络设备例如可以是网络设备1,目标业务流例如可以是业务流1,第二报文例如可以是报文12。
可选地,上述方法还包括:第一网络设备向控制设备发送端口信息,端口信息包括第一网络设备上一个或多个端口的端口速率。该实现方式具体用于实现上述方法500,第一网络设备例如可以是网络设备1。
可选地,第一网络设备获取目标业务流对应的流量控制需求的另一种实现方式,包括:第一网络设备接收第二网络设备发送的第三报文,第三报文包括目标业务流的标识和流量控制需求,第三报文用于请求第一网络设备对目标业务流进行流量整形。该实现方式具体用于实现上述方法600,第一网络设备例如可以是网络设备4,第二网络设备例如可以是网络设备3,目标业务流例如可以是业务流2,第三报文例如可以是报文21。
可选地,第三报文为控制报文。
可选地,第三报文为BGP更新消息,目标业务流的标识和流量控制需求在BGP更新消息的路径属性字段中。
可选地,第三报文为业务报文,业务报文包括APN字段,APN字段包括APN标识子字段和APN参数子字段,目标业务流的标识在APN标识子字段和/或APN参数子字段中,流量控制需求在APN参数子字段中。上述方法还包括:第一网络设备删除第三报文的APN参数子字段中的流量控制需求,得到第四报文;第一网络设备转发第四报文。该实现方式具体用于实现上述方法600,第一网络设备例如可以是网络设备4,第三报文例如可以是报文21,第四报文例如可以是报文22。
可选地,APN字段还携带有目标指示,目标指示用于指示APN参数子字段包括流量控制需求。
可选地,APN字段还包括标志子字段和APN参数类型子字段,目标指示在标志子字段和/或APN参数类型子字段中。
可选地,第一网络设备获取目标业务流对应的流量控制需求的又一种实现方式,包括:第一网络设备接收第二网络设备发送的第五报文,第五报文包括目标业务流的标识和第二网络设备的第二端口的端口速率,第二端口为第二网络设备上用于转发目标业务流的出端口,第五报文用于请求第一网络设备对目标业务流进行流量整形;第一网络设备根据目标业务流的业务需求和第二端口的端口速率,确定流量控制需求,最大接收速率小于或等于第二端口的端口速率。该实现方式具体用于实现上述方法1100,第一网络设备例如可以是网络设备8,第二网络设备例如可以是网络设备7,目标业务流例如可以是业务流3,第五报文例如可以是报文31。
可选地,业务需求包括目标业务流的传输速率需求,第一网络设备根据目标业务流的业务需求和第二端口的端口速率,确定流量控制需求的实现方式,包括:第一网络设备根据传输速率需求与第二端口的端口速率中的较小值确定最大接收速率。
可选地,流量控制需求还包括目标业务流对应的分配缓存需求,业务需求包括目标业务流的时延需求,第一网络设备根据目标业务流的业务需求和第二端口的端口速率,确定流量控制需求的实现方式,包括:第一网络设备根据目标业务流的发送端与目标业务流的接收端之间的往返时延、最大接收速率以及时延需求,确定分配缓存需求。
可选地,流量控制需求包括目标业务流对应的分配缓存需求,第一网络设备根据流量控制需求对目标业务流进行流量整形的实现方式,包括:当第一网络设备上用于转发目标业务流的出端口的可用缓存大于或等于分配缓存需求时,第一网络设备根据流量控制需求对目标业务流进行流量整形。
可选地,上述方法还包括:当第一网络设备上用于转发目标业务流的出端口的可用缓存小于分配缓存需求时,第一网络设备向第三网络设备发送第三报文,第三网络设备位于目标业务流的传输路径上、且第一网络设备位于第三网络设备的下游。该实现方式具体用于实现上述方法600或方法1100。该实现方式用于实现上述方法600时,第一网络设备例如可以是网络设备4,第二网络设备例如可以是网络设备3,第三网络设备例如可以是网络设备5,目标业务流例如可以是业务流2,第三报文例如可以是报文21。
可选地,上述方法还包括:当第一网络设备上用于转发目标业务流的出端口的可用缓存小于分配缓存需求时,第一网络设备向第二网络设备发送请求应答报文,请求应答报文用于指示第一网络设备无法对目标业务流进行流量整形。该实现方式具体用于实现上述方法600或方法1100。该实现方式用于实现上述方法 600时,第一网络设备例如可以是网络设备4,第二网络设备例如可以是网络设备3,目标业务流例如可以是业务流2。该实现方式用于实现上述方法1100时,第一网络设备例如可以是网络设备8,第二网络设备例如可以是网络设备7,目标业务流例如可以是业务流3。
可选地,上述方法还包括:第一网络设备接收第二网络设备发送的第六报文,第六报文用于指示第一网络设备结束对目标业务流进行流量整形。该实现方式具体用于实现上述方法600或方法1100。该实现方式用于实现上述方法600时,第一网络设备例如可以是网络设备4,第二网络设备例如可以是网络设备3,目标业务流例如可以是业务流2,第六报文例如可以是报文23。
可选地,上述方法还包括:当第一网络设备在目标时长内未接收到属于目标业务流的报文时,第一网络设备结束对目标业务流进行流量整形。
图13是本申请另一实施例提供的另一种流量控制方法的流程示意图。该方法具体可以用于实现上述方法500。如图13所示,该方法包括以下步骤1301至步骤1303。
步骤1301、控制设备获取多个网络设备的端口信息,该多个网络设备包括位于目标业务流的传输路径上的第一网络设备和第二网络设备、且第二网络设备位于第一网络设备的下游,第一网络设备的端口信息包括第一网络设备的第一端口的端口速率,第二网络设备的端口信息包括第二网络设备的第二端口的端口速率,第一端口为第一网络设备上用于转发目标业务流的出端口,第二端口为第二网络设备上用于转发目标业务流的出端口。
步骤1302、基于第二端口的端口速率小于第一端口的端口速率,控制设备根据目标业务流的业务需求和第二端口的端口速率,确定目标业务流对应的流量控制需求,该流量控制需求包括第二网络设备针对目标业务流的最大接收速率,该最大接收速率小于或等于第二端口的端口速率。
步骤1303、控制设备向第一网络设备发送第一报文,第一报文包括目标业务流的标识和流量控制需求,第一报文用于指示第一网络设备对目标业务流进行流量整形。
该方法具体用于实现上述方法500,第一网络设备例如可以是网络设备1,第二网络设备例如可以是网络设备2,目标业务流例如可以是业务流1,第一报文例如可以是报文11。
可选地,业务需求包括目标业务流的传输速率需求,控制设备根据目标业务流的业务需求和第二端口的端口速率,确定目标业务流对应的流量控制需求的实现方式,包括:控制设备根据传输速率需求与第二端口的端口速率中的较小值确定最大接收速率。
可选地,第一网络设备的端口信息还包括第一端口的可用缓存,第二网络设备的端口信息还包括第二端口的可用缓存,控制设备向第一网络设备发送第一报文的实现方式,包括:当第一端口的可用缓存大于第二端口的可用缓存时,控制设备向第一网络设备发送第一报文。
可选地,流量控制需求还包括目标业务流对应的分配缓存需求,业务需求包括目标业务流的时延需求,控制设备根据目标业务流的业务需求和第二端口的端口速率,确定目标业务流对应的流量控制需求的实现方式,包括:控制设备根据目标业务流的发送端与目标业务流的接收端之间的往返时延、最大接收速率以及时延需求,确定分配缓存需求,分配缓存需求用于第一网络设备在目标业务流的实际缓存超出分配缓存需求时对目标业务流进行丢包。
可选地,第二网络设备为接入层设备,第一网络设备为汇聚层设备或核心层设备。
可选地,第一网络设备为预先配置的用于对流经第一网络设备的业务流进行流量整形的网络设备。
可选地,第一网络设备为传输路径上的网络设备中用于转发目标业务流的出端口的可用缓存最大的网络设备。
可选地,第二网络设备为预先配置的、具有流量控制需求的网络设备,和/或,第二端口为预先配置的、具有流量控制需求的出端口。
可选地,在控制设备向第一网络设备发送第一报文之前,上述方法还包括:控制设备接收第二网络设备发送的流量整形请求,流量整形请求包括目标业务流的标识,流量整形请求用于请求对目标业务流进行流量整形。
可选地,上述方法还包括:控制设备接收第二网络设备发送的流量整形撤销请求,流量整形撤销请求用于请求结束对目标业务流进行流量整形;控制设备向第一网络设备发送第二报文,第二报文用于指示第一网络设备结束对目标业务流进行流量整形。该方法具体用于实现上述方法500,第二报文例如可以是报 文12。
图14是本申请另一实施例提供的又一种流量控制方法的流程示意图。该方法具体可以用于实现上述方法500、方法600或方法1100。如图14所示,该方法包括以下步骤1401至步骤1402。
步骤1401、获取第一网络设备的端口信息,第一网络设备位于目标业务流的传输路径上,该端口信息包括目标端口的端口速率,目标端口为第一网络设备上用于转发目标业务流的出端口。
步骤1402、根据目标业务流的业务需求和端口速率,确定目标业务流对应的流量控制需求,该流量控制需求包括第一网络设备针对目标业务流的最大接收速率,该最大接收速率小于或等于端口速率。
当该方法具体用于实现上述方法500时,该方法可以应用于控制设备,第一网络设备例如可以是网络设备2,目标业务流例如可以是业务流1。当该方法具体用于实现上述方法600时,该方法可以应用于网络设备3,第一网络设备例如可以是网络设备3,目标业务流例如可以是业务流2。当该方法具体用于实现上述方法1100时,该方法可以应用于网络设备8,第一网络设备例如可以是网络设备7,目标业务流例如可以是业务流3。
可选地,业务需求包括目标业务流的传输速率需求,根据目标业务流的业务需求和端口速率,确定目标业务流对应的流量控制需求的实现方式,包括:根据传输速率需求与端口速率中的较小值确定最大接收速率。
可选地,流量控制需求还包括目标业务流对应的分配缓存需求,业务需求包括目标业务流的时延需求,根据目标业务流的业务需求和端口速率,确定目标业务流对应的流量控制需求的实现方式,包括:根据目标业务流的发送端与目标业务流的接收端之间的往返时延、最大接收速率以及时延需求,确定分配缓存需求,分配缓存需求用于在目标业务流的实际缓存超出分配缓存需求时对目标业务流进行丢包。
可选地,该方法应用于第一网络设备,在根据目标业务流的业务需求和端口速率,确定目标业务流对应的流量控制需求之后,上述方法还包括:向第二网络设备发送第一报文,第一报文包括目标业务流的标识和流量控制需求,第二网络设备位于目标业务流的传输路径上、且第一网络设备位于第二网络设备的下游,第一报文用于请求第二网络设备对目标业务流进行流量整形。该方法具体用于实现上述方法600,第一网络设备例如可以是网络设备3,第二网络设备例如可以是网络设备4,目标业务流例如可以是业务流2,第一报文例如可以是报文21。
可选地,第一网络设备向第二网络设备发送第一报文的实现方式,包括:响应于第一网络设备接收到属于目标业务流的报文,或者目标业务流在第一网络设备上发生丢包,第一网络设备向第二网络设备发送第一报文。
可选地,第一报文为控制报文。
可选地,第一报文为BGP更新消息,目标业务流的标识和流量控制需求在BGP更新消息的路径属性字段中。
可选地,第一报文为业务报文,业务报文包括APN字段,APN字段包括APN标识子字段和APN参数子字段,目标业务流的标识在APN标识子字段和/或APN参数子字段中,流量控制需求在APN参数子字段中。
可选地,APN字段还携带有指示,指示用于指示APN参数子字段包括流量控制需求。
可选地,APN字段还包括标志子字段和APN参数类型子字段,指示在标志子字段和/或APN参数类型子字段中。
可选地,上述方法还包括:第一网络设备接收第二网络设备发送的第一报文对应的请求应答报文,请求应答报文用于指示第二网络设备无法对目标业务流进行流量整形;第一网络设备向第三网络设备发送第二报文,第二报文包括目标业务流的标识和流量控制需求,第三网络设备位于目标业务流的传输路径上、且第一网络设备位于第三网络设备的下游,第二报文用于请求第一网络设备对目标业务流进行流量整形。该方法具体用于实现上述方法600,第一网络设备例如可以是网络设备3,第二网络设备例如可以是网络设备4,第三网络设备例如可以是网络设备6,目标业务流例如可以是业务流2,第二报文例如可以是报文24。
可选地,上述方法还包括:当第一网络设备在目标时长内未接收到属于目标业务流的报文时,第一网络设备向第二网络设备发送第三报文,第三报文用于指示第二网络设备结束对目标业务流进行流量整形。该方法具体用于实现上述方法600,第一网络设备例如可以是网络设备3,第二网络设备例如可以是网络设备4,目标业务流例如可以是业务流2,第三报文例如可以是报文23。
图15是本申请另一实施例提供的再一种流量控制方法的流程示意图。该方法具体可以用于实现上述方法1100。如图15所示,该方法包括以下步骤1501至步骤1502。
步骤1501、第一网络设备获取第一网络设备的端口信息,第一网络设备位于目标业务流的传输路径上,该端口信息包括目标端口的端口速率,目标端口为第一网络设备上用于转发目标业务流的出端口。
步骤1502、第一网络设备向第二网络设备发送目标报文,目标报文包括目标业务流的标识和该端口信息,第二网络设备位于目标业务流的传输路径上、且第一网络设备位于第二网络设备的下游,目标报文用于请求第二网络设备对目标业务流进行流量整形。
该方法具体用于实现上述方法1100,第一网络设备例如可以是网络设备7,第二网络设备例如可以是网络设备8,目标业务流例如可以是业务流3,目标报文例如可以是报文31。
可选地,目标报文为BGP更新消息,目标业务流的标识和端口信息在BGP更新消息的路径属性字段中。
可选地,目标报文为业务报文,业务报文包括APN字段,APN字段包括APN标识子字段和APN参数子字段,目标业务流的标识在APN标识子字段和/或APN参数子字段中,端口信息在APN参数子字段中。
可选地,APN字段还携带有目标指示,目标指示用于指示APN参数子字段包括端口信息。
可选地,APN字段还包括标志子字段和APN参数类型子字段,目标指示在标志子字段和/或APN参数类型子字段中。
以下对本申请实施例的虚拟装置举例说明。
图16是本申请实施例提供的一种流量控制装置的结构示意图。该装置应用于第一网络设备。如图16所示,装置1600包括但不限于:获取模块1601和流量整形模块1602。可选地,该装置1600还包括发送模块1603和/或删除模块1604。可选地,获取模块1601包括接收模块,该获取模块1601还可以包括确定模块。
获取模块1601,用于获取目标业务流对应的流量控制需求,该流量控制需求包括第二网络设备针对目标业务流的最大接收速率,第一网络设备和第二网络设备均位于目标业务流的传输路径上、且第二网络设备位于第一网络设备的下游。具体实现过程可以参考方法500中的步骤503的详细描述,或者参考方法600中的步骤603的详细描述,或者参考方法1100中的步骤1102至步骤1103的详细描述,这里不再赘述。
流量整形模块1602,用于根据该流量控制需求对目标业务流进行流量整形,以使第一网络设备针对目标业务流的发送速率小于或等于最大接收速率。具体实现过程可以参考方法500中的步骤504的详细描述,或者参考方法600中的步骤604的详细描述,或者参考方法1100中的步骤1104的详细描述,这里不再赘述。
可选地,第一网络设备的第一端口的可用缓存大于第二网络设备的第二端口的可用缓存,第一端口为第一网络设备上用于转发目标业务流的出端口,第二端口为第二网络设备上用于转发目标业务流的出端口。
可选地,该流量控制需求还包括目标业务流对应的分配缓存需求,流量整形模块1602,用于:当第一网络设备上目标业务流的实际缓存超出分配缓存需求时,对目标业务流进行丢包。
可选地,接收模块,用于接收控制设备发送的第一报文,第一报文包括目标业务流的标识和流量控制需求,第一报文用于指示第一网络设备对目标业务流进行流量整形。
可选地,接收模块,还用于接收控制设备发送的第二报文,第二报文用于指示第一网络设备结束对目标业务流进行流量整形。
可选地,发送模块1603,用于向控制设备发送端口信息,端口信息包括第一网络设备上一个或多个端口的端口速率。
可选地,接收模块用于接收第二网络设备发送的第三报文,第三报文包括目标业务流的标识和流量控制需求,第三报文用于请求第一网络设备对目标业务流进行流量整形。
可选地,第三报文为控制报文。
可选地,第三报文为BGP更新消息,目标业务流的标识和流量控制需求在BGP更新消息的路径属性字段中。
可选地,第三报文为业务报文,业务报文包括APN字段,APN字段包括APN标识子字段和APN参数子字段,目标业务流的标识在APN标识子字段和/或APN参数子字段中,流量控制需求在APN参数子字段中。删除模块1604,用于删除第三报文的APN参数子字段中的流量控制需求,得到第四报文;发送模块1603,用于转发第四报文。
可选地,APN字段还携带有目标指示,目标指示用于指示APN参数子字段包括流量控制需求。
可选地,APN字段还包括标志子字段和APN参数类型子字段,目标指示在标志子字段和/或APN参数类型子字段中。
可选地,接收模块,用于接收第二网络设备发送的第五报文,第五报文包括目标业务流的标识和第二网络设备的第二端口的端口速率,第二端口为第二网络设备上用于转发目标业务流的出端口,第五报文用于请求第一网络设备对目标业务流进行流量整形;确定模块,用于根据目标业务流的业务需求和第二端口的端口速率,确定流量控制需求,最大接收速率小于或等于第二端口的端口速率。
可选地,业务需求包括目标业务流的传输速率需求,确定模块,用于:根据传输速率需求与第二端口的端口速率中的较小值确定最大接收速率。
可选地,流量控制需求还包括目标业务流对应的分配缓存需求,业务需求包括目标业务流的时延需求,确定模块,用于:根据目标业务流的发送端与目标业务流的接收端之间的往返时延、最大接收速率以及时延需求,确定分配缓存需求。
可选地,流量控制需求包括目标业务流对应的分配缓存需求,流量整形模块1602,用于当第一网络设备上用于转发目标业务流的出端口的可用缓存大于或等于分配缓存需求时,根据流量控制需求对目标业务流进行流量整形。
可选地,发送模块1603,用于当第一网络设备上用于转发目标业务流的出端口的可用缓存小于分配缓存需求时,向第三网络设备发送第三报文,第三网络设备位于目标业务流的传输路径上、且第一网络设备位于第三网络设备的下游。
可选地,发送模块1603,用于当第一网络设备上用于转发目标业务流的出端口的可用缓存小于分配缓存需求时,向第二网络设备发送请求应答报文,请求应答报文用于指示第一网络设备无法对目标业务流进行流量整形。
可选地,接收模块,还用于接收第二网络设备发送的第六报文,第六报文用于指示第一网络设备结束对目标业务流进行流量整形。
可选地,流量整形模块1602,还用于当第一网络设备在目标时长内未接收到属于目标业务流的报文时,结束对目标业务流进行流量整形。
图17是本申请实施例提供的另一种流量控制装置的结构示意图。该装置应用于控制设备。如图17所示,装置1700包括但不限于:获取模块1701、确定模块1702和发送模块1703。可选地,该装置1700还包括接收模块1704。
获取模块1701,用于获取多个网络设备的端口信息,多个网络设备包括位于目标业务流的传输路径上的第一网络设备和第二网络设备、且第二网络设备位于第一网络设备的下游,第一网络设备的端口信息包括第一网络设备的第一端口的端口速率,第二网络设备的端口信息包括第二网络设备的第二端口的端口速率,第一端口为第一网络设备上用于转发目标业务流的出端口,第二端口为第二网络设备上用于转发目标业务流的出端口。具体实现过程可以参考方法500中的步骤501的详细描述,这里不再赘述。
确定模块1702,用于基于第二端口的端口速率小于第一端口的端口速率,根据目标业务流的业务需求和第二端口的端口速率,确定目标业务流对应的流量控制需求,流量控制需求包括第二网络设备针对目标业务流的最大接收速率,最大接收速率小于或等于第二端口的端口速率。具体实现过程可以参考方法500中的步骤502的详细描述,这里不再赘述。
发送模块1703,用于向第一网络设备发送第一报文,第一报文包括目标业务流的标识和流量控制需求,第一报文用于指示第一网络设备对目标业务流进行流量整形。具体实现过程可以参考方法500中的步骤503的详细描述,这里不再赘述。
可选地,业务需求包括目标业务流的传输速率需求,确定模块1702,用于根据传输速率需求与第二端口的端口速率中的较小值确定最大接收速率。
可选地,第一网络设备的端口信息还包括第一端口的可用缓存,第二网络设备的端口信息还包括第二端口的可用缓存,发送模块1703,用于当第一端口的可用缓存大于第二端口的可用缓存时,向第一网络设备发送第一报文。
可选地,流量控制需求还包括目标业务流对应的分配缓存需求,业务需求包括目标业务流的时延需求, 确定模块1702,用于:根据目标业务流的发送端与目标业务流的接收端之间的往返时延、最大接收速率以及时延需求,确定分配缓存需求,分配缓存需求用于第一网络设备在目标业务流的实际缓存超出分配缓存需求时对目标业务流进行丢包。
可选地,第二网络设备为接入层设备,第一网络设备为汇聚层设备或核心层设备。
可选地,第一网络设备为预先配置的用于对流经第一网络设备的业务流进行流量整形的网络设备。
可选地,第一网络设备为传输路径上的网络设备中用于转发目标业务流的出端口的可用缓存最大的网络设备。
可选地,第二网络设备为预先配置的、具有流量控制需求的网络设备,和/或,第二端口为预先配置的、具有流量控制需求的出端口。
可选地,接收模块1704,用于在控制设备向第一网络设备发送第一报文之前,接收第二网络设备发送的流量整形请求,流量整形请求包括目标业务流的标识,流量整形请求用于请求对目标业务流进行流量整形。
可选地,接收模块1704,还用于接收第二网络设备发送的流量整形撤销请求,流量整形撤销请求用于请求结束对目标业务流进行流量整形;发送模块,还用于向第一网络设备发送第二报文,第二报文用于指示第一网络设备结束对目标业务流进行流量整形。
图18是本申请实施例提供的又一种流量控制装置的结构示意图。如图18所示,装置1800包括但不限于:获取模块1801和确定模块1802。可选地,该装置1800还包括发送模块1803和接收模块1804。
获取模块1801,用于获取第一网络设备的端口信息,第一网络设备位于目标业务流的传输路径上,端口信息包括目标端口的端口速率,目标端口为第一网络设备上用于转发目标业务流的出端口。具体实现过程可以参考方法500中的步骤501的详细描述,或者参考方法600中的步骤601的详细描述,或者参考方法1100中的步骤1101的详细描述,这里不再赘述。
确定模块1802,用于根据目标业务流的业务需求和端口速率,确定目标业务流对应的流量控制需求,流量控制需求包括第一网络设备针对目标业务流的最大接收速率,最大接收速率小于或等于端口速率。具体实现过程可以参考方法500中的步骤502的详细描述,或者参考方法600中的步骤602的详细描述,或者参考方法1100中的步骤1103的详细描述,这里不再赘述。
可选地,业务需求包括目标业务流的传输速率需求,确定模块1802,用于根据传输速率需求与端口速率中的较小值确定最大接收速率。
可选地,流量控制需求还包括目标业务流对应的分配缓存需求,业务需求包括目标业务流的时延需求,确定模块1802,用于根据目标业务流的发送端与目标业务流的接收端之间的往返时延、最大接收速率以及时延需求,确定分配缓存需求,分配缓存需求用于在目标业务流的实际缓存超出分配缓存需求时对目标业务流进行丢包。
可选地,装置应用于第一网络设备,发送模块1803,用于在根据目标业务流的业务需求和端口速率,确定目标业务流对应的流量控制需求之后,向第二网络设备发送第一报文,第一报文包括目标业务流的标识和流量控制需求,第二网络设备位于目标业务流的传输路径上、且第一网络设备位于第二网络设备的下游,第一报文用于请求第二网络设备对目标业务流进行流量整形。具体实现过程可以参考方法600中的步骤603的详细描述,这里不再赘述。
可选地,发送模块1803,用于响应于第一网络设备接收到属于目标业务流的报文,或者目标业务流在第一网络设备上发生丢包,向第二网络设备发送第一报文。
可选地,第一报文为控制报文。
可选地,第一报文为BGP更新消息,目标业务流的标识和流量控制需求在BGP更新消息的路径属性字段中。
可选地,第一报文为业务报文,业务报文包括APN字段,APN字段包括APN标识子字段和APN参数子字段,目标业务流的标识在APN标识子字段和/或APN参数子字段中,流量控制需求在APN参数子字段中。
可选地,APN字段还携带有指示,指示用于指示APN参数子字段包括流量控制需求。
可选地,APN字段还包括标志子字段和APN参数类型子字段,指示在标志子字段和/或APN参数类型子字段中。
可选地,接收模块1804,用于接收第二网络设备发送的第一报文对应的请求应答报文,请求应答报文用于指示第二网络设备无法对目标业务流进行流量整形;发送模块1803,还用于向第三网络设备发送第二报文,第二报文包括目标业务流的标识和流量控制需求,第三网络设备位于目标业务流的传输路径上、且第一网络设备位于第三网络设备的下游,第二报文用于请求第一网络设备对目标业务流进行流量整形。
可选地,发送模块1803,还用于当第一网络设备在目标时长内未接收到属于目标业务流的报文时,向第二网络设备发送第三报文,第三报文用于指示第二网络设备结束对目标业务流进行流量整形。
图19是本申请实施例提供的再一种流量控制装置的结构示意图。如图19所示,装置1900包括但不限于:获取模块1901和发送模块1902。
获取模块1901,用于获取第一网络设备的端口信息,第一网络设备位于目标业务流的传输路径上,端口信息包括目标端口的端口速率,目标端口为第一网络设备上用于转发目标业务流的出端口。具体实现过程可以参考方法1100中的步骤1101的详细描述,这里不再赘述。
发送模块1902,用于向第二网络设备发送目标报文,目标报文包括目标业务流的标识和端口信息,第二网络设备位于目标业务流的传输路径上、且第一网络设备位于第二网络设备的下游,目标报文用于请求第二网络设备对目标业务流进行流量整形。具体实现过程可以参考方法1100中的步骤1102的详细描述,这里不再赘述。
可选地,发送模块1902,用于响应于第一网络设备接收到属于目标业务流的报文,或者目标业务流在第一网络设备上发生丢包,向第二网络设备发送目标报文。
可选地,目标报文为BGP更新消息,目标业务流的标识和端口信息在BGP更新消息的路径属性字段中。
可选地,目标报文为业务报文,业务报文包括APN字段,APN字段包括APN标识子字段和APN参数子字段,目标业务流的标识在APN标识子字段和/或APN参数子字段中,端口信息在APN参数子字段中。
可选地,APN字段还携带有目标指示,目标指示用于指示APN参数子字段包括端口信息。
可选地,APN字段还包括标志子字段和APN参数类型子字段,目标指示在标志子字段和/或APN参数类型子字段中。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
以下对本申请实施例涉及的硬件结构举例说明。
图20是本申请实施例提供的一种网络设备的硬件结构示意图。如图20所示,网络设备2000包括处理器2001、转发芯片2002和至少一个网络接口2003。可选地,结合图4来看,图20中的网络设备2000是图4所示的任一网络设备401。
可选地,处理器2001包括中央处理器(central processing unit,CPU)和/或专用硬件芯片。CPU是指通用的CPU,其扩展性和灵活性较高。CPU例如是一个单核处理器(single-CPU),又如是一个多核处理器(multi-CPU)。专用硬件芯片是一个高性能处理的硬件模块。专用硬件芯片包括专用集成电路(application-specific integrated circuit,ASIC)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)或者网络处理器(network processer,NP)中的至少一项。
转发芯片2002用于进行请求以及数据的转发。例如,转发芯片2002用于网络设备2000收发报文。
至少一个网络接口2003例如包括图20中的网络接口1、网络接口2、网络接口3……网络接口n。网络接口2003使用任何收发器一类的装置,用于与其它设备或通信网络通信。例如,图20中的网络接口1与控制设备通信,图20中的网络接口2与其他网络设备通信。可选地,网络接口2003包括有线网络接口或者无线网络接口中的至少一项。其中,有线网络接口例如为以太网接口。以太网接口例如是光接口,电接口或其组合。无线网络接口例如为无线受保护网络(wireless local area networks,WLAN)接口,蜂窝网络接口或其组合等。
至少一个网络接口2003与转发芯片2002之间,以及转发芯片2002与处理器2001之间通过内部连接2004相连。内部连接2004包括一通路,在网络接口2003、转发芯片2002与处理器2001之间传输数据。可选的,内部连接2004是单板或总线。例如,内部连接2004为以太网、光纤信道(fibre channel)、PCI-E(peripheral component interconnect express,PCI Express,一种高速串行计算机总线)、RapidIO(一种高性能、低引脚 数、基于数据包交换的互连体系结构)、无限带宽(InfiniBand)或XAUI总线(一个接口扩展器,特点是把以太网媒体访问控制(Media Access Control,MAC)层与物理层相连)。
可选地,网络设备2000还包括内容可寻址存储器(content addressable memory,CAM)2005。CAM 2005例如是三态内容寻址存储器(ternary content addressable memory,TCAM)等。CAM 2005例如用于存储记录业务流标识与流量控制需求的对应关系。可选地,CAM 2005独立存在,并通过上述内部连接2004与转发芯片2002相连接。或者,CAM 2005和转发芯片2002集成在一起,即CAM 2005作为转发芯片2002内部的存储器。
可选地,网络设备2000还包括存储器2006。存储器2006例如是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,又如是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,又如是电可擦可编程只读存储器(electrically erasable programmable read-only Memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码2008并能够由计算机存取的任何其它介质,但不限于此。存储器2006例如是独立存在,并通过内部连接2004与处理器2001相连接。或者存储器2006和处理器2001集成在一起。
存储器2006中存储有操作系统2007和程序代码2008。可选地,处理器2001从存储器2006中读取操作系统2007并运行该操作系统2007,处理器2001还从存储器2006读取程序代码2008,通过在该操作系统2007上运行该程序代码2008实现本申请实施例提供的上述方法中任一网络设备执行的动作。
可选地,上述器件分别设置在彼此独立的芯片上,或者至少部分的或者全部的设置在同一块芯片上。将各个器件独立设置在不同的芯片上,还是整合设置在一个或者多个芯片上,往往取决于产品设计的需要。本申请实施例对上述器件的具体实现形式不做限定。
例如,图21是本申请实施例提供的一种控制设备的硬件结构示意图。如图21所示,控制设备2100包括处理器2101和存储器2102,存储器2101与存储器2102通过总线2103连接。图21以处理器2101和存储器2102相互独立说明。可选地,处理器2101和存储器2102集成在一起。可选地,结合图4来看,图21中的控制设备2100是图4所示的控制设备402。
其中,存储器2102用于存储计算机程序,计算机程序包括操作系统和程序代码。存储器2102是各种类型的存储介质,例如ROM、RAM、EEPROM、CD-ROM、闪存、光存储器、寄存器、光盘存储、光碟存储、磁盘或者其它磁存储设备。
其中,处理器2101是通用处理器或专用处理器。处理器2101可能是单核处理器或多核处理器。处理器2101包括至少一个电路,以执行本申请实施例提供的上述方法500中控制设备设备执行的动作。
可选地,控制设备2100还包括网络接口2104,网络接口2104通过总线2103与处理器2101和存储器2102连接。网络接口2104能够实现控制设备2100与网络设备通信。处理器2101能够通过网络接口2104与网络设备交互来控制和管理网络设备。
可选地,控制设备2100还包括输入/输出(input/output,I/O)接口2105,I/O接口2105通过总线2103与处理器2101和存储器2102连接。处理器2101能够通过I/O接口2105接收输入的命令或数据等。I/O接口2105用于控制设备2100连接输入设备,这些输入设备例如是键盘、鼠标等。可选地,在一些可能的场景中,上述网络接口2104和I/O接口2105被统称为通信接口。
可选地,控制设备2100还包括显示器2106,显示器2106通过总线2103与处理器2101和存储器2102连接。显示器2106能够用于显示处理器2101执行上述方法产生的中间结果和/或最终结果等。在一种可能的实现方式中,显示器2106是触控显示屏,以提供人机交互接口。
其中,总线2103是任何类型的,用于实现控制设备2100的内部器件互连的通信总线。例如系统总线。本申请实施例以控制设备2100内部的上述器件通过总线2103互连为例说明,可选地,控制设备2100内部的上述器件采用除了总线2103之外的其他连接方式彼此通信连接,例如控制设备2100内部的上述器件通过控制设备2100内部的逻辑接口互连。
上述器件可以分别设置在彼此独立的芯片上,也可以至少部分的或者全部的设置在同一块芯片上。将各个器件独立设置在不同的芯片上,还是整合设置在一个或者多个芯片上,往往取决于产品设计的需要。 本申请实施例对上述器件的具体实现形式不做限定。
图21所示的控制设备2100仅仅是示例性的,在实现过程中,控制设备2100包括其他组件,本文不再一一列举。图21所示的控制设备2100可以通过执行上述实施例提供的方法500中的步骤501至步骤503来实现流量控制。
以下对本申请实施例涉及的系统结构举例说明。
本申请实施例提供了一种流量控制系统,包括:控制设备和多个网络设备。其中,控制设备用于获取多个网络设备的端口信息,多个网络设备包括位于目标业务流的传输路径上的第一网络设备和第二网络设备、且第二网络设备位于第一网络设备的下游,第一网络设备的端口信息包括第一网络设备的第一端口的端口速率,第二网络设备的端口信息包括第二网络设备的第二端口的端口速率,第一端口为第一网络设备上用于转发目标业务流的出端口,第二端口为第二网络设备上用于转发目标业务流的出端口。控制设备还用于在第二端口的端口速率小于第一端口的端口速率的情况下,根据目标业务流的业务需求和第二端口的端口速率,确定目标业务流对应的流量控制需求,流量控制需求包括第二网络设备针对目标业务流的最大接收速率,最大接收速率小于或等于第二端口的端口速率。控制设备还用于向第一网络设备发送报文,报文包括目标业务流的标识和流量控制需求,报文用于指示第一网络设备对目标业务流进行流量整形。第一网络设备用于根据流量控制需求对目标业务流进行流量整形,以使第一网络设备针对目标业务流的发送速率小于或等于最大接收速率。
可选地,该流量控制系统中的控制设备可以是上述方法500中的控制设备,第一网络设备可以是上述方法500中的网络设备1,第二网络设备可以是上述方法500中的网络设备2。
本申请实施例还提供了另一种流量控制系统,包括:多个网络设备,多个网络设备包括第一网络设备和第二网络设备,第一网络设备和第二网络设备均位于目标业务流的传输路径上、且第二网络设备位于第一网络设备的下游。第二网络设备用于获取第二网络设备的端口信息,端口信息包括目标端口的端口速率,目标端口为第二网络设备上用于转发目标业务流的出端口。第二网络设备还用于根据目标业务流的业务需求和端口速率,确定目标业务流对应的流量控制需求,流量控制需求包括第二网络设备针对目标业务流的最大接收速率,最大接收速率小于或等于端口速率。第二网络设备还用于向第一网络设备发送报文,报文包括目标业务流的标识和流量控制需求,报文用于请求第一网络设备对目标业务流进行流量整形。第一网络设备用于根据流量控制需求对目标业务流进行流量整形,以使第一网络设备针对目标业务流的发送速率小于或等于最大接收速率。
可选地,该流量控制系统中的第一网络设备可以是上述方法600中的网络设备4,第二网络设备可以是上述方法600中的网络设备3。
本申请实施例还提供了又一种流量控制系统,包括:多个网络设备,多个网络设备包括第一网络设备和第二网络设备,第一网络设备和第二网络设备均位于目标业务流的传输路径上、且第二网络设备位于第一网络设备的下游。第二网络设备用于获取第二网络设备的端口信息,端口信息包括目标端口的端口速率,目标端口为第二网络设备上用于转发目标业务流的出端口。第二网络设备还用于向第一网络设备发送报文,报文包括目标业务流的标识和端口信息,报文用于请求第一网络设备对目标业务流进行流量整形。第一网络设备用于根据目标业务流的业务需求和端口速率,确定目标业务流对应的流量控制需求,流量控制需求包括第二网络设备针对目标业务流的最大接收速率,最大接收速率小于或等于端口速率。第一网络设备还用于根据流量控制需求对目标业务流进行流量整形,以使第一网络设备针对目标业务流的发送速率小于或等于最大接收速率。
可选地,该流量控制系统中的第一网络设备可以是上述方法1100中的网络设备8,第二网络设备可以是上述方法1100中的网络设备7。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
在本申请实施例中,术语“第一”、“第二”和“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。
本申请中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
需要说明的是,本申请所涉及的信息(包括但不限于用户设备信息、用户个人信息等)、数据(包括但不限于用于分析的数据、存储的数据、展示的数据等)以及信号,均为经用户授权或者经过各方充分授权的,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的构思和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (54)

  1. 一种流量控制方法,其特征在于,所述方法包括:
    第一网络设备获取目标业务流对应的流量控制需求,所述流量控制需求包括第二网络设备针对所述目标业务流的最大接收速率,所述第一网络设备和所述第二网络设备均位于所述目标业务流的传输路径上、且所述第二网络设备位于所述第一网络设备的下游;
    所述第一网络设备根据所述流量控制需求对所述目标业务流进行流量整形,以使所述第一网络设备针对所述目标业务流的发送速率小于或等于所述最大接收速率。
  2. 根据权利要求1所述的方法,其特征在于,所述第一网络设备的第一端口的可用缓存大于所述第二网络设备的第二端口的可用缓存,所述第一端口为所述第一网络设备上用于转发所述目标业务流的出端口,所述第二端口为所述第二网络设备上用于转发所述目标业务流的出端口。
  3. 根据权利要求1或2所述的方法,其特征在于,所述流量控制需求还包括所述目标业务流对应的分配缓存需求,所述第一网络设备根据所述流量控制需求对所述目标业务流进行流量整形,包括:
    当所述第一网络设备上所述目标业务流的实际缓存超出所述分配缓存需求时,所述第一网络设备对所述目标业务流进行丢包。
  4. 根据权利要求1至3任一所述的方法,其特征在于,所述第一网络设备获取目标业务流对应的流量控制需求,包括:
    所述第一网络设备接收控制设备发送的第一报文,所述第一报文包括所述目标业务流的标识和所述流量控制需求,所述第一报文用于指示所述第一网络设备对所述目标业务流进行流量整形。
  5. 根据权利要求4所述的方法,其特征在于,在所述第一网络设备接收控制设备发送的第一报文之后,所述方法还包括:
    所述第一网络设备接收所述控制设备发送的第二报文,所述第二报文用于指示所述第一网络设备结束对所述目标业务流进行流量整形。
  6. 根据权利要求4或5所述的方法,其特征在于,所述方法还包括:
    所述第一网络设备向所述控制设备发送端口信息,所述端口信息包括所述第一网络设备上一个或多个端口的端口速率。
  7. 根据权利要求1至3任一所述的方法,其特征在于,所述第一网络设备获取目标业务流对应的流量控制需求,包括:
    所述第一网络设备接收所述第二网络设备发送的第三报文,所述第三报文包括所述目标业务流的标识和所述流量控制需求,所述第三报文用于请求所述第一网络设备对所述目标业务流进行流量整形。
  8. 根据权利要求7所述的方法,其特征在于,所述第三报文为控制报文。
  9. 根据权利要求8所述的方法,其特征在于,所述第三报文为边界网关协议BGP更新消息,所述目标业务流的标识和所述流量控制需求在所述BGP更新消息的路径属性字段中。
  10. 根据权利要求7至9任一所述的方法,其特征在于,所述第三报文为业务报文,所述业务报文包括应用感知网络APN字段,所述APN字段包括APN标识子字段和APN参数子字段,所述目标业务流的标识在所述APN标识子字段和/或所述APN参数子字段中,所述流量控制需求在所述APN参数子字段中;所述方法还包括:
    所述第一网络设备删除所述第三报文的所述APN参数子字段中的所述流量控制需求,得到第四报文;
    所述第一网络设备转发所述第四报文。
  11. 根据权利要求10所述的方法,其特征在于,所述APN字段还携带有目标指示,所述目标指示用于指示所述APN参数子字段包括所述流量控制需求。
  12. 根据权利要求11所述的方法,其特征在于,所述APN字段还包括标志子字段和APN参数类型子字段,所述目标指示在所述标志子字段和/或所述APN参数类型子字段中。
  13. 根据权利要求1至3任一所述的方法,其特征在于,所述第一网络设备获取目标业务流对应的流量控制需求,包括:
    所述第一网络设备接收所述第二网络设备发送的第五报文,所述第五报文包括所述目标业务流的标识和所述第二网络设备的第二端口的端口速率,所述第二端口为所述第二网络设备上用于转发所述目标业务流的出端口,所述第五报文用于请求所述第一网络设备对所述目标业务流进行流量整形;
    所述第一网络设备根据所述目标业务流的业务需求和所述第二端口的端口速率,确定所述流量控制需求,所述最大接收速率小于或等于所述第二端口的端口速率。
  14. 根据权利要求13所述的方法,其特征在于,所述业务需求包括所述目标业务流的传输速率需求,所述第一网络设备根据所述目标业务流的业务需求和所述第二端口的端口速率,确定所述流量控制需求,包括:
    所述第一网络设备根据所述传输速率需求与所述第二端口的端口速率中的较小值确定所述最大接收速率。
  15. 根据权利要求13或14所述的方法,其特征在于,所述流量控制需求还包括所述目标业务流对应的分配缓存需求,所述业务需求包括所述目标业务流的时延需求,所述第一网络设备根据所述目标业务流的业务需求和所述第二端口的端口速率,确定所述流量控制需求,包括:
    所述第一网络设备根据所述目标业务流的发送端与所述目标业务流的接收端之间的往返时延、所述最大接收速率以及所述时延需求,确定所述分配缓存需求。
  16. 根据权利要求7至15任一所述的方法,其特征在于,所述流量控制需求包括所述目标业务流对应的分配缓存需求,所述第一网络设备根据所述流量控制需求对所述目标业务流进行流量整形,包括:
    当所述第一网络设备上用于转发所述目标业务流的出端口的可用缓存大于或等于所述分配缓存需求时,所述第一网络设备根据所述流量控制需求对所述目标业务流进行流量整形。
  17. 根据权利要求16所述的方法,其特征在于,所述方法还包括:
    当所述第一网络设备上用于转发所述目标业务流的出端口的可用缓存小于所述分配缓存需求时,所述第一网络设备向第三网络设备发送所述第三报文,所述第三网络设备位于所述目标业务流的传输路径上、且所述第一网络设备位于所述第三网络设备的下游。
  18. 根据权利要求16所述的方法,其特征在于,所述方法还包括:
    当所述第一网络设备上用于转发所述目标业务流的出端口的可用缓存小于所述分配缓存需求时,所述第一网络设备向所述第二网络设备发送请求应答报文,所述请求应答报文用于指示所述第一网络设备无法对所述目标业务流进行流量整形。
  19. 根据权利要求7至18任一所述的方法,其特征在于,所述方法还包括:
    所述第一网络设备接收所述第二网络设备发送的第六报文,所述第六报文用于指示所述第一网络设备结束对所述目标业务流进行流量整形。
  20. 根据权利要求1至19任一所述的方法,其特征在于,所述方法还包括:
    当所述第一网络设备在目标时长内未接收到属于所述目标业务流的报文时,所述第一网络设备结束对所述目标业务流进行流量整形。
  21. 一种流量控制方法,其特征在于,所述方法包括:
    控制设备获取多个网络设备的端口信息,所述多个网络设备包括位于目标业务流的传输路径上的第一网络设备和第二网络设备、且所述第二网络设备位于所述第一网络设备的下游,所述第一网络设备的端口信息包括所述第一网络设备的第一端口的端口速率,所述第二网络设备的端口信息包括所述第二网络设备的第二端口的端口速率,所述第一端口为所述第一网络设备上用于转发所述目标业务流的出端口,所述第二端口为所述第二网络设备上用于转发所述目标业务流的出端口;
    基于所述第二端口的端口速率小于所述第一端口的端口速率,所述控制设备根据所述目标业务流的业务需求和所述第二端口的端口速率,确定所述目标业务流对应的流量控制需求,所述流量控制需求包括所述第二网络设备针对所述目标业务流的最大接收速率,所述最大接收速率小于或等于所述第二端口的端口速率;
    所述控制设备向所述第一网络设备发送第一报文,所述第一报文包括所述目标业务流的标识和所述流量控制需求,所述第一报文用于指示所述第一网络设备对所述目标业务流进行流量整形。
  22. 根据权利要求21所述的方法,其特征在于,所述业务需求包括所述目标业务流的传输速率需求,所述控制设备根据所述目标业务流的业务需求和所述第二端口的端口速率,确定所述目标业务流对应的流量控制需求,包括:
    所述控制设备根据所述传输速率需求与所述第二端口的端口速率中的较小值确定所述最大接收速率。
  23. 根据权利要求21或22所述的方法,其特征在于,所述第一网络设备的端口信息还包括所述第一端口的可用缓存,所述第二网络设备的端口信息还包括所述第二端口的可用缓存,所述控制设备向所述第一网络设备发送第一报文,包括:
    当所述第一端口的可用缓存大于所述第二端口的可用缓存时,所述控制设备向所述第一网络设备发送所述第一报文。
  24. 根据权利要求21至23任一所述的方法,其特征在于,所述流量控制需求还包括所述目标业务流对应的分配缓存需求,所述业务需求包括所述目标业务流的时延需求,所述控制设备根据所述目标业务流的业务需求和所述第二端口的端口速率,确定所述目标业务流对应的流量控制需求,包括:
    所述控制设备根据所述目标业务流的发送端与所述目标业务流的接收端之间的往返时延、所述最大接收速率以及所述时延需求,确定所述分配缓存需求,所述分配缓存需求用于所述第一网络设备在所述目标业务流的实际缓存超出所述分配缓存需求时对所述目标业务流进行丢包。
  25. 根据权利要求21至24任一所述的方法,其特征在于,所述第二网络设备为接入层设备,所述第一网络设备为汇聚层设备或核心层设备。
  26. 根据权利要求21至25任一所述的方法,其特征在于,所述第一网络设备为预先配置的用于对流经所述第一网络设备的业务流进行流量整形的网络设备。
  27. 根据权利要求21至25任一所述的方法,其特征在于,所述第一网络设备为所述传输路径上的网络设备中用于转发所述目标业务流的出端口的可用缓存最大的网络设备。
  28. 根据权利要求21至27任一所述的方法,其特征在于,所述第二网络设备为预先配置的、具有流量控制需求的网络设备,和/或,所述第二端口为预先配置的、具有流量控制需求的出端口。
  29. 根据权利要求21至27任一所述的方法,其特征在于,在所述控制设备向所述第一网络设备发送第一报文之前,所述方法还包括:
    所述控制设备接收所述第二网络设备发送的流量整形请求,所述流量整形请求包括所述目标业务流的标识,所述流量整形请求用于请求对所述目标业务流进行流量整形。
  30. 根据权利要求29所述的方法,其特征在于,所述方法还包括:
    所述控制设备接收所述第二网络设备发送的流量整形撤销请求,所述流量整形撤销请求用于请求结束对所述目标业务流进行流量整形;
    所述控制设备向所述第一网络设备发送第二报文,所述第二报文用于指示所述第一网络设备结束对所述目标业务流进行流量整形。
  31. 一种流量控制方法,其特征在于,所述方法包括:
    获取第一网络设备的端口信息,所述第一网络设备位于目标业务流的传输路径上,所述端口信息包括目标端口的端口速率,所述目标端口为所述第一网络设备上用于转发所述目标业务流的出端口;
    根据所述目标业务流的业务需求和所述端口速率,确定所述目标业务流对应的流量控制需求,所述流量控制需求包括所述第一网络设备针对所述目标业务流的最大接收速率,所述最大接收速率小于或等于所述端口速率。
  32. 根据权利要求31所述的方法,其特征在于,所述业务需求包括所述目标业务流的传输速率需求,所述根据所述目标业务流的业务需求和所述端口速率,确定所述目标业务流对应的流量控制需求,包括:
    根据所述传输速率需求与所述端口速率中的较小值确定所述最大接收速率。
  33. 根据权利要求31或32所述的方法,其特征在于,所述流量控制需求还包括所述目标业务流对应的分配缓存需求,所述业务需求包括所述目标业务流的时延需求,所述根据所述目标业务流的业务需求和所述端口速率,确定所述目标业务流对应的流量控制需求,包括:
    根据所述目标业务流的发送端与所述目标业务流的接收端之间的往返时延、所述最大接收速率以及所述时延需求,确定所述分配缓存需求,所述分配缓存需求用于在所述目标业务流的实际缓存超出所述分配缓存需求时对所述目标业务流进行丢包。
  34. 根据权利要求31至33任一所述的方法,其特征在于,所述方法应用于所述第一网络设备,在所述根据所述目标业务流的业务需求和所述端口速率,确定所述目标业务流对应的流量控制需求之后,所述方法还包括:
    向第二网络设备发送第一报文,所述第一报文包括所述目标业务流的标识和所述流量控制需求,所述第二网络设备位于所述目标业务流的传输路径上、且所述第一网络设备位于所述第二网络设备的下游,所述第一报文用于请求所述第二网络设备对所述目标业务流进行流量整形。
  35. 根据权利要求34所述的方法,其特征在于,所述向第二网络设备发送第一报文,包括:
    响应于所述第一网络设备接收到属于所述目标业务流的报文,或者所述目标业务流在所述第一网络设备上发生丢包,向所述第二网络设备发送所述第一报文。
  36. 根据权利要求34或35所述的方法,其特征在于,所述第一报文为控制报文。
  37. 根据权利要求36所述的方法,其特征在于,所述第一报文为边界网关协议BGP更新消息,所述目标业务流的标识和所述流量控制需求在所述BGP更新消息的路径属性字段中。
  38. 根据权利要求34或35所述的方法,其特征在于,所述第一报文为业务报文,所述业务报文包括应用 感知网络APN字段,所述APN字段包括APN标识子字段和APN参数子字段,所述目标业务流的标识在所述APN标识子字段和/或所述APN参数子字段中,所述流量控制需求在所述APN参数子字段中。
  39. 根据权利要求38所述的方法,其特征在于,所述APN字段还携带有指示,所述指示用于指示所述APN参数子字段包括所述流量控制需求。
  40. 根据权利要求39所述的方法,其特征在于,所述APN字段还包括标志子字段和APN参数类型子字段,所述指示在所述标志子字段和/或所述APN参数类型子字段中。
  41. 根据权利要求34至40任一所述的方法,其特征在于,所述方法还包括:
    接收所述第二网络设备发送的所述第一报文对应的请求应答报文,所述请求应答报文用于指示所述第二网络设备无法对所述目标业务流进行流量整形;
    向第三网络设备发送第二报文,所述第二报文包括所述目标业务流的标识和所述流量控制需求,所述第三网络设备位于所述目标业务流的传输路径上、且所述第一网络设备位于所述第三网络设备的下游,所述第二报文用于请求所述第一网络设备对所述目标业务流进行流量整形。
  42. 根据权利要求34至40任一所述的方法,其特征在于,所述方法还包括:
    当所述第一网络设备在目标时长内未接收到属于所述目标业务流的报文时,向所述第二网络设备发送第三报文,所述第三报文用于指示所述第二网络设备结束对所述目标业务流进行流量整形。
  43. 一种流量控制方法,其特征在于,所述方法包括:
    第一网络设备获取所述第一网络设备的端口信息,所述第一网络设备位于目标业务流的传输路径上,所述端口信息包括目标端口的端口速率,所述目标端口为所述第一网络设备上用于转发所述目标业务流的出端口;
    所述第一网络设备向第二网络设备发送目标报文,所述目标报文包括所述目标业务流的标识和所述端口信息,所述第二网络设备位于所述目标业务流的传输路径上、且所述第一网络设备位于所述第二网络设备的下游,所述目标报文用于请求所述第二网络设备对所述目标业务流进行流量整形。
  44. 根据权利要求43所述的方法,其特征在于,所述目标报文为边界网关协议BGP更新消息,所述目标业务流的标识和所述端口信息在所述BGP更新消息的路径属性字段中。
  45. 根据权利要求43所述的方法,其特征在于,所述目标报文为业务报文,所述业务报文包括应用感知网络APN字段,所述APN字段包括APN标识子字段和APN参数子字段,所述目标业务流的标识在所述APN标识子字段和/或所述APN参数子字段中,所述端口信息在所述APN参数子字段中。
  46. 根据权利要求45所述的方法,其特征在于,所述APN字段还携带有目标指示,所述目标指示用于指示所述APN参数子字段包括所述端口信息。
  47. 根据权利要求46所述的方法,其特征在于,所述APN字段还包括标志子字段和APN参数类型子字段,所述目标指示在所述标志子字段和/或所述APN参数类型子字段中。
  48. 一种流量控制系统,其特征在于,包括:控制设备和多个网络设备;
    所述控制设备用于获取所述多个网络设备的端口信息,所述多个网络设备包括位于目标业务流的传输路径上的第一网络设备和第二网络设备、且所述第二网络设备位于所述第一网络设备的下游,所述第一网络设备的端口信息包括所述第一网络设备的第一端口的端口速率,所述第二网络设备的端口信息包括所述第二网络设备的第二端口的端口速率,所述第一端口为所述第一网络设备上用于转发所述目标业务流的出端口,所述第二端口为所述第二网络设备上用于转发所述目标业务流的出端口;
    所述控制设备还用于在所述第二端口的端口速率小于所述第一端口的端口速率的情况下,根据所述目标业务流的业务需求和所述第二端口的端口速率,确定所述目标业务流对应的流量控制需求,所述流量控制需求包括所述第二网络设备针对所述目标业务流的最大接收速率,所述最大接收速率小于或等于所述第二端口的端口速率;
    所述控制设备还用于向所述第一网络设备发送报文,所述报文包括所述目标业务流的标识和所述流量控制需求,所述报文用于指示所述第一网络设备对所述目标业务流进行流量整形;
    所述第一网络设备用于根据所述流量控制需求对所述目标业务流进行流量整形,以使所述第一网络设备针对所述目标业务流的发送速率小于或等于所述最大接收速率。
  49. 一种流量控制系统,其特征在于,包括:多个网络设备,所述多个网络设备包括第一网络设备和第二网络设备,所述第一网络设备和所述第二网络设备均位于目标业务流的传输路径上、且所述第二网络设备位于所述第一网络设备的下游;
    所述第二网络设备用于获取所述第二网络设备的端口信息,所述端口信息包括目标端口的端口速率,所述目标端口为所述第二网络设备上用于转发所述目标业务流的出端口;
    所述第二网络设备还用于根据所述目标业务流的业务需求和所述端口速率,确定所述目标业务流对应的流量控制需求,所述流量控制需求包括所述第二网络设备针对所述目标业务流的最大接收速率,所述最大接收速率小于或等于所述端口速率;
    所述第二网络设备还用于向所述第一网络设备发送报文,所述报文包括所述目标业务流的标识和所述流量控制需求,所述报文用于请求所述第一网络设备对所述目标业务流进行流量整形;
    所述第一网络设备用于根据所述流量控制需求对所述目标业务流进行流量整形,以使所述第一网络设备针对所述目标业务流的发送速率小于或等于所述最大接收速率。
  50. 一种流量控制系统,其特征在于,包括:多个网络设备,所述多个网络设备包括第一网络设备和第二网络设备,所述第一网络设备和所述第二网络设备均位于目标业务流的传输路径上、且所述第二网络设备位于所述第一网络设备的下游;
    所述第二网络设备用于获取所述第二网络设备的端口信息,所述端口信息包括目标端口的端口速率,所述目标端口为所述第二网络设备上用于转发所述目标业务流的出端口;
    所述第二网络设备还用于向所述第一网络设备发送报文,所述报文包括所述目标业务流的标识和所述端口信息,所述报文用于请求所述第一网络设备对所述目标业务流进行流量整形;
    所述第一网络设备用于根据所述目标业务流的业务需求和所述端口速率,确定所述目标业务流对应的流量控制需求,所述流量控制需求包括所述第二网络设备针对所述目标业务流的最大接收速率,所述最大接收速率小于或等于所述端口速率;
    所述第一网络设备还用于根据所述流量控制需求对所述目标业务流进行流量整形,以使所述第一网络设备针对所述目标业务流的发送速率小于或等于所述最大接收速率。
  51. 一种流量控制装置,其特征在于,包括:收发模块和处理模块;
    所述收发模块用于执行如权利要求1至47任一所述的方法中的收发操作,所述处理模块用于执行如权利要求1至47任一所述的方法中除所述收发操作之外的操作。
  52. 一种流量控制装置,其特征在于,包括:存储器和处理器;
    所述存储器用于存储计算机程序;
    所述处理器用于执行所述存储器中存储的所述计算机程序以使得所述流量控制装置执行如权利要求1至47任一所述的方法。
  53. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,所述计算机程序被执行时实现如权利要求1至47任一所述的方法。
  54. 一种计算机程序产品,其特征在于,所述计算机程序产品包括程序或代码,所述程序或代码被执行时,实现如权利要求1至47任一所述的方法。
PCT/CN2024/081608 2023-03-22 2024-03-14 流量控制方法、装置及系统 WO2024193427A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202310319186 2023-03-22
CN202310319186.6 2023-03-22
CN202310619163.7A CN118694720A (zh) 2023-03-22 2023-05-29 流量控制方法、装置及系统
CN202310619163.7 2023-05-29

Publications (1)

Publication Number Publication Date
WO2024193427A1 true WO2024193427A1 (zh) 2024-09-26

Family

ID=92773316

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/081608 WO2024193427A1 (zh) 2023-03-22 2024-03-14 流量控制方法、装置及系统

Country Status (2)

Country Link
CN (1) CN118694720A (zh)
WO (1) WO2024193427A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080062876A1 (en) * 2006-09-12 2008-03-13 Natalie Giroux Smart Ethernet edge networking system
CN110290072A (zh) * 2018-03-19 2019-09-27 华为技术有限公司 流量控制方法、装置、网络设备及存储介质
US20200100143A1 (en) * 2018-09-20 2020-03-26 Cisco Technology, Inc. Traffic shaping methods and apparatus for providing wireless contention reduction and airtime fairness for multimedia traffic flows in a wireless network
CN113382442A (zh) * 2020-03-09 2021-09-10 中国移动通信有限公司研究院 报文传输方法、装置、网络节点及存储介质
US20220030011A1 (en) * 2020-07-23 2022-01-27 Micro Focus Llc Demand management of sender of network traffic flow
CN115037694A (zh) * 2022-04-26 2022-09-09 上海地面通信息网络股份有限公司 一种数据传输方法、装置、电子设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080062876A1 (en) * 2006-09-12 2008-03-13 Natalie Giroux Smart Ethernet edge networking system
CN110290072A (zh) * 2018-03-19 2019-09-27 华为技术有限公司 流量控制方法、装置、网络设备及存储介质
US20200100143A1 (en) * 2018-09-20 2020-03-26 Cisco Technology, Inc. Traffic shaping methods and apparatus for providing wireless contention reduction and airtime fairness for multimedia traffic flows in a wireless network
CN113382442A (zh) * 2020-03-09 2021-09-10 中国移动通信有限公司研究院 报文传输方法、装置、网络节点及存储介质
US20220030011A1 (en) * 2020-07-23 2022-01-27 Micro Focus Llc Demand management of sender of network traffic flow
CN115037694A (zh) * 2022-04-26 2022-09-09 上海地面通信息网络股份有限公司 一种数据传输方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN118694720A (zh) 2024-09-24

Similar Documents

Publication Publication Date Title
US7636781B2 (en) System and method for realizing the resource distribution in the communication network
US7948883B1 (en) Applying router quality of service on a cable modem interface on a per-service-flow basis
US20190014053A1 (en) Network Flow Control Method And Network Device
US11968111B2 (en) Packet scheduling method, scheduler, network device, and network system
CN108718283B (zh) 数据中心网络中集中式端网协调的tcp拥塞控制方法
US9479384B2 (en) Data stream scheduling method, device, and system
US8284789B2 (en) Methods and apparatus for providing dynamic data flow queues
JP7288980B2 (ja) 仮想サービスネットワークにおけるサービス品質
WO2021227947A1 (zh) 网络控制方法及设备
US9800479B2 (en) Packet processing method, forwarder, packet processing device, and packet processing system
CN113726671B (zh) 一种网络拥塞控制方法及相关产品
CN108566286B (zh) 一种智能路由器服务质量的实现方法、路由器及电子设备
EP4024778A1 (en) Method for determining required bandwidth for data stream transmission, and devices and system
US20150109922A1 (en) Method and apparatus for bandwidth adjustment in network virtualization system
US8995269B2 (en) Computer readable storage medium storing congestion control program, information processing apparatus, and congestion control method
CN115632925B (zh) 一种时间内生确定性融合网络架构及数据通信方法
WO2023116611A1 (zh) 一种队列控制的方法及装置
CN112188557A (zh) 一种拥塞时保证绿包优先QoS的方法和装置
EP1341350B1 (en) A method for congestion detection for IP flows over a wireless network
WO2024193427A1 (zh) 流量控制方法、装置及系统
WO2023274165A1 (zh) 参数配置的方法、装置、控制器、通信设备和通信系统
US11805071B2 (en) Congestion control processing method, packet forwarding apparatus, and packet receiving apparatus
WO2022135202A1 (zh) 业务流的调度方法、装置及系统
CN112714072B (zh) 一种调整发送速率的方法及装置
CN111756557B (zh) 一种数据传输方法及装置