JP2009081816A - Packet-repeating system - Google Patents

Packet-repeating system

Info

Publication number
JP2009081816A
JP2009081816A JP2007251393A JP2007251393A JP2009081816A JP 2009081816 A JP2009081816 A JP 2009081816A JP 2007251393 A JP2007251393 A JP 2007251393A JP 2007251393 A JP2007251393 A JP 2007251393A JP 2009081816 A JP2009081816 A JP 2009081816A
Authority
JP
Japan
Prior art keywords
register
unit
packet
statistical
register number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007251393A
Other languages
Japanese (ja)
Inventor
Maki Amano
真樹 天野
Hiroshi Takeuchi
弘 武内
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2007251393A priority Critical patent/JP2009081816A/en
Publication of JP2009081816A publication Critical patent/JP2009081816A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a packet-repeating system for accurately counting the quantity of incoming packets for each classification, while effectively utilizing the hardware resources. <P>SOLUTION: A packet-repeating system includes an identifier acquisition part for extracting and acquiring a communication network identifier included in a packet each time a packet comes in; a register management table for storing the communications network identifier by associating it with any one of a plurality of register numbers; a statistical register part configured of a plurality of registers, with which unique register numbers are associated; and a management part for acquiring the register number associated with the communication identifier extracted and acquired by the identifier acquisition part from the register management table, and for issuing a count instruction accompanied with the register number. The statistical register part adds (increments) the count value shown by the register corresponding to the register number, whenever receiving the counter instruction accompanied with the register number. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は通信ネットワーク上でパケットを中継するパケット中継装置に関する。   The present invention relates to a packet relay device that relays a packet on a communication network.

近年、インターネット利用者の増加や通信速度の高速化に伴い、通信ネットワーク上に配置されるパケット中継装置が中継すべきパケット数が大幅に増加している。また、通信ネットワークを介してなされるウイルス等による攻撃から通信端末を防御するためのセキュリティ機能の強化が重要視されるようになっている。これに応じて、通信ネットワークから到来したパケットの種別を識別するなどのパケット監視が一般に行われているが、監視すべきパケットの種別及び数の大幅な増加に伴い、監視によって得られた統計データの種類及び数も増大している。具体的には、パケット種別毎にパケット数をカウントする統計カウンタの数量及び個々の統計カウンタのビット数を大きくする必要が生じている。   In recent years, as the number of Internet users increases and the communication speed increases, the number of packets to be relayed by a packet relay device arranged on a communication network has greatly increased. In addition, strengthening of security functions for protecting communication terminals from attacks caused by viruses and the like made via communication networks is regarded as important. In response to this, packet monitoring such as identifying the type of packet coming from the communication network is generally performed, but statistical data obtained by monitoring with a significant increase in the type and number of packets to be monitored The types and numbers of these are also increasing. Specifically, it is necessary to increase the number of statistical counters that count the number of packets for each packet type and the number of bits of each statistical counter.

一般に、物理LAN(Local Area Network)ポートには仮想的に分割された4096個のVLAN(Virtual LAN)ポートが存在する。この場合、例えば物理LANポートが10ポートあるとすれば、VLANポートの数は4096×10=40960ポートとなる。これらの全ポートに対して、例えば32ビットの統計カウンタを具備した場合、40960×32=1310720ものビット数が必要となる。   In general, there are 4096 VLAN (Virtual LAN) ports virtually divided into physical LAN (Local Area Network) ports. In this case, for example, if there are 10 physical LAN ports, the number of VLAN ports is 4096 × 10 = 40960 ports. For example, when a 32-bit statistical counter is provided for all these ports, 40960 × 32 = 1310720 bits are required.

通信ネットワークの帯域管理や提供サービスの課金管理などに用いられる統計カウンタの他、障害調査のための冗長の統計カウンタを更に具備する場合もあるため、必要とされる統計カウンタの数量は増加傾向にある。また、通信速度の高速化による転送レートの上昇に伴い、単位時間当たりに計測すべきパケット数が増加するため、1つの統計カウンタに必要とされるビット数も増加している。このような事情から、近年ではハードウェアに要求されるレジスタビット数が増加すると共に消費電力も増加している。   In addition to statistical counters used for bandwidth management of communication networks and billing management of provided services, redundant statistical counters for investigating failures may be further provided, so the number of required statistical counters tends to increase. is there. In addition, as the transfer rate increases due to an increase in communication speed, the number of packets to be measured per unit time increases, so the number of bits required for one statistical counter also increases. For these reasons, in recent years, the number of register bits required for hardware has increased and the power consumption has also increased.

例えば、特許文献1には、第1計数許可信号に応じて計数処理を行って得られた複数ビットの計数結果をアドレスの下位部分として出力すると共に桁上がり信号を出力する第1計数手段、当該桁上がり信号及び第2計数許可信号のいずれか一方に応じて計数処理を行って得られた1ビットの計数結果を上位アドレスとして出力すると共に桁上がり信号を出力する複数の第2計数手段、最終段の第2計数手段からの桁上がり信号に応じて計数処理を行って得られた複数ビットの計数結果をアドレスの上位部分として出力する第3計数手段、選択指示の入力に応じて複数の第2計数手段のいずれかを選択して当該選択された第2計数手段に第2計数許可信号を与える選択手段などを備えたアドレスカウンタが開示されている。当該カウンタによれば、選択指示により選択された第2計数手段に対応するアドレスのビットよりも上位の部分が下位部分とは独立に計数されるため、ビット数を可変とすることが可能であるとしている。   For example, Patent Document 1 discloses a first counting unit that outputs a counting result of a plurality of bits obtained by performing a counting process according to a first counting permission signal as a lower part of an address and outputs a carry signal, A plurality of second counting means for outputting a 1-bit counting result obtained by performing a counting process in accordance with either the carry signal or the second count permission signal as an upper address and outputting a carry signal; Third counting means for outputting a counting result of a plurality of bits obtained by performing counting processing according to the carry signal from the second counting means of the stage as an upper part of the address; a plurality of second counting means according to the input of the selection instruction An address counter including a selection unit that selects any one of the two counting units and gives a second count permission signal to the selected second counting unit is disclosed. According to the counter, since the upper part of the bits of the address corresponding to the second counting means selected by the selection instruction is counted independently of the lower part, the number of bits can be made variable. It is said.

また、特許文献2には、各々が計数結果を出力すると共にキャリー信号を出力する複数の単位カウンタからなるカウンタ回路と、当該複数の単位カウンタの内の1つと対を成し、前段の単位カウンタからのキャリー信号及び電源レベルのいずれか一方を有効設定するスタートビット選択信号と当該単位カウンタの計数動作の許可/禁止を指定するカウントイネーブル信号を対となる単位カウンタに与える複数のレジスタからなるレジスタ回路と、カウンタ及びレジスタ回路の各々の入力端子に接続されるデータバスを備えた計数回路が開示されている。当該計数回路によれば、スタートビット選択信号及びカウントイネーブル信号の供給により、カウンタ回路を、各々が1つ以上の単位カウンタからなる任意ビット長の複数の独立カウンタに分割することができるため、ユーザの要求に柔軟に対応してハードウェア資源を効率的に活用できるとしている。
特開平4−227582号公報 特開平8−237112号公報
Further, in Patent Document 2, a counter circuit composed of a plurality of unit counters each outputting a count result and a carry signal is paired with one of the plurality of unit counters. A register comprising a plurality of registers for providing a pair of unit counters with a start bit selection signal for validly setting one of the carry signal and the power supply level from and a count enable signal for designating permission / prohibition of the counting operation of the unit counter A counting circuit having a circuit and a data bus connected to each input terminal of the counter and register circuit is disclosed. According to the counting circuit, by supplying the start bit selection signal and the count enable signal, the counter circuit can be divided into a plurality of independent counters each having an arbitrary bit length composed of one or more unit counters. It is said that hardware resources can be used efficiently by flexibly responding to the demands of the company.
JP-A-4-227582 JP-A-8-237112

