JP5258442B2 - ARP table management device - Google Patents

ARP table management device Download PDF

Info

Publication number
JP5258442B2
JP5258442B2 JP2008200125A JP2008200125A JP5258442B2 JP 5258442 B2 JP5258442 B2 JP 5258442B2 JP 2008200125 A JP2008200125 A JP 2008200125A JP 2008200125 A JP2008200125 A JP 2008200125A JP 5258442 B2 JP5258442 B2 JP 5258442B2
Authority
JP
Japan
Prior art keywords
address
input
associative memory
information
cam
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008200125A
Other languages
Japanese (ja)
Other versions
JP2010041248A (en
Inventor
和彦 森村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2008200125A priority Critical patent/JP5258442B2/en
Publication of JP2010041248A publication Critical patent/JP2010041248A/en
Application granted granted Critical
Publication of JP5258442B2 publication Critical patent/JP5258442B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Description

本発明は、IETFのRFC826に基づくイーサネット(登録商標)アドレス解決プロトコルのためのARP(Address Resolution Protocol)テーブル管理装置に関する。より詳しくは、エージングと呼ばれるARPテーブルエントリの時間制御に関する。   The present invention relates to an ARP (Address Resolution Protocol) table management apparatus for an Ethernet (registered trademark) address resolution protocol based on RFC 826 of IETF. More specifically, it relates to time control of ARP table entries called aging.

イーサネットアドレス解決プロトコルは、32Bitで構成されるネットワーク固有に割り当てられるIPアドレスを用いて、ローカルネットワーク上における機器I/F固有に割り当てられている48BitのMACアドレスを取得するためのプロトコルである。   The Ethernet address resolution protocol is a protocol for obtaining a 48-bit MAC address assigned uniquely to a device I / F on a local network using an IP address assigned to a network composed of 32 bits.

図2は、2台のClient端末とHUB、そして外部ネットワークに接続されるRouter1から構成されるサブネットワークを示した図である。   FIG. 2 is a diagram illustrating a sub-network including two client terminals, a HUB, and a Router 1 connected to an external network.

図2において、Client1からClient2にデータを送信する場合、アプリケーション層では相手のIPアドレスとともに送信するデータをペイロードとしてIP層の処理を行う。そして先に渡された相手のIPアドレス、送信元としての自分のIPアドレス、データ長などを解析し、IP Headerを作成し、ペイロードと共にIPパケットが作成される。   In FIG. 2, when data is transmitted from Client 1 to Client 2, the application layer performs IP layer processing using the data transmitted together with the partner's IP address as a payload. Then, by analyzing the IP address of the other party that was previously passed, the own IP address as the transmission source, the data length, etc., an IP Header is created, and an IP packet is created along with the payload.

次にEthernet(登録商標)上に送出するために自分のMACアドレスと送出先のMACアドレスが必要となる。このとき、相手のIPアドレスは既知であるが、MACアドレスが分からない場合がある。このとき、前述のIPパケットを送出する前に、送出元のClient端末ではARPリクエストパケットを同一サブネット内にブロードキャストパケットとして送出して、相手先IPアドレスに該当する機器が存在するかどうかを検索する。   Next, in order to transmit on Ethernet (registered trademark), the user's own MAC address and the destination MAC address are required. At this time, the other party's IP address is known, but the MAC address may not be known. At this time, before sending out the IP packet, the sending client terminal sends an ARP request packet as a broadcast packet in the same subnet to search whether there is a device corresponding to the destination IP address. .

図3は、ARPリクエストパケットのフォーマットである。ARPリクエストパケットではMACヘッダ内の相手先のMACアドレスが不明なので、宛先MACアドレスフィールドにはブロードキャストアドレスと呼ばれる"FF:FF:FF:FF:FF:FF"を入れておく。すると、この宛先MACアドレスを持つパケットは全てのサブネット内の機器に伝搬するブロードキャストパケットとして送出される。   FIG. 3 shows the format of the ARP request packet. Since the destination MAC address in the MAC header is unknown in the ARP request packet, “FF: FF: FF: FF: FF: FF” called a broadcast address is entered in the destination MAC address field. Then, a packet having this destination MAC address is sent out as a broadcast packet that propagates to devices in all subnets.

ARPパケットフィールドにはARPの送出元のハード仕様、プロトコル仕様に続いて、そのARPパケットの命令コード、送出元のIP、MACアドレスがある。送り先のIPアドレスなどが記述されており、ARPリクエストパケットを受け取ったネットワーク機器は、ARPパケットを解析して自分のIPアドレスを探していることが判明したらARPリプライパケットを送出する。   In the ARP packet field, the hardware specification and protocol specification of the ARP transmission source are followed by the instruction code of the ARP packet, the IP of the transmission source, and the MAC address. The destination IP address and the like are described, and the network device that has received the ARP request packet analyzes the ARP packet and sends out an ARP reply packet when it is found that it is searching for its own IP address.

ARPリプライパケットの宛先は、ARPリクエストパケットの送出元となるのでARPリプライパケットはブロードキャストではなくてユニキャスト、つまりARPリクエストパケットの送信元のMACアドレス宛に送出される。   Since the destination of the ARP reply packet is the transmission source of the ARP request packet, the ARP reply packet is not broadcast but is transmitted to unicast, that is, to the MAC address of the transmission source of the ARP request packet.

ARPリプライパケットにはARPリクエストパケットを受け取った機器のMACアドレスが記述されている。よって、このARPリプライパケットを受け取ったClient端末ではIPアドレスとMACアドレスの変換表、つまりARPテーブルと呼ばれるデータベースが作成される。   The ARP reply packet describes the MAC address of the device that has received the ARP request packet. Therefore, the client terminal that has received this ARP reply packet creates a conversion table between IP addresses and MAC addresses, that is, a database called an ARP table.

図4は、ARPテーブルの一例を示した図である。このデータベースにIPアドレスとMACアドレスの対応情報が登録されると、IPパケットを発送するたびにARPパケットによる問い合わせをしなくてもデータベースへの問い合わせによりMACアドレスを得ることができる。このARPテーブルはIPアドレス、MACアドレス、Typeフィールドから構成されており、最後のTypeフィールドはこのエントリが静的なエントリか、動的なエントリかを表している。   FIG. 4 is a diagram showing an example of the ARP table. When the correspondence information between the IP address and the MAC address is registered in this database, the MAC address can be obtained by inquiring the database without inquiring with the ARP packet every time the IP packet is sent. This ARP table is composed of an IP address, a MAC address, and a Type field, and the last Type field indicates whether this entry is a static entry or a dynamic entry.

静的なエントリの場合、一旦登録されると意図的に削除されない限り永続的に保持されるエントリであることを表し、動的なエントリの場合はエントリされて一定時間を超えてアクセスが無い場合に削除されるエントリであることを表している。   In the case of a static entry, it is an entry that is permanently retained unless it is intentionally deleted once registered. In the case of a dynamic entry, the entry has been entered and has not been accessed for a certain period of time. Represents an entry to be deleted.

この"エントリの削除"という動作は、ネットワークの構成の変化に対応するために必要な機能である。仮にネットワーク機器のある端末がネットワークの不具合や電源の遮断などの理由でネットワークの構成から削除された場合、ネットワーク上の他の端末が永続的にARPテーブルにエントリとして保持しておくことは無駄な機能である。   This operation of “deletion of entry” is a function necessary to cope with a change in the network configuration. If a terminal with a network device is deleted from the network configuration for reasons such as network failure or power shutdown, it is useless for other terminals on the network to permanently hold them as entries in the ARP table. It is a function.

IPアドレスを端末が変更した場合に以前のエントリを保持しておくことはネットワーク上に無駄なトラヒックが流れたり、誤動作の原因ともなるため、一定期間の後にARPテーブルからエントリを削除する機能はARPテーブル管理上、必須の機能である。   Keeping previous entries when the IP address is changed by the terminal causes unnecessary traffic to flow on the network or cause malfunctions. Therefore, the function of deleting entries from the ARP table after a certain period of time is used. This is an essential function for table management.

図4に示したClient1のARPテーブルは、Client2とRouter1のIPアドレス、MACアドレスがそれぞれType=dynamicとしてエントリされている。一方、Client2のARPテーブルにはRouter1のエントリのTypeがStaticとしてエントリされている。このようにRouterのような常時動作することを前提としている機器に対してはStaticでエントリすることもあり、その運用はARPテーブルを持つ端末側で決めることが出来る。   In the ARP table of Client1 shown in FIG. 4, the IP address and MAC address of Client2 and Router1 are entered as Type = dynamic. On the other hand, the Type of the entry of Router1 is entered as Static in the ARP table of Client2. In this way, a device such as a Router that is supposed to operate at all times may be entered with Static, and its operation can be determined by a terminal having an ARP table.

同じようにdymanicでエントリした場合においても機器によってARPテーブルからエントリを削除するまでの"一定期間"をどの程度の時間にするかは端末に一任されている。   Similarly, even when the entry is made dynamically, it is left up to the terminal to determine how long the “predetermined period” until the entry is deleted from the ARP table by the device.

ただし、この時間が短すぎるとARPパケットの発行が頻繁に行われるようになり、長すぎるとネットワークの動的な変更に追従できなくなる。一般的には30秒から1分程度、大きなネットワーク(サブネットの端末が数千を超える程度)の場合は10分程度に設定することが一般的である。もちろん、この時間は端末の通信アプリケーションの使用方法にも依存するためにこれらの時間と異なる場合もある。   However, if this time is too short, ARP packets are issued frequently, and if it is too long, it becomes impossible to follow dynamic changes in the network. Generally, it is generally set to about 30 minutes to about 1 minute, and about 10 minutes in the case of a large network (about more than several thousand terminals in a subnet). Of course, this time may also differ from these times because it depends on how the terminal communication application is used.

IPアドレスからMACアドレスを迅速に検索するためのソフトウエアアルゴリズムは多く存在している。一方で、ハードウェアデバイスとして連想メモリ:CAM(content address memory)を用いたARPテーブル管理装置が知られている。図5に従来例におけるCAMを使用したIP−MAC変換テーブルすなわち、ARPテーブルおよび管理装置を示す。   There are many software algorithms for quickly retrieving a MAC address from an IP address. On the other hand, an ARP table management apparatus using an associative memory: CAM (content address memory) as a hardware device is known. FIG. 5 shows an IP-MAC conversion table using the CAM in the conventional example, that is, an ARP table and a management device.

図5において、501はCAM、502はRAM、503はアドレス選択回路、504はアドレスエンコーダ、505はタイマ、506はアドレスデコーダである。この変換テーブルの動作はIPアドレスとMACアドレスの登録動作と、IPアドレスの問い合わせに対してMACアドレスを出力する問い合わせ動作に分けられる。   In FIG. 5, 501 is a CAM, 502 is a RAM, 503 is an address selection circuit, 504 is an address encoder, 505 is a timer, and 506 is an address decoder. The operation of this conversion table is divided into an IP address and MAC address registration operation, and an inquiry operation for outputting a MAC address in response to an IP address inquiry.

一方、504、505、506のアドレスエンコーダ、タイマ、アドレスデコーダの一連のモジュールでテーブルの時間管理を行っている。まず、登録動作について説明する。   On the other hand, the time management of the table is performed by a series of modules of address encoders 504, 505, and 506, a timer, and an address decoder. First, the registration operation will be described.

IPアドレスとMACアドレスをそれぞれCAMとRAMに登録するためにCAMとRAMで使用される共通のアドレスが必要になる。このため、アドレスセレクタ503は登録動作の場合には外部からのレファレンスアドレス入力を選択してRAMにアドレスとして与える。このアドレスの幅によって、変換テーブルへのエントリ数が決定される。アドレスの幅を8bitとすると256エントリ、つまり256種類のIPアドレスからMACアドレスへの変換が可能である。エントリ数を増加させたい場合はこのアドレス幅を増やすと共にCAM/RAMの容量を増やす必要がある。   In order to register the IP address and MAC address in the CAM and RAM, respectively, a common address used in the CAM and RAM is required. For this reason, the address selector 503 selects the reference address input from the outside in the case of the registration operation and gives it to the RAM as an address. The number of entries in the conversion table is determined by the width of this address. If the address width is 8 bits, it is possible to convert 256 entries, that is, 256 types of IP addresses to MAC addresses. In order to increase the number of entries, it is necessary to increase the address width and increase the capacity of the CAM / RAM.

さて、CAM/RAMアドレスの入力と共にエントリしたいIPアドレスをCAMに与え、MACアドレスをRAMに与える。これにより共通のCAM/RAMアドレスにIPアドレスとMACアドレスがそれぞれCAMとRAMに蓄積される。問い合わせ動作の場合はCAMから出力されるCAM AdrsをRAMアドレスとして与えるようにアドレスセレクタを選択しておく。   Now, along with the input of the CAM / RAM address, the IP address to be entered is given to the CAM, and the MAC address is given to the RAM. As a result, the IP address and MAC address are stored in the CAM and RAM, respectively, in the common CAM / RAM address. In the case of an inquiry operation, an address selector is selected so that CAM Adrs output from the CAM is given as a RAM address.

CAMに対してIPアドレスを問い合わせデータとして入力するとCAMは即座に登録時のCAM Adrsを出力する。該当するCAM Adrsが存在しない場合はUnmatchを出力して問い合わせ動作を終了する。   When the IP address is input as inquiry data to the CAM, the CAM immediately outputs the CAM Adrs at the time of registration. If there is no corresponding CAM Adrs, Unmatch is output and the inquiry operation is terminated.

Match出力と共にCAM Adrs出力をRAMに対して出力すると、CAM AdrsからMACアドレスが出力される。このようにしてIPアドレスからMACアドレスを得ることが出来る。   When the CAM Adrs output is output to the RAM together with the Match output, the MAC address is output from the CAM Adrs. In this way, the MAC address can be obtained from the IP address.

図2の例としてあげた、サブネット内に3つのネットワーク機器しかない場合はデータベースを全てRAM上に展開し、エントリ毎に逐一比較検索を行ってもそれほど処理時間はかからない。しかし、サブネット内のネットワーク機器が数千とか数万の単位で管理する場合は検索時間のコストがかかるので、本従来例で挙げたようなCAMを用いたARPテーブルおよび管理方法が用いられる。   If there are only three network devices in the subnet, as shown as an example in FIG. 2, it does not take much processing time even if all the databases are expanded on the RAM and a comparative search is performed for each entry. However, when network devices in a subnet are managed in units of thousands or tens of thousands, the cost of search time is required. Therefore, the ARP table using CAM and the management method described in this conventional example are used.

しかし、上記従来例に見られるARPテーブル管理装置では以下のような問題点があった。すなわち、ネットワーク内の機器の構成が変化した場合、ネットワーク機器の増減やトポロジの変化などに対応するようにある一定の時間間隔でアクセスのなかったARPテーブル内のエントリを削除しなければならない。そのため、各エントリにタイマを備え、タイマが満了になったエントリを検索して削除する動作が必要となる。よって、これら全てのエントリに対して、それぞれのタイマで管理するためのハードウェア資源を用意しなくてはならないという問題点があった。   However, the ARP table management apparatus found in the conventional example has the following problems. That is, when the configuration of a device in the network changes, an entry in the ARP table that has not been accessed at a certain time interval must be deleted so as to correspond to the increase / decrease in the network device or the change in topology. Therefore, it is necessary to provide an operation for providing each entry with a timer and searching for and deleting an entry whose timer has expired. Therefore, there is a problem that hardware resources to be managed by each timer must be prepared for all these entries.

また、ソフトウエアタイマを用いた場合ではCAMを用いて検索を高速化したにもかかわらずエントリ削除動作が低速になってしまうという問題点があった。
本発明は、上記問題点を解決することを目的とする。
Further, when the software timer is used, there is a problem that the entry deletion operation becomes slow although the search is speeded up using CAM.
The present invention aims to solve the above problems.

本発明のARPテーブル管理装置は、IPアドレスの入力によってMACアドレスを出力するARPテーブル管理装置であって、IPアドレスと時間情報を入力データとして登録アドレスを出力する連想メモリと、登録アドレスを入力アドレスとしてMACアドレスを出力するランダムアクセスメモリと、登録時間と検索時間を選択して前記連想メモリへの入力とするタイマコードセレクタと、外部入力される登録アドレスと前記連想メモリが出力する更新アドレスを選択して連想メモリアドレスへの入力とする第一のアドレスセレクタと、外部入力される登録アドレスと前記連想メモリが出力する更新アドレスを選択してRAMへの出力とする第二のアドレスセレクタと、前記連想メモリにおいて、入力データの任意のbitを無効化するMaskBitと、前記連想メモリへの入力データとして登録情報が一定時間で消去される動的な情報か永続的に保持する静的な情報かを示すTypeフィールドと、を備え、タイマコード入力をMaskすることでIPアドレスからMACアドレスへの変換を行い、IPアドレス入力をMaskすることで任意の時間情報を持つエントリを検索し、前記Typeフィールドにより動的な情報のみを削除可能なアドレスとして抽出ができることを特徴とする。 An ARP table management apparatus according to the present invention is an ARP table management apparatus that outputs a MAC address when an IP address is input, an associative memory that outputs a registration address using IP address and time information as input data, and a registration address as an input address. Select a random access memory that outputs a MAC address, a timer code selector that selects a registration time and a search time and inputs it to the associative memory, a registration address that is externally input, and an update address that the associative memory outputs A first address selector to be input to the associative memory address; a second address selector to select an externally input registration address and an update address output by the associative memory and output to the RAM; and Invalidate any bit of input data in associative memory comprising a AskBit, and a Type field indicating whether static information held or dynamic information permanently to be erased in the registration information of a predetermined time as input to the associative memory, to Mask the timer code input By converting the IP address to the MAC address, the IP address input is masked to search for an entry having arbitrary time information, and only the dynamic information can be extracted as an address that can be deleted by the Type field. It is characterized by that.

本発明によれば、IPアドレスからMACアドレスへの変換のほか、それぞれのエントリのエージング、およびタイムアウトしたエントリの抽出、使用してないエントリの抽出などの処理が可能となる。   According to the present invention, in addition to conversion from an IP address to a MAC address, it is possible to perform processing such as aging of each entry, extraction of time-out entries, and extraction of unused entries.

以下、添付図面を参照して、本発明の実施の形態を詳細に説明する。図1は、本発明の概念に基づく一実施形態であるARPテーブル管理装置の構成例を示した図である。本実施形態のIPアドレスの入力によってMACアドレスを出力するARPテーブル管理装置は、IPアドレスと時間情報を入力データとして登録アドレスを出力する連想メモリを有する。   Embodiments of the present invention will be described below in detail with reference to the accompanying drawings. FIG. 1 is a diagram showing a configuration example of an ARP table management apparatus according to an embodiment based on the concept of the present invention. The ARP table management apparatus that outputs a MAC address by inputting an IP address according to the present embodiment includes an associative memory that outputs a registered address using the IP address and time information as input data.

本実施形態に係るARPテーブル管理装置は、登録アドレスを入力アドレスとしてMACアドレスを出力するランダムアクセスメモリと、登録時間と検索時間を選択して連想メモリへの入力とするタイマコードセレクタとを有する。また、外部入力される登録アドレスと連想メモリ自身が出力する更新アドレスを選択して連想メモリアドレスへの入力とする第一のアドレスセレクタとを有する。また、外部入力される登録アドレスと連想メモリ自身が出力する更新アドレスを選択してRAMへの出力とする第二のアドレスセレクタと、前記連想メモリには入力データの任意のbitを無効化出来るMaskBitとを有する。このような構成の本実施形態は、タイマコード入力をMaskすることでIPアドレスからMACアドレスへの変換を行い、IPアドレス入力をMaskすることで任意の時間情報を持つエントリを検索する。
更には、前記連想メモリへの入力データとして登録情報が一定時間で消去される動的な情報か、永続的に保持する静的な情報かを示すTypeフィールドを備え、前記Typeフィールドにより動的な情報のみを削除可能なアドレスとして抽出ができる。また、連想メモリへの入力データとして登録情報が有効であるか無効であるかを示すStatusフィールドを備え、前記Statusフィールドにより検索対象を登録情報のみを対象とし、無効な登録情報を検索する。
The ARP table management apparatus according to the present embodiment includes a random access memory that outputs a MAC address using a registration address as an input address, and a timer code selector that selects a registration time and a search time and inputs them to an associative memory. In addition, it has a first address selector that selects an externally input registered address and an update address output by the associative memory itself and inputs it to the associative memory address. In addition, a second address selector that selects an externally input registered address and an update address output by the associative memory itself and outputs it to the RAM, and a mask bit that can invalidate any bit of input data in the associative memory. And have. In the present embodiment having such a configuration, the conversion from the IP address to the MAC address is performed by masking the timer code input, and an entry having arbitrary time information is searched by masking the IP address input.
In addition, a Type field indicating whether the registration information is dynamic information that is deleted in a certain time as input data to the associative memory or static information that is permanently retained is provided. Only information can be extracted as an address that can be deleted. In addition, a status field indicating whether registration information is valid or invalid as input data to the associative memory is provided, and the registration target is searched only for the registration information by the status field, and invalid registration information is searched.

図1において、101はIPアドレスを記憶する連想メモリ(CAM)、102はMACアドレスを記憶するランダムアクセスメモリ(RAM)、103および104はCAM/RAMに入力されるアドレスを選択するアドレスセレクタである。なお、103が本発明でいう第一のアドレスセレクタ、104が第二のアドレスセレクタに対応する。   In FIG. 1, 101 is an associative memory (CAM) for storing IP addresses, 102 is a random access memory (RAM) for storing MAC addresses, and 103 and 104 are address selectors for selecting addresses input to the CAM / RAM. . Note that 103 corresponds to the first address selector in the present invention, and 104 corresponds to the second address selector.

また105はタイマであり、106はアドレスセクタ104がARPエントリのエージング用のタイマ105の出力からのタイマコードもしくは検索用のタイマコードを選択するタイマコードセレクタである。まず、このARPテーブル管理システムへのエントリ登録手順について順を追って説明する。   Reference numeral 105 denotes a timer, and reference numeral 106 denotes a timer code selector for selecting the timer code from the output of the timer 105 for aging of the ARP entry or the search timer code by the address sector 104. First, an entry registration procedure in the ARP table management system will be described in order.

エントリ登録時にはQuery/Entry入力にはEntryを選択して入力する。これにより、101のCAM、102のRAMが書込動作モードとなり、103と104のアドレスセレクタは外部から入力されるCAM/RAMアドレスをそれどれCAMとRAMに入力する。そして106のタイマコードセレクタはCAMへの入力として105のタイマを選択するようにする。   At the time of entry registration, Entry is selected and input for Query / Entry input. As a result, the CAM 101 and the RAM 102 become the write operation mode, and the address selectors 103 and 104 input the CAM / RAM addresses inputted from the outside to the CAM and RAM, respectively. The timer code selector 106 selects the 105 timer as an input to the CAM.

エントリ登録動作時には入力情報としてCAM/RAMアドレス、IPアドレス(32bit)、Type/Status(2bit)、MACアドレス(48bit)が必要となる。   During the entry registration operation, CAM / RAM address, IP address (32 bits), Type / Status (2 bits), and MAC address (48 bits) are required as input information.

IPアドレスはCAMにデータとして入力し、MACアドレスはRAMにデータとして入力する。同時に、Type/Status情報はCAM/RAM共通のデータとして入力、105のタイマからの登録時のタイマコード出力をCAMにデータとして入力する。   The IP address is input as data to the CAM, and the MAC address is input as data to the RAM. At the same time, the Type / Status information is input as data common to the CAM / RAM, and the timer code output at the time of registration from the timer 105 is input to the CAM as data.

図6にCAM/RAMへの登録情報の一例を示す。本実施形態では、CAMのアドレス"0"にはIPアドレスとして"192.168.0.11"、登録時のタイムコードとして"01:30"、CAM/RAMのアドレス"0"に共通の情報として、Type="Dynamic"が入力される。また、Status="up"、RAMのアドレス"0"にMACアドレスとして"66:55:44:33:22:11"がそれぞれ入力されているものとする。検索時はIPアドレス、タイマコード、Type/Status情報のいずれかを利用しての検索が可能である。   FIG. 6 shows an example of registration information in the CAM / RAM. In this embodiment, the CAM address “0” has an IP address “192.168.0.11”, a registration time code “01:30”, and a CAM / RAM address “0”. As a result, Type = “Dynamic” is input. Further, it is assumed that “66: 55: 44: 33: 22: 11” is input as the MAC address to Status = “up” and the RAM address “0”. When searching, it is possible to search using any of the IP address, timer code, and Type / Status information.

これら入力される情報のうち、検索に使用しない情報はMask情報を入力して検索対象から外すことが可能である。Mask情報入力はIPアドレス、タイマコード、Type/Status情報の検索情報にbit単位で対応している。   Of these input information, information that is not used for the search can be excluded from the search target by inputting Mask information. Mask information input corresponds to search information of IP address, timer code, and Type / Status information in units of bits.

ここで、図6のCAM/RAMの内容で"192.168.0.11"をキーとして検索した結果としてMACアドレスを出力させるまでの手順について説明する。CAM101による検索の結果、符合するエントリが存在する場合には"Match"出力と共にCAM AdrsがCAM101から出力される。   Here, the procedure until the MAC address is output as a result of searching using “192.168.0.11” as a key in the contents of the CAM / RAM in FIG. 6 will be described. If there is a matching entry as a result of the search by the CAM 101, the CAM Adrs is output from the CAM 101 together with the “Match” output.

まず、動作モードとして検索モードとして動作するのでこれによりCAM101、RAM102ともに読み出しモードで動作する。104のアドレスセレクタは検索動作時にはCAM Adrsを選択おり、CAM101から出力されるアドレスはRAMアドレスとして入力される。入力する検索キーとしてはIPアドレスとして"192.168.0.11"、Statusとして"Up"のエントリを検索することになる。   First, since the search mode is operated as the operation mode, both the CAM 101 and the RAM 102 operate in the read mode. The address selector 104 selects CAM Adrs during the search operation, and the address output from the CAM 101 is input as a RAM address. As a search key to be input, an entry with “192.168.0.11” as the IP address and “Up” as the Status is searched.

他の入力情報、つまりエントリのタイプとタイマコードは検索対象から外すようにマスクコードを入力する。その結果、アドレス="0"および、有効なアドレスが出力したことを示す"Mactch"がCAM101から出力される。これらの出力はRAM102のアドレスおよびイネーブル情報として入力される。RAM102はアドレス="0"の内容をデータとして出力するのでMACアドレス="66:55:44:33:22:11"とType="d"と、Status="Up"を出力する。   The mask code is input so that other input information, that is, the entry type and the timer code are excluded from the search target. As a result, CAM 101 outputs address = “0” and “Match” indicating that a valid address has been output. These outputs are input as the address of the RAM 102 and enable information. Since the RAM 102 outputs the content of the address = “0” as data, the MAC address = “66: 55: 44: 33: 22: 11”, Type = “d”, and Status = “Up” are output.

このようにしてIPアドレスからそのIPアドレスに対応するMACアドレスが出力される。   In this way, the MAC address corresponding to the IP address is output from the IP address.

続いて、CAM101に登録しているタイマコードを更新する動作を行う。これによりCAM101が検索したエントリに検索した時点でのタイマコードのみが更新される。検索結果として出力されたCAMアドレスはRAM102に加えられる一方で、CAM101のアドレス入力としてフィードバックしており、さらに"Macth"出力もCAM101および103のアドレスセレクタにフィードバックしている。   Subsequently, an operation for updating the timer code registered in the CAM 101 is performed. As a result, only the timer code at the time of searching the entry searched by the CAM 101 is updated. While the CAM address output as a search result is added to the RAM 102, it is fed back as an address input of the CAM 101, and the “Macth” output is also fed back to the address selectors of the CAMs 101 and 103.

これによりCAM101は検索モードから登録モードに移行し、アドレスセレクタにはCAM101自身が出力したアドレスが登録アドレスとして入力される。タイマコードの入力にはタイマ105からの更新時のタイマコードが入力され、他のIPアドレスやType/Status情報などのデータ入力に対してはMaskがかけられる。これによりタイマコードのみが更新される。   As a result, the CAM 101 shifts from the search mode to the registration mode, and the address output by the CAM 101 itself is input as a registration address to the address selector. The timer code at the time of update from the timer 105 is input to the input of the timer code, and Mask is applied to data input such as other IP addresses and Type / Status information. As a result, only the timer code is updated.

以上のように登録時と、IPアドレスからMACアドレスを得る場合の検索時の動作について説明した。続いて、削除対象となるエントリの検索について説明する。   As described above, the operation at the time of registration and the search at the time of obtaining the MAC address from the IP address has been described. Next, searching for an entry to be deleted will be described.

従来例で説明したようにネットワークの動的な変更に対応するためにARPテーブルは登録、検索など一定以上時間が経ったダイナミックなエントリは削除しなければならない。先に説明したようにCAM101の各エントリにはタイマコードとして登録・検索した時点での時刻情報が記載されている。このことから時刻情報を検索キーとしてCAMによる検索を行うことが可能である。   As described in the conventional example, in order to cope with the dynamic change of the network, the ARP table must delete dynamic entries such as registration and search that have passed a certain period of time. As described above, each entry of the CAM 101 includes time information at the time of registration / retrieval as a timer code. From this, it is possible to perform a search by CAM using time information as a search key.

仮にタイマコードを8bitとして毎秒カウントアップするタイマとすると、最大255秒のカウントが可能である。   If the timer code is 8 bits and the timer counts up every second, a maximum of 255 seconds can be counted.

最後のアクセスから60秒経過したエントリを検索する場合、現在時刻を示すタイマの出力から60を減算した値、Statusが有効であることを示すStatus=up、動的なエントリであることを示すType=dynamicを検索キーとする。そして、他のIPアドレスやType情報にMaskをかけて検索する。   When searching for an entry in which 60 seconds have passed since the last access, a value obtained by subtracting 60 from the output of the timer indicating the current time, Status = up indicating that Status is valid, and Type indicating that it is a dynamic entry = Dynamic is the search key. Then, a search is performed by masking another IP address or Type information.

この検索でMacth出力があった場合に出力されたresultアドレスが、登録・検索してから60秒経過したエントリのアドレスである。エントリから削除するためには当該エントリのresultアドレスをレファレンスアドレスとして入力し、Status入力を"down"として登録すればエントリの削除が完了となる。   The result address that is output when there is a Mact output in this search is the address of an entry that has passed 60 seconds after registration and search. In order to delete an entry from the entry, the result address of the entry is input as a reference address, and if the Status input is registered as “down”, the deletion of the entry is completed.

該当するエントリが複数存在した場合、先のエントリを削除した後に再度同じタイマコード、Statusで検索したときに異なるCAM/RAMアドレスでMacth出力が得られる。ここで得られたCAM/RAMアドレスも同様に削除を行い、Unmatch出力が得られるまで繰り返す。   When there are a plurality of corresponding entries, a Machin output is obtained with a different CAM / RAM address when searching again with the same timer code and status after deleting the previous entry. The CAM / RAM address obtained here is deleted in the same manner, and the process is repeated until an Unmatch output is obtained.

以上の作業を毎秒実施することで最後のアクセスから60秒以上経過したエントリを抽出し、削除することが可能となる。さらにタイマコードの下位nビットをMaskして検索することで2^n[秒]に一度の検索−削除も可能であることを付け加えておく。   By performing the above operation every second, it is possible to extract and delete an entry that has passed 60 seconds or more since the last access. Furthermore, it is added that the search and deletion can be performed once in 2 ^ n [seconds] by masking and searching the lower n bits of the timer code.

最後に、新たにエントリを登録する際に未使用のエントリを検索する場合はStatus情報が"down"であることのみを検索キーとして抽出できたresultアドレスが未使用のエントリとなる。このresultアドレスをレファレンスアドレスとして使用することが可能である。ここで空きエントリが抽出出来なかった場合は最後のアクセスから最も時間が経過したエントリから削除してゆく。   Finally, when searching for an unused entry when registering a new entry, a result address that can be extracted using only the status information “down” as a search key becomes an unused entry. This result address can be used as a reference address. If a free entry cannot be extracted here, the entry is deleted from the entry with the most time since the last access.

この最後のアクセスから最も時間が経過したエントリを検索するためには、単純な方法として検索タイマコードを"1ずつ"減算してゆく方式がある。また、検索タイマコードの下位ビットをMaskして検索範囲を広げてから徐々にMaskビットの上位からMaskから外すことで検索を絞り込む方式などが用いられる。   In order to search for an entry whose time has elapsed since the last access, there is a simple method in which the search timer code is subtracted "one by one". In addition, a method of narrowing down the search by gradually removing the mask bits from the mask from the higher bits after masking the lower bits of the search timer code to widen the search range is used.

なお、本発明を実現するために、上述した実施形態の機能を実現するソフトウェアのプログラムコード(コンピュータプログラム)を記録した記憶媒体を用いても良い。この場合には記憶媒体をシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(又はCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによって本発明の目的が達成される。   In order to realize the present invention, a storage medium in which a program code (computer program) of software that realizes the functions of the above-described embodiments may be used. In this case, the object of the present invention is achieved by supplying the storage medium to the system or apparatus, and the computer (or CPU or MPU) of the system or apparatus reads and executes the program code stored in the storage medium.

この場合、記憶媒体から読み出されたプログラムコード自体が上述した実施形態の機能を実現することになり、プログラムコード自体及びそのプログラムコードを記憶した記憶媒体は本発明を構成することになる。   In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the program code itself and the storage medium storing the program code constitute the present invention.

プログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。   As a storage medium for supplying the program code, for example, a flexible disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.

また、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(基本システム或いはオペレーティングシステム)等が実際の処理の一部又は全部を行う場合も含まれることは言うまでもない。   Needless to say, the OS (basic system or operating system) running on the computer performs part or all of the actual processing based on the instruction of the program code.

さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれてもよい。この場合には、書き込まれたプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部又は全部を行ってもよい。   Furthermore, the program code read from the storage medium may be written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. In this case, based on the instruction of the written program code, the CPU or the like provided in the function expansion board or function expansion unit may perform part or all of the actual processing.

本発明の実施の形態に係るARPテーブル管理装置の一例を示した図である。It is the figure which showed an example of the ARP table management apparatus which concerns on embodiment of this invention. ネットワークの構成例を示した図である。It is the figure which showed the structural example of the network. RFC826に記述されているARPパケットのフォーマットを示した図である。It is the figure which showed the format of the ARP packet described in RFC826. IP−MAC変換テーブルの一例を示した図である。It is the figure which showed an example of the IP-MAC conversion table. 従来例におけるCAMを使用したIP−MAC変換するARPテーブル管理装置を示した図である。It is the figure which showed the ARP table management apparatus which performs IP-MAC conversion using CAM in a prior art example. 本発明の実施の形態に係るIP−MAC変換テーブルの一例を示した図である。It is the figure which showed an example of the IP-MAC conversion table which concerns on embodiment of this invention.

符号の説明Explanation of symbols

101 連想メモリ
102 ランダムアクセスメモリ
103 アドレスセレクタ
104 アドレスセレクタ
105 タイマ
106 タイマコードセレクタ
501 連想メモリ
502 ランダムアクセスメモリ
503 アドレスセレクタ
504 アドレスエンコーダ
505 タイマ
506 アドレスデコーダ
101 Associative Memory 102 Random Access Memory 103 Address Selector 104 Address Selector 105 Timer 106 Timer Code Selector 501 Associative Memory 502 Random Access Memory 503 Address Selector 504 Address Encoder 505 Timer 506 Address Decoder

Claims (2)

IPアドレスの入力によってMACアドレスを出力するARPテーブル管理装置であって、
IPアドレスと時間情報を入力データとして登録アドレスを出力する連想メモリと、
登録アドレスを入力アドレスとしてMACアドレスを出力するランダムアクセスメモリと、
登録時間と検索時間を選択して前記連想メモリへの入力とするタイマコードセレクタと、
外部入力される登録アドレスと前記連想メモリが出力する更新アドレスを選択して連想メモリアドレスへの入力とする第一のアドレスセレクタと、
外部入力される登録アドレスと前記連想メモリが出力する更新アドレスを選択してRAMへの出力とする第二のアドレスセレクタと、
前記連想メモリにおいて、入力データの任意のbitを無効化するMaskBitと
前記連想メモリへの入力データとして登録情報が一定時間で消去される動的な情報か、永続的に保持する静的な情報かを示すTypeフィールドと、
を備え、
タイマコード入力をMaskすることでIPアドレスからMACアドレスへの変換を行い、IPアドレス入力をMaskすることで任意の時間情報を持つエントリを検索し、前記Typeフィールドにより動的な情報のみを削除可能なアドレスとして抽出ができることを特徴とするARPテーブル管理装置。
An ARP table management device that outputs a MAC address by inputting an IP address,
An associative memory that outputs a registered address using IP address and time information as input data;
A random access memory that outputs a MAC address using a registered address as an input address;
A timer code selector for selecting a registration time and a search time to be input to the associative memory;
A first address selector that selects a registration address that is input externally and an update address that is output from the associative memory, and inputs the address to the associative memory address;
A second address selector for selecting an externally input registered address and an update address output by the associative memory to output to the RAM;
In the associative memory, MaskBit for invalidating an arbitrary bit of input data ;
A Type field that indicates whether the registration information is dynamic information that is deleted in a predetermined time as input data to the associative memory or static information that is permanently retained;
With
By masking the timer code input, conversion from IP address to MAC address is performed. By entering the IP address mask, an entry having any time information can be searched, and only dynamic information can be deleted by the Type field. An ARP table management apparatus characterized in that it can be extracted as a unique address .
連想メモリへの入力データとして登録情報が有効であるか無効であるかを示すStatusフィールドを備え、
前記Statusフィールドにより検索対象を登録情報のみを対象とし、無効な登録情報を検索することを特徴とする請求項1に記載のARPテーブル管理装置。
A Status field indicating whether registration information is valid or invalid as input data to the associative memory;
2. The ARP table management apparatus according to claim 1, wherein invalid registration information is searched for only registration information as a search target by the Status field.
JP2008200125A 2008-08-01 2008-08-01 ARP table management device Expired - Fee Related JP5258442B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008200125A JP5258442B2 (en) 2008-08-01 2008-08-01 ARP table management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008200125A JP5258442B2 (en) 2008-08-01 2008-08-01 ARP table management device

Publications (2)

Publication Number Publication Date
JP2010041248A JP2010041248A (en) 2010-02-18
JP5258442B2 true JP5258442B2 (en) 2013-08-07

Family

ID=42013342

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008200125A Expired - Fee Related JP5258442B2 (en) 2008-08-01 2008-08-01 ARP table management device

Country Status (1)

Country Link
JP (1) JP5258442B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5588894B2 (en) * 2011-02-23 2014-09-10 日本電信電話株式会社 Layer 2 address cache update control method, apparatus and program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3842417B2 (en) * 1997-12-25 2006-11-08 株式会社東芝 ATM switch
JP4156112B2 (en) * 1998-12-25 2008-09-24 富士通株式会社 High-speed search method and high-speed search device
JP2004282421A (en) * 2003-03-17 2004-10-07 Matsushita Electric Ind Co Ltd Associative storage memory with shifting function and address retrieving device

Also Published As

Publication number Publication date
JP2010041248A (en) 2010-02-18

Similar Documents

Publication Publication Date Title
US7760720B2 (en) Translating native medium access control (MAC) addresses to hierarchical MAC addresses and their use
JP4008049B2 (en) Address transmitting apparatus, address transmitting method and address transmitting system
US7443841B2 (en) Longest prefix matching (LPM) using a fixed comparison hash table
US20030200318A1 (en) Apparatus and method for NAT/NAPT session management
JP2003283578A (en) Protocol converting method and apparatus
US7599364B2 (en) Configurable network connection address forming hardware
CN109921995B (en) Method for configuring address table, FPGA and network equipment applying FPGA
US20060023744A1 (en) Network address-port translation apparatus and method for IP fragment packets
TWI241089B (en) Method and apparatus to perform network routing using multiple length trie blocks
US10897422B2 (en) Hybrid routing table for routing network traffic
US7385983B2 (en) Network address-port translation apparatus and method
US7349981B2 (en) System, apparatus, and method for string matching
JP6104406B2 (en) Method and processing device for handling network protocol addresses
US7948916B2 (en) Method and apparatus for discovering topology information in a network
KR100514742B1 (en) Apparatus and method for determining next hop address by using unified cache
JP6678401B2 (en) Method and apparatus for dividing a packet into individual layers for change and joining the layers after change by information processing
CN105187330B (en) Method for identifying packet structure using unique packet identifier and network switch
JP5258442B2 (en) ARP table management device
JP2004364109A (en) Temporary address communication apparatus, program, recording medium and method
KR20150146405A (en) Method of modifying packets to a generic format for enabling programmable modifications and an apparatus thereof
CN111935019A (en) Digital object addressing method, device and equipment and storage medium
JP3376941B2 (en) Router device
KR20150146421A (en) Method of using bit vectors to allow expansion and collapse of header layers within packets for enabling flexible modifications and an apparatus thereof
JPH11284658A (en) Longest coincident retrieval device
CN109246014A (en) The method that a kind of pair of IP address carries out Fast Classification

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110801

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121018

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121106

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121212

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: 20130423

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

Free format text: PAYMENT UNTIL: 20160502

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees