CN118282988A - Congestion management method and communication device - Google Patents

Congestion management method and communication device Download PDF

Info

Publication number
CN118282988A
CN118282988A CN202211737887.3A CN202211737887A CN118282988A CN 118282988 A CN118282988 A CN 118282988A CN 202211737887 A CN202211737887 A CN 202211737887A CN 118282988 A CN118282988 A CN 118282988A
Authority
CN
China
Prior art keywords
physical member
member port
port
physical
trunk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211737887.3A
Other languages
Chinese (zh)
Inventor
马岑
张永平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202211737887.3A priority Critical patent/CN118282988A/en
Publication of CN118282988A publication Critical patent/CN118282988A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/50Overload detection or protection within a single switching element
    • H04L49/505Corrective measures
    • H04L49/506Backpressure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority

Landscapes

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

Abstract

本申请提供了一种拥塞管理方法及通信装置,应用于通信技术领域。该方法可以包括:对TRUNK口包括的第一物理成员口进行异常检测,第一物理成员口为TRUNK口包括的任一个物理成员口。在第一物理成员口异常时,将第一物理成员口停用或者对第一物理成员口进行限速。基于该方案,当TRUNK口中的第一物理成员口异常时,可以及时对第一物理成员口进行处理,以消除或缓解第一物理成员口的拥塞状态,从而降低对TRUNK口中其他成员口的流量转发的影响。

The present application provides a congestion management method and a communication device, which are applied to the field of communication technology. The method may include: performing abnormality detection on the first physical member port included in the TRUNK port, and the first physical member port is any physical member port included in the TRUNK port. When the first physical member port is abnormal, the first physical member port is disabled or the speed of the first physical member port is limited. Based on this scheme, when the first physical member port in the TRUNK port is abnormal, the first physical member port can be processed in time to eliminate or alleviate the congestion state of the first physical member port, thereby reducing the impact on the traffic forwarding of other member ports in the TRUNK port.

Description

拥塞管理方法及通信装置Congestion management method and communication device

技术领域Technical Field

本申请涉及通信技术领域,尤其涉及一种拥塞管理方法及通信装置。The present application relates to the field of communication technology, and in particular to a congestion management method and a communication device.

背景技术Background technique

TRUNK口(或者称为TRUNK接口)是将多个物理端口汇聚成一个逻辑的端口,使多个物理端口工作起来就像是一个通道一样。将多个物理端口捆绑起来后,不但提升了整个网络的带宽,而且数据还会同时经由被绑定的多个物理端口对应的多个链路传输,具有链路冗余的作用,在其中一条链路出现故障后,还能由其他链路进行工作。A TRUNK port (or a TRUNK interface) aggregates multiple physical ports into one logical port, making them work like a channel. After bundling multiple physical ports, not only the bandwidth of the entire network is increased, but also data is transmitted simultaneously through multiple links corresponding to the bound multiple physical ports, which has the function of link redundancy. When one link fails, other links can still work.

TRUNK口的多个物理端口可以对应多个用户成员,一个TRUNK口可以传输多个用户成员的流量。其中,TRUNK口绑定的多个物理端口可以称为多个物理成员口。Multiple physical ports of a TRUNK port can correspond to multiple user members, and one TRUNK port can transmit traffic from multiple user members. The multiple physical ports bound to the TRUNK port can be called multiple physical member ports.

一种实现方式中,具有TRUNK口的设备可以使用一棵调度树来集中调度TRUNK口绑定的多个成员口的流量。此种情况下,当TRUNK口中的一个成员口发生异常时,该成员口的流量会反压,抑制上游的流量调度。由于多个成员口的流量共用一棵调度树,因此会影响到其他成员口的流量调度。In one implementation, a device with a trunk port can use a scheduling tree to centrally schedule the traffic of multiple member ports bound to the trunk port. In this case, when an abnormality occurs in one member port of the trunk port, the traffic of the member port will be back-pressured, suppressing the upstream traffic scheduling. Since the traffic of multiple member ports shares a scheduling tree, it will affect the traffic scheduling of other member ports.

发明内容Summary of the invention

本申请提供了一种拥塞管理方法及通信装置,用于解决TRUNK口中的多个成员口的流量共用一棵调度树时,一个成员口出现拥塞反压时,会影响到其他成员口的流量转发的问题。The present application provides a congestion management method and a communication device, which are used to solve the problem that when the traffic of multiple member ports in a TRUNK port shares a scheduling tree, when congestion back pressure occurs on one member port, it will affect the traffic forwarding of other member ports.

为达到上述目的,本申请采用如下技术方案:In order to achieve the above objectives, this application adopts the following technical solutions:

第一方面,提供了一种拥塞管理方法,该方法可以包括:对TRUNK口包括的第一物理成员口进行异常检测,第一物理成员口为TRUNK口包括的任一个物理成员口。在第一物理成员口异常时,将第一物理成员口停用或者对第一物理成员口进行限速。In a first aspect, a congestion management method is provided, which may include: performing an abnormality detection on a first physical member port included in a TRUNK port, where the first physical member port is any physical member port included in the TRUNK port. When the first physical member port is abnormal, the first physical member port is disabled or the speed of the first physical member port is limited.

基于该方案,当TRUNK口中的第一物理成员口异常时,可以及时对第一物理成员口进行处理,以消除或缓解第一物理成员口的拥塞状态,从而降低对TRUNK口中其他成员口的流量转发的影响。Based on this solution, when the first physical member port in the TRUNK port is abnormal, the first physical member port can be processed in time to eliminate or alleviate the congestion state of the first physical member port, thereby reducing the impact on traffic forwarding of other member ports in the TRUNK port.

结合上述第一方面,在一种可能的实现方式中,对TRUNK口包括的第一物理成员口进行异常检测,具体可以包括:检测第一物理成员口对应的pause帧的数量和第一物理成员口的流量速率。在单位时间内检测到的第一物理成员口对应的pause帧的数量大于或等于第一阈值,且第一物理成员口的流量速率小于或等于第二阈值的情况下,确定第一物理成员口异常。In combination with the first aspect above, in a possible implementation, performing abnormality detection on the first physical member port included in the TRUNK port may specifically include: detecting the number of pause frames corresponding to the first physical member port and the traffic rate of the first physical member port. When the number of pause frames corresponding to the first physical member port detected within a unit time is greater than or equal to a first threshold, and the traffic rate of the first physical member port is less than or equal to a second threshold, it is determined that the first physical member port is abnormal.

结合上述第一方面,在一种可能的实现方式中,将第一物理成员口停用,具体可以包括:将第一物理成员口配置为DOWN状态。In combination with the first aspect, in a possible implementation manner, deactivating the first physical member port may specifically include: configuring the first physical member port to be in a DOWN state.

结合上述第一方面,在一种可能的实现方式中,该方法还可以包括:将第一物理成员口对应的流量,切换至TRUNK口中除第一物理成员口之外的其他物理成员口转发。In combination with the first aspect above, in a possible implementation manner, the method may further include: switching traffic corresponding to the first physical member port to other physical member ports in the TRUNK port except the first physical member port for forwarding.

结合上述第一方面,在一种可能的实现方式中,对TRUNK口包括的第一物理成员口进行异常检测,具体可以包括:检测第一物理成员口的流量速率。在第一物理成员口的流量速率大于或等于第三阈值,且持续时长大于第四阈值的情况下,确定第一物理成员口异常。In combination with the first aspect, in a possible implementation, performing abnormality detection on the first physical member port included in the TRUNK port may specifically include: detecting the flow rate of the first physical member port. When the flow rate of the first physical member port is greater than or equal to the third threshold and the duration is greater than the fourth threshold, determining that the first physical member port is abnormal.

结合上述第一方面,在一种可能的实现方式中,对第一物理成员口进行限速,具体可以包括:为第一物理成员口配置承诺访问速率CAR,CAR用于限制第一物理成员口的流量速率。In combination with the first aspect above, in a possible implementation, limiting the rate of the first physical member port may specifically include: configuring a committed access rate CAR for the first physical member port, where CAR is used to limit the traffic rate of the first physical member port.

第二方面,提供了一种通信装置,该通信装置可以包括异常检测模块和异常处理模块。其中,异常检测模块,可以用于对TRUNK口包括的第一物理成员口进行异常检测,第一物理成员口为TRUNK口包括的任一个物理成员口。异常处理模块,可以用于在第一物理成员口异常时,将第一物理成员口停用或者对第一物理成员口进行限速。In a second aspect, a communication device is provided, which may include an anomaly detection module and an anomaly handling module. The anomaly detection module may be used to perform an anomaly detection on a first physical member port included in a TRUNK port, where the first physical member port is any physical member port included in the TRUNK port. The anomaly handling module may be used to disable the first physical member port or limit the speed of the first physical member port when the first physical member port is abnormal.

结合上述第二方面,在一种可能的实现方式中,异常检测模块用于对TRUNK口包括的第一物理成员口进行异常检测,具体可以包括:异常检测模块用于检测第一物理成员口对应的pause帧的数量和第一物理成员口的流量速率。以及,异常检测模块,还可以用于在单位时间内检测到的第一物理成员口对应的pause帧的数量大于或等于第一阈值,且第一物理成员口的流量速率小于或等于第二阈值的情况下,确定第一物理成员口异常。In combination with the above second aspect, in a possible implementation, the abnormality detection module is used to perform abnormality detection on the first physical member port included in the TRUNK port, which may specifically include: the abnormality detection module is used to detect the number of pause frames corresponding to the first physical member port and the traffic rate of the first physical member port. And, the abnormality detection module may also be used to determine that the first physical member port is abnormal when the number of pause frames corresponding to the first physical member port detected within a unit time is greater than or equal to a first threshold and the traffic rate of the first physical member port is less than or equal to a second threshold.

结合上述第二方面,在一种可能的实现方式中,异常处理模块用于将第一物理成员口停用,具体可以包括:异常处理模块用于将第一物理成员口配置为DOWN状态。In combination with the second aspect, in a possible implementation manner, the exception handling module is used to deactivate the first physical member port, which may specifically include: the exception handling module is used to configure the first physical member port to a DOWN state.

结合上述第二方面,在一种可能的实现方式中,异常处理模块还可以用于:将第一物理成员口对应的流量,切换至TRUNK口中除第一物理成员口之外的其他物理成员口转发。In combination with the above second aspect, in a possible implementation, the exception handling module may also be used to: switch the traffic corresponding to the first physical member port to other physical member ports in the TRUNK port except the first physical member port for forwarding.

结合上述第二方面,在一种可能的实现方式中,异常检测模块用于对TRUNK口包括的第一物理成员口进行异常检测,具体可以包括:异常检测模块用于检测第一物理成员口的流量速率。以及,异常检测模块还用于在第一物理成员口的流量速率大于或等于第三阈值,且持续时长大于第四阈值的情况下,确定第一物理成员口异常。In combination with the above second aspect, in a possible implementation, the abnormality detection module is used to perform abnormality detection on the first physical member port included in the TRUNK port, which may specifically include: the abnormality detection module is used to detect the flow rate of the first physical member port. And the abnormality detection module is also used to determine that the first physical member port is abnormal when the flow rate of the first physical member port is greater than or equal to the third threshold and the duration is greater than the fourth threshold.

结合上述第二方面,在一种可能的实现方式中,异常处理模块用于对第一物理成员口进行限速,具体可以包括:异常处理模块用于为第一物理成员口配置承诺访问速率CAR,CAR用于限制第一物理成员口的流量速率。In combination with the above-mentioned second aspect, in a possible implementation method, the exception handling module is used to limit the speed of the first physical member port, which may specifically include: the exception handling module is used to configure a committed access rate CAR for the first physical member port, and CAR is used to limit the traffic rate of the first physical member port.

第三方面,提供了一种通信装置,包括:处理器;所述处理器用于与存储器耦合,并读取存储器中的指令之后,根据所述指令执行如上述第一方面中任一项所述的拥塞管理方法。In a third aspect, a communication device is provided, comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, execute a congestion management method as described in any one of the first aspects above according to the instructions.

第四方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述第一方面中任一项所述的拥塞管理方法。In a fourth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer can execute the congestion management method described in any one of the above-mentioned first aspects.

第五方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机可以执行上述第一方面中任一项所述的拥塞管理方法。In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the congestion management method described in any one of the first aspects.

其中,第二方面至第五方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。Among them, the technical effects brought about by any design method in the second to fifth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本申请实施例提供的一种网络设备在数据平面的转发流示意图;FIG1 is a schematic diagram of a forwarding flow of a network device in a data plane provided by an embodiment of the present application;

图2为本申请实施例提供的一种网络设备的功能模块的示意图;FIG2 is a schematic diagram of a functional module of a network device provided in an embodiment of the present application;

图3为本申请实施例提供的一种HQoS的层次化调度模型的示意图;FIG3 is a schematic diagram of a hierarchical scheduling model of HQoS provided in an embodiment of the present application;

图4为本申请实施例提供的一种HQoS的5级调度结构的示意图;FIG4 is a schematic diagram of a 5-level scheduling structure of HQoS provided in an embodiment of the present application;

图5为本申请实施例提供的一种QoS和HQoS的比较示意图;FIG5 is a schematic diagram showing a comparison between QoS and HQoS provided in an embodiment of the present application;

图6为本申请实施例提供的一种对TRUNK口的流量进行调度的示意图;FIG6 is a schematic diagram of scheduling traffic on a TRUNK port provided in an embodiment of the present application;

图7为本申请实施例提供的另一种对TRUNK口的流量进行调度的示意图;FIG7 is a schematic diagram of another method for scheduling traffic on a TRUNK port provided in an embodiment of the present application;

图8为本申请实施例提供的一种拥塞反压的示意图;FIG8 is a schematic diagram of congestion back pressure provided in an embodiment of the present application;

图9为本申请实施例提供了一种拥塞管理方法的流程示意图;FIG9 is a flow chart of a congestion management method provided in an embodiment of the present application;

图10为本申请实施例提供的另一种拥塞管理方法的流程示意图;FIG10 is a flow chart of another congestion management method provided in an embodiment of the present application;

图11为本申请实施例提供的又一种拥塞管理方法的流程示意图;FIG11 is a flow chart of another congestion management method provided in an embodiment of the present application;

图12为本申请实施例提供的一种通信装置的结构示意图;FIG12 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application;

图13为本申请实施例提供的另一种通信装置的结构示意图。FIG13 is a schematic diagram of the structure of another communication device provided in an embodiment of the present application.

具体实施方式Detailed ways

为方便理解,首先,对本申请涉及的技术术语以及相关技术做简单介绍。To facilitate understanding, first, a brief introduction is given to the technical terms and related technologies involved in this application.

交换机、路由器等网络设备中的物理结构主要可以包括如下三类:The physical structure of network devices such as switches and routers can mainly include the following three categories:

主处理单元(main processing unit,MPU):负责整个系统的控制平面。MPU可以称为主控板卡或管理引擎等。Main processing unit (MPU): Responsible for the control plane of the entire system. MPU can be called main control board or management engine, etc.

交换结构单元(switch fabric unit,SFU):负责整个系统的数据平面。数据平面提供高速无阻塞数据通道,实现各个业务模块之间的业务交换功能。SFU可以称为交换板卡、交换网板或交换矩阵等。Switch fabric unit (SFU): responsible for the data plane of the entire system. The data plane provides high-speed, non-blocking data channels to implement service exchange functions between various service modules. SFU can be called a switch card, switch fabric board, or switch matrix, etc.

线路处理单元(line processing unit,LPU):是用于提供数据转发功能的模块,提供不同速率的光口、电口等设备接口。LPU可以称为线卡或接口板等。Line processing unit (LPU): A module used to provide data forwarding functions, providing optical ports, electrical ports and other equipment interfaces of different rates. LPU can be called a line card or interface board, etc.

根据数据流方向,交换机、路由器等网络设备进行报文转发可以分为上行、下行两个流程。交换机、路由器等网络设备在数据平面的转发流示意图可以如图1所示。参考图1,交换网板可以分别通过一个线卡与接入侧和网络侧连接,接入侧的流量和网络侧的流量在交换网板上实现交换。接入侧的上行流量可以经过交换网板进入网络侧,成为网络侧的下行流量。网络侧的上行流量可以经过交换网板进入接入侧,称为接入侧的下行流量。According to the direction of data flow, the message forwarding of network devices such as switches and routers can be divided into two processes: upstream and downstream. The forwarding flow diagram of network devices such as switches and routers on the data plane can be shown in Figure 1. Referring to Figure 1, the switching network board can be connected to the access side and the network side through a line card respectively, and the traffic on the access side and the traffic on the network side are exchanged on the switching network board. The upstream traffic on the access side can enter the network side through the switching network board and become the downstream traffic on the network side. The upstream traffic on the network side can enter the access side through the switching network board, which is called the downstream traffic on the access side.

在数据平面上,流量在设备中经过的功能模块可以如图2所示。参考图2,在上行方向上,上行流量进入设备后依次可以经过上行物理接口控制器(physical interfacecontroller,PIC)、上行包转发引擎(packet forward engine,PFE)、上行流量管理器(traffic manager,TM)以及上行交换网接口控制器(fabric interface controller,FIC),进而进入交换网板。在下行方向上,下行流量从交换网板出来依次可以经过下行FIC、下行TM、下行PFE以及下行PIC,进而出设备。其中,下行PIC中可以包括出口流量管理器(egress traffic manager,eTM)。On the data plane, the functional modules that the traffic passes through in the device can be shown in Figure 2. Referring to Figure 2, in the upstream direction, after the upstream traffic enters the device, it can pass through the upstream physical interface controller (PIC), the upstream packet forwarding engine (PFE), the upstream traffic manager (TM) and the upstream fabric interface controller (FIC) in sequence, and then enter the switching fabric board. In the downstream direction, the downstream traffic can pass through the downstream FIC, the downstream TM, the downstream PFE and the downstream PIC in sequence from the switching fabric board, and then exit the device. Among them, the downstream PIC can include an egress traffic manager (eTM).