しかしながら、特許文献1及び2に開示される発明は、カウンタのビット数を可変とすることによりハードウェアリソースを有効活用しようとするものではあるものの、これらをパケットの監視に適用した場合には以下のような問題が生じる。すなわち、予め設定したカウンタのビット数が実際にパケット中継装置に到来するパケットの数量に適合していない場合、若しくはカウンタのビット設定後にパケットの到来数が大幅に変化した場合には、カウンタのオーバーフローが発生し、正確な統計情報を収集できなくなるという問題があった。また、カウンタに設定されるパケット種別が実際にパケット中継装置に到来するパケットの種別に適合していない場合、カウンタが全くカウントアップせず、その結果、ハードウェアリソースを無駄にしてしまうという問題があった。   However, the inventions disclosed in Patent Documents 1 and 2 are intended to effectively utilize hardware resources by making the number of bits of the counter variable, but when these are applied to packet monitoring, The following problems arise. In other words, if the preset number of bits in the counter does not match the number of packets actually arriving at the packet relay device, or if the number of incoming packets changes significantly after setting the counter bits, the counter overflows Occurred, and there was a problem that accurate statistical information could not be collected. In addition, if the packet type set in the counter does not match the type of packet that actually arrives at the packet relay device, the counter does not count up at all, resulting in wasted hardware resources. there were.

このように特許文献1及び2に開示される発明の如きカウンタのビット数制御のみでは、パケット中継装置においてハードウェアリソースを有効活用しつつ到来するパケットの数量をその種別毎に正確にカウントすることができなかった。本発明は上記した如き問題点に鑑みてなされたものであって、ハードウェアリソースを有効活用しつつ到来するパケットの数量をその種別毎に正確にカウントできるパケット中継装置を提供することを目的とする。   As described above, only the control of the number of bits of the counter as in the inventions disclosed in Patent Documents 1 and 2 can accurately count the number of incoming packets for each type while effectively using hardware resources in the packet relay apparatus. I could not. The present invention has been made in view of the above-described problems, and an object thereof is to provide a packet relay device that can accurately count the number of packets that arrive while making effective use of hardware resources for each type. To do.

本発明によるパケット中継装置は、通信網を介してパケットを受信する受信部と、前記受信部が受信したパケットを他の通信網へ送信する送信部と、を含むパケット中継装置であって、前記受信部が前記パケットを受信する毎に当該パケットに含まれている通信網識別子を抽出取得する識別子取得部と、前記識別子取得部が抽出取得した通信網識別子を複数のレジスタ番号の内のいずれか1つに対応付けて記憶するレジスタ管理テーブルと、各々が固有のレジスタ番号を対応付けられている複数のレジスタからなる統計レジスタ部と、前記識別子取得部が抽出取得した通信網識別子に対応付けられているレジスタ番号を前記レジスタ管理テーブルから取得して当該レジスタ番号を伴うカウント指示を発する管理部と、を含み、前記統計レジスタ部は、前記レジスタ番号を伴うカウント指示を受け取る毎に当該レジスタ番号に対応するレジスタが表すカウント値を加算してパケット受信総数を得ることを特徴とする。   A packet relay device according to the present invention is a packet relay device including a reception unit that receives a packet via a communication network, and a transmission unit that transmits the packet received by the reception unit to another communication network, An identifier acquisition unit that extracts and acquires a communication network identifier included in the packet every time the reception unit receives the packet, and the communication network identifier extracted and acquired by the identifier acquisition unit is one of a plurality of register numbers A register management table stored in association with each other, a statistical register unit composed of a plurality of registers each associated with a unique register number, and a communication network identifier extracted and acquired by the identifier acquisition unit A management unit that obtains a register number from the register management table and issues a count instruction with the register number. Parts is characterized by obtaining a packet received total by adding the count value represented by the corresponding register to the register number for each receive count instruction with the register number.

以下、本発明に係る実施例について添付の図面を参照しつつ詳細に説明する。
<第1の実施例>
図1は本発明によるパケット中継装置1を表すブロック図である。パケット中継装置1は、受信したパケットに含まれているヘッダ内のアドレス情報に基づいて転送先に向けて当該パケットを送信する機能を有する、例えばルータなどのパケット中継装置である。パケット中継装置1は、送受信部100と、PHY処理部200と、L2処理部300と、プロセッサ400と、記憶部500と、PHY/MAC処理部600と、送受信部700と、を含む。ここでは、送受信部100はLAN(Local Area Network)に接続され、送受信部700はWAN(Wide Area Network)に接続されているものとする。
Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings.
<First embodiment>
FIG. 1 is a block diagram showing a packet relay device 1 according to the present invention. The packet relay apparatus 1 is a packet relay apparatus such as a router having a function of transmitting the packet to a transfer destination based on address information in a header included in the received packet. The packet relay device 1 includes a transmission / reception unit 100, a PHY processing unit 200, an L2 processing unit 300, a processor 400, a storage unit 500, a PHY / MAC processing unit 600, and a transmission / reception unit 700. Here, it is assumed that the transmission / reception unit 100 is connected to a LAN (Local Area Network) and the transmission / reception unit 700 is connected to a WAN (Wide Area Network).

送受信部100は、LAN側の物理ポートであり、図示せぬLANに接続されている。送受信部100は、LANから到来したパケットをPHY処理部200に与える。   The transmission / reception unit 100 is a physical port on the LAN side, and is connected to a LAN (not shown). The transmission / reception unit 100 gives a packet received from the LAN to the PHY processing unit 200.

PHY(Physical layer)処理部200は、送受信部100及びL2処理部300からのパケットに対して、OSI(Open Systems Interconnection)参照モデルの第1層に当たる物理層(Physical layer)における通常の処理(例えば、信号の電気的な変換など)を施す機能を有する。PHY処理部200は、送受信部100から受信したパケットに当該処理を施して、これをL2処理部300に与える。   A PHY (Physical layer) processing unit 200 performs normal processing (for example, a physical layer) corresponding to a first layer of an OSI (Open Systems Interconnection) reference model on packets from the transmission / reception unit 100 and the L2 processing unit 300 (for example, , Electrical conversion of signals, etc.). The PHY processing unit 200 performs the process on the packet received from the transmission / reception unit 100 and supplies the packet to the L2 processing unit 300.

L2(Layer2)処理部300は、パケット受信数計数部310と、中継処理部320と、を含む。なお、パケット受信数計数部310の詳細については後述する。   The L2 (Layer 2) processing unit 300 includes a packet reception number counting unit 310 and a relay processing unit 320. Details of the packet reception number counting unit 310 will be described later.

中継処理部320は、PHY処理部200からのパケットに対して、OSI参照モデルのデータリンク層(第2層:Layer2)の下位副層に当たるMAC(Media Access control:メディアアクセス制御)層における通常の処理を施す機能、当該パケットのヘッダに含まれている情報に基づいてLAN側ノード間の通信ルーティング処理をなす機能、及び、MACアドレスの登録により接続を制御するMACフィルタリング処理をなす機能などを備えている。中継処理部320は、WAN側へ中継すべきパケットをプロセッサ400に与える。   The relay processing unit 320 performs normal processing in the MAC (Media Access Control) layer corresponding to the lower sublayer of the data link layer (Layer 2) of the OSI reference model for the packet from the PHY processing unit 200. A function for performing processing, a function for performing communication routing processing between nodes on the LAN side based on information included in the header of the packet, and a function for performing MAC filtering processing for controlling connection by registering a MAC address ing. The relay processing unit 320 provides the processor 400 with a packet to be relayed to the WAN side.

プロセッサ400は、記憶部500から読み出した処理プログラムを実行することにより、中継処理部320及びPHY/MAC処理部600からのパケットに対して、例えばパケットフィルタリング処理、アドレス/ポート変換処理、ルーティング処理及びポートフォワーディング(転送)処理などの所定の処理を施す機能を有する。プロセッサ400は、パケットにこれら所定の処理を施して、WAN側へ中継すべきパケットをPHY/MAC処理部600に与え、LAN側へ中継すべきパケットを中継処理部320に与える。   The processor 400 executes, for example, the processing program read from the storage unit 500, for example, packet filtering processing, address / port conversion processing, routing processing, and the like for packets from the relay processing unit 320 and the PHY / MAC processing unit 600. It has a function of performing predetermined processing such as port forwarding (transfer) processing. The processor 400 performs these predetermined processes on the packet, gives a packet to be relayed to the WAN side to the PHY / MAC processing unit 600, and gives a packet to be relayed to the LAN side to the relay processing unit 320.

記憶部500は、処理プログラムや各種の処理に必要なデータなどを記憶するメモリであり、例えばRAM(Random Access Memory)やROM(Read Only Memory)などである。   The storage unit 500 is a memory that stores a processing program, data necessary for various processes, and the like, and is, for example, a RAM (Random Access Memory) or a ROM (Read Only Memory).

