JP2015216593A - Relay device and program - Google Patents

Relay device and program Download PDF

Info

Publication number
JP2015216593A
JP2015216593A JP2014099696A JP2014099696A JP2015216593A JP 2015216593 A JP2015216593 A JP 2015216593A JP 2014099696 A JP2014099696 A JP 2014099696A JP 2014099696 A JP2014099696 A JP 2014099696A JP 2015216593 A JP2015216593 A JP 2015216593A
Authority
JP
Japan
Prior art keywords
ipv6
address
dns
v6v4napt
packet
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
JP2014099696A
Other languages
Japanese (ja)
Other versions
JP5889955B2 (en
Inventor
大我 米元
Taiga Yonemoto
大我 米元
大畑 博敬
Hirotaka Ohata
博敬 大畑
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.)
Nippon Telegraph and Telephone Corp
Nippon Telegraph and Telephone West Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Nippon Telegraph and Telephone West 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 Nippon Telegraph and Telephone Corp, Nippon Telegraph and Telephone West Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2014099696A priority Critical patent/JP5889955B2/en
Publication of JP2015216593A publication Critical patent/JP2015216593A/en
Application granted granted Critical
Publication of JP5889955B2 publication Critical patent/JP5889955B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To solve a terminal fallback problem in an IPv4/IPv6 dual stack environment to be accessible to a web server which can be accessed only by the IPv6, while reducing a waiting time to the possible extent.SOLUTION: It is discriminated whether or not a direct access to the Internet by the IPv6 with the prefix of an IPv6 address. When both an IPv4 address and an IPv6 address exist in a DNS response of a DNS query which is received from a terminal 12 and transferred to a DNS server 13, an IPv4 address and an IPv6 address corresponding to the DNS query are registered into a v6v4 combination table 25. Then, an IPv6 access from the terminal 12 to the server corresponding to the DNS query is relayed after v6v4 NAPT conversion is performed according to the record of the v6v4 combination table 25.

Description

この発明は、IPv4/IPv6デュアルスタックに対応する端末の通信を中継する中継装置に関する。   The present invention relates to a relay device that relays communication of a terminal that supports IPv4 / IPv6 dual stack.

IPv4/IPv6デュアルスタック対応の装置同士が通信する場合、どちらかのトランスポートプロトコルを優先して使用することになり、基本的にはIPv6を優先して使用する。IPv6を優先して接続する際に、IPv6のアクセスが出来ない場合はIPv6アクセスを諦め、IPv4アクセスに切り替える処理であるIPv6/IPv4フォールバックが生じる。しかし、IPv6でのレスポンスを待ってからIPv4に切り替える以上、この処理にはタイムラグが発生するため、ユーザ体感品質が劣化する。   When IPv4 / IPv6 dual stack compatible devices communicate with each other, one of the transport protocols is preferentially used, and basically IPv6 is preferentially used. When IPv6 is preferentially connected, if IPv6 access is not possible, IPv6 / IPv4 fallback, which is a process of giving up IPv6 access and switching to IPv4 access, occurs. However, as long as it waits for a response in IPv6 and then switches to IPv4, a time lag occurs in this process, and the user experience quality deteriorates.

一般家庭や小規模事業者などが通信事業者と契約する場合、割り振られるIPv6アドレスには、IPv6で直接にインターネットへの接続ができる契約と、出来ない契約とが存在している。このIPv6でインターネットに直接接続出来ない契約である端末がインターネットのサーバへIPv6アドレスを指定して接続しようとする際に、上記のフォールバックが生じて体感速度が低下することになる。   When a general household or a small-scale business contracts with a communication service provider, there are contracts that can be directly connected to the Internet using IPv6 and contracts that cannot be performed in the IPv6 addresses that are allocated. When a terminal, which is a contract that cannot be directly connected to the Internet with IPv6, tries to connect to an Internet server by specifying an IPv6 address, the fallback occurs and the perceived speed decreases.

この課題を解決する方法は既にいくつか提案されている。第一の方法としては、DNSサーバからAレコード(IPv4アドレス)とAAAAレコード(IPv6アドレス)を受け取った、インターネットに直接IPv6接続できない契約の端末(を中継するホームゲートウェイ)が、IPv6アドレスを指定したパケットを送出した場合、閉域網内にあるTCPリセッタがTCP−RSTを端末に送出することで、IPv4に切り替えるまでの待ち時間を短縮することが提案されている。   Several methods have already been proposed to solve this problem. As a first method, a terminal that receives an A record (IPv4 address) and an AAAA record (IPv6 address) from a DNS server and cannot connect directly to the Internet via IPv6 (the home gateway that relays it) specifies an IPv6 address. It has been proposed that when a packet is transmitted, a TCP resetter in the closed network transmits a TCP-RST to the terminal, thereby shortening a waiting time until switching to IPv4.

第二の方法としては、プロバイダが各ユーザに提供するキャッシュDNSサーバにAAAAフィルタを適用し、端末からのDNSクエリーに対してAレコード(IPv4アドレス)のみを端末に通知することが提案されている。また、この方法の応用として、端末が用いるホームゲートウェイでAAAAフィルタを適用し、DNSサーバから戻ってきたAAAAレコードをホームゲートウェイでカットする手法が特許文献1に提案されている。   As a second method, it is proposed that the AAAA filter is applied to the cache DNS server provided to each user by the provider, and only the A record (IPv4 address) is notified to the terminal in response to the DNS query from the terminal. . As an application of this method, Patent Document 1 proposes a method of applying an AAAA filter at a home gateway used by a terminal and cutting an AAAA record returned from the DNS server at the home gateway.

第三の方法としては、端末、またはそれを中継するホームゲートウェイが接続認証するRADIUSサーバが、個々のユーザの契約に従って告知するDNSサーバのアドレスを選択する方法が提案されている。すなわち、IPv6によるインターネットへの直接アクセスが可能な契約であるユーザに対しては、AレコードとAAAAレコードの両方を通知可能なDNSサーバのアドレスを通知し、直接アクセスができない契約であるユーザに対しては、Aレコードのみを通知可能なDNSサーバのアドレスを通知する。前者のユーザはIPv6でのアクセスが可能である一方、後者のユーザは最初からIPv4でのアクセスを行うため、フォールバックが発生しない。   As a third method, a method has been proposed in which the RADIUS server to which the terminal or the home gateway relaying the terminal authenticates the connection selects the DNS server address to be notified according to the contract of each user. That is, for users who are contracts that can directly access the Internet using IPv6, the address of the DNS server that can notify both the A record and the AAAA record is notified, and for users that are contracts that cannot be directly accessed. The address of the DNS server that can notify only the A record is notified. While the former user can access with IPv6, the latter user performs access with IPv4 from the beginning, so no fallback occurs.

特開2012−109887号公報JP 2012-108887 A

しかしながら、第一の方法では時間が短縮されるとはいえ、無駄な通信が発生することは避けられない。また、アプリケーションがフォールバックしない実装の場合は、IPv6通信が失敗した時点で通信不可となってしまう。   However, although the time is reduced in the first method, it is inevitable that unnecessary communication occurs. Further, in the case of an implementation in which the application does not fall back, communication becomes impossible when IPv6 communication fails.

第二の方法は、全てのユーザにAAAAフィルタを掛けるため、IPv6接続が可能なユーザもIPv6サービスを利用できなくなってしまう。また、セキュリティ向上のためにDNSSECを導入した場合には正常に動作しなくなるおそれがある。   In the second method, AAAA filters are applied to all users, so that users who can connect to IPv6 cannot use the IPv6 service. In addition, when DNSSEC is introduced to improve security, there is a risk that it will not operate normally.

第三の方法は、RADIUSサーバを変更しなければならなくなるため、影響が大きく、実現が困難であるという問題がある。   The third method has a problem that it has a large influence and is difficult to implement because the RADIUS server must be changed.

そこでこの発明は、IPv6の直接接続が可能な契約である場合にはIPv6のみでアクセス出来るサーバへのアクセス可能な環境を維持しつつ、IPv6/IPv4フォールバックの待ち時間を出来るだけ発生させないようにすることを目的とする。   Therefore, in the present invention, in the case of a contract that allows IPv6 direct connection, an IPv6 / IPv4 fallback waiting time is not generated as much as possible while maintaining an environment that can access a server that can be accessed only by IPv6. The purpose is to do.

