JP2011172201A - Address translation apparatus and method of managing address translation table - Google Patents

Address translation apparatus and method of managing address translation table Download PDF

Info

Publication number
JP2011172201A
JP2011172201A JP2010119998A JP2010119998A JP2011172201A JP 2011172201 A JP2011172201 A JP 2011172201A JP 2010119998 A JP2010119998 A JP 2010119998A JP 2010119998 A JP2010119998 A JP 2010119998A JP 2011172201 A JP2011172201 A JP 2011172201A
Authority
JP
Japan
Prior art keywords
address
entry
time
registered
udp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2010119998A
Other languages
Japanese (ja)
Other versions
JP5380363B2 (en
Inventor
Yasuhito Shimizu
康仁 清水
Yasuyuki Suetsugu
泰之 末次
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.)
Alaxala Networks Corp
Original Assignee
Alaxala Networks Corp
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 Alaxala Networks Corp filed Critical Alaxala Networks Corp
Priority to JP2010119998A priority Critical patent/JP5380363B2/en
Publication of JP2011172201A publication Critical patent/JP2011172201A/en
Application granted granted Critical
Publication of JP5380363B2 publication Critical patent/JP5380363B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To suppress setup faults of TCP connection, UDP connection caused by the lack of empty entries in an address translation table, with respect to an address translation apparatus. <P>SOLUTION: The address translation apparatus includes: an address translation table wherein first and second addresses are made correspond to associated times associated with a CLOSED time of TCP connection; and an address management section for retrieving a release scheduled entry of which the CLOSED time is temporally preceding to the present time, and overwrites and registers the newly corresponding first and second addresses into the release scheduled entry. In addition, the address translation table of the address translation apparatus includes a UDP connection state determining section for holding a time associated with a session generation time for UDP connection and determining whether or not the UDP connection is set up. The address management section overwrites and registers a pair of addresses into the entry being in a UDP connection non-setup state and after the lapse of a predetermined time from session generation. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、通信用アドレスの変換に関するものである。   The present invention relates to communication address conversion.

グローバルIP(Internet Protocol)アドレスとプライベートIPアドレスとを相互に変換するアドレス変換装置が、インターネットサービスプロバイダ(ISP)において用いられる。ISPにおいて用いられるアドレス変換装置は、LSN(Large Scale NAT)と呼ばれ、収容ユーザ数が多く、また、各ユーザごとに多数のTCP(Transmission Control Protocol)接続(TCPコネクション又はTCPのセッションとも呼ぶ)を許容するので、管理すべきTCP接続の数が非常に多い(下記特許文献1)。   An address translation device that mutually translates a global IP (Internet Protocol) address and a private IP address is used in an Internet service provider (ISP). An address translation device used in ISP is called LSN (Large Scale NAT), has a large number of accommodated users, and has a large number of TCP (Transmission Control Protocol) connections (also called TCP connections or TCP sessions) for each user. Therefore, the number of TCP connections to be managed is very large (Patent Document 1 below).

またUDP(User Datagram Protocol)接続(UDPコネクションまたはUDPのセッションとも呼ぶ)もTCPと同じく、ユーザ毎に管理する必要がある。   Also, UDP (User Datagram Protocol) connection (also referred to as UDP connection or UDP session) needs to be managed for each user as in TCP.

アドレス変換装置では、TCP接続ごとに、TCP接続に関する情報を記録したエントリがアドレス変換テーブルに登録される。アドレス変換テーブルの各エントリには、TCP接続に関する情報として、グローバルIPアドレス及びプライベートIPアドレスに加え、メモリから接続に関する情報を削除可能となる時刻に関するパラメータが含まれ得る。このパラメータとは、具体的には、TCP接続が閉塞する際に、TCP接続がTIME_WAIT状態となってからCLOSED状態に遷移するまでの期間(以下、「メモリ解放待ち期間」と呼ぶ)を意味する。   In the address translation device, for each TCP connection, an entry recording information related to the TCP connection is registered in the address translation table. Each entry of the address translation table may include a parameter relating to the time at which connection information can be deleted from the memory in addition to the global IP address and private IP address as information relating to the TCP connection. Specifically, this parameter means a period (hereinafter referred to as “memory release waiting period”) from when the TCP connection is changed to the CLOSED state after the TCP connection enters the TIME_WAIT state when the TCP connection is blocked. .

UDP接続も同様で、UDP接続ごとに、UDP接続に関する情報を記録したエントリがアドレス変換テーブルに登録される。アドレス変換テーブルの各エントリには、UDP接続に関する情報として、グローバルIPアドレス及びプライベートIPアドレスに加え、メモリから接続に関する情報を削除可能となる時刻に関するパラメータが含まれ得る。このパラメータとは、具体的には、エントリ生成から削除までのある所定の期間(以下、「UDPセッション期間」と呼ぶ)を意味する。   The same applies to the UDP connection. For each UDP connection, an entry in which information related to the UDP connection is recorded is registered in the address conversion table. Each entry of the address translation table may include a parameter relating to time at which connection information can be deleted from the memory in addition to the global IP address and private IP address as information relating to the UDP connection. Specifically, this parameter means a predetermined period from entry generation to deletion (hereinafter referred to as “UDP session period”).

メモリ解放待ち期間をカウントするために、エイジングカウンタが用いられ得る。例えば、或るTCP接続がTIME_WAIT状態となった際に、対応するエントリにおいてメモリ解放待ち期間として所定のカウント値が登録され、その後、エイジングカウンタ値が減少して0となった場合にTCP接続に関する情報が削除される。TCP接続に関する情報が削除されたエントリは、新たなTCP接続に関する情報の登録に用いられる。エイジングカウンタ値の更新は、アドレス変換テーブルにおいてメモリ解放待ち期間が登録されているエントリが検索され、各エントリのメモリ解放待ち期間が順番に1単位時間ずつカウントダウン(デクリメント)されることで実現される。   An aging counter can be used to count the memory release wait period. For example, when a certain TCP connection enters the TIME_WAIT state, a predetermined count value is registered as a memory release waiting period in the corresponding entry, and thereafter, when the aging counter value decreases to 0, the TCP connection related Information is deleted. The entry from which the information related to the TCP connection is deleted is used to register information related to the new TCP connection. The update of the aging counter value is realized by searching for an entry in which a memory release waiting period is registered in the address conversion table and counting down (decrementing) the memory release waiting period of each entry in order by one unit time. .

UDPセッション期間も同様にエイジングカウンタによりカウントされる。エントリ生成時に所定のカウント値が登録され、その後、エイジングカウンタ値が減少して0となった場合にUDP接続に関する情報が削除される。UDP接続に関する情報が削除されたエントリは、新たなUDP接続に関する情報の登録に用いられる。エイジングカウンタ値の更新は、アドレス変換テーブルにおいてUDPセッション期間が登録されているエントリが検索され、各エントリのUDPセッション期間が順番に1単位時間ずつデクリメントされることで実現される。   The UDP session period is similarly counted by the aging counter. A predetermined count value is registered at the time of entry generation, and then information on the UDP connection is deleted when the aging counter value decreases to zero. The entry from which the information related to the UDP connection is deleted is used to register information related to the new UDP connection. The update of the aging counter value is realized by searching for an entry in which the UDP session period is registered in the address conversion table and decrementing the UDP session period of each entry by one unit time in order.

特開2009−267522号公報JP 2009-267522 A

LSNのアドレス変換テーブルに登録されるエントリ数は非常に多いので、全てのエントリのメモリ解放待ち期間を1単位時間分デクリメントするには長期間(例えば、200秒)を要する。それゆえ、LSNの各エントリでは、TIME_WAIT状態になった後にエイジングカウンタ値が0となるまでに長期間を要することとなる。一般に、メモリ開放待ち期間は、TCPセグメントがインターネット内に存在可能な最大期間(最大セグメント有効期間:MSL)の2倍の期間として規定されており、120秒が推奨値とされる。したがって、従来のLSNでは、メモリ解放待ち期間(例えば120秒)が過ぎてメモリを解放しても構わないタイミングが到来しても、エイジングカウンタ値が0とならないためメモリを解放できないという問題があった。この場合、新たなTCP接続の要求があっても、アドレス変換テーブルに空きエントリがないために接続が確立できないおそれがあった。   Since the number of entries registered in the LSN address translation table is very large, it takes a long time (for example, 200 seconds) to decrement the memory release waiting period of all entries by one unit time. Therefore, in each LSN entry, it takes a long time for the aging counter value to become 0 after entering the TIME_WAIT state. In general, the memory release waiting period is defined as a period twice as long as the TCP segment can exist in the Internet (maximum segment valid period: MSL), and a recommended value is 120 seconds. Therefore, the conventional LSN has a problem that the memory cannot be released because the aging counter value does not become 0 even when the memory release waiting period (for example, 120 seconds) has passed and the timing at which the memory can be released comes. It was. In this case, even if there is a request for a new TCP connection, there is a possibility that the connection cannot be established because there is no empty entry in the address translation table.

次に、LSNにおけるUDP接続では、UDPセッション期間は、最長数十時間のオーダーで求められる場合がある。その結果、いくつかのUDP通信においては、実通信が停止しているにもかかわらず、エイジングタイマが0になるまでの長時間、アドレス変換装置上では該当するUDPセッションが削除されず残ることとなる。   Next, in a UDP connection at the LSN, the UDP session period may be determined on the order of up to several tens of hours. As a result, in some UDP communications, although the actual communications are stopped, the corresponding UDP session remains on the address translation device without being deleted for a long time until the aging timer becomes zero. Become.

さらにLSNにおいては、ユーザの公平性を保持するため、ユーザごとに保持できるアドレス変換テーブルエントリ数は制限されている。このような場合、上述のように、長時間のUDPセッションを保持し続けることで、実通信は終了しているにもかかわらず、アドレス変換テーブルに空きがないため、新規UDP接続受付が出来ない状況が顕著に発生しうる。   Further, in the LSN, the number of address translation table entries that can be held for each user is limited in order to maintain user fairness. In such a case, as described above, it is impossible to accept a new UDP connection because there is no space in the address conversion table even though the actual communication is completed by continuing to hold a long UDP session. The situation can occur significantly.

なお、この問題は、グローバルIPアドレスとプライベートIPアドレスとのアドレス変換に限らず、プライベートIPアドレス同士のアドレス変換においても発生し得る。また、IPアドレスに限らず、IPX(Internetwork Packet eXchange)で用いられるアドレスなど、通信に用いられる任意のアドレスを変換する場合にも発生し得る。   This problem can occur not only in address conversion between a global IP address and a private IP address but also in address conversion between private IP addresses. Moreover, it may occur not only when an IP address is used, but also when an arbitrary address used for communication such as an address used in IPX (Internetwork Packet eXchange) is converted.

本発明は、アドレス変換装置において、アドレス変換テーブルにおける空きエントリ不足によるTCP接続、UDP接続の確立失敗を抑制することを目的とする。   An object of the present invention is to suppress a TCP connection and UDP connection establishment failure due to a lack of empty entries in an address translation table in an address translation device.

本発明は、上述の課題の少なくとも一部を解決するためになされたものであり、以下の形態又は適用例として実現することが可能である。   SUMMARY An advantage of some aspects of the invention is to solve at least a part of the problems described above, and the invention can be implemented as the following forms or application examples.

[適用例1]アドレス変換装置であって、複数のエントリを有し、各エントリにおいて、第1のアドレスと、第2のアドレスと、前記第1のアドレス及び前記第2のアドレスを用いたTCP接続がCLOSED状態となる時刻であるCLOSED時刻と関連する時刻である関連時刻と、が互いに対応付けられて登録されるアドレス変換テーブルと、現在時刻を取得する時刻取得部と、前記TCP接続がTIME_WAIT状態になると、前記取得された現在時刻に基づき前記関連時刻を決定する関連時刻決定部と、アドレス管理部であって、TIME_WAIT状態になった前記TCP接続に対応する前記アドレス変換テーブルのエントリに、前記決定された関連時刻を登録し、アドレス変換要求に基づき第1のアドレスと第2のアドレスとを対応付け、前記アドレス変換テーブルに登録されている前記関連時刻と前記現在時刻とに基づき、前記CLOSED時刻が前記現在時刻よりも時間的に以前のエントリである解放予定エントリを検索し、前記新たに対応付けた第1のアドレス及び第2のアドレスを、前記解放予定エントリのいずれかに上書き登録する、アドレス管理部と、を備える、アドレス変換装置。   [Application Example 1] An address conversion apparatus having a plurality of entries, and each entry uses a first address, a second address, and a TCP using the first address and the second address. An address conversion table in which a related time that is related to a CLOSED time that is a time when the connection is in the CLOSED state is registered in association with each other, a time acquisition unit that acquires the current time, and the TCP connection is TIME_WAIT When a state is reached, an associated time determination unit that determines the associated time based on the acquired current time, and an address management unit, in an entry of the address conversion table corresponding to the TCP connection in the TIME_WAIT state, The determined related time is registered, and based on the address conversion request, the first address and the second address Based on the association time and the current time registered in the address conversion table, search for a release-scheduled entry in which the CLOSED time is earlier than the current time, and newly An address translation device comprising: an address management unit that overwrites and registers the associated first address and second address in one of the release-scheduled entries.

適用例1のアドレス変換装置では、新たなアドレス変換要求があった場合、アドレス変換テーブルに登録されているCLOSED時刻が現在時刻よりも時間的に以前のエントリ(解放予定エントリ)に、新たに対応付けられた第1のアドレス及び第2のアドレスを上書き登録するので、空きエントリ不足によるTCP接続の確立失敗を抑制することができる。解放予定エントリに対応するTCP接続については、TCP接続がTIME_WAIT状態となってからCLOSED状態に遷移するまでの期間として規定されている期間(メモリ解放待ち期間)は既に満了している、またはちょうど満了する。したがって、第1のアドレス及び第2のアドレスを上書き登録しても問題は生じない。   In the address translation device according to the application example 1, when there is a new address translation request, the entry corresponding to the CLOSED time registered in the address translation table is temporally earlier than the current time (scheduled entry) is newly supported. Since the appended first address and second address are overwritten and registered, TCP connection establishment failure due to insufficient empty entries can be suppressed. For the TCP connection corresponding to the entry scheduled to be released, the period (memory release waiting period) defined as the period from when the TCP connection enters the TIME_WAIT state until it transitions to the CLOSED state has already expired or has just expired. To do. Therefore, no problem occurs even if the first address and the second address are overwritten and registered.

[適用例2]適用例1に記載のアドレス変換装置において、前記アドレス管理部は、第1のアドレスと第2のアドレスとを新たに対応付けると、前記アドレス変換テーブルに空きエントリがあるか否かを判定し、前記空きエントリがある場合には、前記空きエントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを登録し、前記空きエントリが無い場合には、前記解放予定エントリのうち最も時間的に前となるエントリである最古エントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを上書き登録する、アドレス変換装置。   Application Example 2 In the address translation device according to Application Example 1, when the address management unit newly associates the first address with the second address, whether or not there is an empty entry in the address translation table. If the empty entry exists, the first address and the second address newly associated with the empty entry are registered, and if there is no empty entry, the release entry An address translation apparatus for overwriting and registering the newly associated first address and second address in the oldest entry, which is the entry that is the earliest in time.

このような構成により、時刻取得部の故障等により、時刻取得部が実際の現在時刻よりも早い時刻を取得した場合であっても、空きエントリがあれば、空きエントリに新たに対応付けられた第1のアドレス及び第2のアドレスが登録されるので、実際のCLOSED時刻に達していないTCP接続に対応するエントリに、第1のアドレス及び第2のアドレスを誤って上書き登録することを抑制できる。また、空きエントリがある場合には、CLOSED時刻が現在時刻よりも時間的に以前のエントリである解放予定エントリを検索する処理を省略できるので、かかる処理負担を軽減できる。また、このような構成により、エイジングカウンタを用いてメモリ解放待ち期間をカウントする構成にも適用することができる。すなわち、空きエントリが存在する程度の数のTCP接続が確立される場合には、エイジングカウンタを用いてTIME_WAIT状態からCLOSED状態までの期間を管理し、CLOSED状態となったTCP接続について、対応するエントリを空きエントリに変更(更新)させることができる。したがって、このような場合には、TIME_WAIT状態からCLOSED状態までの期間を、比較的処理負担の軽いエイジングカウンタを用いたカウントにより実現できる。それゆえ、アドレス変換装置全体としての処理負荷を軽減できる。   With such a configuration, even if the time acquisition unit acquires a time earlier than the actual current time due to a failure of the time acquisition unit, etc., if there is an empty entry, it is newly associated with the empty entry. Since the first address and the second address are registered, it is possible to suppress erroneously overwriting and registering the first address and the second address in the entry corresponding to the TCP connection that has not reached the actual CLOSED time. . In addition, when there is an empty entry, the processing for searching for a release-scheduled entry whose CLOSED time is earlier than the current time can be omitted, so that the processing load can be reduced. Further, such a configuration can also be applied to a configuration in which the memory release waiting period is counted using an aging counter. That is, when TCP connections are established in such a number that there are empty entries, the aging counter is used to manage the period from the TIME_WAIT state to the CLOSED state, and for the TCP connection in the CLOSED state, the corresponding entry Can be changed (updated) to an empty entry. Therefore, in such a case, the period from the TIME_WAIT state to the CLOSED state can be realized by counting using an aging counter with a relatively light processing load. Therefore, the processing load of the entire address translation device can be reduced.

[適用例3]適用例2に記載のアドレス変換装置において、さらに、TIME_WAIT状態となった前記TCP接続に対応する前記アドレス変換テーブルにおけるエントリの識別子を登録するTCP解放待ちテーブルを備え、前記アドレス管理部は、前記TCP接続がTIME_WAIT状態になると、前記アドレス変換テーブルにおいて前記TCP接続に対応するエントリの識別子であるエントリ識別子を、前記TCP解放待ちテーブルに登録順序が明確になるように登録し、前記空きエントリが無い場合には、前記TCP解放待ちテーブルにおいて時間的に最も前に登録された前記エントリ識別子である最古エントリ識別子を取得し、前記最古エントリ識別子の示す前記アドレス変換テーブルにおけるエントリに登録されている前記関連時刻と前記現在時刻とに基づき、前記エントリに対応する前記CLOSED時刻が、前記現在時刻よりも時間的に以前となるか否かを判定し、前記現在時刻よりも時間的に以前となる場合には、前記エントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを上書き登録し、前記現在時刻よりも時間的に以前とならない場合には、前記新たに対応付けた第1のアドレス及び第2のアドレスを、前記アドレス変換テーブルに登録しない、アドレス変換装置。   [Application Example 3] The address translation device according to Application Example 2, further comprising a TCP release waiting table for registering an identifier of an entry in the address translation table corresponding to the TCP connection in the TIME_WAIT state, and the address management When the TCP connection is in a TIME_WAIT state, the unit registers an entry identifier that is an identifier of an entry corresponding to the TCP connection in the address conversion table so that a registration order is clear in the TCP release waiting table, If there is no empty entry, the oldest entry identifier which is the entry identifier registered earlier in time in the TCP release waiting table is acquired, and the entry in the address conversion table indicated by the oldest entry identifier is acquired. Registered functions Based on the time and the current time, it is determined whether or not the CLOSED time corresponding to the entry is temporally earlier than the current time, and when the temporal time is earlier than the current time Overwrites and registers the newly associated first address and second address in the entry, and if it is not earlier than the current time, the newly associated first address And an address translation device that does not register the second address in the address translation table.

このような構成により、TCP解放待ちテーブルでは登録順序が明確になるようにエントリ識別子が登録されるので、アドレス変換テーブルにおいてCLOSED時刻が時間的に最も前となるエントリを簡単に見つけることができる。加えて、CLOSED時刻が時間的に最も前となるエントリに登録されているCLOSED時刻が現在時刻よりも時間的に前となるか否かを判定することにより、他のエントリに登録されているCLOSED時刻が現在時刻よりも時間的に以前であるか否かを判定できる。したがって、アドレス変換テーブルにおいて、CLOSED時刻が現在時刻よりも時間的に以前となるエントリの有無を短時間で判定することができる。   With such a configuration, entry identifiers are registered in the TCP release waiting table so that the registration order is clear, so it is possible to easily find the entry whose CLOSED time is the earliest in the address translation table. In addition, by determining whether or not the CLOSED time registered in the entry whose CLOSED time is the earliest in time is before the current time, the CLOSED registered in the other entries is determined. It can be determined whether or not the time is earlier in time than the current time. Therefore, in the address conversion table, it is possible to determine in a short time whether or not there is an entry whose CLOSED time is earlier than the current time.

