CN100411388C - A Method for Realizing Mirror Image in Switching System - Google Patents
A Method for Realizing Mirror Image in Switching System Download PDFInfo
- Publication number
- CN100411388C CN100411388C CNB2005100710995A CN200510071099A CN100411388C CN 100411388 C CN100411388 C CN 100411388C CN B2005100710995 A CNB2005100710995 A CN B2005100710995A CN 200510071099 A CN200510071099 A CN 200510071099A CN 100411388 C CN100411388 C CN 100411388C
- Authority
- CN
- China
- Prior art keywords
- mirror image
- output queue
- output
- mirroring
- appearance
- 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.)
- Expired - Lifetime
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域 technical field
本发明涉及网络通讯技术领域,具体涉及一种交换系统中实现镜像的方法。The invention relates to the technical field of network communication, in particular to a method for realizing mirroring in a switching system.
背景技术 Background technique
基于输出排队的交换系统的基本工作原理如附图1所示。在图1中,InP_0至InP_n是交换系统的输入源端口,OutP_0至OutP_n是交换系统的输出目的端口,通常每个输出目的端口都设置有一个或多个输出队列。The basic working principle of the switching system based on output queuing is shown in Fig. 1 . In FIG. 1 , InP_0 to InP_n are input source ports of the switching system, and OutP_0 to OutP_n are output destination ports of the switching system. Usually, each output destination port is provided with one or more output queues.
一个输出目的端口具有多个输出队列的示意图如附图2所示。A schematic diagram of an output destination port having multiple output queues is shown in FIG. 2 .
下面结合附图1、附图2对基于输出排队的交换系统对数据包的处理过程进行描述。The process of processing data packets by the switching system based on output queuing will be described below with reference to Fig. 1 and Fig. 2 .
在图1、图2中,交换系统从多个输入源端口接收数据包,并从接收的数据包中提取关键信息,如源MAC、源IP地址等,将关键信息作为数据交换的依据,确定数据包的输出目的端口和输出队列号,将数据包排入到相应输出目的端口的相应输出队列中,输出目的端口采用一定的调度算法对其输出目的端口内的多个输出队列进行调度,将多个输出队列中的数据包输出。In Figure 1 and Figure 2, the switching system receives data packets from multiple input source ports, and extracts key information from the received data packets, such as source MAC, source IP address, etc., and uses the key information as the basis for data exchange to determine The output destination port and output queue number of the data packet, the data packet is arranged in the corresponding output queue of the corresponding output destination port, and the output destination port adopts a certain scheduling algorithm to schedule multiple output queues in its output destination port, and the Packet output in multiple output queues.
在交换系统中,实现镜像的目的是为了观察被镜像数据的流量、内容、顺序等。镜像包括入镜像和出镜像。In the switching system, the purpose of mirroring is to observe the flow, content, sequence, etc. of the mirrored data. Mirroring includes incoming mirroring and outgoing mirroring.
入镜像是指将某个或某些输入源端口,即入镜像源端口输入的被镜像数据包全部原样复制一份输出到某个特定的输出目的端口,即入镜像目的端口。出镜像是指将某个或某些输出目的端口,即出镜像源端口输出的被镜像数据包全部原样复制一份输出到某个特定输出目的端口,即出镜像目的端口。Incoming mirroring refers to copying all the mirrored data packets input by one or some input source ports, that is, the incoming mirroring source port, and outputting them to a specific output destination port, that is, the incoming mirroring destination port. Out mirroring refers to copying all the mirrored data packets output by one or some output destination ports, that is, the mirrored source port, to a specific output destination port, that is, the mirrored destination port.
下面结合附图对目前的入镜像实现方法和出镜像实现方法分别进行说明。The current methods for implementing mirroring in and mirroring out are described below in combination with the accompanying drawings.
入镜像的实现方法如附图3所示。The implementation method of mirroring is shown in Figure 3.
在图3中,InP_0至InP_5是交换系统的6个输入源端口,OutP_0至OutP_5是交换系统的6个输出目的端口。其中,OutP_3设置有4个输出队列,输出队列0设置为入镜像输出队列。In FIG. 3 , InP_0 to InP_5 are six input source ports of the switching system, and OutP_0 to OutP_5 are six output destination ports of the switching system. Among them, OutP_3 is set with 4 output queues, and
入镜像源端口输入的数据包经过入镜像分析,被原样复制一份,排入入镜像目的端口中的入镜像输出队列,入镜像目的端口的输出队列调度器将入镜像数据包调度输出。如InP_2为入镜像源端口,OutP_3为入镜像目的端口,OutP_3的输出队列0为入镜像输出队列,白色数据包是被镜像数据包,灰色数据包是入镜像数据包,细黑线为正常数据包的流向,粗黑线为入镜像数据包的流向。The data packet input by the source port of the mirror image is analyzed by the mirror image, copied as it is, and put into the mirror image output queue of the mirror destination port, and the output queue scheduler of the mirror mirror destination port schedules the mirror data packet for output. For example, InP_2 is the mirroring source port, OutP_3 is the mirroring destination port, the
从入镜像源端口输入的数据包0、1、2等被依次复制,并依次排入入镜像输出队列0,入镜像数据包以同样的顺序从入镜像目的端口输出。The
在上述入镜像过程中,如果有正常数据包即非镜像数据包排入入镜像目的端口的输出队列0时,从入镜像目的端口输出数据包则包含有正常数据包和入镜像数据包。In the above-mentioned mirroring process, if there is a normal data packet, that is, a non-mirrored data packet, which enters the
出镜像的实现方法如附图4所示。The implementation method of mirroring is shown in Figure 4.
在图4中,InP_0至InP_5是交换系统的6个输入源端口,OutP_0至OutP_5是交换系统的6个输出目的端口。其中,OutP_3设置有4个输出队列,输出队列0设置为出镜像输出队列。In FIG. 4, InP_0 to InP_5 are 6 input source ports of the switching system, and OutP_0 to OutP_5 are 6 output destination ports of the switching system. Among them, OutP_3 is set with 4 output queues, and
各输入源端口输入的数据包经出镜像分析,确定需要排入出镜像源端口输出队列的数据包,这些数据包在被原样复制一份,排入出镜像目的端口中的出镜像输出队列,出镜像目的端口的队列调度器将出镜像数据包调度输出。如OutP_2为出镜像源端口,OutP_3为出镜像目的端口,OutP_3中的输出队列0为出镜像输出队列,白色数据包是被镜像数据包,灰色数据包是出镜像数据包,细黑线是正常数据包的流向,粗黑线是入镜像数据包的流向。The data packets input by each input source port are analyzed by the outgoing mirror, and the data packets that need to be discharged into the output queue of the mirrored source port are determined. The queue scheduler of the mirroring destination port schedules and outputs the mirroring data packets. For example, OutP_2 is the mirroring source port, OutP_3 is the mirroring destination port, the
交换系统在被镜像数据包0、1、2等排入出镜像源端口的输出队列前,复制被镜像数据包,并将复制的出镜像数据包依次排入出镜像输出队列,出镜像数据包以同样的顺序从出镜像目的端口输出。Before the mirrored
在上述出镜像过程中,如果有正常数据包即非镜像数据包排入出镜像目的端口的输出队列0时,从出镜像目的端口输出数据包则包含有正常数据包和出镜像数据包。In the above mirroring process, if a normal data packet, that is, a non-mirrored data packet, enters the
从上面对入镜像、出镜像实现过程的描述中可知,由于入镜像目的端口/出镜像目的端口的输出队列中有正常数据包和镜像数据包混杂的现象,输出队列调度器无法控制队列中正常数据包和入镜像数据包/出镜像数据包的输出优先级、输出占用带宽等,使正常数据包的输出性能受到镜像数据包的影响。同时,在出镜像过程中,由于被镜像数据包在排入出镜像源端口的输出队列前被复制,而被镜像数据包会被排入到出镜像源端口的多个输出队列中,所以,在出镜像源端口输出调度后,被镜像数据包的输出顺序会发生改变,从而导致出镜像源端口输出的被镜像数据包与出镜像目的端口输出的出镜像数据包的顺序不一致,没有真正实现镜像的目的。From the above description of the implementation process of mirroring in and mirroring out, it can be seen that due to the phenomenon that normal data packets and mirrored data packets are mixed in the output queue of the destination port of mirroring in/out of the mirroring destination port, the output queue scheduler cannot control the output queue. The output priority of the normal data packet and the incoming/outgoing mirrored data packet, the output occupied bandwidth, etc., make the output performance of the normal data packet affected by the mirrored data packet. At the same time, in the mirroring process, because the mirrored data packet is copied before entering the output queue of the mirroring source port, the mirrored data packet will be queued into multiple output queues of the mirroring source port, so, After the output of the mirroring source port is scheduled, the output order of the mirrored data packets will change, resulting in the inconsistency between the mirrored data packets output by the mirroring source port and the mirrored data packets output by the mirroring destination port, which is not really implemented. mirroring purpose.
发明内容 Contents of the invention
本发明的目的在于,提供一种交换系统中实现镜像的方法,通过设置镜像数据包专用的镜像输出队列,实现了提高正常数据包输出性能的目的。The object of the present invention is to provide a method for implementing mirroring in a switching system, and by setting a dedicated mirroring output queue for mirrored data packets, the purpose of improving the output performance of normal data packets is realized.
为达到上述目的,本发明提供的一种交换系统中实现镜像的方法,包括:In order to achieve the above object, a method for realizing mirroring in a switching system provided by the present invention includes:
a、在镜像目的端口设置镜像数据包专用的镜像输出队列;a. Set a dedicated mirror output queue for mirror data packets on the mirror destination port;
b、将镜像数据包顺序存储在所述镜像输出队列中;b. storing mirrored data packets sequentially in the mirrored output queue;
c、将所述镜像输出队列中存储的镜像数据包从所述镜像目的端口顺序输出。c. Sequentially output the mirrored data packets stored in the mirrored output queue from the mirrored destination port.
所述镜像输出队列为:入镜像输出队列或出镜像输出队列;The mirror image output queue is: entering the mirror image output queue or going out the mirror image output queue;
且所述镜像数据包为:入镜像数据包或出镜像数据包。And the mirrored data packet is: an incoming mirrored data packet or an outgoing mirrored data packet.
所述镜像目的端口包括入镜像目的端口,所述镜像输出队列包括入镜像输出队列,且所述步骤a包括:The mirroring destination port includes an incoming mirroring destination port, the mirroring output queue includes an incoming mirroring output queue, and the step a includes:
确定至少对应一个入镜像源端口的入镜像目的端口;Determining an incoming mirroring destination port corresponding to at least one incoming mirroring source port;
在所述入镜像目的端口中设置入镜像输出队列。Set the mirroring output queue in the mirroring destination port.
所述镜像数据包包括入镜像数据包、且所述步骤a还包括:The mirrored data packet includes an incoming mirrored data packet, and the step a also includes:
在所述入镜像目的端口中设置镜像输出队列调度器;Setting the mirror output queue scheduler in the mirror image destination port;
且所述步骤c包括:And the step c includes:
所述镜像输出队列调度器根据预定调度规则将所述入镜像输出队列中存储的入镜像数据包和入镜像目的端口的输出队列调度器调度输出的数据包调度输出。The mirrored output queue scheduler schedules and outputs the mirrored data packets stored in the mirrored output queue and the data packets scheduled to be output by the output queue scheduler of the mirrored destination port according to a predetermined scheduling rule.
所述镜像目的端口包括出镜像目的端口,所述镜像输出队列包括出镜像输出队列,且所述步骤a包括:The mirroring destination port includes a mirroring destination port, the mirroring output queue includes a mirroring output queue, and the step a includes:
确定至少对应一个出镜像源端口的出镜像目的端口;Determining the mirroring destination port corresponding to at least one mirroring source port;
在所述出镜像目的端口设置出镜像输出队列。A mirror output queue is set on the mirror destination port.
所述镜像数据包包括出镜像数据包、且所述步骤b包括:在被镜像数据包从出镜像源端口的输出队列中调度出后,复制被镜像数据包为出镜像数据包,并将所述出镜像数据包顺序存储在所述出镜像输出队列中。The mirrored data packet includes a mirrored data packet, and the step b includes: after the mirrored data packet is dispatched from the output queue of the mirrored source port, copying the mirrored data packet as a mirrored data packet, and transferring the mirrored data packet The outgoing mirroring data packets are sequentially stored in the outgoing mirroring output queue.
所述步骤a还包括:在所述出镜像目的端口设置镜像输出队列调度器;The step a also includes: setting a mirror output queue scheduler at the mirror destination port;
且所述步骤c包括:And the step c includes:
所述出镜像目的端口设置的镜像输出队列调度器根据预定调度规则将所述出镜像输出队列中存储的出镜像数据包和出镜像目的端口的输出队列调度器调度输出的数据包调度输出。The mirroring output queue scheduler set by the mirroring destination port schedules and outputs the mirroring data packets stored in the mirroring output queue and the data packets output by the output queue scheduler of the mirroring destination port according to predetermined scheduling rules.
所述镜像输出队列包括:入镜像输出队列和出镜像输出队列;The mirror output queue includes: an input mirror output queue and an outgoing mirror output queue;
且所述步骤a包括:And said step a comprises:
在同一输出端口中设置入镜像输出队列和出镜像输出队列。Set up mirrored output queue and mirrored output queue in the same output port.
所述镜像数据包包括:入镜像数据包和出镜像数据包、且所述步骤b包括:The mirrored data packet includes: an incoming mirrored data packet and an outgoing mirrored data packet, and the step b includes:
将入镜像数据包顺序存储在所述入镜像输出队列中;Incoming mirroring data packets are sequentially stored in the mirroring output queue;
在出镜像的被镜像数据包从出镜像源端口的输出队列中调度出后,复制所述被镜像数据包为出镜像数据包,并将所述出镜像数据包顺序存储在所述出镜像输出队列中。After the mirrored data packet is dispatched from the output queue of the mirrored source port, the mirrored data packet is copied as the mirrored data packet, and the mirrored data packet is sequentially stored in the mirrored output in queue.
所述步骤a还包括:Said step a also includes:
在所述输出端口中设置镜像输出队列调度器;Setting a mirrored output queue scheduler in the output port;
且所述步骤c包括:And the step c includes:
所述镜像输出队列调度器根据预定调度规则将所述出镜像输出队列中存储的出镜像数据包、所述入镜像输出队列中存储的入镜像数据包和所述输出端口的输出队列调度器调度输出的数据包调度输出。The mirrored output queue scheduler schedules the mirrored data packets stored in the mirrored output queue, the mirrored data packets stored in the mirrored output queue, and the output queue scheduler of the output port according to a predetermined scheduling rule. The outgoing packet scheduler output.
通过上述技术方案的描述可知,本发明通过设置镜像数据包专用的镜像输出队列,如入镜像输出队列、出镜像输出队列,使入/出镜像目的端口的调度器如镜像输出队列调度器等,能够根据预定的调度算法灵活控制正常数据包与镜像数据包的输出优先级、输出占用带宽等,避免了入/出镜像数据包对正常数据包输出性能的影响;在出镜像过程中,通过在被镜像数据包排入出镜像源端口的输出队列后复制,使本发明能够严格保证被镜像数据包输出顺序与出镜像数据包输出顺序的一致性,真正实现了镜像的目的;从而实现了提高数据包传输性能、提高镜像可靠性的目的。By the description of the above-mentioned technical scheme, it can be seen that the present invention makes the scheduler of the mirror image destination port such as the mirror image output queue scheduler etc. It can flexibly control the output priority and output bandwidth of normal data packets and mirrored data packets according to the predetermined scheduling algorithm, avoiding the impact of incoming/outgoing mirrored data packets on the output performance of normal data packets; After the mirrored data packet is discharged into the output queue of the mirror image source port, the present invention can strictly guarantee the consistency of the output sequence of the mirrored data packet and the output sequence of the mirrored data packet, and the purpose of mirroring is really realized; thereby realizing the improvement The purpose of improving data packet transmission performance and improving mirroring reliability.
附图说明 Description of drawings
图1是基于输出排队的交换系统的基本工作原理图;Fig. 1 is the basic working principle diagram of the switching system based on output queuing;
图2是基于输出排队的交换系统对数据包的处理过程示意图;Fig. 2 is a schematic diagram of the processing process of data packets based on the switching system of output queuing;
图3是现有技术的入镜像实现方法示意图;FIG. 3 is a schematic diagram of a method for implementing mirroring in the prior art;
图4是现有技术的出镜像实现方法示意图;Fig. 4 is a schematic diagram of a method for implementing mirroring in the prior art;
图5是本发明的入镜像实现方法示意图;Fig. 5 is a schematic diagram of the implementation method of mirroring in the present invention;
图6是本发明的出镜像实现方法示意图。FIG. 6 is a schematic diagram of a method for implementing mirroring in the present invention.
具体实施方式 Detailed ways
本发明的核心是:设置镜像数据包专用的镜像输出队列,将镜像数据包存储在所述镜像输出队列,将所述镜像输出队列中存储的镜像数据包从镜像目的端口顺序输出。The core of the present invention is to set a dedicated mirroring output queue for mirroring data packets, store mirroring data packets in the mirroring output queue, and sequentially output the mirroring data packets stored in the mirroring output queue from mirroring destination ports.
下面基于本发明的核心思想对本发明提供的技术方案做进一步的描述。The technical solution provided by the present invention will be further described below based on the core idea of the present invention.
本发明首先需要在交换系统内增加一个镜像数据包专用的镜像输出队列,这个镜像输出队列是一个单独的队列,在结构上与镜像目的端口中原有的其他输出队列是分开的。The present invention first needs to add a dedicated mirror output queue for mirror data packets in the switching system. This mirror output queue is a separate queue and is structurally separated from other original output queues in the mirror destination port.
由于镜像实现方法可以分为入镜像实现方法和出镜像实现方法,所以,下面对本发明的入镜像实现方法和出镜像实现方法分别进行说明。Because the mirroring implementation method can be divided into the mirroring implementation method and the mirroring implementation method, the following describes the mirroring implementation method and the mirroring implementation method of the present invention respectively.
在入镜像过程中,本发明增加的镜像数据包专用的镜像输出队列可以称为入镜像输出队列。入镜像输出队列可以配置在交换系统中的任何一个输出端口,配置有入镜像输出队列的输出端口就是入镜像目的端口。In the mirroring process, the dedicated mirroring output queue added by the present invention may be called the mirroring output queue. The mirrored output queue can be configured on any output port in the switching system, and the output port configured with the mirrored output queue is the mirrored destination port.
入镜像目的端口可以对应配置一个或多个输入端口为入镜像源端口。One or more input ports can be correspondingly configured as the mirroring source ports for the mirroring destination port.
从入镜像源端口输入的数据包经过入镜像分析处理,将被镜像数据包原样复制为入镜像数据包,排入到入镜像输出队列中。The data packet input from the mirroring source port is analyzed and processed by the mirroring, and the mirrored data packet is copied as the mirroring data packet as it is, and placed in the mirroring output queue.
本发明还在入镜像目的端口设置镜像输出队列调度器,该镜像输出队列调度器独立于入镜像目的端口原有的输出队列调度器,即在入镜像目的端口增加一级数据包输出的调度管理。The present invention also sets the mirror output queue scheduler at the destination port of the mirror image, and the mirror output queue scheduler is independent of the original output queue scheduler of the destination port of the mirror image. .
入镜像目的端口原有的输出队列调度器调度输出的数据包和入镜像输出队列中存储的入镜像数据包需要经过镜像输出队列调度器的调度后再从入镜像目的端口输出。The output data packets scheduled by the original output queue scheduler of the mirroring destination port and the mirroring data packets stored in the mirroring output queue need to be scheduled by the mirroring output queue scheduler before being output from the mirroring destination port.
下面结合附图5对本发明的入镜像实现方法进行说明。The implementation method of mirroring in the present invention will be described below with reference to FIG. 5 .
在图5中,InP_0至InP_5是交换系统的6个输入源端口,OutP_0至OutP_5是交换系统的6个输出目的端口。其中,由于本发明的入镜像输出队列设置在OutP_3中,所以,OutP_3为入镜像目的端口。In FIG. 5 , InP_0 to InP_5 are six input source ports of the switching system, and OutP_0 to OutP_5 are six output destination ports of the switching system. Wherein, since the output queue of the mirroring in the present invention is set in OutP_3, OutP_3 is the destination port of mirroring in.
OutP_3设置有5个输出队列,包括:输出队列0至输出队列3和入镜像输出队列。输出队列0至输出队列3为入镜像目的端口原有的输出队列,用于存储正常数据包,入镜像输出队列专用用于存储入镜像数据包。从图5中可明显看出,入镜像输出队列独立于输出队列0至输出队列3,与输出队列0至输出3从结构上是分开的。OutP_3 is set with 5 output queues, including:
本发明在入镜像目的端口OutP_3中设置了镜像输出队列调度器。从图5中可明显看出,镜像输出队列调度器独立于入镜像目的端口OutP_3中的输出队列调度器,与原有的输出队列调度器从结构上是分开的。In the present invention, a mirror image output queue scheduler is set in the mirror image destination port OutP_3. It can be clearly seen from FIG. 5 that the mirrored output queue scheduler is independent of the output queue scheduler in the mirrored destination port OutP_3, and is structurally separated from the original output queue scheduler.
设定输入源端口InP_2为入镜像源端口。从入镜像源端口InP_2输入的白色数据包是正常数据包,即被镜像数据包,灰色数据包是入镜像数据包。细黑线为正常数据包的流向,镜像输出队列调度器左边的粗黑线为入镜像数据包的流向,镜像输出队列调度器右边的粗黑线为经过镜像输出队列调度器调度后的入镜像数据包和正常数据包的共同流向。Set the input source port InP_2 as the input mirror source port. The white data packets input from the incoming mirroring source port InP_2 are normal data packets, that is, mirrored data packets, and the gray data packets are incoming mirroring data packets. The thin black line is the flow direction of normal data packets, the thick black line on the left side of the mirror output queue scheduler is the flow direction of incoming mirror data packets, and the thick black line on the right side of the mirror output queue scheduler is the incoming image after being scheduled by the mirror output queue scheduler The common flow of data packets and normal data packets.
从入镜像源端口InP_2输入的数据包0、1、2等经过入镜像分析后,被依次复制为入镜像数据包0、1、2等,并依次排入入镜像数据包专用的入镜像输出队列。The
镜像输出队列调度器在入镜像目的端口的输出队列调度器调度之后再进行一级调度,即对输出队列调度器输出的正常数据包和入镜像输出队列中存储的入镜像数据包进行调度,经镜像输出队列调度器调度后的正常数据包和入镜像数据包从入镜像目的端口OutP_3中输出。The mirrored output queue scheduler performs one-level scheduling after the output queue scheduler scheduling of the mirrored destination port, that is, schedules the normal data packets output by the output queue scheduler and the mirrored data packets stored in the mirrored output queue. The normal data packets and mirrored data packets scheduled by the mirrored output queue scheduler are output from the mirrored destination port OutP_3.
镜像输出队列调度器根据预定的调度算法能够有效控制入镜像数据包和正常数据包的输出优先级、输出占用带宽等,从而避免了正常数据包的传输性能受入镜像数据包影响的问题,且保证入镜像数据包输出的顺序和被镜像数据包的输入顺序严格一致。The mirrored output queue scheduler can effectively control the output priority and output bandwidth of incoming mirrored data packets and normal data packets according to a predetermined scheduling algorithm, thereby avoiding the problem that the transmission performance of normal data packets is affected by incoming mirrored data packets, and guarantees The output order of the mirrored data packets is strictly consistent with the input order of the mirrored data packets.
在出镜像过程中,本发明增加的镜像数据包专用的镜像输出队列可以称为出镜像输出队列。出镜像输出队列可以配置在交换系统中的任何一个输出端口,配置有出镜像输出队列的输出端口就是出镜像目的端口。In the mirroring process, the dedicated mirroring output queue for the mirrored data packet added by the present invention may be called the mirroring output queue. The mirroring output queue can be configured on any output port in the switching system, and the output port configured with the mirroring output queue is the mirroring destination port.
出镜像目的端口可以对应配置一个或多个输出端口为出镜像源端口。One or more output ports can be correspondingly configured as mirroring source ports for the mirroring destination port.
经出镜像源端口的输出队列调度器调度输出后的数据包经过出镜像分析处理,将被镜像数据包原样复制为出镜像数据包,排入到出镜像输出队列中,即输入出镜像源端口的数据包不是在排入出镜像源端口的输出队列前被复制的,而是在从出镜像源端口的输出队列中输出后被复制的。The output queue scheduler of the output mirroring source port schedules and outputs the data packets after the output mirroring analysis and processing, and copies the mirrored data packets as the original mirroring data packets, and puts them into the output mirroring output queue, that is, the output mirroring source port The packets are not copied before being enqueued into the output queue of the mirrored source port, but after they are output from the output queue of the mirrored source port.
本发明还在出镜像目的端口设置镜像输出队列调度器,该镜像输出队列调度器独立于出镜像目的端口原有的输出队列调度器,即在出镜像目的端口增加一级数据包输出的调度管理。The present invention also sets the mirror image output queue scheduler at the mirror image destination port, and the mirror image output queue scheduler is independent of the original output queue scheduler of the mirror image destination port. .
出镜像目的端口原有的输出队列调度器调度输出的数据包和出镜像输出队列中存储的出镜像数据包需要经过镜像输出队列调度器的调度后再从出镜像目的端口输出。The data packets output by the original output queue scheduler of the mirroring destination port and the mirroring data packets stored in the mirroring output queue need to be scheduled by the mirroring output queue scheduler before being output from the mirroring destination port.
下面结合附图6对本发明的出镜像实现方法进行说明。The implementation method of mirroring in the present invention will be described below with reference to FIG. 6 .
在图6中,InP_0至InP_5是交换系统的6个输入源端口,OutP_0至OutP_5是交换系统的6个输出目的端口。其中,由于本发明的出镜像输出队列设置在输出目的端口OutP_3中,所以,OutP_3为出镜像目的端口。In FIG. 6, InP_0 to InP_5 are 6 input source ports of the switching system, and OutP_0 to OutP_5 are 6 output destination ports of the switching system. Wherein, since the mirroring output queue of the present invention is set in the output destination port OutP_3, OutP_3 is the mirroring destination port.
出镜像目的端口OutP_3设置有5个输出队列,包括:输出队列0至输出队列3和出镜像输出队列。输出队列0至输出队列3为出镜像目的端口原有的输出队列,用于存储正常数据包,出镜像输出队列专用用于存储出镜像数据包。从图6中可明显看出,出镜像输出队列独立于输出队列0至输出队列3,与输出队列0至输出3从结构上是分开的。The mirroring destination port OutP_3 is set with 5 output queues, including:
本发明在出镜像目的端口OutP_3中设置了镜像输出队列调度器。从图6中可明显看出,镜像输出队列调度器独立于出镜像目的端口OutP_3中的输出队列调度器,与出镜像目的端口OutP_3原有的输出队列调度器从结构上是分开的。The present invention sets a mirror output queue scheduler in the mirror destination port OutP_3. It can be clearly seen from FIG. 6 that the mirroring output queue scheduler is independent of the output queue scheduler in the mirroring destination port OutP_3, and is structurally separated from the original output queue scheduler of the mirroring destination port OutP_3.
设定输出目的端口OutP_2为出镜像源端口。从出镜像源端口OutP_2输出的白色数据包是正常数据包,即被镜像数据包,灰色数据包是出镜像数据包。细黑线为正常数据包的流向,镜像输出队列调度器左边的粗黑线为出镜像数据包的流向,镜像输出队列调度器右边的粗黑线为经过镜像输出队列调度器调度后的入镜像数据包和正常数据包的共同流向。Set the output destination port OutP_2 as the mirroring source port. The white data packets output from the mirroring source port OutP_2 are normal data packets, that is, the mirrored data packets, and the gray data packets are mirrored data packets. The thin black line is the flow direction of normal data packets, the thick black line on the left side of the mirrored output queue scheduler is the flow direction of outbound mirrored data packets, and the thick black line on the right side of the mirrored output queue scheduler is the incoming image after being scheduled by the mirrored output queue scheduler The common flow of data packets and normal data packets.
从出镜像源端口OutP_2输出的数据包0、1、2等经过出镜像分析后,被依次复制为出镜像数据包0、1、2等,并依次排入出镜像数据包专用的出镜像输出队列。The
比较图4和图6可知,在现有技术中,在经过出镜像分析后,被镜像数据包在排入出镜像源端口的输出队列前被复制,由于被镜像数据包可能会被排入出镜像源端口的不同输出队列中,所以,出镜像源端口输出的被镜像数据包的顺序和出镜像目的端口输出的出镜像数据包的顺序不同。而在本发明中,出镜像源端口输出的被镜像数据包在经过出镜像分析后,才被复制,而且,复制出来的出镜像数据包被排入出镜像数据包专用的出镜像输出队列中,这样,就能够严格保证出镜像目的端口输出的出镜像数据包与出镜像源端口输出的被镜像数据包的顺序完全一致。Comparing Fig. 4 and Fig. 6, it can be known that in the prior art, after going through the mirroring analysis, the mirrored data packet is copied before being put into the output queue of the mirroring source port, because the mirrored data packet may be put into the output queue of the mirroring source port. In different output queues of the mirroring source port, the order of the mirrored data packets output by the mirroring source port is different from the order of the mirrored data packets output by the mirroring destination port. And in the present invention, the mirrored data packet exported by the mirror image source port is just copied after going out the mirror image analysis, and the mirrored data packet copied out is arranged in the dedicated mirror image output queue of the mirrored data packet , in this way, it can be strictly guaranteed that the order of the mirrored data packets output by the mirror destination port is exactly the same as that of the mirrored data packets output by the mirror source port.
镜像输出队列调度器在出镜像目的端口的输出队列调度器调度之后再进行一级调度,即对输出队列调度器输出的正常数据包和出镜像输出队列中存储的出镜像数据包进行调度,经镜像输出队列调度器调度后的正常数据包和出镜像数据包从出镜像目的端口OutP_3中输出。The mirrored output queue scheduler performs one-level scheduling after the output queue scheduler scheduling of the mirrored destination port, that is, the normal data packets output by the output queue scheduler and the mirrored data packets stored in the mirrored output queue are scheduled. The normal data packets and mirrored data packets scheduled by the mirrored output queue scheduler are output from the mirrored destination port OutP_3.
镜像输出队列调度器根据预定的调度算法能够有效控制出镜像数据包和正常数据包的输出优先级、输出占用带宽等,从而避免了正常数据包的传输性能受出镜像数据包影响的问题,且保证出镜像数据包输出的顺序和被镜像数据包的输入顺序严格一致。The mirrored output queue scheduler can effectively control the output priority and output bandwidth of the mirrored data packets and normal data packets according to the predetermined scheduling algorithm, thereby avoiding the problem that the transmission performance of the normal data packets is affected by the mirrored data packets, and Ensure that the output sequence of the mirrored data packets is strictly consistent with the input sequence of the mirrored data packets.
如果在交换系统中需要同时使用入镜像技术和出镜像技术,则入镜像输出队列和出镜像输出队列可同时配置在同一个输出端口中。If the in-mirror technology and the out-mirror technology need to be used simultaneously in the switching system, the in-mirror output queue and the out-mirror output queue can be configured on the same output port at the same time.
当入镜像输出队列和出镜像输出队列配置在同一输出端口时,该输出端口既是入镜像目的端口,又是出镜像目的端口。该输出端口可同时对应多个入镜像源端口和出镜像源端口。When the mirroring output queue and the mirroring output queue are configured on the same output port, the output port is both the mirroring destination port and the mirroring destination port. The output port can correspond to multiple incoming mirroring source ports and outgoing mirroring source ports at the same time.
从入镜像源端口输入的数据包经过入镜像分析处理,被镜像数据包会被原样复制为入镜像数据包,排入到该输出端口的入镜像输出队列中。The data packet input from the mirroring source port is analyzed and processed by the mirroring, and the mirrored data packet will be copied as the mirroring data packet as it is, and put into the mirroring output queue of the output port.
经出镜像源端口的输出队列调度器调度输出后的数据包经过出镜像分析处理,被镜像数据包会被原样复制为出镜像数据包,排入到该输出端口的出镜像输出队列中,输入出镜像源端口的被镜像数据包不是在排入出镜像源端口的输出队列前被复制的,而是在从出镜像源端口的输出队列中输出后被复制的。从而严格保证了出镜像目的端口输出的出镜像数据包与出镜像源端口输出的被镜像数据包的顺序完全一致。The data packets scheduled and output by the output queue scheduler of the mirroring source port are analyzed and processed by mirroring, and the mirrored data packets will be copied as mirroring data packets as they are, and placed in the mirroring output queue of the output port. The mirrored data packet out of the mirroring source port is not copied before entering the output queue of the mirroring source port, but after being output from the output queue of the mirroring source port. Therefore, it is strictly guaranteed that the order of the mirrored data packets output by the mirrored destination port is exactly the same as that of the mirrored data packets output by the mirrored source port.
该输出端口还可以设置一个镜像输出队列调度器,该镜像输出队列调度器独立于该输出端口原有的输出队列调度器,即在该输出端口增加一级数据包输出的调度管理。The output port can also be provided with a mirrored output queue scheduler, which is independent of the original output queue scheduler of the output port, that is, a level of scheduling management for data packet output is added to the output port.
该输出端口中原有的输出队列调度器调度输出的数据包和入镜像输出队列中存储的入镜像数据包、出镜像输出队列中存储的出镜像数据包需要经过镜像输出队列调度器的调度后再从该输出端口中输出,从而能够方便的从同一输出端口获得入镜像数据包和出镜像数据包。The output data packets scheduled by the original output queue scheduler in the output port, the mirrored data packets stored in the mirrored output queue, and the mirrored data packets stored in the mirrored output queue need to be scheduled by the mirrored output queue scheduler. It is output from the output port, so that the incoming mirror data packet and the outgoing mirror data packet can be conveniently obtained from the same output port.
该输出端口的镜像输出队列调度器根据预定的调度算法能够有效控制出镜像数据包、入镜像数据包和正常数据包的输出优先级、输出占用带宽等,从而避免了正常数据包的传输性能受入镜像数据包、出镜像数据包影响的问题。The mirrored output queue scheduler of the output port can effectively control the output priority and output bandwidth of outgoing mirrored data packets, incoming mirrored data packets and normal data packets according to a predetermined scheduling algorithm, thus avoiding the transmission performance of normal data packets being affected The problem of mirroring data packets and exporting mirrored data packets.
虽然通过实施例描绘了本发明,本领域普通技术人员知道,本发明有许多变形和变化而不脱离本发明的精神,本发明的申请文件的权利要求包括这些变形和变化。Although the present invention has been described by way of example, those of ordinary skill in the art know that there are many variations and changes in the present invention without departing from the spirit of the invention, and the claims of the application document of the present invention include these variations and changes.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005100710995A CN100411388C (en) | 2005-05-24 | 2005-05-24 | A Method for Realizing Mirror Image in Switching System |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2005100710995A CN100411388C (en) | 2005-05-24 | 2005-05-24 | A Method for Realizing Mirror Image in Switching System |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1870566A CN1870566A (en) | 2006-11-29 |
CN100411388C true CN100411388C (en) | 2008-08-13 |
Family
ID=37444118
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2005100710995A Expired - Lifetime CN100411388C (en) | 2005-05-24 | 2005-05-24 | A Method for Realizing Mirror Image in Switching System |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100411388C (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102360481A (en) * | 2011-09-26 | 2012-02-22 | 北京金马甲产权网络交易有限公司 | Mirror image simulation method and system for network bidding |
CN103716255B (en) * | 2012-09-29 | 2016-12-28 | 华为技术有限公司 | The method and apparatus of Message processing |
CN107395588A (en) * | 2017-07-18 | 2017-11-24 | 浙江远望通信技术有限公司 | Video monitoring accesses safe blocking-up method and system |
CN114095513B (en) * | 2021-11-26 | 2024-03-29 | 苏州盛科科技有限公司 | Method for forwarding traffic and mirror image traffic scheduling under limited bandwidth scene and application |
CN118200265A (en) * | 2022-12-14 | 2024-06-14 | 北京航天自动控制研究所 | Switch cache management method for distinguishing monitoring and exchanging data |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5610905A (en) * | 1993-07-19 | 1997-03-11 | Alantec Corporation | Communication apparatus and methods |
US6041042A (en) * | 1997-05-27 | 2000-03-21 | Cabletron Systems, Inc. | Remote port mirroring system and method thereof |
US20010055274A1 (en) * | 2000-02-22 | 2001-12-27 | Doug Hegge | System and method for flow mirroring in a network switch |
CN1581811A (en) * | 2003-07-31 | 2005-02-16 | 深圳市中兴通讯股份有限公司 | Flow mirror image method |
-
2005
- 2005-05-24 CN CNB2005100710995A patent/CN100411388C/en not_active Expired - Lifetime
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5610905A (en) * | 1993-07-19 | 1997-03-11 | Alantec Corporation | Communication apparatus and methods |
US6041042A (en) * | 1997-05-27 | 2000-03-21 | Cabletron Systems, Inc. | Remote port mirroring system and method thereof |
US20010055274A1 (en) * | 2000-02-22 | 2001-12-27 | Doug Hegge | System and method for flow mirroring in a network switch |
CN1581811A (en) * | 2003-07-31 | 2005-02-16 | 深圳市中兴通讯股份有限公司 | Flow mirror image method |
Also Published As
Publication number | Publication date |
---|---|
CN1870566A (en) | 2006-11-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2898651B1 (en) | Scalable low latency multi-protocol networking device | |
US10250530B2 (en) | Flexible buffer allocation in a network switch | |
US8971345B1 (en) | Method and apparatus for scheduling a heterogeneous communication flow | |
CA2430964C (en) | Modular and scalable switch and method for the distribution of fast ethernet data frames | |
KR102082020B1 (en) | Method and apparatus for using multiple linked memory lists | |
US20050198410A1 (en) | Method, system and protocol that enable unrestricted user-level access to a network interface adapter | |
US20110149991A1 (en) | Buffer processing method, a store and forward method and apparatus of hybrid service traffic | |
US10015112B2 (en) | Memory-efficient handling of multicast traffic | |
CN113535433A (en) | Control forwarding separation method, device, equipment and storage medium based on Linux system | |
CN106886498B (en) | Data processing devices and terminals | |
Hua et al. | Scheduling heterogeneous flows with delay-aware deduplication for avionics applications | |
US20140281417A1 (en) | Systems, methods, and computer program products providing a data unit sequencing queue | |
US7418001B2 (en) | Router for scheduling packet and method therefor | |
US6765867B2 (en) | Method and apparatus for avoiding head of line blocking in an ATM (asynchronous transfer mode) device | |
US8792511B2 (en) | System and method for split ring first in first out buffer memory with priority | |
CN100411388C (en) | A Method for Realizing Mirror Image in Switching System | |
CN100571195C (en) | Multi-port Ethernet switching device and data transmission method | |
CN109617833B (en) | NAT data auditing method and system of multi-thread user mode network protocol stack system | |
JP4316349B2 (en) | Packet transfer path control device and control program | |
US20100205612A1 (en) | Method and apparatus for processing protocol messages for multiple protocol instances | |
US10581759B1 (en) | Sharing packet processing resources | |
Iyer | Load balancing and parallelism for the internet | |
JP2009199433A (en) | Network processing apparatus and program | |
US8149856B2 (en) | Packet relay device and queue scheduling method | |
CN115643205B (en) | Communication control unit for data production and consumption subjects, and related apparatus and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CX01 | Expiry of patent term |
Granted publication date: 20080813 |
|
CX01 | Expiry of patent term |