この発明は、自身のIPv6アドレスのプレフィックスによりIPv6によるインターネットへの直接アクセスが可能か否かを判別し、当該IPv6アドレスがインターネットへの直接アクセスができない条件のものであった場合であって、
LAN側の端末から受信したDNSクエリーをDNSサーバへ転送したDNSレスポンスとしてIPv4アドレス及びIPv6アドレスの両方が存在した場合には、v6v4組合テーブルに当該DNSクエリーに対応するIPv4アドレス及びIPv6アドレスを登録し、
当該端末からの上記DNSクエリーに対応するサーバへのIPv6アクセスを、上記v6v4組合テーブルの記録に従ってv6v4NAPT変換を行って中継する中継装置により上記の課題を解決したのである。
The present invention determines whether or not direct access to the Internet by IPv6 is possible based on the prefix of its own IPv6 address, and the IPv6 address is a condition that does not allow direct access to the Internet,
When both the IPv4 address and the IPv6 address exist as a DNS response in which the DNS query received from the terminal on the LAN side is transferred to the DNS server, the IPv4 address and the IPv6 address corresponding to the DNS query are registered in the v6v4 combination table. ,
The above problem is solved by a relay device that relays IPv6 access from the terminal to the server corresponding to the DNS query by performing v6v4 NAPT conversion according to the record of the v6v4 combination table.

すなわち、IPv6によるインターネットへの直接接続が可能な契約状態にあるか否かを判断して処理を行うため、同じ中継装置を用いても、直接接続が可能なユーザではレスポンスが低下することなくそのまま使用できる。また、必要とするテーブルは全通信についてではなく、IPv4とIPv6との両方を通知された特定のサーバに対する特定の通信のみを変換するために必要な規模であればよいので、リソースの消費は少なくて済む。さらに、サーバではなく端末に近い末端部のホームゲートウェイなどに用いる中継装置でフォールバック問題をNAPT変換で解決してしまうため、不要な通信が発生しない。   In other words, since the process is performed by determining whether or not the contract state where direct connection to the Internet by IPv6 is possible, even if the same relay device is used, the user who can connect directly does not decrease the response. Can be used. Further, the required table is not necessary for all communications, but may be of a scale necessary for converting only specific communication for a specific server notified of both IPv4 and IPv6, so that resource consumption is small. I'll do it. Further, since the fallback problem is solved by the NAPT conversion in the relay device used for the home gateway at the end portion close to the terminal instead of the server, unnecessary communication does not occur.

この発明にかかる中継装置の具体的構成としては、次のようなテーブルと機能部により実現できる。テーブルとしては、DNSクエリーで指定されたドメイン名とそれに対応するIPv4アドレス及びIPv6アドレスとを記録するv6v4組合テーブルと、LAN側からWAN側へアクセスする際のv6v4NAPT変換のためのアドレス及びポート番号を記録するv6v4NAPTテーブルとを有する。
ソフトウェア又はハードウェアによる機能部としては、v6v4NAPT変換の判断と実行を行うv6v4機能管理部と、上記v6v4組合テーブルへの登録を含むDNSプロキシとしてDNSクエリー及びDNSレスポンスを中継する際に追加で機能する拡張DNSプロキシとを有する。
このうち、上記拡張DNSプロキシは、
LAN側から受信したDNSクエリーが指定するドメインを上記v6v4組合テーブルに登録する組合テーブル登録手段と、
当該DNSクエリーに対するDNSレスポンスにIPv4及びIPv6の両方が存在する場合に、上記v6v4組合テーブル中の当該DNSクエリーのドメインについてのレコードに、当該DNSレスポンスのIPv4アドレス及びIPv6アドレスとの組合せを登録する組合テーブル追記手段を有する。
また、上記v6v4機能管理部は、
上記中継装置自身に割り当てられたIPv6アドレスのプレフィックスにより上記中継装置自身がIPv6によるインターネットへの直接アクセスが可能か否かを判別し、不可能であればLAN側の端末からのIPv6アクセスについてv6v4NAPT機能を有効にするよう設定変更する直接接続判断手段と、
IPv6パケットをLAN側から受信した際に、当該IPv6パケットの送信元MACアドレスと送信先IPv6アドレスとの組合せが、上記v6v4組合テーブルに登録されていれば、上記v6v4NAPTテーブルにレコードを登録しつつv6v4NAPT変換を行い対応するWAN側のIPv4アドレス宛にパケットを転送可能にする拡張NAPT手段と、
IPv4パケットをWAN側から受信した際に、当該IPv4パケットのアドレス及びポート番号が上記v6v4NAPTテーブルに登録されていれば、上記v6v4NAPTテーブルを用いてv6v4NAPT変換の逆変換であるv4v6NAPT変換を行って、対応するLAN側のIPv6アドレスの端末宛にパケットを転送可能にする拡張逆NAPT手段と
を有する。
The specific configuration of the relay device according to the present invention can be realized by the following table and function unit. The table includes the v6v4 combination table that records the domain name specified by the DNS query and the corresponding IPv4 address and IPv6 address, and the address and port number for v6v4NAPT conversion when accessing from the LAN side to the WAN side. V6v4NAPT table to be recorded.
As a function unit by software or hardware, it additionally functions when relaying a DNS query and DNS response as a v6v4 function management unit that performs determination and execution of v6v4 NAPT conversion and a DNS proxy that includes registration in the v6v4 combination table. With an extended DNS proxy.
Of these, the extended DNS proxy is
A combination table registration means for registering the domain specified by the DNS query received from the LAN side in the v6v4 combination table;
A combination that registers a combination of the IPv4 address and the IPv6 address of the DNS response in the record for the domain of the DNS query in the v6v4 combination table when both DNS4 and IPv6 exist in the DNS response to the DNS query. Table addition means is provided.
The v6v4 function management unit
Based on the IPv6 address prefix assigned to the relay device itself, the relay device itself determines whether or not direct access to the Internet by IPv6 is possible. If not, the v6v4NAPT function is provided for IPv6 access from a terminal on the LAN side. A direct connection determination means for changing the setting to enable,
When the IPv6 packet is received from the LAN side, if the combination of the source MAC address and the destination IPv6 address of the IPv6 packet is registered in the v6v4 combination table, the record is registered in the v6v4NAPT table and the v6v4NAPT is registered. An extended NAPT means for performing the conversion and forwarding the packet to the corresponding IPv4 address on the WAN side;
When an IPv4 packet is received from the WAN side, if the address and port number of the IPv4 packet are registered in the v6v4NAPT table, the v6v4NAPT table is used to perform v4v6NAPT conversion, which is the reverse conversion of v6v4NAPT conversion. And an extended inverse NAPT means for enabling transfer of a packet to a terminal having an IPv6 address on the LAN side.

なお、拡張DNSプロキシ以外に、一般的なルータ機能の一部として実行される通常のDNSプロキシとして、DNSクエリーをDNSサーバへ転送するクエリー転送手段と、DNSレスポンスを対応するDNSクエリーの送信元へ転送するレスポンス転送手段とを有する。   In addition to the extended DNS proxy, as a normal DNS proxy executed as a part of a general router function, a query transfer means for transferring a DNS query to a DNS server, and a DNS response to a corresponding DNS query source Response transfer means for transferring.

また、既存の中継装置に、上記のv6v4組合テーブル、上記v6v4NAPTテーブル、上記v6v4機能管理部、及び上記拡張DNSプロキシとして動作させるためのプログラムをインストールさせることでも、この発明を実施できる。   The present invention can also be implemented by installing a program for operating the v6v4 combination table, the v6v4NAPT table, the v6v4 function management unit, and the extended DNS proxy in an existing relay device.

この発明にかかる中継装置により、RADIUSサーバの改修やDNSサーバの新設を必要とせず、端末側の設定も必要とせずに、末端部に近い中継装置によってフォールバック問題を解決できる。   According to the relay device according to the present invention, the fallback problem can be solved by the relay device close to the end without requiring modification of the RADIUS server or newly installing a DNS server and without setting the terminal side.

この発明にかかる中継装置の機能ブロックと周囲の端末及びサーバとの関係図Relationship diagram between the functional block of the relay device according to the present invention and surrounding terminals and servers この発明にかかる中継装置の実施形態例における起動時の機能選択を示すフロー図The flowchart which shows the function selection at the time of starting in the embodiment of the relay apparatus concerning this invention (a)この発明にかかる中継装置の実施形態例におけるDNSクエリー受信時のフロー図、(b)(a)のレスポンス受信時のフロー図(A) Flow diagram at the time of DNS query reception in the embodiment of the relay device according to the present invention, (b) Flow diagram at the time of response reception of (a) v6v4組合テーブルの例図Example of v6v4 association table (a)この発明にかかる中継装置の実施形態例におけるIPv6パケット受信時のフロー図、(b)(a)のレスポンス受信時のフロー図(A) Flow chart when IPv6 packet is received in embodiment of relay apparatus according to this invention, (b) Flow chart when receiving response of (a) v6v4NAPTテーブルの例図Example of v6v4NAPT table 実施例における通信シーケンス図Communication sequence diagram in the embodiment (a)〜(d)実施例における各テーブルの変遷図(A)-(d) Transition diagram of each table in the embodiment