可以理解的是,网络设备接入侧的上下行和网络侧的上下行均可以是如图2所示流程,在此统一说明。It can be understood that the uplink and downlink on the access side of the network device and the uplink and downlink on the network side can both be the process shown in Figure 2, and are explained here uniformly.

实际应用中,数据流的转发可以对服务质量(quality of service,Qos)有一定的要求。因此,可以在转发过程中的功能模块上使用Qos技术对数据流进行处理。示例地,图2还示出了流量转发过程中,Qos技术各个模块上的应用。如图2所示,在上行方向上:上行PFE可以进行流分类、内部标记、承诺访问速率(committed access rate,CAR)、单播反向路由查找(unicast reverse path forwarding,URPF)、过滤(filter)、镜像、采样、重定向、统计等。上下TM可以进行基于包(packet)的队列管理,具体可以包括拥塞避免、队列调度、流量整形(Shaper)等。在下行方向上:下行TM可以进行基于包的队列管理,具体可以包括拥塞避免、队列调度、流量整形等。下行PFE可以进行流分类、内部标记(下行PIC中包括eTM才有意义)、CAR、外部标记、过滤(filter)、镜像、采样、统计等。下行PIC中的eTM可以进行基于包的队列管理,具体可以包括拥塞避免、队列调度、流量整形等。In practical applications, the forwarding of data streams may have certain requirements for the quality of service (QoS). Therefore, QoS technology can be used on the functional modules in the forwarding process to process the data stream. For example, FIG2 also shows the application of QoS technology on various modules in the process of traffic forwarding. As shown in FIG2, in the upstream direction: the upstream PFE can perform flow classification, internal marking, committed access rate (CAR), unicast reverse path forwarding (URPF), filtering, mirroring, sampling, redirection, statistics, etc. The upper and lower TMs can perform packet-based queue management, which can specifically include congestion avoidance, queue scheduling, traffic shaping, etc. In the downstream direction: the downstream TM can perform packet-based queue management, which can specifically include congestion avoidance, queue scheduling, traffic shaping, etc. The downstream PFE can perform flow classification, internal marking (only meaningful when eTM is included in the downstream PIC), CAR, external marking, filtering, mirroring, sampling, statistics, etc. The eTM in the downstream PIC can perform packet-based queue management, including congestion avoidance, queue scheduling, and traffic shaping.

层次化QoS(hierarchical quality of service,HQoS):是一种通过多级队列调度机制,解决多用户多业务带宽保证的技术。传统的QoS采用一级调度,单个端口只能区分业务优先级,无法区分用户,无法对端口上单个用户的单个流量进行区分服务。HQoS采用多级调度的方式,可以精细区分不同用户和不同业务的流量,提供更加精细化的带宽管理。Hierarchical QoS (HQoS) is a technology that uses a multi-level queue scheduling mechanism to solve the problem of multi-user and multi-service bandwidth guarantee. Traditional QoS uses one-level scheduling, and a single port can only distinguish service priorities, but cannot distinguish users, and cannot differentiate services for a single flow of a single user on the port. HQoS uses a multi-level scheduling method, which can finely distinguish the flow of different users and different services, and provide more refined bandwidth management.

为了实现分层调度,HQoS采用树状结构的层次化调度模型,如图3所示,该树状结构可以有三种节点:To implement hierarchical scheduling, HQoS adopts a hierarchical scheduling model with a tree structure, as shown in Figure 3. The tree structure can have three types of nodes:

1、叶子节点:处于最底层,每个叶子节点表示一个队列,叶子节点是被调度对象,而且只能被调度。1. Leaf node: at the bottom layer. Each leaf node represents a queue. Leaf nodes are scheduled objects and can only be scheduled.

2、中间节点(或者称为分支节点):处于中间层,既是调度器又是被调度对象。当作为被调度对象时,一个中间节点可以看成一个虚队列,不占用实际缓存。2. Intermediate node (or branch node): Located in the middle layer, it is both a scheduler and a scheduled object. When acting as a scheduled object, an intermediate node can be regarded as a virtual queue and does not occupy the actual cache.

3、根节点:处于最高层,表示最高级别的调度器,根节点只是调度器,不是调度对象。3. Root node: It is at the highest level and represents the highest level scheduler. The root node is only a scheduler, not a scheduling object.

目前,路由器或交换机等网络设备的HQoS可以有5级调度,图4示出了该5级调度的层次化调度模型的示意图。如图4所示,该5级调度的层次化调度模型也是树状结构的,从叶子节点到根节点依次可以包括:流队列(flow queue,FQ)、用户队列(subscriber queue,SQ)、用户组队列(group queue,GQ)、虚拟子接口队列(virtual interface,VI)和端口队列(dummy port,DP)。该5种调度队列的介绍如下:At present, HQoS of network devices such as routers or switches can have 5 levels of scheduling. Figure 4 shows a schematic diagram of the hierarchical scheduling model of the 5-level scheduling. As shown in Figure 4, the hierarchical scheduling model of the 5-level scheduling is also a tree structure, which can include: flow queue (flow queue, FQ), user queue (subscriber queue, SQ), user group queue (group queue, GQ), virtual sub-interface queue (virtual interface, VI) and port queue (dummy port, DP) from leaf node to root node. The introduction of the 5 scheduling queues is as follows:

1、流队列:用于区分用户内部的业务优先级。用户内部的业务优先级可以包括802.1P优先级、网络协议(internet protocol,IP)优先级或差分服务代码点(differentiated services code point,DSCP)等。1. Flow queue: used to distinguish the service priority within the user. The service priority within the user can include 802.1P priority, Internet protocol (IP) priority or differentiated services code point (DSCP) and so on.

2、用户队列:用于区分不同的用户。用户队列支持部署CIR(CommittedInformation Rate,承诺信息速率)与PIR(Peak Information Rate,最高信息速率)。2. User queue: used to distinguish different users. User queue supports deployment of CIR (Committed Information Rate) and PIR (Peak Information Rate).

3、用户组队列:用于区分不同的用户组。用户组队列支持进行流量整形,用以限制整个用户组的带宽。3. User group queue: used to distinguish different user groups. User group queue supports traffic shaping to limit the bandwidth of the entire user group.

4、虚拟子接口队列,可用于区分不同的逻辑子接口。4. Virtual sub-interface queue, which can be used to distinguish different logical sub-interfaces.

5、端口队列:代表物理出口,通常不需要做额外配置。5. Port queue: represents the physical exit and usually does not require additional configuration.

上述流队列、用户队列、用户组队列或虚拟子接口队列之间采用的调度方式可以包括先进先出(first in first out,FIFO)、严格优先级(strict priority,SP)、轮询(round robin,RR)、加权轮询(weighted round robin,WRR)、差分轮询(deficit roundrobin,DRR)、加权差分轮询(weighted deficit round robin,WDRR)、或加权公平队列(weighted fair queuing,WFQ)等多种方式。The scheduling methods adopted between the above-mentioned flow queues, user queues, user group queues or virtual sub-interface queues may include first in first out (FIFO), strict priority (SP), round robin (RR), weighted round robin (WRR), differential round robin (DRR), weighted deficit round robin (WDRR), or weighted fair queuing (WFQ) and the like.

HQoS 5级调度模型对报文的调度机制如下:The HQoS 5-level scheduling model schedules packets as follows:

·报文入队:报文首先入FQ队列。报文入FQ队列时,系统检查队列状态,确定是否进行尾丢弃或WRED丢弃,如果报文未被丢弃,则入FQ队列缓存。· Packet queueing: Packets are first placed in the FQ queue. When a packet enters the FQ queue, the system checks the queue status to determine whether to perform tail drop or WRED drop. If the packet is not dropped, it is placed in the FQ queue cache.

·请求调度:报文入FQ队列后,向SQ调度器报告队列状态变化并请求调度,SQ调度器再向其上一级GQ调度器报告队列状态变化并请求调度。请求调度的过程是:FQ→SQ→GQ→VI→DP。Request scheduling: After the message enters the FQ queue, it reports the queue status change to the SQ scheduler and requests scheduling. The SQ scheduler then reports the queue status change to its upper-level GQ scheduler and requests scheduling. The process of requesting scheduling is: FQ→SQ→GQ→VI→DP.

·逐级调度:DP调度器收到请求后开始向下选择VI,被选中的VI则选择GQ。逐级调度过程是:DP→VI→GQ→SQ→FQ。·Step-by-step scheduling: After receiving the request, the DP scheduler starts to select VI downwards, and the selected VI selects GQ. The step-by-step scheduling process is: DP→VI→GQ→SQ→FQ.

·报文出队:FQ被选中后,FQ队列最前面的报文出队,同时FQ更新队列状态,SQ、GQ、VI、DP更新令牌桶状态。· Packet dequeue: After the FQ is selected, the packet at the front of the FQ queue is dequeued. At the same time, the FQ updates the queue status, and the SQ, GQ, VI, and DP update the token bucket status.