PHY/MAC処理部600は、プロセッサ400及び送受信部700からのパケットに対して、物理層及びMAC層における通常の処理を施す機能を有する。PHY/MAC処理部600は、パケットにこれらの処理を施して、WAN側へ中継すべきパケットを送受信部700に与える。   The PHY / MAC processing unit 600 has a function of performing normal processing in the physical layer and the MAC layer on packets from the processor 400 and the transmission / reception unit 700. The PHY / MAC processing unit 600 performs these processes on the packet and gives the packet to be relayed to the WAN side to the transmission / reception unit 700.

送受信部700は、WAN側の物理ポートであり、図示せぬWANに接続されている。送受信部700は、PHY/MAC処理部600からのパケットをWANへ送信し、また、WLANから到来したパケットをPHY/MAC処理部600に与える。   The transmission / reception unit 700 is a WAN-side physical port and is connected to a WAN (not shown). The transmission / reception unit 700 transmits the packet from the PHY / MAC processing unit 600 to the WAN, and provides the PHY / MAC processing unit 600 with the packet that has arrived from the WLAN.

以下、パケット受信数計数部310パケットについて説明する。パケット受信数計数部310は、通信網識別子取得部311と、管理部312と、レジスタ管理テーブル313と、統計レジスタ部314と、を含む。   Hereinafter, the packet reception number counting unit 310 packet will be described. The packet reception number counting unit 310 includes a communication network identifier acquisition unit 311, a management unit 312, a register management table 313, and a statistical register unit 314.

通信網識別子取得部311は、送受信部100がパケットを受信する毎に、すなわち、PHY処理部200からパケットを受け取る毎に、当該パケットに対してIEEE802.1Qに規定されているVLANタグヘッダ内のVLAN番号(以下、VIDと称する)を抽出取得して、これを管理部312に与える。通常、LAN側の物理ポートである送受信部100には、仮想的に分割された4096個のVLANポートが存在しており、これらのVLANの各々には固有の通信網識別子、すなわち、VIDが対応付けられている。   Each time the transmission / reception unit 100 receives a packet, that is, every time a packet is received from the PHY processing unit 200, the communication network identifier acquisition unit 311 receives a VLAN in the VLAN tag header defined in IEEE 802.1Q for the packet. A number (hereinafter referred to as VID) is extracted and acquired and given to the management unit 312. Usually, the transmission / reception unit 100, which is a physical port on the LAN side, has 4096 VLAN ports virtually divided, and each of these VLANs has a unique communication network identifier, that is, a VID. It is attached.

管理部312は、通信網識別子取得部311からVIDを受け取り、当該VIDがレジスタ管理テーブル313に既に登録されているか否かを判別し、未登録であれば当該VIDを複数のレジスタ番号の何れかに対応付けてレジスタ管理テーブル313に記憶せしめる。通常、管理部312は、レジスタ番号の順にVIDを順次、登録していく。また、管理部312は、通信網識別子取得部311から受け取ったVIDが既にレジスタ管理テーブル313に登録されていると判別したら、当該VIDに対応するレジスタ番号をレジスタ管理テーブル313から取得し、当該レジスタ番号を伴うカウント指示を統計レジスタ部314に与える。   The management unit 312 receives the VID from the communication network identifier acquisition unit 311, determines whether the VID is already registered in the register management table 313, and if it is not registered, the VID is one of a plurality of register numbers. And stored in the register management table 313. Normally, the management unit 312 sequentially registers VIDs in the order of register numbers. If the management unit 312 determines that the VID received from the communication network identifier acquisition unit 311 is already registered in the register management table 313, the management unit 312 acquires the register number corresponding to the VID from the register management table 313, and A count instruction with a number is given to the statistical register unit 314.

レジスタ管理テーブル313は、管理部312から与えられたVIDを複数のレジスタ番号の内のいずれか1つに対応付けて記憶自在な管理テーブルである。図2はレジスタ管理テーブルの一例を表す図である。同図中に示されるようにVID0、VID1、・・・VID2047がレジスタ番号0、1、2、・・・、7FFhにそれぞれ対応付けられて記憶されている。レジスタ管理テーブル313は、レジスタ番号をアドレスとし、VIDをエントリーデータとするCAM(Content Addressable Memory。連想メモリや内容参照可能メモリとも称される。)によって構成されていても良い。この場合、管理部312は通信網識別子取得部311から受け取ったVIDをレジスタ管理テーブル313に与えて検索する。当該VIDがレジスタ管理テーブル313に登録済みである場合には、管理部312は即時に当該VIDに対応するアドレス(レジスタ番号)の応答を受けることができる。   The register management table 313 is a management table that can be stored by associating a VID given from the management unit 312 with any one of a plurality of register numbers. FIG. 2 is a diagram illustrating an example of a register management table. As shown in the figure, VID0, VID1,... VID2047 are stored in association with register numbers 0, 1, 2,. The register management table 313 may be configured by a CAM (Content Addressable Memory, also referred to as an associative memory or a content referenceable memory) having a register number as an address and VID as entry data. In this case, the management unit 312 gives the VID received from the communication network identifier acquisition unit 311 to the register management table 313 and performs a search. When the VID is already registered in the register management table 313, the management unit 312 can immediately receive a response of an address (register number) corresponding to the VID.

統計レジスタ部314は、レジスタ315−0〜315−2047を含み、これらの各々に固有のレジスタ番号を対応付けるレジスタ番号割り当て手段を有する。ここでは、統計レジスタ部314は、初期設定としてレジスタ315−0、315−1、・・・、315−2047に、レジスタ番号0、1、・・・、2047をそれぞれ対応付けているものとする。図3はレジスタ315−0の構成を表す図である。同図中に示されるようにレジスタ315−0はBit0〜Bit32の32ビットのビット列により構成されている。レジスタ315−1〜315−2047の各々もレジスタ315−0と同様の構成である。統計レジスタ部314は、レジスタ315−0〜315−2047の各々を32桁の2進カウンタとして使用する。   The statistical register unit 314 includes registers 315-0 to 315-2047, and has a register number assigning unit that associates a unique register number with each of these registers. Here, it is assumed that the statistical register unit 314 associates register numbers 0, 1,..., 2047 with the registers 315-0, 315-1,. . FIG. 3 is a diagram illustrating the configuration of the register 315-0. As shown in the figure, the register 315-0 is composed of a 32-bit bit string of Bit0 to Bit32. Each of the registers 315-1 to 315-2047 has the same configuration as that of the register 315-0. The statistical register unit 314 uses each of the registers 315-0 to 315-2047 as a 32-digit binary counter.