以下、この発明について実施形態の例を挙げて説明する。
この発明にかかる中継装置11の機能ブロック図と、これを利用する端末12、サーバとの関係図をまとめて図1に示す。
Hereinafter, the present invention will be described with reference to examples of embodiments.
FIG. 1 shows a functional block diagram of the relay device 11 according to the present invention and a relationship diagram between the terminal 12 and the server using the relay device 11.

中継装置11はLAN17側とWAN18側の両方にネットワークインターフェースを有する中継装置である。具体的には、一般的なルータ機能21などを有するホームゲートウェイのようなネットワーク中継専用の機器を本発明にかかる中継装置11として十分に利用可能である。大規模サーバのような処理能力は必要としない。ただし、DNSサーバのIPアドレスを取得し、かつ、自身もIPアドレスを有して、中継するパケットのアドレス変換やポート変換を行うため、スイッチでは不十分である。   The relay device 11 is a relay device having network interfaces on both the LAN 17 side and the WAN 18 side. Specifically, a device dedicated to network relay such as a home gateway having a general router function 21 or the like can be sufficiently used as the relay device 11 according to the present invention. It does not require processing power like a large-scale server. However, a switch is insufficient because it obtains the IP address of the DNS server and also has an IP address and performs address translation and port translation of the relayed packet.

LAN17は一般家庭や小規模事業者のネットワークであり、複数の端末12(12a、12b、12c……)を有する。端末12は中継装置11を通じてWAN18側のインターネット19に存在するDNSサーバ13やwebサーバ14a、14b、14cにアクセスする。   The LAN 17 is a network for general households and small businesses, and has a plurality of terminals 12 (12a, 12b, 12c...). The terminal 12 accesses the DNS server 13 and the web servers 14a, 14b, and 14c existing in the Internet 19 on the WAN 18 side through the relay device 11.

WAN18は直接にインターネット19に繋がっているのではなく、IPv6による閉域網20を介してインターネット19に繋がっている。中継装置11が払い出されるIPv6のアドレス次第で、IPv6アドレスのままインターネット19に接続できる場合と、閉域網20までのアクセスに限定される場合とがある。後者の場合は、別手段としてインターネット19へ直接接続可能なIPv4が利用されることが多い。   The WAN 18 is not directly connected to the Internet 19 but is connected to the Internet 19 via a closed network 20 based on IPv6. Depending on the IPv6 address to which the relay device 11 is issued, there are cases where the IPv6 address can be connected to the Internet 19 and access to the closed network 20 is limited. In the latter case, IPv4 that can be directly connected to the Internet 19 is often used as another means.

上記の通り中継装置11は、一般的なルータ機能21を有する。WAN18側のサーバからIPv4アドレス及びIPv6アドレスを付与され、配下の端末12にIPv4アドレス及びIPv6アドレスを付与し、端末12からのアクセスをNAPT変換して中継する。さらに、v6v4機能管理部22、拡張DNSプロキシ23、v6v4組合テーブル25、v6v4NAPTテーブル26を有する。   As described above, the relay device 11 has a general router function 21. The IPv4 address and the IPv6 address are given from the server on the WAN 18 side, the IPv4 address and the IPv6 address are given to the subordinate terminal 12, and the access from the terminal 12 is subjected to NAPT conversion and relayed. Furthermore, the v6v4 function management unit 22, the extended DNS proxy 23, the v6v4 combination table 25, and the v6v4NAPT table 26 are provided.

以下、それらの機能を順に説明する。中継装置11の電源投入時点又は再起動時点からの機能選択を図2のフローにより説明する。
まず、中継装置11は、ルータ機能21によりWAN18側のサーバからIPv6のアドレスを取得する(S101)。v6v4機能管理部22は、その取得したIPv6アドレスが、インターネット19への直接接続が可能なアドレスであるか否かを判断する直接接続判断手段111を実行する(S102)。この判断は、中継装置11の記憶部24に、IPv6アドレスのプレフィックスについての条件を予め登録しておき、取得したIPv6アドレスのプレフィックスをその条件と対照させることで可能である。インターネット19への直接接続が可能な契約であれば(S102−Yes)、本発明にかかる中継装置11としての機能を実行する必要はないため、この発明で行う後述のv6v4NAPT機能を全てOFFにする機能停止手段113を実行する(S105)。直接接続ができない契約であれば(S102−No)、この発明により実行するv6v4NAPT機能の意義がある。
Hereinafter, these functions will be described in order. The function selection from when the relay device 11 is powered on or restarted will be described with reference to the flowchart of FIG.
First, the relay device 11 acquires an IPv6 address from the server on the WAN 18 side by the router function 21 (S101). The v6v4 function management unit 22 executes the direct connection determination unit 111 that determines whether or not the acquired IPv6 address is an address that allows direct connection to the Internet 19 (S102). This determination can be made by previously registering a condition for the IPv6 address prefix in the storage unit 24 of the relay apparatus 11 and comparing the acquired IPv6 address prefix with the condition. If the contract allows direct connection to the Internet 19 (S102-Yes), it is not necessary to execute the function as the relay apparatus 11 according to the present invention, and therefore all the later-described v6v4NAPT functions performed in the present invention are turned off. The function stop means 113 is executed (S105). If the contract cannot be directly connected (S102-No), the v6v4NAPT function executed by the present invention is significant.

ただし、v6v4の変換機能は接続形態の変更を伴うため、無条件に適用すると端末12を利用するユーザの意志に反することもありうる。このため、v6v4機能管理部22は、上記のv6v4NAPT機能の実行を許可する設定であるか否かを判断する設定判断手段112を実行する(S103)と望ましい。なお後述するフローでも同様の判断を行うことを前提に説明するが、この判断は必須ではなく、中継装置11の設置と実行をもって許可を得て、自動実行する設定でもよい。なお、図示しないが、ルータ機能21により実現される中継装置11の端末12に対するwebサーバ機能により、端末12側からのアクセスによってそれらの設定は変更する実行是非登録手段110を実行できる。許可しない設定であれば(S103−No)、この発明で行う後述のv6v4NAPT機能を全てOFFにする機能停止手段113を実行する(S105)。許可する設定であれば(S103−Yes)、この発明により実行するv6v4NAPT機能をONにする機能稼働手段114を実行する(S104)。   However, since the v6v4 conversion function is accompanied by a change in the connection form, if applied unconditionally, it may be contrary to the will of the user who uses the terminal 12. For this reason, it is desirable that the v6v4 function management unit 22 executes the setting determination unit 112 that determines whether or not the setting allows the execution of the v6v4NAPT function (S103). In addition, although it demonstrates on the assumption that the same judgment is performed also in the flow to be described later, this judgment is not essential, and it may be set to be automatically executed after obtaining permission upon installation and execution of the relay device 11. Although not shown, the web server function for the terminal 12 of the relay device 11 realized by the router function 21 can execute the execution right registration unit 110 that changes those settings by access from the terminal 12 side. If the setting is not permitted (S103-No), the function stopping unit 113 for turning off all the later-described v6v4NAPT functions performed in the present invention is executed (S105). If the setting is permitted (S103-Yes), the function operating unit 114 for turning on the v6v4NAPT function executed according to the present invention is executed (S104).

上記の判断によりv6v4NAPT機能がONになった場合、v6v4機能管理部22が行う次の処理の前に、拡張DNSプロキシ23が行う処理を図3(a)(b)により説明する。   When the v6v4 NAPT function is turned ON by the above determination, the process performed by the extended DNS proxy 23 before the next process performed by the v6v4 function management unit 22 will be described with reference to FIGS.

まず、通常のDNSプロキシの動作として端末12からDNSクエリーを受信した(S111)ときの動作を図3(a)のフローにより説明する。受信したら、拡張DNSプロキシ23は必要に応じて、上記のv6v4NAPT機能の実行を許可する設定であるか否かを判断する設定判断手段121を実行する。上記のv6v4NAPT機能の実行を許可する設定でなければ(S112−No)、そのまま通常のDNSプロキシの実行に移る(S114)。実行を許可する設定であれば(S112−Yes)、v6v4組合テーブル25に、当該DNSクエリーの送信元MACアドレスである端末12のMACアドレスと、DNSクエリーが指定するドメイン名からなるレコードを登録するとともに、テーブルからレコードを消去するためのタイマーを設定する組合テーブル登録手段122を実行する(S113)。   First, the operation when a DNS query is received from the terminal 12 (S111) as a normal DNS proxy operation will be described with reference to the flow of FIG. Upon reception, the extended DNS proxy 23 executes setting determination means 121 for determining whether or not it is a setting that permits execution of the v6v4NAPT function as necessary. If it is not the setting which permits execution of the above-mentioned v6v4NAPT function (S112-No), it proceeds to the normal DNS proxy execution as it is (S114). If the setting is permitted (S112-Yes), a record composed of the MAC address of the terminal 12 that is the source MAC address of the DNS query and the domain name specified by the DNS query is registered in the v6v4 combination table 25. At the same time, the combination table registration unit 122 for setting a timer for deleting the record from the table is executed (S113).

このv6v4組合テーブル25の例を図4に示す。「MAC」はMACアドレスであり、「DNSクエリ」はクエリーが解決しようとするドメイン名であり、「IPv6」はクエリーに対するDNSサーバ13のレスポンスであるIPv6アドレス、「IPv4」はクエリーに対するDNSサーバ13のレスポンスであるIPv4アドレス、「タイマ」はテーブルの肥大化を避けるために一定時間経過でレコードを削除するための制限時間である。これらのうち、MACアドレスはそれぞれの端末12(12a、12b、12c……)を一意に特定するためのものであるため必須ではなく、代わりに端末12(12a、12b、12c……)のIPアドレスを登録する形態であってもよい。また、端末12のMACアドレスやIPアドレスをレコードに含めずに、すなわち、端末12を個々に識別せずに、それぞれの端末12a,12b,12c・・・の間でレコードを共有する形態での実施も可能である。ただし、DNSサーバ13は、負荷分散のためにDNSレスポンスで指示するアドレスをリクエストごとに変える場合がある。この負荷分散に追随しようとすると、端末12(12a、12b、12c……)を個々に識別できるようにしておかなければならず、MACアドレスやIPアドレスを記録して端末12(12a、12b、12c……)毎にレコードを分けることでこれに対応可能となる。   An example of this v6v4 combination table 25 is shown in FIG. “MAC” is a MAC address, “DNS query” is a domain name to be resolved by the query, “IPv6” is an IPv6 address that is a response of the DNS server 13 to the query, and “IPv4” is the DNS server 13 for the query. The IPv4 address, “timer”, which is a response to the above, is a time limit for deleting a record after a lapse of a certain time in order to avoid the enlargement of the table. Of these, the MAC address is not essential because it uniquely identifies each terminal 12 (12a, 12b, 12c...). Instead, the IP of the terminal 12 (12a, 12b, 12c...) An address may be registered. Further, the record is not shared between the terminals 12a, 12b, 12c, etc. without including the MAC address or IP address of the terminal 12 in the record, that is, without individually identifying the terminal 12. Implementation is also possible. However, the DNS server 13 may change the address indicated by the DNS response for each request for load distribution. In order to follow this load distribution, the terminals 12 (12a, 12b, 12c...) Must be individually identified, and the MAC address and IP address are recorded and the terminals 12 (12a, 12b,. 12c...)) This can be dealt with by dividing the record every time.

また上記のv6v4組合テーブル25の項目のうち、タイマーも必須ではなく、またこの形態である必要もない。例えば、レコード数が閾値を越える毎に古いものから削除していくことでも肥大化を抑制することができる。また、図4におけるタイマーは一秒ごとにデクリメントされていく方式であるが、開始時刻に応じたタイムアウトして削除する時刻を記録する方式でもよい。なおS113において同一のレコードがある場合には、タイマーの設定を上書きして、デクリメントするタイマーのカウントを初期値にしたり、タイムアウトして削除する時刻を新たな時刻からの時間に変更したりする。このように同一のレコードが存在して上書きするケースとしては、DNSローカルキャッシュがOFFに設定されている端末12でクリックの連打などにより、同じ端末12から立て続けにDNSクエリーが送信される場合が考えられる。また、端末12毎のMACアドレスを区別しない場合は、同じドメインへのクエリーが複数の端末12a,12b,12c……により連続すると上記のケースに該当しうる。   Of the items in the v6v4 combination table 25 described above, the timer is not essential and is not required to be in this form. For example, the enlargement can be suppressed by deleting the oldest records every time the number of records exceeds a threshold. In addition, the timer in FIG. 4 is a method of decrementing every second, but a method of recording a time to be deleted after a timeout according to the start time may be used. If there is the same record in S113, the timer setting is overwritten, the count of the timer to be decremented is set to the initial value, or the time to be deleted due to timeout is changed to the time from the new time. As a case where the same record exists and is overwritten, a DNS query may be transmitted in succession from the same terminal 12 due to repeated clicks on the terminal 12 whose DNS local cache is set to OFF. It is done. Further, when the MAC address for each terminal 12 is not distinguished, the above-described case can be satisfied when queries to the same domain are continued by a plurality of terminals 12a, 12b, 12c.

ただし、上記のv6v4組合テーブル25は、S113の段階ではIPv4及びIPv6の欄は空欄である。その上で、拡張DNSプロキシ23から通常のルータ機能21であるDNSプロキシの実行に移る(S114)。   However, in the v6v4 combination table 25 described above, the IPv4 and IPv6 fields are blank at the stage of S113. After that, the extended DNS proxy 23 shifts to execution of the DNS proxy that is the normal router function 21 (S114).

ここでのDNSプロキシの動作は、端末12から受信したDNSクエリーを、RADIUSサーバ15などで指定されたDNSサーバ13に転送するクエリー転送手段101が実行される。その後、DNSサーバ13から返答されて来たDNSレスポンスを当該端末12宛に中継するレスポンス転送手段102が実行されるが、その実行の前に、拡張DNSプロキシ23が行う処理を図3(b)のフローとともに説明する。   The DNS proxy operation here is performed by the query transfer means 101 that transfers the DNS query received from the terminal 12 to the DNS server 13 designated by the RADIUS server 15 or the like. Thereafter, the response transfer means 102 for relaying the DNS response returned from the DNS server 13 to the terminal 12 is executed. Before the execution, the processing performed by the extended DNS proxy 23 is shown in FIG. This will be described together with the flow of.

ルータ機能21がDNSレスポンスを受信すると(S121)、拡張DNSプロキシ23は、必要に応じて、上記のv6v4NAPT機能の実行を許可する設定であるか否かを判断する設定判断手段121を実行する(S122)。これはDNSクエリーに対するS111の処理と同じである。上記のv6v4NAPT機能の実行を許可する設定でなければ(S122−No)、そのまま通常のDNSプロキシの実行に移る(S126)。実行を許可する設定であれば(S122−Yes)、受け取ったDNSレスポンスの中身を解析するレスポンス解析手段123を実行する(S123)。このとき、DNSレスポンスに含まれるのが、Aレコード(IPv4)のみ、又はAAAAレコード(IPv6)のみであると(S123−No)、DNSレスポンスに対応するDNSクエリーを中継したS113においてv6v4組合テーブル25に登録した、該当するレコードを削除する組合テーブル削除手段124を実行する(S125)。これは、IPv4のみ、又はIPv6のみしか通知されない場合は、後述する逆変換であるv4v6NAPT変換を行うことがそもそもできないからである。Aレコード(IPv4アドレス)のみを通知された場合は、そのまま通常のDNSプロキシを実行して(S126)、端末12にIPv4アドレスが渡されることで、端末12は該当するwebサーバ14にIPv4によりアクセスできる。AAAAレコード(IPv6アドレス)のみを通知された場合も同様に通常のDNSプロキシが実行される(S126)が、中継装置11が所持するIPv6アドレスではインターネット19への直接接続ができないため、端末12からのアクセスを可能にするには別の手段を設定する必要がある。   When the router function 21 receives the DNS response (S121), the extended DNS proxy 23 executes setting determination means 121 for determining whether or not it is a setting permitting the execution of the above-described v6v4NAPT function as necessary (S121). S122). This is the same as the processing of S111 for the DNS query. If it is not the setting which permits execution of the above-mentioned v6v4NAPT function (S122-No), it proceeds to the normal DNS proxy execution as it is (S126). If the setting is to permit execution (S122-Yes), the response analysis unit 123 that analyzes the contents of the received DNS response is executed (S123). At this time, if the DNS response includes only the A record (IPv4) or only the AAAA record (IPv6) (S123-No), the v6v4 combination table 25 is relayed in S113 in which the DNS query corresponding to the DNS response is relayed. The union table deleting means 124 for deleting the corresponding record registered in (1) is executed (S125). This is because when only IPv4 or only IPv6 is notified, v4v6 NAPT conversion, which is reverse conversion described later, cannot be performed in the first place. When only the A record (IPv4 address) is notified, the normal DNS proxy is executed as it is (S126), and the IPv4 address is passed to the terminal 12, so that the terminal 12 accesses the corresponding web server 14 by IPv4. it can. Even when only the AAAA record (IPv6 address) is notified, a normal DNS proxy is executed in the same manner (S126). However, since the IPv6 address possessed by the relay device 11 cannot be directly connected to the Internet 19, the terminal 12 It is necessary to set another means to enable access.

一方、DNSレスポンスにAレコードとAAAAレコードの両方が含まれていれば(S123−Yes)、この後の応答でv6v4NAPT変換を行う意義がある。そこで、v6v4組合テーブル25の、当該DNSレスポンスに対応するDNSクエリーで登録されたレコードについて、空欄であったIPv4アドレス、IPv6アドレスに、DNSレスポンスに含まれる情報を上書きして登録する組合テーブル追記手段125を実行する(S124)。その上で、AレコードとAAAAレコードの両方を含めたDNSレスポンスを、通常のDNSプロキシとして端末12に転送するレスポンス転送手段102を実行する(S126)。   On the other hand, if the DNS response includes both the A record and the AAAA record (S123-Yes), it is meaningful to perform the v6v4NAPT conversion in the subsequent response. Therefore, the union table appending means for overwriting and registering information contained in the DNS response to the blank IPv4 address and IPv6 address for the record registered by the DNS query corresponding to the DNS response in the v6v4 union table 25. 125 is executed (S124). Then, the response transfer means 102 is executed to transfer the DNS response including both the A record and the AAAA record to the terminal 12 as a normal DNS proxy (S126).

上記のDNSレスポンスによりDNSの名前が解決された端末12は、引き続いて当該IPアドレスへのリクエストを送信する。このパケットがIPv4によるものであれば、中継装置11のルータ機能21は一般的なNAPT変換を含んでもよい通常の動作により中継する(図示せず)。   The terminal 12 whose DNS name has been resolved by the above DNS response subsequently transmits a request to the IP address. If this packet is based on IPv4, the router function 21 of the relay device 11 relays it by a normal operation that may include general NAPT conversion (not shown).

この際のフローを、図5(a)を用いて説明する。中継装置11がLAN側から受け取ったパケットがインターネット19のIPv6アドレスを宛先として指定するものであれば(S151)、必要に応じて設定判断手段112を実行し(S152)、v6v4NAPT機能がONになっていれば(S152−Yes)、当該パケットのIPv6アドレスに該当するレコードが、v6v4組合テーブル25に存在するか否かを確認する組合レコード検索手段131を実行する。なお、v6v4組合テーブル25がMACアドレスを含むものである場合は、受け取ったパケットの送信元アドレスに対応するMACアドレスを有するレコードの中で、IPv6アドレスも一致するレコードを検索する。該当するレコードが存在しなければ、当該IPv6パケットは変換すべきIPv4アドレスがわからないため、そのままWAN18側に転送するパケット転送手段132が実行される(S155)。ただし、インターネット19へ到達可能なその他の手段が無い限りはこのIPv6パケットはインターネット19へ到達できないため、パケット転送手段132を実行する代わりに、ここでパケットを破棄するパケット破棄手段(図示せず)を実行してもよい。他の手段を利用可能な場合には、適当な設定を行い、IPv6パケットのインターネット19への転送を実施してもよい。   The flow at this time will be described with reference to FIG. If the packet received from the LAN side by the relay device 11 designates the IPv6 address of the Internet 19 as the destination (S151), the setting determination means 112 is executed as necessary (S152), and the v6v4NAPT function is turned on. If so (S152-Yes), the combination record search means 131 for confirming whether or not the record corresponding to the IPv6 address of the packet exists in the v6v4 combination table 25 is executed. When the v6v4 combination table 25 includes a MAC address, a record having a matching IPv6 address is searched for among records having a MAC address corresponding to the transmission source address of the received packet. If there is no corresponding record, since the IPv6 packet does not know the IPv4 address to be converted, the packet transfer means 132 that transfers the packet directly to the WAN 18 side is executed (S155). However, as long as there is no other means that can reach the Internet 19, this IPv6 packet cannot reach the Internet 19, and instead of executing the packet transfer means 132, a packet discard means (not shown) for discarding the packet here. May be executed. When other means can be used, an appropriate setting may be performed to transfer the IPv6 packet to the Internet 19.

なお、S155でのWAN18側への送信にあたって、v6v4NAPT変換を行った場合には、ルータ機能21の通常のルータとしてのNAPT変換を行う必要はない。   When v6v4 NAPT conversion is performed for transmission to the WAN 18 side in S155, it is not necessary to perform NAPT conversion as a normal router of the router function 21.

一方、当該IPv6アドレスに対応するレコードがv6v4組合テーブル25に存在すれば(S153−Yes)、このIPv6パケットに対してIPv4へのv6v4NAPT変換を行う拡張NAPT手段133を実行する(S154)。このv6v4NAPT変換及びその返答に対する逆変換であるv4v6NAPT変換にあたっては、変換の対応表であるv6v4NAPTテーブル26への登録と読み込みを行って適切に処理する。このv6v4NAPTテーブル26の例を図6に示す。「srcV6」は元のIPv6パケットの送信元である端末12のIPv6アドレス、「srcPort」は元のIPv6パケットの送信元ポートである。「destV6」は元のIPv6パケットの送信先IPv6アドレスであり、これが先のDNSレスポンスで取得したアドレスである。「destPort」は元のIPv6パケットの送信先ポートであり、HTTPであれば基本的に80番が用いられることが多い。「transV4」は、中継装置11自身のWAN18側のIPv4アドレスであり、図6のケースでは一種類である。ただし、契約によっては一の中継装置11のWAN18側に複数のIPv4アドレスが付与される場合があり、その場合にはどのアドレスが用いるレコードであるかをこの項目によって識別する。「transPort」はNAPT変換後のIPv4パケットにおける送信元ポート番号であり、srcPortそのままでもよいし、他の端末12との重複を避けるために必要に応じて任意に変更してもよい。なお、NAPT変換として、送信元アドレスは当然に中継装置11のWAN18側のIPアドレスとなる。タイマは、応答パケットが返ってこなかった際に、レコードを破棄するための時間であり、1秒ごとにデクリメントする。あるいはタイムアウトの時刻を登録し、時刻が到来したらレコードを破棄するようにしてもよい。   On the other hand, if the record corresponding to the IPv6 address exists in the v6v4 combination table 25 (S153-Yes), the extended NAPT means 133 that performs v6v4 NAPT conversion to IPv4 on the IPv6 packet is executed (S154). In this v6v4NAPT conversion and v4v6NAPT conversion which is an inverse conversion to the response, registration and reading in the v6v4NAPT table 26 which is a conversion correspondence table are performed appropriately. An example of this v6v4NAPT table 26 is shown in FIG. “SrcV6” is the IPv6 address of the terminal 12 that is the source of the original IPv6 packet, and “srcPort” is the source port of the original IPv6 packet. “DestV6” is the destination IPv6 address of the original IPv6 packet, and this is the address acquired by the previous DNS response. “DestPort” is the transmission destination port of the original IPv6 packet, and in the case of HTTP, number 80 is often used. “TransV4” is the IPv4 address on the WAN 18 side of the relay apparatus 11 itself, and is one type in the case of FIG. However, depending on the contract, a plurality of IPv4 addresses may be assigned to the WAN 18 side of one relay apparatus 11, and in this case, which address is a record used is identified by this item. “TransPort” is the transmission source port number in the IPv4 packet after the NAPT conversion, and may be srcPort as it is, or may be arbitrarily changed as necessary in order to avoid duplication with other terminals 12. As a NAPT conversion, the transmission source address is naturally the IP address on the WAN 18 side of the relay device 11. The timer is a time for discarding a record when a response packet is not returned, and decrements every second. Alternatively, a time-out time may be registered, and the record may be discarded when the time comes.

上記のv6v4機能管理部22が拡張NAPT手段133によりレコードをv6v4NAPTテーブル26に登録しながらIPv6アドレスを用いたパケットからIPv4アドレスを用いたパケットへのv6v4NAPT変換を行った後、ルータ機能21はそのIPv4パケットをWAN18側のwebサーバ14へ送信するパケット送出手段103を実行する。   After the v6v4 function management unit 22 performs the v6v4 NAPT conversion from the packet using the IPv6 address to the packet using the IPv4 address while registering the record in the v6v4NAPT table 26 by the extended NAPT unit 133, the router function 21 receives the IPv4 The packet sending means 103 for sending the packet to the web server 14 on the WAN 18 side is executed.

これに対するレスポンス受信時の処理を、図5(b)を用いて説明する。上記のwebサーバ14から、当該パケットによるレスポンスであるIPv4パケットがWAN18側のインターフェースへ返ってきたら(S161)、必要に応じてv6v4機能管理部は設定判断手段112を実行する(S162)。v6v4NAPT機能がONであれば(S162−Yes)、v6v4NAPTテーブル26からパケットに該当するレコードを検索するNAPTレコード検索手段134を実行する(S163)。当該パケットの送信元IPv4アドレス及び送信先ポート番号が、「transV4」及び「transPort」に対応するレコードがあるかを検索する。無ければ(S163−No)、当該IPv4パケットは、中継装置11でv6v4NAPT変換されていないパケットへのレスポンスであると判断されるため、必要に応じてv4v6NAPT変換ではなく通常のルータ機能21としてのNAPT逆変換を行って、元のパケットの送信元である端末12宛に転送する(S165)。   Processing for receiving a response to this will be described with reference to FIG. When an IPv4 packet, which is a response of the packet, is returned from the web server 14 to the interface on the WAN 18 side (S161), the v6v4 function management unit executes the setting determination unit 112 as necessary (S162). If the v6v4NAPT function is ON (S162-Yes), the NAPT record search means 134 for searching the record corresponding to the packet from the v6v4NAPT table 26 is executed (S163). It is searched whether there is a record corresponding to “transV4” and “transPort” for the source IPv4 address and destination port number of the packet. If there is not (S163-No), the IPv4 packet is determined to be a response to the packet that has not been v6v4NAPT converted by the relay apparatus 11, so that the NAPT as a normal router function 21 instead of v4v6NAPT conversion is necessary. Inverse conversion is performed, and the packet is transferred to the terminal 12 that is the source of the original packet (S165).

一方、対応するレコードがあれば(S163−Yes)、当該レコードに従って、IPv4パケットをIPv6パケットに逆変換するv4v6NAPT変換を行う拡張逆NAPT手段135を実行する。すなわち、送信先IPv6アドレスを該当レコードのsrcV6のアドレスに、送信先ポートをsrcPortのポート番号に変更したIPv6パケットとする。その上で、ルータ機能21は、逆変換後のIPv6パケットを送信先アドレスである端末12へ送出するパケット返送手段104を実行する(S165)。   On the other hand, if there is a corresponding record (S163-Yes), the extended inverse NAPT means 135 that performs v4v6 NAPT conversion for inversely converting an IPv4 packet into an IPv6 packet is executed according to the record. That is, it is assumed that the IPv6 packet is obtained by changing the destination IPv6 address to the address of srcV6 of the corresponding record and the destination port to the port number of srcPort. Then, the router function 21 executes the packet return means 104 that sends the reversely converted IPv6 packet to the terminal 12 that is the destination address (S165).

以上の流れを、アドレス番号とテーブルのレコードの変遷を含む実施例により具体的に説明する。図7に通信シーケンス図を、図8(a)〜(d)にv6v4組合テーブル25及びv6v4NAPTテーブル26の状態変化図を示す。中継装置11は、WAN18側にIPv4アドレスとして「200.200.200.200」を、IPv6アドレスとして「200::200」を、MACアドレスとして「MAC-H」を有する。また、LAN17側にIPv4アドレスとして「10.10.10.200」を、IPv6アドレスとして「10::200」を有する。端末12aは、LAN17内におけるアドレスとして10.10.10.10(IPv4)と、10::10(IPv6)を有する。また、MACアドレスは「MAC-T」とする。DNSサーバ13のIPv4アドレスは「100.100.100.100」、IPv6アドレスは「100::100」であり、ドメイン名「x.com」であるwebサーバ14aのIPv4アドレスは「1.1.1.1」、IPv6アドレスは「1::1」とする。   The above flow will be specifically described with reference to an embodiment including transition of address numbers and table records. FIG. 7 shows a communication sequence diagram, and FIGS. 8A to 8D show state change diagrams of the v6v4 combination table 25 and the v6v4NAPT table 26. The relay apparatus 11 has “200.200.200.200” as the IPv4 address, “200 :: 200” as the IPv6 address, and “MAC-H” as the MAC address on the WAN 18 side. Further, the LAN 17 side has “10.10.10.200” as the IPv4 address and “10 :: 200” as the IPv6 address. The terminal 12 a has 10.10.10.10 (IPv4) and 10 :: 10 (IPv6) as addresses in the LAN 17. The MAC address is “MAC-T”. The IPv4 address of the DNS server 13 is “100.100.100.100”, the IPv6 address is “100 :: 100”, the IPv4 address of the web server 14a having the domain name “x.com” is “1.1.1.1”, and the IPv6 address is “1 :: 1”.

初期設定として、中継装置はv6v4NAPT機能をONにする機能稼働手段114が実行される(S201)。この時点におけるv6v4組合テーブル25及びv6v4NAPTテーブル26は図8(a)のような空の初期値である。   As an initial setting, the function activation unit 114 for turning on the v6v4 NAPT function is executed in the relay device (S201). The v6v4 combination table 25 and the v6v4NAPT table 26 at this time are empty initial values as shown in FIG.

その上で、端末12aが「x.com」へのアクセスを試みる(S202)。x.comの名前の解決をIPv4,IPv6の両方について求めるDNSクエリーを、ゲートウェイである中継装置11へ向けて送信する(S203)。これを受信した中継装置11は、拡張DNSプロキシ23により組合テーブル登録手段122が実行されて、v6v4組合テーブル25にこのDNSクエリーの情報が図8(b)のように書き込まれる(S204)。この時点ではMACアドレスとドメイン名のみであり、IPv6アドレス及びIPv4アドレスは解決されていないので空欄である。中継装置11のルータ機能21はこのDNSクエリーをDNSサーバ13へ転送するクエリー転送手段101を実行する(S205)。   Then, the terminal 12a attempts to access “x.com” (S202). A DNS query for resolving the name of x.com for both IPv4 and IPv6 is transmitted to the relay apparatus 11 as a gateway (S203). In the relay apparatus 11 that has received this, the combination table registration means 122 is executed by the extended DNS proxy 23, and the information of this DNS query is written in the v6v4 combination table 25 as shown in FIG. 8B (S204). At this time, only the MAC address and the domain name are present, and the IPv6 address and the IPv4 address are not resolved, and are blank. The router function 21 of the relay apparatus 11 executes the query transfer means 101 that transfers this DNS query to the DNS server 13 (S205).

DNSサーバ13はx.comの名前を解決するIPv4アドレス及びIPv6アドレスの両方を含むDNSレスポンスを中継装置11に返送する(S206)。これを受け取った中継装置11の拡張DNSプロキシ23は組合テーブル追記手段125を実行して、IPv4アドレス及びIPv6アドレスを、対応するレコードに追記する(S207)。この時点でのテーブルの状況を図8(c)に示す。その上で、中継装置11はDNSレスポンスを端末12aに返送するレスポンス転送手段102を実行する(S208)。   The DNS server 13 returns a DNS response including both the IPv4 address and the IPv6 address that resolve the name of x.com to the relay apparatus 11 (S206). Receiving this, the extended DNS proxy 23 of the relay device 11 executes the combination table appending means 125 to append the IPv4 address and the IPv6 address to the corresponding record (S207). The status of the table at this point is shown in FIG. Then, the relay device 11 executes response transfer means 102 that returns a DNS response to the terminal 12a (S208).

これにより、名前の解決がされた端末12aは、優先設定となっているIPv6アドレスを用いて、x.comのIPv6アドレス宛にHTTPリクエストを送信する(S211)。これを受信した中継装置11のv6v4機能管理部22は組合レコード検索手段131を実行し、該当するIPv6アドレス宛で送信元MACアドレスが一致するレコードが存在するので、拡張NAPT手段133を実行して、v6v4NAPTテーブル26に対応関係を新たなレコードとして登録しつつ、パケットをIPv4に書き換える(S212)。この状態でのテーブルの状況を図8(d)に示す。v6v4NAPTテーブル26に対応するレコードが追加されている。   As a result, the terminal 12a whose name has been resolved transmits an HTTP request addressed to the IPv6 address of x.com using the IPv6 address that has been set in priority (S211). Upon receiving this, the v6v4 function management unit 22 of the relay apparatus 11 executes the combination record search unit 131, and since there is a record with the same source MAC address addressed to the corresponding IPv6 address, the extended NAPT unit 133 is executed. The packet is rewritten to IPv4 while registering the correspondence as a new record in the v6v4 NAPT table 26 (S212). The status of the table in this state is shown in FIG. A record corresponding to the v6v4NAPT table 26 is added.

その上で、IPv4に書き換えられたパケットをwebサーバ14aに送信するパケット転送手段132が実行される(S213)。これに対する応答がwebサーバ14aから返ってくると(S214)、中継装置11のv6v4機能管理部22はNAPTレコード検索手段134を実行して、当該パケットに該当するレコードを検索する。このとき、v6v4NAPTテーブル26だけでなく、v6v4組合テーブル25も合わせて検索することで、送信元であるwebサーバ14aに該当するレコードを検索する。該当するレコードがあれば、これに従って、中継装置11宛のIPv4パケットを、端末12a宛のIPv6パケットに逆変換する拡張逆NAPT手段135を実行する(S215)。その上で、逆変換後のパケットが端末12aに返送される(S216)。   Then, the packet transfer means 132 for transmitting the packet rewritten to IPv4 to the web server 14a is executed (S213). When a response to this is returned from the web server 14a (S214), the v6v4 function management unit 22 of the relay apparatus 11 executes the NAPT record search unit 134 to search for a record corresponding to the packet. At this time, not only the v6v4NAPT table 26 but also the v6v4 combination table 25 is searched to search for a record corresponding to the web server 14a that is the transmission source. If there is a corresponding record, the extended reverse NAPT means 135 for reversely converting the IPv4 packet addressed to the relay apparatus 11 into the IPv6 packet addressed to the terminal 12a is executed according to this record (S215). Then, the inversely converted packet is returned to the terminal 12a (S216).

パケットの通過後、タイマーの満了を以て、これらのテーブルのレコードは削除される。   After the packet passes, the records in these tables are deleted when the timer expires.

11 中継装置
12,12a,12b,12c 端末
13 DNSサーバ
14,14a,14b,14c webサーバ
15 RADIUSサーバ
17 LAN
18 WAN
19 インターネット
20 閉域網
21 ルータ機能
22 v6v4機能管理部
23 拡張DNSプロキシ
24 記憶部
25 v6v4組合テーブル
26 v6v4NAPTテーブル
101 クエリー転送手段
102 レスポンス転送手段
103 パケット送出手段
104 パケット返送手段
110 実行是非登録手段
111 直接接続判断手段
112 設定判断手段
113 機能停止手段
114 機能稼働手段
121 設定判断手段
122 組合テーブル登録手段
123 レスポンス解析手段
124 組合テーブル削除手段
125 組合テーブル追記手段
131 組合レコード検索手段
132 パケット転送手段
133 拡張NAPT手段
134 NAPTレコード検索手段
135 拡張逆NAPT手段
11 Relay device 12, 12a, 12b, 12c Terminal 13 DNS server 14, 14a, 14b, 14c web server 15 RADIUS server 17 LAN
18 WAN
19 Internet 20 Closed network 21 Router function 22 v6v4 function management unit 23 Extended DNS proxy 24 Storage unit 25 v6v4 combination table 26 v6v4NAPT table 101 Query transfer unit 102 Response transfer unit 103 Packet transmission unit 104 Packet return unit 110 Execution right registration unit 111 Direct Connection determination means 112 Setting determination means 113 Function stop means 114 Function operation means 121 Setting determination means 122 Association table registration means 123 Response analysis means 124 Association table deletion means 125 Association table appending means 131 Association record search means 132 Packet transfer means 133 Extended NAPT Means 134 NAPT record retrieval means 135 Extended inverse NAPT means

Claims (4)

自身のIPv6パケットのプレフィックスにより当該パケットの送信元装置がIPv6によるインターネットへの直接アクセスが可能か否かを判別し、
直接アクセスができない上記送信元装置からのDNSクエリーをDNSサーバへ転送したDNSレスポンスとしてIPv4アドレス及びIPv6アドレスの両方が存在した場合に、v6v4組合テーブルに当該DNSクエリーに対応するIPv4アドレス及びIPv6アドレスを登録し、
LAN側の端末からの上記DNSクエリーに対応するサーバへのIPv6アクセスを、上記v6v4組合テーブルの記録に従ってv6v4NAPT変換を行って中継する中継装置。
It is determined whether or not the source device of the packet can directly access the Internet by IPv6 based on the prefix of its own IPv6 packet,
When both the IPv4 address and the IPv6 address exist as a DNS response in which a DNS query from the above-mentioned source device that cannot be directly accessed is transferred to the DNS server, the IPv4 address and the IPv6 address corresponding to the DNS query are registered in the v6v4 combination table. And
A relay device that relays IPv6 access from a terminal on the LAN side to a server corresponding to the DNS query by performing v6v4 NAPT conversion according to the record of the v6v4 combination table.
DNSクエリーで指定されたドメイン名とそれに対応するIPv4アドレス及びIPv6アドレスとを記録するv6v4組合テーブルと、
LAN側からWAN側へアクセスする際のv6v4NAPT変換のためのアドレス及びポート番号を記録するv6v4NAPTテーブルと、
v6v4NAPT変換の判断と実行を行うv6v4機能管理部と、
DNSプロキシとしてDNSクエリー及びDNSレスポンスを中継する際に上記v6v4組合テーブルへの登録を行う拡張DNSプロキシと、
を有し、
上記拡張DNSプロキシは、
LAN側から受信したDNSクエリーが指定するドメインを上記v6v4組合テーブルに登録する組合テーブル登録手段と、
当該DNSクエリーに対するDNSレスポンスにIPv4及びIPv6の両方が存在する場合に、上記v6v4組合テーブル中の当該DNSクエリーのドメインについてのレコードに、当該DNSレスポンスのIPv4アドレス及びIPv6アドレスとの組合せを登録する組合テーブル追記手段と、
を有し、
上記v6v4機能管理部は、
中継装置自身に割り当てられたIPv6アドレスのプレフィックスにより上記中継装置自身がIPv6によるインターネットへの直接アクセスが可能か否かを判別し、不可能であればLAN側の端末からのIPv6アクセスについてv6v4NAPT変換を有効にするよう設定変更する直接接続判断手段と、
IPv6パケットをLAN側から受信した際に、当該IPv6パケットの送信元MACアドレスと送信先IPv6アドレスとの組合せが、上記v6v4組合テーブルに登録されていれば、上記v6v4NAPTテーブルにレコードを登録しつつv6v4NAPT変換を行い対応するWAN側のIPv4アドレス宛にパケットを転送可能にする拡張NAPT手段と、
IPv4パケットをWAN側から受信した際に、当該IPv4パケットのアドレス及びポート番号が上記v6v4NAPTテーブルに登録されていれば、上記v6v4NAPTテーブルを用いてv6v4NAPT変換の逆変換であるv4v6NAPT変換を行って、対応するLAN側のIPv6アドレスの端末宛にパケットを転送可能にする拡張逆NAPT手段と
を有する、中継装置。
A v6v4 combination table that records the domain name specified in the DNS query and the corresponding IPv4 address and IPv6 address;
A v6v4NAPT table for recording addresses and port numbers for v6v4NAPT conversion when accessing from the LAN side to the WAN side;
a v6v4 function management unit for determining and executing v6v4 NAPT conversion;
An extended DNS proxy that performs registration in the v6v4 combination table when relaying a DNS query and DNS response as a DNS proxy;
Have
The extended DNS proxy is
A combination table registration means for registering the domain specified by the DNS query received from the LAN side in the v6v4 combination table;
A combination that registers a combination of the IPv4 address and the IPv6 address of the DNS response in the record for the domain of the DNS query in the v6v4 combination table when both DNS4 and IPv6 exist in the DNS response to the DNS query. Table appending means,
Have
The v6v4 function management unit
Based on the IPv6 address prefix assigned to the relay device itself, it is determined whether or not the relay device itself can directly access the Internet by IPv6. If not, v6v4NAPT conversion is valid for IPv6 access from a terminal on the LAN side. Direct connection judgment means for changing the setting to
When the IPv6 packet is received from the LAN side, if the combination of the source MAC address and the destination IPv6 address of the IPv6 packet is registered in the v6v4 combination table, the record is registered in the v6v4NAPT table and the v6v4NAPT is registered. An extended NAPT means for performing the conversion and forwarding the packet to the corresponding IPv4 address on the WAN side;
When an IPv4 packet is received from the WAN side, if the address and port number of the IPv4 packet are registered in the v6v4NAPT table, the v6v4NAPT table is used to perform v4v6NAPT conversion, which is the reverse conversion of v6v4NAPT conversion. And an extended inverse NAPT means for enabling transfer of a packet to a terminal having an IPv6 address on the LAN side.
上記v6v4機能管理部は、
上記端末からの設定によりv6v4NAPT変換を行うか否かの設定を変更可能な実行是非登録手段を有し、
上記拡張DNSプロキシ及び上記v6v4機能管理部は、上記実行是非登録手段による設定に従って、機能の実行を行うか否かの判断を行う、
請求項2に記載の中継装置。
The v6v4 function management unit
There is an execution right registration means that can change the setting of whether to perform v6v4 NAPT conversion by the setting from the terminal,
The extended DNS proxy and the v6v4 function management unit determine whether to execute the function according to the setting by the execution right registration unit.
The relay device according to claim 2.
LAN側とWAN側にインターフェースを有する中継装置に、
DNSクエリーで指定されたドメイン名とそれに対応するIPv4アドレス及びIPv6アドレスとを記録するv6v4組合テーブルと、
LAN側からWAN側へアクセスする際のv6v4NAPT変換のためのアドレス及びポート番号を記録するv6v4NAPTテーブルと、
v6v4NAPT変換の判断と実行を行うv6v4機能管理部と、
DNSプロキシとしてDNSクエリー及びDNSレスポンスを中継する際に上記v6v4組合テーブルへの登録を行う拡張DNSプロキシと、
を設け、
上記拡張DNSプロキシは、
LAN側から受信したDNSクエリーが指定するドメインを上記v6v4組合テーブルに登録する組合テーブル登録手段と、
当該DNSクエリーに対するDNSレスポンスにIPv4及びIPv6の両方が存在する場合に、上記v6v4組合テーブル中の当該DNSクエリーのドメインについてのレコードに、当該DNSレスポンスのIPv4アドレス及びIPv6アドレスとの組合せを登録する組合テーブル追記手段と、
を有し、
上記v6v4機能管理部は、
中継装置自身に割り当てられたIPv6アドレスのプレフィックスにより上記中継装置自身がIPv6によるインターネットへの直接アクセスが可能か否かを判別し、不可能であればLAN側の端末からのIPv6アクセスについてv6v4NAPT変換を有効にするよう設定変更する直接接続判断手段と、
IPv6パケットをLAN側から受信した際に、当該IPv6パケットの送信元MACアドレスと送信先IPv6アドレスとの組合せが、上記v6v4組合テーブルに登録されていれば、上記v6v4NAPTテーブルにレコードを登録しつつv6v4NAPT変換を行い対応するWAN側のIPv4アドレス宛にパケットを転送可能にする拡張NAPT手段と、
IPv4パケットをWAN側から受信した際に、当該IPv4パケットのアドレス及びポート番号が上記v6v4NAPTテーブルに登録されていれば、上記v6v4NAPTテーブルを用いてv6v4NAPT変換の逆変換であるv4v6NAPT変換を行って、対応するLAN側のIPv6アドレスの端末宛にパケットを転送可能にする拡張逆NAPT手段と
を有する中継装置として動作させるためのプログラム。
For relay devices that have interfaces on the LAN side and WAN side,
A v6v4 combination table that records the domain name specified in the DNS query and the corresponding IPv4 address and IPv6 address;
A v6v4NAPT table for recording addresses and port numbers for v6v4NAPT conversion when accessing from the LAN side to the WAN side;
a v6v4 function management unit for determining and executing v6v4 NAPT conversion;
An extended DNS proxy that performs registration in the v6v4 combination table when relaying a DNS query and DNS response as a DNS proxy;
Provided,
The extended DNS proxy is
A combination table registration means for registering the domain specified by the DNS query received from the LAN side in the v6v4 combination table;
A combination that registers a combination of the IPv4 address and the IPv6 address of the DNS response in the record for the domain of the DNS query in the v6v4 combination table when both DNS4 and IPv6 exist in the DNS response to the DNS query. Table appending means,
Have
The v6v4 function management unit
Based on the IPv6 address prefix assigned to the relay device itself, it is determined whether or not the relay device itself can directly access the Internet by IPv6. If not, v6v4NAPT conversion is valid for IPv6 access from a terminal on the LAN side. Direct connection judgment means for changing the setting to
When the IPv6 packet is received from the LAN side, if the combination of the source MAC address and the destination IPv6 address of the IPv6 packet is registered in the v6v4 combination table, the record is registered in the v6v4NAPT table and the v6v4NAPT is registered. An extended NAPT means for performing the conversion and forwarding the packet to the corresponding IPv4 address on the WAN side;
When an IPv4 packet is received from the WAN side, if the address and port number of the IPv4 packet are registered in the v6v4NAPT table, the v6v4NAPT table is used to perform v4v6NAPT conversion, which is reverse conversion of v6v4NAPT conversion. For operating as a relay device having extended inverse NAPT means for enabling transfer of packets to a terminal having an IPv6 address on the LAN side.
JP2014099696A 2014-05-13 2014-05-13 Relay device and program Active JP5889955B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014099696A JP5889955B2 (en) 2014-05-13 2014-05-13 Relay device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014099696A JP5889955B2 (en) 2014-05-13 2014-05-13 Relay device and program

Publications (2)

Publication Number Publication Date
JP2015216593A true JP2015216593A (en) 2015-12-03
JP5889955B2 JP5889955B2 (en) 2016-03-22

Family

ID=54753080

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014099696A Active JP5889955B2 (en) 2014-05-13 2014-05-13 Relay device and program

Country Status (1)

Country Link
JP (1) JP5889955B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017147492A (en) * 2016-02-15 2017-08-24 日本電信電話株式会社 Network connection system and network connection method
JP2022551147A (en) * 2019-10-25 2022-12-07 新華三信息安全技術有限公司 Message transfer and domain name address query

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2012053163A1 (en) * 2010-10-18 2014-02-24 日本電気株式会社 Name database server, name resolution system, entry search method, and entry search program
JPWO2013035311A1 (en) * 2011-09-06 2015-03-23 日本電気株式会社 Agent device and communication relay method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2012053163A1 (en) * 2010-10-18 2014-02-24 日本電気株式会社 Name database server, name resolution system, entry search method, and entry search program
JPWO2013035311A1 (en) * 2011-09-06 2015-03-23 日本電気株式会社 Agent device and communication relay method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017147492A (en) * 2016-02-15 2017-08-24 日本電信電話株式会社 Network connection system and network connection method
JP2022551147A (en) * 2019-10-25 2022-12-07 新華三信息安全技術有限公司 Message transfer and domain name address query
JP7478820B2 (en) 2019-10-25 2024-05-07 新華三信息安全技術有限公司 Message forwarding and domain name address queries

Also Published As

Publication number Publication date
JP5889955B2 (en) 2016-03-22

Similar Documents

Publication Publication Date Title
EP2556438B1 (en) Reverse dns lookup with modified reverse mappings
JP4234482B2 (en) Dynamic DNS registration method, domain name resolution method, proxy server, and address translation device
KR100791298B1 (en) Apparatus and method for controlling device of home network
EP3320668B1 (en) Discovery of resources in a local network
US20060153230A1 (en) IPv6 / IPv4 translator
US20160173326A1 (en) Network configuration using service identifier
WO2011157126A2 (en) Packet forwarding method and inter-network routing apparatus
KR100429902B1 (en) Apparatus and method for controlling devices in private network from public network
JP5889955B2 (en) Relay device and program
CN101651718A (en) Method and system for changing IP flow protocol stack
WO2014142278A1 (en) Control device, communication system, communication method, and program
JP2002141954A (en) Communication relay device, communication relay method, and program storage medium
EP3395049A1 (en) ROUTER AND METHOD FOR CONNECTING AN IPv4 NETWORK AND AN IPv6 NETWORK
JP2015220483A (en) Repeating device having dns-proxy function
US10404659B2 (en) Optimization of resource URLs in machine-to-machine networks
CN109151086B (en) Message forwarding method and network equipment
JP4352645B2 (en) Terminal device, relay device, communication method, and recording medium recording the communication program
JP5083983B2 (en) Server explicit selection type reverse proxy device, data relay method thereof, and program thereof
JP5987832B2 (en) Agent device and communication relay method
US11870751B2 (en) Smart service discovery to interconnect clusters having overlapping IP address space
US20150032906A1 (en) Apparatus and method for assigning ip address in communication system
JP2008206081A (en) Data relaying apparatus and data relaying method used for multi-homing communication system
JP5110538B2 (en) Network system, network device, network method and program
US20200186469A1 (en) Data packet routing method and data packet routing device
KR100980466B1 (en) Terminval management system and method thereof, terminal and recoding medium thereof

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151006

RD13 Notification of appointment of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7433

Effective date: 20151127

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151202

RD15 Notification of revocation of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7435

Effective date: 20151202

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20151127

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20151202

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160217

R150 Certificate of patent or registration of utility model

Ref document number: 5889955

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

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