可以理解的是,HQoS引入的SQ、GQ和VI调度节点既是调度器又是被调度对象,每一级下面都可以挂接多个子调度器,例如GQ下可以挂接多个SQ,VI下可以挂接多个GQ,可以实现对接口资源更细粒度、更多层级化的调度管理,实现对接口资源的精细化分配和管理。在实际应用中,VI/GQ可以作为某一类业务或者客户群的资源管理,SQ可以作为具体用户的资源管理。It is understandable that the SQ, GQ, and VI scheduling nodes introduced by HQoS are both schedulers and scheduled objects. Multiple sub-schedulers can be attached to each level. For example, multiple SQs can be attached to a GQ, and multiple GQs can be attached to a VI. This can achieve more fine-grained and multi-level scheduling management of interface resources, and achieve refined allocation and management of interface resources. In actual applications, VI/GQ can be used as resource management for a certain type of business or customer group, and SQ can be used as resource management for specific users.

图5示出了QoS和HQoS的比较示意图,如图5所示,QoS是在端口上根据业务优先级进行调度,而HQoS在QoS调度机制的基础上增加多级调度模型(图5中示出了上文所述的5级调度模型),对资源实现更精细化的调度。FIG5 shows a comparative diagram of QoS and HQoS. As shown in FIG5 , QoS is scheduled on ports according to service priorities, while HQoS adds a multi-level scheduling model (FIG5 shows the 5-level scheduling model described above) based on the QoS scheduling mechanism to achieve more refined scheduling of resources.

TRUNK:是一种捆绑技术。将多个物理接口捆绑成一个逻辑接口,这个逻辑接口称为TRUNK接口或者TRUNK口,捆绑在一起的每个物理接口称为成员接口。TRUNK技术可以实现增加带宽、提高可靠性和负载分担的功能。TRUNK: It is a bundling technology. Multiple physical interfaces are bundled into a logical interface, which is called a TRUNK interface or a TRUNK port. Each physical interface bundled together is called a member interface. TRUNK technology can increase bandwidth, improve reliability and load sharing.

应理解,一个TRUNK口的流量可以包括多个用户的流量,每个用户的流量又可以对应多种业务。因此,HQoS技术可以用来对TRUNK口的流量进行层次化、精细化地调度。示例地,TRUNK口的流量也可以通过上述5级调度模型进行调度。It should be understood that the traffic of a trunk port can include the traffic of multiple users, and the traffic of each user can correspond to multiple services. Therefore, HQoS technology can be used to perform hierarchical and refined scheduling of the traffic of the trunk port. For example, the traffic of the trunk port can also be scheduled through the above 5-level scheduling model.

一种实现方式中,TRUNK口绑定的多个成员口的流量集中管理,多个成员口的流量通过一颗调度树管理。图6示出了一种对TRUNK口的流量进行调度的示意图,如图6所示,该TRUNK口绑定了端口1、端口2和端口3共3个成员口。其中,端口1可以对应SQ1,端口2可以对应SQ2,端口3可以对应SQ3,SQ1、SQ2和SQ3可以挂接在同一个GQ(即GQ1)下,GQ1挂接在VI1下,VI1挂接在DP1下。端口1的流量的调度流程为SQ1→GQ1→VI1→DP1,端口2的流量的调度流程为SQ2→GQ1→VI1→DP1,端口3的流量的调度流程为SQ3→GQ1→VI1→DP1,该3个调度流程共用了同一棵调度树。In one implementation, the traffic of multiple member ports bound to the TRUNK port is centrally managed, and the traffic of multiple member ports is managed through a scheduling tree. FIG6 shows a schematic diagram of scheduling the traffic of the TRUNK port. As shown in FIG6, the TRUNK port is bound to three member ports, namely port 1, port 2 and port 3. Among them, port 1 can correspond to SQ1, port 2 can correspond to SQ2, port 3 can correspond to SQ3, SQ1, SQ2 and SQ3 can be mounted under the same GQ (i.e., GQ1), GQ1 is mounted under VI1, and VI1 is mounted under DP1. The scheduling process of the traffic of port 1 is SQ1→GQ1→VI1→DP1, the scheduling process of the traffic of port 2 is SQ2→GQ1→VI1→DP1, and the scheduling process of the traffic of port 3 is SQ3→GQ1→VI1→DP1. The three scheduling processes share the same scheduling tree.

另一种实现方式中,TRUNK口绑定的多个成员口的流量分开管理,每个成员口的流量独立通过一颗调度树管理。图7示出了另一种对TRUNK口的流量进行调度的示意图,如图7所示,该TRUNK口绑定了端口1、端口2和端口3共3个成员口。其中,端口1可以对应SQ1,端口2可以对应SQ2,端口3可以对应SQ3。SQ1挂接在GQ1下,GQ1挂接在VI1下,VI1挂接在DP1下,端口1的流量的调度流程为SQ1→GQ1→VI1→DP1。SQ2挂接在GQ2下,GQ2挂接在VI2下,VI2挂接在DP2下,端口2的流量的调度流程为SQ2→GQ2→VI2→DP2。SQ3挂接在GQ3下,GQ3挂接在VI3下,VI3挂接在DP3下,端口3的流量的调度流程为SQ3→GQ3→VI3→DP3。该3个调度流程使用独立的调度树。In another implementation, the traffic of multiple member ports bound to the TRUNK port is managed separately, and the traffic of each member port is managed independently through a scheduling tree. Figure 7 shows another schematic diagram of scheduling the traffic of the TRUNK port. As shown in Figure 7, the TRUNK port is bound to three member ports, namely port 1, port 2 and port 3. Among them, port 1 can correspond to SQ1, port 2 can correspond to SQ2, and port 3 can correspond to SQ3. SQ1 is attached to GQ1, GQ1 is attached to VI1, VI1 is attached to DP1, and the scheduling process of the traffic of port 1 is SQ1→GQ1→VI1→DP1. SQ2 is attached to GQ2, GQ2 is attached to VI2, VI2 is attached to DP2, and the scheduling process of the traffic of port 2 is SQ2→GQ2→VI2→DP2. SQ3 is attached to GQ3, GQ3 is attached to VI3, VI3 is attached to DP3, and the scheduling process of the traffic of port 3 is SQ3→GQ3→VI3→DP3. The three scheduling processes use independent scheduling trees.

可以理解的是,如果TRUNK口中的每个成员口的流量均独立进行调度,那么会存在流量管理芯片资源消耗大问题。TRUNK接口每增加一个业务流量管理,就需要在TRUNK的每个成员调度树上消耗硬件资源。因此,当前常用的调度方案还是对TRUNK口绑定的多个成员口的流量进行集中管理。It is understandable that if the traffic of each member port in the TRUNK port is scheduled independently, there will be a problem of high consumption of traffic management chip resources. Every time a service traffic management is added to the TRUNK interface, hardware resources need to be consumed on each member scheduling tree of the TRUNK. Therefore, the current commonly used scheduling solution is to centrally manage the traffic of multiple member ports bound to the TRUNK port.

反压(back pressure):是流式系统中关于处理能力的动态反馈机制,是从下游到上游的反馈。当下游对流量处理能力不足时,就会逐级向上游传递反压信号,以指示上游暂停流量传输。反压机制通过源抑制的方式来缓解拥塞。Back pressure: It is a dynamic feedback mechanism about processing capacity in streaming systems, which is feedback from downstream to upstream. When the downstream is not able to process enough traffic, it will gradually transmit back pressure signals to the upstream to instruct the upstream to suspend traffic transmission. The back pressure mechanism alleviates congestion by suppressing sources.

暂停(pause)帧:pause帧是一种控制帧,用于控制数据流停止发送。在流量路径上,如果某个转发设备出现了拥塞的情况,该设备可以产生pause帧,并可以向流量的上游逐级发送pause帧,以控制数据流停止发送,缓解拥塞的情况。pause帧是一种反压信号。Pause frame: A pause frame is a control frame used to stop the data flow from being sent. If a forwarding device on a traffic path is congested, the device can generate a pause frame and send pause frames to the upstream of the traffic level to stop the data flow from being sent and relieve the congestion. The pause frame is a back pressure signal.

在TRUNK口绑定的多个成员口的流量集中管理(如图6所示)的情况下,由于多个成员口共用一个调度树,因此当TRUNK中某一成员的流量异常,产生拥塞反压的时候,会整体阻塞TRUNK口的流量调度,影响TRUNK中其他正常成员口的流量转发。示例地,图8示出了一种拥塞反压的示意图,其中,端口1在接收到pause帧后,会沿着端口1对应的调度树(SQ1→GQ1→VI1→DP1)逐跳反压,以抑制源流量。然而,端口2和端口3的流量也需要经过GQ1→VI1→DP1进行调度。从而,端口1的反压会影响GQ1、VI1和DP1对流量的调度能力,进而影响到端口2和端口3的流量的调度和转发。In the case of centralized traffic management of multiple member ports bound to a TRUNK port (as shown in FIG6 ), since multiple member ports share a scheduling tree, when the traffic of a member in the TRUNK is abnormal and congestion back pressure is generated, the traffic scheduling of the TRUNK port will be blocked as a whole, affecting the traffic forwarding of other normal member ports in the TRUNK. For example, FIG8 shows a schematic diagram of congestion back pressure, in which, after receiving a pause frame, port 1 will perform hop-by-hop back pressure along the scheduling tree (SQ1→GQ1→VI1→DP1) corresponding to port 1 to suppress source traffic. However, the traffic of port 2 and port 3 also needs to be scheduled through GQ1→VI1→DP1. As a result, the back pressure of port 1 will affect the scheduling capabilities of GQ1, VI1, and DP1 for traffic, and then affect the scheduling and forwarding of the traffic of port 2 and port 3.

在TRUNK口绑定的多个成员口的流量进行集中管理的情况下,如何降低成员口流量阻塞对整个TRUNK口流量调度的影响,是一个需要解决的问题。When the traffic of multiple member ports bound to a trunk port is centrally managed, how to reduce the impact of member port traffic blocking on the entire trunk port traffic scheduling is a problem that needs to be solved.

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请的描述中,除非另有说明,“/”表示前后关联的对象是一种“或”的关系,例如,A/B可以表示A或B;本申请中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B可以是单数或者复数。并且,在本申请的描述中,除非另有说明,“多个”是指两个或多于两个。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。同时,在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念,便于理解。The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, "/" indicates that the objects associated before and after are in an "or" relationship, for example, A/B can represent A or B; "and/or" in the present application is only a kind of association relationship describing the associated objects, indicating that there can be three relationships, for example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. And, in the description of the present application, unless otherwise specified, "multiple" refers to two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not necessarily limit the difference. At the same time, in the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for easy understanding.

本申请实施例提供了一种拥塞管理方法的流程示意图可以如图9所示,该方法可以包括如下步骤:The present application provides a congestion management method, the flowchart of which may be shown in FIG9 . The method may include the following steps:

步骤901、对TRUNK口包括的第一物理成员口进行异常检测,第一物理成员口为TRUNK口包括的任一个物理成员口。Step 901: Perform an abnormality detection on a first physical member port included in a TRUNK port, where the first physical member port is any physical member port included in the TRUNK port.

可选地,一个TRUNK口可以包括多个物理成员口,该第一物理成员口即为多个物理成员口中的任一个。示例地,以图6、图7或图8中的TRUNK口为例,该TRUNK口可以包括端口1、端口2和端口3共3个物理成员口,第一物理成员口可以为端口1、端口2或端口3中的任一个。Optionally, a TRUNK port may include multiple physical member ports, and the first physical member port is any one of the multiple physical member ports. For example, taking the TRUNK port in FIG. 6, FIG. 7 or FIG. 8 as an example, the TRUNK port may include three physical member ports, namely port 1, port 2 and port 3, and the first physical member port may be any one of port 1, port 2 or port 3.

可选地,对TRUNK口包括的第一物理成员口进行异常检测,具体可以包括:检测第一物理成员口对应的pause帧的数量和第一物理成员口的流量速率。在单位时间内检测到的第一物理成员口对应的pause帧的数量大于或等于第一阈值,且第一物理成员口的流量速率小于或等于第二阈值的情况下,确定第一物理成员口异常。Optionally, performing abnormality detection on the first physical member port included in the TRUNK port may specifically include: detecting the number of pause frames corresponding to the first physical member port and the traffic rate of the first physical member port. When the number of pause frames corresponding to the first physical member port detected within a unit time is greater than or equal to a first threshold, and the traffic rate of the first physical member port is less than or equal to a second threshold, it is determined that the first physical member port is abnormal.

可以理解的是,若TRUNK口中的物理成员口发生了拥塞,则包括该TRUNK口的设备会生成该物理成员口对应的pause帧,pause帧用于指示该物理成员口对应的流量队列暂停发送。It is understandable that if congestion occurs in a physical member port in a TRUNK port, the device including the TRUNK port will generate a pause frame corresponding to the physical member port, and the pause frame is used to instruct the traffic queue corresponding to the physical member port to suspend sending.

基于此,本申请实施例中,如果检测到了第一物理成员口对应的pause帧,则说明第一物理成员口已经发生了拥塞。若单位时间内检测到的第一物理成员口对应的pause帧的数量越多,则说明第一物理成员口的拥塞状态越严重。另外,第一物理成员口的流量速率越小,也可以说明第一物理成员口的拥塞状态越严重。从而,如果单位时间内检测到的第一物理成员口对应的pause帧的数量较多,且第一物理成员口的流量速率较小,则可由认为第一物理成员口异常。Based on this, in an embodiment of the present application, if a pause frame corresponding to the first physical member port is detected, it means that congestion has occurred in the first physical member port. If the number of pause frames corresponding to the first physical member port detected per unit time is greater, it means that the congestion state of the first physical member port is more serious. In addition, the smaller the traffic rate of the first physical member port, the more serious the congestion state of the first physical member port. Therefore, if the number of pause frames corresponding to the first physical member port detected per unit time is large and the traffic rate of the first physical member port is small, it can be considered that the first physical member port is abnormal.

可选地,对TRUNK口包括的第一物理成员口进行异常检测,具体可以包括:检测第一物理成员口的流量速率。在第一物理成员口的流量速率大于或等于第三阈值,且持续时长大于第四阈值的情况下,确定第一物理成员口异常。Optionally, performing an abnormality detection on the first physical member port included in the TRUNK port may specifically include: detecting the flow rate of the first physical member port. When the flow rate of the first physical member port is greater than or equal to a third threshold and the duration is greater than a fourth threshold, determining that the first physical member port is abnormal.

作为一种可能的实现方式,该第三阈值可以与第一物理成员口的最大速率/带宽接近。如果第一物理成员口的流量速率大于或等于第三阈值,则可以认为第一物理成员口几乎是处于满载状态。可以理解的是,如果第一物理成员口长时间处于接近满载状态,那么该第一物理成员口可能会存在拥塞的风险。为了预防该第一物理成员口发生拥塞,本申请实施例将此种情况认为是第一物理成员口异常。As a possible implementation, the third threshold may be close to the maximum rate/bandwidth of the first physical member port. If the traffic rate of the first physical member port is greater than or equal to the third threshold, it can be considered that the first physical member port is almost in a fully loaded state. It is understandable that if the first physical member port is in a state close to being fully loaded for a long time, then the first physical member port may be at risk of congestion. In order to prevent congestion of the first physical member port, the embodiment of the present application regards this situation as an abnormality of the first physical member port.

步骤902、在第一物理成员口异常时,将第一物理成员口停用或者对第一物理成员口进行限速。Step 902: When the first physical member port is abnormal, the first physical member port is disabled or the speed of the first physical member port is limited.

可选地,在单位时间内检测到的第一物理成员口对应的pause帧的数量大于或等于第一阈值,且第一物理成员口的流量速率小于或等于第二阈值的情况下,可以将第一物理成员口停用。Optionally, when the number of pause frames corresponding to the first physical member port detected within a unit time is greater than or equal to a first threshold, and the traffic rate of the first physical member port is less than or equal to a second threshold, the first physical member port may be disabled.

作为一种可能的实现方式,将第一物理成员口停用,具体可以包括:将第一物理成员口配置为DOWN状态。As a possible implementation manner, deactivating the first physical member port may specifically include: configuring the first physical member port to be in a DOWN state.

可以理解的是,物理端口的状态可以包括UP状态和DOWN状态,处于DOWN状态的物理端口(例如该第一物理成员口)不会工作,不进行流量转发。It is understandable that the state of the physical port may include an UP state and a DOWN state, and a physical port in the DOWN state (eg, the first physical member port) will not work and will not forward traffic.

可选地,该方法还可以包括:将第一物理成员口对应的流量,切换至TRUNK口中除第一物理成员口之外的其他物理成员口转发。Optionally, the method may further include: switching the traffic corresponding to the first physical member port to other physical member ports in the TRUNK port except the first physical member port for forwarding.

应理解,即使将TRUNK口的第一物理成员口DOWN掉,原来第一物理成员口对应的用户流量仍由该TRUNK口转发。此种情况下,需要将第一物理成员口对应的流量,切换至TRUNK口中除第一物理成员口之外的其他物理成员口转发。作为一种可能的实现方式,原来第一物理成员口对应的用户流量可以基于负载均衡的原则,分配给TRUNK口中除第一物理成员口之外的每个物理成员口转发。It should be understood that even if the first physical member port of the TRUNK port is DOWNed, the user traffic corresponding to the original first physical member port is still forwarded by the TRUNK port. In this case, the traffic corresponding to the first physical member port needs to be switched to other physical member ports in the TRUNK port except the first physical member port for forwarding. As a possible implementation method, the user traffic corresponding to the original first physical member port can be allocated to each physical member port in the TRUNK port except the first physical member port for forwarding based on the principle of load balancing.

可选地,在第一物理成员口的流量速率大于或等于第三阈值,且持续时长大于第四阈值的情况下,可以对第一物理成员口进行限速。Optionally, when the traffic rate of the first physical member port is greater than or equal to a third threshold and the duration thereof is greater than a fourth threshold, the rate of the first physical member port may be limited.

作为一种可能的实现方式,对第一物理成员口进行限速,具体可以包括:为第一物理成员口配置CAR,CAR用于限制第一物理成员口的流量速率。其中,CAR可以使得第一物理成员口进出流量速率按某个标准上限进行。本申请可以将CAR的上限设置的较低,以达到限速的目的。As a possible implementation method, limiting the speed of the first physical member port may specifically include: configuring CAR for the first physical member port, where CAR is used to limit the flow rate of the first physical member port. Among them, CAR can make the inbound and outbound flow rate of the first physical member port follow a certain standard upper limit. The present application can set the upper limit of CAR to be lower to achieve the purpose of speed limiting.

应理解的是,通过对第一物理成员口限速的方式,可以减少第一物理成员口后续传输的流量,从而可以缓解第一物理成员口的拥塞情况,防止产生拥塞反压。It should be understood that by limiting the speed of the first physical member port, the traffic subsequently transmitted by the first physical member port can be reduced, thereby alleviating congestion of the first physical member port and preventing congestion back pressure from being generated.

可选地,在为第一物理成员口配置CAR之后,如果检测到TRUNK口在连续第一时长内没有发生异常,则可以取消对第一物理成员口的CAR限速。Optionally, after CAR is configured for the first physical member port, if it is detected that no abnormality occurs on the TRUNK port within a first continuous time period, the CAR rate limit on the first physical member port may be canceled.

综上所述,本申请提供了一种拥塞管理方法,设备可以在检测到TRUNK口中的物理成员口异常时,将该物理成员口停用或者对该物理成员口进行限速,从而可以解决或缓解TRUNK口中的物理成员口的拥塞情况。基于该方案,可以有效避免由于异常导致的反压问题,并可以减小TRUNK口的头阻。In summary, the present application provides a congestion management method, and when a device detects an abnormality in a physical member port in a TRUNK port, the device can deactivate the physical member port or limit the speed of the physical member port, thereby resolving or alleviating the congestion of the physical member port in the TRUNK port. Based on this solution, the back pressure problem caused by the abnormality can be effectively avoided, and the head resistance of the TRUNK port can be reduced.

接下来,将结合上文的描述,对本申请提供的拥塞管理方法的详细流程进行介绍。Next, the detailed process of the congestion management method provided by this application will be introduced in combination with the above description.

作为一种可能的实现方式,图10示出了本申请提供的另一种拥塞管理方法的流程示意图,该方法可以包括如下步骤:As a possible implementation, FIG10 shows a flow chart of another congestion management method provided by the present application, which may include the following steps:

步骤1001、检测第一物理成员口对应的pause帧的数量和第一物理成员口的流量速率。Step 1001: Detect the number of pause frames corresponding to the first physical member port and the traffic rate of the first physical member port.

步骤1002、在单位时间内检测到的第一物理成员口对应的pause帧的数量大于或等于第一阈值,且第一物理成员口的流量速率小于或等于第二阈值的情况下,确定第一物理成员口异常。Step 1002: When the number of pause frames corresponding to the first physical member port detected within a unit time is greater than or equal to a first threshold and the traffic rate of the first physical member port is less than or equal to a second threshold, determine that the first physical member port is abnormal.

步骤1003、将第一物理成员口配置为DOWN状态,并将第一物理成员口对应的流量切换至TRUNK口中除第一物理成员口之外的其他物理成员口转发。Step 1003: configure the first physical member port to be in the DOWN state, and switch the traffic corresponding to the first physical member port to other physical member ports in the TRUNK port except the first physical member port for forwarding.

作为另一种可能的实现方式,图11示出了本申请提供的另一种拥塞管理方法的流程示意图,该方法可以包括如下步骤:As another possible implementation, FIG11 shows a flow chart of another congestion management method provided by the present application, which may include the following steps:

步骤1101、检测第一物理成员口的流量速率。Step 1101: Detect the flow rate of the first physical member port.

步骤1102、在第一物理成员口的流量速率大于或等于第三阈值,且持续时长大于第四阈值的情况下,确定第一物理成员口异常。Step 1102: When the flow rate of the first physical member port is greater than or equal to the third threshold and the duration of the flow rate is greater than the fourth threshold, determine that the first physical member port is abnormal.

步骤1103、为第一物理成员口配置CAR,CAR用于限制第一物理成员口的流量速率。Step 1103: Configure CAR for the first physical member port, where CAR is used to limit the traffic rate of the first physical member port.

可选地,本申请的拥塞管理方法可以应用于路由器或交换机等网络设备中,例如可以应用于具有图2所示结构的网络设备中。作为一种可能的实现方式,为第一物理成员口配置CAR可以由设备中的PFE执行,pause帧、流量速率或流量速率的检测可以由设备中的TM执行。Optionally, the congestion management method of the present application can be applied to a network device such as a router or a switch, for example, it can be applied to a network device having the structure shown in Figure 2. As a possible implementation, configuring CAR for the first physical member port can be performed by a PFE in the device, and the detection of the pause frame, the traffic rate, or the traffic rate can be performed by a TM in the device.

可选地,本申请实施例还提供了一种通信装置,该通信装置可以用于实现上述各种方法。可以理解的是,该通信装置为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Optionally, the embodiment of the present application further provides a communication device, which can be used to implement the above-mentioned various methods. It is understandable that, in order to implement the above-mentioned functions, the communication device includes a hardware structure and/or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

本申请实施例可以根据上述方法实施例中对通信装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application can divide the functional modules of the communication device according to the above method embodiment. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

图12示出了一种通信装置120的结构示意图,该通信装置120可以包括异常检测模块1201和异常处理模块1202。其中,异常检测模块1201,用于对TRUNK口包括的第一物理成员口进行异常检测,第一物理成员口为TRUNK口包括的任一个物理成员口。异常处理模块1202,用于在第一物理成员口异常时,将第一物理成员口停用或者对第一物理成员口进行限速。FIG12 shows a schematic diagram of the structure of a communication device 120, which may include an abnormality detection module 1201 and an abnormality handling module 1202. The abnormality detection module 1201 is used to perform abnormality detection on a first physical member port included in a TRUNK port, where the first physical member port is any physical member port included in the TRUNK port. The abnormality handling module 1202 is used to disable the first physical member port or limit the speed of the first physical member port when the first physical member port is abnormal.

可选地,在对TRUNK口包括的第一物理成员口进行异常检测时,异常检测模块1201具体可以用于检测第一物理成员口对应的pause帧的数量和第一物理成员口的流量速率。异常检测模块1201,还可以用于在单位时间内检测到的第一物理成员口对应的pause帧的数量大于或等于第一阈值,且第一物理成员口的流量速率小于或等于第二阈值的情况下,确定第一物理成员口异常。Optionally, when performing anomaly detection on the first physical member port included in the TRUNK port, the anomaly detection module 1201 can be specifically used to detect the number of pause frames corresponding to the first physical member port and the traffic rate of the first physical member port. The anomaly detection module 1201 can also be used to determine that the first physical member port is abnormal when the number of pause frames corresponding to the first physical member port detected within a unit time is greater than or equal to a first threshold and the traffic rate of the first physical member port is less than or equal to a second threshold.

可选地,在将第一物理成员口停用时,异常处理模块1202,具体用于将第一物理成员口配置为DOWN状态。Optionally, when the first physical member port is disabled, the exception handling module 1202 is specifically configured to configure the first physical member port to be in a DOWN state.

可选地,异常处理模块1202,还可以用于将第一物理成员口对应的流量,切换至TRUNK口中除第一物理成员口之外的其他物理成员口转发。Optionally, the exception handling module 1202 may also be configured to switch the traffic corresponding to the first physical member port to other physical member ports in the TRUNK port except the first physical member port for forwarding.

可选地,在对TRUNK口包括的第一物理成员口进行异常检测,异常检测模块1201具体可以用于检测第一物理成员口的流量速率。异常检测模块1201,还可以用于在第一物理成员口的流量速率大于或等于第三阈值,且持续时长大于第四阈值的情况下,确定第一物理成员口异常。Optionally, when performing anomaly detection on the first physical member port included in the TRUNK port, the anomaly detection module 1201 can be specifically used to detect the flow rate of the first physical member port. The anomaly detection module 1201 can also be used to determine that the first physical member port is abnormal when the flow rate of the first physical member port is greater than or equal to the third threshold and the duration is greater than the fourth threshold.

可选地,在对第一物理成员口进行限速时,异常处理模块1202,具体可以用于为第一物理成员口配置承诺访问速率CAR,CAR用于限制第一物理成员口的流量速率。Optionally, when limiting the rate of the first physical member port, the exception handling module 1202 may be specifically configured to configure a committed access rate CAR for the first physical member port, where CAR is used to limit the traffic rate of the first physical member port.

需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。由于本实施例提供的通信装置120可执行上述拥塞管理方法,因此其所能获得的技术效果可参考上述方法实施例,在此不再赘述。It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here. Since the communication device 120 provided in this embodiment can execute the above congestion management method, the technical effects that can be obtained can refer to the above method embodiment, which will not be repeated here.

可选地,在本实施例中,该通信装置120以采用集成的方式划分各个功能模块的形式来呈现。这里的“模块”可以指特定ASIC,电路,执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。Optionally, in this embodiment, the communication device 120 is presented in the form of dividing various functional modules in an integrated manner. The "module" here may refer to a specific ASIC, circuit, processor and memory that executes one or more software or firmware programs, integrated logic circuit, and/or other devices that can provide the above functions.

在一种可能的实现方式中,本领域的技术人员可以想到该通信装置120可以采用图13所示的通信装置130的形式。示例地,图13示出了本申请实施例提供的另一种通信装置的结构示意图。如图13所示,该通信装置130包括一个或多个处理器1301,通信线路1302,以及至少一个通信接口(图13中仅是示例性的以包括通信接口1303,以及一个处理器1301为例进行说明),可选的还可以包括存储器1304。In a possible implementation, those skilled in the art may imagine that the communication device 120 may take the form of a communication device 130 shown in FIG13. For example, FIG13 shows a schematic diagram of the structure of another communication device provided in an embodiment of the present application. As shown in FIG13, the communication device 130 includes one or more processors 1301, a communication line 1302, and at least one communication interface (FIG. 13 is only exemplary to include a communication interface 1303 and a processor 1301 as an example for explanation), and may optionally include a memory 1304.

处理器1301可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。The processor 1301 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

通信线路1302可包括一通路,用于不同组件之间的通信。The communication line 1302 may include a pathway for communication between different components.

通信接口1303,可以是收发模块用于与其他设备或通信网络通信,如以太网,RAN,无线局域网(wireless local area networks,WLAN)等。例如,所述收发模块可以是收发器、收发机一类的装置。可选的,所述通信接口1303也可以是位于处理器1301内的收发电路,用以实现处理器的信号输入和信号输出。The communication interface 1303 may be a transceiver module for communicating with other devices or communication networks, such as Ethernet, RAN, wireless local area networks (WLAN), etc. For example, the transceiver module may be a device such as a transceiver or a transceiver. Optionally, the communication interface 1303 may also be a transceiver circuit located in the processor 1301 to implement signal input and signal output of the processor.

存储器1304可以是具有存储功能的装置。例如可以是只读存储器(read-onlymemory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路1302与处理器相连接。存储器也可以和处理器集成在一起。The memory 1304 may be a device with a storage function. For example, it may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, 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 disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, 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 in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line 1302. The memory may also be integrated with the processor.

其中,存储器1304用于存储执行本申请方案的计算机执行指令,并由处理器1301来控制执行。处理器1301用于执行存储器1304中存储的计算机执行指令,从而实现本申请实施例中提供的拥塞管理方法。The memory 1304 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 1301. The processor 1301 is used to execute the computer-executable instructions stored in the memory 1304, thereby implementing the congestion management method provided in the embodiment of the present application.

或者,可选的,本申请实施例中,也可以是处理器1301执行本申请下述实施例提供的拥塞管理方法中的处理相关的功能,通信接口1303负责与其他设备或通信网络通信,本申请实施例对此不作具体限定。Alternatively, optionally, in an embodiment of the present application, the processor 1301 may also perform processing-related functions in the congestion management method provided in the following embodiments of the present application, and the communication interface 1303 is responsible for communicating with other devices or communication networks, which is not specifically limited in the embodiments of the present application.

可选的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.

在具体实现中,作为一种实施例,处理器1301可以包括一个或多个CPU,例如图13中的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 1301 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 13 .

在具体实现中,作为一种实施例,通信装置130可以包括多个处理器,例如图13中的处理器1301和处理器1307。这些处理器中的每一个可以是一个单核(single-core)处理器,也可以是一个多核(multi-core)处理器。这里的处理器可以包括但不限于以下至少一种:中央处理单元(central processing unit,CPU)、微处理器、数字信号处理器(DSP)、微控制器(microcontroller unit,MCU)、或人工智能处理器等各类运行软件的计算设备,每种计算设备可包括一个或多个用于执行软件指令以进行运算或处理的核。In a specific implementation, as an embodiment, the communication device 130 may include multiple processors, such as the processor 1301 and the processor 1307 in FIG. 13. Each of these processors may be a single-core processor or a multi-core processor. The processors here may include but are not limited to at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller unit (MCU), or an artificial intelligence processor and other types of computing devices running software, each of which may include one or more cores for executing software instructions to perform calculations or processing.

在具体实现中,作为一种实施例,通信装置130还可以包括输出设备1305和输入设备1306。输出设备1305和处理器1301通信,可以以多种方式来显示信息。例如,输出设备1305可以是液晶显示器(liquid crystal display,LCD),发光二极管(light emittingdiode,LED)显示设备,阴极射线管(cathode ray tube,CRT)显示设备,或投影仪(projector)等。输入设备1306和处理器1301通信,可以以多种方式接收用户的输入。In a specific implementation, as an embodiment, the communication device 130 may further include an output device 1305 and an input device 1306. The output device 1305 communicates with the processor 1301 and may display information in a variety of ways. For example, the output device 1305 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 1306 communicates with the processor 1301 and may receive user input in a variety of ways.

上述的通信装置130有时也可以称为通信设备,其可以是一个通用设备或者是一个专用设备。例如通信装置130可以是交换机、路由器、或具有图13中类似结构的设备。本申请实施例不限定通信装置130的类型。The above-mentioned communication device 130 may sometimes also be referred to as a communication device, which may be a general device or a dedicated device. For example, the communication device 130 may be a switch, a router, or a device having a similar structure as shown in FIG13. The embodiment of the present application does not limit the type of the communication device 130.

可选地,图13所示的通信装置130中的处理器1301可以通过调用存储器1304中存储的计算机执行指令,使得通信装置130执行上述方法实施例中的拥塞管理方法。Optionally, the processor 1301 in the communication device 130 shown in FIG. 13 may call computer-executable instructions stored in the memory 1304 to enable the communication device 130 to execute the congestion management method in the above method embodiment.

应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统、设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(Digital Subscriber Line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing a computer program instruction on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with a medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

如本申请所使用的,术语“组件”、“模块”、“系统”等等旨在指代计算机相关实体,该计算机相关实体可以是硬件、固件、硬件和软件的结合、软件或者运行中的软件。例如,组件可以是,但不限于是:在处理器上运行的处理、处理器、对象、可执行文件、执行中的线程、程序和/或计算机。作为示例,在计算设备上运行的应用和该计算设备都可以是组件。一个或多个组件可以存在于执行中的过程和/或线程中,并且组件可以位于一个计算机中以及/或者分布在两个或更多个计算机之间。此外,这些组件能够从在其上具有各种数据结构的各种计算机可读介质中执行。这些组件可以通过诸如根据具有一个或多个数据分组(例如,来自一个组件的数据,该组件与本地系统、分布式系统中的另一个组件进行交互和/或以信号的方式通过诸如互联网之类的网络与其它系统进行交互)的信号,以本地和/或远程过程的方式进行通信。As used in this application, the terms "component", "module", "system", etc. are intended to refer to a computer-related entity, which can be hardware, firmware, a combination of hardware and software, software, or software in operation. For example, a component can be, but is not limited to: a process running on a processor, a processor, an object, an executable file, a thread in execution, a program, and/or a computer. As an example, an application running on a computing device and the computing device can both be components. One or more components can exist in a process and/or thread in execution, and a component can be located in a computer and/or distributed between two or more computers. In addition, these components can be executed from various computer-readable media with various data structures thereon. These components can communicate in a local and/or remote process manner, such as according to a signal with one or more data packets (for example, data from a component, which interacts with another component in a local system, a distributed system, and/or interacts with other systems in a signal manner through a network such as the Internet).

本申请围绕可包括多个设备、组件、模块等的系统来呈现各个方面、实施例或特征。应当理解和明白的是,各个系统可以包括另外的设备、组件、模块等,并且/或者可以并不包括结合附图讨论的所有设备、组件、模块等。此外,还可以使用这些方案的组合。The present application presents various aspects, embodiments, or features around a system that may include multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and/or may not include all of the devices, components, modules, etc. discussed in conjunction with the figures. In addition, combinations of these schemes may also be used.

另外,在本申请实施例中,“示例的”一词用于表示作例子、例证或说明。本申请中被描述为“示例”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用示例的一词旨在以具体方式呈现概念。In addition, in the embodiments of the present application, the word "exemplary" is used to indicate an example, illustration or description. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the word "exemplary" is used to present concepts in a concrete way.

本申请实施例描述的网络架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims (14)

1.一种拥塞管理方法,其特征在于,所述方法包括:1. A congestion management method, characterized in that the method comprises: 对TRUNK口包括的第一物理成员口进行异常检测,所述第一物理成员口为所述TRUNK口包括的任一个物理成员口;Performing an abnormality detection on a first physical member port included in the TRUNK port, where the first physical member port is any physical member port included in the TRUNK port; 在所述第一物理成员口异常时,将所述第一物理成员口停用或者对所述第一物理成员口进行限速。When the first physical member port is abnormal, the first physical member port is disabled or a speed limit is imposed on the first physical member port. 2.根据权利要求1所述的方法,其特征在于,所述对TRUNK口包括的第一物理成员口进行异常检测,包括:2. The method according to claim 1, wherein the performing abnormality detection on the first physical member port included in the TRUNK port comprises: 检测所述第一物理成员口对应的暂停pause帧的数量和所述第一物理成员口的流量速率;Detecting the number of pause frames corresponding to the first physical member port and the traffic rate of the first physical member port; 在单位时间内检测到的所述第一物理成员口对应的pause帧的数量大于或等于第一阈值,且所述第一物理成员口的流量速率小于或等于第二阈值的情况下,确定所述第一物理成员口异常。When the number of pause frames corresponding to the first physical member port detected within a unit time is greater than or equal to a first threshold, and the traffic rate of the first physical member port is less than or equal to a second threshold, it is determined that the first physical member port is abnormal. 3.根据权利要求2所述的方法,其特征在于,所述将所述第一物理成员口停用,包括:3. The method according to claim 2, wherein deactivating the first physical member port comprises: 将所述第一物理成员口配置为DOWN状态。Configure the first physical member port to be in DOWN state. 4.根据权利要求3所述的方法,其特征在于,所述方法还包括:4. The method according to claim 3, characterized in that the method further comprises: 将所述第一物理成员口对应的流量,切换至所述TRUNK口中除所述第一物理成员口之外的其他物理成员口转发。Switch the traffic corresponding to the first physical member port to other physical member ports in the TRUNK port except the first physical member port for forwarding. 5.根据权利要求1所述的方法,其特征在于,所述对TRUNK口包括的第一物理成员口进行异常检测,包括:5. The method according to claim 1, wherein the performing abnormality detection on the first physical member port included in the TRUNK port comprises: 检测所述第一物理成员口的流量速率;Detecting the flow rate of the first physical member port; 在所述第一物理成员口的流量速率大于或等于第三阈值,且持续时长大于第四阈值的情况下,确定所述第一物理成员口异常。When the flow rate of the first physical member port is greater than or equal to the third threshold and the duration thereof is greater than the fourth threshold, it is determined that the first physical member port is abnormal. 6.根据权利要求5所述的方法,其特征在于,所述对所述第一物理成员口进行限速,包括:6. The method according to claim 5, wherein limiting the rate of the first physical member port comprises: 为所述第一物理成员口配置承诺访问速率CAR,所述CAR用于限制所述第一物理成员口的流量速率。A committed access rate CAR is configured for the first physical member port, where the CAR is used to limit the traffic rate of the first physical member port. 7.一种通信装置,其特征在于,所述通信装置包括:7. A communication device, characterized in that the communication device comprises: 异常检测模块,用于对TRUNK口包括的第一物理成员口进行异常检测,所述第一物理成员口为所述TRUNK口包括的任一个物理成员口;an abnormality detection module, configured to perform abnormality detection on a first physical member port included in the TRUNK port, where the first physical member port is any physical member port included in the TRUNK port; 异常处理模块,用于在所述第一物理成员口异常时,将所述第一物理成员口停用或者对所述第一物理成员口进行限速。The exception handling module is used to disable the first physical member port or limit the speed of the first physical member port when the first physical member port is abnormal. 8.根据权利要求7所述的通信装置,其特征在于,所述异常检测模块用于对TRUNK口包括的第一物理成员口进行异常检测,包括:所述异常检测模块,用于检测所述第一物理成员口对应的暂停pause帧的数量和所述第一物理成员口的流量速率;所述异常检测模块,还用于在单位时间内检测到的所述第一物理成员口对应的pause帧的数量大于或等于第一阈值,且所述第一物理成员口的流量速率小于或等于第二阈值的情况下,确定所述第一物理成员口异常。8. The communication device according to claim 7 is characterized in that the abnormality detection module is used to perform abnormality detection on the first physical member port included in the TRUNK port, including: the abnormality detection module is used to detect the number of pause frames corresponding to the first physical member port and the traffic rate of the first physical member port; the abnormality detection module is also used to determine that the first physical member port is abnormal when the number of pause frames corresponding to the first physical member port detected within a unit time is greater than or equal to a first threshold and the traffic rate of the first physical member port is less than or equal to a second threshold. 9.根据权利要求8所述的通信装置,其特征在于,所述异常处理模块用于将所述第一物理成员口停用,包括:所述异常处理模块,用于将所述第一物理成员口配置为DOWN状态。9. The communication device according to claim 8 is characterized in that the exception handling module is used to deactivate the first physical member port, including: the exception handling module is used to configure the first physical member port to a DOWN state. 10.根据权利要求9所述的通信装置,其特征在于,所述异常处理模块,还用于将所述第一物理成员口对应的流量,切换至所述TRUNK口中除所述第一物理成员口之外的其他物理成员口转发。10. The communication device according to claim 9, characterized in that the exception handling module is further used to switch the traffic corresponding to the first physical member port to other physical member ports in the TRUNK port except the first physical member port for forwarding. 11.根据权利要求7所述的通信装置,其特征在于,所述异常检测模块用于对TRUNK口包括的第一物理成员口进行异常检测,包括:所述异常检测模块,用于检测所述第一物理成员口的流量速率;所述异常检测模块,还用于在所述第一物理成员口的流量速率大于或等于第三阈值,且持续时长大于第四阈值的情况下,确定所述第一物理成员口异常。11. The communication device according to claim 7 is characterized in that the abnormality detection module is used to perform abnormality detection on the first physical member port included in the TRUNK port, including: the abnormality detection module is used to detect the traffic rate of the first physical member port; the abnormality detection module is also used to determine that the first physical member port is abnormal when the traffic rate of the first physical member port is greater than or equal to a third threshold and the duration is greater than a fourth threshold. 12.根据权利要求11所述的通信装置,其特征在于,所述异常处理模块用于对所述第一物理成员口进行限速,包括:所述异常处理模块,用于为所述第一物理成员口配置承诺访问速率CAR,所述CAR用于限制所述第一物理成员口的流量速率。12. The communication device according to claim 11 is characterized in that the exception handling module is used to limit the speed of the first physical member port, including: the exception handling module is used to configure a committed access rate CAR for the first physical member port, and the CAR is used to limit the traffic rate of the first physical member port. 13.一种通信装置,其特征在于,所述通信装置包括:处理器和存储器;13. A communication device, characterized in that the communication device comprises: a processor and a memory; 所述存储器用于存储计算机执行指令,当所述处理器执行所述计算机执行指令时,以使所述通信装置执行如权利要求1-6任一项所述的方法。The memory is used to store computer-executable instructions. When the processor executes the computer-executable instructions, the communication device executes the method according to any one of claims 1 to 6. 14.一种计算机可读存储介质,其特征在于,其上存储有计算机程序,当所述计算机程序被计算机执行时使得所述计算机执行如权利要求1-6中任一项所述的方法。14. A computer-readable storage medium, characterized in that a computer program is stored thereon, and when the computer program is executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 6.
CN202211737887.3A 2022-12-30 2022-12-30 Congestion management method and communication device Pending CN118282988A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211737887.3A CN118282988A (en) 2022-12-30 2022-12-30 Congestion management method and communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211737887.3A CN118282988A (en) 2022-12-30 2022-12-30 Congestion management method and communication device

Publications (1)

Publication Number Publication Date
CN118282988A true CN118282988A (en) 2024-07-02

Family

ID=91646008

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211737887.3A Pending CN118282988A (en) 2022-12-30 2022-12-30 Congestion management method and communication device

Country Status (1)

Country Link
CN (1) CN118282988A (en)

Similar Documents

Publication Publication Date Title
US11962490B2 (en) Systems and methods for per traffic class routing
US7983287B2 (en) Backpressure mechanism for switching fabric
US6859438B2 (en) Policy based quality of service
US6678248B1 (en) Policy based quality of service
CN102971996B (en) Switching node with the load balance of packet burst
US7936770B1 (en) Method and apparatus of virtual class of service and logical queue representation through network traffic distribution over multiple port interfaces
US20050089054A1 (en) Methods and apparatus for provisioning connection oriented, quality of service capabilities and services
US20080159145A1 (en) Weighted bandwidth switching device
EP2575329B1 (en) Proportional bandwidth sharing of the excess part in a MEF Traffic Profile
US20100150164A1 (en) Flow-based queuing of network traffic
US10225195B2 (en) Telecommunication systems and methods using dynamic shaping for allocating network bandwidth
CN104836750B (en) A kind of data center network stream scheduling method based on round-robin
CN107454015B (en) OF-DiffServ model-based QoS control method and system
US8144588B1 (en) Scalable resource management in distributed environment
US9608927B2 (en) Packet exchanging device, transmission apparatus, and packet scheduling method
US20110019572A1 (en) Method and apparatus for shared shaping
US8867560B2 (en) Managing crossbar oversubscription
CN101471854A (en) Method and device for forwarding message
WO2020232182A1 (en) Quality of service in virtual service networks
CN100476790C (en) A method and system for resource bundling in communication network
US7990873B2 (en) Traffic shaping via internal loopback
US7623456B1 (en) Apparatus and method for implementing comprehensive QoS independent of the fabric system
JP5789548B2 (en) Communication device
CN118282988A (en) Congestion management method and communication device
Reinemo et al. Ethernet for high-performance data centers: On the new IEEE datacenter bridging standards

Legal Events

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