統計レジスタ部314は、管理部312からレジスタ番号を伴うカウント指示を受け取る毎に、レジスタ315−0〜315−2047の内、当該レジスタ番号に対応するレジスタが表すカウント値を1つ加算(以下、インクリメントと称する)する。例えば、通信網識別子取得部311が受信パケットから抽出取得したVIDがVID0であった場合、管理部312は、図2に示されるレジスタ管理テーブル313からVID0に対応付けられているレジスタ番号0を取得し、レジスタ番号0を伴うカウント指示を統計レジスタ部314に与える。このとき、統計レジスタ部314は、レジスタ番号0に対応するレジスタ315−0が表すカウント値をインクリメントする。例えば、レジスタ315−0が表すカウント値が0であれば、統計レジスタ部314は、カウント指示に応じて、当該カウント値を1とする。この処理は送受信部100がパケットを受信する毎になされるため、レジスタ315−0はVID0をヘッダに含むパケットの受信総数をカウントすることになる。同様に、レジスタ315−1、315−2、・・・、315−2047はそれぞれ、VID1、VID2、・・・、VID2047をヘッダに含むパケットの受信総数をカウントする。   Each time the statistical register unit 314 receives a count instruction with a register number from the management unit 312, the statistical register unit 314 adds one count value represented by the register corresponding to the register number among the registers 315-0 to 315-2047 (hereinafter, (Referred to as increment). For example, when the VID extracted and acquired from the received packet by the communication network identifier acquisition unit 311 is VID0, the management unit 312 acquires the register number 0 associated with VID0 from the register management table 313 illustrated in FIG. Then, the count instruction with the register number 0 is given to the statistical register unit 314. At this time, the statistical register unit 314 increments the count value represented by the register 315-0 corresponding to the register number 0. For example, if the count value represented by the register 315-0 is 0, the statistical register unit 314 sets the count value to 1 in response to the count instruction. Since this process is performed every time the transmitting / receiving unit 100 receives a packet, the register 315-0 counts the total number of packets received that include VID0 in the header. Similarly, registers 315-1, 315-2,..., 315-2047 respectively count the total number of received packets that include VID1, VID2,.

図4はパケット受信数計数処理ルーチンを表すフローチャートである。以下、送受信部100における仮想的に分割されたVLANポートの各々が受信したパケットの受信総数をパケット受信数計数部310がVID毎に計数するパケット受信数計数処理について図4を参照しつつ説明する。   FIG. 4 is a flowchart showing a packet reception number counting processing routine. Hereinafter, a packet reception number counting process in which the packet reception number counting unit 310 counts the total number of packets received by each of the virtually divided VLAN ports in the transmission / reception unit 100 for each VID will be described with reference to FIG. .

送受信部100によって受信されたパケットは、PHY処理部200において物理層における通常の処理を施された後、L2処理部300に与えられる。   The packet received by the transmission / reception unit 100 is subjected to normal processing in the physical layer in the PHY processing unit 200 and then given to the L2 processing unit 300.

通信網識別子取得部311は、PHY処理部200からのパケットに含まれているVLANタグヘッダ内のVIDを抽出取得し(ステップS101)、これを管理部312に与える。   The communication network identifier acquisition unit 311 extracts and acquires the VID in the VLAN tag header included in the packet from the PHY processing unit 200 (step S101), and gives this to the management unit 312.

管理部312は、通信網識別子取得部311からのVIDがレジスタ管理テーブル313に既に登録されているか否かを判別する(S102)。管理部312は、当該VIDが未登録であると判別した場合に、これを複数のレジスタ番号の何れかに対応付けてレジスタ管理テーブル313に記憶せしめる(S103)。続いて、管理部312は、VIDに対応するレジスタ番号を伴うカウント指示を統計レジスタ部314に与える(S105)。例えば、管理部312は、VID3が未登録であると判別した場合、図2に示す如くこれをレジスタ番号3に対応付けて記憶せしめ、続いて、レジスタ番号3を伴うカウント指示を統計レジスタ部314に与える。   The management unit 312 determines whether or not the VID from the communication network identifier acquisition unit 311 is already registered in the register management table 313 (S102). When the management unit 312 determines that the VID is unregistered, the management unit 312 associates the VID with any one of the plurality of register numbers and stores it in the register management table 313 (S103). Subsequently, the management unit 312 gives a count instruction with a register number corresponding to the VID to the statistical register unit 314 (S105). For example, when the management unit 312 determines that VID3 is not registered, the management unit 312 stores this in association with the register number 3 as shown in FIG. To give.

管理部312は、通信網識別子取得部311からのVIDが既にレジスタ管理テーブル313に登録されていると判別した場合に、当該VIDに対応するレジスタ番号をレジスタ管理テーブル313から取得し(S104)、当該レジスタ番号を伴うカウント指示を統計レジスタ部314に与える(S105)。例えば、管理部312は、VID0が登録済であると判別した場合、図2に示す如くこれに対応付けられているレジスタ番号0を取得し、これを伴うカウント指示を統計レジスタ部314に与える。   When the management unit 312 determines that the VID from the communication network identifier acquisition unit 311 is already registered in the register management table 313, the management unit 312 acquires the register number corresponding to the VID from the register management table 313 (S104). A count instruction with the register number is given to the statistical register unit 314 (S105). For example, if the management unit 312 determines that VID0 has been registered, the management unit 312 acquires the register number 0 associated with the VID0 as illustrated in FIG.

統計レジスタ部314は、レジスタ番号を伴うカウント指示に応じて、レジスタ315−0〜315−2047の内、当該レジスタ番号に対応するレジスタが表すカウント値を1つインクリメントする(S106)。例えば、統計レジスタ部314は、レジスタ番号0を伴うカウント指示に応じて、レジスタ315−0が表すカウント値を1つインクリメントする。   In response to the count instruction with the register number, the statistical register unit 314 increments the count value represented by the register corresponding to the register number among the registers 315-0 to 315-2047 (S106). For example, the statistical register unit 314 increments the count value represented by the register 315-0 by one in response to the count instruction with the register number 0.

管理部312は、図示せぬ制御部からのカウント終了の指示があれば(S107)、これに応じて、統計レジスタ部314をしてレジスタ315−0〜315−2047の各々のカウント値をパケット受信総数として出力せしめる(S108)。カウント終了の指示がなければ、ステップS101からの処理を反復し、VID毎のパケット受信総数のカウントを継続する。   If there is an instruction to end counting from a control unit (not shown) (S107), the management unit 312 performs a statistical register unit 314 in response to the count value of each of the registers 315-0 to 315-2047. The total number of reception is output (S108). If there is no instruction to end counting, the processing from step S101 is repeated, and the count of the total number of received packets for each VID is continued.

上記した如く本実施例によるパケット中継装置によれば、受信したパケットに含まれているVLANタグヘッダ内のVIDを抽出取得し、当該VIDを複数のレジスタ番号の何れかに対応付けてレジスタ管理テーブルに記憶する。そのため、ユーザが予めカウント対象とすべきVIDを指定することなく、受信パケットに含まれているVIDに応じて、2048個のレジスタにVIDを動的に割り振って、VID毎にカウントすることができる。従来装置の如くユーザが予めカウント対象のVIDを各レジスタに割り振る装置の場合には、指定外のVIDを含むパケットが到来した場合に、当該パケットについては全くカウントされないという問題が発生してしまう。一方、本実施例によるパケット中継装置によれば、各レジスタにVIDを動的に割り振るため、このような問題は発生せず、VID毎に正確にパケット受信総数を計数可能であり、且つ、限られたハードウェアリソースである2048個のレジスタを有効に活用できる。
<第2の実施例>
第1の実施例と異なる部分について以下に詳述する。本実施例における統計レジスタ部314は、ビット列群分け手段と、レジスタ番号追加割り当て手段と、を更に含む。
As described above, according to the packet relay apparatus according to the present embodiment, the VID in the VLAN tag header included in the received packet is extracted and acquired, and the VID is associated with one of a plurality of register numbers in the register management table. Remember. Therefore, the VID can be dynamically allocated to 2048 registers according to the VID included in the received packet without counting the VID to be counted in advance by the user, and can be counted for each VID. . In the case of a device in which a user allocates a VID to be counted in advance to each register as in the conventional device, when a packet containing an undesignated VID arrives, there is a problem that the packet is not counted at all. On the other hand, according to the packet relay apparatus according to the present embodiment, since the VID is dynamically allocated to each register, such a problem does not occur, and the total number of received packets can be accurately counted for each VID. It is possible to effectively use 2048 registers, which are allocated hardware resources.
<Second Embodiment>
Different parts from the first embodiment will be described in detail below. The statistical register unit 314 in the present embodiment further includes bit string grouping means and register number additional assigning means.

統計レジスタ部314はビット列群分け手段により、レジスタ315−0〜315−2047の各々について、レジスタを構成するビット列を少なくとも2つのビット列に群分けして、各々が個別のカウント値を表す複数の群分けビット列を得る。   The statistical register unit 314 uses a bit string grouping unit to group the bit strings constituting the register into at least two bit strings for each of the registers 315-0 to 315-2047, and a plurality of groups each representing an individual count value. A divided bit string is obtained.

統計レジスタ部314はレジスタ番号追加割り当て手段により、当該群分けによって得られた群分けビット列の各々に対応するように、固有のレジスタ番号を当該群分け対象の統計レジスタに対応付ける。   The statistical register unit 314 associates a unique register number with the grouping-target statistical register so as to correspond to each grouping bit string obtained by the grouping, by using a register number additional assigning unit.

統計レジスタ部314は、合計2048個のレジスタ315−0〜315−2047を含んでいる。レジスタ315−0〜315−2047の各々は互いに異なるVIDを含むパケットの受信総数を計数するのに用いられるため、2048種類までのVIDのパケットについては、レジスタのビット列を群分けすることなく全て計数することができる。2049種類目以上のVIDのパケットの受信総数も計数可能とするため、統計レジスタ部314は上述のビット列群分け手段及びレジスタ番号追加割り当て手段を用いる。   The statistical register unit 314 includes a total of 2048 registers 315-0 to 315-2047. Since each of the registers 315-0 to 315-2047 is used to count the total number of received packets including different VIDs, up to 2048 types of VID packets are counted without grouping the bit strings of the registers. can do. The statistical register unit 314 uses the bit string grouping means and the register number additional assigning means described above in order to be able to count the total number of received VID packets of the 2049th type or more.

図5はビット列群分け後のレジスタ315−0の構成を表す図である。もともとレジスタ315−0はBit0〜Bit32の32ビットのビット列からなり、統計レジスタ部314により、初期設定でレジスタ番号0が割り当てられている。同図中においては、レジスタ315−0は、ビット列群分け手段により、Bit0〜Bit15と、Bit16〜Bit31とに群分けされている。また、レジスタ番号追加割り当て手段により、Bit0〜Bit15からなる群分けビット列にレジスタ番号0、Bit16〜Bit31からなる群分けビット列にレジスタ番号2048がそれぞれ対応付けられている。このように統計レジスタ部314は、1つのレジスタを構成するビット列を群分けすることにより、群分けビット列Bit0〜Bit15と、群分けビット列Bit16〜Bit31と、をそれぞれ16桁の2進カウンタとして使用する。   FIG. 5 is a diagram illustrating the configuration of the register 315-0 after the bit string grouping. The register 315-0 originally comprises a 32-bit bit string of Bit0 to Bit32, and the register number 0 is assigned by the statistical register unit 314 by default. In the figure, the registers 315-0 are grouped into Bit0 to Bit15 and Bit16 to Bit31 by the bit string grouping means. Further, the register number additional assigning means associates the register number 0 with the grouping bit string composed of Bit0 to Bit15 and the register number 2048 with the grouping bit string composed of Bit16 to Bit31. In this way, the statistical register unit 314 groups the bit strings constituting one register, and uses the grouped bit strings Bit0 to Bit15 and the grouped bit strings Bit16 to Bit31 as 16-digit binary counters, respectively. .

統計レジスタ部314は、管理部312からレジスタ番号を伴うカウント指示を受け取る毎に、当該レジスタ番号に対応する群分けビット列が表すカウント値を1つインクリメントする。例えば、統計レジスタ部314は、レジスタ番号0を伴うカウント指示を受け取った場合、レジスタ番号0に対応する群分けビット列Bit0〜Bit15の2進カウンタが表すカウント値を1つインクリメントする。同様に、統計レジスタ部314は、レジスタ番号2048を伴うカウント指示を受け取った場合、レジスタ番号2048に対応する群分けビット列Bit16〜Bit31の2進カウンタが表すカウント値を1つインクリメントする。これにより、統計レジスタ部314は、1つのレジスタ315−0で、VID0を含むパケット及びVID2048を含むパケットの各々の受信総数を得ることができる。   Each time the statistical register unit 314 receives a count instruction with a register number from the management unit 312, the statistical register unit 314 increments the count value represented by the grouping bit string corresponding to the register number by one. For example, when receiving the count instruction with the register number 0, the statistical register unit 314 increments the count value represented by the binary counter of the grouping bit string Bit0 to Bit15 corresponding to the register number 0 by one. Similarly, when receiving the count instruction with the register number 2048, the statistical register unit 314 increments the count value represented by the binary counter of the grouping bit string Bit16 to Bit31 corresponding to the register number 2048 by one. As a result, the statistics register unit 314 can obtain the total number of received packets including VID0 and VID2048 in one register 315-0.

図6はビット列分割処理を含むパケット受信数計数処理ルーチンを表すフローチャートである。以下、ビット列分割処理を含むパケット受信数計数処理について図6を参照しつつ説明する。なお、統計レジスタ部314は、初期設定としてレジスタ315−0、315−1、・・・、315−2047に、レジスタ番号0、1、・・・、2047をそれぞれ対応付けているものとする。   FIG. 6 is a flowchart showing a packet reception number counting routine including a bit string dividing process. Hereinafter, the packet reception number counting process including the bit string dividing process will be described with reference to FIG. Note that the statistical register unit 314 associates register numbers 0, 1,..., 2047 with registers 315-0, 315-1,.

ステップS201〜S205までの処理は、第1の実施例と同様である。送受信部100が、2048番目以降のVIDをVLANタグヘッダに含むパケットを受信した場合も同様に、VIDはレジスタ番号に対応付けられてレジスタ管理テーブル313に記憶される。図7は、2048番目以降のVIDも含めて記憶されているレジスタ管理テーブルの一例を表す図である。同図中に示されるようにVID0、VID1、・・・VID2047がレジスタ番号0、1、2、・・・、7FFhにそれぞれ対応付けられていると共に、VID2048、VID2049、・・・VID4095がレジスタ番号800h、801h、2、・・・、FFFhにそれぞれ対応付けられて記憶されている。   The processing from step S201 to S205 is the same as in the first embodiment. Similarly, when the transmitting / receiving unit 100 receives a packet including the 2048th and subsequent VIDs in the VLAN tag header, the VID is stored in the register management table 313 in association with the register number. FIG. 7 is a diagram illustrating an example of a register management table stored including the 2048th and subsequent VIDs. As shown in the figure, VID0, VID1,... VID2047 are associated with register numbers 0, 1, 2,..., 7FFh, respectively, and VID2048, VID2049,. 800h, 801h, 2,..., FFFh are stored in association with each other.

統計レジスタ部314は、管理部312からレジスタ番号を伴うカウント指示を受け取ったら、当該レジスタ番号が割り当て済みのレジスタ番号であるか否かを判別する(S206)。統計レジスタ部314は、カウント指示のレジスタ番号が割り当て済みではないと判別した場合に、ビット列群分け手段及びレジスタ番号追加割り当て手段により、レジスタ315−0〜315−2047の内のいずれかのビット列を群分けし、群分けビット列の各々に個別のレジスタ番号を対応付ける(S207)。例えば、統計レジスタ部314は、レジスタ番号2048を伴うカウント指示を受け取ったら、レジスタ315−0を図5に示す如く群分けビット列Bit0〜Bit15及びBit16〜Bit31に群分けし、群分けビット列Bit0〜Bit15にレジスタ番号0、群分けビット列Bit16〜Bit31にレジスタ番号2048を対応付ける。続いて、統計レジスタ部314は、群分けビット列Bit16〜Bit31が表すカウント値を1つインクリメントする(S208)。   When receiving the count instruction with the register number from the management unit 312, the statistical register unit 314 determines whether or not the register number is an assigned register number (S 206). When the statistical register unit 314 determines that the register number of the count instruction has not been assigned, the bit register group allocating unit and the register number adding / assigning unit allocate any bit string in the registers 315-0 to 315-2047. Grouping is performed, and an individual register number is associated with each grouping bit string (S207). For example, when receiving the count instruction with the register number 2048, the statistical register unit 314 groups the register 315-0 into grouping bit strings Bit0 to Bit15 and Bit16 to Bit31 as shown in FIG. Register number 0 and grouping bit string Bit16 to Bit31 are associated with register number 2048. Subsequently, the statistical register unit 314 increments the count value represented by the grouping bit string Bit16 to Bit31 by one (S208).

統計レジスタ部314は、カウント指示のレジスタ番号が割り当て済みのレジスタ番号であると判別した場合、当該レジスタ番号に対応付けられているレジスタ又は群分けビット列が表すカウント値を1つインクリメントする(S208)。例えば、統計レジスタ部314は、レジスタ番号0を伴うカウント指示に応じて、群分けビット列Bit0〜Bit15が表すカウント値を1つインクリメントし、レジスタ番号1を伴うカウント指示に応じて、レジスタ315−1が表すカウント値を1つインクリメントする。   If the statistical register unit 314 determines that the register number of the count instruction is an assigned register number, the statistical register unit 314 increments the count value represented by the register or grouping bit string associated with the register number by one (S208). . For example, the statistical register unit 314 increments the count value represented by the grouping bit strings Bit0 to Bit15 by one in response to a count instruction with register number 0, and registers 315-1 in response to the count instruction with register number 1 The count value represented by is incremented by one.

管理部312は、図示せぬ制御部からのカウント終了の指示があるまで(S209)、ステップS201からの処理を反復し、VID毎のパケット受信総数のカウントを継続する。統計レジスタ部314は、レジスタ番号2049を伴うカウント指示を受け取った場合、上記したのと同様に、レジスタ315−1を群分けビット列Bit0〜Bit15及びBit16〜Bit31に群分けし、群分けビット列Bit0〜Bit15にレジスタ番号1、群分けビット列Bit16〜Bit31にレジスタ番号2049を対応付けることができる。以下、同様に、統計レジスタ部314は、レジスタ315−2、レジスタ315−3、・・・、レジスタ315−2047に、レジスタ番号2及び2050、レジスタ番号3及び2051、・・・、レジスタ番号2047及び4095をそれぞれ対応付けることができる。   The management unit 312 repeats the processing from step S201 and continues to count the total number of received packets for each VID until there is a count end instruction from a control unit (not shown) (S209). When receiving the count instruction with the register number 2049, the statistical register unit 314 groups the register 315-1 into the grouping bit strings Bit0 to Bit15 and Bit16 to Bit31, and the grouping bit string Bit0 to Bit0. Register number 1 can be associated with Bit 15 and register number 2049 can be associated with grouping bit string Bit 16 to Bit 31. Similarly, the statistical register unit 314 includes a register 315-2, a register 315-3,..., A register 315-2047, a register number 2 and 2050, a register number 3 and 2051,. And 4095 can be associated with each other.

管理部312は、図示せぬ制御部からのカウント終了の指示があれば(S209)、これに応じて、統計レジスタ部314をしてレジスタ315−0〜315−2047又は群分けビット列の各々のカウント値をパケット受信総数として出力せしめる(S210)。   If there is an instruction to end counting from a control unit (not shown) (S209), the management unit 312 performs the statistical register unit 314 in response to each of the registers 315-0 to 315-2047 or the grouping bit string. The count value is output as the total number of received packets (S210).

上記した如く本実施例によるパケット中継装置によれば、1つのレジスタを構成するビット列を2つのビット列に群分けし、当該群分けによって得られた複数の群分けビット列の各々を1つのカウンタとして使用することにより、2048個のレジスタ315−0〜315−2047を用いて4096種類のVID毎に受信パケット総数を計数することができる。   As described above, according to the packet relay apparatus according to the present embodiment, the bit strings constituting one register are grouped into two bit strings, and each of the plurality of grouped bit strings obtained by the grouping is used as one counter. By doing so, the total number of received packets can be counted for each of 4096 types of VIDs using 2048 registers 315-0 to 315-2047.

なお、ユーザは統計レジスタ部314によるビット列群分け手段及びレジスタ番号追加割り当て手段を有効とするか無効とするかを状況に応じて設定できる。当該設定は、ユーザが有効/無効の設定指令を統計レジスタ部314に与えることによりなされる。無効設定とした場合、2049番目以降のVIDを含むパケットについては受信総数が計数されず、2048番目までのVIDを含むパケットについては各レジスタの全32ビットにより受信総数が計数される。   The user can set whether to enable or disable the bit string grouping means and the register number additional assigning means by the statistical register unit 314 depending on the situation. The setting is performed when the user gives a valid / invalid setting command to the statistical register unit 314. In the case of invalid setting, the total number of reception is not counted for the packets including the 2049th and subsequent VIDs, and the total number of receptions is counted for all the 32 bits of each register for the packets including the 2048th VID.

本実施例は、2048個のレジスタの各々を2つのビット列に群分けして、4096種類のVID毎に受信パケット総数を計数する例であるが、例えば、512個のレジスタの各々を4つのビット列に群分けして、4096種類のVID毎に受信パケット総数を計数するなどの変形例が挙げられる。
<第3の実施例>
第2の実施例と異なる部分について以下に詳述する。図8はリンク状態監視部316を更に含むパケット受信数計数部310を表すブロック図である。
In this embodiment, each of 2048 registers is divided into two bit strings, and the total number of received packets is counted for each of 4096 VIDs. For example, each of 512 registers is divided into four bit strings. A modification example is possible in which the total number of received packets is counted for each of 4096 types of VIDs.
<Third embodiment>
Different parts from the second embodiment will be described in detail below. FIG. 8 is a block diagram showing a packet reception number counting unit 310 further including a link state monitoring unit 316.

リンク状態監視部316は、PHY処理部200からポート毎の設定通信レートを含むリンク情報を取得する。通常のLAN通信においては、通信レートを通信相手の装置(図示せず)との間で互いに設定した上でパケットを通信する。LANインターフェースによる通信においては、一般に1000Mbps、100Mbps及び10Mbpsの3種類の通信レートから1つを設定可能である。   The link state monitoring unit 316 acquires link information including a set communication rate for each port from the PHY processing unit 200. In normal LAN communication, packets are communicated after setting a communication rate with a communication partner device (not shown). In communication using a LAN interface, generally, one of three communication rates of 1000 Mbps, 100 Mbps, and 10 Mbps can be set.

PHY処理部200は、当該設定による設定通信レートを、リンク情報に含めてリンク状態監視部316に通知するか、若しくはリンク情報に含めて自身内部に保管している。リンク状態監視部316は、PHY処理部200から通知されるリンク情報を取得若しくはPHY処理部200内部に保管されているリンク情報を定期的に取得する。リンク状態監視部316は、このようにしてインターフェースのリンク状態を監視しつつ、取得により得られたリンク情報を管理部312に与える。   The PHY processing unit 200 includes the set communication rate according to the setting in the link information and notifies the link state monitoring unit 316 or stores the set communication rate in the link information. The link state monitoring unit 316 acquires link information notified from the PHY processing unit 200 or periodically acquires link information stored in the PHY processing unit 200. The link state monitoring unit 316 provides the link information obtained by the acquisition to the management unit 312 while monitoring the link state of the interface in this way.

本実施例における管理部312は、拡張動作設定テーブルを備えている。図9は拡張動作設定テーブルを表す図である。ここでの拡張動作とは統計レジスタ部314によるビット列群分け手段及びレジスタ番号追加割り当て手段による動作のことである。同図中の「ユーザ拡張動作設定」は、「拡張動作」の有効/無効の設定をユーザに許可するか否かを「有効」及び「無効」によって表している。同図中の「設定通信レート」は、通信レート1000Mbps、100Mbps、10Mbpsを表している。   The management unit 312 in the present embodiment includes an extended operation setting table. FIG. 9 shows an extended operation setting table. The extended operation here is an operation by the bit string grouping means and the register number additional assigning means by the statistical register unit 314. “User extended operation setting” in the figure indicates whether or not to allow the user to set the validity / invalidity of “extended operation” by “valid” and “invalid”. “Setting communication rate” in the figure represents communication rates of 1000 Mbps, 100 Mbps, and 10 Mbps.

同図中の「拡張動作」は、統計レジスタ部314によるビット列群分け手段及びレジスタ番号追加割り当て手段を「有効」とするか「無効」にするかを表している。当該有効/無効はユーザが予め設定できる。通常、通信レートが低い場合には、単位時間当たりの受信パケット数が少ないため、計測に必要なカウンタのビット数も少なくて済む。反対に、通信レートが高い場合には、単位時間当たりの受信パケット数が多いため、多くのビット数が必要になる。ユーザは状況に応じて、ビット数(計数可能なパケット数)を優先する場合には「拡張動作」を「無効」、計数可能なVIDの種別数を優先する場合には「拡張動作設定」を「有効」に設定する。   “Extended operation” in the figure indicates whether the bit string grouping means and the register number additional assigning means by the statistical register unit 314 are “valid” or “invalid”. The validity / invalidity can be set in advance by the user. Normally, when the communication rate is low, the number of received packets per unit time is small, so the number of counter bits required for measurement can be small. On the other hand, when the communication rate is high, the number of received packets per unit time is large, and thus a large number of bits are required. Depending on the situation, the user can set “expanded operation” to “invalid” when priority is given to the number of bits (number of packets that can be counted), and “expanded operation setting” when priority is given to the number of VID types that can be counted. Set to “Enable”.

ここでは、通信レートが高い通信レート1000Mbpsのときは無効、比較的通信レートが低い通信レート100Mbps及び10Mbpsのときは有効としている。なお、「設定通信レート」が1000Mbps、100Mbps、10Mbpsの「ユーザ拡張動作設定」は「有効」となっているため、ユーザは必要に応じて各通信レートの「拡張動作設定」を「有効」又は「無効」に再設定自在である。   Here, it is invalid when the communication rate is 1000 Mbps, which is a high communication rate, and is valid when the communication rates are 100 Mbps and 10 Mbps, which are relatively low. In addition, since the “user extended operation setting” for the “set communication rate” of 1000 Mbps, 100 Mbps, and 10 Mbps is “valid”, the user can set the “expanded operation setting” for each communication rate to “valid” or “ Can be reset to “invalid”.

管理部312は、リンク状態監視部316から取得したリンク情報に基づいて、リンク情報テーブルを更新する。図10はリンク情報テーブルの一例を表す図である。管理部312は、リンク情報に含まれているポート毎の通信レートに基づいてリンク情報テーブルを更新する。同図中に示されるようにVID毎に通信レートが対応付けられてリンク情報テーブルに記憶されている。なお、リンク情報テーブルには、通信レートの他に必要に応じて他のリンク関連の情報がVID毎に対応付けることもできる。   The management unit 312 updates the link information table based on the link information acquired from the link state monitoring unit 316. FIG. 10 is a diagram illustrating an example of the link information table. The management unit 312 updates the link information table based on the communication rate for each port included in the link information. As shown in the figure, a communication rate is associated with each VID and stored in the link information table. In the link information table, in addition to the communication rate, other link-related information can be associated for each VID as necessary.

管理部312は、レジスタ管理テーブル、拡張動作設定テーブル及びリンク情報テーブルの情報に基づいて、レジスタ番号毎の拡張動作の有効/無効設定を指示する設定指令を統計レジスタ部314に与える。例えば、管理部312は、レジスタ管理テーブル(図7)よりVID0に対応付けられているレジスタ番号0を取得し、リンク情報テーブル(図10)においてVID0に対応付けられている通信レート1000Mbpsが、拡張動作設定テーブル(図9)において拡張動作「無効」とされていることから、レジスタ番号0のレジスタに対する拡張動作を無効設定すべき旨を示す設定指令を統計レジスタ部314に与える。管理部312は、他のレジスタ番号についても同様に設定指令を統計レジスタ部314に与える。通常、管理部312は、リンク状態監視部316からリンク情報を取得する毎に設定指令を統計レジスタ部314に与える。   Based on the information in the register management table, the extended operation setting table, and the link information table, the management unit 312 gives a setting command for instructing the valid / invalid setting of the extended operation for each register number to the statistical register unit 314. For example, the management unit 312 acquires the register number 0 associated with VID0 from the register management table (FIG. 7), and the communication rate 1000 Mbps associated with VID0 in the link information table (FIG. 10) is expanded. Since the extended operation is set to “invalid” in the operation setting table (FIG. 9), a setting command indicating that the extended operation for the register of register number 0 should be invalidated is given to the statistical register unit 314. The management unit 312 similarly gives a setting command to the statistical register unit 314 for other register numbers. Normally, the management unit 312 gives a setting command to the statistical register unit 314 every time link information is acquired from the link state monitoring unit 316.

本実施例における統計レジスタ部314は、管理部312からのレジスタ番号毎の拡張動作の有効/無効設定を指示する設定指令に応じて、拡張動作すなわちビット列群分け手段及びレジスタ番号追加割り当て手段の有効/無効をレジスタ毎に設定する拡張動作設定手段を更に含む。例えば、統計レジスタ部314は、管理部312からレジスタ番号0のレジスタに対する拡張動作を無効とすべき旨の設定指令を受けた場合、これに応じて、レジスタ315−0に対する拡張動作を無効に設定する。これにより、当該設定が有効である間、レジスタ315−0は32ビットのカウンタとして動作する。統計レジスタ部314は、レジスタ315−1〜315−2047についても同様に拡張動作の有効/無効の設定処理を行う。   In this embodiment, the statistical register unit 314 validates the extended operation, that is, the bit string grouping unit and the register number additional assigning unit, in response to a setting command that instructs valid / invalid setting of the extended operation for each register number from the management unit 312. Further included is an extended operation setting means for setting invalidity for each register. For example, when the statistical register unit 314 receives a setting command from the management unit 312 to invalidate the extended operation for the register of register number 0, the extended operation for the register 315-0 is invalidated accordingly. To do. Thus, the register 315-0 operates as a 32-bit counter while the setting is valid. The statistical register unit 314 similarly performs setting processing for valid / invalid of the extended operation for the registers 315-1 to 315-2047.

図11は拡張動作有効/無効設定処理ルーチンを表すフローチャートである。以下に、図11を参照しつつ拡張動作有効/無効設定処理について説明する。   FIG. 11 is a flowchart showing an extended operation valid / invalid setting processing routine. Hereinafter, the extended operation valid / invalid setting process will be described with reference to FIG.

リンク状態監視部316は、PHY処理部200からポート毎の設定通信レートを含むリンク情報を取得する(ステップS301)。管理部312は、リンク状態監視部316からリンク情報を取得し、これに基づいて、図9に示す如きリンク情報テーブルを更新する(S302)。管理部312は、レジスタ管理テーブル、拡張動作設定テーブル及びリンク情報テーブルの情報に基づいて、レジスタ番号毎の拡張動作の有効/無効設定を示す設定指令を統計レジスタ部314に与える(S303)。統計レジスタ部314は、管理部312からの設定指令に応じて、拡張動作をレジスタ毎に設定する。当該処理ルーチンは、定期的に実行され、ポート毎の設定通信レートに応じて、拡張動作が有効/無効を動的に設定される。   The link state monitoring unit 316 acquires link information including the set communication rate for each port from the PHY processing unit 200 (step S301). The management unit 312 acquires link information from the link state monitoring unit 316, and updates the link information table as shown in FIG. 9 based on this (S302). Based on the information in the register management table, the extended operation setting table, and the link information table, the management unit 312 gives a setting command indicating the valid / invalid setting of the extended operation for each register number to the statistical register unit 314 (S303). The statistical register unit 314 sets the expansion operation for each register in response to a setting command from the management unit 312. The processing routine is periodically executed, and the extended operation is dynamically set to enable / disable according to the set communication rate for each port.

上記した如く本実施例によるパケット中継装置は、設定通信レートと拡張動作の有効/無効設定とを対応付けた拡張動作設定テーブルを備え、定期的にポート毎の設定通信レートを取得し、これに基づいてレジスタ毎の拡張動作の有効/無効を設定する。例えば、設定通信レートが比較的低い場合には拡張動作を有効設定し、反対に設定通信レートが比較的高い場合には拡張動作を無効設定にするといった動作が通信レートの設定状況に応じて動的になされる。これにより、設定通信レートが比較的低い場合には計数対象のVID種別数を増加させることができ、反対に設定通信レートが比較的高い場合には計数可能な受信パケット数を増加させることができる。   As described above, the packet relay apparatus according to the present embodiment includes the extended operation setting table in which the set communication rate is associated with the valid / invalid setting of the extended operation, and periodically acquires the set communication rate for each port. Based on this, enable / disable of the extended operation for each register is set. For example, when the set communication rate is relatively low, the extended operation is enabled, and when the set communication rate is relatively high, the extended operation is disabled. Made. As a result, when the set communication rate is relatively low, the number of VID types to be counted can be increased. Conversely, when the set communication rate is relatively high, the number of received packets that can be counted can be increased. .

第1〜第3の実施例においては、送受信部100が1つの物理LANポートである場合について説明したが、送受信部100が複数の物理LANポートを含んでいる場合にも同様の効果を奏することができる。図12はコネクタ110−1〜nを含む送受信部100、PHY処理部200及びL2処理部300を表すブロック図である。コネクタ110−1〜nの各々はLAN側の物理ポートである。L2処理部300は、コネクタ110−1〜nと同数のパケット受信数計数部310−1〜nを含む。パケット受信数計数部310−1、310−2、・・・、310−nがそれぞれ、コネクタ110−1、110−2、・・・、110−nが受信したパケットについてVID種別毎にパケット受信総数をカウントすることにより、第1〜第3の実施例と同様の効果を奏することができる。   In the first to third embodiments, the case where the transmission / reception unit 100 is one physical LAN port has been described. However, the same effect can be obtained when the transmission / reception unit 100 includes a plurality of physical LAN ports. Can do. FIG. 12 is a block diagram showing transmission / reception unit 100, PHY processing unit 200, and L2 processing unit 300 including connectors 110-1 to 110-n. Each of the connectors 110-1 to 110-n is a physical port on the LAN side. The L2 processing unit 300 includes the same number of packet reception count units 310-1 to 310-n as the connectors 110-1 to 110-n. Packet reception counters 310-1, 310-2,..., 310-n receive packets for each VID type for the packets received by connectors 110-1, 110-2,. By counting the total number, the same effects as in the first to third embodiments can be obtained.

パケット中継装置を表すブロック図である。It is a block diagram showing a packet relay apparatus. レジスタ管理テーブルの一例を表す図である。It is a figure showing an example of a register management table. レジスタの構成を表す図である。It is a figure showing the structure of a register. パケット受信数計数処理ルーチンを表すフローチャートである。It is a flowchart showing a packet reception number counting process routine. ビット列群分け後のレジスタの構成を表す図である。It is a figure showing the structure of the register | resistor after bit stream grouping. ビット列分割処理を含むパケット受信数計数処理ルーチンを表すフローチャートである。It is a flowchart showing a packet reception number counting process routine including a bit string dividing process. レジスタ管理テーブルの一例を表す図である。It is a figure showing an example of a register management table. リンク状態監視部を含むパケット受信数計数部を表すブロック図である。It is a block diagram showing the packet reception number counting part containing a link state monitoring part. 拡張動作設定テーブルを表す図である。It is a figure showing an extended operation | movement setting table. リンク情報テーブルの一例を表す図である。It is a figure showing an example of a link information table. 拡張動作有効/無効設定処理ルーチンを表すフローチャートである。It is a flowchart showing an extended operation valid / invalid setting processing routine. 複数のコネクタを含む送受信部、PHY処理部及びL2処理部を表すブロック図である。It is a block diagram showing the transmission / reception part containing a some connector, a PHY process part, and an L2 process part.

符号の説明Explanation of symbols

1 パケット中継装置
100 送受信部
110−1〜110−n コネクタ
200 PHY処理部
300 L2処理部
310、310−1〜310−n パケット受信数計数部
311 通信網識別子取得部
312 管理部
313 レジスタ管理テーブル
314 統計レジスタ部
315−0〜315−2047 レジスタ
316 通信レート情報取得部
400 プロセッサ
500 記憶部
600 PHY/MAC処理部
700 送受信部
710 コネクタ
DESCRIPTION OF SYMBOLS 1 Packet relay apparatus 100 Transmission / reception part 110-1 to 110-n Connector 200 PHY processing part 300 L2 processing part 310, 310-1 to 310-n Packet reception number counting part 311 Communication network identifier acquisition part 312 Management part 313 Register management table 314 Statistics register unit 315-0 to 315-2047 register 316 Communication rate information acquisition unit 400 Processor 500 Storage unit 600 PHY / MAC processing unit 700 Transmission / reception unit 710 Connector

Claims (4)

通信網を介してパケットを受信する受信部と、前記受信部が受信したパケットを他の通信網へ送信する送信部と、を含むパケット中継装置であって、
前記受信部が前記パケットを受信する毎に当該パケットに含まれている通信網識別子を抽出取得する識別子取得部と、
前記識別子取得部が抽出取得した通信網識別子を複数のレジスタ番号の内のいずれか1つに対応付けて記憶するレジスタ管理テーブルと、
各々が固有のレジスタ番号を対応付けられている複数のレジスタからなる統計レジスタ部と、
前記識別子取得部が抽出取得した通信網識別子に対応付けられているレジスタ番号を前記レジスタ管理テーブルから取得して当該レジスタ番号を伴うカウント指示を発する管理部と、を含み、
前記統計レジスタ部は、前記レジスタ番号を伴うカウント指示を受け取る毎に当該レジスタ番号に対応するレジスタが表すカウント値を加算してパケット受信総数を得ることを特徴とするパケット中継装置。
A packet relay device comprising: a receiving unit that receives a packet via a communication network; and a transmission unit that transmits a packet received by the receiving unit to another communication network,
An identifier acquisition unit that extracts and acquires a communication network identifier included in the packet every time the reception unit receives the packet;
A register management table for storing the communication network identifier extracted and acquired by the identifier acquisition unit in association with any one of a plurality of register numbers;
A statistical register section consisting of a plurality of registers each associated with a unique register number;
A management unit that obtains a register number associated with the communication network identifier extracted and acquired by the identifier acquisition unit from the register management table and issues a count instruction with the register number, and
Each time the statistical register unit receives a count instruction with the register number, it adds the count value represented by the register corresponding to the register number to obtain the total number of received packets.
前記統計レジスタ部は、
前記レジスタを構成するビット列を少なくとも2つのビット列に群分けして各々が個別のカウント値を表す複数の群分けビット列を得るビット列群分け手段と、
前記群分けビット列の各々に対応するように固有のレジスタ番号を当該群分け対象の統計レジスタに対応付けるレジスタ番号追加割り当て手段と、を更に含み、
前記レジスタ番号を伴うカウント指示を受け取る毎に当該レジスタ番号に対応する群分けビット列が表すカウント値を加算して得られた値を前記パケット受信総数とすることを特徴とする請求項1に記載のパケット中継装置。
The statistics register unit is
Bit string grouping means for grouping the bit strings constituting the register into at least two bit strings and obtaining a plurality of grouped bit strings each representing an individual count value;
Register number additional assigning means for associating a unique register number with the grouping target statistical register so as to correspond to each of the grouping bit strings,
The value obtained by adding the count value represented by the grouping bit string corresponding to the register number every time the count instruction with the register number is received is defined as the total number of received packets. Packet relay device.
前記統計レジスタ部は、設定指令に応じて前記ビット列群分け手段及びレジスタ番号追加割り当て手段の有効/無効を設定する拡張動作設定手段を更に含むことを特徴とする請求項2に記載のパケット中継装置。   3. The packet relay apparatus according to claim 2, wherein the statistical register unit further includes extended operation setting means for setting validity / invalidity of the bit string grouping means and register number additional assigning means in response to a setting command. . 前記設定指令は、ポートのリンク状況及びパケット通信レートの少なくともいずれか1つに基づく指令であることを特徴とする請求項3に記載のパケット中継装置。   4. The packet relay apparatus according to claim 3, wherein the setting command is a command based on at least one of a port link status and a packet communication rate.
JP2007251393A 2007-09-27 2007-09-27 Packet-repeating system Pending JP2009081816A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007251393A JP2009081816A (en) 2007-09-27 2007-09-27 Packet-repeating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007251393A JP2009081816A (en) 2007-09-27 2007-09-27 Packet-repeating system

Publications (1)

Publication Number Publication Date
JP2009081816A true JP2009081816A (en) 2009-04-16

Family

ID=40656216

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007251393A Pending JP2009081816A (en) 2007-09-27 2007-09-27 Packet-repeating system

Country Status (1)

Country Link
JP (1) JP2009081816A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011044993A (en) * 2009-08-24 2011-03-03 Fujitsu Ltd Communication apparatus and method of collecting statistical information
JP2011055052A (en) * 2009-08-31 2011-03-17 Fujitsu Ltd Information processor, transmission apparatus, and method for processing information

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011044993A (en) * 2009-08-24 2011-03-03 Fujitsu Ltd Communication apparatus and method of collecting statistical information
JP2011055052A (en) * 2009-08-31 2011-03-17 Fujitsu Ltd Information processor, transmission apparatus, and method for processing information
US8645593B2 (en) 2009-08-31 2014-02-04 Fujitsu Limited Signal processor, transmission apparatus, and method for processing signal

Similar Documents

Publication Publication Date Title
US9866477B2 (en) System and method for high-performance, low-power data center interconnect fabric
US9977763B2 (en) Network proxy for high-performance, low-power data center interconnect fabric
CN105049359B (en) Entrance calculate node and machine readable media for the distribution router that distributed routing table is searched
US7359383B2 (en) Load balancing with mesh tagging
Luo et al. Prototyping fast, simple, secure switches for etha
US20090238179A1 (en) Destination mac aging of entries in a layer 2 (l2) forwarding table
CN107888492B (en) VRRP load balancing method and device
WO2006052573A1 (en) Systems and methods for accelerated learning in ring networks
EP2728797B1 (en) Message processing method, device and system
CN116405281A (en) Real-time information detection network switching system
JP5971072B2 (en) Frame transfer apparatus and frame transfer method
CN107465621A (en) A kind of router finds method, SDN controllers, router and network system
JP2009081816A (en) Packet-repeating system
US10887223B1 (en) Conserving memory resources of a provider edge device in an ethernet tree
US20040146052A1 (en) Apparatus and method for address filtering in a multi-host network interface
Cisco Configuration Attributes
EP2107724B1 (en) Improved MAC address learning
JP2007274529A (en) Switching apparatus, and band control method
US20080267180A1 (en) Stacked tagging for broadcasting through hierarchy of meshes
KR100596385B1 (en) Forwarding entry processing method for virtual local area network support router
JP6018872B2 (en) Communication apparatus and transfer information management method in communication apparatus
CN116781453A (en) Message isolation method and device
JP2000049844A (en) Switching hub and network managing device
JP2013042433A (en) Interface module, communication device, and communication method