[適用例4]適用例3に記載のアドレス変換装置において、前記TCP解放待ちテーブルを、複数のユーザのそれぞれに応じて備え、前記アドレス管理部は、いずれかのユーザからのアドレス変換要求に基づき第1のアドレスと第2のアドレスとを新たに対応付けると、前記空きエントリが無い場合には、該ユーザ用の前記TCP解放待ちテーブルにおける前記最古エントリ識別子を取得し、該最古エントリ識別子の示す前記アドレス変換テーブルにおけるエントリに登録されている前記関連時刻と前記現在時刻とに基づき、前記エントリに対応する前記CLOSED時刻が、前記現在時刻よりも時間的に以前となるか否かを判定し、前記現在時刻よりも時間的に以前となる場合には、前記エントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを上書き登録し、前記現在時刻よりも時間的に以前とならない場合には、前記新たに対応付けた第1のアドレス及び第2のアドレスを、前記アドレス変換テーブルに登録しない、アドレス変換装置。   Application Example 4 In the address translation device according to Application Example 3, the TCP release waiting table is provided for each of a plurality of users, and the address management unit is based on an address translation request from any user. When the first address and the second address are newly associated with each other, when there is no empty entry, the oldest entry identifier in the TCP release waiting table for the user is acquired, and the oldest entry identifier Determining whether the CLOSED time corresponding to the entry is earlier in time than the current time based on the related time and the current time registered in the entry in the address conversion table shown. If the current time is earlier than the current time, the first address and the newly associated entry are associated with the entry. If the second address is overwritten and registered, and it is not earlier than the current time, the newly associated first address and second address are not registered in the address conversion table. Conversion device.

このような構成により、各ユーザごとに登録可能なエントリ数を同じに設定して各ユーザ間における公平性を確保する場合においても、各ユーザについて、公平に空きエントリ不足によるTCP接続の確立失敗を抑制することができる。   With such a configuration, even when setting the same number of entries that can be registered for each user and ensuring fairness among the users, the TCP connection establishment failure due to the lack of empty entries is fair for each user. Can be suppressed.

[適用例5]適用例1ないし適用例4のいずれかに記載のアドレス変換装置において、前記第1のアドレスはグローバルIPアドレスであり、前記第2のアドレスはプライベートIPアドレスである、アドレス変換装置。   Application Example 5 In the address translation device according to any one of Application Examples 1 to 4, the first address is a global IP address, and the second address is a private IP address. .

このような構成により、アドレス変換装置を、グローバルネットワークとローカルネットワークとの境界部分に配置し、グローバルIPアドレスとプライベートIPアドレスとを相互に変換するために用いることができる。   With this configuration, the address translation device can be arranged at the boundary between the global network and the local network and used to translate the global IP address and the private IP address.

[適用例6]アドレス変換装置において用いられるアドレス変換テーブルの管理方法であって、前記アドレス変換テーブルは、複数のエントリを有し、各エントリにおいて、少なくとも第1のアドレスと第2のアドレスとが互いに対応付けられて登録され、(a)第1のアドレス及び第2のアドレスを用いたTCP接続がTIME_WAIT状態になると、現在時刻を取得すると共に、前記現在時刻に基づき前記第1のアドレス及び前記第2のアドレスを用いたTCP接続がCLOSED状態となる時刻であるCLOSED時刻と関連する時刻である関連時刻を決定する工程と、(b)前記決定された関連時刻を、既に前記アドレス変換テーブルに登録されている、前記TCP接続に対応するエントリに登録する工程と、(c)アドレス変換要求に基づき、第1のアドレスと第2のアドレスとが新たに対応付けられると、現在時刻を取得すると共に、前記アドレス変換テーブルに登録されている前記関連時刻と前記現在時刻とに基づき、前記CLOSED時刻が前記現在時刻よりも時間的に以前のエントリである解放予定エントリを検索し、前記新たに対応付けられた第1のアドレス及び第2のアドレスを、前記解放予定エントリのいずれかに上書き登録する工程と、を備える、アドレス変換テーブルの管理方法。   Application Example 6 A method for managing an address conversion table used in an address conversion device, wherein the address conversion table has a plurality of entries, and each entry includes at least a first address and a second address. (A) When a TCP connection using the first address and the second address enters the TIME_WAIT state, the current time is acquired, and the first address and the Determining a related time that is a time related to a CLOSED time, which is a time at which a TCP connection using the second address is in the CLOSED state; and (b) storing the determined related time in the address conversion table. A registered step for registering in the entry corresponding to the TCP connection; and (c) address translation. Based on the request, when the first address and the second address are newly associated with each other, the current time is acquired, and based on the related time and the current time registered in the address conversion table, A release scheduled entry whose CLOSED time is earlier than the current time is searched, and the newly associated first address and second address are overwritten on any of the scheduled release entries. A method of managing an address conversion table.

適用例6のアドレス変換テーブルの管理方法では、新たなアドレス変換要求があった場合、CLOSED時刻が現在時刻よりも時間的に以前のエントリ(解放予定エントリ)に、新たに対応付けられた第1のアドレス及び第2のアドレスを上書き登録するので、空きエントリ不足によるTCP接続の確立失敗を抑制することができる。解放予定エントリに対応するTCP接続については、TCP接続がTIME_WAIT状態となってからCLOSED状態に遷移するまでの期間として規定されている期間(メモリ解放待ち期間)は既に満了している、またはちょうど満了する。したがって、第1のアドレス及び第2のアドレスを上書き登録しても問題は生じない。   In the address translation table management method according to Application Example 6, when there is a new address translation request, the first newly associated with the entry (scheduled entry) whose CLOSED time is earlier than the current time in time. Since the address and the second address are overwritten and registered, TCP connection establishment failure due to insufficient empty entries can be suppressed. For the TCP connection corresponding to the entry scheduled to be released, the period (memory release waiting period) defined as the period from when the TCP connection enters the TIME_WAIT state until it transitions to the CLOSED state has already expired or has just expired. To do. Therefore, no problem occurs even if the first address and the second address are overwritten and registered.

[適用例7]アドレス変換装置であって、複数のエントリを有し、各エントリにおいて、第1のアドレスと、第2のアドレスと、前記第1のアドレス及び前記第2のアドレスを用いたUDP接続についてセッションを生成する時刻と関連する時刻である関連時刻と、が互いに対応付けられて登録されるアドレス変換テーブルと、現在時刻を取得する時刻取得部と、前記UDP接続に対して、通信開始から1回の双方向通信が交わされた後に、片方向の通信が一度でも発生したUDP接続確立状態であるか、前記通信開始から1回の双方向通信が交わされた後に、片方向の通信が発生していないUDP接続未確立状態であるかを判断するUDP接続状態判定部と、アドレス管理部であって、アドレス変換要求に基づき第1のアドレスと第2のアドレスとを対応付け、前記アドレス変換テーブルのエントリの中から、前記UDP接続状態判定部によりUDP接続未確立状態であると判断され、前記関連時刻と前記現在時刻とを比較して所定の時間が経過しているエントリである解放予定エントリを検索し、前記新たに対応付けた第1のアドレス及び第2のアドレスを、前記解放予定エントリのいずれかに上書き登録する、アドレス管理部と、を備える、アドレス変換装置。   Application Example 7 An address translation apparatus having a plurality of entries, and each entry uses a first address, a second address, and the UDP using the first address and the second address. An address conversion table in which a related time, which is a time related to generating a session for a connection, is registered in association with each other, a time acquisition unit that acquires a current time, and communication start with respect to the UDP connection One-way communication after one-way communication has been established, or one-way communication has occurred once, or one-way communication has been performed after one-way communication has been exchanged since the start of communication. A UDP connection state determination unit that determines whether or not a UDP connection has not been established, and an address management unit that includes a first address and a second address based on an address conversion request. And the UDP connection state determination unit determines that the UDP connection has not been established, and compares the related time with the current time to determine a predetermined time from the entries in the address conversion table. An address management unit that searches for a release schedule entry that is a past entry and overwrites and registers the newly associated first address and second address in one of the release schedule entries. Address translation device.

適用例7のアドレス変換装置では、新たなアドレス変換要求があった場合、アドレス変換テーブルからUDP接続未確立状態であると判断され、前記関連時刻と前記現在時刻とを比較して所定の時間が経過しているエントリである解放予定エントリに、新たに対応付けられた第1のアドレス及び第2のアドレスを上書き登録するので、空きエントリ不足によるUDP接続の確立失敗を抑制することができる。ここで、UDP接続未確立状態とは、通信ホスト間で1度も双方向通信が成立していない、または双方向通信が1回だけ完了しているUDP通信を意味する。よって、1回の双方向通信で完結し終了する通信(一般的に多いDNSなど)のように、上書き登録されても問題ないエントリを再利用することが可能である。   In the address translation device of Application Example 7, when there is a new address translation request, it is determined from the address translation table that the UDP connection has not been established, and the related time is compared with the current time to determine a predetermined time Since the newly associated first address and second address are overwritten and registered in the release scheduled entry, which is an elapsed entry, it is possible to suppress a failure to establish a UDP connection due to insufficient free entries. Here, the UDP connection unestablished state means UDP communication in which bidirectional communication has never been established between communication hosts, or bidirectional communication has been completed only once. Therefore, it is possible to reuse an entry that does not cause a problem even if it is overwritten and registered, such as a communication that is completed and terminated by one-way communication (generally DNS, etc.).

[適用例8]適用例7に記載のアドレス変換装置において、 前記アドレス管理部は、第1のアドレスと第2のアドレスとを新たに対応付けると、前記アドレス変換テーブルに空きエントリがあるか否かを判定し、前記空きエントリがある場合には、前記空きエントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを登録し、前記空きエントリが無い場合には、前記解放予定エントリのうち前記関連時刻が最も時間的に前となるエントリである最古エントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを上書き登録する、アドレス変換装置。   Application Example 8 In the address translation device according to Application Example 7, if the address management unit newly associates the first address with the second address, whether or not there is an empty entry in the address translation table. If the empty entry exists, the first address and the second address newly associated with the empty entry are registered, and if there is no empty entry, the release entry An address conversion device for overwriting and registering the first and second addresses newly associated with the oldest entry, which is the entry whose associated time is the earliest in time.

このような構成により、時刻取得部の故障等により、時刻取得部が実際の現在時刻よりも早い時刻を取得した場合であっても、空きエントリがあれば、空きエントリに新たに対応付けられた第1のアドレス及び第2のアドレスが登録されるので、UDP接続未確立状態から所定の時間を経過していないUDP接続に対応するエントリに、第1のアドレス及び第2のアドレスを誤って上書き登録することを抑制できる。また、空きエントリがある場合には、解放予定エントリを検索する処理を省略できるので、かかる処理負担を軽減できる。また、このような構成により、エイジングカウンタを用いてメモリ解放待ち期間をカウントする構成にも適用することができる。すなわち、空きエントリが存在する程度の数のUDP接続が確立される場合には、エイジングカウンタを用いてセッション開放までの期間を管理し、対応するエントリを空きエントリに変更(更新)させることができる。したがって、このような場合には、セッション開放までの期間を、比較的処理負担の軽いエイジングカウンタを用いたカウントにより実現できる。それゆえ、アドレス変換装置全体としての処理負荷を軽減できる。   With such a configuration, even if the time acquisition unit acquires a time earlier than the actual current time due to a failure of the time acquisition unit, etc., if there is an empty entry, it is newly associated with the empty entry. Since the first address and the second address are registered, the first address and the second address are erroneously overwritten on the entry corresponding to the UDP connection that has not passed the predetermined time since the UDP connection has not been established. Registration can be suppressed. In addition, when there is an empty entry, the process of searching for the entry to be released can be omitted, so that the processing load can be reduced. Further, such a configuration can also be applied to a configuration in which the memory release waiting period is counted using an aging counter. In other words, when the number of UDP connections to the extent that there is a free entry is established, the period until the session is released can be managed using the aging counter, and the corresponding entry can be changed (updated) to a free entry. . Therefore, in such a case, the period until the session is released can be realized by counting using an aging counter with a relatively light processing load. Therefore, the processing load of the entire address translation device can be reduced.

[適用例9]適用例8に記載のアドレス変換装置において、さらに、前記UDP接続未確立状態である前記UDP接続に対応する前記アドレス変換テーブルにおけるエントリの識別子を登録するUDP解放待ちテーブルを備え、前記アドレス管理部は、前記UDP接続が前記UDP接続未確立状態である場合に、前記アドレス変換テーブルにおいて前記UDP接続に対応するエントリの識別子であるエントリ識別子を、前記DUP解放待ちテーブルに登録順序が明確になるように登録し、前記空きエントリが無い場合には、前記UDP解放待ちテーブルにおいて時間的に最も前に登録された前記エントリ識別子である最古エントリ識別子を取得し、前記最古エントリ識別子の示す前記アドレス変換テーブルにおけるエントリに登録されている前記関連時刻と前記現在時刻とを比較して所定の時間が経過しているか否かを判定し、前記所定の時間が経過している場合には、前記エントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを上書き登録し、前記所定の時間が経過していない場合には、前記新たに対応付けた第1のアドレス及び第2のアドレスを、前記アドレス変換テーブルに登録しない、アドレス変換装置。   [Application Example 9] In the address translation device according to Application Example 8, the address translation apparatus further includes a UDP release waiting table for registering an identifier of an entry in the address translation table corresponding to the UDP connection in the UDP connection unestablished state, When the UDP connection is in the UDP connection unestablished state, the address management unit registers an entry identifier that is an identifier of an entry corresponding to the UDP connection in the address conversion table in the DUP release waiting table. If there is no free entry, the oldest entry identifier, which is the entry identifier registered earlier in time in the UDP release waiting table, is acquired, and the oldest entry identifier is registered. Registered in the entry in the address conversion table indicated by The related time is compared with the current time to determine whether or not a predetermined time has elapsed, and when the predetermined time has elapsed, the first newly associated with the entry If the predetermined time has not elapsed, the newly associated first address and second address are not registered in the address conversion table. Address translation device.

このような構成により、UDP解放待ちテーブルでは登録順序が明確になるようにエントリ識別子が登録されるので、アドレス変換テーブルにおいてセッションの生成時刻が時間的に最も前となるエントリを簡単に見つけることができる。加えて、セッションの生成時刻が時間的に最も前となるエントリについて判定することにより、その他のエントリの判定を省略することができる。したがって、アドレス変換テーブルにおいて、解放予定エントリの有無を短時間で判定することができる。   With such a configuration, entry identifiers are registered in the UDP release wait table so that the registration order is clear, so it is possible to easily find the entry with the session generation time that is the earliest in the address translation table. it can. In addition, the determination of other entries can be omitted by determining the entry whose session generation time is the earliest in time. Therefore, it is possible to determine in the address conversion table in a short time whether or not there is a release scheduled entry.

[適用例10]適用例9に記載のアドレス変換装置において、前記UDP解放待ちテーブルを、複数のユーザのそれぞれに応じて備え、前記アドレス管理部は、いずれかのユーザからのアドレス変換要求に基づき第1のアドレスと第2のアドレスとを新たに対応付けると、前記空きエントリが無い場合には、該ユーザ用の前記UDP解放待ちテーブルにおける前記最古エントリ識別子を取得し、該最古エントリ識別子の示す前記アドレス変換テーブルにおけるエントリに登録されている前記関連時刻と前記現在時刻とを比較して所定の時間が経過しているか否かを判定し、前記所定の時間が経過している場合には、前記エントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを上書き登録し、前記所定の時間が経過していない場合には、前記新たに対応付けた第1のアドレス及び第2のアドレスを、前記アドレス変換テーブルに登録しない、アドレス変換装置。   Application Example 10 In the address translation device according to Application Example 9, the UDP release waiting table is provided for each of a plurality of users, and the address management unit is based on an address translation request from any user. When the first address and the second address are newly associated with each other, if there is no empty entry, the oldest entry identifier in the UDP release waiting table for the user is acquired, and the oldest entry identifier The related time registered in the entry in the address conversion table shown is compared with the current time to determine whether or not a predetermined time has elapsed, and when the predetermined time has elapsed The first address and the second address newly associated with the entry are overwritten and registered, and the predetermined time has not elapsed. , Said first address and a second address newly associated, not registered in the address translation table, the address translator.

このような構成により、各ユーザごとに登録可能なエントリ数を同じに設定して各ユーザ間における公平性を確保する場合においても、各ユーザについて、公平に空きエントリ不足によるUDP接続の確立失敗を抑制することができる。   With such a configuration, even when setting the same number of entries that can be registered for each user and ensuring fairness among the users, the establishment of a UDP connection due to a shortage of empty entries is fair for each user. Can be suppressed.

[適用例11]適用例7ないし適用例10のいずれかに記載のアドレス変換装置において、前記第1のアドレスはグローバルIPアドレスであり、前記第2のアドレスはプライベートIPアドレスである、アドレス変換装置。   Application Example 11 In the address translation device according to any one of Application Examples 7 to 10, the first address is a global IP address and the second address is a private IP address. .

このような構成により、アドレス変換装置を、グローバルネットワークとローカルネットワークとの境界部分に配置し、グローバルIPアドレスとプライベートIPアドレスとを相互に変換するために用いることができる。   With this configuration, the address translation device can be arranged at the boundary between the global network and the local network and used to translate the global IP address and the private IP address.

本発明のアドレス変換装置を適用したネットワークシステムの概略構成を示す説明図である。It is explanatory drawing which shows schematic structure of the network system to which the address translation apparatus of this invention is applied. 図1に示すアドレス変換テーブルの設定内容の一例を示す説明図である。It is explanatory drawing which shows an example of the setting content of the address conversion table shown in FIG. TCP接続の状態遷移を示す説明図である。It is explanatory drawing which shows the state transition of TCP connection. 図1に示すTCP解放待ちテーブルの設定内容の一例を示す説明図である。It is explanatory drawing which shows an example of the setting content of the TCP release waiting table shown in FIG. アドレス変換テーブルのエントリ更新処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the entry update process of an address conversion table. 図5に示すステップS115によりエントリが更新された後のアドレス変換テーブルの一例を示す説明図である。FIG. 6 is an explanatory diagram illustrating an example of an address conversion table after an entry is updated in step S115 illustrated in FIG. 5. 図5に示すステップS120によりエントリ番号が新たに登録された後のTCP解放待ちテーブルの一例を示す説明図である。It is explanatory drawing which shows an example of the TCP release waiting table after the entry number is newly registered by step S120 shown in FIG. アドレス変換テーブルのエントリ追加処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the entry addition process of an address translation table. 図8に示すステップS235によりエントリが更新された後のアドレス変換テーブルの一例を示す説明図である。It is explanatory drawing which shows an example of the address conversion table after the entry is updated by step S235 shown in FIG. 図8に示すステップS240により更新されたTCP解放テーブルの一例を示す説明図である。It is explanatory drawing which shows an example of the TCP release table updated by step S240 shown in FIG. 本アドレス変換装置を適用したネットワークシステムの概略構成を示す説明図である。It is explanatory drawing which shows schematic structure of the network system to which this address translation apparatus is applied. 図11に示すアドレス変換テーブルの設定内容の一例を示す説明図である。It is explanatory drawing which shows an example of the setting content of the address conversion table shown in FIG. UDP接続のUDP通信状態を示す説明図である。It is explanatory drawing which shows the UDP communication state of UDP connection. 図11に示すUDP解放待ちテーブルの設定内容の一例を示す説明図である。It is explanatory drawing which shows an example of the setting content of the UDP release waiting table shown in FIG. UDP通信開始時のアドレス変換テーブルのエントリ追加処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the entry addition process of the address translation table at the time of UDP communication start. 図15に示すステップS350、図18に示すステップS405によりエントリが上書き、更新された後のアドレス変換テーブルの一例を示す説明図である。FIG. 16 is an explanatory diagram illustrating an example of an address conversion table after an entry is overwritten and updated in step S350 illustrated in FIG. 15 and step S405 illustrated in FIG. 18; 図15に示すステップS355によりエントリ識別子が再登録された後のUDP解放待ちテーブルの一例を示す説明図である。FIG. 16 is an explanatory diagram showing an example of a UDP release wait table after the entry identifier is re-registered in step S355 shown in FIG. UDP通信確立状態遷移時のアドレス変換テーブルのエントリ更新処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the entry update process of the address translation table at the time of UDP communication establishment state transition. 図18に示すステップS410によりエントリ識別子が削除された後のUDP解放待ちテーブルの一例を示す説明図である。It is explanatory drawing which shows an example of the UDP release waiting table after an entry identifier is deleted by step S410 shown in FIG.

A.実施例:
A1.システム構成(第1の実施形態:TCP):
図1は、本発明の第1の実施形態におけるアドレス変換装置を適用したネットワークシステムの概略構成を示す説明図である。ネットワークシステム1000は、ローカルネットワークN1と、グローバルネットワークN2と、複数の端末21と、サーバ30と、アドレス変換装置10とを備えている。
A. Example:
A1. System configuration (first embodiment: TCP):
FIG. 1 is an explanatory diagram showing a schematic configuration of a network system to which the address translation device according to the first embodiment of the present invention is applied. The network system 1000 includes a local network N1, a global network N2, a plurality of terminals 21, a server 30, and an address translation device 10.

ネットワークシステム1000は、各端末21とサーバ30とがローカルネットワークN1及びグローバルネットワークN2を介して通信を行うシステムであり、かかる通信において、グローバルIP(Internet Protocol)アドレスとプライベートIPアドレス(ローカルIPアドレスとも呼ぶ)とが相互に変換される。ネットワークシステム1000では、OSI参照モデルにおけるネットワーク層のプロトコルとしてIPが用いられ、トランスポート層のプロトコルとしてTCPや、UDP(User Datagram Protocol)や、ICMP(Internet Control Message Protocol)等が用いられる。   The network system 1000 is a system in which each terminal 21 and the server 30 communicate with each other via a local network N1 and a global network N2. In such communication, a global IP (Internet Protocol) address and a private IP address (both local IP addresses) are used. Are converted into each other. In the network system 1000, IP is used as a network layer protocol in the OSI reference model, and TCP, UDP (User Datagram Protocol), ICMP (Internet Control Message Protocol), or the like is used as a transport layer protocol.

ローカルネットワークN1は、図示しないスイッチやルーターにより構築されたいわゆるローカルエリアネットワーク(Local Area Network:LAN)である。ローカルネットワークN1としては、例えば、ISP(Internet Service Provider)により構築されたネットワークを採用することができる。ローカルネットワークN1において、各機器(各端末21及び図示しないスイッチやルーター)にはプライベートIPアドレスが割り当てられている。また、アドレス変換装置10におけるローカルネットワークN1との接続点にもプライベートIPアドレスが割り当てられている。   The local network N1 is a so-called local area network (LAN) constructed by switches and routers (not shown). As the local network N1, for example, a network constructed by ISP (Internet Service Provider) can be adopted. In the local network N1, a private IP address is assigned to each device (each terminal 21 and a switch or router (not shown)). A private IP address is also assigned to a connection point of the address translation device 10 with the local network N1.

グローバルネットワークN2は、図示しないスイッチ,ルーターや、電気通信事業者網等により構築されたネットワークであり、各器機にグローバルIPが割り当てられている。グローバルネットワークN2として、例えば、インターネットを採用することができる。   The global network N2 is a network constructed by a switch, router, telecommunications carrier network, etc. (not shown), and a global IP is assigned to each device. As the global network N2, for example, the Internet can be employed.

各端末21は、ローカルネットワークN1に接続され、少なくともTCP/IP通信を実行可能に構成されている。端末21としては、例えば、パーソナルコンピュータや、携帯電話機や、携帯端末(PDA)等を採用することができる。   Each terminal 21 is connected to the local network N1 and configured to execute at least TCP / IP communication. As the terminal 21, for example, a personal computer, a mobile phone, a portable terminal (PDA), or the like can be adopted.

サーバ30は、グローバルネットワークN2に接続されており、端末21からの要求に応じてデータを送信する。サーバ30としては、例えば、WWW(World Wide Web)サーバや、FTP(File Transfer Protocol)サーバや、メールサーバなどを採用することができる。   The server 30 is connected to the global network N2, and transmits data in response to a request from the terminal 21. As the server 30, for example, a WWW (World Wide Web) server, an FTP (File Transfer Protocol) server, a mail server, or the like can be employed.

アドレス変換装置10には、ローカルネットワークN1及びグローバルネットワークN2にそれぞれ接続されており、予め複数のグローバルIPアドレスがプールされている。アドレス変換装置10は、いわゆるNAPT(Network Address and Port Translation)機能を有し、グローバルIPアドレスとプライベートIPアドレスとを相互に変換すると共にポート番号を変換する。   The address translation device 10 is connected to the local network N1 and the global network N2, respectively, and a plurality of global IP addresses are pooled in advance. The address translation apparatus 10 has a so-called NAPT (Network Address and Port Translation) function, and translates a global IP address and a private IP address and converts a port number.

アドレス変換装置10は、アドレス変換部100と、第1パケットインタフェース部200と、第2パケットインタフェース部300と、時刻管理部400と、アドレス変換テーブル500と、複数のTCP解放待ちテーブル600とを備えている。   The address translation device 10 includes an address translation unit 100, a first packet interface unit 200, a second packet interface unit 300, a time management unit 400, an address translation table 500, and a plurality of TCP release wait tables 600. ing.

アドレス変換部100は、第1パケットインタフェース部200,第2パケットインタフェース部300,時刻管理部400,アドレス変換テーブル500,各TCP解放待ちテーブル600と、それぞれ接続されている。アドレス変換部100は、IPアドレス及びポート番号の変換を行うと共に、各テーブル500,600を管理する。アドレス変換部100は、第1パケットインタフェース部200から受信したIPパケットのヘッダに記載されている送信元IPアドレス(プライベートIPアドレス)を、グローバルIPアドレスに変換すると共に、ポート番号を変換する。図1の例では、第1パケットインタフェース部200から受信したIPパケットについて、送信元IPアドレスがL1からG10に変換され、ポート番号がP1からP10に変換されている。また、アドレス変換部100は、第2パケットインタフェース部300から受信したIPパケットのヘッダに記載されている宛先IPアドレス(グローバルIPアドレス)を、プライベートIPアドレスに変換すると共に、ポート番号を変換する。図1の例では、第2パケットインタフェース部300から受信したIPパケットについて、宛先IPアドレスがG10からL1に変換され、ポート番号がP10からP1に変換されている。なお、本実施例では、IPアドレス及びポート番号として模式的な値を用いて説明するが、IPアドレスとしてIPv4のアドレスを、ポート番号として規定範囲内の番号(0〜1023:ウェルノウンポートや、1024〜65535)を、実際に用いることができる。   The address translation unit 100 is connected to the first packet interface unit 200, the second packet interface unit 300, the time management unit 400, the address translation table 500, and each TCP release waiting table 600, respectively. The address conversion unit 100 converts the IP address and the port number and manages the tables 500 and 600. The address conversion unit 100 converts the source IP address (private IP address) described in the header of the IP packet received from the first packet interface unit 200 into a global IP address and converts the port number. In the example of FIG. 1, for the IP packet received from the first packet interface unit 200, the source IP address is converted from L1 to G10, and the port number is converted from P1 to P10. The address conversion unit 100 converts the destination IP address (global IP address) described in the header of the IP packet received from the second packet interface unit 300 into a private IP address and converts the port number. In the example of FIG. 1, for the IP packet received from the second packet interface unit 300, the destination IP address is converted from G10 to L1, and the port number is converted from P10 to P1. In this embodiment, description will be made using typical values as the IP address and port number. However, an IPv4 address is used as the IP address, and a port number is within a specified range (0 to 1023: well-known port, 1024 ~ 65535) can be used in practice.

第1パケットインタフェース部200は、ローカルネットワークN1及びアドレス変換部100にそれぞれ接続されており、ローカルネットワークN1から受信したIPパケットを、アドレス変換部100に転送する。第2パケットインタフェース部300は、グローバルネットワークN2及びアドレス変換部100にそれぞれ接続されており、グローバルネットワークN2から受信したIPパケットを、アドレス変換部100に転送する。   The first packet interface unit 200 is connected to the local network N1 and the address translation unit 100, respectively, and transfers the IP packet received from the local network N1 to the address translation unit 100. The second packet interface unit 300 is connected to the global network N2 and the address translation unit 100, respectively, and transfers the IP packet received from the global network N2 to the address translation unit 100.

時刻管理部400は、図示しない内部時計を備え、現在時刻を算出してアドレス変換部100に供給する。なお、ローカルネットワークN1やグローバルネットワークN2を介して図示しないNTP(Network Time Protocol)サーバから供給される時刻に基づき、現在時刻を決定することもできる。   The time management unit 400 includes an internal clock (not shown), calculates the current time, and supplies it to the address conversion unit 100. The current time can also be determined based on a time supplied from an NTP (Network Time Protocol) server (not shown) via the local network N1 or the global network N2.

図2は、図1に示すアドレス変換テーブルの設定内容の一例を示す説明図である。アドレス変換テーブル500は、各接続(TCP接続や、UDPを用いたセッション等)ごとに、接続に関する情報を互いに対応付けて記録する。なお、図2では、既に複数の接続について、接続に関する情報がアドレス変換テーブル500に記録されている。   FIG. 2 is an explanatory diagram showing an example of setting contents of the address conversion table shown in FIG. The address conversion table 500 records connection information for each connection (TCP connection, session using UDP, etc.) in association with each other. In FIG. 2, information related to connections is already recorded in the address conversion table 500 for a plurality of connections.

アドレス変換テーブル500は、エントリ番号,有効フラグ,アドレス変換情報,接続種別,接続状態,エイジングカウンタ値,およびCLOSED時刻の各フィールドを備え、各エントリにおいて、各フィールドの値(接続に関する情報)が記録される。   The address conversion table 500 includes fields of entry number, valid flag, address conversion information, connection type, connection state, aging counter value, and CLOSED time, and the value of each field (information related to connection) is recorded in each entry. Is done.

エントリ番号フィールドには、アドレス変換テーブルにおける各エントリの識別番号が記録される。なお、各エントリの識別番号として、アドレス変換テーブル500が記憶される図示しないメモリのアドレスを用いることもできる。   In the entry number field, the identification number of each entry in the address conversion table is recorded. Note that an address of a memory (not shown) in which the address conversion table 500 is stored can be used as the identification number of each entry.

有効フラグフィールドには、「有効」または「無効」のいずれかの値が記録される。有効フラグフィールドが「有効」とは、該当エントリにおいて、接続に関する情報として有効な値が記録されていることを意味し、当該エントリが空きエントリ(接続に関する情報を新たに記録可能なエントリ)でないことを意味する。有効フラグフィールドが「無効」とは、当該エントリにおいて、接続に関する情報として有効な値が記録されていないことを意味し、当該エントリが空きエントリであることを示す。なお、図2の例では、有効フラグフィールドが「無効」のエントリでは、有効フラグフィールドを除く他のフィールドには、無効な値を示す「−」が記録されている。   In the valid flag field, either “valid” or “invalid” is recorded. “Valid” in the valid flag field means that a valid value is recorded as information related to the connection in the corresponding entry, and the entry is not a free entry (an entry in which information related to the connection can be newly recorded). Means. “Invalid” in the valid flag field means that a valid value is not recorded as connection-related information in the entry, and indicates that the entry is an empty entry. In the example of FIG. 2, in an entry where the valid flag field is “invalid”, “−” indicating an invalid value is recorded in the other fields except the valid flag field.

アドレス変換情報フィールドは、グローバルフィールドとローカルフィールドとを有する。グローバルフィールドは、グローバルIPアドレスフィールド、及びグローバルポートポート番号フィールドを有する。グローバルIPアドレスフィールドには、グローバルIPアドレスが記録される。グローバルポート番号フィールドには、サーバ30とアドレス変換装置10との間の通信において用いられるポート番号が記録される。ローカルフィールドは、プライベートIPアドレスフィールド、及びプライベートポート番号フィールドを有する。プライベートIPアドレスフィールドには、プライベートIPアドレスが記録される。プライベートポート番号フィールドには、各端末21とアドレス変換装置10との間の通信において用いられるポート番号が記録される。   The address translation information field has a global field and a local field. The global field has a global IP address field and a global port port number field. A global IP address is recorded in the global IP address field. In the global port number field, a port number used in communication between the server 30 and the address translation device 10 is recorded. The local field has a private IP address field and a private port number field. A private IP address is recorded in the private IP address field. In the private port number field, a port number used in communication between each terminal 21 and the address translation device 10 is recorded.

接続種別フィールドには、接続の種類(TCP接続,UDPを用いたセッション,ICMPを用いたセッション等)が記録される。   In the connection type field, the type of connection (TCP connection, session using UDP, session using ICMP, etc.) is recorded.

接続状態フィールドには、各接続の状態を示す値が記録される。図2の例では、接続種別が「TCP」のエントリ(エントリ番号E1,E2,E102,E200)において、接続状態として「TIME_WAIT」が記録されている。また、続種別が「TCP」のエントリ(エントリ番号E100,E201)において、接続状態として「確立」が記録されている。また、接続種別が「UDP」のエントリ(エントリ番号E101)において接続状態として「確立」が記録されている。   In the connection state field, a value indicating the state of each connection is recorded. In the example of FIG. 2, “TIME_WAIT” is recorded as the connection state in the entry (entry number E1, E2, E102, E200) whose connection type is “TCP”. In addition, “established” is recorded as the connection state in the entry (entry number E100, E201) whose connection type is “TCP”. Further, “established” is recorded as the connection state in the entry (entry number E101) whose connection type is “UDP”.

図3は、TCP接続の状態遷移を示す説明図である。TCP接続の状態は、CLOSED状態ST0と、TCP接続確立処理状態ST1と、TCP接続確立状態ST2と、TCP接続閉塞処理状態ST3と、TIME_WAIT状態ST4とのうち、いずれかの状態となる。   FIG. 3 is an explanatory diagram showing state transition of the TCP connection. The state of the TCP connection is any one of a CLOSED state ST0, a TCP connection establishment processing state ST1, a TCP connection establishment state ST2, a TCP connection blocking processing state ST3, and a TIME_WAIT state ST4.

CLOSED状態ST0は、TCP接続が確立されておらず、アドレス変換テーブル500からTCP接続に関する情報が削除されている状態を意味する。TCP接続確立処理状態ST1は、TCP接続を確立するのに先立ち、端末21とサーバ30との間でいわゆる3ウェイハンドシェイクを行っている状態を意味する。TCP接続確立状態ST2は、TCP接続が確立されている状態を意味する。TCP接続確立状態ST2では、アドレス変換テーブル500に、確立されたTCP接続に関する情報が記録されている。   The CLOSED state ST0 means a state in which no TCP connection has been established and information related to the TCP connection has been deleted from the address translation table 500. The TCP connection establishment processing state ST1 means a state in which a so-called three-way handshake is performed between the terminal 21 and the server 30 prior to establishing a TCP connection. The TCP connection establishment state ST2 means a state in which a TCP connection is established. In the TCP connection establishment state ST2, information on the established TCP connection is recorded in the address conversion table 500.

TCP接続閉塞処理状態ST3は、TCP接続を閉塞するための所定の処理を実行している状態を意味する。具体的には、端末21とサーバ30との間で、TCPヘッダにFINフラグを立てたパケット及びACKパケットをやりとりしている状態を意味する。   The TCP connection blocking process state ST3 means a state in which a predetermined process for blocking a TCP connection is being performed. Specifically, this means a state in which a packet with a FIN flag set in the TCP header and an ACK packet are exchanged between the terminal 21 and the server 30.

