JP2010011382A - Communication device and communication method - Google Patents

Communication device and communication method Download PDF

Info

Publication number
JP2010011382A
JP2010011382A JP2008171348A JP2008171348A JP2010011382A JP 2010011382 A JP2010011382 A JP 2010011382A JP 2008171348 A JP2008171348 A JP 2008171348A JP 2008171348 A JP2008171348 A JP 2008171348A JP 2010011382 A JP2010011382 A JP 2010011382A
Authority
JP
Japan
Prior art keywords
packet
mirror
input
output
header
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.)
Granted
Application number
JP2008171348A
Other languages
Japanese (ja)
Other versions
JP5256886B2 (en
Inventor
Masanobu Araya
正総 新家
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2008171348A priority Critical patent/JP5256886B2/en
Publication of JP2010011382A publication Critical patent/JP2010011382A/en
Application granted granted Critical
Publication of JP5256886B2 publication Critical patent/JP5256886B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To suppress the load on a device to be monitored and to monitor traffic while gathering all packets to be monitored. <P>SOLUTION: An input control means 1a controls input of packets received by a communication device 1. A temporary storage means 1b temporarily stores the received packets. An output control means 1c controls output of the received packets. A mirror output control means 1d controls output of mirror packets based upon the received packets. The input control means 1a performs control to write the received packets to the temporary storage means 1b. The mirror output control means 1d performs control to extract only some of the packets written to the temporary storage means 1b and to output mirror packets having some of the extracted packets. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、通信装置および通信方法に関し、特に、ネットワークのトラフィックを監視する通信装置および通信方法に関する。   The present invention relates to a communication device and a communication method, and more particularly to a communication device and a communication method for monitoring network traffic.

従来、ネットワークスイッチやルータ(router)などの通信装置によってネットワークのトラフィックを監視する技術として、sFlow、ポートミラーリングを始めとする、ネットワーク内を流れるパケット(packet)を収集する方法が知られている。このような監視方法は、監視対象のポートからパケットをサンプリングし、そのサンプルのうちの指定した領域の情報や、そのポートに関する統計情報などをパケットにして、トラフィックを監視する装置に転送するものである。
特開2004−304752号公報 特開2005−286684号公報
2. Description of the Related Art Conventionally, as a technique for monitoring network traffic by a communication device such as a network switch or a router, a method for collecting packets flowing in the network such as sFlow and port mirroring is known. Such a monitoring method samples a packet from a port to be monitored, converts the specified area information of the sample, statistical information about the port, etc. into a packet, and transfers the packet to a device that monitors traffic. is there.
JP 2004-304752 A JP 2005-286684 A

しかし、sFlowでは、サンプリングを行うことでトラフィックを監視する装置の負荷を抑えつつ、抜き打ち的なトラフィック収集機能でネットワークの監視を行うことができる。一方で、詳細なネットワークの監視を行うためにすべてのパケットの情報を得たい場合もあるが、このような場合について、sFlowでは想定されていないため、ネットワークのトラフィックの詳細について監視する場合には適さない。   However, in sFlow, it is possible to monitor the network with a drastic traffic collection function while suppressing the load on the device that monitors traffic by sampling. On the other hand, there is a case where it is desired to obtain information of all packets in order to perform detailed network monitoring. In such a case, since it is not assumed in sFlow, when monitoring the details of network traffic, Not suitable.

したがって、詳細なネットワーク監視を行いたい場合には、一般的にポートミラーリングが行われる。ポートミラーリングでは、パケットのサンプリングは行わず、監視ポートのすべてのパケットがトラフィックを監視する装置のポートに転送される。   Therefore, when detailed network monitoring is desired, port mirroring is generally performed. In port mirroring, packets are not sampled, and all packets on the monitoring port are transferred to the port of the device that monitors the traffic.

しかし、ポートミラーリングでは、すべてのトラフィックを監視することによってプライバシーが侵害される可能性があるという問題点がある。
また、ポートミラーリングでは、トラフィックを監視する装置として全トラフィックを受信できるだけの能力をもった装置を用意しなければならないという問題点がある。
However, port mirroring has the problem that privacy can be compromised by monitoring all traffic.
In addition, port mirroring has a problem in that a device capable of receiving all traffic must be prepared as a device for monitoring traffic.

本件はこのような点に鑑みてなされたものであり、監視対象であるすべてのパケットを収集しつつ、装置への負荷を抑えたトラフィックの監視が可能な通信装置および通信方法を提供することを目的とする。   The present case has been made in view of the above points, and provides a communication device and a communication method capable of monitoring traffic with a reduced load on the device while collecting all packets to be monitored. Objective.

開示のネットワークのトラフィックを監視する通信装置は、前記通信装置によって受信されたパケットの入力を制御する入力制御手段と、受信された前記パケットを一時的に記憶する一時記憶手段と、受信された前記パケットの出力を制御する出力制御手段と、受信された前記パケットに基づくミラーパケットの出力を制御するミラー出力制御手段と、を有し、前記入力制御手段は、受信された前記パケットを前記一時記憶手段に書き込む制御を行い、前記ミラー出力制御手段は、前記一時記憶手段に書き込まれた前記パケットの一部のみを抽出し、抽出した前記パケットの前記一部を有する前記ミラーパケットを出力する制御を行う。   A communication device that monitors the traffic of the disclosed network includes an input control unit that controls input of a packet received by the communication device, a temporary storage unit that temporarily stores the received packet, and the received Output control means for controlling the output of the packet, and mirror output control means for controlling the output of the mirror packet based on the received packet, the input control means storing the received packet in the temporary storage The mirror output control means extracts only part of the packet written in the temporary storage means and outputs the mirror packet having the part of the extracted packet. Do.

開示の通信装置によれば、入力制御手段により、受信されたパケットの入力が制御され、一時記憶手段により、受信されたパケットが一時的に記憶され、出力制御手段により、受信されたパケットの出力が制御され、ミラー出力制御手段により、ミラーパケットの出力が制御される。ここで、入力制御手段により、受信されたパケットが一時記憶手段に書き込まれる制御が行われ、ミラー出力制御手段により、一時記憶手段に書き込まれたパケットの一部のみが抽出され、抽出されたパケットの一部を有するミラーパケットが出力される制御が行われる。   According to the disclosed communication apparatus, input of the received packet is controlled by the input control unit, the received packet is temporarily stored by the temporary storage unit, and the output of the received packet is output by the output control unit. The mirror packet output is controlled by the mirror output control means. Here, the input control unit performs control to write the received packet to the temporary storage unit, and the mirror output control unit extracts only a part of the packet written to the temporary storage unit and extracts the extracted packet. Control is performed to output a mirror packet having a part of

開示の通信装置および通信方法によれば、パケット収集時における装置の負荷を減らすことができる。   According to the disclosed communication apparatus and communication method, it is possible to reduce the load on the apparatus when collecting packets.

以下、実施の形態について、図面を参照して説明する。
図1は、本実施の形態の概要を示す図である。図1に示す通信装置1は、ネットワークのトラフィックを監視する通信装置である。
Hereinafter, embodiments will be described with reference to the drawings.
FIG. 1 is a diagram showing an outline of the present embodiment. A communication device 1 shown in FIG. 1 is a communication device that monitors network traffic.

通信装置1は、ネットワークのトラフィックを監視するために、入力制御手段1a、一時記憶手段1b、出力制御手段1cおよびミラー出力制御手段1dを有する。
入力制御手段1aは、通信装置1によって受信された入力パケット2の入力を制御する。このとき、入力制御手段1aは、受信された入力パケット2を一時記憶手段1bに書き込む制御を行う。これにより、通信装置1に入力された入力パケット2は、入力制御手段1aによって一時記憶手段1bに書き込まれる。ここで、入力パケット2は、例えば、宛て先などを示すヘッダ部2aと、ユーザデータなどの転送されるデータを示すペイロード部2bとを有する。
The communication device 1 includes an input control unit 1a, a temporary storage unit 1b, an output control unit 1c, and a mirror output control unit 1d in order to monitor network traffic.
The input control unit 1 a controls input of the input packet 2 received by the communication device 1. At this time, the input control means 1a performs control to write the received input packet 2 in the temporary storage means 1b. As a result, the input packet 2 input to the communication device 1 is written to the temporary storage unit 1b by the input control unit 1a. Here, the input packet 2 includes, for example, a header portion 2a indicating a destination and a payload portion 2b indicating data to be transferred such as user data.

一時記憶手段1bは、受信された入力パケット2を一時的に記憶する。これにより、一時記憶手段1bに書き込まれたパケットが出力制御手段1cの制御により読み出されるとともに、ミラー出力制御手段1dの制御により読み出される。   The temporary storage unit 1b temporarily stores the received input packet 2. As a result, the packet written in the temporary storage means 1b is read out under the control of the output control means 1c and is read out under the control of the mirror output control means 1d.

出力制御手段1cは、受信された入力パケット2の出力を制御する。この出力制御手段1cの制御により、通信装置1から入力パケット2が出力パケット3として出力される。これにより、一時記憶手段1bに書き込まれた入力パケット2は、出力制御手段1cから読み出され、適切な宛て先のポートなどの図示しない出力手段から通信装置1の外部に出力される。ここで、出力パケット3は、例えば、入力パケット2と同様、ヘッダ部3aと、ペイロード部3bとを有する。   The output control means 1c controls the output of the received input packet 2. The input packet 2 is output as the output packet 3 from the communication device 1 under the control of the output control means 1c. As a result, the input packet 2 written in the temporary storage unit 1b is read from the output control unit 1c, and is output to the outside of the communication apparatus 1 from an output unit (not shown) such as an appropriate destination port. Here, the output packet 3 includes, for example, a header portion 3a and a payload portion 3b as in the case of the input packet 2.

ミラー出力制御手段1dは、受信された入力パケット2に基づくミラーパケット4の出力を制御する。このとき、ミラー出力制御手段1dは、一時記憶手段1bに書き込まれた入力パケット2の一部であるヘッダ部2aのみを抽出する。次に、ミラー出力制御手段1dは、抽出した入力パケット2の一部であるヘッダ部2aをコピーしてヘッダ部4aとし、このヘッダ部4aを有するミラーパケット4を出力する制御を行う。   The mirror output control means 1d controls the output of the mirror packet 4 based on the received input packet 2. At this time, the mirror output control means 1d extracts only the header part 2a which is a part of the input packet 2 written in the temporary storage means 1b. Next, the mirror output control unit 1d performs control to copy the header part 2a, which is a part of the extracted input packet 2, into the header part 4a and output the mirror packet 4 having the header part 4a.

このような通信装置1によれば、入力制御手段1aにより、受信された入力パケット2の入力が制御され、一時記憶手段1bにより、受信された入力パケット2が一時的に記憶され、出力制御手段1cにより、受信された入力パケット2のコピーである出力パケット3の出力が制御され、ミラー出力制御手段1dにより、ミラーパケット4の出力が制御される。ここで、入力制御手段1aにより、受信された入力パケット2が一時記憶手段1bに書き込まれる制御が行われ、ミラー出力制御手段1dにより、一時記憶手段1bに書き込まれた入力パケット2の一部であるヘッダ部2aのみが抽出され、抽出されたパケットの一部であるヘッダ部2aを有するミラーパケット4が出力される制御が行われる。   According to such a communication apparatus 1, the input control unit 1a controls the input of the received input packet 2, the temporary storage unit 1b temporarily stores the received input packet 2, and the output control unit The output of the output packet 3 which is a copy of the received input packet 2 is controlled by 1c, and the output of the mirror packet 4 is controlled by the mirror output control means 1d. Here, the input control means 1a controls the received input packet 2 to be written in the temporary storage means 1b, and the mirror output control means 1d uses a part of the input packet 2 written in the temporary storage means 1b. Only a certain header part 2a is extracted, and control is performed so that the mirror packet 4 having the header part 2a which is a part of the extracted packet is output.

これにより、ミラーリングを行う場合には、ミラーパケット4を収集してトラフィックを監視する図示しない観測装置が接続されたミラー出力制御手段1dが、一時記憶手段1bより、出力制御手段1cから出力される出力パケット3と同じパケットデータを読み出し、出力する。   Thereby, when performing mirroring, the mirror output control means 1d connected to the observation device (not shown) that collects the mirror packet 4 and monitors the traffic is output from the output control means 1c from the temporary storage means 1b. The same packet data as the output packet 3 is read and output.

すなわち、ミラー出力制御手段1dによって一時記憶手段1bから読み出される入力パケット2のデータは、パケット全部のデータではなく、パケットの一部のデータ(例えば、ヘッダ部2a)とする。また、このパケットの一部のデータは、ユーザが指定した、または予め決められた特定のサイズを上限として読み出される。   That is, the data of the input packet 2 read from the temporary storage unit 1b by the mirror output control unit 1d is not the data of the entire packet but the data of a part of the packet (for example, the header part 2a). Further, a part of the data of the packet is read with a specific size designated by the user or determined in advance as an upper limit.

これによって、ミラー出力制御手段1dが、一時記憶手段1bに書き込まれた入力パケット2の一部であるヘッダ部2aのみを抽出して、抽出したヘッダ部を有するミラーパケット4を出力する制御を行うことにより、パケット収集時における装置の負荷を減らすことが可能になる。   Thereby, the mirror output control means 1d performs control to extract only the header part 2a which is a part of the input packet 2 written in the temporary storage means 1b and output the mirror packet 4 having the extracted header part. As a result, it is possible to reduce the load on the apparatus during packet collection.

次に、上記の通信装置のさらに具体的な実施の態様について説明する。なお、以下の実施の形態では通信装置をスイッチとして、特にレイヤ2スイッチを念頭に置いて説明するが、これに制限されない。また、OSI(Open Systems Interconnection)参照モデルにおけるレイヤ2のデータの単位を、フレーム(frame)と呼ぶこともあるが、以下の実施の形態では、説明の便宜上、すべてパケットに統一して表現する。   Next, a more specific embodiment of the above communication device will be described. In the following embodiments, description will be made with the communication device as a switch, particularly a layer 2 switch in mind, but the present invention is not limited to this. In addition, the unit of layer 2 data in the OSI (Open Systems Interconnection) reference model is sometimes referred to as a frame. However, in the following embodiments, all are unified and expressed as a packet for convenience of explanation.

[第1の実施の形態]
図2は、通信システムの全体構成を示す図である。本実施の形態の通信システムは、端末装置間でデータの送受信を行えるように、複数のレイヤ2スイッチがデータリンク層のパケットを中継するものである。
[First Embodiment]
FIG. 2 is a diagram illustrating the overall configuration of the communication system. In the communication system according to the present embodiment, a plurality of layer 2 switches relay data link layer packets so that data can be transmitted and received between terminal devices.

図2に示す通信システムは、スイッチ100,100a,100b,100c,100dと端末装置40,61,62,63,64,65,66とで構成される。スイッチ100,100a,100b,100c,100dは、レイヤ2スイッチである。端末装置61,62,63,64,65,66は、ユーザが使用する端末装置である。端末装置40は、スイッチ100の管理者が使用する端末装置である。スイッチ100a,100b,100c,100dは、スイッチ100と同様に構成されており、同等の機能を有する。   The communication system shown in FIG. 2 includes switches 100, 100a, 100b, 100c, 100d and terminal devices 40, 61, 62, 63, 64, 65, 66. The switches 100, 100a, 100b, 100c, and 100d are layer 2 switches. The terminal devices 61, 62, 63, 64, 65, 66 are terminal devices used by the user. The terminal device 40 is a terminal device used by an administrator of the switch 100. The switches 100a, 100b, 100c, and 100d are configured in the same manner as the switch 100, and have equivalent functions.

スイッチ100は、スイッチ100a,100bと接続されている。スイッチ100bは、スイッチ100c,100dと接続されている。端末装置61,62は、スイッチ100aと接続されている。端末装置63,64は、スイッチ100cと接続されている。端末装置65,66は、スイッチ100dと接続されている。端末装置40は、スイッチ100と接続されている。2つのスイッチ間またはスイッチと端末装置の間は、1つ以上の物理リンク(ネットワークケーブル)で接続されている。   The switch 100 is connected to the switches 100a and 100b. The switch 100b is connected to the switches 100c and 100d. The terminal devices 61 and 62 are connected to the switch 100a. The terminal devices 63 and 64 are connected to the switch 100c. The terminal devices 65 and 66 are connected to the switch 100d. The terminal device 40 is connected to the switch 100. The two switches or the switch and the terminal device are connected by one or more physical links (network cables).

スイッチ100,100a,100b,100c,100dは、パケットに含まれるアドレスに従って、送信元の端末装置から宛て先の端末装置まで、パケットを中継する。例えば、端末装置61が端末装置63へパケットを送信する場合、スイッチ100a、スイッチ100、スイッチ100b、スイッチ100cの順にパケットが中継される。   The switches 100, 100a, 100b, 100c, and 100d relay the packet from the source terminal device to the destination terminal device according to the address included in the packet. For example, when the terminal device 61 transmits a packet to the terminal device 63, the packet is relayed in the order of the switch 100a, the switch 100, the switch 100b, and the switch 100c.

図3は、スイッチのハードウェア構成を示す図である。図3は、スイッチ100の内部構成を示したものであるが、スイッチ100a,100b,100c,100dも同様の構成で実現できる。スイッチ100は、CPU(Central Processing Unit)101、インタフェースカード102a,102b,102c,102d、スイッチカード103、テーブル記憶メモリ104、ポート監視部105、バス106を有している。   FIG. 3 is a diagram illustrating a hardware configuration of the switch. FIG. 3 shows the internal configuration of the switch 100, but the switches 100a, 100b, 100c, and 100d can be realized with the same configuration. The switch 100 includes a CPU (Central Processing Unit) 101, interface cards 102a, 102b, 102c, and 102d, a switch card 103, a table storage memory 104, a port monitoring unit 105, and a bus 106.

CPU101は、スイッチ100全体を制御している。CPU101は、プログラムによる処理を実行する。CPU101は、図示しないメモリに保持されたデータを用いて、同じくメモリに保持されたプログラムを実行する。CPU101は、図示しない通信インタフェースを介して、管理者が使用する端末装置40から送信されるコマンドを受信するとともに、コマンドに対する実行結果を端末装置40に応答する。   The CPU 101 controls the entire switch 100. The CPU 101 executes processing by a program. The CPU 101 executes a program similarly held in the memory using data held in a memory (not shown). The CPU 101 receives a command transmitted from the terminal device 40 used by the administrator via a communication interface (not shown), and returns an execution result for the command to the terminal device 40.

テーブル記憶メモリ104は、複数のテーブルを記憶している。テーブル記憶メモリ104に記憶されるテーブルには、論理リンクの構成を管理するテーブル、論理リンク内でのパケットの転送先を決定するためのテーブル、パケットの転送先を示す情報を格納するテーブルが含まれる。   The table storage memory 104 stores a plurality of tables. The table stored in the table storage memory 104 includes a table for managing the configuration of the logical link, a table for determining a packet transfer destination within the logical link, and a table for storing information indicating the packet transfer destination. It is.

バス106には、CPU101、インタフェースカード102a,102b,102c,102d、スイッチカード103、テーブル記憶メモリ104、ポート監視部105が接続されている。   A CPU 101, interface cards 102a, 102b, 102c, and 102d, a switch card 103, a table storage memory 104, and a port monitoring unit 105 are connected to the bus 106.

インタフェースカード102a,102b,102c,102dは、それぞれ複数個(例えば、8個)の通信ポートを有している。それぞれの通信ポートには、1つの物理リンクを接続できる。インタフェースカード102a,102b,102c,102dは、それぞれの通信ポートを監視してパケットを取得する。なお、インタフェースカード102a,102b,102c,102dは、複数の通信ポートに同時にパケットが到来した場合に備えて、パケットを一時的に保持するバッファを内部に有している。そして、インタフェースカード102a,102b,102c,102dは、取得したパケットをスイッチカード103に送る。   Each of the interface cards 102a, 102b, 102c, and 102d has a plurality of (for example, eight) communication ports. One physical link can be connected to each communication port. The interface cards 102a, 102b, 102c, and 102d monitor the respective communication ports and acquire packets. The interface cards 102a, 102b, 102c, and 102d have a buffer that temporarily holds packets in preparation for a case where packets arrive at a plurality of communication ports at the same time. Then, the interface cards 102a, 102b, 102c, and 102d send the acquired packets to the switch card 103.

スイッチカード103は、図示しない学習テーブルを有している。スイッチカード103は、学習テーブルに、過去に受信したパケットの送信元アドレスと、そのパケットが到来した通信ポートまたは論理リンクの識別情報とを対応付けて記憶している。この学習テーブルは、スイッチカード103によって随時更新される。   The switch card 103 has a learning table (not shown). The switch card 103 stores the transmission source address of the packet received in the past and the identification information of the communication port or logical link from which the packet has arrived in association with each other in the learning table. This learning table is updated by the switch card 103 as needed.

そして、スイッチカード103は、インタフェースカード102a,102b,102c,102dのいずれかからパケットを受け取ると、学習テーブルを参照して、そのパケットの転送先を決定する。ここで、決定した転送先が論理リンクである場合、スイッチカード103は、テーブル記憶メモリ104に記憶されたテーブルを参照して、転送に使用する具体的なインタフェースカード102a,102b,102c,102dおよび通信ポートを決定する。その後、スイッチカード103は、パケットを、決定したインタフェースカード102a,102b,102c,102dに送る。   When the switch card 103 receives a packet from any one of the interface cards 102a, 102b, 102c, and 102d, the switch card 103 refers to the learning table and determines the transfer destination of the packet. Here, when the determined transfer destination is a logical link, the switch card 103 refers to the table stored in the table storage memory 104, and the specific interface cards 102a, 102b, 102c, 102d used for transfer and Determine the communication port. Thereafter, the switch card 103 sends the packet to the determined interface cards 102a, 102b, 102c, and 102d.

パケットを受け取ったインタフェースカード102a,102b,102c,102dは、受け取ったパケットを、決定された通信ポートから送信先に送出する。
ポート監視部105は、インタフェースカード102a,102b,102c,102dの通信ポートを監視する。そして、ポート監視部105は、インタフェースカード102a,102b,102c,102dの通信ポートに接続された物理リンクの故障や復旧を検出すると、CPU101にその旨を通知する。
The interface cards 102a, 102b, 102c, and 102d that have received the packet send the received packet to the transmission destination from the determined communication port.
The port monitoring unit 105 monitors the communication ports of the interface cards 102a, 102b, 102c, and 102d. When the port monitoring unit 105 detects a failure or recovery of the physical link connected to the communication ports of the interface cards 102a, 102b, 102c, and 102d, the port monitoring unit 105 notifies the CPU 101 accordingly.

図4は、パケットのデータ構造例を示す図である。図4に示すパケット30が、インタフェースカード102a,102b,102c,102dの通信ポートを介して、スイッチ100a,100b等との間で送受信される。   FIG. 4 is a diagram illustrating an example of a data structure of a packet. The packet 30 shown in FIG. 4 is transmitted / received to / from the switches 100a, 100b, etc. via the communication ports of the interface cards 102a, 102b, 102c, 102d.

パケット30は、プリアンブル(preamble)、宛て先MACアドレス(MAC DA:Media Access Control address Destination Address)、送信元MACアドレス、TPID(Tag Protocol Identifier:タグ・プロトコル識別子)、VLAN(Virtual Local Area Network)タグ、タイプ、ペイロードおよびFCS(Frame Check Sequence)で構成される。また、パケット30は、プリアンブルを有するプリアンブル部、宛て先MACアドレス、送信元MACアドレス、TPID、VLANタグ、タイプを有するヘッダ部、ペイロードを有するペイロード部およびFCSを有するFCS部に分けることもできる。   The packet 30 includes a preamble, a destination MAC address (MAC DA: Media Access Control address Destination Address), a source MAC address, a TPID (Tag Protocol Identifier), and a VLAN (Virtual Local Area Network) tag. , Type, payload and FCS (Frame Check Sequence). The packet 30 can also be divided into a preamble part having a preamble, a destination MAC address, a source MAC address, a TPID, a VLAN tag, a header part having a type, a payload part having a payload, and an FCS part having an FCS.

プリアンブルは、パケットの送信の開始を知らせるとともに、同期をとるタイミングを与えるためのビット列である。宛て先MACアドレスは、送信先の端末装置が有する通信インタフェースを一意に識別するアドレスである。送信元MACアドレスは、送信元の端末装置が有する通信インタフェースを一意に識別するアドレスである。TPIDは、当該パケットの種類(例えば、VLANのパケットであるか通常のパケットであるか)を示す値である。VLANタグは、1つのネットワークを複数の論理的なネットワークに分割して運用する場合に、個々の論理的なネットワークに割り当てられる一意に定められた値である。タイプは、使用するプロトコルを指定するフィールドである。ペイロードは、送受信するデータ本体であり、例えば、IPパケットを所定のデータ長に分割したものである。FCSは、受信したパケットの誤りを検出するために用いられる値である。   The preamble is a bit string for notifying the start of packet transmission and giving timing for synchronization. The destination MAC address is an address that uniquely identifies the communication interface of the destination terminal device. The transmission source MAC address is an address that uniquely identifies a communication interface of the transmission source terminal device. The TPID is a value indicating the type of the packet (for example, whether it is a VLAN packet or a normal packet). The VLAN tag is a uniquely determined value assigned to each logical network when one network is divided into a plurality of logical networks for operation. The type is a field that specifies a protocol to be used. The payload is a data body to be transmitted / received. For example, the payload is obtained by dividing an IP packet into a predetermined data length. FCS is a value used to detect an error in a received packet.

なお、パケットのデータ構造は、ネットワークの運用形態等に応じて、種々の変形例が考えられる。例えば、VLANタグが省略される場合がある。また、図4に示したもの以外の情報が付加される場合もある。   It should be noted that various modifications of the data structure of the packet are conceivable depending on the network operation mode and the like. For example, the VLAN tag may be omitted. In addition, information other than that shown in FIG. 4 may be added.

図5は、第1の実施の形態におけるスイッチの構成を示すブロック図である。図5に示すスイッチ100は、ネットワークのトラフィックを監視するために、入力されたパケットのヘッダ部を有するミラーパケットを出力する機能を有するレイヤ2スイッチである。   FIG. 5 is a block diagram illustrating a configuration of the switch according to the first embodiment. The switch 100 shown in FIG. 5 is a layer 2 switch having a function of outputting a mirror packet having a header portion of an input packet in order to monitor network traffic.

スイッチ100は、ネットワークのトラフィックを監視するために、入力制御部110、共有メモリ120、出力制御部130およびミラー出力制御部140を有する。
入力制御部110は、スイッチ100によって受信された入力パケットの入力を制御する。このとき、入力制御部110は、受信された入力パケットを共有メモリ120に書き込む制御を行う。これにより、スイッチ100に入力された入力パケットは、入力制御部110によって共有メモリ120に書き込まれる。ここで、入力パケットは、例えば、宛て先などを示すヘッダ部およびユーザデータなどの、転送されるデータを示すペイロード部を有する。
The switch 100 includes an input control unit 110, a shared memory 120, an output control unit 130, and a mirror output control unit 140 in order to monitor network traffic.
The input control unit 110 controls input of input packets received by the switch 100. At this time, the input control unit 110 performs control to write the received input packet into the shared memory 120. As a result, the input packet input to the switch 100 is written into the shared memory 120 by the input control unit 110. Here, the input packet has, for example, a header portion indicating a destination and a payload portion indicating data to be transferred such as user data.

共有メモリ120は、受信された入力パケットを一時的に記憶する。これにより、共有メモリ120に書き込まれたパケットが出力制御部130の制御により読み出されるとともに、ミラー出力制御部140の制御により読み出される。   The shared memory 120 temporarily stores the received input packet. Thereby, the packet written in the shared memory 120 is read out under the control of the output control unit 130 and is read out under the control of the mirror output control unit 140.

出力制御部130は、受信された入力パケットの出力を制御する。この出力制御部130の制御により、スイッチ100から入力パケットが出力パケットとして出力される。これにより、共有メモリ120に書き込まれた入力パケットは、出力制御部130から読み出され、適切な宛て先の出力ポートなどの図示しない出力部からスイッチ100の外部に出力される。ここで、出力パケットは、例えば、入力パケットと同様、ヘッダ部およびペイロード部を有する。   The output control unit 130 controls the output of the received input packet. Under the control of the output control unit 130, an input packet is output from the switch 100 as an output packet. As a result, the input packet written in the shared memory 120 is read from the output control unit 130 and output to the outside of the switch 100 from an output unit (not shown) such as an output port of an appropriate destination. Here, the output packet has a header part and a payload part, for example, like the input packet.

ミラー出力制御部140は、受信された入力パケットに基づくミラーパケットの出力を制御する。このとき、ミラー出力制御部140は、共有メモリ120に書き込まれた入力パケットから、入力パケットの一部であるヘッダ部のみを抽出する。次に、ミラー出力制御部140は、抽出した入力パケットの一部であるヘッダ部をコピーして、このヘッダ部を有するミラーパケットを出力する制御を行う。   The mirror output control unit 140 controls the output of the mirror packet based on the received input packet. At this time, the mirror output control unit 140 extracts only the header part that is a part of the input packet from the input packet written in the shared memory 120. Next, the mirror output control unit 140 performs control to copy a header part that is a part of the extracted input packet and output a mirror packet having this header part.

このようなスイッチ100によれば、入力制御部110により、受信されたパケットの入力が制御され、共有メモリ120により、受信されたパケットが一時的に記憶され、出力制御部130により、受信されたパケットの出力が制御され、ミラー出力制御部140により、ミラーパケットの出力が制御される。ここで、入力制御部110により、受信されたパケットが共有メモリ120に書き込まれる制御が行われ、ミラー出力制御部140により、共有メモリ120に書き込まれたパケットの一部のみが抽出され、抽出されたパケットの一部を有するミラーパケットが出力される制御が行われる。   According to such a switch 100, input of the received packet is controlled by the input control unit 110, and the received packet is temporarily stored by the shared memory 120 and received by the output control unit 130. The output of the packet is controlled, and the output of the mirror packet is controlled by the mirror output control unit 140. Here, the input control unit 110 performs control to write the received packet to the shared memory 120, and the mirror output control unit 140 extracts and extracts only a part of the packet written to the shared memory 120. Control is performed so that a mirror packet having a part of the packet is output.

これにより、ミラーリングを行う場合には、ミラーパケットを収集してトラフィックを監視する図示しない観測装置が接続されたミラー出力制御部140が、共有メモリ120より、出力制御部130から出力される出力パケットと同じパケットデータを読み出し、出力する。   As a result, when mirroring is performed, the mirror output control unit 140 connected to an observation device (not shown) that collects mirror packets and monitors traffic is output from the shared memory 120 to the output control unit 130. Read and output the same packet data.

すなわち、ミラー出力制御部140によって共有メモリ120から読み出されるパケットのデータは、パケット全部のデータではなく、パケットの一部のデータとする。また、ユーザが指定した、または予め決められた特定のサイズを上限として読み出される。   That is, the data of the packet read from the shared memory 120 by the mirror output control unit 140 is not the data of the whole packet but the data of a part of the packet. Further, it is read out with an upper limit of a specific size designated by the user or predetermined.

なお、スイッチ100は、レイヤ2スイッチであるが、これに限らず、ルータなどのデータの中継機能を有する通信装置でもよい。
図6は、第1の実施の形態における入力制御部の構成を示すブロック図である。
The switch 100 is a layer 2 switch, but is not limited thereto, and may be a communication device having a data relay function such as a router.
FIG. 6 is a block diagram showing the configuration of the input control unit in the first embodiment.

入力制御部110は、スイッチ100によって受信された入力パケットの入力を制御するために、パケット書き込み部111および制御データ書き込み部112を有する。
パケット書き込み部111は、スイッチ100に入力された入力パケットにおけるヘッダ部およびペイロード部のデータなどのパケットデータを共有メモリ120に書き込む制御を行う。
The input control unit 110 includes a packet writing unit 111 and a control data writing unit 112 in order to control input of input packets received by the switch 100.
The packet writing unit 111 performs control to write packet data such as header and payload data in the input packet input to the switch 100 to the shared memory 120.

制御データ書き込み部112は、スイッチ100に入力された入力パケットが入力された入力ポートを示す入力ポート番号、入力パケットが共有メモリ120に書き込まれる際のデータサイズ、入力パケットから、例えばヘッダ部などのパケットの一部を切り出す切り出しを行う際のパケットの位置(例えば、先頭からのサイズなど)の情報など、入力パケットの転送およびミラーリングを制御するための制御データを共有メモリ120に書き込む制御を行う。   The control data writing unit 112 determines the input port number indicating the input port to which the input packet input to the switch 100 is input, the data size when the input packet is written to the shared memory 120, the input packet from the input packet, for example, Control is performed to write control data for controlling transfer and mirroring of the input packet, such as information on the position of the packet (for example, the size from the beginning) when performing cutout for cutting out a part of the packet, to the shared memory 120.

このようにして、スイッチ100に入力された入力パケットは、パケット書き込み部111によって共有メモリ120に書き込まれるとともに、書き込まれる際のデータサイズおよび入力ポート番号などの制御データも、制御データ書き込み部112によって共有メモリ120に書き込まれる。   In this way, the input packet input to the switch 100 is written to the shared memory 120 by the packet writing unit 111, and control data such as the data size and input port number at the time of writing is also controlled by the control data writing unit 112. It is written in the shared memory 120.

図7は、第1の実施の形態におけるミラー出力制御部の構成を示すブロック図である。
ミラー出力制御部140は、共有メモリ120からデータを読み出す共有メモリ読み出し制御部141を有する。この共有メモリ読み出し制御部141は、制御データ処理部141a、パケットデータ処理部141b、サイズカウンタ部141cおよびFCS計算部141dを有する。
FIG. 7 is a block diagram illustrating a configuration of the mirror output control unit according to the first embodiment.
The mirror output control unit 140 includes a shared memory read control unit 141 that reads data from the shared memory 120. The shared memory read control unit 141 includes a control data processing unit 141a, a packet data processing unit 141b, a size counter unit 141c, and an FCS calculation unit 141d.

制御データ処理部141aは、共有メモリ120から入力パケットの制御データを読み出し、これに基づいてミラーパケットの出力制御を行う。
パケットデータ処理部141bは、サイズカウンタ部141cによるサイズのカウント結果に基づいて、共有メモリ120からパケットのヘッダ部を読み出してミラーパケットとし、このミラーパケットにFCS計算部141dが計算したミラーパケットのFCSを付加する。次に、パケットデータ処理部141bは、FCSが付加されたミラーパケットを出力する。
The control data processing unit 141a reads the control data of the input packet from the shared memory 120, and performs output control of the mirror packet based on this.
The packet data processing unit 141b reads out the header part of the packet from the shared memory 120 based on the size count result by the size counter unit 141c and makes it a mirror packet. Is added. Next, the packet data processing unit 141b outputs the mirror packet to which the FCS is added.

サイズカウンタ部141cは、読み込んだデータのサイズをカウントし、先頭からのサイズを認識する。これにより、サイズカウンタ部141cは、パケットデータ処理部141bによる共有メモリ120より読み出されたパケットからのヘッダ部の切り出しを制御する。   The size counter unit 141c counts the size of the read data and recognizes the size from the top. Thereby, the size counter unit 141c controls the extraction of the header part from the packet read from the shared memory 120 by the packet data processing unit 141b.

FCS計算部141dは、ミラーパケットのエラーを検出するためのFCSを計算する。このFCS計算部141dによるFCSの計算では、パケットデータ処理部141bによって共有メモリ120から読み出されたパケットのヘッダ部のコピーがミラーパケットとされ、このミラーパケットのFCSがFCS計算部141dによって計算される。   The FCS calculator 141d calculates an FCS for detecting a mirror packet error. In the FCS calculation by the FCS calculation unit 141d, a copy of the header part of the packet read from the shared memory 120 by the packet data processing unit 141b is used as a mirror packet, and the FCS of the mirror packet is calculated by the FCS calculation unit 141d. The

図8は、第1の実施の形態におけるスイッチの動作を示す図である。図8では、スイッチ100にパケットが入力される場合のスイッチ100の動作について説明する。ここで、パケット31,32は、既にスイッチ100に入力された後に出力されたものとし、パケット33はこれから入力される。また、ミラーパケット51,52は、それぞれパケット31,32に基づいてミラーリングされたパケットである。   FIG. 8 is a diagram illustrating the operation of the switch according to the first embodiment. In FIG. 8, the operation of the switch 100 when a packet is input to the switch 100 will be described. Here, it is assumed that the packets 31 and 32 are already input after being input to the switch 100, and the packet 33 is input from now on. The mirror packets 51 and 52 are mirrored packets based on the packets 31 and 32, respectively.

また、パケット31,32,33は、それぞれプリアンブル部31a,32a,33a、ヘッダ部31b,32b,33b、ペイロード部31c,32c,33cおよび図示しないFCSを有する。   The packets 31, 32, and 33 have preamble portions 31a, 32a, and 33a, header portions 31b, 32b, and 33b, payload portions 31c, 32c, and 33c, and an FCS (not shown), respectively.

図8に示すように、スイッチ100にパケット31,32が順に入力されると、これに応じて対応するミラーパケット51,52がそれぞれ順に出力される。このとき、パケット31に対応するミラーパケット51のヘッダ部51bは、パケット31のヘッダ部31bがコピーされたものである。同様に、パケット32に対応するミラーパケット52のヘッダ部52bは、パケット32のヘッダ部32bがコピーされたものである。   As shown in FIG. 8, when the packets 31 and 32 are sequentially input to the switch 100, the corresponding mirror packets 51 and 52 are sequentially output accordingly. At this time, the header part 51b of the mirror packet 51 corresponding to the packet 31 is a copy of the header part 31b of the packet 31. Similarly, the header part 52b of the mirror packet 52 corresponding to the packet 32 is a copy of the header part 32b of the packet 32.

すなわち、ミラーパケット51は、スイッチ100により、パケット31のペイロード部31cおよびFCSが除去されたヘッダ部のコピーであるヘッダ部51bに、プリアンブル部51aおよびミラーパケット51のFCSが付加されて出力される。同様に、ミラーパケット52は、パケット32のペイロード部32cおよびFCSが除去されたヘッダ部のコピーであるヘッダ部52bに、プリアンブル部52aおよびミラーパケット52のFCSが付加されて出力される。   That is, the mirror packet 51 is output by adding the preamble part 51a and the FCS of the mirror packet 51 to the header part 51b which is a copy of the header part from which the payload part 31c and FCS of the packet 31 are removed by the switch 100. . Similarly, the mirror packet 52 is output with the preamble portion 52a and the FCS of the mirror packet 52 added to the header portion 52b which is a copy of the header portion from which the payload portion 32c and FCS of the packet 32 are removed.

図9は、第1の実施の形態における入力制御処理の手順を示すフローチャートである。この入力制御処理は、スイッチ100がパケットの入力を受け付け、入力を受け付けたパケットを共有メモリ120(図5参照)に書き込む処理である。入力制御処理は、スイッチ100の起動時に、CPU101(図3参照)によって実行される。   FIG. 9 is a flowchart illustrating a procedure of input control processing according to the first embodiment. This input control process is a process in which the switch 100 receives an input of a packet and writes the received packet in the shared memory 120 (see FIG. 5). The input control process is executed by the CPU 101 (see FIG. 3) when the switch 100 is activated.

[ステップS111]CPU101は、スイッチ100にパケットが入力されたか否かを判定する。パケットが入力されていれば、CPU101は、ステップS112に処理を進める。一方、パケットが入力されていなければ、CPU101は、ステップS111に処理を進める。   [Step S <b> 111] The CPU 101 determines whether a packet is input to the switch 100. If a packet has been input, the CPU 101 advances the process to step S112. On the other hand, if no packet is input, the CPU 101 advances the process to step S111.

[ステップS112]CPU101は、共有メモリ120に空きがあるか否かを判定する。共有メモリ120に空きがあれば、CPU101は、ステップS113に処理を進める。一方、共有メモリ120に空きがなければ、CPU101は、ステップS114に処理を進める。   [Step S112] The CPU 101 determines whether or not the shared memory 120 has a free space. If there is free space in the shared memory 120, the CPU 101 advances the process to step S113. On the other hand, if there is no free space in the shared memory 120, the CPU 101 advances the process to step S114.

[ステップS113]CPU101は、共有メモリ120に、パケット、パケットの制御データを書き込む。その後、CPU101は、ステップS111に処理を進める。
[ステップS114]CPU101は、スイッチ100に入力されたパケットを共有メモリ120に書き込むことなく廃棄する。その後、CPU101は、ステップS111に処理を進める。
[Step S113] The CPU 101 writes the packet and packet control data in the shared memory 120. Thereafter, the CPU 101 advances the process to step S111.
[Step S114] The CPU 101 discards the packet input to the switch 100 without writing it to the shared memory 120. Thereafter, the CPU 101 advances the process to step S111.

図10は、第1の実施の形態におけるミラー出力制御処理の手順を示すフローチャートである。このミラー出力制御処理は、スイッチ100が入力を受け付けて共有メモリ120(図5参照)に書き込んだパケットのヘッダ部分を読み出し、読み出したヘッダ部分をミラーパケットとして出力する処理である。ミラー出力制御処理は、スイッチ100の起動時に、CPU101(図3参照)によって実行される。   FIG. 10 is a flowchart illustrating a procedure of mirror output control processing according to the first embodiment. This mirror output control process is a process in which the switch 100 receives an input, reads the header portion of the packet written in the shared memory 120 (see FIG. 5), and outputs the read header portion as a mirror packet. The mirror output control process is executed by the CPU 101 (see FIG. 3) when the switch 100 is activated.

[ステップS121]CPU101は、ミラーパケット出力をするか否かおよび切り出されるパケットのヘッダ部のサイズである切り出しサイズを設定する。第1の実施の形態では、スイッチ100により、この切り出しサイズに基づいてパケットのヘッダ部が抽出される。   [Step S121] The CPU 101 sets whether or not to output a mirror packet and a cutout size that is the size of the header portion of the cutout packet. In the first embodiment, the switch 100 extracts the header portion of the packet based on this cut-out size.

[ステップS122]CPU101は、共有メモリ120に書き込まれたパケットがあるか否かを判定する。パケットがあれば、CPU101は、ステップS123に処理を進める。一方、パケットがなければ、CPU101は、ステップS122に処理を進める。   [Step S122] The CPU 101 determines whether there is a packet written in the shared memory 120 or not. If there is a packet, the CPU 101 advances the process to step S123. On the other hand, if there is no packet, the CPU 101 advances the process to step S122.

[ステップS123]CPU101は、FCSを計算するFCS計算部141d(図7参照)が有するFCSレジスタ(図示省略)を初期化する。
[ステップS124]CPU101は、共有メモリ120に書き込まれているパケットのヘッダ部を切り出して出力するヘッダミラーリングを行うか否かを判定する。ヘッダミラーリングを行う場合には、CPU101は、ステップS125に処理を進める。一方、ヘッダミラーリングを行わない場合には、CPU101は、ステップS127に処理を進める。
[Step S123] The CPU 101 initializes an FCS register (not shown) included in the FCS calculation unit 141d (see FIG. 7) that calculates the FCS.
[Step S124] The CPU 101 determines whether or not to perform header mirroring that cuts out and outputs the header portion of the packet written in the shared memory 120. In the case of performing header mirroring, the CPU 101 advances the process to step S125. On the other hand, when header mirroring is not performed, the CPU 101 advances the process to step S127.

[ステップS125]CPU101は、共有メモリ120に書き込まれているパケットのヘッダ部を読み出し、読み出したパケットのヘッダ部のFCSを計算する。
[ステップS126]CPU101は、ステップS125で読み出したヘッダ部にステップS125で計算したFCSを付加し、パケットとして出力する。また、CPU101は、このとき読み出したパケットのヘッダ部以外の不要な部分を廃棄する。その後、CPU101は、ステップS122に処理を進める。
[Step S125] The CPU 101 reads the header part of the packet written in the shared memory 120, and calculates the FCS of the header part of the read packet.
[Step S126] The CPU 101 adds the FCS calculated in step S125 to the header read in step S125, and outputs the packet as a packet. Further, the CPU 101 discards unnecessary portions other than the header portion of the packet read at this time. Thereafter, the CPU 101 advances the process to step S122.

[ステップS127]CPU101は、共有メモリ120に書き込まれているパケット全体を読み出し、読み出したパケットの全体のFCSを計算する。
[ステップS128]CPU101は、ステップS127で読み出したパケット全体にステップS127で計算したFCSを付加し、ミラーパケットとして出力する。その後、CPU101は、ステップS122に処理を進める。
[Step S127] The CPU 101 reads the entire packet written in the shared memory 120, and calculates the FCS of the entire read packet.
[Step S128] The CPU 101 adds the FCS calculated in step S127 to the entire packet read in step S127, and outputs it as a mirror packet. Thereafter, the CPU 101 advances the process to step S122.

以上のようにして、第1の実施の形態では、ミラー出力制御部140が、共有メモリ120に書き込まれた入力パケットの一部であるヘッダ部のみを抽出して、抽出したヘッダ部を有するミラーパケットを出力する制御を行うことにより、パケット収集時における装置の負荷を減らすことが可能になる。   As described above, in the first embodiment, the mirror output control unit 140 extracts only the header part that is a part of the input packet written in the shared memory 120, and includes the extracted header part. By performing control to output packets, it is possible to reduce the load on the apparatus during packet collection.

また、ミラー出力制御部140がペイロード部を廃棄することにより、プライバシーの保護および通信の秘密に配慮しながら、ネットワークのトラフィックの詳細な監視を行うことができる。   Further, when the mirror output control unit 140 discards the payload portion, it is possible to perform detailed monitoring of network traffic while considering privacy protection and communication secret.

[第2の実施の形態]
次に、第2の実施の形態について説明する。上記の第1の実施の形態との相違点を中心に説明し、同様の事項については同一の符号を用いるとともに説明を省略する。
[Second Embodiment]
Next, a second embodiment will be described. Differences from the first embodiment will be mainly described, and the same reference numerals are used for the same matters, and descriptions thereof are omitted.

第2の実施の形態は、スイッチ200のミラー出力制御部240が、抽出したパケットのヘッダ部を結合することにより、複数のパケットのヘッダ部をまとめて出力する点で、第1の実施の形態と異なる。   In the second embodiment, the mirror output control unit 240 of the switch 200 combines the header portions of the extracted packets, and outputs the header portions of a plurality of packets at the same time. And different.

以下に、本実施の形態におけるスイッチ200について説明する。
図11は、第2の実施の形態におけるミラー出力制御部の構成を示すブロック図である。
Hereinafter, the switch 200 in the present embodiment will be described.
FIG. 11 is a block diagram illustrating a configuration of a mirror output control unit according to the second embodiment.

ミラー出力制御部240は、受信された入力パケットに基づくミラーパケットの出力を制御する。このとき、ミラー出力制御部240は、共有メモリ220に書き込まれた入力パケットから、入力パケットの一部であるヘッダ部のみを抽出する。次に、ミラー出力制御部240は、抽出した入力パケットの一部であるヘッダ部をコピーして、蓄積バッファ243に書き込む。次に、ミラー出力制御部240は、蓄積バッファ243に書き込まれたパケットのヘッダ部を読み出し、読み出したパケットのヘッダ部を複数個結合してミラーパケットに含め、ヘッダ部を結合したミラーパケットを出力する制御を行う。   The mirror output control unit 240 controls the output of the mirror packet based on the received input packet. At this time, the mirror output control unit 240 extracts only the header part that is a part of the input packet from the input packet written in the shared memory 220. Next, the mirror output control unit 240 copies the header part, which is a part of the extracted input packet, and writes it in the accumulation buffer 243. Next, the mirror output control unit 240 reads the header part of the packet written in the accumulation buffer 243, combines a plurality of read packet header parts into the mirror packet, and outputs the mirror packet in which the header parts are combined. Control.

ミラー出力制御部240は、共有メモリ220からデータを読み出す共有メモリ読み出し制御部241、蓄積バッファ書き込み制御部242、蓄積バッファ243および蓄積バッファ読み出し制御部244を有する。   The mirror output control unit 240 includes a shared memory read control unit 241 that reads data from the shared memory 220, a storage buffer write control unit 242, a storage buffer 243, and a storage buffer read control unit 244.

共有メモリ読み出し制御部241は、サイズカウンタ部241cによるサイズのカウント結果に基づいて、共有メモリ220に記憶されているパケットを読み出し、読み出したパケットからヘッダ部を抽出し、抽出したパケットのヘッダ部を蓄積バッファ243に書き込む制御を行う。この共有メモリ読み出し制御部241は、制御データ処理部241a、パケットデータ処理部241b、サイズカウンタ部241c、FCS計算部241d、タイマ部241e、蓄積数カウンタ部241fおよび蓄積サイズカウンタ部241gを有する。   The shared memory read control unit 241 reads the packet stored in the shared memory 220 based on the size count result by the size counter unit 241c, extracts the header part from the read packet, and extracts the header part of the extracted packet. Control to write to the accumulation buffer 243 is performed. The shared memory read control unit 241 includes a control data processing unit 241a, a packet data processing unit 241b, a size counter unit 241c, an FCS calculation unit 241d, a timer unit 241e, an accumulation number counter unit 241f, and an accumulation size counter unit 241g.

制御データ処理部241aは、共有メモリ220から入力パケットの制御データを読み出し、これに基づいてミラーパケットの出力制御を行う。
パケットデータ処理部241bは、共有メモリ220からパケットのヘッダ部を読み出す。このパケットデータ処理部241bによって読み出されたパケットのヘッダ部が、蓄積バッファ書き込み制御部242によって蓄積バッファ243に書き込まれる。
The control data processing unit 241a reads the control data of the input packet from the shared memory 220, and performs output control of the mirror packet based on this.
The packet data processing unit 241b reads the packet header from the shared memory 220. The header portion of the packet read by the packet data processing unit 241b is written into the accumulation buffer 243 by the accumulation buffer write control unit 242.

サイズカウンタ部241cは、共有メモリ220から読み込まれ、蓄積バッファ243に書き込まれるパケットのヘッダ部のサイズを計測して、パケットの先頭からのサイズを認識する。これにより、サイズカウンタ部241cは、パケットデータ処理部241bによる共有メモリ220より読み出されたパケットからのヘッダ部の切り出しを制御する。   The size counter unit 241c measures the size of the header part of the packet read from the shared memory 220 and written to the accumulation buffer 243, and recognizes the size from the beginning of the packet. Accordingly, the size counter unit 241c controls the extraction of the header portion from the packet read from the shared memory 220 by the packet data processing unit 241b.

FCS計算部241dは、ミラーパケットのエラーを検出するためのFCSを計算する。このFCS計算部241dによるFCSの計算では、蓄積バッファ読み出し制御部244によって蓄積バッファ243から読み出されたパケットのヘッダ部のコピーを有するミラーパケットのFCSがFCS計算部241dによって計算される。   The FCS calculation unit 241d calculates an FCS for detecting a mirror packet error. In the FCS calculation by the FCS calculation unit 241d, the FCS of the mirror packet having a copy of the header portion of the packet read from the accumulation buffer 243 by the accumulation buffer read control unit 244 is calculated by the FCS calculation unit 241d.

具体的には、蓄積バッファ読み出し制御部244によって蓄積バッファ243からのヘッダ部の読み出しを行うと判定されると、FCS計算部241dによって蓄積バッファ243に記憶されているパケットのヘッダ部から生成されるミラーパケットのFCSが計算される。また、このFCS計算部241dによるFCSの計算結果は、続いて蓄積バッファ書き込み制御部242によって蓄積バッファ243に書き込む制御が行われる。   Specifically, when the accumulation buffer read control unit 244 determines that the header portion is to be read from the accumulation buffer 243, the FCS calculation unit 241d generates the header portion of the packet stored in the accumulation buffer 243. The FCS of the mirror packet is calculated. The FCS calculation result by the FCS calculation unit 241d is subsequently controlled to be written into the storage buffer 243 by the storage buffer write control unit 242.

タイマ部241eは、経過時間を計測する。蓄積数カウンタ部241fは、蓄積バッファ243に書き込まれたパケットのヘッダ部の個数を計数する。蓄積サイズカウンタ部241gは、蓄積バッファ243に書き込まれたパケットのヘッダ部のサイズを合計する。   The timer unit 241e measures the elapsed time. The accumulation number counter unit 241f counts the number of header parts of the packets written in the accumulation buffer 243. The accumulation size counter unit 241g adds up the sizes of the header portions of the packets written in the accumulation buffer 243.

詳しくは後述するが、これらのタイマ部241eによる経過時間の計測結果、蓄積数カウンタ部241fによるパケットのヘッダ部の個数の計数結果、蓄積数カウンタ部241fによるパケットのヘッダ部のサイズの合計に基づいて、蓄積バッファ読み出し制御部244によりミラーパケットの出力が制御される。   Although details will be described later, based on the measurement result of the elapsed time by the timer unit 241e, the counting result of the number of header parts of the packet by the accumulation number counter unit 241f, and the total size of the header part of the packet by the accumulation number counter unit 241f. Thus, the output of the mirror packet is controlled by the storage buffer read control unit 244.

蓄積バッファ書き込み制御部242は、蓄積バッファ243に対する、パケットデータ処理部241bによってパケットから抽出されたヘッダ部およびFCS計算部241dによって計算されたFCSの書き込みを制御する。また、蓄積バッファ書き込み制御部242は、サイズカウンタ部241cによって計測されたパケットのヘッダ部のサイズが、所定量より少ない場合には、パディングによりパケットのヘッダ部のサイズを所定量に揃える制御を行う。   The accumulation buffer write control unit 242 controls the writing of the header part extracted from the packet by the packet data processing unit 241b and the FCS calculated by the FCS calculation unit 241d to the accumulation buffer 243. Further, when the size of the header portion of the packet measured by the size counter unit 241c is smaller than a predetermined amount, the accumulation buffer write control unit 242 performs control to align the size of the header portion of the packet with the predetermined amount by padding. .

蓄積バッファ243は、パケットデータ処理部241bによってパケットから抽出されたヘッダ部およびFCS計算部241dによって計算されたFCSを記憶するバッファである。   The accumulation buffer 243 is a buffer for storing the header portion extracted from the packet by the packet data processing unit 241b and the FCS calculated by the FCS calculation unit 241d.

蓄積バッファ読み出し制御部244は、蓄積バッファ243に書き込まれたパケットのヘッダ部を読み出し、読み出したパケットのヘッダ部を複数個結合してミラーパケットに含め、結合されたヘッダ部を有するミラーパケットを出力する制御を行う。   The storage buffer read control unit 244 reads the header part of the packet written in the storage buffer 243, combines a plurality of read packet header parts into a mirror packet, and outputs a mirror packet having the combined header part Control.

このとき、蓄積バッファ読み出し制御部244は、蓄積数カウンタ部241fによる計数の結果、パケットのヘッダ部の個数が所定個数に達する毎に、パケットから抽出されたヘッダ部を複数個結合し、結合したヘッダ部を有するミラーパケットを出力する制御を行う。   At this time, the accumulation buffer read control unit 244 combines and combines a plurality of header parts extracted from the packet every time the number of header parts of the packet reaches a predetermined number as a result of counting by the accumulation number counter unit 241f. Control to output a mirror packet having a header part is performed.

また、蓄積バッファ読み出し制御部244は、蓄積数カウンタ部241fによる計数の結果、パケットのヘッダ部の個数が所定個数に達していなくても、タイマ部241eによる計時の結果、複数のヘッダ部のうちの最初のヘッダ部が蓄積されてから所定時間が経過した場合には、その時までに蓄積されているパケットから抽出されたヘッダ部を複数個結合し、結合したヘッダ部を有するミラーパケットを出力する制御を行う。   Further, the accumulation buffer read control unit 244 determines that, as a result of counting by the accumulation number counter unit 241f, the timer unit 241e counts as a result of counting by the timer unit 241e even if the number of packet header units does not reach the predetermined number. When a predetermined time has elapsed since the first header portion of the message was accumulated, a plurality of header portions extracted from the packets accumulated up to that time are combined, and a mirror packet having the combined header portions is output. Take control.

さらに、蓄積バッファ読み出し制御部244は、蓄積サイズカウンタ部241gによる合計の結果、蓄積バッファ243に記憶されているパケットのヘッダ部のサイズの合計が所定量に達する毎に、パケットから抽出されたヘッダ部を複数個結合し、結合したヘッダ部を有するミラーパケットを出力する制御を行うこともできる。   Further, the accumulation buffer read control unit 244 determines the header extracted from the packet every time the total size of the header part of the packet stored in the accumulation buffer 243 reaches a predetermined amount as a result of the summation by the accumulation size counter unit 241g. It is also possible to perform control for combining a plurality of sections and outputting a mirror packet having a combined header section.

この場合にも、蓄積バッファ読み出し制御部244は、蓄積バッファ243に記憶されているパケットのヘッダ部のサイズの合計が所定量に達していなくても、タイマ部241eによる計時の結果、複数のヘッダ部のうちの最初のヘッダ部が蓄積されてから所定時間が経過した場合には、その時までに蓄積されているパケットから抽出されたヘッダ部を複数個結合し、結合したヘッダ部を有するミラーパケットを出力する制御を行う。   Also in this case, the accumulation buffer read control unit 244 determines that a plurality of headers as a result of timing by the timer unit 241e even if the total size of the header portions of the packets stored in the accumulation buffer 243 has not reached a predetermined amount. When a predetermined time has elapsed since the first header portion of the packets was accumulated, a plurality of header portions extracted from the packets accumulated up to that time are combined, and a mirror packet having the combined header portions Is controlled.

蓄積バッファ読み出し制御部244は、ミラーパケットを出力する制御を行う場合、蓄積バッファ243に記憶されているパケットのヘッダ部を読み出して結合することによりミラーパケットとし、FCS計算部241dにこのミラーパケットのFCSを計算させる制御を行う。次に、蓄積バッファ読み出し制御部244は、FCS計算部241dによって計算されたFCSを蓄積バッファ243から読み出し、ミラーパケットにFCS計算部241dが計算したミラーパケットのFCSを付加する。次に、パケットデータ処理部241bは、FCSが付加されたミラーパケットを出力する。   When performing the control to output the mirror packet, the accumulation buffer read control unit 244 reads the header part of the packet stored in the accumulation buffer 243 and combines it into a mirror packet, and the FCS calculation unit 241d transmits the mirror packet. Control to calculate FCS. Next, the storage buffer read control unit 244 reads the FCS calculated by the FCS calculation unit 241d from the storage buffer 243, and adds the FCS of the mirror packet calculated by the FCS calculation unit 241d to the mirror packet. Next, the packet data processing unit 241b outputs the mirror packet with the FCS added.

なお、蓄積バッファ読み出し制御部244は、タイマ部241eによる経過時間の計測のみをミラーパケット出力の基準としてもよい。この場合、蓄積バッファ読み出し制御部244は、タイマ部241eによる計測の結果、所定時間が経過する毎に、パケットから抽出されたヘッダ部を複数個結合し、結合したヘッダ部を有するミラーパケットを出力する制御を行う。   The accumulation buffer read control unit 244 may use only the measurement of the elapsed time by the timer unit 241e as a reference for mirror packet output. In this case, as a result of measurement by the timer unit 241e, the accumulation buffer read control unit 244 combines a plurality of header portions extracted from the packet every time a predetermined time elapses, and outputs a mirror packet having the combined header portions. Control.

図12は、第2の実施の形態におけるスイッチの動作を示す図である。図12では、スイッチ200にパケットが入力される場合のスイッチ200の動作について説明する。ここで、パケット31,32は、第1の実施の形態と同様、既にスイッチ200に入力された後に出力されたものとし、パケット33はこれから入力される。また、ミラーパケット250は、パケット31,32におけるそれぞれのヘッダ部31b,32bが結合されたパケットである。   FIG. 12 is a diagram illustrating the operation of the switch according to the second embodiment. In FIG. 12, the operation of the switch 200 when a packet is input to the switch 200 will be described. Here, the packets 31 and 32 are assumed to have been output after being input to the switch 200 as in the first embodiment, and the packet 33 will be input from now on. The mirror packet 250 is a packet in which the header portions 31b and 32b of the packets 31 and 32 are combined.

また、パケット31,32,33は、それぞれプリアンブル部31a,32a,33a、ヘッダ部31b,32b,33b、ペイロード部31c,32c,33cおよび図示しないFCSを有する。   The packets 31, 32, and 33 have preamble portions 31a, 32a, and 33a, header portions 31b, 32b, and 33b, payload portions 31c, 32c, and 33c, and an FCS (not shown), respectively.

図12に示すように、スイッチ200にパケット31,32が順に入力されると、これに応じて対応するミラーパケット250が出力される。このとき、ミラーパケット250のヘッダ部251bは、パケット31のヘッダ部31bがコピーされたものである。同様に、ミラーパケット250のヘッダ部252bは、パケット32のヘッダ部32bがコピーされたものである。   As shown in FIG. 12, when packets 31 and 32 are sequentially input to the switch 200, a corresponding mirror packet 250 is output accordingly. At this time, the header portion 251b of the mirror packet 250 is a copy of the header portion 31b of the packet 31. Similarly, the header part 252b of the mirror packet 250 is a copy of the header part 32b of the packet 32.

すなわち、ミラーパケット250は、スイッチ200により、パケット31のペイロード部31cが除去されたヘッダ部31bのコピーであるヘッダ部251bと、パケット32のペイロード部32cおよびFCSが除去されたヘッダ部32bのコピーであるヘッダ部251bとが結合され、さらに、プリアンブル部250aおよびミラーパケットのFCSが付加されて出力される。   That is, the mirror packet 250 includes a header portion 251b that is a copy of the header portion 31b from which the payload portion 31c of the packet 31 is removed by the switch 200, and a copy of the header portion 32b from which the payload portion 32c and FCS of the packet 32 are removed. Are combined with the header portion 251b, and the preamble portion 250a and the FCS of the mirror packet are added and output.

図13および図14は、第2の実施の形態におけるミラーパケットのデータ構造例を示す図である。図13に、第2の実施の形態において、パディングが行われない場合のミラーパケット250を示す。また、図14に、第2の実施の形態において、パディングが行われた場合のミラーパケット260を示す。   FIG. 13 and FIG. 14 are diagrams illustrating an example of a data structure of a mirror packet in the second embodiment. FIG. 13 shows a mirror packet 250 when no padding is performed in the second embodiment. FIG. 14 shows a mirror packet 260 when padding is performed in the second embodiment.

まず、図13にしたがってパディングが行われない場合のミラーパケット250について説明する。
プリアンブル部31a、ヘッダ部31b、ペイロード部31cおよびFCS31dを有するパケット31がスイッチ200に入力されると、スイッチ200においてパケット31のヘッダ部31bのみがコピーされて蓄積される。
First, the mirror packet 250 when no padding is performed will be described with reference to FIG.
When a packet 31 having a preamble part 31a, a header part 31b, a payload part 31c, and an FCS 31d is input to the switch 200, only the header part 31b of the packet 31 is copied and stored in the switch 200.

続いてプリアンブル部32a、ヘッダ部32b、ペイロード部32cおよびFCS32dを有するパケット32がスイッチ200に入力されると、スイッチ200においてパケット32のヘッダ部32bのみがコピーされて蓄積される。   Subsequently, when the packet 32 having the preamble part 32a, the header part 32b, the payload part 32c, and the FCS 32d is input to the switch 200, only the header part 32b of the packet 32 is copied and accumulated in the switch 200.

その後、スイッチ200により、パケット31およびパケット32のヘッダ部が結合されたミラーパケット250が出力される。このミラーパケット250は、パケット31のヘッダ部31bのコピーであるヘッダ部251b、パケット32のヘッダ部32bのコピーであるヘッダ部252b、新たに付加されたプリアンブル部250a、新に計算されたFCS250dを有する。   Thereafter, the switch 200 outputs a mirror packet 250 in which the headers of the packet 31 and the packet 32 are combined. The mirror packet 250 includes a header part 251b which is a copy of the header part 31b of the packet 31, a header part 252b which is a copy of the header part 32b of the packet 32, a newly added preamble part 250a, and a newly calculated FCS 250d. Have.

次に、図14にしたがってパディングが行われる場合のミラーパケット260について説明する。本実施の形態のスイッチ200は、詳しくは図15および図16において後述するが、入力されたパケットのヘッダ部が予め定められた切り出しサイズよりも短い場合、パディングを行ってヘッダ部のサイズを調整する。以下に、このパディングについて説明する。ここで、パケット31は図13と異なり、ヘッダ部31bのサイズが、予め定められた切り出しサイズより短いものとする。   Next, the mirror packet 260 when padding is performed according to FIG. 14 will be described. The switch 200 according to the present embodiment will be described in detail later with reference to FIGS. 15 and 16, but when the header portion of the input packet is shorter than a predetermined cutout size, padding is performed to adjust the size of the header portion. To do. This padding will be described below. Here, the packet 31 is different from FIG. 13 in that the size of the header part 31b is shorter than a predetermined cut-out size.

プリアンブル部31a、ヘッダ部31b、ペイロード部31cおよびFCS31dを有するパケット31がスイッチ200に入力されると、スイッチ200においてパケット31のヘッダ部31bのみがコピーされて蓄積される。このとき、上記のようにヘッダ部31bのサイズは切り出しサイズよりも短いので、スイッチ200においてコピーされたヘッダ部には、図示しないパディング部が付加されて蓄積される。   When a packet 31 having a preamble part 31a, a header part 31b, a payload part 31c, and an FCS 31d is input to the switch 200, only the header part 31b of the packet 31 is copied and stored in the switch 200. At this time, since the size of the header portion 31b is shorter than the cut-out size as described above, a padding portion (not shown) is added and accumulated in the header portion copied by the switch 200.

続いて、図13と同様、プリアンブル部32a、ヘッダ部32b、ペイロード部32cおよびFCS32dを有するパケット32がスイッチ200に入力されると、スイッチ200においてパケット32のヘッダ部32bのみがコピーされて蓄積される。   Subsequently, as in FIG. 13, when the packet 32 having the preamble part 32a, the header part 32b, the payload part 32c, and the FCS 32d is input to the switch 200, only the header part 32b of the packet 32 is copied and stored in the switch 200. The

その後、スイッチ200により、パケット31およびパケット32のヘッダ部が結合されたミラーパケット260が出力される。このミラーパケット260は、パケット31のヘッダ部31bのコピーであるヘッダ部261bおよびサイズを調整するためにヘッダ部261bに付加されたパディング部261e、パケット32のヘッダ部32bのコピーであるヘッダ部262b、新たに付加されたプリアンブル部260a、新に計算されたFCS260dを有する。   Thereafter, the switch 200 outputs a mirror packet 260 in which the headers of the packet 31 and the packet 32 are combined. The mirror packet 260 includes a header part 261b that is a copy of the header part 31b of the packet 31, a padding part 261e added to the header part 261b to adjust the size, and a header part 262b that is a copy of the header part 32b of the packet 32. , A newly added preamble section 260a and a newly calculated FCS 260d.

このように、ヘッダ部のサイズが短い場合にパディング部を付加することによって、ヘッダ部などのサイズが不揃いであるときにも、パケットに含まれるヘッダ部などの位置を一定間隔に揃えることができる。   In this way, by adding a padding portion when the size of the header portion is short, the positions of the header portion and the like included in the packet can be aligned at a constant interval even when the sizes of the header portion and the like are uneven. .

図15および図16は、第2の実施の形態におけるミラー出力制御処理の手順を示すフローチャートである。このミラー出力制御処理は、スイッチ200が入力を受け付けて共有メモリ220(図11参照)に書き込んだパケットのヘッダ部分を読み出し、読み出したヘッダ部分をミラーパケットとして出力する処理である。ミラー出力制御処理は、スイッチ200の起動時に、CPU101(図3参照)によって実行される。   FIG. 15 and FIG. 16 are flowcharts illustrating the procedure of the mirror output control process in the second embodiment. This mirror output control process is a process in which the switch 200 receives an input, reads the header portion of the packet written in the shared memory 220 (see FIG. 11), and outputs the read header portion as a mirror packet. The mirror output control process is executed by the CPU 101 (see FIG. 3) when the switch 200 is activated.

[ステップS221]CPU101は、ミラーパケット出力をするか否かおよび切り出されるパケットのヘッダ部のサイズを示す切り出しサイズを設定する。第2の実施の形態では、この切り出しサイズに基づいて、ミラーパケットに含まれるヘッダ部のサイズが決定される。ヘッダ部のサイズが切り出しサイズよりも短い場合には、パディングによってヘッダ部のサイズが調整される。   [Step S221] The CPU 101 sets whether or not to output a mirror packet and a cutout size indicating the size of the header portion of the cutout packet. In the second embodiment, the size of the header part included in the mirror packet is determined based on this cut-out size. When the size of the header part is shorter than the cut-out size, the size of the header part is adjusted by padding.

[ステップS222]CPU101は、FCSを計算するFCS計算部241d(図11参照)が有するFCSレジスタ(図示省略)を初期化する。
[ステップS223]CPU101は、共有メモリ220に書き込まれたパケットがあるか否かを判定する。パケットがあれば、CPU101は、ステップS224に処理を進める。一方、パケットがなければ、CPU101は、ステップS222に処理を進める。
[Step S222] The CPU 101 initializes an FCS register (not shown) included in the FCS calculation unit 241d (see FIG. 11) that calculates the FCS.
[Step S223] The CPU 101 determines whether there is a packet written in the shared memory 220 or not. If there is a packet, the CPU 101 advances the process to step S224. On the other hand, if there is no packet, the CPU 101 advances the process to step S222.

[ステップS224]CPU101は、入力されたパケットのヘッダ部のサイズを測定するサイズカウンタ部241c(図11参照)が有するサイズカウンタ(図示省略)を初期化する。   [Step S224] The CPU 101 initializes a size counter (not shown) included in the size counter unit 241c (see FIG. 11) that measures the size of the header portion of the input packet.

[ステップS225]CPU101は、共有メモリ220に書き込まれているパケットのヘッダ部を切り出して出力するヘッダミラーリングを行うか否かを判定する。ヘッダミラーリングを行う場合には、CPU101は、ステップS231(図16参照)に処理を進める。一方、ヘッダミラーリングを行わない場合には、CPU101は、ステップS226に処理を進める。   [Step S225] The CPU 101 determines whether or not to perform header mirroring that cuts out and outputs the header portion of the packet written in the shared memory 220. When performing header mirroring, the CPU 101 advances the process to step S231 (see FIG. 16). On the other hand, when header mirroring is not performed, the CPU 101 advances the process to step S226.

[ステップS226]CPU101は、共有メモリ220に書き込まれているパケット全体を読み出し、読み出したパケットの全体のFCSを計算する。
[ステップS227]CPU101は、ステップS226で読み出したパケット全体にステップS226で計算したFCSを付加し、ミラーパケットとして出力する。その後、CPU101は、ステップS222に処理を進める。
[Step S226] The CPU 101 reads the entire packet written in the shared memory 220, and calculates the FCS of the entire read packet.
[Step S227] The CPU 101 adds the FCS calculated in step S226 to the entire packet read in step S226, and outputs it as a mirror packet. Thereafter, the CPU 101 advances the process to step S222.

[ステップS231]CPU101は、蓄積バッファ243(図11参照)に書き込まれているパケットのヘッダ部の数が0であるか否かを判定する。0であれば、CPU101は、ステップS233に処理を進める。一方、0でなければ、CPU101は、ステップS232に処理を進める。   [Step S231] The CPU 101 determines whether or not the number of header portions of the packet written in the accumulation buffer 243 (see FIG. 11) is zero. If it is 0, the CPU 101 advances the process to step S233. On the other hand, if not 0, the CPU 101 advances the process to step S232.

[ステップS232]CPU101は、蓄積バッファ243に蓄積されているパケットのヘッダ部のうち最も古いものが蓄積されてからの経過時間を測定するタイマ部241e(図11参照)が有するタイマ(図示省略)を初期化する。このとき、タイマにタイマが完了となる設定時間を示す設定値が設定される。   [Step S232] The CPU 101 has a timer (not shown) included in the timer unit 241e (see FIG. 11) that measures the elapsed time since the oldest header part of the packet stored in the storage buffer 243 is stored. Is initialized. At this time, a set value indicating a set time for completing the timer is set in the timer.

[ステップS233]CPU101は、共有メモリ220に書き込まれているパケットのヘッダ部を読み出し、読み出したパケットのヘッダ部を蓄積バッファ243に書き込む。このときCPU101は、ステップS224で初期化したサイズカウンタ部241cから、パケットのヘッダ部のサイズを取得する。CPU101は、パケットのヘッダ部のサイズが予め定められた切り出しサイズよりも短い場合、ヘッダ部のサイズが切り出しサイズと同一になるようにパディング部を付加してヘッダ部のサイズの調整を行う。また、CPU101は、このとき読み出したパケットのヘッダ部以外の不要な部分を廃棄する。   [Step S233] The CPU 101 reads the header part of the packet written in the shared memory 220, and writes the header part of the read packet in the accumulation buffer 243. At this time, the CPU 101 acquires the size of the header portion of the packet from the size counter unit 241c initialized in step S224. When the size of the header portion of the packet is shorter than a predetermined cutout size, the CPU 101 adjusts the size of the header portion by adding a padding portion so that the header portion size is the same as the cutout size. Further, the CPU 101 discards unnecessary portions other than the header portion of the packet read at this time.

[ステップS234]CPU101は、読み出したパケットのヘッダ部に基づいて、蓄積数カウンタ部241f(図11参照)が有する蓄積数カウンタ(図示省略)および蓄積サイズカウンタ部241g(図11参照)が有する蓄積サイズカウンタ(図示省略)の値を更新する。   [Step S234] The CPU 101 stores, based on the header portion of the read packet, an accumulation number counter (not shown) included in the accumulation number counter unit 241f (see FIG. 11) and an accumulation size counter unit 241g (see FIG. 11). The value of the size counter (not shown) is updated.

ここで、蓄積数カウンタは、このパケットのヘッダ部の蓄積バッファ243に対する書き込みに基づく更新によって1が加算される。また、蓄積サイズカウンタは、このパケットのヘッダ部の蓄積バッファ243に対する書き込みに基づく更新によって、このパケットのヘッダ部のサイズを示す値が加算される。   Here, the accumulated number counter is incremented by 1 by updating based on writing to the accumulation buffer 243 in the header portion of this packet. The accumulation size counter is added with a value indicating the size of the header portion of this packet by updating the header portion of this packet based on writing to the accumulation buffer 243.

[ステップS235]CPU101は、判定の対象であるカウンタの値が予定値に達しているか否かを判定する。予定値に達していれば、CPU101は、ステップS237に処理を進める。一方、予定値に達していなければ、CPU101は、ステップS236に処理を進める。   [Step S235] The CPU 101 determines whether or not the value of the counter to be determined has reached the scheduled value. If the planned value has been reached, the CPU 101 advances the process to step S237. On the other hand, if the planned value has not been reached, the CPU 101 advances the process to step S236.

ここで、判定の対象であるカウンタとは、蓄積されたヘッダ部を結合してミラーパケットとして出力するか否かを判定するためのカウンタであり、蓄積数カウンタまたは蓄積サイズカウンタのいずれかが、スイッチ200の設計段階、ユーザの設定などによって予め定められる。   Here, the counter to be determined is a counter for determining whether or not the accumulated header parts are combined and output as a mirror packet, and either the accumulation number counter or the accumulation size counter is It is determined in advance by the design stage of the switch 200, user settings, and the like.

例えば、判定の対象であるカウンタが蓄積数カウンタである場合には、蓄積数カウンタの値が予定値に達するとき、すなわち、蓄積バッファ243に予定された数のパケットのヘッダ部が書き込まれているとき、ステップS237でミラーパケットが出力される。   For example, when the counter to be determined is an accumulation number counter, when the value of the accumulation number counter reaches a predetermined value, that is, the header portion of a predetermined number of packets is written in the accumulation buffer 243. In step S237, the mirror packet is output.

また、判定の対象であるカウンタが蓄積サイズカウンタである場合には、蓄積サイズカウンタの値が予定値に達するとき、すなわち、蓄積バッファ243に書き込まれているパケットのヘッダ部のサイズの合計が予定されている量に達するとき、ステップS237でミラーパケットが出力される。   In addition, when the counter to be determined is an accumulation size counter, when the value of the accumulation size counter reaches a predetermined value, that is, the total size of the header portion of the packet written in the accumulation buffer 243 is estimated. When the amount reached is reached, a mirror packet is output in step S237.

[ステップS236]CPU101は、タイマが完了したか否か、すなわち、ステップS232で初期化されたタイマが設定値に達し、設定時間を経過したか否かを判定する。タイマが完了していれば、CPU101は、ステップS237に処理を進める。一方、タイマが完了していなければ、CPU101は、ステップS223(図15参照)に処理を進める。   [Step S236] The CPU 101 determines whether or not the timer has been completed, that is, whether or not the timer initialized in step S232 has reached the set value and the set time has elapsed. If the timer has been completed, the CPU 101 advances the process to step S237. On the other hand, if the timer has not been completed, the CPU 101 advances the process to step S223 (see FIG. 15).

[ステップS237]CPU101は、ステップS233で蓄積バッファ243に書きこまれたヘッダ部をすべて読み出し、読み出したパケットのヘッダ部を結合し、結合したヘッダ部のFCSを計算する。また、CPU101は、読み出したヘッダ部に計算したFCSを付加し、パケットとして出力する。その後、CPU101は、ステップS222(図15参照)に処理を進める。   [Step S237] The CPU 101 reads all the header parts written in the accumulation buffer 243 in step S233, combines the header parts of the read packets, and calculates the FCS of the combined header parts. Further, the CPU 101 adds the calculated FCS to the read header part and outputs it as a packet. Thereafter, the CPU 101 advances the process to step S222 (see FIG. 15).

以上のようにして、第2の実施の形態では、第1の実施の形態に加えて、ミラー出力制御部240が、複数のヘッダ部を結合して1つのミラーパケットとして出力することにより、パケット収集時およびネットワークのトラフィックの監視時のスイッチ100およびスイッチ100から出力されたミラーパケットを収集する装置の負荷を、より軽減することができる。   As described above, in the second embodiment, in addition to the first embodiment, the mirror output control unit 240 combines a plurality of header parts and outputs the combined packet as one mirror packet. It is possible to further reduce the load on the device that collects the mirror packet output from the switch 100 and the switch 100 at the time of collection and monitoring of network traffic.

[第3の実施の形態]
次に、第3の実施の形態について説明する。上記の第1の実施の形態、第2の実施の形態との相違点を中心に説明し、同様の事項については同一の符号を用いるとともに説明を省略する。
[Third Embodiment]
Next, a third embodiment will be described. Differences from the first embodiment and the second embodiment will be mainly described, and the same reference numerals are used for the same matters, and descriptions thereof are omitted.

第3の実施の形態は、スイッチ300の入力制御部310が、共有メモリ320に入力されたパケットの制御データを書き込み、ミラー出力制御部340が、共有メモリ320に書き込まれた制御データの一部を、ミラーパケットに含める付加情報として読み出して、読み出した付加情報をミラーパケットに含めて出力する点で、第1の実施の形態および第2の実施の形態と異なる。   In the third embodiment, the input control unit 310 of the switch 300 writes the control data of the packet input to the shared memory 320, and the mirror output control unit 340 includes a part of the control data written to the shared memory 320. Is read out as additional information to be included in the mirror packet, and the read additional information is included in the mirror packet and output, which is different from the first embodiment and the second embodiment.

以下に、本実施の形態におけるスイッチ300について説明する。
図17は、第3の実施の形態における入力制御部の構成を示すブロック図である。
第3の実施の形態の入力制御部310は、スイッチ300によって受信された入力パケットの入力を制御するために、パケット書き込み部311および制御データ書き込み部312を有する。
Hereinafter, the switch 300 in the present embodiment will be described.
FIG. 17 is a block diagram illustrating a configuration of the input control unit according to the third embodiment.
The input control unit 310 according to the third embodiment includes a packet writing unit 311 and a control data writing unit 312 in order to control input of an input packet received by the switch 300.

パケット書き込み部311は、スイッチ300に入力された入力パケットにおけるヘッダ部およびペイロード部のデータなどのパケットデータを共有メモリ320に書き込む制御を行う。   The packet writing unit 311 performs control to write packet data such as header and payload data in the input packet input to the switch 300 to the shared memory 320.

制御データ書き込み部312は、スイッチ300に入力された入力パケットが入力された入力ポートを示す入力ポート番号、入力パケットが共有メモリ320に書き込まれる際のデータサイズ、入力パケットから、例えばヘッダ部などのパケットの一部を切り出す切り出しを行う際のパケットの位置(例えば、先頭からのサイズなど)の情報など、入力パケットの転送およびミラーリングを制御するための制御データを共有メモリ320に書き込む制御を行う。ここで、この共有メモリ320に書き込まれる制御データのうちの一部が、付加情報としてミラーパケットに含まれてスイッチ300から出力される。   The control data writing unit 312 determines the input port number indicating the input port to which the input packet input to the switch 300 is input, the data size when the input packet is written to the shared memory 320, the input packet from the input packet, for example, Control is performed to write control data for controlling transfer and mirroring of the input packet, such as information on the position of the packet (for example, the size from the top) when performing cutout for cutting out a part of the packet, to the shared memory 320. Here, a part of the control data written in the shared memory 320 is output from the switch 300 as additional information included in the mirror packet.

このようにして、スイッチ300に入力された入力パケットは、パケット書き込み部311によって共有メモリ320に書き込まれるとともに、書き込まれる際のデータサイズおよび入力ポート番号などの制御データも、一部に付加情報を含みながら、制御データ書き込み部312によって共有メモリ320に書き込まれる。   In this way, the input packet input to the switch 300 is written to the shared memory 320 by the packet writing unit 311, and control data such as the data size and input port number at the time of writing also includes additional information in part. While being included, the data is written to the shared memory 320 by the control data writing unit 312.

図18は、第3の実施の形態におけるミラー出力制御部の構成を示すブロック図である。
ミラー出力制御部340は、受信された入力パケットに基づくミラーパケットの出力を制御する。このとき、ミラー出力制御部340は、共有メモリ320に書き込まれた入力パケットから、入力パケットの一部であるヘッダ部のみを抽出する。次に、ミラー出力制御部340は、抽出した入力パケットの一部であるヘッダ部をコピーして、蓄積バッファ343に書き込む。次に、ミラー出力制御部340は、蓄積バッファ343に書き込まれたパケットのヘッダ部を読み出し、読み出したパケットのヘッダ部を複数個結合してミラーパケットに含め、ヘッダ部を結合したミラーパケットを出力する制御を行う。
FIG. 18 is a block diagram illustrating a configuration of a mirror output control unit according to the third embodiment.
The mirror output control unit 340 controls the output of the mirror packet based on the received input packet. At this time, the mirror output control unit 340 extracts only the header part which is a part of the input packet from the input packet written in the shared memory 320. Next, the mirror output control unit 340 copies the header part, which is a part of the extracted input packet, and writes it in the accumulation buffer 343. Next, the mirror output control unit 340 reads the header part of the packet written in the accumulation buffer 343, combines a plurality of header parts of the read packet into the mirror packet, and outputs the mirror packet in which the header part is combined. Control.

ミラー出力制御部340は、共有メモリ320からデータを読み出す共有メモリ読み出し制御部341、蓄積バッファ書き込み制御部342、蓄積バッファ343および蓄積バッファ読み出し制御部344を有する。   The mirror output control unit 340 includes a shared memory read control unit 341 that reads data from the shared memory 320, an accumulation buffer write control unit 342, an accumulation buffer 343, and an accumulation buffer read control unit 344.

共有メモリ読み出し制御部341は、サイズカウンタ部341cによるサイズのカウント結果に基づいて、共有メモリ320に記憶されているパケットを読み出し、読み出したパケットからヘッダ部を抽出し、抽出したパケットのヘッダ部を蓄積バッファ343に書き込む制御を行う。この共有メモリ読み出し制御部341は、制御データ処理部341a、パケットデータ処理部341b、サイズカウンタ部341c、FCS計算部341d、タイマ部341e、蓄積数カウンタ部341fおよび蓄積サイズカウンタ部341gを有する。   The shared memory read control unit 341 reads the packet stored in the shared memory 320 based on the size count result by the size counter unit 341c, extracts the header portion from the read packet, and extracts the header portion of the extracted packet. Control to write to the accumulation buffer 343 is performed. The shared memory read control unit 341 includes a control data processing unit 341a, a packet data processing unit 341b, a size counter unit 341c, an FCS calculation unit 341d, a timer unit 341e, an accumulation number counter unit 341f, and an accumulation size counter unit 341g.

制御データ処理部341aは、共有メモリ320から入力パケットの制御データを読み出し、これに基づいてミラーパケットの出力制御を行う。また、制御データ処理部341aは、共有メモリ320から付加情報を読み出す。この制御データ処理部341aによって読み出された付加情報が、蓄積バッファ書き込み制御部342によって蓄積バッファ343に書き込まれる。   The control data processing unit 341a reads the control data of the input packet from the shared memory 320, and performs output control of the mirror packet based on this. In addition, the control data processing unit 341 a reads additional information from the shared memory 320. The additional information read by the control data processing unit 341a is written into the storage buffer 343 by the storage buffer write control unit 342.

パケットデータ処理部341bは、共有メモリ320からパケットのヘッダ部を読み出す。このパケットデータ処理部341bによって読み出されたパケットのヘッダ部が、蓄積バッファ書き込み制御部342によって蓄積バッファ343に書き込まれる。   The packet data processing unit 341b reads the header portion of the packet from the shared memory 320. The header portion of the packet read by the packet data processing unit 341b is written into the accumulation buffer 343 by the accumulation buffer write control unit 342.

サイズカウンタ部341cは、共有メモリ320から読み込まれ、蓄積バッファ343に書き込まれるパケットのヘッダ部のサイズを計測して、パケットの先頭からのサイズを認識する。これにより、サイズカウンタ部341cは、パケットデータ処理部341bによる共有メモリ320より読み出されたパケットからのヘッダ部の切り出しを制御する。   The size counter unit 341c measures the size of the header portion of the packet that is read from the shared memory 320 and written to the accumulation buffer 343, and recognizes the size from the beginning of the packet. Accordingly, the size counter unit 341c controls the extraction of the header portion from the packet read from the shared memory 320 by the packet data processing unit 341b.

FCS計算部341dは、ミラーパケットのエラーを検出するためのFCSを計算する。このFCS計算部341dによるFCSの計算では、蓄積バッファ読み出し制御部344によって蓄積バッファ343から読み出されたパケットのヘッダ部のコピーを有するミラーパケットのFCSがFCS計算部341dによって計算される。   The FCS calculation unit 341d calculates an FCS for detecting a mirror packet error. In the FCS calculation by the FCS calculation unit 341d, the FCS calculation unit 341d calculates the FCS of the mirror packet having a copy of the header part of the packet read from the storage buffer 343 by the storage buffer read control unit 344.

具体的には、蓄積バッファ読み出し制御部344によって蓄積バッファ343からのヘッダ部の読み出しを行うと判定されると、FCS計算部341dによって蓄積バッファ343に記憶されているパケットのヘッダ部から生成されるミラーパケットのFCSが計算される。また、このFCS計算部341dによるFCSの計算結果は、続いて蓄積バッファ書き込み制御部342によって蓄積バッファ343に書き込む制御が行われる。   Specifically, when the accumulation buffer read control unit 344 determines to read the header portion from the accumulation buffer 343, the FCS calculation unit 341d generates the packet from the header portion stored in the accumulation buffer 343. The FCS of the mirror packet is calculated. The FCS calculation result by the FCS calculation unit 341d is subsequently controlled to be written into the storage buffer 343 by the storage buffer write control unit 342.

タイマ部341eは、経過時間を計測する。蓄積数カウンタ部341fは、蓄積バッファ343に書き込まれたパケットのヘッダ部の個数を計数する。蓄積サイズカウンタ部341gは、蓄積バッファ343に書き込まれたパケットのヘッダ部のサイズを合計する。   The timer unit 341e measures the elapsed time. The accumulation number counter unit 341f counts the number of header parts of the packets written in the accumulation buffer 343. The accumulation size counter unit 341g adds up the sizes of the header portions of the packets written in the accumulation buffer 343.

詳しくは後述するが、これらのタイマ部341eによる経過時間の計測結果、蓄積数カウンタ部341fによるパケットのヘッダ部の個数の計数結果、蓄積数カウンタ部341fによるパケットのヘッダ部のサイズの合計に基づいて、蓄積バッファ読み出し制御部344によりミラーパケットの出力が制御される。   Although details will be described later, based on the measurement result of the elapsed time by the timer unit 341e, the counting result of the number of header parts of the packet by the accumulation number counter unit 341f, and the total size of the header part of the packet by the accumulation number counter unit 341f. Thus, the output of the mirror packet is controlled by the storage buffer read control unit 344.

蓄積バッファ書き込み制御部342は、蓄積バッファ343に対する、パケットデータ処理部341bによってパケットから抽出されたヘッダ部、FCS計算部341dによって計算されたFCSおよびミラーパケットに含められる情報であり、パケットに関する情報である付加情報の書き込みを制御する。ここで、付加情報には、例えば、パケットのサイズを示す情報、スイッチ300に入力された入力パケットが入力された入力ポートを示す入力ポート番号、ミラーパケットでない出力パケットが出力される出力ポートを示す出力ポート番号などがある。   The storage buffer write control unit 342 is information included in the header part extracted from the packet by the packet data processing unit 341b, the FCS calculated by the FCS calculation unit 341d, and the mirror packet with respect to the storage buffer 343. Control writing of some additional information. Here, the additional information includes, for example, information indicating the packet size, an input port number indicating the input port to which the input packet input to the switch 300 is input, and an output port from which an output packet that is not a mirror packet is output. There are output port numbers.

また、蓄積バッファ書き込み制御部342は、サイズカウンタ部341cによって計測されたパケットのヘッダ部のサイズが、所定量より少ない場合には、パディングによりパケットのヘッダ部のサイズを所定量に揃える制御を行う。   In addition, when the size of the header portion of the packet measured by the size counter unit 341c is smaller than a predetermined amount, the accumulation buffer write control unit 342 performs control to align the size of the header portion of the packet with the predetermined amount by padding. .

蓄積バッファ343は、パケットデータ処理部341bによってパケットから抽出されたヘッダ部および制御データ処理部341aによって共有メモリ320から読み出された付加情報ならびにFCS計算部341dによって計算されたFCSを記憶するバッファである。   The accumulation buffer 343 is a buffer for storing the header extracted from the packet by the packet data processing unit 341b, the additional information read from the shared memory 320 by the control data processing unit 341a, and the FCS calculated by the FCS calculation unit 341d. is there.

蓄積バッファ読み出し制御部344は、蓄積バッファ343に書き込まれたパケットのヘッダ部および付加情報を読み出し、読み出したパケットのヘッダ部および付加情報を複数個結合してミラーパケットに含め、結合されたヘッダ部および付加情報を有するミラーパケットを出力する制御を行う。この蓄積バッファ読み出し制御部344は、ミラーパケットに含まれるヘッダ部同士の間に付加情報を格納するための領域である付加情報格納領域を設け、この付加情報格納領域に付加情報を格納してミラーパケットを生成する。   The accumulation buffer read control unit 344 reads the header portion and additional information of the packet written in the accumulation buffer 343, combines a plurality of read packet header portions and additional information into a mirror packet, and combines the header portions. And control to output a mirror packet having additional information. The accumulation buffer read control unit 344 provides an additional information storage area as an area for storing additional information between the header parts included in the mirror packet, and stores the additional information in the additional information storage area to mirror the additional information. Generate a packet.

ここで、この付加情報格納領域をミラーパケットに含まれるヘッダ部同士の間に設けた場合には、付加情報格納領域の個数は、ミラーパケットに含まれるヘッダ部の個数よりも1つ少ない。したがって、1つの入力パケットに対する付加情報のサイズは、「付加情報格納領域のサイズ」×「ミラーパケットに含まれるヘッダ部の数−1」÷「ミラーパケットに含まれるヘッダ部の数」以下となる。   Here, when this additional information storage area is provided between the header parts included in the mirror packet, the number of additional information storage areas is one less than the number of header parts included in the mirror packet. Therefore, the size of additional information for one input packet is equal to or less than “size of additional information storage area” × “number of header parts included in mirror packet−1” ÷ “number of header parts included in mirror packet”. .

また、蓄積バッファ読み出し制御部344は、蓄積数カウンタ部341fによる計数の結果、パケットのヘッダ部の個数が所定個数に達する毎に、パケットから抽出されたヘッダ部および付加情報を複数個結合し、結合したヘッダ部および付加情報を有するミラーパケットを出力する制御を行う。   Further, the accumulation buffer read control unit 344 combines a plurality of header parts and additional information extracted from the packet every time the number of header parts of the packet reaches a predetermined number as a result of counting by the accumulation number counter unit 341f, Control is performed to output a mirror packet having a combined header part and additional information.

また、蓄積バッファ読み出し制御部344は、蓄積数カウンタ部341fによる計数の結果、パケットのヘッダ部の個数が所定個数に達していなくても、タイマ部341eによる計時の結果、複数のヘッダ部のうちの最初のヘッダ部が蓄積されてから所定時間が経過した場合には、その時までに蓄積されているパケットから抽出されたヘッダ部および付加情報を複数個結合し、結合したヘッダ部および付加情報を有するミラーパケットを出力する制御を行う。   Further, as a result of the counting by the accumulation number counter unit 341f, the accumulation buffer read control unit 344 does not reach the predetermined number of header portions of the packet. As a result of counting by the timer unit 341e, When a predetermined time has elapsed since the first header part of the message was accumulated, a plurality of header parts and additional information extracted from packets accumulated up to that time are combined, and the combined header part and additional information are The control which outputs the mirror packet which has is performed.

さらに、蓄積バッファ読み出し制御部344は、蓄積サイズカウンタ部341gによる合計の結果、蓄積バッファ343に記憶されているパケットのヘッダ部および付加情報のサイズの合計が所定量に達する毎に、パケットから抽出されたヘッダ部および付加情報を複数個結合し、結合したヘッダ部および付加情報を有するミラーパケットを出力する制御を行うこともできる。   Further, the accumulation buffer read control unit 344 extracts the packet from the packet every time the total size of the header part and additional information stored in the accumulation buffer 343 reaches a predetermined amount as a result of the summation by the accumulation size counter unit 341g. It is also possible to perform control for combining a plurality of header parts and additional information, and outputting a mirror packet having the combined header part and additional information.

この場合にも、蓄積バッファ読み出し制御部344は、蓄積バッファ343に記憶されているパケットのヘッダ部および付加情報のサイズの合計が所定量に達していなくても、タイマ部341eによる計時の結果、複数のヘッダ部のうちの最初のヘッダ部が蓄積されてから所定時間が経過した場合には、その時までに蓄積されているパケットから抽出されたヘッダ部および付加情報を複数個結合し、結合したヘッダ部および付加情報を有するミラーパケットを出力する制御を行う。   Also in this case, the accumulation buffer read control unit 344 determines the result of the time measurement by the timer unit 341e even if the total size of the header part and the additional information of the packet stored in the accumulation buffer 343 has not reached the predetermined amount, When a predetermined time has elapsed since the first header part of a plurality of header parts was accumulated, a plurality of header parts and additional information extracted from the packets accumulated up to that time were combined and combined. Control is performed to output a mirror packet having a header part and additional information.

蓄積バッファ読み出し制御部344は、ミラーパケットを出力する制御を行う場合、蓄積バッファ343に記憶されているパケットのヘッダ部および付加情報を読み出して結合することによりミラーパケットとし、FCS計算部341dにこのミラーパケットのFCSを計算させる制御を行う。次に、蓄積バッファ読み出し制御部344は、FCS計算部341dによって計算されたFCSを蓄積バッファ343から読み出し、ミラーパケットにFCS計算部341dが計算したミラーパケットのFCSを付加する。次に、パケットデータ処理部341bは、FCSが付加されたミラーパケットを出力する。   When performing control to output a mirror packet, the accumulation buffer read control unit 344 reads out and combines the header and additional information of the packet stored in the accumulation buffer 343 to form a mirror packet, and this is sent to the FCS calculation unit 341d. Control to calculate the FCS of the mirror packet is performed. Next, the storage buffer read control unit 344 reads the FCS calculated by the FCS calculation unit 341d from the storage buffer 343, and adds the FCS of the mirror packet calculated by the FCS calculation unit 341d to the mirror packet. Next, the packet data processing unit 341b outputs the mirror packet with the FCS added.

なお、蓄積バッファ読み出し制御部344は、タイマ部341eによる経過時間の計測のみをミラーパケット出力の基準としてもよい。この場合、蓄積バッファ読み出し制御部344は、タイマ部341eによる計測の結果、所定時間が経過する毎に、パケットから抽出されたヘッダ部および付加情報を複数個結合し、結合したヘッダ部および付加情報を有するミラーパケットを出力する制御を行う。   Note that the storage buffer read control unit 344 may use only the measurement of the elapsed time by the timer unit 341e as a reference for mirror packet output. In this case, as a result of measurement by the timer unit 341e, the accumulation buffer read control unit 344 combines a plurality of header units and additional information extracted from the packet every time a predetermined time elapses, and combines the combined header unit and additional information. Control to output a mirror packet having

図19は、第3の実施の形態におけるミラーパケットのデータ構造例を示す図である。図19に示すミラーパケット350は、パケットの付加情報が、パケットのヘッダ部の間に付加情報が挟まれるように付されている。   FIG. 19 is a diagram illustrating a data structure example of a mirror packet according to the third embodiment. The mirror packet 350 shown in FIG. 19 is attached with the additional information of the packet so that the additional information is sandwiched between the header portions of the packet.

プリアンブル部31a、ヘッダ部31b、ペイロード部31cおよびFCS31dを有するパケット31がスイッチ300に入力されると、スイッチ300においてパケット31のヘッダ部31bのみがコピーされて蓄積される。   When the packet 31 having the preamble part 31a, the header part 31b, the payload part 31c, and the FCS 31d is input to the switch 300, only the header part 31b of the packet 31 is copied and stored in the switch 300.

続いてプリアンブル部32a、ヘッダ部32b、ペイロード部32cおよびFCS32dを有するパケット32がスイッチ300に入力されると、スイッチ300においてパケット32のヘッダ部32bのみがコピーされて蓄積される。   Subsequently, when the packet 32 having the preamble portion 32a, the header portion 32b, the payload portion 32c, and the FCS 32d is input to the switch 300, only the header portion 32b of the packet 32 is copied and accumulated in the switch 300.

その後、スイッチ200により、パケット31およびパケット32のヘッダ部が結合されたミラーパケット350が出力される。このミラーパケット350は、パケット31のヘッダ部31bのコピーであるヘッダ部351b、パケット32のヘッダ部32bのコピーであるヘッダ部352b、新たに付加されたプリアンブル部350a、新に計算されたFCS350d、パケット31の付加情報が示された付加情報部351f、パケット32の付加情報が示された付加情報部352fを有する。   Thereafter, the switch 200 outputs a mirror packet 350 in which the headers of the packet 31 and the packet 32 are combined. This mirror packet 350 includes a header part 351b which is a copy of the header part 31b of the packet 31, a header part 352b which is a copy of the header part 32b of the packet 32, a newly added preamble part 350a, a newly calculated FCS 350d, It has an additional information part 351f indicating additional information of the packet 31 and an additional information part 352f indicating additional information of the packet 32.

ここで、付加情報部351fは、プリアンブル部350aとヘッダ部351bとの間に配置される。同様に、付加情報部352fは、ヘッダ部351bとヘッダ部352bとの間に配置される。   Here, the additional information part 351f is arranged between the preamble part 350a and the header part 351b. Similarly, the additional information part 352f is disposed between the header part 351b and the header part 352b.

このように、ミラーリングされたヘッダ部の付近に元のパケットの付加情報を配置して、ヘッダ部とともにミラーパケットによって出力することで、収集したパケットに関して付随する情報を同時に通知することができ、ネットワークのトラフィックのより詳細かつ高度な監視を行うことができる。   In this manner, by arranging the additional information of the original packet in the vicinity of the mirrored header part and outputting it by the mirror packet together with the header part, it is possible to notify the accompanying information regarding the collected packets at the same time. More detailed and advanced monitoring of traffic.

図20から図22は、第3の実施の形態におけるミラー出力制御処理の手順を示すフローチャートである。このミラー出力制御処理は、スイッチ300が入力を受け付けて共有メモリ320(図17参照)に書き込んだパケットのヘッダ部分および付加情報を読み出し、読み出したヘッダ部分および付加情報をミラーパケットとして出力する処理である。ミラー出力制御処理は、スイッチ300の起動時に、CPU101(図3参照)によって実行される。   20 to 22 are flowcharts illustrating the procedure of the mirror output control process according to the third embodiment. This mirror output control process is a process in which the switch 300 receives an input, reads the header part and additional information of the packet written in the shared memory 320 (see FIG. 17), and outputs the read header part and additional information as a mirror packet. is there. The mirror output control process is executed by the CPU 101 (see FIG. 3) when the switch 300 is activated.

[ステップS321]CPU101は、ミラーパケット出力をするか否か、切り出されるパケットのヘッダ部のサイズを示す切り出しサイズ、付加情報の項目を設定する。第3の実施の形態では、この切り出しサイズに基づいて、ミラーパケットに含まれるヘッダ部のサイズが決定される。ヘッダ部のサイズが切り出しサイズよりも短い場合には、パディングによってヘッダ部のサイズが調整される。また、付加情報の項目の設定に基づいて、設定された項目に応じた付加情報がミラーパケットに含まれて出力されることになる。   [Step S321] The CPU 101 sets whether to output a mirror packet, a cut-out size indicating the size of the header part of the cut-out packet, and additional information items. In the third embodiment, the size of the header part included in the mirror packet is determined based on this cut-out size. When the size of the header part is shorter than the cut-out size, the size of the header part is adjusted by padding. Further, based on the setting of the additional information item, additional information corresponding to the set item is included in the mirror packet and output.

[ステップS322]CPU101は、FCSを計算するFCS計算部341d(図18参照)が有するFCSレジスタ(図示省略)を初期化する。
[ステップS323]CPU101は、共有メモリ220に書き込まれたパケットがあるか否かを判定する。パケットがあれば、CPU101は、ステップS324に処理を進める。一方、パケットがなければ、CPU101は、ステップS322に処理を進める。
[Step S322] The CPU 101 initializes an FCS register (not shown) included in the FCS calculation unit 341d (see FIG. 18) that calculates the FCS.
[Step S323] The CPU 101 determines whether there is a packet written in the shared memory 220 or not. If there is a packet, the CPU 101 advances the process to step S324. On the other hand, if there is no packet, the CPU 101 advances the process to step S322.

[ステップS324]CPU101は、入力されたパケットのヘッダ部のサイズを測定するサイズカウンタ部341c(図18参照)が有するサイズカウンタ(図示省略)を初期化する。   [Step S324] The CPU 101 initializes a size counter (not shown) included in the size counter unit 341c (see FIG. 18) that measures the size of the header portion of the input packet.

[ステップS325]CPU101は、共有メモリ220に書き込まれているパケットのヘッダ部を切り出して出力するヘッダミラーリングを行うか否かを判定する。ヘッダミラーリングを行う場合には、CPU101は、ステップS331(図21参照)に処理を進める。一方、ヘッダミラーリングを行わない場合には、CPU101は、ステップS326に処理を進める。   [Step S325] The CPU 101 determines whether or not to perform header mirroring that cuts out and outputs the header portion of the packet written in the shared memory 220. When performing header mirroring, the CPU 101 advances the process to step S331 (see FIG. 21). On the other hand, when header mirroring is not performed, the CPU 101 advances the process to step S326.

[ステップS326]CPU101は、共有メモリ220に書き込まれているパケット全体を読み出し、読み出したパケットの全体のFCSを計算する。
[ステップS327]CPU101は、ステップS326で読み出したパケット全体にステップS326で計算したFCSを付加し、ミラーパケットとして出力する。その後、CPU101は、ステップS322に処理を進める。
[Step S326] The CPU 101 reads the entire packet written in the shared memory 220, and calculates the FCS of the entire read packet.
[Step S327] The CPU 101 adds the FCS calculated in step S326 to the entire packet read in step S326, and outputs the result as a mirror packet. Thereafter, the CPU 101 advances the process to step S322.

[ステップS331]CPU101は、蓄積バッファ343(図18参照)に書き込まれているパケットのヘッダ部の数が0であるか否かを判定する。0であれば、CPU101は、ステップS333に処理を進める。一方、0でなければ、CPU101は、ステップS332に処理を進める。   [Step S331] The CPU 101 determines whether or not the number of header portions of the packet written in the accumulation buffer 343 (see FIG. 18) is zero. If it is 0, the CPU 101 advances the process to step S333. On the other hand, if not 0, the CPU 101 advances the process to step S332.

[ステップS332]CPU101は、蓄積バッファ343に蓄積されているパケットのヘッダ部のうち最も古いものが蓄積されてからの経過時間を測定するタイマ部341e(図18参照)が有するタイマ(図示省略)を初期化する。このとき、タイマにタイマが完了となる設定時間を示す設定値が設定される。   [Step S332] The CPU 101 has a timer (not shown) included in the timer unit 341e (see FIG. 18) that measures the elapsed time since the oldest header part of the packet stored in the storage buffer 343 is stored. Is initialized. At this time, a set value indicating a set time for completing the timer is set in the timer.

[ステップS333]CPU101は、共有メモリ320に書き込まれているパケットのヘッダ部を読み出し、読み出したパケットのヘッダ部を蓄積バッファ343に書き込む。このときCPU101は、ステップS324で初期化したサイズカウンタ部341cから、パケットのヘッダ部のサイズを取得する。CPU101は、パケットのヘッダ部のサイズが予め定められた切り出しサイズよりも短い場合、ヘッダ部のサイズが切り出しサイズと同一になるようにパディング部を付加してヘッダ部のサイズの調整を行う。また、CPU101は、このとき読み出したパケットのヘッダ部以外の不要な部分を廃棄する。   [Step S333] The CPU 101 reads the header portion of the packet written in the shared memory 320, and writes the header portion of the read packet in the accumulation buffer 343. At this time, the CPU 101 acquires the size of the header portion of the packet from the size counter unit 341c initialized in step S324. When the size of the header portion of the packet is shorter than a predetermined cutout size, the CPU 101 adjusts the size of the header portion by adding a padding portion so that the header portion size is the same as the cutout size. Further, the CPU 101 discards unnecessary portions other than the header portion of the packet read at this time.

[ステップS334]CPU101は、制御データ処理部341a(図18参照)が抽出した付加情報に基づいて付加情報を生成し、蓄積バッファ343に書き込む。その後、CPU101は、ステップS341(図22参照)に処理を進める。   [Step S334] The CPU 101 generates additional information based on the additional information extracted by the control data processing unit 341a (see FIG. 18), and writes the additional information in the accumulation buffer 343. Thereafter, the CPU 101 advances the process to step S341 (see FIG. 22).

[ステップS341]CPU101は、読み出したパケットのヘッダ部に基づいて、蓄積数カウンタ部341f(図18参照)が有する蓄積数カウンタ(図示省略)および蓄積サイズカウンタ部341g(図18参照)が有する蓄積サイズカウンタ(図示省略)の値を更新する。   [Step S341] The CPU 101 stores, based on the header portion of the read packet, an accumulation number counter (not shown) included in the accumulation number counter unit 341f (see FIG. 18) and an accumulation size counter unit 341g (see FIG. 18). The value of the size counter (not shown) is updated.

ここで、蓄積数カウンタは、第2の実施の形態と同様、このパケットのヘッダ部の蓄積バッファ343に対する書き込みに基づく更新によって1が加算される。また、蓄積サイズカウンタは、このパケットのヘッダ部の蓄積バッファ343に対する書き込みに基づく更新によって、このパケットのヘッダ部のサイズを示す値が加算される。   Here, as in the second embodiment, the accumulation number counter is incremented by 1 by updating based on writing to the accumulation buffer 343 in the header portion of this packet. The accumulation size counter is added with a value indicating the size of the header portion of this packet by updating based on the writing of the header portion of this packet to the accumulation buffer 343.

[ステップS342]CPU101は、判定の対象であるカウンタの値が予定値に達しているか否かを判定する。予定値に達していれば、CPU101は、ステップS344に処理を進める。一方、予定値に達していなければ、CPU101は、ステップS343に処理を進める。   [Step S342] The CPU 101 determines whether or not the value of the counter to be determined has reached the scheduled value. If the planned value has been reached, the CPU 101 advances the process to step S344. On the other hand, if the planned value has not been reached, the CPU 101 advances the process to step S343.

ここで、判定の対象であるカウンタとは、第2の実施の形態と同様、蓄積されたヘッダ部を結合してミラーパケットとして出力するか否かを判定するためのカウンタであり、蓄積数カウンタまたは蓄積サイズカウンタのいずれかが、スイッチ300の設計段階、ユーザの設定などによって予め定められる。   Here, the determination target counter is a counter for determining whether or not the accumulated header parts are combined and output as a mirror packet, as in the second embodiment. Alternatively, one of the storage size counters is determined in advance by the design stage of the switch 300, the user setting, and the like.

例えば、判定の対象であるカウンタが蓄積数カウンタである場合には、蓄積数カウンタの値が予定値に達するとき、すなわち、蓄積バッファ343に予定された数のパケットのヘッダ部が書き込まれているとき、ステップS344でミラーパケットが出力される。   For example, when the counter to be determined is an accumulation number counter, when the value of the accumulation number counter reaches a predetermined value, that is, the header portion of a predetermined number of packets is written in the accumulation buffer 343. In step S344, a mirror packet is output.

また、判定の対象であるカウンタが蓄積サイズカウンタである場合には、蓄積サイズカウンタの値が予定値に達するとき、すなわち、蓄積バッファ343に書き込まれているパケットのヘッダ部のサイズの合計が予定されている量に達するとき、ステップS344でミラーパケットが出力される。   When the counter to be determined is an accumulation size counter, when the value of the accumulation size counter reaches a predetermined value, that is, the total size of the header portion of the packet written in the accumulation buffer 343 is estimated. When the amount reached is reached, a mirror packet is output in step S344.

[ステップS343]CPU101は、タイマが完了したか否か、すなわち、ステップS332で初期化されたタイマが設定値に達し、設定時間を経過したか否かを判定する。タイマが完了していれば、CPU101は、ステップS344に処理を進める。一方、タイマが完了していなければ、CPU101は、ステップS323(図20参照)に処理を進める。   [Step S343] The CPU 101 determines whether or not the timer has been completed, that is, whether or not the timer initialized in step S332 has reached the set value and the set time has elapsed. If the timer has been completed, the CPU 101 advances the process to step S344. On the other hand, if the timer has not been completed, the CPU 101 advances the process to step S323 (see FIG. 20).

[ステップS344]CPU101は、ステップS333(図21参照)で蓄積バッファ343に書きこまれたヘッダ部をすべて読み出し、読み出したパケットのヘッダ部を結合し、結合したヘッダ部のFCSを計算する。また、CPU101は、読み出したヘッダ部に計算したFCSを付加し、パケットとして出力する。その後、CPU101は、ステップS322(図20参照)に処理を進める。   [Step S344] The CPU 101 reads all the header parts written in the storage buffer 343 in step S333 (see FIG. 21), combines the header parts of the read packets, and calculates the FCS of the combined header parts. Further, the CPU 101 adds the calculated FCS to the read header part and outputs it as a packet. Thereafter, the CPU 101 advances the process to step S322 (see FIG. 20).

以上のようにして、第3の実施の形態では、第1の実施の形態、第2の実施の形態に加えて、ミラー出力制御部340がミラーパケットに付加情報を含めて出力することにより、付加情報を用いてネットワークのトラフィックの、より詳細な監視を行うことが可能になる。   As described above, in the third embodiment, in addition to the first embodiment and the second embodiment, the mirror output control unit 340 outputs additional information included in the mirror packet. It becomes possible to perform more detailed monitoring of network traffic using the additional information.

[第4の実施の形態]
次に、第4の実施の形態について説明する。上記の第1の実施の形態、第2の実施の形態、第3の実施の形態との相違点を中心に説明し、同様の事項については同一の符号を用いるとともに説明を省略する。
[Fourth Embodiment]
Next, a fourth embodiment will be described. Differences from the first embodiment, the second embodiment, and the third embodiment will be mainly described, and the same reference numerals are used for the same matters and the description is omitted.

第4の実施の形態は、スイッチ400が有する入力ポートおよび出力ポートのうち監視対象に定めたポートを使用するパケットを収集し、収集結果をミラーパケットとして出力する点で、第1の実施の形態、第2の実施の形態、第3の実施の形態と異なる。   The fourth embodiment is the first embodiment in that it collects packets that use a port determined as a monitoring target among the input ports and output ports of the switch 400 and outputs the collected results as mirror packets. This is different from the second embodiment and the third embodiment.

以下に、本実施の形態におけるスイッチ400について説明する。
図23は、第4の実施の形態におけるスイッチの構成を示すブロック図である。図23に示すスイッチ400は、ネットワークのトラフィックを監視するために、入力されたパケットのヘッダ部を有するミラーパケットを出力する機能を有するレイヤ2スイッチである。
Hereinafter, the switch 400 in the present embodiment will be described.
FIG. 23 is a block diagram illustrating a configuration of a switch according to the fourth embodiment. A switch 400 shown in FIG. 23 is a layer 2 switch having a function of outputting a mirror packet having a header portion of an input packet in order to monitor network traffic.

スイッチ400は、ネットワークのトラフィックを監視するために、入力制御部410、共有メモリ420、出力制御部430およびミラー出力制御部440を有する。
入力制御部410は、スイッチ400によって受信された入力パケットの入力を制御する。このとき、入力制御部410は、受信された入力パケットを共有メモリ420に書き込む制御を行う。これにより、スイッチ400に入力された入力パケットは、入力制御部410によって共有メモリ420に書き込まれる。ここで、入力パケットは、例えば、宛て先などを示すヘッダ部およびユーザデータなどの、転送されるデータを示すペイロード部を有する。
The switch 400 includes an input control unit 410, a shared memory 420, an output control unit 430, and a mirror output control unit 440 in order to monitor network traffic.
The input control unit 410 controls input of input packets received by the switch 400. At this time, the input control unit 410 performs control to write the received input packet into the shared memory 420. As a result, the input packet input to the switch 400 is written into the shared memory 420 by the input control unit 410. Here, the input packet has, for example, a header portion indicating a destination and a payload portion indicating data to be transferred such as user data.

共有メモリ420は、受信された入力パケットを一時的に記憶する。これにより、共有メモリ420に書き込まれたパケットが出力制御部430の制御により読み出されるとともに、ミラー出力制御部440の制御により読み出される。   The shared memory 420 temporarily stores the received input packet. Thereby, the packet written in the shared memory 420 is read out under the control of the output control unit 430 and is read out under the control of the mirror output control unit 440.

出力制御部430は、受信された入力パケットの出力を制御する。この出力制御部430の制御により、スイッチ400から入力パケットが出力パケットとして出力される。これにより、共有メモリ420に書き込まれた入力パケットは、出力制御部430から読み出され、適切な宛て先の出力ポートなどの図示しない出力部からスイッチ400の外部に出力される。ここで、出力パケットは、例えば、入力パケットと同様、ヘッダ部およびペイロード部を有する。   The output control unit 430 controls the output of the received input packet. Under the control of the output control unit 430, an input packet is output from the switch 400 as an output packet. As a result, the input packet written in the shared memory 420 is read from the output control unit 430 and output to the outside of the switch 400 from an output unit (not shown) such as an output port of an appropriate destination. Here, the output packet has a header part and a payload part, for example, like the input packet.

ミラー出力制御部440は、受信された入力パケットに基づくミラーパケットの出力を制御する。このとき、ミラー出力制御部440は、共有メモリ420に書き込まれた入力パケットから、入力パケットの一部であるヘッダ部のみを抽出する。次に、ミラー出力制御部440は、抽出した入力パケットの一部であるヘッダ部をコピーして、このヘッダ部を有するミラーパケットを出力する制御を行う。   The mirror output control unit 440 controls the output of the mirror packet based on the received input packet. At this time, the mirror output control unit 440 extracts only the header part which is a part of the input packet from the input packet written in the shared memory 420. Next, the mirror output control unit 440 performs control to copy a header part which is a part of the extracted input packet and output a mirror packet having this header part.

このようなスイッチ400によれば、入力制御部410により、受信されたパケットの入力が制御され、共有メモリ420により、受信されたパケットが一時的に記憶され、出力制御部430により、受信されたパケットの出力が制御され、ミラー出力制御部440により、ミラーパケットの出力が制御される。ここで、入力制御部410により、受信されたパケットが共有メモリ420に書き込まれる制御が行われ、ミラー出力制御部440により、共有メモリ420に書き込まれたパケットの一部のみが抽出され、抽出されたパケットの一部を有するミラーパケットが出力される制御が行われる。   According to such a switch 400, input of the received packet is controlled by the input control unit 410, and the received packet is temporarily stored by the shared memory 420 and received by the output control unit 430. The output of the packet is controlled, and the mirror output control unit 440 controls the output of the mirror packet. Here, the input control unit 410 controls the received packet to be written to the shared memory 420, and the mirror output control unit 440 extracts and extracts only a part of the packet written to the shared memory 420. Control is performed so that a mirror packet having a part of the packet is output.

これにより、ミラーリングを行う場合には、ミラーパケットを収集してトラフィックを監視する図示しない観測装置が接続されたミラー出力制御部440が、共有メモリ420より、出力制御部430から出力される出力パケットと同じパケットデータを読み出し、出力する。   As a result, when mirroring is performed, the mirror output control unit 440 connected to an observation device (not shown) that collects mirror packets and monitors traffic is output from the shared memory 420 to the output control unit 430. Read and output the same packet data.

すなわち、ミラー出力制御部440によって共有メモリ420から読み出されるパケットのデータは、パケット全部のデータではなく、パケットの一部のデータとする。また、ユーザが指定した、または予め決められた特定のサイズを上限として読み出される。   In other words, the packet data read from the shared memory 420 by the mirror output control unit 440 is not part of the entire packet data, but part of the packet data. Further, it is read out with an upper limit of a specific size designated by the user or predetermined.

なお、スイッチ400は、レイヤ2スイッチであるが、これに限らず、ルータなどのデータの中継機能を有する通信装置でもよい。
また、スイッチ400は、入力ポートa,b,・・・のように、パケットが入力される入力ポートを複数する。ミラー出力制御部440は、複数の入力ポートのうちの所定の入力ポートに入力されたパケットのミラーパケットを出力する制御を行う。
The switch 400 is a layer 2 switch, but is not limited thereto, and may be a communication device having a data relay function such as a router.
Further, the switch 400 has a plurality of input ports to which packets are input, such as input ports a, b,. The mirror output control unit 440 performs control to output a mirror packet of a packet input to a predetermined input port among the plurality of input ports.

付加情報は、パケットのミラーリングが行われた箇所を示す情報を有する。スイッチ400は、パケットが入力される入力ポートを複数有している。付加情報は、ミラー出力制御部440によるミラーパケットの出力が行われたパケットが、入力された入力ポートを示す情報を有する。   The additional information includes information indicating a location where the packet is mirrored. The switch 400 has a plurality of input ports through which packets are input. The additional information includes information indicating an input port into which a packet for which a mirror packet is output by the mirror output control unit 440 is input.

また、スイッチ400がパケットが出力される出力ポートを複数有している場合、ミラー出力制御部440は、パケットを出力する出力ポートから出力されるパケットのミラーパケットを出力する制御を行う。この場合、付加情報に、ミラー出力制御部440によるミラーパケットの出力が行われたパケットが出力される出力ポートを示す情報を含めてもよい。   Further, when the switch 400 has a plurality of output ports from which packets are output, the mirror output control unit 440 performs control to output a mirror packet of a packet output from the output port that outputs the packet. In this case, the additional information may include information indicating an output port to which a packet for which a mirror packet is output by the mirror output control unit 440 is output.

図24および図25は、第4の実施の形態におけるスイッチの動作を示す図である。図24に、第4の実施の形態において、入力ポートを監視対象に設定した場合のスイッチ400の動作を示す。また、図25に、出力ポートを監視対象に設定した場合のスイッチ400の動作を示す。   24 and 25 are diagrams illustrating the operation of the switch according to the fourth embodiment. FIG. 24 shows the operation of the switch 400 when an input port is set as a monitoring target in the fourth embodiment. FIG. 25 shows the operation of the switch 400 when the output port is set as a monitoring target.

図24では、入力ポートaが監視対象である場合のスイッチ400の動作について説明する。ここで、パケット31は、入力ポートaによってスイッチ400に入力されるパケットである。パケット32は、入力ポートbによってスイッチ400に入力されるパケットである。ミラーパケット450は、監視対象である入力ポートaから入力されたパケット31に基づいてミラーリングされたパケットである。   FIG. 24 describes the operation of the switch 400 when the input port a is the monitoring target. Here, the packet 31 is a packet input to the switch 400 by the input port a. The packet 32 is a packet input to the switch 400 by the input port b. The mirror packet 450 is a packet mirrored based on the packet 31 input from the input port a to be monitored.

また、パケット31,32は、それぞれプリアンブル部31a,32a、ヘッダ部31b,32b、ペイロード部31c,32cおよび図示しないFCSを有する。
図24に示すように、スイッチ400にパケット31,32が順に入力されると、これに応じて監視対象である入力ポートaから入力されたパケット31に対応するミラーパケット450が出力される。このとき、ミラーパケット450のヘッダ部451bは、パケット31のヘッダ部31bがコピーされたものである。
The packets 31 and 32 have preamble portions 31a and 32a, header portions 31b and 32b, payload portions 31c and 32c, and an FCS (not shown), respectively.
As shown in FIG. 24, when packets 31 and 32 are sequentially input to the switch 400, a mirror packet 450 corresponding to the packet 31 input from the input port a to be monitored is output accordingly. At this time, the header portion 451b of the mirror packet 450 is a copy of the header portion 31b of the packet 31.

すなわち、ミラーパケット450は、スイッチ400により、パケット31のペイロード部31cおよびFCSが除去されたヘッダ部のコピーであるヘッダ部451bに、プリアンブル部450aおよびミラーパケットのFCSが付加されて出力される。一方、監視対象でない入力ポートbから入力されたパケット32に対応するミラーパケットは出力されない。   That is, the mirror packet 450 is output by adding the preamble part 450a and the FCS of the mirror packet to the header part 451b which is a copy of the header part from which the payload part 31c and the FCS of the packet 31 are removed by the switch 400. On the other hand, the mirror packet corresponding to the packet 32 input from the input port b that is not the monitoring target is not output.

図25では、出力ポートaが監視対象である場合のスイッチ400の動作について説明する。ここで、パケット31は、入力ポートaによってスイッチ400に入力され、出力ポートaから出力されるパケットである。パケット32は、入力ポートbによってスイッチ400に入力され、出力ポートaから出力されるパケットである。ミラーパケット460は、監視対象である出力ポートaから出力されるパケット31,32に基づいてミラーリングされたパケットである。   FIG. 25 describes the operation of the switch 400 when the output port a is the monitoring target. Here, the packet 31 is a packet that is input to the switch 400 by the input port a and output from the output port a. The packet 32 is a packet that is input to the switch 400 by the input port b and output from the output port a. The mirror packet 460 is a packet that is mirrored based on the packets 31 and 32 output from the output port a to be monitored.

また、パケット31,32は、それぞれプリアンブル部31a,32a、ヘッダ部31b,32b、ペイロード部31c,32cおよび図示しないFCSを有する。
図25に示すように、スイッチ400にパケット31,32が順に入力されると、これに応じて監視対象である出力ポートaから出力されるパケット31,32に対応するミラーパケット460が出力される。このとき、ミラーパケット460のヘッダ部461bは、パケット31のヘッダ部31bがコピーされたものである。
The packets 31 and 32 have preamble portions 31a and 32a, header portions 31b and 32b, payload portions 31c and 32c, and an FCS (not shown), respectively.
As shown in FIG. 25, when packets 31 and 32 are sequentially input to the switch 400, a mirror packet 460 corresponding to the packets 31 and 32 output from the output port a to be monitored is output accordingly. . At this time, the header portion 461b of the mirror packet 460 is a copy of the header portion 31b of the packet 31.

すなわち、ミラーパケット460は、スイッチ400により、監視対象である出力ポートaから出力されるパケット31のペイロード部31cおよびFCSが除去されたヘッダ部のコピーであるヘッダ部461b、パケット32のペイロード部32cおよびFCSが除去されたヘッダ部のコピーであるヘッダ部462bに、プリアンブル部460aおよびミラーパケットのFCSが付加されて出力される。   That is, the mirror packet 460 includes a payload portion 31c of the packet 31 output from the output port a to be monitored by the switch 400, a header portion 461b that is a copy of the header portion from which the FCS is removed, and a payload portion 32c of the packet 32. The header part 462b, which is a copy of the header part from which the FCS has been removed, is added with the preamble part 460a and the FCS of the mirror packet and output.

以上のようにして、第4の実施の形態では、第1の実施の形態、第2の実施の形態、第3の実施の形態に加えて、ミラー出力制御部440が監視対象の入力ポートおよび出力ポートを通過したパケットのヘッダ部を収集したミラーパケットを出力することで、各ポート毎のパケットの入出力状況を収集でき、より詳細なトラフィックの監視を行うことが可能になる。   As described above, in the fourth embodiment, in addition to the first embodiment, the second embodiment, and the third embodiment, the mirror output control unit 440 includes the input port to be monitored and By outputting the mirror packet that collects the header part of the packet that has passed through the output port, the input / output status of the packet for each port can be collected, and more detailed traffic monitoring can be performed.

以上、開示の通信装置および通信方法を、図示の実施の形態に基づいて説明したが、上記については単に本発明の原理を示すものである。また、上記で説明した正確な構成および応用例に限定されるものではなく、さらに、多数の変形、変更が当業者にとって可能であり、対応するすべての変形例および均等物は、添付の請求項およびその均等物による開示の範囲とみなされ、各部の構成は同様の機能を有する任意の構成のものに置換することができる。また、他の任意の構成物や工程が付加されてもよい。また、前述した実施の形態のうちの任意の2以上の構成を組み合わせたものであってもよい。   Although the disclosed communication apparatus and communication method have been described based on the illustrated embodiment, the above description merely shows the principle of the present invention. Further, the present invention is not limited to the exact configurations and application examples described above, and many variations and modifications are possible to those skilled in the art, and all corresponding variations and equivalents are claimed in the appended claims. Further, the configuration of each part can be replaced with any configuration having a similar function. Moreover, other arbitrary structures and processes may be added. Further, any two or more configurations of the above-described embodiments may be combined.

(付記1) ネットワークのトラフィックを監視する通信装置において、
前記通信装置によって受信されたパケットの入力を制御する入力制御手段と、
受信された前記パケットを一時的に記憶する一時記憶手段と、
受信された前記パケットの出力を制御する出力制御手段と、
受信された前記パケットに基づくミラーパケットの出力を制御するミラー出力制御手段と、
を有し、
前記入力制御手段は、受信された前記パケットを前記一時記憶手段に書き込む制御を行い、
前記ミラー出力制御手段は、前記一時記憶手段に書き込まれた前記パケットの一部のみを抽出し、抽出した前記パケットの前記一部を有する前記ミラーパケットを出力する制御を行うことを特徴とする通信装置。
(Appendix 1) In a communication device that monitors network traffic,
Input control means for controlling input of a packet received by the communication device;
Temporary storage means for temporarily storing the received packet;
Output control means for controlling the output of the received packet;
Mirror output control means for controlling the output of a mirror packet based on the received packet;
Have
The input control means performs control to write the received packet to the temporary storage means,
The communication is characterized in that the mirror output control means extracts only a part of the packet written in the temporary storage means and outputs the mirror packet having the part of the extracted packet. apparatus.

(付記2) 前記ミラー出力制御手段は、前記パケットから前記一部としてヘッダ部を抽出する制御を行うことを特徴とする付記1記載の通信装置。
(付記3) 前記ミラー出力制御手段は、
前記パケットから抽出された前記一部を記憶する蓄積記憶手段と、
前記一時記憶手段に記憶されている前記パケットを読み出し、読み出した前記パケットから前記一部を抽出し、抽出した前記パケットの前記一部を前記蓄積記憶手段に書き込む制御を行う一時記憶読み出し制御手段と、
前記蓄積記憶手段に書き込まれた前記パケットの前記一部を読み出し、読み出した前記パケットの前記一部を複数個結合して前記ミラーパケットに含め、結合された前記一部を有する前記ミラーパケットを出力する制御を行う蓄積記憶読み出し制御手段と、
を有することを特徴とする付記1記載の通信装置。
(Additional remark 2) The said mirror output control means performs control which extracts a header part as the said part from the said packet, The communication apparatus of Additional remark 1 characterized by the above-mentioned.
(Supplementary Note 3) The mirror output control means includes:
Accumulation storage means for storing the part extracted from the packet;
Temporary storage read control means for reading out the packet stored in the temporary storage means, extracting the part from the read packet, and writing the extracted part of the packet into the accumulation storage means; ,
Reading the part of the packet written in the storage and storage means, combining a plurality of the part of the read packet into the mirror packet, and outputting the mirror packet having the combined part Storage storage read control means for performing control,
The communication apparatus according to appendix 1, characterized by comprising:

(付記4) 前記ミラー出力制御手段は、経過時間を計測するタイマ手段を有し、
前記蓄積記憶読み出し制御手段は、前記タイマ手段による計測の結果、所定時間が経過する毎に、前記パケットから抽出された前記一部を複数個結合し、前記結合した前記一部を有する前記ミラーパケットを出力する制御を行うことを特徴とする付記3記載の通信装置。
(Additional remark 4) The said mirror output control means has a timer means to measure elapsed time,
The accumulated storage read control unit combines the plurality of parts extracted from the packet every time a predetermined time has passed as a result of the measurement by the timer unit, and the mirror packet having the combined part The communication apparatus according to appendix 3, wherein control is performed to output.

(付記5) 前記ミラー出力制御手段は、前記蓄積記憶手段に書き込まれた前記パケットの前記一部を計数する蓄積数カウント手段を有し、
前記蓄積記憶読み出し制御手段は、前記蓄積数カウント手段による計数の結果、前記パケットの前記一部の個数が所定個数に達する毎に、前記パケットから抽出された前記一部を複数個結合し、前記結合した前記一部を有する前記ミラーパケットを出力する制御を行うことを特徴とする付記3記載の通信装置。
(Additional remark 5) The said mirror output control means has the accumulation number count means which counts the said part of the said packet written in the said accumulation memory means,
The accumulated storage read control unit combines a plurality of the parts extracted from the packet every time the number of the part of the packet reaches a predetermined number as a result of counting by the accumulated number counting unit, 4. The communication apparatus according to appendix 3, wherein control is performed to output the mirror packet having the part combined.

(付記6) 前記ミラー出力制御手段は、経過時間を計測するタイマ手段を有し、
前記蓄積記憶読み出し制御手段は、前記蓄積数カウント手段による計数の結果、前記パケットの前記一部の前記個数が前記所定個数に達していなくても、前記タイマ手段による計時の結果、複数の前記一部のうちの最初の前記一部が蓄積されてから所定時間が経過した場合には、その時までに蓄積されている前記パケットから抽出された前記一部を複数個結合し、前記結合した前記一部を有する前記ミラーパケットを出力する制御を行うことを特徴とする付記5記載の通信装置。
(Additional remark 6) The said mirror output control means has a timer means to measure elapsed time,
The accumulation storage read control unit is configured to obtain a plurality of the ones as a result of counting by the timer unit even if the number of the part of the packets does not reach the predetermined number as a result of counting by the accumulation number counting unit. When a predetermined time has elapsed since the first part of the unit was accumulated, a plurality of the parts extracted from the packets accumulated up to that time are combined, and the combined one 6. The communication device according to appendix 5, wherein control is performed to output the mirror packet having a unit.

(付記7) 前記ミラー出力制御手段は、前記蓄積記憶手段に書き込まれた前記パケットの前記一部のサイズを合計する蓄積サイズカウント手段を有し、
前記蓄積記憶読み出し制御手段は、前記蓄積サイズカウント手段による合計の結果、前記パケットの前記一部の前記サイズの合計が所定量に達する毎に、前記パケットから抽出された前記一部を複数個結合し、前記結合した前記一部を有する前記ミラーパケットを出力する制御を行うことを特徴とする付記3記載の通信装置。
(Additional remark 7) The said mirror output control means has the accumulation | storage size count means which totals the said one part size of the said packet written in the said accumulation | storage storage means,
The accumulation storage read control unit combines a plurality of the parts extracted from the packet every time the sum of the sizes of the part of the packet reaches a predetermined amount as a result of the summation by the accumulation size counting unit. The communication apparatus according to appendix 3, wherein control is performed to output the mirror packet having the combined part.

(付記8) 前記ミラー出力制御手段は、経過時間を計測するタイマ手段を有し、
前記蓄積記憶読み出し制御手段は、前記蓄積サイズカウント手段による合計の結果、前記パケットの前記一部の前記サイズの合計が前記所定量に達していなくても、前記タイマ手段による計時の結果、複数の前記一部のうちの最初の前記一部が蓄積されてから所定時間が経過した場合には、その時までに蓄積されている前記パケットから抽出された前記一部を複数個結合し、前記結合した前記一部を有する前記ミラーパケットを出力する制御を行うことを特徴とする付記7記載の通信装置。
(Supplementary Note 8) The mirror output control means includes timer means for measuring elapsed time,
As a result of the summation by the accumulation size count means, the accumulated storage read control means has a plurality of results of timing by the timer means, even if the sum of the sizes of the part of the packet has not reached the predetermined amount. When a predetermined time has elapsed since the first part of the part was accumulated, a plurality of the parts extracted from the packets accumulated up to that time are combined, and the combined The communication apparatus according to appendix 7, wherein control is performed to output the mirror packet having the part.

(付記9) 前記ミラー出力制御手段は、前記蓄積記憶手段に書き込まれる前記パケットの前記一部のサイズを計測するサイズカウント手段を有し、
前記蓄積記憶書き込み制御手段は、前記サイズカウント手段によって計測された前記パケットの前記一部の前記サイズが、所定量より少ない場合には、パディングにより前記パケットの前記一部のサイズを所定量に揃える制御を行うことを特徴とする付記3記載の通信装置。
(Supplementary Note 9) The mirror output control means has size counting means for measuring the size of the part of the packet written to the accumulation storage means,
When the size of the part of the packet measured by the size counting unit is smaller than a predetermined amount, the storage / storage write control unit aligns the size of the part of the packet to a predetermined amount by padding. The communication apparatus according to appendix 3, wherein control is performed.

(付記10) 前記ミラーパケットは、前記パケットに関する付加情報を有することを特徴とする付記1記載の通信装置。
(付記11) 前記付加情報は、前記パケットのサイズを示す情報を有することを特徴とする付記10記載の通信装置。
(Additional remark 10) The said mirror packet has additional information regarding the said packet, The communication apparatus of Additional remark 1 characterized by the above-mentioned.
(Additional remark 11) The said additional information has the information which shows the size of the said packet, The communication apparatus of Additional remark 10 characterized by the above-mentioned.

(付記12) 前記通信装置は、前記パケットが入力される入力手段を複数有し、
前記付加情報は、前記ミラー出力制御手段による前記ミラーパケットの出力が行われた前記パケットが、入力された前記入力手段を示す情報を有することを特徴とする付記10記載の通信装置。
(Additional remark 12) The said communication apparatus has two or more input means into which the said packet is input,
11. The communication apparatus according to appendix 10, wherein the additional information includes information indicating the input unit to which the packet for which the mirror packet is output by the mirror output control unit is input.

(付記13) 前記通信装置は、前記パケットが出力される出力手段を複数有し、
前記付加情報は、前記ミラー出力制御手段による前記ミラーパケットの出力が行われた前記パケットが出力される前記出力手段を示す情報を有することを特徴とする付記10記載の通信装置。
(Additional remark 13) The said communication apparatus has multiple output means to which the said packet is output,
11. The communication apparatus according to appendix 10, wherein the additional information includes information indicating the output unit that outputs the packet on which the mirror packet is output by the mirror output control unit.

(付記14) 前記通信装置は、前記パケットが入力される入力手段を複数有し、
前記ミラー出力制御手段は、複数の前記入力手段のうちの所定の前記入力手段に入力された前記パケットの前記ミラーパケットを出力する制御を行うことを特徴とする付記1記載の通信装置。
(Additional remark 14) The said communication apparatus has two or more input means into which the said packet is input,
The communication apparatus according to claim 1, wherein the mirror output control unit performs control to output the mirror packet of the packet input to the predetermined input unit among the plurality of input units.

(付記15) 前記ミラー出力制御手段は、前記パケットを出力する出力手段から出力される前記パケットの前記ミラーパケットを出力する制御を行うことを特徴とする付記1記載の通信装置。   (Additional remark 15) The said mirror output control means performs control which outputs the said mirror packet of the said packet output from the output means which outputs the said packet, The communication apparatus of Additional remark 1 characterized by the above-mentioned.

(付記16) 前記ミラー出力制御手段は、前記ミラーパケットに前記ミラーパケットのエラーを検出するためのエラー検出情報を付加するエラー情報付加手段を有することを特徴とする付記1記載の通信装置。   (Supplementary note 16) The communication apparatus according to supplementary note 1, wherein the mirror output control means includes error information addition means for adding error detection information for detecting an error of the mirror packet to the mirror packet.

(付記17) 前記通信装置は、レイヤ2スイッチであることを特徴とする付記1記載の通信装置。
(付記18) 前記通信装置は、ルータであることを特徴とする付記1記載の通信装置。
(Additional remark 17) The said communication apparatus is a layer 2 switch, The communication apparatus of Additional remark 1 characterized by the above-mentioned.
(Supplementary note 18) The communication device according to supplementary note 1, wherein the communication device is a router.

(付記19) ネットワークのトラフィックを監視する通信方法において、
入力制御手段が、通信装置によって受信されたパケットの入力を制御する入力制御ステップと、
ミラー出力制御手段が、受信された前記パケットに基づくミラーパケットの出力を制御するミラー出力制御ステップと、
を有し、
前記入力制御ステップでは、前記入力制御手段が、受信された前記パケットを一時的に記憶する一時記憶手段に書き込む制御を行い、
前記ミラー出力制御ステップでは、前記ミラー出力制御手段が、前記一時記憶手段に書き込まれた前記パケットの一部のみを抽出し、抽出した前記パケットの前記一部を有する前記ミラーパケットを出力する制御を行うことを特徴とする通信方法。
(Supplementary note 19) In a communication method for monitoring network traffic,
An input control step in which an input control means controls input of a packet received by the communication device;
A mirror output control means for controlling output of a mirror packet based on the received packet;
Have
In the input control step, the input control unit performs control to write the received packet in a temporary storage unit that temporarily stores the packet,
In the mirror output control step, the mirror output control means extracts only a part of the packet written in the temporary storage means, and outputs the mirror packet having the part of the extracted packet. The communication method characterized by performing.

本実施の形態の概要を示す図である。It is a figure which shows the outline | summary of this Embodiment. 通信システムの全体構成を示す図である。It is a figure which shows the whole structure of a communication system. スイッチのハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of a switch. パケットのデータ構造例を示す図である。It is a figure which shows the data structure example of a packet. 第1の実施の形態におけるスイッチの構成を示すブロック図である。It is a block diagram which shows the structure of the switch in 1st Embodiment. 第1の実施の形態における入力制御部の構成を示すブロック図である。It is a block diagram which shows the structure of the input control part in 1st Embodiment. 第1の実施の形態におけるミラー出力制御部の構成を示すブロック図である。It is a block diagram which shows the structure of the mirror output control part in 1st Embodiment. 第1の実施の形態におけるスイッチの動作を示す図である。It is a figure which shows the operation | movement of the switch in 1st Embodiment. 第1の実施の形態における入力制御処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the input control process in 1st Embodiment. 第1の実施の形態におけるミラー出力制御処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the mirror output control process in 1st Embodiment. 第2の実施の形態におけるミラー出力制御部の構成を示すブロック図である。It is a block diagram which shows the structure of the mirror output control part in 2nd Embodiment. 第2の実施の形態におけるスイッチの動作を示す図である。It is a figure which shows operation | movement of the switch in 2nd Embodiment. 第2の実施の形態におけるミラーパケットのデータ構造例を示す図である。It is a figure which shows the example of a data structure of the mirror packet in 2nd Embodiment. 第2の実施の形態におけるミラーパケットのデータ構造例を示す図である。It is a figure which shows the example of a data structure of the mirror packet in 2nd Embodiment. 第2の実施の形態におけるミラー出力制御処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the mirror output control process in 2nd Embodiment. 第2の実施の形態におけるミラー出力制御処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the mirror output control process in 2nd Embodiment. 第3の実施の形態における入力制御処理の構成を示すブロック図である。It is a block diagram which shows the structure of the input control process in 3rd Embodiment. 第3の実施の形態におけるミラー出力制御部の構成を示すブロック図である。It is a block diagram which shows the structure of the mirror output control part in 3rd Embodiment. 第3の実施の形態におけるミラーパケットのデータ構造例を示す図である。It is a figure which shows the data structure example of the mirror packet in 3rd Embodiment. 第3の実施の形態におけるミラー出力制御処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the mirror output control process in 3rd Embodiment. 第3の実施の形態におけるミラー出力制御処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the mirror output control process in 3rd Embodiment. 第3の実施の形態におけるミラー出力制御処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the mirror output control process in 3rd Embodiment. 第4の実施の形態におけるスイッチの構成を示すブロック図である。It is a block diagram which shows the structure of the switch in 4th Embodiment. 第4の実施の形態におけるスイッチの動作を示す図である。It is a figure which shows the operation | movement of the switch in 4th Embodiment. 第4の実施の形態におけるスイッチの動作を示す図である。It is a figure which shows the operation | movement of the switch in 4th Embodiment.

符号の説明Explanation of symbols

1 通信装置
1a 入力制御手段
1b 一次記憶手段
1c 出力制御手段
1d ミラー出力制御手段
DESCRIPTION OF SYMBOLS 1 Communication apparatus 1a Input control means 1b Primary storage means 1c Output control means 1d Mirror output control means

Claims (6)

ネットワークのトラフィックを監視する通信装置において、
前記通信装置によって受信されたパケットの入力を制御する入力制御手段と、
受信された前記パケットを一時的に記憶する一時記憶手段と、
受信された前記パケットの出力を制御する出力制御手段と、
受信された前記パケットに基づくミラーパケットの出力を制御するミラー出力制御手段と、
を有し、
前記入力制御手段は、受信された前記パケットを前記一時記憶手段に書き込む制御を行い、
前記ミラー出力制御手段は、前記一時記憶手段に書き込まれた前記パケットの一部のみを抽出し、抽出した前記パケットの前記一部を有する前記ミラーパケットを出力する制御を行うことを特徴とする通信装置。
In a communication device that monitors network traffic,
Input control means for controlling input of a packet received by the communication device;
Temporary storage means for temporarily storing the received packet;
Output control means for controlling the output of the received packet;
Mirror output control means for controlling output of a mirror packet based on the received packet;
Have
The input control means performs control to write the received packet to the temporary storage means,
The communication is characterized in that the mirror output control means extracts only a part of the packet written in the temporary storage means and outputs the mirror packet having the part of the extracted packet. apparatus.
前記ミラー出力制御手段は、前記パケットから前記一部としてヘッダ部を抽出する制御を行うことを特徴とする請求項1記載の通信装置。   The communication apparatus according to claim 1, wherein the mirror output control unit performs control to extract a header part as the part from the packet. 前記ミラー出力制御手段は、
前記パケットから抽出された前記一部を記憶する蓄積記憶手段と、
前記一時記憶手段に記憶されている前記パケットを読み出し、読み出した前記パケットから前記一部を抽出し、抽出した前記パケットの前記一部を前記蓄積記憶手段に書き込む制御を行う一時記憶読み出し制御手段と、
前記蓄積記憶手段に書き込まれた前記パケットの前記一部を読み出し、読み出した前記パケットの前記一部を複数個結合して前記ミラーパケットに含め、結合された前記一部を有する前記ミラーパケットを出力する制御を行う蓄積記憶読み出し制御手段と、
を有することを特徴とする請求項1記載の通信装置。
The mirror output control means includes
Accumulation storage means for storing the part extracted from the packet;
Temporary storage read control means for reading out the packet stored in the temporary storage means, extracting the part from the read packet, and writing the extracted part of the packet into the accumulation storage means; ,
Read out the part of the packet written in the storage and storage means, combine a plurality of the part of the read out packet into the mirror packet, and output the mirror packet having the combined part Storage storage read control means for performing control,
The communication apparatus according to claim 1, further comprising:
前記ミラー出力制御手段は、経過時間を計測するタイマ手段を有し、
前記蓄積記憶読み出し制御手段は、前記タイマ手段による計測の結果、所定時間が経過する毎に、前記パケットから抽出された前記一部を複数個結合し、前記結合した前記一部を有する前記ミラーパケットを出力する制御を行うことを特徴とする請求項3記載の通信装置。
The mirror output control means has timer means for measuring elapsed time,
The accumulated storage read control unit combines the plurality of parts extracted from the packet every time a predetermined time has passed as a result of the measurement by the timer unit, and the mirror packet having the combined part The communication apparatus according to claim 3, wherein control for outputting is performed.
前記ミラー出力制御手段は、前記蓄積記憶手段に書き込まれた前記パケットの前記一部を計数する蓄積数カウント手段を有し、
前記蓄積記憶読み出し制御手段は、前記蓄積数カウント手段による計数の結果、前記パケットの前記一部の個数が所定個数に達する毎に、前記パケットから抽出された前記一部を複数個結合し、前記結合した前記一部を有する前記ミラーパケットを出力する制御を行うことを特徴とする請求項3記載の通信装置。
The mirror output control means has accumulation number counting means for counting the part of the packets written in the accumulation storage means,
The accumulation storage read control unit combines a plurality of the parts extracted from the packet every time the number of the part of the packet reaches a predetermined number as a result of counting by the accumulation number counting unit, The communication apparatus according to claim 3, wherein control is performed to output the mirror packet having the part combined.
ネットワークのトラフィックを監視する通信方法において、
入力制御手段が、通信装置によって受信されたパケットの入力を制御する入力制御ステップと、
ミラー出力制御手段が、受信された前記パケットに基づくミラーパケットの出力を制御するミラー出力制御ステップと、
を有し、
前記入力制御ステップでは、前記入力制御手段が、受信された前記パケットを一時的に記憶する一時記憶手段に書き込む制御を行い、
前記ミラー出力制御ステップでは、前記ミラー出力制御手段が、前記一時記憶手段に書き込まれた前記パケットの一部のみを抽出し、抽出した前記パケットの前記一部を有する前記ミラーパケットを出力する制御を行うことを特徴とする通信方法。
In a communication method for monitoring network traffic,
An input control step in which an input control means controls input of a packet received by the communication device;
A mirror output control means for controlling output of a mirror packet based on the received packet;
Have
In the input control step, the input control unit performs control to write the received packet in a temporary storage unit that temporarily stores the packet,
In the mirror output control step, the mirror output control means extracts only a part of the packet written in the temporary storage means, and outputs the mirror packet having the part of the extracted packet. The communication method characterized by performing.
JP2008171348A 2008-06-30 2008-06-30 Communication apparatus and communication method Expired - Fee Related JP5256886B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008171348A JP5256886B2 (en) 2008-06-30 2008-06-30 Communication apparatus and communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008171348A JP5256886B2 (en) 2008-06-30 2008-06-30 Communication apparatus and communication method

Publications (2)

Publication Number Publication Date
JP2010011382A true JP2010011382A (en) 2010-01-14
JP5256886B2 JP5256886B2 (en) 2013-08-07

Family

ID=41591265

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008171348A Expired - Fee Related JP5256886B2 (en) 2008-06-30 2008-06-30 Communication apparatus and communication method

Country Status (1)

Country Link
JP (1) JP5256886B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020095692A1 (en) * 2018-11-09 2020-05-14 株式会社インテリジェントウェイブ Packet flow monitoring device, packet data extraction device, extracted data aggregating device, and program
EP3879766A4 (en) * 2018-11-09 2022-07-27 Intelligent Wave Inc. Packet flow monitoring device, packet data extraction device, extracted data aggregating device, and program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000165392A (en) * 1998-11-25 2000-06-16 Matsushita Electric Ind Co Ltd Atm communication method and atm communication unit
JP2000312206A (en) * 1999-02-26 2000-11-07 Hitachi Ltd Exchange method, exchange, and switching network
JP2003087255A (en) * 2001-09-06 2003-03-20 Kddi Corp Packet information collector and its method
JP2007074383A (en) * 2005-09-07 2007-03-22 Yokogawa Electric Corp Information system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000165392A (en) * 1998-11-25 2000-06-16 Matsushita Electric Ind Co Ltd Atm communication method and atm communication unit
JP2000312206A (en) * 1999-02-26 2000-11-07 Hitachi Ltd Exchange method, exchange, and switching network
JP2003087255A (en) * 2001-09-06 2003-03-20 Kddi Corp Packet information collector and its method
JP2007074383A (en) * 2005-09-07 2007-03-22 Yokogawa Electric Corp Information system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020095692A1 (en) * 2018-11-09 2020-05-14 株式会社インテリジェントウェイブ Packet flow monitoring device, packet data extraction device, extracted data aggregating device, and program
EP3879766A4 (en) * 2018-11-09 2022-07-27 Intelligent Wave Inc. Packet flow monitoring device, packet data extraction device, extracted data aggregating device, and program
US11528202B2 (en) 2018-11-09 2022-12-13 Intelligent Wave Inc Packet flow monitoring device, packet data extraction device, extraction data aggregation device, and program
JP7348797B2 (en) 2018-11-09 2023-09-21 日本放送協会 Packet flow monitoring device

Also Published As

Publication number Publication date
JP5256886B2 (en) 2013-08-07

Similar Documents

Publication Publication Date Title
US5568471A (en) System and method for a workstation monitoring and control of multiple networks having different protocols
US9384085B2 (en) Method, device, and system for monitoring quickpath interconnect link
US8560894B2 (en) Apparatus and method for status decision
US6697870B1 (en) Method and apparatus for real-time protocol analysis using an auto-throttling front end process
US20090010254A1 (en) Packet transfer apparatus and packet transfer method
US20080219173A1 (en) Network test apparatus, network test method and network test program
US7924863B2 (en) Device and method for processing data chunks
WO2012127894A1 (en) Network system, and switching method
US20120287809A1 (en) Method and system for measuring network convergence time
US8571032B2 (en) Testing packet fragmentation
JPH04263536A (en) Apparatus and system for monitoring of network
EP3497886B1 (en) Localizing network faults through differential analysis of tcp telemetry
EP2899645A1 (en) Parallel computer, node device, and method for controlling parallel computer
JP2010088031A (en) Fault detection method of underlay network, and network system
US8918502B2 (en) FlowSense: light-weight networking sensing with openflow
WO2021034428A2 (en) Real-time network-wide link latency monitoring with in-network int sampling and aggregation
JP5256886B2 (en) Communication apparatus and communication method
JP4946909B2 (en) Frame monitoring apparatus and frame monitoring method
US20120120820A1 (en) Testing Fragment Reassembly
JP2007208502A (en) Communication system, backup router, redundant processing program thereof, and redundant processing method thereof
EP3481012A1 (en) Server, switch, communication system, communication method, and recording medium
CN109412968B (en) Redundant communication receiving management system and method for time-triggered Ethernet end node
JP2008244635A (en) System, method, and program for monitoring network, and collecting device
EP2541839A1 (en) Method of determining immediate topology of a network connection
US7680142B1 (en) Communications chip having a plurality of logic analysers

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110315

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120704

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120710

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120827

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120918

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121116

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20121211

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130220

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20130228

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130326

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130408

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160502

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees