Patent ID: 8565246
Filing Date: 2013-10-22
Classification: H04L

Abstract:
1. A packet relay apparatus comprising: a packet transfer processing unit that manages packet transfer processing; an outgoing queue list for each interface, the list having a plurality of queues, selecting a queue from the plurality of queues, and outputting a packet from the queue to an interface; an outgoing queue management unit that controls the outgoing queue list; a route table that stores an outgoing interface and an outgoing queue corresponding to a destination; and a mirroring management table that stores a mirroring destination interface and a mirroring flag corresponding to the outgoing interface and outgoing queue; the packet transfer processing unit comparing the destination of a received packet with a destination in the route table and obtaining the outgoing interface and outgoing queue of an entry where the destinations match as the outgoing interface and the outgoing queue of the packet; the packet transfer processing unit comparing the obtained outgoing interface and outgoing queue, in the mirroring management table; if the mirroring flag of an entry where the outgoing interface and outgoing queue match is valid, the packet transfer processing unit instructing the outgoing queue management unit to copy the packet to the destination interface in the entry, and the outgoing queue management unit outputting the packet to the queue in the outgoing queue list, corresponding to the outgoing interface, and outputting a copied packet to the queue in the outgoing queue list, corresponding to the mirroring destination interface; if the mirroring flag of the corresponding entry is invalid, the packet transfer processing unit instructing the outgoing queue management unit to output the packet, and the outgoing queue management unit outputting the packet to the queue in the outgoing queue list, corresponding to the outgoing interface; the outgoing queue management unit obtaining the length of the queue from which the packet is output, if the queue length is greater than a predetermined mirroring starting threshold, changing the mirroring flag in the corresponding entry of the mirroring management table to valid, or, if the queue length is smaller than a predetermined mirroring stopping threshold, changing the flag to invalid; and the outgoing queue list selecting the queue from the plurality of queues and outputting the packet to the corresponding interface; wherein: the mirroring management table further includes information of an interval and a skipped packet for each entry; the packet transfer unit increments the value of the skipped packet in the corresponding entry of the mirroring management table, before performing mirroring where the mirroring flag is valid, performs mirroring if the value of the skipped packet becomes greater than or equal to the value of the interval, and does not perform mirroring if the value of the skipped packet is smaller than the value of the interval; and when the mirroring management table is updated, the outgoing queue management unit updates the mirroring flag and the interval if the length of the corresponding queue is not smaller than the stopping threshold.