TIME_WAIT状態ST4とは、TCP接続は閉塞された状態ではある。しかしながら、TIME_WAIT状態ST4では、アドレス変換テーブル500の各エントリからTCP接続に関する情報は未だ削除されていない。TIME_WAIT状態ST4の期間(TIME_WAIT状態ST4となってからCLOSED状態ST0になるまでの期間:以下、「メモリ解放待ち期間」と呼ぶ)は、一般に、TCPセグメントがインターネット内に存在可能な最大期間(最大セグメント有効期間:MSL)の2倍の期間として規定されており、120秒が推奨値とされる。このように、メモリ解放待ち期間が設けられているのは、TCPセグメントが遅延して届く可能性のある期間だけ待機し、アドレス変換テーブル500のエントリを無効としても問題ないと判断するのに十分な期間だけ待機することを目的とする。TCP接続の状態は、TIME_WAIT状態ST4となってからメモリ解放待ち期間だけ経過した後、再び前述のCLOSED状態ST0に遷移する。   The TIME_WAIT state ST4 is a state in which the TCP connection is blocked. However, in the TIME_WAIT state ST4, the information regarding the TCP connection has not yet been deleted from each entry of the address conversion table 500. In general, the period of the TIME_WAIT state ST4 (the period from the TIME_WAIT state ST4 to the CLOSED state ST0: hereinafter referred to as “memory release waiting period”) is generally the maximum period during which the TCP segment can exist in the Internet (maximum It is specified as a period twice as long as the segment valid period (MSL), and a recommended value is 120 seconds. As described above, the memory release waiting period is provided for waiting for only a period during which the TCP segment may arrive with delay, and is sufficient to determine that there is no problem even if the entry in the address translation table 500 is invalidated. The purpose is to wait for a long period. The TCP connection state transitions again to the above-mentioned CLOSED state ST0 after the memory release waiting period has elapsed after entering the TIME_WAIT state ST4.

図2に示す接続状態フィールドの値が「TIME_WAIT」であるとは、当該エントリに対応するTCP接続が前述のTIME_WAIT状態ST4であることを示す。また、接続種別が「TCP」のエントリにおいて、接続状態フィールドの値が「確立」であるとは、当該エントリに対応するTCP接続が前述のTCP接続確立状態ST2であることを示す。なお、接続種別が「UDP」のエントリにおいて、接続状態フィールドの値が「確立」であるとは、当該エントリに対応するUDPを用いたセッションが確立されている状態であることを示す。   The value of the connection state field shown in FIG. 2 is “TIME_WAIT” indicates that the TCP connection corresponding to the entry is the above-described TIME_WAIT state ST4. In addition, in an entry whose connection type is “TCP”, the value of the connection state field “established” indicates that the TCP connection corresponding to the entry is the above-described TCP connection establishment state ST2. In an entry whose connection type is “UDP”, the value of the connection state field being “established” indicates that a session using the UDP corresponding to the entry is established.

図2に示すエイジングカウンタ値フィールドには、各接続において管理を要する期間の残り期間を示す値が記録される。具体的には、TCP接続については前述のメモリ解放待ち期間の残り期間が、UDPを用いたセッション(接続種別=UDP)についてはセッションの残り期間が、それぞれカウントダウン(デクリメント)される回数として記録される。   In the aging counter value field shown in FIG. 2, a value indicating the remaining period of the period requiring management in each connection is recorded. Specifically, the remaining period of the above-mentioned memory release waiting period is recorded as the number of times of counting down (decrementing) for the TCP connection, and the remaining period of the session for the session using UDP (connection type = UDP). The

エイジングカウンタ値は、アドレス変換部100により、順次デクリメントされる。具体的には、アドレス変換部100は、エイジングカウンタ値が設定されているエントリを1つずつ検索し、見つかったエントリのエイジングカウンタ値を1だけデクリメントし、その後、次に見つかったエントリのエイジングカウンタ値を1だけデクリメントすることを繰り返し実行する。アドレス変換部100は、エイジングカウンタ値が「0」になると、該当するエントリの各フィールドの値を変更し、空きエントリとする。   The aging counter value is sequentially decremented by the address conversion unit 100. Specifically, the address conversion unit 100 searches for an entry in which an aging counter value is set one by one, decrements the aging counter value of the found entry by 1, and then the aging counter of the next found entry Repeatedly decrementing the value by 1. When the aging counter value becomes “0”, the address conversion unit 100 changes the value of each field of the corresponding entry to make it an empty entry.

ここで、ネットワークシステム1000では、アドレス変換テーブル500に多数のエントリが登録されていること、また、アドレス変換テーブル500が記憶されているメモリのアクセス速度が遅いことに起因して、デクリメントが一巡し、デクリメント対象となる全てのエントリにおいてエイジングカウンタ値を1だけデクリメントするのに、およそ200秒要する。前述のように、メモリ解放待ち期間の推奨値は120秒であるため、本来であれば、TIME_WAIT状態ST4となってから120秒後にはCLOSED状態ST0に遷移しても構わない。そこで、ネットワークシステム1000では、TCP接続におけるエイジングカウンタ値の初期値として、最も小さい値「1」が設定される。しかしながら、エイジングカウンタ値が「1」から「0」にデクリメントするまでの期間は、最長でおよそ200秒要するので、TIME_WAIT状態ST4となってから120秒(メモリ解放待ち期間)が経過した後であっても、TCP接続がCLOSED状態ST0に遷移できないケースが発生し得る。この場合、アドレス変換テーブル500に空きエントリがないと、新たなTCP接続の確立要求があってもTCP接続は確立し得ないこととなる。そこで、ネットワークシステム1000では、後述するアドレス変換テーブル500のエントリ更新処理及びエントリ追加処理を実行することにより、メモリ解放待ち期間の経過後、速やかに該当するエントリに新たなTCP接続に関する情報を上書き登録する。   Here, in the network system 1000, the decrement is completed due to the fact that many entries are registered in the address translation table 500 and the access speed of the memory storing the address translation table 500 is low. It takes about 200 seconds to decrement the aging counter value by 1 for all entries to be decremented. As described above, since the recommended value for the memory release waiting period is 120 seconds, the state may be changed to the CLOSED state ST0 120 seconds after the TIME_WAIT state ST4. Therefore, in the network system 1000, the smallest value “1” is set as the initial value of the aging counter value in the TCP connection. However, since the aging counter value decrements from “1” to “0” takes approximately 200 seconds at the longest, 120 seconds after the TIME_WAIT state ST4 is reached (memory release waiting period) has elapsed. However, there may occur a case where the TCP connection cannot transition to the CLOSED state ST0. In this case, if there is no empty entry in the address conversion table 500, a TCP connection cannot be established even if there is a request for establishing a new TCP connection. Therefore, in the network system 1000, by performing entry update processing and entry addition processing of the address conversion table 500 described later, information related to a new TCP connection is quickly overwritten and registered in the corresponding entry after the memory release waiting period has elapsed. To do.

また、UDPを用いたセッションについては、セッション開始からセッション終了までの期間(以下、「セッション期間」と呼ぶ)が予め定められており、このセッション期間の残り期間がエイジングカウンタ値により管理される。なお、UDPを用いたセッションについてのエイジングカウンタの初期値は「18」が設定される。   In addition, for a session using UDP, a period from session start to session end (hereinafter referred to as “session period”) is determined in advance, and the remaining period of the session period is managed by an aging counter value. The initial value of the aging counter for the session using UDP is set to “18”.

図2に示すCLOSED時刻フィールドには、各TCP接続がTIME_WAIT状態ST4からCLOSED状態ST0に遷移する時刻が記録される。図2の例では、エントリE1に時刻T2が記録されている。また、エントリE2には時刻T4が、エントリE102には時刻T1が、エントリE200には時刻T3が、それぞれ記録されている。図2において「Tp」は、現在時刻(後述する)を示す。図2の例では、時刻T1は現在時刻Tpよりも時間的に前である。これに対し、他の時刻T2〜T4は、いずれも現在時刻Tpよりも時間的に後である。なお、接続種別がTCP以外の接続については、CLOSED時刻フィールドには、有効な値は記録されない。   In the CLOSED time field shown in FIG. 2, the time at which each TCP connection transitions from the TIME_WAIT state ST4 to the CLOSED state ST0 is recorded. In the example of FIG. 2, time T2 is recorded in entry E1. In addition, time T4 is recorded in entry E2, time T1 is recorded in entry E102, and time T3 is recorded in entry E200. In FIG. 2, “Tp” indicates the current time (described later). In the example of FIG. 2, the time T1 is temporally before the current time Tp. On the other hand, the other times T2 to T4 are all later in time than the current time Tp. For connections other than the TCP connection type, a valid value is not recorded in the CLOSED time field.

ネットワークシステム1000では、各ユーザ間の公平性を確保するために、各ユーザごとにアドレス変換テーブル500に登録可能なエントリ数は100に定められている。図2では、3ユーザ(ユーザA,ユーザB,ユーザC)についてのエントリのみを記載しているが、図示しない他のユーザについても、それぞれ100ずつエントリの登録が許容されている。図2では、ユーザA,Bについて、100個のエントリのすべてに、接続に関する情報が登録されている(すなわち、有効フラグが「有効」になっている)。ユーザCについては、一部のエントリは空きエントリであり、例えば、エントリ番号E300のエントリが空きエントリとなっている(すなわち、有効フラグが「無効」になっている)。   In the network system 1000, in order to ensure fairness among users, the number of entries that can be registered in the address translation table 500 for each user is set to 100. In FIG. 2, only entries for three users (user A, user B, and user C) are shown, but registration of 100 entries for each of other users (not shown) is allowed. In FIG. 2, for users A and B, information related to connection is registered in all 100 entries (that is, the valid flag is “valid”). For the user C, some entries are empty entries, for example, the entry with the entry number E300 is an empty entry (that is, the validity flag is “invalid”).

図4は、図1に示すTCP解放待ちテーブルの設定内容の一例を示す説明図である。図4において、上段はTCP解放待ちテーブル600を示し、下段は各時刻T1〜T4の時間的な順序を示す。アドレス変換装置10では、各ユーザごとにテーブル600が設けられている。図4の例では、ユーザA用のテーブル600aと、ユーザB用のテーブル600bと、ユーザC用のテーブル600cとが示されている。   FIG. 4 is an explanatory diagram showing an example of setting contents of the TCP release waiting table shown in FIG. In FIG. 4, the upper row shows the TCP release waiting table 600, and the lower row shows the temporal order of the times T1 to T4. In the address translation device 10, a table 600 is provided for each user. In the example of FIG. 4, a table 600a for user A, a table 600b for user B, and a table 600c for user C are shown.

TCP解放待ちテーブル600には、TIME_WAIT状態ST4となったTCP接続に対応するアドレス変換テーブル500におけるエントリのエントリ番号が登録される。このとき、TCP解放待ちテーブル600には、登録の順序が明確になるようにエントリ番号が登録される。具体的には、図4の各TCP開放待ちテーブル600a〜600cにおいて、より上方(上位)に登録されているエントリ番号は、より先に(時間的に前に)登録されていることを明示している。例えば、TCP解放待ちテーブル600aでは、エントリ番号E1は、エントリ番号E2よりも先に登録されていることを示す。同様に、TCP解放テーブルテーブル600bでは、エントリ番号E102は、エントリ番号E200よりも先に登録されていることを示す。なお、ユーザC用のTCP解放待ちテーブル600cには、エントリ番号は登録されていない。図4の下段に示すように、時刻T1,T2,T3,T4は、この順序で時間的に後となっている。図4の上段に示す各テーブル600a〜600cの登録状態は、図4の下段に示す現在時刻Tpにおける登録状態を示している。なお、現在時刻Tpの変化に伴い、各テーブル600a〜600cの状態も変化し得る。前述の図2のアドレス変換テーブル500も現在時刻Tpにおける登録状態を示し、現在時刻Tpの変化に伴い状態が変化し得る。   In the TCP release wait table 600, the entry number of the entry in the address conversion table 500 corresponding to the TCP connection in the TIME_WAIT state ST4 is registered. At this time, entry numbers are registered in the TCP release waiting table 600 so that the order of registration becomes clear. Specifically, in each of the TCP release waiting tables 600a to 600c in FIG. 4, it is clearly indicated that the entry number registered above (upper) is registered earlier (before time). ing. For example, in the TCP release waiting table 600a, the entry number E1 is registered before the entry number E2. Similarly, the TCP release table table 600b indicates that the entry number E102 is registered before the entry number E200. Note that the entry number is not registered in the TCP release waiting table 600c for the user C. As shown in the lower part of FIG. 4, the times T1, T2, T3, and T4 are temporally later in this order. The registration states of the tables 600a to 600c shown in the upper part of FIG. 4 indicate the registration states at the current time Tp shown in the lower part of FIG. Note that the state of each of the tables 600a to 600c can also change with the change of the current time Tp. The address conversion table 500 shown in FIG. 2 also shows the registration state at the current time Tp, and the state can change as the current time Tp changes.

前述のアドレス変換部100は、請求項における関連時刻決定部およびアドレス管理部に相当する。また、時刻管理部400は請求項における時刻取得部に、TCP開放待ちテーブル600に登録されているエントリ番号に対応するアドレス変換テーブル500におけるエントリは請求項における解放予定エントリに、それぞれ相当する。   The address conversion unit 100 corresponds to the related time determination unit and the address management unit in the claims. The time management unit 400 corresponds to the time acquisition unit in the claims, and the entry in the address conversion table 500 corresponding to the entry number registered in the TCP release waiting table 600 corresponds to the release scheduled entry in the claims.

A2.アドレス変換テーブルのエントリ更新処理(第1の実施形態:TCP):
図5は、アドレス変換テーブルのエントリ更新処理の手順を示すフローチャートである。TCP接続がTCP接続閉塞状態ST3からTIME_WAIT状態ST4に遷移すると、アドレス変換装置10において、アドレス変換テーブル500のエントリ更新処理が開始される。
A2. Address translation table entry update processing (first embodiment: TCP):
FIG. 5 is a flowchart showing the procedure of the address update table entry update process. When the TCP connection transitions from the TCP connection blocking state ST3 to the TIME_WAIT state ST4, the address conversion device 10 starts an entry update process of the address conversion table 500.

アドレス変換部100は、時刻管理部400から現在時刻を取得する(ステップS105)。アドレス変換部100は、取得した現在時刻に基づき、TIME_WAIT状態ST4となったTCP接続のCLOSED時刻を決定する(ステップS110)。具体的には、取得した現在時刻にメモリ解放待ち期間(120秒)を加えた時刻を、CLOSED時刻として設定する。   The address conversion unit 100 acquires the current time from the time management unit 400 (step S105). Based on the acquired current time, the address conversion unit 100 determines the CLOSED time of the TCP connection that has entered the TIME_WAIT state ST4 (step S110). Specifically, the time obtained by adding the memory release waiting period (120 seconds) to the acquired current time is set as the CLOSED time.

アドレス変換部100は、TIME_WAIT状態ST4となったTCP接続に対応するアドレス変換テーブル500のエントリにおいて、接続状態フィールドの値を「TIME_WAIT」に、エイジングカウンタ値を「1」に、CLOSED時刻フィールドの値をステップS110において決定した時刻に、それぞれ更新する(ステップS115)。   In the entry of the address translation table 500 corresponding to the TCP connection in the TIME_WAIT state ST4, the address translation unit 100 sets the connection state field value to “TIME_WAIT”, the aging counter value to “1”, and the value of the CLOSED time field. Are updated at the times determined in step S110 (step S115).

図6は、図5に示すステップS115によりエントリが更新された後のアドレス変換テーブルの一例を示す説明図である。図6の例では、エントリ番号E100に対応するTCP接続がTCP接続閉塞状態ST3からTIME_WAIT状態ST4に遷移し、かかるエントリにおける接続状態フィールド,エイジングカウンタ値フィールドおよびCLOSED時刻フィールドの各値が、図2に示す値から更新されている。具体的には、接続状態フィールドの値が「確立」から「TIME_WAIT」に、エイジングカウンタ値フィールドの値が「−」(無効)から「1」に、CLOSED時刻フィールドの値が「−」(無効)から「T5」に、それぞれ更新されている。なお、図5の状態から図6の状態までの期間は短く(例えば、20秒)、エントリ番号E1,E2,E200の各エントリのエイジングカウンタ値はデクリメントされていない。   FIG. 6 is an explanatory diagram showing an example of the address conversion table after the entry is updated in step S115 shown in FIG. In the example of FIG. 6, the TCP connection corresponding to the entry number E100 transitions from the TCP connection blocking state ST3 to the TIME_WAIT state ST4, and the values of the connection state field, the aging counter value field, and the CLOSED time field in this entry are shown in FIG. It has been updated from the value shown in. Specifically, the connection state field value changes from “established” to “TIME_WAIT”, the aging counter value field value changes from “−” (invalid) to “1”, and the CLOSED time field value changes to “−” (invalid). ) To “T5”, respectively. The period from the state of FIG. 5 to the state of FIG. 6 is short (for example, 20 seconds), and the aging counter value of each entry of entry numbers E1, E2, and E200 is not decremented.

図5に示すステップS115の後、アドレス変換部100は、TIME_WAIT状態に遷移したTCP接続について、該当するユーザのTCP解放待ちテーブル600に、ステップS115において更新したアドレス変換テーブル500のエントリのエントリ番号を新たに登録する(ステップS120)。   After step S115 shown in FIG. 5, the address conversion unit 100 adds the entry number of the entry in the address conversion table 500 updated in step S115 to the TCP release waiting table 600 of the corresponding user for the TCP connection transitioned to the TIME_WAIT state. New registration is performed (step S120).

図7は、図5に示すステップS120によりエントリ番号が新たに登録された後のTCP解放待ちテーブルの一例を示す説明図である。図7において、上段及び下段は、図4における上段及び下段と同様である。図7に示すように、前述の更新されたエントリのエントリ番号E100が、TCP解放テーブル600aに新たに登録されている。このとき、新たに登録されるエントリ番号E100は、TCP解放テーブル100aにおいて、最も下方(下位)に登録される。図7の下段に示すように、エントリ番号E100のエントリが更新された時刻を現在時刻Tpとすると、現時刻は、エントリ番号E1のエントリのCLOSED時刻T2に達していない。   FIG. 7 is an explanatory diagram showing an example of the TCP release waiting table after the entry number is newly registered in step S120 shown in FIG. In FIG. 7, the upper and lower stages are the same as the upper and lower stages in FIG. As shown in FIG. 7, the entry number E100 of the updated entry is newly registered in the TCP release table 600a. At this time, the newly registered entry number E100 is registered at the lowest position (lower order) in the TCP release table 100a. As shown in the lower part of FIG. 7, when the time when the entry with the entry number E100 is updated is the current time Tp, the current time has not reached the CLOSED time T2 of the entry with the entry number E1.

以上のアドレス変換テーブルのエントリ更新処理によって、既に登録されているTCP接続のエントリにおいて、TCP接続がTIME_WAIT状態ST4となると、CLOSED時刻フィールドにCLOSED状態ST0となる予定時刻が記録される。また、該当するユーザ用のTCP解放待ちテーブル600に、更新されたアドレス変換テーブル500のエントリのエントリ番号が新たに登録される。   When the TCP connection enters the TIME_WAIT state ST4 in the already registered TCP connection entry by the above address conversion table entry update processing, the scheduled time when the CLOSED state ST0 is entered is recorded in the CLOSED time field. In addition, the entry number of the updated entry in the address translation table 500 is newly registered in the corresponding TCP release waiting table 600 for the user.

A3.アドレス変換テーブルのエントリ追加処理(第1の実施形態:TCP):
図8は、アドレス変換テーブルのエントリ追加処理の手順を示すフローチャートである。いずれかのユーザ(端末21)とサーバ30との間で新たにTCP接続が確立される際に(すなわち、TCP接続確立処理状態ST1において)、アドレス変換装置10では、アドレス変換テーブル500のエントリ追加処理が実行される。なお、アドレス変換部100は、エントリ追加処理の開始前において、いずれかのユーザからTCP接続の確立要求を受信すると、プライベートIPアドレスとグローバルIPアドレスとの新たな対応関係、及び変換前後のポート番号の対応関係を決定する。また、いずれかのユーザからTCP接続の確立要求があった段階で、かかるTCP接続はCLOSED状態ST0からTCP接続確立処理状態ST1に遷移する。以下の説明においては、前述のアドレス変換テーブル500のエントリ更新処理によるエントリ番号E100のエントリの更新は行われていないものとする。
A3. Address translation table entry addition processing (first embodiment: TCP):
FIG. 8 is a flowchart showing the procedure of address addition table entry addition processing. When a TCP connection is newly established between any user (terminal 21) and the server 30 (that is, in the TCP connection establishment processing state ST1), the address translation device 10 adds an entry to the address translation table 500. Processing is executed. When the address conversion unit 100 receives a TCP connection establishment request from any user before the entry addition process starts, the address conversion unit 100 creates a new correspondence between the private IP address and the global IP address, and the port numbers before and after the conversion. Determine the correspondence relationship. Further, when a TCP connection establishment request is received from any user, the TCP connection transitions from the CLOSED state ST0 to the TCP connection establishment processing state ST1. In the following description, it is assumed that the entry with the entry number E100 is not updated by the entry update process of the address conversion table 500 described above.

アドレス変換部100は、アドレス変換テーブル500の空きエントリを検索する(ステップS205)。このとき、ユーザごとに予め定められた範囲(メモリ領域内)で空きエントリを検索し、空きエントリの有無を判定する(ステップS210)。例えば、アドレス変換テーブル500が図2に示す状態であれば、ユーザA,Bについて新たにTCP接続を確立しようとする際には、空きエントリ無しと判定される。一方、ユーザCについて新たにTCP接続を確立しようとする際には、空きエントリ有りと判定される。空きエントリ有りと判定された場合には、見つかった空きエントリに、TCP接続に関する情報を登録し(ステップS245)、エントリ追加処理は終了する。この場合、TCP接続は、TCP接続確立処理状態ST1からTCP接続確立状態ST2に遷移する。   The address conversion unit 100 searches for an empty entry in the address conversion table 500 (step S205). At this time, a free entry is searched in a range (in a memory area) predetermined for each user, and the presence or absence of a free entry is determined (step S210). For example, if the address conversion table 500 is in the state shown in FIG. 2, it is determined that there is no empty entry when trying to establish a new TCP connection for the users A and B. On the other hand, when a new TCP connection is to be established for user C, it is determined that there is an empty entry. If it is determined that there is a free entry, information regarding the TCP connection is registered in the found free entry (step S245), and the entry addition process ends. In this case, the TCP connection transitions from the TCP connection establishment processing state ST1 to the TCP connection establishment state ST2.

前述のステップS210において、空きエントリ無しと判定されると、アドレス変換部100は、TCP解放待ちテーブル600にエントリがあるか(すなわち、アドレス変換テーブル500のいずれかのエントリ番号が記録されているか)を判定する(ステップS215)。例えば、TCP解放テーブル600が図4に示す状態であれば、ユーザA,Bに関するTCP接続については、TCP解放待ちテーブル600a,600bにエントリが有ると判定される。一方、ユーザCに関するTCP接続については、TCP解放待ちテーブル600cにエントリが無いと判定される。   If it is determined in step S210 described above that there is no empty entry, the address conversion unit 100 has an entry in the TCP release waiting table 600 (that is, any entry number in the address conversion table 500 is recorded). Is determined (step S215). For example, if the TCP release table 600 is in the state shown in FIG. 4, it is determined that there are entries in the TCP release wait tables 600a and 600b for the TCP connections related to the users A and B. On the other hand, for the TCP connection related to the user C, it is determined that there is no entry in the TCP release waiting table 600c.

TCP解放待ちテーブル600にエントリが無いと判定されると(ステップS215:NO)、TCP接続の確立は失敗し、エントリ追加処理は終了する。この場合、TCP接続は、TCP接続確立処理状態ST1からCLOSED状態ST0に遷移する(戻る)。ステップS215においてTCP解放待ちテーブル600にエントリが無い状態とは、全てのエントリが有効であり、かつ、いずれのTCP接続もTCP接続確立状態ST2であるため、新たなエントリを登録する余地がない状態である。したがって、この場合、新たなTCP接続を確立することはできない。   If it is determined that there is no entry in the TCP release waiting table 600 (step S215: NO), the TCP connection establishment fails, and the entry addition process ends. In this case, the TCP connection changes (returns) from the TCP connection establishment processing state ST1 to the CLOSED state ST0. The state in which there is no entry in the TCP release waiting table 600 in step S215 is a state in which all entries are valid and there is no room to register a new entry because all TCP connections are in the TCP connection establishment state ST2. It is. Therefore, in this case, a new TCP connection cannot be established.

前述のステップS215において、TCP解放待ちテーブル600にエントリがあると判定された場合、TCP解放待ちテーブル600の最も古いエントリ(最先に登録されたエントリ)に対応するアドレス変換テーブル500のエントリに登録されているCLOSED時刻を取得する(ステップS220)。例えば、ユーザAに関する新たなTCP接続については、図4に示すようにTCP解放待ちテーブル600に2つのエントリ(エントリ番号E1が登録されたエントリ及びエントリ番号E2が登録されたエントリ)が存在する。したがって、この場合、最も上方(最上位)に登録されているエントリ番号E1のエントリが、最も古いエントリであるので、図2に示すアドレス変換テーブル500のエントリ番号E1のエントリに登録されているCLOSED時刻T2が取得される。また、例えば、ユーザBに関する新たなTCP接続については、図4に示すエントリ番号E2のエントリが最も古いエントリであるので、図2に示すアドレス変換テーブル500のエントリ番号E102のエントリに登録されているCLOSED時刻T1が取得される。   If it is determined in step S215 that there is an entry in the TCP release waiting table 600, the entry is registered in the entry of the address conversion table 500 corresponding to the oldest entry (the entry registered first) in the TCP release waiting table 600. The closed time is acquired (step S220). For example, for a new TCP connection for user A, there are two entries in the TCP release waiting table 600 (an entry with entry number E1 registered and an entry with entry number E2 registered) as shown in FIG. Therefore, in this case, since the entry with the entry number E1 registered at the uppermost position (the highest level) is the oldest entry, the CLOSED registered with the entry with the entry number E1 in the address translation table 500 shown in FIG. Time T2 is acquired. Further, for example, for a new TCP connection related to the user B, the entry with the entry number E2 shown in FIG. 4 is the oldest entry, so it is registered in the entry with the entry number E102 in the address conversion table 500 shown in FIG. The CLOSED time T1 is acquired.

アドレス変換部100は、時刻管理部400から現在時刻を取得し(ステップS225)、ステップS220において取得したCLOSED時刻がステップS225において取得した現在時刻よりも時間的に前か否か及び時間的に一致するか否か(すなわち、時間的に以前か否か)を判定する(ステップS230)。   The address conversion unit 100 acquires the current time from the time management unit 400 (step S225), and whether the CLOSED time acquired in step S220 is earlier in time than the current time acquired in step S225 and in time match. It is determined whether or not (that is, whether it is before in time) (step S230).

CLOSED時刻が現在時刻よりも時間的に以前である場合(ステップS230:YES)、アドレス変換部100は、アドレス変換テーブル500における該当エントリに、TCP接続に関する上書き登録する(ステップS235)。CLOSED時刻が現在時刻よりも時間的に以前である場合、該当するTCP接続のメモリ解放待ち期間は既に既に満了している又はちょうど満了する。したがって、該当するエントリの各フィールドに情報を上書きしても問題は生じない。   When the CLOSED time is earlier than the current time (step S230: YES), the address conversion unit 100 performs overwrite registration on the TCP connection in the corresponding entry in the address conversion table 500 (step S235). If the CLOSED time is earlier in time than the current time, the memory release waiting period for the corresponding TCP connection has already expired or has just expired. Therefore, no problem occurs even if information is overwritten in each field of the corresponding entry.

図9は、図8に示すステップS235によりエントリが更新された後のアドレス変換テーブルの一例を示す説明図である。図9の例では、図2に示すアドレス変換テーブル500の状態から、エントリ番号E102のエントリにTCP接続に関する情報が上書き登録されている。図2,4に示すように、エントリ番号E102のエントリは、CLOSED時刻が時刻T1であり、現在時刻Tpよりも時間的に前である。したがって、ユーザBについて新たにTCP接続を確立しようとする際には、このエントリ番号E102のエントリに、新たに決定したTCP接続に関する情報が上書き登録される。その結果、図9に示すように、アドレス変換情報フィールドには、新たに対応付けられたIPアドレス及びポート番号が登録され、また、接続種別には「TCP」が、接続状態には「確立」が、エイジングカウンタ値フィールドには「−」(無効)が、CLOSED時刻フィールドには「−」(無効)が、それぞれ登録される。したがって、この時点において、新たなTCP接続は、図3に示すTCP接続確立処理状態ST1からTCP接続確立状態ST2に遷移する。   FIG. 9 is an explanatory diagram showing an example of the address conversion table after the entry is updated in step S235 shown in FIG. In the example of FIG. 9, information related to the TCP connection is overwritten and registered in the entry of the entry number E102 from the state of the address conversion table 500 shown in FIG. As shown in FIGS. 2 and 4, the entry with the entry number E102 has a CLOSED time of time T1 and is earlier in time than the current time Tp. Accordingly, when a new TCP connection is to be established for user B, information regarding the newly determined TCP connection is overwritten and registered in the entry of entry number E102. As a result, as shown in FIG. 9, the newly associated IP address and port number are registered in the address conversion information field, the connection type is “TCP”, and the connection state is “established”. However, "-" (invalid) is registered in the aging counter value field, and "-" (invalid) is registered in the CLOSED time field. Therefore, at this point, the new TCP connection transitions from the TCP connection establishment processing state ST1 shown in FIG. 3 to the TCP connection establishment state ST2.

前述のステップS230において、取得したCLOSED時刻が現在時刻よりも時間的に後である場合、TCP接続の確立は失敗し、エントリ追加処理は終了する。この場合、TCP接続は、TCP接続確立処理状態ST1からCLOSED状態ST0に遷移する(戻る)。CLOSED時刻が現在時刻よりも時間的に後である場合、該当するTCP接続のメモリ解放待ち期間は未だ満了していない。したがって、この場合、該当するTCP接続に対応するエントリにおいて各フィールドの値を保持しておかねばならないため、新たなTCP接続の確立は失敗することとなる。   In the above-described step S230, when the acquired CLOSED time is later in time than the current time, establishment of the TCP connection fails and the entry addition process ends. In this case, the TCP connection changes (returns) from the TCP connection establishment processing state ST1 to the CLOSED state ST0. If the CLOSED time is later in time than the current time, the memory release waiting period of the corresponding TCP connection has not yet expired. Therefore, in this case, since the value of each field must be held in the entry corresponding to the corresponding TCP connection, establishment of a new TCP connection will fail.

図8に示すステップS235の後、アドレス変換部100は、TCP解放待ちテーブルを更新する(ステップS240)。   After step S235 shown in FIG. 8, the address conversion unit 100 updates the TCP release waiting table (step S240).

図10は、図8に示すステップS240により更新されたTCP解放テーブルの一例を示す説明図である。前述のように、ユーザBについて新たにTCP接続が確立されると、ユーザB用のTCP解放待ちテーブル600bが更新される。具体的には、図4に示すエントリ番号E102が削除され、図4において上方から2番目に登録されていた(2番目に古い)エントリであるエントリ番号E200のエントリが、図10に示すように、最上位に登録される。   FIG. 10 is an explanatory diagram showing an example of the TCP release table updated in step S240 shown in FIG. As described above, when a new TCP connection is established for the user B, the TCP release waiting table 600b for the user B is updated. Specifically, the entry number E102 shown in FIG. 4 is deleted, and the entry with the entry number E200 that is the second registered (second oldest) entry in FIG. , Registered at the top.

以上説明したネットワークシステム1000では、アドレス変換装置10において、いずれかのユーザから新たなTCP接続の確立要求があった場合に、CLOSED時刻が現在時刻よりも以前となるエントリに、新たなTCP接続に関する情報が上書き登録される。したがって、アドレス変換テーブル500における空きエントリ不足によるTCP接続の確立失敗を抑制することができる。   In the network system 1000 described above, when a new TCP connection establishment request is received from one of the users in the address translation apparatus 10, an entry whose CLOSED time is earlier than the current time is included in the new TCP connection. Information is overwritten and registered. Therefore, the TCP connection establishment failure due to the lack of empty entries in the address translation table 500 can be suppressed.

加えて、アドレス変換テーブル500では、各ユーザごとに登録可能なエントリ数を定め、また、各ユーザごとにTCP解放待ちテーブル600を設けているので、各ユーザ間の公平性を確保できると共に、各ユーザごとに空きエントリ不足によるTCP接続の確立失敗を抑制することができる。   In addition, in the address translation table 500, the number of entries that can be registered for each user is determined, and the TCP release waiting table 600 is provided for each user. TCP connection establishment failure due to insufficient free entries for each user can be suppressed.

また、TCP解放待ちテーブル600では、登録の順序が明確になるようにエントリ番号が登録されるので、最も上位の(最先に登録された)エントリを簡単に見つけることができる。加えて、このTCP解放待ちテーブル600において、最上位に登録されているエントリ番号に対応するアドレス変換テーブル500のエントリのCLOSED時刻は、2番目以降に登録されているいずれのエントリ番号に対応するアドレス変換テーブル500のエントリのCLOSED時刻よりも時間的に前となる。したがって、TCP解放待ちテーブル600において最上位に登録されているエントリ番号対応するアドレス変換テーブル500のエントリのCLOSED時刻が現在時刻よりも時間的に以前か否かを判定することにより、2番目以降に登録されているエントリ番号に対応するアドレス変換テーブル500のエントリのCLOSED時刻が現在時刻よりも時間的に以前か否かを判定することができる。それゆえ、アドレス変換テーブル500において、CLOSED時刻が現在時刻よりも時間的に以前となるエントリの有無を短時間で判定することができる。   Also, in the TCP release waiting table 600, entry numbers are registered so that the order of registration is clear, so the highest entry (registered first) can be easily found. In addition, in this TCP release waiting table 600, the CLOSED time of the entry of the address conversion table 500 corresponding to the entry number registered at the top is the address corresponding to any entry number registered after the second. The time is before the CLOSED time of the entry in the conversion table 500. Therefore, by determining whether or not the CLOSED time of the entry of the address conversion table 500 corresponding to the entry number registered at the highest level in the TCP release waiting table 600 is earlier than the current time, the second or later is determined. It can be determined whether or not the CLOSED time of the entry of the address conversion table 500 corresponding to the registered entry number is earlier than the current time. Therefore, in the address translation table 500, the presence / absence of an entry whose CLOSED time is earlier than the current time can be determined in a short time.

また、各ユーザについての空きエントリが存在する場合には、新たなTCP接続に関する情報は有効なエントリに上書き登録せずに空きエントリに登録される。したがって、例えば、時刻管理部400の故障により、時刻管理部400からアドレス変換部100に提供される現在時刻が実際の現在時刻よりも早い時刻であった場合等において、実際のCLOSED時刻に達していないTCP接続に対応するエントリに、接続に関する情報を誤って上書き登録することを抑制できる。加えて、メモリ解放期間の管理のため、CLOSED時刻フィールドとエイジングカウンタ値フィールドの値とを併用するので、以下のようなメリットがある。すなわち、空きエントリが存在し得る程度の数のTCP接続が確立される場合には、エイジングカウンタを用いてTIME_WAIT状態ST4からCLOSED状態ST0までの期間を管理し、CLOSED状態ST0となったTCP接続について、対応するエントリを空きエントリに変更(更新)させることができる。したがって、このような場合には、TIME_WAIT状態ST4からCLOSED状態ST0までの期間を、比較的処理負担の軽いエイジングカウンタを用いたカウントにより実現できる。それゆえ、アドレス変換装置10全体としての処理負荷を軽減できる。   If there is a free entry for each user, the information related to the new TCP connection is registered in the free entry without overwriting the valid entry. Therefore, for example, when the current time provided from the time management unit 400 to the address conversion unit 100 is earlier than the actual current time due to a failure of the time management unit 400, the actual CLOSED time has been reached. It is possible to suppress erroneously overwriting and registering information related to a connection in an entry corresponding to a non-TCP connection. In addition, since the CLOSED time field and the value of the aging counter value field are used together for the management of the memory release period, there are the following advantages. That is, when TCP connections are established in such a number that an empty entry can exist, the period from the TIME_WAIT state ST4 to the CLOSED state ST0 is managed using an aging counter, and the TCP connection in the CLOSED state ST0 is managed. The corresponding entry can be changed (updated) to an empty entry. Therefore, in such a case, the period from the TIME_WAIT state ST4 to the CLOSED state ST0 can be realized by counting using an aging counter with a relatively light processing load. Therefore, the processing load of the entire address translation device 10 can be reduced.

A4.システム構成(第2の実施形態:UDP):
図11は、本発明の第2の実施形態におけるアドレス変換装置を適用したネットワークシステムの概略構成を示す説明図である。ネットワークシステム2000は、アドレス変換装置40と、前述のローカルネットワークN1と、グローバルネットワークN2と、複数の端末21と、サーバ30を備えている。
A4. System configuration (second embodiment: UDP):
FIG. 11 is an explanatory diagram showing a schematic configuration of a network system to which the address translation device according to the second embodiment of the present invention is applied. The network system 2000 includes an address translation device 40, the aforementioned local network N1, a global network N2, a plurality of terminals 21, and a server 30.

ネットワークシステム2000は、前述のネットワークシステム1000と同じく、各端末21とサーバ30とがローカルネットワークN1及びグローバルネットワークN2を介して通信を行うシステムであり、かかる通信において、グローバルIP(Internet Protocol)アドレスとプライベートIPアドレス(ローカルIPアドレスとも呼ぶ)とが相互に変換される。ネットワークシステム2000では、OSI参照モデルにおけるネットワーク層のプロトコルとしてIPが用いられ、トランスポート層のプロトコルとしてTCPや、UDP(User Datagram Protocol)や、ICMP(Internet Control Message Protocol)等が用いられる。以降、ネットワークシステム2000の内、TCPに関してはネットワークシステム1000で述べたとおりである。   Similar to the network system 1000 described above, the network system 2000 is a system in which each terminal 21 and the server 30 communicate via the local network N1 and the global network N2, and in such communication, a global IP (Internet Protocol) address and Private IP addresses (also called local IP addresses) are mutually converted. In the network system 2000, IP is used as a network layer protocol in the OSI reference model, and TCP, UDP (User Datagram Protocol), ICMP (Internet Control Message Protocol), or the like is used as a transport layer protocol. Thereafter, TCP in the network system 2000 is as described in the network system 1000.

アドレス変換装置40には、ローカルネットワークN1及びグローバルネットワークN2にそれぞれ接続されており、予め複数のグローバルIPアドレスがプールされている。アドレス変換装置40は、いわゆるNAPT(Network Address and Port Translation)機能を有し、グローバルIPアドレスとプライベートIPアドレスとを相互に変換すると共にポート番号を変換する。   The address translation device 40 is connected to the local network N1 and the global network N2, respectively, and a plurality of global IP addresses are pooled in advance. The address translation device 40 has a so-called NAPT (Network Address and Port Translation) function, translates a global IP address and a private IP address, and translates a port number.

アドレス変換装置40は、前述のアドレス変換部150と、第1パケットインタフェース部200と、第2パケットインタフェース部300と、時刻管理部400と、アドレス変換テーブル500と、複数のTCP解放待ちテーブル600に加えて、複数のUDP解放待ちテーブル700を備えている。   The address translation device 40 includes an address translation unit 150, a first packet interface unit 200, a second packet interface unit 300, a time management unit 400, an address translation table 500, and a plurality of TCP release waiting tables 600. In addition, a plurality of UDP release wait tables 700 are provided.

アドレス変換部150は、第1パケットインタフェース部200,第2パケットインタフェース部300,時刻管理部400,アドレス変換テーブル500,各TCP解放待ちテーブル600に加えて、各UDP解放待ちテーブルにそれぞれ接続されている。アドレス変換部150は、IPアドレス及びポート番号の変換を行うと共に、各テーブル500,600、700を管理する。アドレス変換部150のTCPに関する処理は、ネットワークシステム1000と同じであるため、以下省略する。   The address translation unit 150 is connected to each UDP release wait table in addition to the first packet interface unit 200, the second packet interface unit 300, the time management unit 400, the address translation table 500, and each TCP release wait table 600. Yes. The address conversion unit 150 converts the IP address and port number and manages the tables 500, 600, and 700. Since the processing related to TCP of the address conversion unit 150 is the same as that of the network system 1000, the description thereof is omitted below.

図12は、図11に示すアドレス変換テーブルの設定内容の一例を示す説明図である。アドレス変換テーブル500は、各接続(TCP接続や、UDPを用いたセッション等)ごとに、接続に関する情報を互いに対応付けて記録する。なお、図12では、既に複数の接続について、接続に関する情報がアドレス変換テーブル500に記録されている。   FIG. 12 is an explanatory diagram showing an example of setting contents of the address conversion table shown in FIG. The address conversion table 500 records connection information for each connection (TCP connection, session using UDP, etc.) in association with each other. In FIG. 12, information regarding connections for a plurality of connections has already been recorded in the address conversion table 500.

アドレス変換テーブル500の各フィールドの意味は前述の通りであるが、TCPの場合はCLOSED時刻フィールドにTCP接続がCLOSED状態ST0に遷移する時刻(T)を記録したが、UDPの場合はセッション生成時刻フィールドにUDP接続のセッションが生成された時刻(t)を記録する点が異なる。   The meaning of each field in the address translation table 500 is as described above. In the case of TCP, the time (T) at which the TCP connection transits to the CLOSED state ST0 is recorded in the CLOSED time field. In the case of UDP, the session creation time is recorded. The difference is that the time (t) at which the UDP connection session is generated is recorded in the field.

図12の例では、接続種別が「UDP」のエントリ(エントリ番号E101)において接続状態として「確立」が記録されている。接続種別が「UDP」のエントリ(エントリ番号E103)において接続状態として「未確立」が記録されている。ここで「確立」は前述のUDP接続確立状態を意味し、「未確立」は前述のUDP接続未確立状態を意味している。   In the example of FIG. 12, “established” is recorded as the connection state in the entry (entry number E101) whose connection type is “UDP”. In the entry (entry number E103) whose connection type is “UDP”, “not established” is recorded as the connection state. Here, “established” means the above-mentioned UDP connection established state, and “unestablished” means the above-mentioned UDP connection unestablished state.

図13は、ユーザ、サーバ間のUDP通信と、UDP接続の状態と、UDPセッション期間の関係を示す説明図である。UDP接続の状態は、接続未確立状態ST10と、接続確立状態ST11のうち、いずれかの状態となる。   FIG. 13 is an explanatory diagram showing the relationship between the UDP communication between the user and the server, the state of the UDP connection, and the UDP session period. The state of the UDP connection is one of a connection non-established state ST10 and a connection established state ST11.

接続未確立状態ST10は、ユーザ、サーバ間のUDP通信が、ユーザの接続開始から再送を繰り返している状態(P1〜P3)、あるいはユーザからの通信に対して、サーバが一度応答した状態(P4)を意味する。一般的に多く用いられるUDP通信形態において、このP1〜P3の時間はサーバと通信ができない、もしくは遅延している状態である。またサーバが一度応答した状態(P4)は、後述の接続確立状態に遷移するまでの間であるか、もしくは一度の双方向通信でUDP通信が完結した状態である。一般的にDNSなどが後者に該当する。詳細は後述するが、アドレス変換テーブル500上では、P1を中継した時点でUDP接続に関する情報が、接続状態「未確立」として記録される。同時にUDP解放待ちテーブル700に、アドレス変換テーブル500の該当エントリへの識別子が登録される。   The connection unestablished state ST10 is a state in which UDP communication between the user and the server repeats retransmission from the start of connection of the user (P1 to P3), or a state in which the server responds to communication from the user once (P4). ). In a UDP communication form that is generally used, the times P1 to P3 cannot communicate with the server or are delayed. The state in which the server responds once (P4) is a state until a transition to a connection establishment state described later, or a state in which UDP communication is completed by one-way bidirectional communication. In general, DNS corresponds to the latter. Although details will be described later, on the address conversion table 500, information regarding the UDP connection is recorded as the connection state “unestablished” when P1 is relayed. At the same time, an identifier for the corresponding entry in the address conversion table 500 is registered in the UDP release waiting table 700.

接続確立状態ST11は、接続未確立状態から一度でも通信(P5)を中継し終えた状態を意味する。図13のP5はユーザからの通信だが、サーバからの通信でも良い。一般的に多く用いられるUDP通信形態において、このP5以降はユーザ、サーバ間通信が継続する。図中の例ではP6を以って通信終了している。詳細は後述するが、アドレス変換テーブル500上では、P5を中継した時点でUDP接続に関する接続状態が「確立」に更新される。同時にUDP解放待ちテーブルに、アドレス変換テーブル500の該当エントリへの識別子が削除される。   The connection establishment state ST11 means a state where the communication (P5) has been relayed even once from the connection unestablished state. P5 in FIG. 13 is communication from the user, but communication from the server may be used. In the UDP communication form generally used frequently, communication between the user and the server continues after P5. In the example in the figure, the communication is terminated with P6. Although details will be described later, on the address conversion table 500, the connection state related to the UDP connection is updated to “established” when P5 is relayed. At the same time, the identifier for the corresponding entry in the address translation table 500 is deleted from the UDP release waiting table.

図12に示したUDPを用いたセッションについては、セッション開始からセッション終了までの期間(以下、「セッション期間」と呼ぶ)が予め定められており、このセッション期間の残り期間がエイジングカウンタ値により管理される。なお、UDPを用いたセッションについてのエイジングカウンタの初期値は「18」が設定される。ネットワークシステム2000では、図12に示すように、接続種別がUDPの接続について、TCP接続に対してCLOSED時刻を記録したフィールドに、UDPセッションが生成された時刻(以下、「セッション生成時刻」と呼ぶ)を記録する。   For the session using UDP shown in FIG. 12, a period from the start of the session to the end of the session (hereinafter referred to as “session period”) is determined in advance, and the remaining period of the session period is managed by the aging counter value. Is done. The initial value of the aging counter for the session using UDP is set to “18”. In the network system 2000, as shown in FIG. 12, for a connection whose connection type is UDP, the time when the UDP session is generated in the field in which the CLOSED time is recorded for the TCP connection (hereinafter referred to as “session generation time”). ).

エイジングカウンタ値は、アドレス変換部150により、順次デクリメントされる。具体的には、アドレス変換部150は、エイジングカウンタ値が設定されているエントリを1つずつ検索し、存在したエントリのエイジングカウンタ値を1だけデクリメントし、その後、次に存在したエントリのエイジングカウンタ値を1だけデクリメントすることを繰り返し実行する。アドレス変換部150は、エイジングカウンタ値が「0」になると、該当するエントリの各フィールドの値を変更し、空きエントリとする。   The aging counter value is sequentially decremented by the address conversion unit 150. Specifically, the address conversion unit 150 searches the entries for which the aging counter value is set one by one, decrements the aging counter value of the existing entry by 1, and then the aging counter of the next existing entry Repeatedly decrementing the value by 1. When the aging counter value becomes “0”, the address conversion unit 150 changes the value of each field of the corresponding entry to make it an empty entry.

ここで、ネットワークシステム2000では、前述のネットワークシステム1000と同じく、「1」デクリメントするまでの期間が、最長でおよそ200秒要する。また、UDP接続では、どのような形態の通信においても、具体的にはP4で通信が終了していたとしても、UDPセッション期間が満了する時間まで(エイジングカウンタ値が0になるまで)アドレス変換テーブルには該当エントリが存在し続ける。この場合、アドレス変換テーブル500に空きエントリがないと、新たなUDP接続の確立要求があってもUDP接続は確立し得ないこととなる。そこで、ネットワークシステム2000では、後述するアドレス変換テーブル500のエントリ更新処理及びエントリ追加処理を実行することにより、後述する保護期間経過後、速やかに該当するエントリに新たなUDP接続に関する情報を上書き登録する。   Here, in the network system 2000, as in the above-described network system 1000, the period until the “1” is decremented takes about 200 seconds at the longest. Also, in the UDP connection, in any form of communication, specifically, even if the communication is ended at P4, the address conversion is performed until the UDP session period expires (until the aging counter value becomes 0). The entry continues to exist in the table. In this case, if there is no empty entry in the address translation table 500, a UDP connection cannot be established even if a new UDP connection establishment request is made. Therefore, in the network system 2000, by executing an entry update process and an entry addition process of the address conversion table 500 described later, information related to a new UDP connection is quickly overwritten and registered in the corresponding entry after the protection period described later elapses. .

ネットワークシステム2000では、各ユーザ間の公平性を確保するために、各ユーザごとにアドレス変換テーブル500に登録可能なエントリ数は100に定められている。図12では、3ユーザ(ユーザA,ユーザB,ユーザC)についてのエントリのみを記載しているが、図示しない他のユーザについても、それぞれ100ずつエントリの登録が許容されている。図12では、ユーザA,Bについて、100個のエントリのすべてに、接続に関する情報が登録されている(すなわち、有効フラグが「有効」になっている)。ユーザCについては、一部のエントリは空きエントリであり、例えば、エントリ番号E300のエントリが空きエントリとなっている(すなわち、有効フラグが「無効」になっている)。   In the network system 2000, the number of entries that can be registered in the address translation table 500 for each user is set to 100 in order to ensure fairness among the users. In FIG. 12, only entries for three users (user A, user B, and user C) are shown, but registration of 100 entries for each of other users (not shown) is allowed. In FIG. 12, for users A and B, information related to connection is registered in all 100 entries (that is, the validity flag is “valid”). For the user C, some entries are empty entries, for example, the entry with the entry number E300 is an empty entry (that is, the validity flag is “invalid”).

図14は、図11に示すUDP解放待ちテーブル700の設定内容の一例を示す説明図である。アドレス変換装置40では、各ユーザごとにテーブル700が設けられている。図14の例では、ユーザA用のテーブル700aと、ユーザB用のテーブル700bと、ユーザC用のテーブル700cとが示されている。   FIG. 14 is an explanatory diagram showing an example of setting contents of the UDP release waiting table 700 shown in FIG. In the address translation device 40, a table 700 is provided for each user. In the example of FIG. 14, a table 700a for user A, a table 700b for user B, and a table 700c for user C are shown.

UDP解放待ちテーブル700には、接続未確立状態ST10のUDP接続に対応するアドレス変換テーブル500におけるエントリのエントリ識別子が登録される。識別子はエントリのメモリアドレスでもよい(以降はエントリ番号を識別子として登録するとする)。このとき、UDP解放待ちテーブル700には、登録の順序が明確になるようにエントリ番号が登録される。具体的には、図14の各UDP開放待ちテーブル700a〜700cにおいて、より上方(上位)に登録されているエントリ番号は、より先に(時間的に前に)登録されていることを明示している。例えば、UDP解放待ちテーブル700bでは、エントリ番号E103は、エントリ番号E104よりも先に登録されていることを示す。なお、ユーザA、C用のUDP解放待ちテーブル700a、cには、エントリ番号は登録されていない。図14に示す各テーブル700a〜700cの登録エントリは、前述したとおり、状態がUDP接続確立状態と判定された時点で削除される。例では、ユーザBの接続確立状態のUDP接続であるエントリ番号E101は、すでにテーブル700bから削除されている。   In the UDP release waiting table 700, the entry identifier of the entry in the address translation table 500 corresponding to the UDP connection in the connection unestablished state ST10 is registered. The identifier may be the memory address of the entry (hereinafter, the entry number is registered as the identifier). At this time, entry numbers are registered in the UDP release waiting table 700 so that the order of registration is clear. Specifically, in each of the UDP release waiting tables 700a to 700c in FIG. 14, it is clearly indicated that the entry number registered higher (upper) is registered earlier (before time). ing. For example, in the UDP release wait table 700b, the entry number E103 indicates that it is registered before the entry number E104. The entry numbers are not registered in the UDP release waiting tables 700a and 700c for the users A and C. As described above, the registration entries in the tables 700a to 700c shown in FIG. 14 are deleted when the state is determined to be the UDP connection established state. In the example, the entry number E101 that is the UDP connection in the connection establishment state of the user B has already been deleted from the table 700b.

前述のアドレス変換部150は、請求項におけるUDP接続状態判定部およびアドレス管理部に相当する。また、時刻管理部400は請求項における時刻取得部に、UDP開放待ちテーブル700に登録されているエントリ番号に対応するアドレス変換テーブル500におけるエントリは請求項における解放予定エントリに、それぞれ相当する。   The address conversion unit 150 corresponds to the UDP connection state determination unit and the address management unit in the claims. The time management unit 400 corresponds to the time acquisition unit in the claims, and the entry in the address conversion table 500 corresponding to the entry number registered in the UDP release waiting table 700 corresponds to the release planned entry in the claims.

A5.アドレス変換テーブルのエントリ追加処理(第2の実施形態:UDP):
図15は、アドレス変換テーブルのエントリ追加処理の手順を示すフローチャートである。いずれかのユーザ(端末21)とサーバ30との間で新たにUDP接続が開始される際に、アドレス変換装置40では、アドレス変換テーブル500のエントリ追加処理が実行される。なお、アドレス変換部150は、エントリ追加処理の開始前において、いずれかのユーザからUDP接続の確立要求を受信すると、プライベートIPアドレスとグローバルIPアドレスとの新たな対応関係、及び変換前後のポート番号の対応関係を決定する。
A5. Address translation table entry addition processing (second embodiment: UDP):
FIG. 15 is a flowchart showing the procedure of the address addition table entry addition process. When a UDP connection is newly started between any one of the users (terminal 21) and the server 30, the address translation device 40 executes an entry addition process for the address translation table 500. When the address conversion unit 150 receives a UDP connection establishment request from any user before the entry addition process starts, the address conversion unit 150 creates a new correspondence between the private IP address and the global IP address, and the port number before and after the conversion. Determine the correspondence relationship.

アドレス変換部150は、アドレス変換テーブル500の空きエントリを検索する(ステップS305)。このとき、ユーザごとに予め定められた範囲(メモリ領域内)で空きエントリを検索し、空きエントリの有無を判定する(ステップS310)。例えば、アドレス変換テーブル500が図12に示す状態であれば、ユーザA,Bについて新たにUDP接続を確立しようとする際には、空きエントリ無しと判定される。一方、ユーザCについて新たにUDP接続を確立しようとする際には、空きエントリ有りと判定される。空きエントリ有りと判定された場合には、アドレス変換部150は時刻管理部400から現在時刻を取得(ステップS315)し、存在した空きエントリに、UDP接続に関する情報(有効フラグを「有効」に、アドレス変換情報として「上記で決定したIPアドレスの対応関係、ポート番号の対応関係」を、接続種別を「UDP」に、接続状態を接続未確立状態ST10を示す「未確立」に、エイジングカウンタ値に「18」を、セッション生成時刻にS315で取得した現在時刻)を登録する(ステップS320)。   The address conversion unit 150 searches for an empty entry in the address conversion table 500 (step S305). At this time, a free entry is searched in a range (in the memory area) predetermined for each user, and the presence or absence of a free entry is determined (step S310). For example, if the address conversion table 500 is in the state shown in FIG. 12, it is determined that there is no empty entry when trying to establish a new UDP connection for the users A and B. On the other hand, when a new UDP connection is to be established for user C, it is determined that there is an empty entry. If it is determined that there is a free entry, the address conversion unit 150 obtains the current time from the time management unit 400 (step S315), and information related to the UDP connection (valid flag is set to “valid”) in the existing free entry. As the address translation information, “IP address correspondence, port number correspondence determined above”, connection type “UDP”, connection state “not established” indicating connection unestablished state ST10, aging counter value "18" and the current time acquired in S315 as the session creation time are registered (step S320).

ステップS320の後、アドレス変換部150は、新規開始されたUDP接続について、該当するユーザのUDP解放待ちテーブル700に、ステップS320において設定したアドレス変換テーブル500のエントリ識別子(エントリ番号、もしくはメモリアドレス)を新たに登録する(ステップS325)。   After step S320, the address conversion unit 150 adds the entry identifier (entry number or memory address) of the address conversion table 500 set in step S320 to the corresponding user's UDP release waiting table 700 for the newly started UDP connection. Is newly registered (step S325).

図12において、エントリ番号E104は、ステップS320によりエントリが新規に登録された直後の一例である。また図14において、テーブル700bに登録されているエントリ番号E104は、ステップS325により新たに登録されたエントリ識別子を例示している。新たに登録されるエントリ識別子は、E104の様に、常にテーブルの最下位に登録される。   In FIG. 12, an entry number E104 is an example immediately after an entry is newly registered in step S320. In FIG. 14, the entry number E104 registered in the table 700b exemplifies the entry identifier newly registered in step S325. Newly registered entry identifiers are always registered at the bottom of the table, as in E104.

前述のステップS310において、空きエントリ無しと判定されると、アドレス変換部150は、UDP解放待ちテーブル700にエントリがあるか(すなわち、アドレス変換テーブル500のいずれかのエントリ番号が記録されているか)を判定する(ステップS330)。例えば、UDP解放テーブル700が図14に示す状態であれば、ユーザBに関するUDP接続については、UDP解放待ちテーブル700bにエントリが有ると判定される。一方、ユーザA、Cに関するUDP接続については、UDP解放待ちテーブル700a、700cにエントリが無いと判定される。   If it is determined in step S310 described above that there is no empty entry, the address conversion unit 150 has an entry in the UDP release waiting table 700 (that is, any entry number in the address conversion table 500 is recorded). Is determined (step S330). For example, if the UDP release table 700 is in the state shown in FIG. 14, it is determined that there is an entry in the UDP release waiting table 700b for the UDP connection related to the user B. On the other hand, with respect to the UDP connection related to the users A and C, it is determined that there is no entry in the UDP release waiting tables 700a and 700c.

UDP解放待ちテーブル700にエントリが無いと判定されると(ステップS330:NO)、UDP接続の確立は失敗し、エントリ追加処理は終了する。ステップS330においてUDP解放待ちテーブル700にエントリが無い状態とは、アドレス変換テーブルの全てのエントリが有効であり、かつ、いずれのUDP接続もUDP接続確立状態ST11であるため、新たなエントリを登録する余地がない状態である。したがって、この場合、新たなUDP接続を確立することはできない。   If it is determined that there is no entry in the UDP release waiting table 700 (step S330: NO), the establishment of the UDP connection fails, and the entry addition process ends. The state in which there is no entry in the UDP release waiting table 700 in step S330 means that all entries in the address translation table are valid and all the UDP connections are in the UDP connection establishment state ST11, so a new entry is registered. There is no room. Therefore, in this case, a new UDP connection cannot be established.

前述のステップS330において、UDP解放待ちテーブル700にエントリがあると判定された場合(ステップS330:YES)、UDP解放待ちテーブル700の最も古いエントリ(最先に登録されたエントリ)に対応するアドレス変換テーブル500のエントリに登録されているセッション生成時刻を取得する(ステップS335)。例えば、ユーザBに関する新たなUDP接続については、図14に示すようにUDP解放待ちテーブル700bに2つのエントリ(エントリ番号E103及びE104が登録されたエントリ)が存在する。したがって、この場合、最も上方(最上位)に登録されているエントリ番号E103のエントリが、最も古いエントリであるので、図12に示すアドレス変換テーブル500のエントリ番号E103のエントリに登録されているセッション生成時刻t1が取得される。   When it is determined in the above-described step S330 that there is an entry in the UDP release waiting table 700 (step S330: YES), the address conversion corresponding to the oldest entry (the entry registered first) in the UDP release waiting table 700 The session generation time registered in the entry of the table 500 is acquired (step S335). For example, for a new UDP connection for user B, there are two entries (entries in which entry numbers E103 and E104 are registered) in the UDP release wait table 700b as shown in FIG. Therefore, in this case, since the entry with the entry number E103 registered at the top (the highest) is the oldest entry, the session registered with the entry with the entry number E103 in the address translation table 500 shown in FIG. The generation time t1 is acquired.

アドレス変換部150は、時刻管理部400から現在時刻を取得し(ステップS340)、ステップS335において取得したセッション生成時刻t1と比較して、所定の保護時間を経過しているか否かを判定する(ステップS345)。   The address conversion unit 150 acquires the current time from the time management unit 400 (step S340), and determines whether or not a predetermined protection time has elapsed by comparison with the session generation time t1 acquired in step S335 ( Step S345).

所定の保護時間を経過している場合(ステップS345:YES)、アドレス変換部150は、アドレス変換テーブル500における該当エントリに、UDP接続に関する情報を上書き登録する(ステップS350)。登録内容はステップS320と同等である。所定の保護時間を経過している場合、該当するUDP接続の通信は終了している、すなわち通信開始時の過渡的な状態にあるUDP通信(例えば片ホストが再送を繰り返している通信、双方向通信成立直後で以降通信が継続しうる通信)ではない、と見做せるため、該当するエントリの各フィールドに情報を上書きしても問題は生じない。つまり、UDPのセッション生成後に、まずはUDP接続未確立状態ST10になるが、その後所定の保護期間を経過しても接続確立状態ST11に遷移していなければ、このUDP通信は既に終了しているものと判断して、このUDP通信に関するアドレス変換テーブル500のエントリを開放し、新たなUDP接続に関する情報で上書きする。なお、この所定の保護時間については、通信開始時の過渡的な状態にあるUDP通信ではなく、通信が終了していると見做せるために適切な時間をユーザが予め任意に設定しておけばよい。   When the predetermined protection time has elapsed (step S345: YES), the address conversion unit 150 overwrites and registers information related to the UDP connection in the corresponding entry in the address conversion table 500 (step S350). The registered contents are the same as in step S320. If the predetermined protection time has elapsed, the communication of the corresponding UDP connection has ended, that is, the UDP communication in a transitional state at the start of communication (for example, communication in which one host repeats retransmission, bidirectional Therefore, there is no problem even if information is overwritten in each field of the corresponding entry. In other words, after the UDP session is generated, the UDP connection is not established ST10 first, but if the transition to the connection established state ST11 is not made after a predetermined protection period has passed, this UDP communication has already ended. Therefore, the entry of the address conversion table 500 related to this UDP communication is released and overwritten with information related to a new UDP connection. As for the predetermined protection time, the user can arbitrarily set an appropriate time in advance so that it can be considered that the communication has ended, not the UDP communication in a transitional state at the start of communication. That's fine.

前述のステップS345において、所定の保護時間を経過していない場合(ステップS345:NO)、UDP接続の確立は失敗し、エントリ追加処理は終了する。   In step S345 described above, when the predetermined protection time has not elapsed (step S345: NO), establishment of the UDP connection fails, and the entry addition process ends.

ステップS350による上書き登録後、上書き先を指していたUDP解放待ちテーブルのエントリ識別子を削除し、あらたに上書き登録したアドレス変換テーブルエントリの識別子をUDP解放待ちテーブルに再登録する(ステップS355)。   After overwriting registration in step S350, the entry identifier of the UDP release waiting table pointing to the overwriting destination is deleted, and the identifier of the address conversion table entry newly overwritten and registered is re-registered in the UDP release waiting table (step S355).

図16は、図12の状態からエントリ番号E103が、ステップS350によりエントリが上書き登録された直後の一例である。また図17は、図14の状態においてテーブル700bの最上位に登録されていたエントリ番号E103が、ステップS355により削除され、上方から2番目に登録されていた(2番目に古い)エントリであるエントリ番号E104のエントリが最上位に登録され、さらに新たなUDP接続に関する情報が上書きされたエントリ番号E103のエントリが新たに解放待ちエントリとして登録された例を示している。新たに登録されるエントリ識別子(E103)は常にテーブルの最下位に登録される。   FIG. 16 is an example immediately after the entry number E103 is overwritten and registered in step S350 from the state of FIG. FIG. 17 shows an entry that is the entry registered second (from the oldest) from the top, in which the entry number E103 registered at the top of the table 700b in the state of FIG. 14 is deleted in step S355. In the example, the entry with the number E104 is registered at the top, and the entry with the entry number E103 in which information related to the new UDP connection is overwritten is newly registered as a release waiting entry. The newly registered entry identifier (E103) is always registered at the bottom of the table.

A6.アドレス変換テーブルのエントリ更新処理(第2の実施形態:UDP):
図18は、UDP接続が接続確立状態に遷移した時のアドレス変換テーブルのエントリ処理の手順を示すフローチャートである。UDP接続確立状態に遷移するとアドレス変換装置40において、アドレス変換テーブル500のエントリ更新処理が開始される。
A6. Address translation table entry update processing (second embodiment: UDP):
FIG. 18 is a flowchart showing the procedure of the address conversion table entry process when the UDP connection is changed to the connection establishment state. When transitioning to the UDP connection establishment state, the address translation device 40 starts an entry update process of the address translation table 500.

アドレス変換部150は、UDP接続確立状態ST11となったUDP接続に対応するアドレス変換テーブル500のエントリにおいて、接続状態フィールドの値を確立状態を示す「確立」に更新する(ステップS405)。   The address translation unit 150 updates the value of the connection status field to “established” indicating the established status in the entry of the address translation table 500 corresponding to the UDP connection in the UDP connection established status ST11 (step S405).

図16は、ステップS405によりエントリが更新された後のアドレス変換テーブルの一例を示す説明図である。図16の例では、エントリ番号E104に対応するUDP接続の接続状態フィールドが、UDP接続未確立状態ST10を示す「未確立」から確立状態ST11を示す「確立」へ更新されている。   FIG. 16 is an explanatory diagram showing an example of the address conversion table after the entry is updated in step S405. In the example of FIG. 16, the connection state field of the UDP connection corresponding to the entry number E104 is updated from “not established” indicating the UDP connection unestablished state ST10 to “established” indicating the established state ST11.

図18に示すステップS405の後、アドレス変換部150は、接続確立状態に遷移したUDP接続について、該当するユーザのUDP解放待ちテーブル700から、該当するアドレス変換テーブル500のエントリのエントリ識別子を削除する(ステップS410)。   After step S405 illustrated in FIG. 18, the address conversion unit 150 deletes the entry identifier of the entry in the corresponding address conversion table 500 from the UDP release waiting table 700 of the corresponding user for the UDP connection transitioned to the connection establishment state. (Step S410).

図19は、図17に示す状態から、ステップS410によりエントリ番号が削除された後のUDP解放待ちテーブルの一例を示す説明図である。図19に示すように、前述の更新されたエントリのエントリ番号E104が削除され、上方から2番目に登録されていた(2番目に古い)エントリであるエントリ番号E103のエントリが最上位に登録されている。   FIG. 19 is an explanatory diagram showing an example of the UDP release wait table after the entry number is deleted in step S410 from the state shown in FIG. As shown in FIG. 19, the entry number E104 of the above-mentioned updated entry is deleted, and the entry with the entry number E103 which is the second registered from the top (second oldest) is registered at the top. ing.

以上のアドレス変換テーブルのエントリ更新処理によって、既に登録されているUDP接続のエントリにおいて、接続確立状態ST11となると、接続状態フィールドが「確立」に更新され、また、該当するユーザ用のUDP解放待ちテーブル700から、更新されたアドレス変換テーブル500のエントリのエントリ番号が削除される。その結果、UDP解放待ちテーブル内には接続未確立状態のUDP接続を示すエントリ番号のみが登録されている状態が保持される。   As a result of the above address conversion table entry update processing, when a connection establishment state ST11 is reached in an already registered UDP connection entry, the connection state field is updated to “established”, and the corresponding user UDP release waiting state The entry number of the updated entry in the address translation table 500 is deleted from the table 700. As a result, the state in which only the entry number indicating the UDP connection in the connection unestablished state is registered in the UDP release waiting table.

以上説明したネットワークシステム2000では、アドレス変換装置40において、いずれかのユーザから新たなUDP接続の確立要求があった場合に、保護時間を経過した接続未確立状態エントリに、新たなUDP接続に関する情報が上書き登録される。したがって、アドレス変換テーブル500における空きエントリ不足によるUDP接続の確立失敗を抑制することができる。   In the network system 2000 described above, in the address translation device 40, when there is a request for establishing a new UDP connection from any user, information on the new UDP connection is added to the connection unestablished state entry after the protection time has passed. Is overwritten and registered. Therefore, a UDP connection establishment failure due to a shortage of empty entries in the address translation table 500 can be suppressed.

上書き登録に対して所定の保護時間を設けていることで、接続状態が過渡状態であり、まだ通信終了していないUDP接続が誤って上書きされてしまうことを保護することができる。   By providing a predetermined protection time for overwriting registration, it is possible to protect the UDP connection that is in a transitional state and has not yet ended communication from being overwritten by mistake.

加えて、アドレス変換テーブル500では、各ユーザごとに登録可能なエントリ数を定め、また、各ユーザごとにUDP解放待ちテーブル700を設けているので、各ユーザ間の公平性を確保できると共に、各ユーザごとに空きエントリ不足によるUDP接続の確立失敗を抑制することができる。   In addition, in the address translation table 500, the number of entries that can be registered for each user is determined, and since the UDP release waiting table 700 is provided for each user, fairness among the users can be ensured, It is possible to suppress a failure to establish a UDP connection due to insufficient empty entries for each user.

また、UDP解放待ちテーブル700では、登録の順序が明確になるようにエントリ番号が登録されるので、最も上位の(最先に登録された)エントリを高速に見つけることができる。   In the UDP release wait table 700, entry numbers are registered so that the order of registration is clear, so that the highest entry (registered first) can be found at high speed.

なお、上述したTCPおよびUDPに関する2つの実施形態は、TCPおよびUDPそれぞれを個別に記載したが、アドレス変換テーブル500において、TCP接続に関する情報と登録していたエントリにUDP接続に関する情報を上書き登録してもよいし、その逆を行ってもよい。この場合、例えば新たなTCP接続の要求を受けた際に、まずは図8の処理フローを実行し、TCPエントリに対する上書き登録ができなかった場合に、図15の処理フローを実行し、UDPエントリに対する上書き登録ができるか否かを判断し、可能であればUDPエントリにTCPエントリを上書きするなどの処理を行うことが考えられる。なお、新たなUDP接続の要求を受けた際も同様である。もちろん、図8の処理フローと図15の処理フローを行う順序は逆でもよいし、双方の処理フローを同時に行って上書き登録可能なエントリを決定してもよい。   In the two embodiments related to TCP and UDP described above, TCP and UDP are individually described. However, in the address conversion table 500, information related to the TCP connection and information related to the UDP connection are overwritten and registered in the registered entry. Or vice versa. In this case, for example, when a request for a new TCP connection is received, the processing flow of FIG. 8 is first executed. When the overwriting registration for the TCP entry cannot be performed, the processing flow of FIG. It is possible to determine whether or not overwrite registration can be performed, and to perform processing such as overwriting a TCP entry on a UDP entry if possible. The same applies when a new UDP connection request is received. Of course, the order of performing the processing flow of FIG. 8 and the processing flow of FIG. 15 may be reversed, or both processing flows may be performed simultaneously to determine an entry that can be overwritten and registered.

B.変形例:
なお、上記各実施例における構成要素の中の、独立クレームでクレームされた要素以外の要素は、付加的な要素であり、適宜省略可能である。また、この発明は上記の実施例や実施形態に限られるものではなく、その要旨を逸脱しない範囲において種々の態様において実施することが可能であり、例えば次のような変形も可能である。
B. Variations:
In addition, elements other than the elements claimed in the independent claims among the constituent elements in each of the above embodiments are additional elements and can be omitted as appropriate. The present invention is not limited to the above-described examples and embodiments, and can be implemented in various modes without departing from the gist thereof. For example, the following modifications are possible.

B1.変形例1:
上記実施例では、アドレス変換テーブル500にTCP接続のCLOSED時刻を登録していたが、本発明はこれに限定されるものではない。例えば、CLOSED時刻に代えて、TCP接続閉塞処理状態ST3からTIME_WAIT状態ST4に遷移した時刻を登録することもできる。この場合、エントリの追加処理のステップS230では、TIME_WAIT状態ST4に遷移した時刻に基づきCLOSED時刻を決定し、かかるCLOSED時刻が現在時刻よりも時間的に以前であるか否かを判定することが好ましい。CLOSED時刻の決定は、例えば、TIME_WAIT状態ST4に遷移した時刻にメモリ解放待ち期間(120秒)を加えて決定することができる。また、例えば、CLOSED時刻に代えて、TIME_WAIT状態ST4に遷移した時刻に所定のオフセット時間(例えば、10秒)を加えた時刻を登録することもできる。この場合、ステップS230では、メモリ解放待ち期間からオフセット時刻を減算した期間を登録されている時刻に加えて得られた時刻が、現在時刻よりも時間的に以前か否かを判定することができる。すなわち、一般には、CLOSED時刻と関連する任意の時刻を、アドレス変換テーブル500に登録することができる。
B1. Modification 1:
In the above embodiment, the CLOSED time of TCP connection is registered in the address conversion table 500, but the present invention is not limited to this. For example, instead of the CLOSED time, the time when the TCP connection blocking process state ST3 transits to the TIME_WAIT state ST4 can be registered. In this case, in step S230 of the entry addition process, it is preferable to determine the CLOSED time based on the time of transition to the TIME_WAIT state ST4 and determine whether the CLOSED time is earlier than the current time. . The CLOSED time can be determined, for example, by adding a memory release waiting period (120 seconds) to the time of transition to the TIME_WAIT state ST4. Further, for example, instead of the CLOSED time, a time obtained by adding a predetermined offset time (for example, 10 seconds) to the time when the state transits to the TIME_WAIT state ST4 can be registered. In this case, in step S230, it can be determined whether or not the time obtained by adding the period obtained by subtracting the offset time from the memory release waiting period to the registered time is earlier in time than the current time. . That is, in general, any time related to the CLOSED time can be registered in the address conversion table 500.

B2.変形例2:
上記実施例では、登録の順序が明確になるようにTCP解放待ちテーブル600にエントリ番号を登録するために、より時間的に前のエントリをより上位に登録するようにしていたが、本発明はこれに限定されるものではない。例えば、TCP解放待ちテーブル600にエントリ番号を登録する際に登録する時刻も併せて登録することもできる。かかる構成では、エントリ追加処理のステップS220において、TCP開放待ちテーブル600の各エントリに登録されている登録時刻に基づき、最先に登録されているエントリを検索することもできる。
B2. Modification 2:
In the above embodiment, in order to register the entry number in the TCP release waiting table 600 so that the order of registration becomes clear, the previous entry is registered higher in time. It is not limited to this. For example, the registration time when registering the entry number in the TCP release waiting table 600 can also be registered. In such a configuration, the entry registered first can be searched based on the registration time registered in each entry of the TCP release waiting table 600 in step S220 of the entry addition process.

また、登録の順序が明確とならないようにしてTCP解放待ちテーブル600にエントリ番号を登録することもできる。かかる構成においても、TCP解放待ちテーブル600に登録されているエントリ番号の各エントリについて、それぞれCLOSED時刻が現在時刻よりも時間的に以前であるか否かを判定することにより、CLOSED時刻が現在時刻よりも時間的に以前のエントリを検索することができる。   It is also possible to register entry numbers in the TCP release waiting table 600 so that the registration order is not clarified. Even in this configuration, for each entry of the entry number registered in the TCP release waiting table 600, the CLOSED time is determined to be the current time by determining whether the CLOSED time is earlier than the current time. It is possible to search for previous entries in terms of time.

また、TCP解放待ちテーブル600を省略することもできる。この場合、エントリ追加処理において、アドレス変換テーブル500に登録されている各CLOSED時刻について、現在時刻よりも時間的に以前であるか否かを判定することにより、メモリ解放待ち期間が満了したエントリを検索することができる。   Further, the TCP release waiting table 600 can be omitted. In this case, in the entry addition process, it is determined whether each CLOSED time registered in the address conversion table 500 is earlier than the current time in time, thereby determining an entry whose memory release waiting period has expired. You can search.

また、各実施例では、CLOSED時刻が現在時刻よりも時間的に以前であり、かつ、CLOSED時刻が時間的に最も前となるエントリに、新たなTCP接続に関する情報が上書き登録されていたが、本発明はこれに限定されるものではない。CLOSED時刻が現在時刻よりも時間的に以前であるいずれかのエントリに、新たなTCP接続に関する情報を上書き登録することもできる。   In each embodiment, the CLOSED time is earlier than the current time and the information related to the new TCP connection is overwritten and registered in the entry whose CLOSED time is the earliest in time. The present invention is not limited to this. Information related to a new TCP connection can be overwritten and registered in any entry whose CLOSED time is earlier than the current time.

B3.変形例3:
上記実施例では、アドレス変換テーブル500におけるTCP接続についての各エントリに、エイジングカウンタ値を記録していたが、これに変えて、エイジングカウンタ値を記録しないこともできる。この場合、TCP接続についての各エントリは、CLOSED時刻となっても空きエントリとならないこととなる。しかしながら、上記エントリ追加処理により、CLOSED時刻が満了したエントリには新たなTCP接続に関する情報が上書き登録されるので、空きエントリ不足によるTCP接続の確立失敗を抑制できる。
B3. Modification 3:
In the above embodiment, the aging counter value is recorded in each entry for the TCP connection in the address conversion table 500. However, instead of this, the aging counter value may not be recorded. In this case, each entry for the TCP connection is not a free entry even when the CLOSED time is reached. However, because the entry addition process overwrites and registers information on a new TCP connection in the entry whose CLOSED time has expired, it is possible to suppress a TCP connection establishment failure due to a lack of empty entries.

B4.変形例4:
上記実施例では、アドレス変換テーブル500において、各ユーザごとに登録可能なエントリ数が定められていたが、かかる制限を設けないこともできる。この場合、エントリ追加処理のステップS210において、アドレス変換テーブル500全体において、空きエントリの有無を判定することができる。また、TCP解放待ちテーブル600を1つに統一することができる。
B4. Modification 4:
In the above embodiment, the number of entries that can be registered for each user is defined in the address conversion table 500, but such a restriction may not be provided. In this case, in step S210 of the entry addition process, it is possible to determine whether there is an empty entry in the entire address conversion table 500. Further, the TCP release waiting table 600 can be unified.

B5.変形例5:
上記実施例では、エントリ追加処理において、ステップS210により空きエントリを検索し、その後、空きエントリがない場合に、ステップS220〜S235によりCLOSED時刻が満了しているエントリを検索して接続に関する情報を上書き登録していたが、本発明はこれに限定されるものではない。先に、CLOSED時刻が満了しているエントリを検索し、その後、かかるエントリが見つかった場合には接続に関する情報を上書き登録し、CLOSED時刻が満了しているエントリが見つからなかった場合に空きエントリを検索することもできる。
B5. Modification 5:
In the above-described embodiment, in the entry addition process, a free entry is searched in step S210. After that, if there is no free entry, the entry whose CLOSED time has expired is searched in steps S220 to S235 to overwrite the connection information. Although registered, the present invention is not limited to this. First, an entry whose CLOSED time has expired is searched. If such an entry is found, information related to the connection is overwritten and registered, and an entry whose CLOSED time has expired is not found. You can also search.

B6.変形例6:
上記実施例では、アドレス変換装置10は、NAPT(Network Address and Port Translation)機能を有していたが、これに代えて、ポート番号の変換を行わないNAT(Network Address Translation)機能を有することもできる。また、アドレス変換装置10は、グローバルIPアドレスとプライベートIPアドレスとを相互に変換していたが、本発明はこれに限定されるものではない。例えば、アドレス変換装置10をLAN内でのアドレス変換に用い、かかるアドレス変換装置により、第1のプライベートIPアドレスから第2のプライベートIPアドレスに変換することもできる。また、IPアドレスに代えて、IPX(Internetwork Packet eXchange)で用いられるアドレスを採用することもできる。すなわち、一般には、通信用の第1のアドレスと通信用の第2のアドレスとのアドレス変換を行うアドレス変換装置を、本発明のアドレス変換装置として採用することができる。
B6. Modification 6:
In the above embodiment, the address translation device 10 has a NAPT (Network Address and Port Translation) function, but may instead have a NAT (Network Address Translation) function that does not translate port numbers. it can. Further, although the address translation device 10 translates a global IP address and a private IP address, the present invention is not limited to this. For example, the address translation device 10 can be used for address translation in the LAN, and the address translation device can translate the first private IP address to the second private IP address. Further, an address used in IPX (Internetwork Packet eXchange) can be adopted instead of the IP address. That is, in general, an address conversion device that performs address conversion between the first address for communication and the second address for communication can be employed as the address conversion device of the present invention.

B7.変形例7:
上記実施例では、アドレス変換装置10は、専用機であったが、これに代えて、他の器機の一部として構成することもできる。例えば、ローカルネットワークN1におけるエッジルーターやファイアウォールに搭載することもできる。また、例えば、ローカルネットワークN1に図示しないRadius(Remote Authentication Dial-In User Service)サーバが接続されている構成では、かかるRadiusサーバに搭載することもできる。
B7. Modification 7:
In the above embodiment, the address translation device 10 is a dedicated machine, but instead, it can be configured as a part of another device. For example, it can be installed in an edge router or firewall in the local network N1. Further, for example, in a configuration in which a Radius (Remote Authentication Dial-In User Service) server (not shown) is connected to the local network N1, it can be mounted on the Radius server.

B8.変形例8:
上記実施例のアドレス変換装置40においては、登録の順序が明確になるようにUDP解放待ちテーブル700にエントリ番号を登録するために、より時間的に前のエントリをより上位に登録するようにしていたが、本発明はこれに限定されるものではない。例えば、UDP解放待ちテーブル700にエントリ番号を登録する際に登録する時刻も併せて登録することで、エントリ追加処理ステップS330において、テーブル700の各エントリに登録されている登録時刻に基づき、最先に登録されているエントリを検索することもできる。
B8. Modification 8:
In the address translation device 40 of the above-described embodiment, in order to register the entry number in the UDP release waiting table 700 so that the order of registration is clear, the previous entry is registered higher in time. However, the present invention is not limited to this. For example, by registering the registration time when registering the entry number in the UDP release waiting table 700, the earliest destination is based on the registration time registered in each entry of the table 700 in the entry addition processing step S330. You can also search for entries registered in.

また、UDP解放待ちテーブル700を省略することもできる。この場合、エントリ追加処理において、アドレス変換テーブル500に登録されている各セッションの接続状態とセッション生成時間について、保護時間を経過していて接続状態が「未確立」であるか否かを判定することにより、上書き可能なエントリを検索することができる。   Further, the UDP release waiting table 700 can be omitted. In this case, in the entry addition process, it is determined whether the connection state and the session generation time of each session registered in the address translation table 500 have passed the protection time and the connection state is “unestablished”. Thus, it is possible to search for an entry that can be overwritten.

また、実施例では、最古に登録されており、かつ保護時間を経過しておりかつ、接続状態が「未確立」のUDPエントリに、新たなUDP接続に関する情報が上書き登録されていたが、本発明はこれに限定されるものではない。最古に登録されているものでなくとも、保護時間を経過しておりかつ、接続状態が「未確立」のUDPエントリであれば、上書きすることも出来る。さらには、保護時間を経過していなくとも上書きすることで、UDPエントリの利用効率を向上させる(その一方、過渡状態のUDP接続が保護されないというトレードオフが有る)することも出来る。これらアドレス変換装置による上書き動作は、ネットワークシステムの設計者が設定可能なアドレス変換装置のコンフィグレーションとしてすることが出来る。   Further, in the embodiment, the information regarding the new UDP connection is overwritten and registered in the UDP entry that has been registered the oldest, the protection time has passed, and the connection state is “unestablished”. The present invention is not limited to this. Even if it is not the oldest registered, it can be overwritten if the protection time has passed and the UDP entry has a connection status of “unestablished”. Furthermore, even if the protection time has not passed, it is possible to improve the utilization efficiency of the UDP entry (although there is a trade-off that the transient UDP connection is not protected). The overwriting operation by these address translation devices can be configured as an address translation device configuration that can be set by a network system designer.

B9.変形例9:
上記実施例のアドレス変換装置40においては、アドレス変換テーブル500において、各ユーザごとに登録可能なエントリ数が定められていたが、かかる制限を設けないこともできる。この場合、UDPエントリ追加処理のステップS310において、アドレス変換テーブル500全体において、空きエントリの有無を判定することができる。また、UDP解放待ちテーブル700を1つに統一することができる。
B9. Modification 9:
In the address translation device 40 of the above-described embodiment, the number of entries that can be registered for each user is defined in the address translation table 500, but such a restriction may not be provided. In this case, in step S310 of the UDP entry addition process, it is possible to determine whether or not there is an empty entry in the entire address conversion table 500. Further, the UDP release waiting table 700 can be unified.

B10.変形例10:
上記実施例のアドレス変換装置40においては、UDPエントリ上書きに対する保護時間はある所定の値として例示したが、本発明はこれに限定されるものではない。固定値ではなく、ネットワークシステムの設計者が設定可能なアドレス変換装置のコンフィグレーションとしてすることが出来る。
B10. Modification 10:
In the address translation device 40 of the above embodiment, the protection time against UDP entry overwrite is exemplified as a predetermined value, but the present invention is not limited to this. It is not a fixed value, but can be configured as an address translation device that can be set by the network system designer.

B11.変形例11:
上記実施例のアドレス変換装置40においては、UDPエントリ追加処理において、ステップS310により空きエントリを検索し、その後、空きエントリがない場合に、ステップS335〜S350により解放待ちエントリを検索して接続に関する情報を上書き登録していたが、本発明はこれに限定されるものではない。先に、解放待ちエントリを検索し、その後、かかるエントリが存在した場合には接続に関する情報を上書き登録し、解放待ちエントリが見つからなかった場合に空きエントリを検索することもできる。
B11. Modification 11:
In the address translation device 40 of the above embodiment, in the UDP entry addition process, a free entry is searched in step S310, and if there is no free entry after that, a release waiting entry is searched in steps S335 to S350, and information on connection is obtained. However, the present invention is not limited to this. It is also possible to search for a release waiting entry first, and thereafter register information related to connection if such an entry exists, and search for a free entry if no release waiting entry is found.

B12.変形例12:
上記実施例では、アドレス変換装置40は、NAPT(Network Address and Port Translation)機能を有していたが、これに代えて、ポート番号の変換を行わないNAT(Network Address Translation)機能を有することもできる。また、アドレス変換装置40は、グローバルIPアドレスとプライベートIPアドレスとを相互に変換していたが、本発明はこれに限定されるものではない。例えば、アドレス変換装置10をLAN内でのアドレス変換に用い、かかるアドレス変換装置により、第1のプライベートIPアドレスから第2のプライベートIPアドレスに変換することもできる。また、IPアドレスに代えて、IPX(Internetwork Packet eXchange)で用いられるアドレスを採用することもできる。すなわち、一般には、通信用の第1のアドレスと通信用の第2のアドレスとのアドレス変換を行うアドレス変換装置を、本発明のアドレス変換装置として採用することができる。
B12. Modification 12:
In the above embodiment, the address translation device 40 has a NAPT (Network Address and Port Translation) function, but may instead have a NAT (Network Address Translation) function that does not translate port numbers. it can. Further, the address translation device 40 translates the global IP address and the private IP address, but the present invention is not limited to this. For example, the address translation device 10 can be used for address translation in the LAN, and the address translation device can translate the first private IP address to the second private IP address. Further, an address used in IPX (Internetwork Packet eXchange) can be adopted instead of the IP address. That is, in general, an address conversion device that performs address conversion between the first address for communication and the second address for communication can be employed as the address conversion device of the present invention.

B13.変形例13:
上記実施例では、アドレス変換装置40は、専用機であったが、これに代えて、他の器機の一部として構成することもできる。例えば、ローカルネットワークN1におけるエッジルーターやファイアウォールに搭載することもできる。また、例えば、ローカルネットワークN1に図示しないRadius(Remote Authentication Dial-In User Service)サーバが接続されている構成では、かかるRadiusサーバに搭載することもできる。
B13. Modification 13:
In the above embodiment, the address translation device 40 is a dedicated machine, but instead, it can be configured as a part of another device. For example, it can be installed in an edge router or firewall in the local network N1. Further, for example, in a configuration in which a Radius (Remote Authentication Dial-In User Service) server (not shown) is connected to the local network N1, it can be mounted on the Radius server.

1000…ネットワークシステム
10…アドレス変換装置
21…端末
30…サーバ
100…アドレス変換部
200…第1パケットインタフェース部
300…第2パケットインタフェース部
400…時刻管理部
500…アドレス変換テーブル
600,600a,600b,600c…TCP解放待ちテーブル
2000…ネットワークシステム
150…アドレス変換部
40…アドレス変換装置
700,700a,700b,700c…UDP解放待ちテーブル
DESCRIPTION OF SYMBOLS 1000 ... Network system 10 ... Address conversion apparatus 21 ... Terminal 30 ... Server 100 ... Address conversion part 200 ... 1st packet interface part 300 ... 2nd packet interface part 400 ... Time management part 500 ... Address conversion table 600, 600a, 600b, 600c ... TCP release wait table 2000 ... network system 150 ... address translation unit 40 ... address translation device 700, 700a, 700b, 700c ... UDP release wait table

Claims (11)

アドレス変換装置であって、
複数のエントリを有し、各エントリにおいて、第1のアドレスと、第2のアドレスと、前記第1のアドレス及び前記第2のアドレスを用いたTCP接続がCLOSED状態となる時刻であるCLOSED時刻と関連する時刻である関連時刻と、が互いに対応付けられて登録されるアドレス変換テーブルと、
現在時刻を取得する時刻取得部と、
前記TCP接続がTIME_WAIT状態になると、前記取得された現在時刻に基づき前記関連時刻を決定する関連時刻決定部と、
アドレス管理部であって、
TIME_WAIT状態になった前記TCP接続に対応する前記アドレス変換テーブルのエントリに、前記決定された関連時刻を登録し、
アドレス変換要求に基づき第1のアドレスと第2のアドレスとを対応付け、前記アドレス変換テーブルに登録されている前記関連時刻と前記現在時刻とに基づき、前記CLOSED時刻が前記現在時刻よりも時間的に以前のエントリである解放予定エントリを検索し、前記新たに対応付けた第1のアドレス及び第2のアドレスを、前記解放予定エントリのいずれかに上書き登録する、アドレス管理部と、
を備える、アドレス変換装置。
An address translation device,
A CLOSED time which is a time at which a TCP connection using the first address and the second address becomes a CLOSED state in each entry. An address conversion table in which related times that are related times are registered in association with each other;
A time acquisition unit for acquiring the current time;
When the TCP connection enters the TIME_WAIT state, a related time determination unit that determines the related time based on the acquired current time;
An address management unit,
Register the determined related time in the entry of the address translation table corresponding to the TCP connection that is in the TIME_WAIT state,
Based on the address conversion request, the first address and the second address are associated with each other, and based on the related time and the current time registered in the address conversion table, the CLOSED time is more temporal than the current time. An address management unit that searches for a release scheduled entry that is a previous entry and overwrites and registers the newly associated first address and second address in any of the scheduled release entries;
An address translation device comprising:
請求項1に記載のアドレス変換装置において、
前記アドレス管理部は、第1のアドレスと第2のアドレスとを新たに対応付けると、前記アドレス変換テーブルに空きエントリがあるか否かを判定し、前記空きエントリがある場合には、前記空きエントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを登録し、前記空きエントリが無い場合には、前記解放予定エントリのうち最も時間的に前となるエントリである最古エントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを上書き登録する、アドレス変換装置。
The address translation device according to claim 1,
When the first address and the second address are newly associated with each other, the address management unit determines whether or not there is an empty entry in the address conversion table, and when there is the empty entry, the empty entry If the first address and the second address newly associated with each other are registered and there is no empty entry, the oldest entry which is the entry that is the earliest in time among the entries to be released is stored in the oldest entry. An address conversion apparatus for overwriting and registering a first associated first address and a second address.
請求項2に記載のアドレス変換装置において、さらに、
TIME_WAIT状態となった前記TCP接続に対応する前記アドレス変換テーブルにおけるエントリの識別子を登録するTCP解放待ちテーブルを備え、
前記アドレス管理部は、
前記TCP接続がTIME_WAIT状態になると、前記アドレス変換テーブルにおいて前記TCP接続に対応するエントリの識別子であるエントリ識別子を、前記TCP解放待ちテーブルに登録順序が明確になるように登録し、
前記空きエントリが無い場合には、前記TCP解放待ちテーブルにおいて時間的に最も前に登録された前記エントリ識別子である最古エントリ識別子を取得し、前記最古エントリ識別子の示す前記アドレス変換テーブルにおけるエントリに登録されている前記関連時刻と前記現在時刻とに基づき、前記エントリに対応する前記CLOSED時刻が、前記現在時刻よりも時間的に以前となるか否かを判定し、前記現在時刻よりも時間的に以前となる場合には、前記エントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを上書き登録し、前記現在時刻よりも時間的に以前とならない場合には、前記新たに対応付けた第1のアドレス及び第2のアドレスを、前記アドレス変換テーブルに登録しない、アドレス変換装置。
The address translation device according to claim 2, further comprising:
A TCP release waiting table for registering an identifier of an entry in the address conversion table corresponding to the TCP connection that is in a TIME_WAIT state;
The address management unit
When the TCP connection is in a TIME_WAIT state, an entry identifier that is an identifier of an entry corresponding to the TCP connection in the address translation table is registered in the TCP release waiting table so that the registration order is clear,
If there is no free entry, the oldest entry identifier, which is the entry identifier registered earliest in time in the TCP release waiting table, is acquired, and the entry in the address conversion table indicated by the oldest entry identifier is acquired. And whether the CLOSED time corresponding to the entry is earlier in time than the current time based on the related time registered in the current time and the current time. If it is earlier than the current time, the first address and the second address newly associated with the entry are overwritten and registered. An address translation device that does not register the associated first address and second address in the address translation table.
請求項3に記載のアドレス変換装置において、
前記TCP解放待ちテーブルを、複数のユーザのそれぞれに応じて備え、
前記アドレス管理部は、いずれかのユーザからのアドレス変換要求に基づき第1のアドレスと第2のアドレスとを新たに対応付けると、前記空きエントリが無い場合には、該ユーザ用の前記TCP解放待ちテーブルにおける前記最古エントリ識別子を取得し、該最古エントリ識別子の示す前記アドレス変換テーブルにおけるエントリに登録されている前記関連時刻と前記現在時刻とに基づき、前記エントリに対応する前記CLOSED時刻が、前記現在時刻よりも時間的に以前となるか否かを判定し、前記現在時刻よりも時間的に以前となる場合には、前記エントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを上書き登録し、前記現在時刻よりも時間的に以前とならない場合には、前記新たに対応付けた第1のアドレス及び第2のアドレスを、前記アドレス変換テーブルに登録しない、アドレス変換装置。
The address translation device according to claim 3.
The TCP release waiting table is provided for each of a plurality of users,
When the address management unit newly associates the first address and the second address based on an address conversion request from any user, and there is no empty entry, the TCP / IP device waits for the TCP release for the user. The oldest entry identifier in the table is acquired, and based on the related time and the current time registered in the entry in the address conversion table indicated by the oldest entry identifier, the CLOSED time corresponding to the entry is It is determined whether or not the current time is earlier than the current time. If the current time is earlier than the current time, the first address and the second address newly associated with the entry are determined. If the address is overwritten and is not earlier than the current time, the newly associated first address and The second address is not registered in the address translation table, the address translator.
請求項1ないし請求項4のいずれかに記載のアドレス変換装置において、
前記第1のアドレスはグローバルIPアドレスであり、前記第2のアドレスはプライベートIPアドレスである、アドレス変換装置。
In the address translation device according to any one of claims 1 to 4,
The address translation device, wherein the first address is a global IP address and the second address is a private IP address.
アドレス変換装置において用いられるアドレス変換テーブルの管理方法であって、
前記アドレス変換テーブルは、複数のエントリを有し、各エントリにおいて、少なくとも第1のアドレスと第2のアドレスとが互いに対応付けられて登録され、
(a)第1のアドレス及び第2のアドレスを用いたTCP接続がTIME_WAIT状態になると、現在時刻を取得すると共に、前記現在時刻に基づき前記第1のアドレス及び前記第2のアドレスを用いたTCP接続がCLOSED状態となる時刻であるCLOSED時刻と関連する時刻である関連時刻を決定する工程と、
(b)前記決定された関連時刻を、既に前記アドレス変換テーブルに登録されている、前記TCP接続に対応するエントリに登録する工程と、
(c)アドレス変換要求に基づき、第1のアドレスと第2のアドレスとが新たに対応付けられると、現在時刻を取得すると共に、前記アドレス変換テーブルに登録されている前記関連時刻と前記現在時刻とに基づき、前記CLOSED時刻が前記現在時刻よりも時間的に以前のエントリである解放予定エントリを検索し、前記新たに対応付けられた第1のアドレス及び第2のアドレスを、前記解放予定エントリのいずれかに上書き登録する工程と、
を備える、アドレス変換テーブルの管理方法。
A method for managing an address translation table used in an address translation device,
The address conversion table has a plurality of entries, and in each entry, at least a first address and a second address are registered in association with each other,
(A) When a TCP connection using the first address and the second address enters the TIME_WAIT state, the current time is acquired, and the TCP using the first address and the second address based on the current time Determining a related time that is a time related to a CLOSED time, which is a time when the connection is in the CLOSED state;
(B) registering the determined related time in an entry corresponding to the TCP connection already registered in the address translation table;
(C) Based on the address conversion request, when the first address and the second address are newly associated with each other, the current time is acquired, and the related time and the current time registered in the address conversion table Based on the above, the release scheduled entry whose CLOSED time is earlier than the current time is searched, and the newly associated first address and second address are searched for the release scheduled entry. A process of overwriting and registering to either
A method for managing an address conversion table.
アドレス変換装置であって、
複数のエントリを有し、各エントリにおいて、第1のアドレスと、第2のアドレスと、前記第1のアドレス及び前記第2のアドレスを用いたUDP接続についてセッションを生成する時刻と関連する時刻である関連時刻と、が互いに対応付けられて登録されるアドレス変換テーブルと、
現在時刻を取得する時刻取得部と、
前記UDP接続に対して、通信開始から1回の双方向通信が交わされた後に、片方向の通信が一度でも発生したUDP接続確立状態であるか、前記通信開始から1回の双方向通信が交わされた後に、片方向の通信が発生していないUDP接続未確立状態であるかを判断するUDP接続状態判定部と、
アドレス管理部であって、
アドレス変換要求に基づき第1のアドレスと第2のアドレスとを対応付け、前記アドレス変換テーブルのエントリの中から、前記UDP接続状態判定部によりUDP接続未確立状態であると判断され、前記関連時刻と前記現在時刻とを比較して所定の時間が経過しているエントリである解放予定エントリを検索し、前記新たに対応付けた第1のアドレス及び第2のアドレスを、前記解放予定エントリのいずれかに上書き登録する、アドレス管理部と、
を備える、アドレス変換装置。
An address translation device,
A plurality of entries, each having a first address, a second address, and a time associated with a time for generating a session for a UDP connection using the first address and the second address; An address conversion table in which certain related times are registered in association with each other;
A time acquisition unit for acquiring the current time;
For the UDP connection, after one-way communication is exchanged from the start of communication, one-way communication has been established even once, or a one-way communication has been performed since the start of communication. A UDP connection state determination unit that determines whether or not a UDP connection has not yet been established, in which no one-way communication has occurred,
An address management unit,
Based on the address conversion request, the first address and the second address are associated with each other, and the UDP connection state determination unit determines that the UDP connection state has not been established from the entries of the address conversion table, and the related time And the current time are compared to search for a release scheduled entry that is an entry for which a predetermined time has elapsed, and the newly associated first address and second address are determined as one of the release scheduled entries. The address management department,
An address translation device comprising:
請求項7に記載のアドレス変換装置において、
前記アドレス管理部は、第1のアドレスと第2のアドレスとを新たに対応付けると、前記アドレス変換テーブルに空きエントリがあるか否かを判定し、前記空きエントリがある場合には、前記空きエントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを登録し、前記空きエントリが無い場合には、前記解放予定エントリのうち前記関連時刻が最も時間的に前となるエントリである最古エントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを上書き登録する、アドレス変換装置。
The address translation device according to claim 7,
When the first address and the second address are newly associated with each other, the address management unit determines whether or not there is an empty entry in the address conversion table, and when there is the empty entry, the empty entry If the first and second addresses newly associated with each other are registered and there is no free entry, the entry with the related time that is the earliest in time in the release scheduled entry is registered. An address conversion apparatus for overwriting and registering the first address and the second address that are newly associated with an old entry.
請求項8に記載のアドレス変換装置において、さらに、
前記UDP接続未確立状態である前記UDP接続に対応する前記アドレス変換テーブルにおけるエントリの識別子を登録するUDP解放待ちテーブルを備え、
前記アドレス管理部は、
前記UDP接続が前記UDP接続未確立状態である場合に、前記アドレス変換テーブルにおいて前記UDP接続に対応するエントリの識別子であるエントリ識別子を、前記DUP解放待ちテーブルに登録順序が明確になるように登録し、
前記空きエントリが無い場合には、前記UDP解放待ちテーブルにおいて時間的に最も前に登録された前記エントリ識別子である最古エントリ識別子を取得し、前記最古エントリ識別子の示す前記アドレス変換テーブルにおけるエントリに登録されている前記関連時刻と前記現在時刻とを比較して所定の時間が経過しているか否かを判定し、前記所定の時間が経過している場合には、前記エントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを上書き登録し、前記所定の時間が経過していない場合には、前記新たに対応付けた第1のアドレス及び第2のアドレスを、前記アドレス変換テーブルに登録しない、アドレス変換装置。
The address translation device according to claim 8, further comprising:
A UDP release waiting table for registering an identifier of an entry in the address translation table corresponding to the UDP connection in the UDP connection unestablished state;
The address management unit
When the UDP connection is in the UDP connection unestablished state, an entry identifier that is an identifier of an entry corresponding to the UDP connection in the address translation table is registered in the DUP release waiting table so that the registration order is clear And
If there is no free entry, the oldest entry identifier which is the entry identifier registered earliest in time in the UDP release waiting table is acquired, and the entry in the address conversion table indicated by the oldest entry identifier is acquired. The related time registered with the current time is compared with the current time to determine whether or not a predetermined time has elapsed. If the predetermined time has elapsed, the entry is newly added to the entry. The associated first address and second address are overwritten and registered, and if the predetermined time has not elapsed, the newly associated first address and second address are converted to the address conversion. Address translation device not registered in the table.
請求項9に記載のアドレス変換装置において、
前記UDP解放待ちテーブルを、複数のユーザのそれぞれに応じて備え、
前記アドレス管理部は、いずれかのユーザからのアドレス変換要求に基づき第1のアドレスと第2のアドレスとを新たに対応付けると、前記空きエントリが無い場合には、該ユーザ用の前記UDP解放待ちテーブルにおける前記最古エントリ識別子を取得し、該最古エントリ識別子の示す前記アドレス変換テーブルにおけるエントリに登録されている前記関連時刻と前記現在時刻とを比較して所定の時間が経過しているか否かを判定し、前記所定の時間が経過している場合には、前記エントリに前記新たに対応付けた第1のアドレス及び第2のアドレスを上書き登録し、前記所定の時間が経過していない場合には、前記新たに対応付けた第1のアドレス及び第2のアドレスを、前記アドレス変換テーブルに登録しない、アドレス変換装置。
The address translation device according to claim 9, wherein
The UDP release waiting table is provided for each of a plurality of users,
When the address management unit newly associates the first address and the second address based on an address conversion request from any user, and there is no empty entry, the address management unit waits for the UDP release for the user. Whether or not a predetermined time has elapsed by obtaining the oldest entry identifier in the table and comparing the related time registered in the entry in the address conversion table indicated by the oldest entry identifier with the current time If the predetermined time has elapsed, the first address and the second address newly associated with the entry are overwritten and registered, and the predetermined time has not elapsed. In this case, the address translation device does not register the newly associated first address and second address in the address translation table.
請求項7ないし請求項10のいずれかに記載のアドレス変換装置において、
前記第1のアドレスはグローバルIPアドレスであり、前記第2のアドレスはプライベートIPアドレスである、アドレス変換装置。
The address translation device according to any one of claims 7 to 10,
The address translation device, wherein the first address is a global IP address and the second address is a private IP address.
JP2010119998A 2010-01-19 2010-05-26 Address translation device and address translation table management method Expired - Fee Related JP5380363B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010119998A JP5380363B2 (en) 2010-01-19 2010-05-26 Address translation device and address translation table management method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2010008736 2010-01-19
JP2010008736 2010-01-19
JP2010119998A JP5380363B2 (en) 2010-01-19 2010-05-26 Address translation device and address translation table management method

Publications (2)

Publication Number Publication Date
JP2011172201A true JP2011172201A (en) 2011-09-01
JP5380363B2 JP5380363B2 (en) 2014-01-08

Family

ID=44685812

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010119998A Expired - Fee Related JP5380363B2 (en) 2010-01-19 2010-05-26 Address translation device and address translation table management method

Country Status (1)

Country Link
JP (1) JP5380363B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016174293A (en) * 2015-03-17 2016-09-29 株式会社リコー Communication device, communication control program, and communication control method
JP2017005375A (en) * 2015-06-05 2017-01-05 Necエンジニアリング株式会社 Router device and redundancy configuration method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107995056B (en) * 2016-10-27 2021-04-13 中国移动通信集团公司 Method and device for judging hidden NAT fault of firewall

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003110596A (en) * 2001-09-28 2003-04-11 Hitachi Ltd Data communication service providing method
JP2004363663A (en) * 2003-06-02 2004-12-24 Nippon Telegr & Teleph Corp <Ntt> Call state management method in sip-alg
US6886103B1 (en) * 1999-10-28 2005-04-26 Lucent Technologies Inc. Method and apparatus for extending network address translation for unsupported protocols
JP2005311539A (en) * 2004-04-19 2005-11-04 Sony Corp Bridge device, address management method and network system
JP2009152953A (en) * 2007-12-21 2009-07-09 Nec Corp Gateway apparatus, packet forwarding method
JP2010219596A (en) * 2009-03-13 2010-09-30 Mitsubishi Electric Corp Relay processor, relay processing method, and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6886103B1 (en) * 1999-10-28 2005-04-26 Lucent Technologies Inc. Method and apparatus for extending network address translation for unsupported protocols
JP2003110596A (en) * 2001-09-28 2003-04-11 Hitachi Ltd Data communication service providing method
JP2004363663A (en) * 2003-06-02 2004-12-24 Nippon Telegr & Teleph Corp <Ntt> Call state management method in sip-alg
JP2005311539A (en) * 2004-04-19 2005-11-04 Sony Corp Bridge device, address management method and network system
JP2009152953A (en) * 2007-12-21 2009-07-09 Nec Corp Gateway apparatus, packet forwarding method
JP2010219596A (en) * 2009-03-13 2010-09-30 Mitsubishi Electric Corp Relay processor, relay processing method, and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016174293A (en) * 2015-03-17 2016-09-29 株式会社リコー Communication device, communication control program, and communication control method
JP2017005375A (en) * 2015-06-05 2017-01-05 Necエンジニアリング株式会社 Router device and redundancy configuration method

Also Published As

Publication number Publication date
JP5380363B2 (en) 2014-01-08

Similar Documents

Publication Publication Date Title
Afanasyev et al. NFD developer’s guide
US9071529B2 (en) Method and apparatus for accelerating forwarding in software-defined networks
JP4975190B2 (en) Search method for hosts in IPv6 network
JP2008054096A (en) Network repeater and method for controlling network repeater
JP2005316629A (en) Network protocol processing device
EP2622825A1 (en) Deriving quality of service data from a distributed hierarchical naming system
WO2014023003A1 (en) Method, apparatus, and system for controlling data transmission
US20110264795A1 (en) Communication network managment system, method and program, and management computer
JP2009296084A (en) Multipath communication system
WO2012126262A1 (en) Method and apparatus for accessing a private surveillance network through l2tp
CN104852840A (en) Method and device for controlling mutual access between virtual machines
JP2003298635A (en) Source address selection system, router equipment, communication node and source address selection method
KR20140038535A (en) Preventing neighbor-discovery based denial of service attacks
CN102158406B (en) Intelligent routing method for computer network links
JP5380363B2 (en) Address translation device and address translation table management method
US20100014542A1 (en) Network processing apparatus and processing method thereof
WO2014201600A1 (en) Session management method, address management method and relevant device
US10680930B2 (en) Method and apparatus for communication in virtual network
EP4024771A1 (en) Network measurement system and method, device and storage medium
JP2010166142A (en) Communication control device and communication control method, and program
WO2012088934A1 (en) Method and switching device for filtering messages
JP6056857B2 (en) Communication control device and communication control method
Team Nfd developer’s guide
JP6330814B2 (en) COMMUNICATION SYSTEM, CONTROL INSTRUCTION DEVICE, COMMUNICATION CONTROL METHOD, AND PROGRAM
JP2005229582A (en) Method of address management and address management device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120314

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120314

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130226

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130507

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130705

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130705

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130930

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5380363

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees