JP2006287478A - Detecting method of address space collision, and detecting apparatus of address space collision - Google Patents

Detecting method of address space collision, and detecting apparatus of address space collision Download PDF

Info

Publication number
JP2006287478A
JP2006287478A JP2005103059A JP2005103059A JP2006287478A JP 2006287478 A JP2006287478 A JP 2006287478A JP 2005103059 A JP2005103059 A JP 2005103059A JP 2005103059 A JP2005103059 A JP 2005103059A JP 2006287478 A JP2006287478 A JP 2006287478A
Authority
JP
Japan
Prior art keywords
address
router
address space
packet
ttl
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2005103059A
Other languages
Japanese (ja)
Inventor
Takeshi Kokado
健 古門
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2005103059A priority Critical patent/JP2006287478A/en
Publication of JP2006287478A publication Critical patent/JP2006287478A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a detecting apparatus of address space collision which can detect a LAN-side address space collision of a network-like router in a network connected with one or more routers. <P>SOLUTION: A first communication terminal 10 transmits a packet for router discovery where TTL is varied toward a specific IP address on the Internet. The first communication terminal 10 receives IC MP TIME EXCEEDED MESSAGE transmitted by a router in a customer premise network 1 to the packet for router discovery, and detects the router in the customer premise network 1. The first communication terminal 10 transmits an address range estimation packet to an address space estimated as the address space of the detected router, and estimates the LAN-side address space of the detected router using its response. The first communication terminal 10 detects the address space collision in the customer premise network 1 using the estimated address space. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、アドレス空間衝突の検出方法及びアドレス空間衝突の検出装置に関し、より特定的には、ルータが接続されたプライベートネットワークにおける、アドレス空間衝突の検出方法及びアドレス空間衝突の検出装置に関する。   The present invention relates to an address space collision detection method and an address space collision detection apparatus, and more particularly to an address space collision detection method and an address space collision detection apparatus in a private network to which a router is connected.

企業や一般家庭においてプライベートネットワークを構築する場合、アドレス変換(NAT:Network Address Translation)機能を備えたルータ(以下、単にルータという)を用いてネットワークを構築することが多い。ルータのLAN側ネットワークは、通常、プライベートIPアドレス(以下、プライベートアドレスという)によって構築される。ルータのLAN側インターフェースに設定されるLAN側アドレス空間(ネットワークアドレス)は、ユーザが自由に設定することが可能である。   When a private network is constructed in a company or a general home, a network is often constructed using a router (hereinafter simply referred to as a router) having an address translation (NAT) function. The LAN side network of the router is usually constructed with a private IP address (hereinafter referred to as a private address). The LAN side address space (network address) set in the LAN side interface of the router can be freely set by the user.

中継装置(ルータ)のLAN側アドレス空間とは、中継装置のLAN側ネットワークに接続される通信機器が設定することができるIPアドレスの集合である。中継装置のLAN側アドレス空間を設定することにより、中継装置のLAN側インターフェースには、アドレスとして中継装置のLAN側アドレス空間の範囲内のアドレスと、LAN側アドレス空間に対応するネットマスクとが設定される。加えて、中継装置が通信端末に対するIPアドレス割り当て機能を持つ場合、中継装置のIPアドレス割り当て機能が通信機器に割り当てるIPアドレスとネットマスクとが、それぞれ、中継装置のLAN側アドレス空間内のIPアドレスと、LAN側アドレス空間に対応するネットマスクとになる。以下、ルータのアドレス空間という場合には、特に断りのない限り、ルータのLAN側アドレス空間を指すものとして説明を行う。   The LAN side address space of the relay device (router) is a set of IP addresses that can be set by a communication device connected to the LAN side network of the relay device. By setting the LAN side address space of the relay device, an address within the range of the LAN side address space of the relay device and a netmask corresponding to the LAN side address space are set as addresses in the LAN side interface of the relay device. Is done. In addition, when the relay device has an IP address assignment function for the communication terminal, an IP address and a netmask assigned to the communication device by the IP address assignment function of the relay device are respectively IP addresses in the LAN side address space of the relay device. And a netmask corresponding to the LAN side address space. Hereinafter, the router address space will be described as indicating the router's LAN address space unless otherwise specified.

複数のルータを用いてネットワークが構成された場合、各ルータのアドレス空間がユーザによってそれぞれ異なるように設定されていれば、ネットワークに問題は発生しない。しかし、各ルータのアドレス空間が重複している場合、ネットワークには、同一アドレスを持つ通信機器が存在することが可能になる。   When a network is configured using a plurality of routers, there is no problem in the network if the address space of each router is set to be different for each user. However, when the address space of each router overlaps, communication devices having the same address can exist in the network.

例えば、図42に示すネットワークの場合、ルータA92とルータC94とは、同一のアドレス空間(192.168.0.1〜192.168.0.254)を持つ。このため、ルータA92に接続された通信端末91とルータC94に接続された通信端末95とが同一のアドレスと持つことがあり得る。このようなネットワークでは、ネットワーク内の通信機器が互いに通信することが出来ないという問題が発生する。これは、以下の理由によって発生する。
(1)異なる通信機器に同一のアドレスが割り当てられると、アドレスで通信機器を一意に特定することができなくなる。
(2)送信先通信機器のアドレス空間が送信元通信機器のアドレス空間と同一である場合、送信元通信機器の通信処理モジュールは、送信先通信機器が同一ルータに接続されているものとして処理を行う。結果として、送信元通信機器が接続しているルータのLAN側ネットワークでアドレス解決を実行しようとするため、ルータは、誤った通信端末にパケットを送信するか、アドレス解決に失敗し、通信失敗と判断する。
For example, in the case of the network shown in FIG. 42, the router A 92 and the router C 94 have the same address space (192.168.0.1 to 192.168.0.254). For this reason, the communication terminal 91 connected to the router A92 and the communication terminal 95 connected to the router C94 may have the same address. In such a network, there arises a problem that communication devices in the network cannot communicate with each other. This occurs for the following reasons.
(1) If the same address is assigned to different communication devices, the communication device cannot be uniquely specified by the address.
(2) When the address space of the transmission destination communication device is the same as the address space of the transmission source communication device, the communication processing module of the transmission source communication device performs processing assuming that the transmission destination communication device is connected to the same router. Do. As a result, in order to perform address resolution in the LAN side network of the router to which the transmission source communication device is connected, the router transmits a packet to the wrong communication terminal or fails in address resolution, and communication failure occurs. to decide.

このように、各ルータのアドレス空間が重複している状態を、アドレス空間が衝突しているという。このように、各ルータのアドレス空間が衝突した場合、どちらかのルータのアドレス空間を適切に変更する必要がある。また、ルータのLAN側ネットワークに接続する通信機器の設定を変更する必要がある。このため、各ルータのアドレス空間が衝突した場合、ユーザが行う作業は非常に複雑なものとなる。   In this way, a state in which the address space of each router overlaps is called an address space collision. Thus, when the address space of each router collides, it is necessary to change the address space of either router appropriately. Further, it is necessary to change the setting of the communication device connected to the LAN side network of the router. For this reason, when the address space of each router collides, the operation | work which a user performs becomes very complicated.

また、近年、無線ルータの急速な普及に伴い、一般家庭において従来から使用されている宅内ネットワークに、新たに無線ルータを接続した宅内ネットワークが構成される場合がある。すなわち、一般家庭においても、NAT機能を備えた複数のルータを接続した宅内ネットワークが構築される例が多く見られるようになってきている。しかし、宅内ネットワークには、ネットワーク技術に詳しい管理者を期待することはできない。このため、宅内ネットワークにおいてアドレス空間の衝突が発生した場合、宅内ネットワークの利用者は、アドレス空間の衝突に気がつかない、または、アドレス空間の衝突に気づいても修正できないという問題が発生する。   In recent years, with the rapid spread of wireless routers, a home network in which a wireless router is newly connected to a home network conventionally used in ordinary homes may be configured. That is, even in ordinary homes, there are many cases where a home network in which a plurality of routers having a NAT function are connected is constructed. However, it is not possible to expect an administrator who is familiar with network technology in the home network. For this reason, when an address space collision occurs in the home network, there arises a problem that the user of the home network does not notice the address space collision or cannot correct it even if the address space collision is noticed.

さらに、ISP(Internet Service Provider)が、常時接続によるリスクの回避や、使用可能なグローバルIPアドレス(以下、グローバルアドレスという)の枯渇によって、プライベートアドレスを使用する場合がある。この場合、企業内ネットワークや宅内ネットワークと、ISPとを接続した場合、アドレス空間の衝突が発生する可能性がある。すなわち、この場合には、1台のルータだけで構成されたプライベートネットワークにおいてもアドレス空間の衝突が発生する場合がある。   Furthermore, ISPs (Internet Service Providers) sometimes use private addresses due to avoidance of risks due to constant connection and exhaustion of available global IP addresses (hereinafter referred to as global addresses). In this case, when an in-company network or a home network is connected to an ISP, there is a possibility that an address space collision will occur. In other words, in this case, address space collisions may occur even in a private network composed of only one router.

このようなアドレス空間の衝突を解決する方法として、特許文献1に示す方法が知られている。図43は、特許文献1が示すアドレス空間の衝突検出方法を示す図である。図43において、ネットワークA97とネットワークB98とは、ゲートウェイ96を介して接続されている。ゲートウェイ96は、インターフェースA961とインターフェースB962とを備えている。インターフェースA961は、ネットワークA97に接続するためのインターフェースであり、ネットワークA97のプライベートアドレスが設定される。インターフェースB962は、ネットワークB98に接続するためのインターフェースであり、ネットワークB98のプライベートアドレスが設定される。ゲートウェイ96は、インターフェースA961のプライベートアドレスと、インターフェースB962のプライベートアドレスとを比較して、アドレス衝突が発生しているかどうかを判定する。
特開2003−78541号公報 「ユーピーエヌピー デザイン バイ イグザンプル(UPnP Design by Example)」、マイケル ジェロニモ(Michael Jeronimo)、ジャック ウィースト(Jack Weast)著、インテル プレス(Intel Press)刊、2003年4月 ユーピーエヌピー フォーラム(UPnP(TM) Forum),“インターネットゲートウェイデバイス:1 デバイス テンプレート バージョン1.01(InternetGatewayDevice:1 Device Template Version 1.01)”、[online]、2001年11月12日、インターネット<URL:http://www.upnp.org/standardizeddcps/documents/UPnP_IGD_1.0.zip> ユーピーエヌピー フォーラム(UPnP(TM) Forum),“ワンアイピーコネクション:1 サービス テンプレート バージョン1.01(WANIPConnection:1 Service Template Version 1.01)”、[online]、2001年11月12日、インターネット<URL:http://www.upnp.org/standardizeddcps/documents/UPnP_IGD_1.0.zip>
As a method for solving such address space collision, a method disclosed in Patent Document 1 is known. FIG. 43 is a diagram illustrating the address space collision detection method disclosed in Patent Document 1. In FIG. In FIG. 43, a network A 97 and a network B 98 are connected via a gateway 96. The gateway 96 includes an interface A 961 and an interface B 962. The interface A961 is an interface for connecting to the network A97, and a private address of the network A97 is set. The interface B962 is an interface for connecting to the network B98, and a private address of the network B98 is set. The gateway 96 compares the private address of the interface A 961 with the private address of the interface B 962, and determines whether an address collision has occurred.
JP 2003-78541 A "UPnP Design by Example", Michael Jeronimo, by Jack West, published by Intel Press, April 2003 UPNP Forum (UPnP (TM) Forum), "Internet Gateway Device: 1 Device Template Version 1.01 (Internet Gateway Device: 1 Device Template Version 1.01)", [online], November 12, 2001, Internet <URL : Http: // www. upnp. org / standardizeddcps / documents / UPnP_IGD_1.0. zip> UPNP Forum (UPnP (TM) Forum), "One IP Connection: 1 Service Template Version 1.01 (WANIP Connection: 1 Service Template Version 1.01)", [online], November 12, 2001, Internet <URL : Http: // www. upnp. org / standardizeddcps / documents / UPnP_IGD_1.0. zip>

しかし、特許文献1が示すアドレス空間の衝突検出方法は、ルータ自身のWAN側のネットワーク情報とLAN側のネットワーク情報とを比較して、アドレス空間衝突を検出する。このため、ルータが特許文献1の方法に対応していないネットワークにおいては、アドレス空間の衝突を検出することができないという課題がある。この課題は、前述のように、1台のルータだけで構成されたプライベートネットワークでも発生する。   However, the address space collision detection method disclosed in Patent Document 1 detects the address space collision by comparing the network information on the WAN side of the router itself and the network information on the LAN side. For this reason, in a network in which the router does not support the method of Patent Document 1, there is a problem that address space collision cannot be detected. This problem also occurs in a private network composed of only one router as described above.

また、ルータが特許文献1に示す方法に対応している場合でも、NAT機能を備えるルータが3段以上構成されたネットワークに対して適用した場合、特許文献1に示す方法では、アドレス空間の衝突が発生していても衝突を検出できないという問題が発生する。図42に示す例では、宅内ネットワークにおいて、ルータA92及びルータC94のそれぞれのアドレス空間が衝突している。しかし、特許文献1が示す方法を、図42に示す例に適用すると、アドレス空間の衝突はないと判断される。   In addition, even when the router is compatible with the method disclosed in Patent Document 1, when applied to a network in which a router having a NAT function is configured in three or more stages, the method disclosed in Patent Document 1 causes address space collision. Even if this occurs, there is a problem that a collision cannot be detected. In the example shown in FIG. 42, the address spaces of the router A 92 and the router C 94 collide with each other in the home network. However, when the method disclosed in Patent Document 1 is applied to the example shown in FIG. 42, it is determined that there is no address space collision.

また、特許文献1が示す方法は、ネットワーク間を接続する装置(例えば、ルータなど)に対してのみ適用可能である。このため、ネットワークに接続された各通信端末は、特許文献1に示す方法を用いて、ネットワークのアドレス空間衝突の検出及び修正を行うことができないという問題がある。   The method disclosed in Patent Document 1 can be applied only to a device (for example, a router) that connects networks. For this reason, there is a problem that each communication terminal connected to the network cannot detect and correct a network address space collision using the method disclosed in Patent Document 1.

本発明は、上記の問題を解決するためになされたものであり、1つ以上のルータが接続されたネットワークにおいて、アドレス空間衝突を検出して、ルータのアドレス空間を修正することが可能なアドレス空間衝突の検出装置及びアドレス空間衝突の検出方法を提供することを目的とする。   The present invention has been made to solve the above-described problem, and addresses that can correct an address space of a router by detecting an address space collision in a network to which one or more routers are connected. An object of the present invention is to provide a space collision detection apparatus and an address space collision detection method.

上記課題を解決するために、本発明は、以下のような特徴を有する。外部ネットワークに接続するローカルネットワークにおいて、当該ローカルネットワーク内の通信機器と当該外部ネットワークとの間に1つ以上の中継装置が直列に接続されており、当該1つ以上の中継装置が備える各LAN側インターフェースに設定されたLAN側アドレス空間の衝突を検出する、当該通信機器に組み込まれたアドレス空間衝突検出装置であって、1つ以上の中継装置とパケットの送受信を行うパケット送受信部と、1つ以上の中継装置を検出するための1つ以上のルータディスカバリ用パケットを作成し、パケット送受信部に当該ルータディスカバリ用パケットの送信を指示するルータディスカバリ用パケット作成部と、パケット送受信部がそれぞれのルータディスカバリ用パケットに対する応答を受信したことを確認して1つ以上の中継装置を検出し、当該応答を参照して1つ以上の中継装置のLAN側インターフェースのIPアドレスであるLAN側アドレスを取得する受信パケット解析部と、1つ以上の中継装置のアドレスを用いてLAN側アドレス空間を推定し、1つ以上の中継装置の相互間、及び1つ以上の中継装置と外部ネットワークとの相互間において、LAN側アドレス空間の衝突が発生しているか否かを判断するアドレス空間衝突検出部とを備える。   In order to solve the above problems, the present invention has the following features. In a local network connected to an external network, one or more relay devices are connected in series between a communication device in the local network and the external network, and each LAN side included in the one or more relay devices An address space collision detection device incorporated in the communication device for detecting a collision in a LAN side address space set for an interface, a packet transmission / reception unit for transmitting / receiving packets to / from one or more relay devices, and one A router discovery packet creation unit that creates one or more router discovery packets for detecting the above relay devices, and instructs the packet transmission / reception unit to transmit the router discovery packets; Confirm that the response to the discovery packet has been received A received packet analysis unit that detects one or more relay devices and obtains a LAN-side address that is an IP address of a LAN-side interface of the one or more relay devices by referring to the response, and one or more relay devices The LAN address space is estimated using the address of the LAN, and whether the LAN address space collision occurs between one or more relay devices and between one or more relay devices and an external network An address space collision detection unit for determining whether or not.

好ましくは、ルータディスカバリ用パケット作成部は、TTL(Time To Live)を変化させたTTLパケットを、ルータディスカバリ用パケットとして作成し、ルータディスカバリ用パケットに対する応答は、ICMP(Internet Control Message Protocol) TIME EXCEEDED MESSAGEであるとよい。   Preferably, the router discovery packet creation unit creates a TTL packet in which TTL (Time To Live) is changed as a router discovery packet, and a response to the router discovery packet is ICMP (Internet Control Message Protocol) TIME EXCEEDED. It is good that it is MESSAGE.

好ましくは、1つ以上の中継装置は、通信機器から外部ネットワークに向けて第1から第N(Nは1以上の自然数)の順に直列に接続されており、アドレス空間衝突検出装置は、既に検出された中継装置のWAN側インターフェースのIPアドレスであるWAN側アドレスを取得するWAN側アドレス取得部とをさらに備え、ルータディスカバリ用パケット作成部は、第1の中継装置のLAN側アドレスを取得し、第i(iは2〜Nの自然数)の中継装置を検出する場合、既に検出された第i−1の中継装置のWAN側アドレスを用いて第iの中継装置のLAN側アドレスを推定し、推定した1つ以上のLAN側アドレスを送信先とした第iの推定ルータパケットを、ルータディスカバリ用パケットとして作成するとよい。   Preferably, the one or more relay devices are connected in series from the communication device to the external network in the order of 1st to Nth (N is a natural number of 1 or more), and the address space collision detection device has already detected A WAN-side address acquisition unit that acquires a WAN-side address that is an IP address of the WAN-side interface of the relay device, and the router discovery packet creation unit acquires the LAN-side address of the first relay device, When detecting the i-th (i is a natural number of 2 to N) relay device, the LAN-side address of the i-th relay device is estimated using the WAN address of the already detected i-th relay device, The i-th estimated router packet that has one or more estimated LAN-side addresses as destinations may be created as a router discovery packet.

好ましくは、1つ以上の中継装置は、通信機器から外部ネットワークに向けて第1から第N(Nは1以上の自然数)の順に直列に接続されており、アドレス空間衝突検出装置は、既に検出された中継装置のWAN側インターフェースのIPアドレスであるWAN側アドレスを取得するWAN側アドレス取得部と、前記TTLパケットに対する応答のタイムアウトを検出するタイムアウト検出部とをさらに備え、WAN側アドレス取得部は、タイムアウト検出部がTTL=1に設定されたTTLパケットに対する応答のタイムアウトを検出した場合、ルータディスカバリ用パケット作成部が取得する第1の中継装置のLAN側アドレスに基づいて、第1の中継装置のWAN側アドレスを取得し、タイムアウト検出部がTTL=i(iは2〜Nの自然数)に設定されたTTLパケットに対する応答のタイムアウトを検出した場合、既に検出された第i−1の中継装置のWAN側アドレスを取得し、ルータディスカバリ用パケット作成部は、タイムアウト検出部がタイムアウトを検出した場合、TTLパケットの作成を中止し、第i−1の中継装置のWAN側アドレスを用いて第iの中継装置のLAN側アドレスを推定し、推定した1つ以上のLAN側アドレスを送信先とした第iの推定ルータパケットを、ルータディスカバリ用パケットとして作成するとよい。   Preferably, the one or more relay devices are connected in series from the communication device to the external network in the order of 1st to Nth (N is a natural number of 1 or more), and the address space collision detection device has already detected A WAN-side address acquisition unit that acquires a WAN-side address that is an IP address of the WAN-side interface of the relay device that has been added, and a timeout detection unit that detects a timeout of a response to the TTL packet, When the timeout detection unit detects a timeout of a response to the TTL packet set to TTL = 1, the first relay device based on the LAN address of the first relay device acquired by the router discovery packet creation unit WAN side address is acquired and the time-out detection unit is TTL = i (i is 2 to N). If the timeout of the response to the TTL packet set to (number) is detected, the WAN address of the already detected i-1th relay device is obtained, and the router discovery packet creation unit times out the timeout detection unit. Is detected, the generation of the TTL packet is stopped, the LAN address of the i-th relay device is estimated using the WAN address of the i-th relay device, and one or more estimated LAN-side addresses are obtained. The i-th estimated router packet as the transmission destination may be created as a router discovery packet.

好ましくは、1つ以上の中継装置は、通信機器から外部ネットワークに向けて第1から第N(Nは1以上の自然数)の順に直列に接続されており、アドレス空間衝突検出装置は、既に検出された中継装置のWAN側インターフェースのIPアドレスであるWAN側アドレスを取得するWAN側アドレス取得部と、既に検出された第i(iは1〜Nの自然数)の中継装置のWAN側アドレスが、既に検出された第j(jはi+1〜N−1の自然数)の中継装置のLAN側アドレス空間の範囲内であるか否かを判定するルータアドレス検証部とをさらに備え、ルータアドレス検証部は、第iの中継装置のWAN側アドレスが第jの中継装置のLAN側アドレス空間の範囲内でない場合、WAN側アドレス検出部及びルータディスカバリ用パケット作成部に、一致しない旨を通知し、WAN側アドレス取得部は、ルータアドレス検証部の通知に基づいて、第iの中継装置のWAN側アドレスを取得し、ルータディスカバリ用パケット作成部は、第1の中継装置のLAN側アドレスを取得し、ルータアドレス検証部からの通知に基づいて、第iの中継装置のWAN側アドレスを用いて第i+1の中継装置のLAN側アドレスを推定し、推定したLAN側アドレスを送信した第i+1の推定ルータパケットを、ルータディスカバリ用パケットとして作成するとよい。   Preferably, the one or more relay devices are connected in series from the communication device to the external network in the order of 1st to Nth (N is a natural number of 1 or more), and the address space collision detection device has already detected The WAN side address acquisition unit that acquires the WAN side address that is the IP address of the WAN side interface of the relay device that has been detected, and the WAN side address of the i th (i is a natural number from 1 to N) relay device that has already been detected, A router address verification unit that determines whether or not it is within the range of the LAN side address space of the jth (j is a natural number of i + 1 to N−1) relay device that has already been detected, If the WAN address of the i-th relay device is not within the range of the LAN-side address space of the j-th relay device, the WAN address detection unit and the router discovery packet The WAN side address acquisition unit acquires the WAN side address of the i-th relay device based on the notification from the router address verification unit, and the router discovery packet generation unit The LAN address of the 1 relay device is obtained, and the LAN address of the i + 1 relay device is estimated using the WAN address of the i relay device based on the notification from the router address verification unit. The i + 1-th estimated router packet that has transmitted the LAN-side address may be created as a router discovery packet.

好ましくは、1つ以上の中継装置は、通信機器から外部ネットワークに向けて第1から第N(Nは1以上の自然数)の順に直列に接続しており、アドレス空間衝突検出装置は、既に検出されたの中継装置のWAN側インターフェースのIPアドレスであるWAN側アドレスを取得するWAN側アドレス取得部とをさらに備え、ルータディスカバリ用パケット作成部は、第1の中継装置のLAN側アドレスを取得し、ルータディスカバリ用パケットとして、第i(iは1〜Nの自然数)の中継装置のWAN側アドレスを用いて推定した第i+1の中継装置のLAN側アドレスを送信先とした第i+1の推定ルータパケットと、TTL(Time To Live)=i+1に設定したTTLパケットとを送信するとよい。   Preferably, the one or more relay devices are connected in series from the communication device to the external network in the order of 1st to Nth (N is a natural number of 1 or more), and the address space collision detection device has already detected A WAN address acquisition unit that acquires a WAN side address that is an IP address of the WAN side interface of the relay device, and the router discovery packet creation unit acquires the LAN side address of the first relay device. As the router discovery packet, the i + 1-th estimated router packet with the LAN-side address of the i + 1-th relay device estimated using the WAN-side address of the i-th (i is a natural number from 1 to N) relay device as the transmission destination And a TTL packet set to TTL (Time To Live) = i + 1.

また、ルータディスカバリ用パケット作成部は、TTL値と送信先ポート番号とを一対一で対応させたTTLパケットを作成するとよい。また、推定ルータパケットは、UPnP(Universal Plug and Play) IGD(Internet Gateway Device)仕様に基づくM−Searchであるとよい。   The router discovery packet creation unit may create a TTL packet in which a TTL value and a destination port number are associated one-to-one. The estimated router packet may be M-Search based on UPnP (Universal Plug and Play) IGD (Internet Gateway Device) specifications.

好ましくは、アドレス空間衝突検出部は、検出した中継装置のLAN側アドレスを用いて、検出した中継装置のLAN側アドレス空間を推定し、パケット送受信部が当該アドレス空間推定パケットの応答としてICMP(Internet Control Message Protocol) TIME EXCEEDED MESSAGEを受信した場合、当該アドレス空間推定パケットの送信先のIPアドレスが推定したLAN側アドレス空間の範囲外であると判断し、判断結果に基づいて、推定したLAN側アドレス空間を更新し、アドレス空間推定パケットのTTL(Time To Live)の値は、検出した中継装置と通信装置との間に直列に接続される中継装置の数に応じた値であるとよい。   Preferably, the address space collision detection unit estimates the detected LAN side address space of the relay device using the detected LAN side address of the relay device, and the packet transmission / reception unit transmits ICMP (Internet) as a response to the address space estimation packet. Control Message Protocol) When TIME EXCEEDED MESSAGE is received, it is determined that the destination IP address of the address space estimation packet is out of the estimated LAN address space range, and the estimated LAN address based on the determination result The space is updated, and the TTL (Time To Live) value of the address space estimation packet may be a value corresponding to the number of relay devices connected in series between the detected relay device and the communication device.

好ましくは、アドレス空間衝突検出部は、検出した中継装置のWAN側アドレスを用いて、検出した中継装置のWAN側インターフェースと接続する上位中継装置のLAN側アドレス空間を推定し、推定した当該上位中継装置のLAN側アドレス空間のIPアドレスを送信先としたアドレス空間推定パケットを作成し、パケット送受信部が当該アドレス空間推定パケットの応答としてICMP(Internet Control Message Protocol) TIME EXCEEDED MESSAGEを受信した場合、当該アドレス空間推定パケットの送信先のIPアドレスが推定した当該上位中継装置のLAN側アドレス空間の範囲外であると判断し、判断結果に基づいて、推定した当該上位中継装置のLAN側アドレス空間を更新し、アドレス空間推定パケットのTTL(Time To Live)の値は、上位中継装置と通信装置との間に直列に接続される中継装置の数に応じた値であるとよい。   Preferably, the address space collision detection unit estimates the LAN-side address space of the higher-level relay device connected to the WAN-side interface of the detected relay device, using the detected WAN-side address of the relay device, and estimates the higher-level relay When an address space estimation packet is created with the IP address of the LAN side address space of the device as the destination, and the packet transmitting / receiving unit receives ICMP (Internet Control Message Protocol) TIME EXCEEDED MESSAGE as a response to the address space estimation packet, It is determined that the IP address of the transmission destination of the address space estimation packet is outside the range of the estimated LAN address space of the upper relay device, and based on the determination result, the estimated LAN address space of the upper relay device Updated, the value of the TTL (Time To Live) of the address space estimation packets, may is a value corresponding to the number of relay devices which are connected in series between the high-level relay device and the communication device.

好ましくは、アドレス空間衝突検出装置は、LAN側アドレス空間の衝突を検出した場合、ユーザにLAN側アドレス空間の衝突の発生と、LAN側アドレス空間の設定の変更内容とのうち、少なくとも1つを通知するユーザ通知部をさらに備えるとよい。   Preferably, when the address space collision detection device detects a collision in the LAN side address space, the address space collision detection device notifies the user of at least one of the occurrence of the collision in the LAN side address space and the change in the setting of the LAN side address space. A user notification unit for notifying may be further provided.

好ましくは、アドレス空間衝突検出装置は、アドレス空間の衝突を検出した場合、アドレス空間の衝突が発生している中継装置にアクセスして、LAN側アドレス空間の設定を変更するアドレス空間設定修正部をさらに備えるとよい。また、アドレス空間設定修正部は、第i(iは2〜Nの自然数)の中継装置のLAN側アドレス空間と、第j(jは、1〜i−1の自然数)の中継装置のLAN側アドレス空間との衝突を検出した場合、第jの中継装置のLAN側アドレス空間の設定を、他の中継装置のLAN側アドレス空間と異なるアドレス空間に変更するとよい。   Preferably, the address space collision detection device includes an address space setting correction unit that accesses the relay device in which the address space collision has occurred and changes the setting of the LAN side address space when the address space collision is detected. It is good to provide further. In addition, the address space setting correction unit includes the LAN side address space of the i-th (i is a natural number of 2 to N) relay device and the LAN side of the j-th (j is a natural number of 1 to i-1) relay device. When a collision with the address space is detected, the setting of the LAN side address space of the jth relay device may be changed to an address space different from the LAN side address space of other relay devices.

また、アドレス空間衝突検出装置は、ローカルネットワーク内を伝送されるデータを中継するためのルーティング部をさらに備え、アドレス空間衝突検出部は、ルーティング部と1つ以上の中継装置との相互間において、LAN側アドレス空間が衝突しているか否かを検出し、アドレス空間設定修正部は、ルーティング部と1つ以上の中継装置との相互間において、LAN側アドレス空間の衝突を検出した場合、ルーティング部のLAN側アドレス空間を、1つ以上の中継装置のLAN側アドレス空間と異なるアドレス空間に変更するとよい。   The address space collision detection device further includes a routing unit for relaying data transmitted in the local network, and the address space collision detection unit is provided between the routing unit and one or more relay devices. The address space setting correction unit detects whether or not the LAN side address space has collided. When the LAN side address space collision is detected between the routing unit and one or more relay devices, the routing unit The LAN side address space may be changed to an address space different from the LAN side address space of one or more relay apparatuses.

また、本発明は、外部ネットワークに接続するローカルネットワークにおいて、当該ローカルネットワーク内の通信機器と当該外部ネットワークとの間に1つ以上の中継装置が直列に接続されており、当該通信機器が実行可能な、当該1つ以上の中継装置が備える各LAN側インターフェースに設定されたLAN側アドレス空間の衝突を検出するアドレス空間衝突検出方法であって、1つ以上の中継装置を検出するための1つ以上のルータディスカバリ用パケットを作成するステップと、パケット送受信部に当該ルータディスカバリ用パケットの送信を指示するステップと、パケット送受信部がそれぞれのルータディスカバリ用パケットに対する応答を受信したことを確認して1つ以上の中継装置を検出するステップと、当該応答を参照して1つ以上の中継装置のLAN側インターフェースのIPアドレスであるLAN側アドレスを取得するステップと、1つ以上の中継装置のアドレスを用いてLAN側アドレス空間を推定するステップと、1つ以上の中継装置の相互間、及び1つ以上の中継装置と外部ネットワークとの相互間において、LAN側アドレス空間の衝突が発生しているか否かを判断するステップとを備える。   Further, according to the present invention, in a local network connected to an external network, one or more relay devices are connected in series between the communication device in the local network and the external network, and the communication device can be executed. An address space collision detection method for detecting a collision in a LAN side address space set in each LAN side interface provided in the one or more relay apparatuses, one for detecting one or more relay apparatuses. The steps of creating the above router discovery packet, instructing the packet transmission / reception unit to transmit the router discovery packet, and confirming that the packet transmission / reception unit has received a response to each router discovery packet. Detecting more than one relay device and referring to the response Obtaining a LAN-side address that is an IP address of a LAN-side interface of one or more relay apparatuses, estimating a LAN-side address space using the addresses of one or more relay apparatuses, and one or more relay apparatuses Determining whether or not a LAN-side address space collision has occurred between each other and between one or more relay apparatuses and an external network.

外部ネットワークに接続するローカルネットワークにおいて、当該ローカルネットワーク内の通信機器と当該外部ネットワークとの間に1つ以上の中継装置が直列に接続されており、当該通信機器が実行可能な、当該1つ以上の中継装置が備える各LAN側インターフェースに設定されたLAN側アドレス空間の衝突を検出するプログラムを記録した記録媒体であって、1つ以上の中継装置を検出するための1つ以上のルータディスカバリ用パケットを作成するステップと、パケット送受信部に当該ルータディスカバリ用パケットの送信を指示するステップと、パケット送受信部がそれぞれのルータディスカバリ用パケットに対する応答を受信したことを確認して1つ以上の中継装置を検出するステップと、当該応答を参照して1つ以上の中継装置のLAN側インターフェースのIPアドレスであるLAN側アドレスを取得するステップと、1つ以上の中継装置のアドレスを用いてLAN側アドレス空間を推定するステップと、1つ以上の中継装置の相互間、及び1つ以上の中継装置と外部ネットワークとの相互間において、LAN側アドレス空間の衝突が発生しているか否かを判断するステップとを備える。   In the local network connected to the external network, one or more relay devices are connected in series between the communication device in the local network and the external network, and the one or more that can be executed by the communication device One or more router discovery for detecting one or more relay devices, which is a recording medium recording a program for detecting a collision of LAN side address spaces set in each LAN side interface of the relay device One or more relay devices by creating a packet, instructing the packet transmitting / receiving unit to transmit the router discovery packet, and confirming that the packet transmitting / receiving unit has received a response to each router discovery packet. And detecting one or more of one or more with reference to the response A step of obtaining a LAN-side address, which is an IP address of a LAN-side interface of the device, a step of estimating a LAN-side address space using an address of one or more relay devices, and one or more relay devices, And determining whether or not a LAN-side address space collision has occurred between the one or more relay apparatuses and the external network.

以下、本発明の効果について説明する。本発明によれば、本発明に係るアドレス空間衝突検出装置を備える通信機器は、自身と外部ネットワークとの間に接続されている中継機器を検出するためのルータディスカバリ用パケットを送信し、ルータディスカバリ用パケットの応答を受信することによって中継装置を検出し、中継装置のLAN側アドレスを取得する。また、検出した中継装置のLAN側アドレスを用いて、検出した中継装置のLAN側アドレス空間を推定し、推定したそれぞれの中継機器相互間において、LAN側アドレス空間の衝突が発生しているか否か判断する。したがって、自身と外部ネットワークとの間に接続される一つ以上の中継装置を検出し、検出したルータのLAN側アドレス空間の衝突を検出することが可能になる。また、本発明のアドレス空間衝突装置は、中継装置を検出し、検出した中継装置のアドレス空間の衝突の判定を行うため、中継装置や通信端末の一機能として使用することができる。   Hereinafter, the effects of the present invention will be described. According to the present invention, a communication device including the address space collision detection device according to the present invention transmits a router discovery packet for detecting a relay device connected between itself and an external network, and router discovery The relay device is detected by receiving the response of the packet for use, and the LAN side address of the relay device is acquired. In addition, the LAN side address space of the detected relay device is estimated using the LAN address of the detected relay device, and whether or not there is a collision of the LAN side address space between the estimated relay devices. to decide. Therefore, it is possible to detect one or more relay apparatuses connected between itself and the external network, and to detect a collision in the detected LAN side address space of the router. Further, the address space collision apparatus of the present invention can be used as a function of a relay apparatus or a communication terminal because it detects a relay apparatus and determines a collision of the detected address space of the relay apparatus.

ルータディスカバリ用パケットとしてTTLを変化させたTTLパケットを送信し、その応答としてICMP TIME EXCEEDED MESSAGEを受信することによって、自身と外部ネットワークとの間に接続される中継装置を高速に検出することができる。また、既に検出された中継装置のWAN側アドレスを取得し、WAN側アドレスから上位ルータのLAN側アドレスを推測した推定ルータパケットを送信し、その応答を受信することによって、ICMPメッセージをフィルタリングする中継装置やTTLを処理しない中継装置の検出が可能となる。   By transmitting a TTL packet in which TTL is changed as a router discovery packet and receiving ICMP TIME EXCEEDED MESSAGE as a response, it is possible to detect a relay device connected between itself and an external network at high speed. . Also, the relay which filters the ICMP message by acquiring the WAN address of the already detected relay device, transmitting the estimated router packet inferring the LAN address of the upper router from the WAN address, and receiving the response It is possible to detect a relay device that does not process a device or TTL.

ルータディスカバリ用パケットとしてTTLパケットを送信し、TTLパケットの応答を受信がタイムアウトした場合、既に検出された中継装置のWAN側アドレスを取得し、WAN側アドレスから上位ルータのLAN側アドレスを推測した推定ルータパケットを送信し、その応答を受信することによって、ICMPメッセージをフィルタリングする中継装置が存在するネットワークであっても、高速にルータを検出することが可能となる。   When a TTL packet is transmitted as a router discovery packet and the response of the TTL packet is received, the WAN side address of the relay device that has already been detected is acquired, and the LAN side address of the upper router is estimated from the WAN side address By transmitting the router packet and receiving the response, it is possible to detect the router at high speed even in a network having a relay device for filtering the ICMP message.

ルータディスカバリ用パケットとしてTTLパケットを送信し、TTLパケットの応答によって検出した中継装置のLAN側アドレス空間と、検出した1つ下位の中継装置のWAN側アドレスとが一致しない場合、1つ下位の中継装置のWAN側アドレスを取得し、WAN側アドレスから上位の中継装置のLAN側アドレスを推測した推定ルータパケットを送信し、その応答を受信することによって、TTLパケットを用いて検出することが不可能なTTLを処理しない中継装置を高速に検出することが可能となる。   When a TTL packet is transmitted as a packet for router discovery and the LAN side address space of the relay device detected by the response of the TTL packet does not match the detected WAN side address of the next lower relay device, one lower relay It is impossible to detect using the TTL packet by acquiring the WAN address of the device, sending the estimated router packet inferring the LAN address of the higher-level relay device from the WAN address, and receiving the response It is possible to detect a relay device that does not process a large TTL at high speed.

ルータディスカバリ用パケットとして、TTLパケットと推定ルータパケットとを同時に送信することによって、ICMPメッセージをフィルタリングするルータや、TTLを処理しないルータ、UPnP IGD仕様に対応していないルータなどを確実に検出することができる。   By transmitting a TTL packet and an estimated router packet at the same time as router discovery packets, it is possible to reliably detect routers that filter ICMP messages, routers that do not process TTL, routers that do not support UPnP IGD specifications, etc. Can do.

検出した中継装置のアドレス空間を推定し、推定したアドレス空間内のアドレスに対してアドレス範囲推定パケットを送信し、その応答を受信することによって、検出した中継装置のアドレス空間を判定することができる。また、判定したアドレス空間を用いるため、正確なアドレス空間の衝突検出が可能となる。   It is possible to determine the address space of the detected relay device by estimating the address space of the detected relay device, transmitting an address range estimation packet to the address in the estimated address space, and receiving the response. . Further, since the determined address space is used, accurate address space collision detection is possible.

アドレス空間の衝突を検出した場合、ユーザに通知することによって、アドレス空間の衝突の発生を直ちにユーザに知らせることが可能となる。また、アドレス空間の衝突を検出した場合、アドレス空間の衝突が発生している中継装置にアクセスしてLAN側アドレス空間の設定を変更することによって、ネットワーク内のアドレス空間の衝突を自動的に修正することが可能となる。   When an address space collision is detected, the user can be notified immediately of the occurrence of an address space collision by notifying the user. In addition, when an address space collision is detected, the address space collision in the network is automatically corrected by accessing the relay device in which the address space collision has occurred and changing the LAN address space setting. It becomes possible to do.

(第1の実施形態)
以下、本発明の第1の実施形態について、図面を参照しながら説明する。図1は、本発明の第1の実施形態に係るアドレス空間検出装置が用いられるネットワークの一例を示す図である。図1において、宅内ネットワーク1及びインターネット2の異なる二つのネットワークが接続している。なお、宅内ネットワーク1は、ローカルネットワークであれば、家庭内のネットワークでなくても良い。
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a diagram illustrating an example of a network in which the address space detection device according to the first embodiment of the present invention is used. In FIG. 1, two different networks, a home network 1 and the Internet 2, are connected. The home network 1 may not be a home network as long as it is a local network.

図1に示すように、宅内ネットワーク1は、第1の通信端末10と、ルータA20と、ルータB30と、ルータC40とを備える。ルータA20は、WAN側通信I/F201と、LAN側通信I/F202とを含む。ルータB30は、WAN側通信I/F301と、LAN側通信I/F302とを含む。ルータC40は、WAN側通信I/F401と、LAN側通信I/F402とを含む。なお、ルータA20、ルータB30、及びルータC40において、WAN側通信I/F及びLAN側通信I/F以外の構成の記載を省略している。   As shown in FIG. 1, the home network 1 includes a first communication terminal 10, a router A20, a router B30, and a router C40. The router A20 includes a WAN side communication I / F 201 and a LAN side communication I / F 202. The router B30 includes a WAN side communication I / F 301 and a LAN side communication I / F 302. The router C40 includes a WAN side communication I / F 401 and a LAN side communication I / F 402. Note that in the router A20, the router B30, and the router C40, descriptions of configurations other than the WAN side communication I / F and the LAN side communication I / F are omitted.

第1の通信端末10は、本発明の第1の実施形態に係るアドレス空間検出装置であり、宅内ネットワーク1のアドレス空間衝突の検出を行う。第1の通信端末10は、例えば、PCやネットワーク対応の家電機器(ネット家電)である。第1の通信端末10には、プライベートアドレスが割り当てられる。なお、第1の通信端末10は、ネット家電に内蔵されてもよいし、アドレス空間衝突を検出するための専用の端末でもよい。   The first communication terminal 10 is an address space detection device according to the first embodiment of the present invention, and detects an address space collision in the home network 1. The first communication terminal 10 is, for example, a PC or a network-compatible home appliance (net home appliance). A private address is assigned to the first communication terminal 10. Note that the first communication terminal 10 may be built in an Internet home appliance, or may be a dedicated terminal for detecting an address space collision.

ルータC40は、インターネット2のルータD50と接続することによって、宅内ネットワーク1とインターネット2とを接続するゲートウェイである。ルータC40において、WAN側通信I/F401には、グローバルアドレスが割り当てられ、LAN側I/F402には、プライベートアドレスが割り当てられる。ルータA20のWAN側通信I/F201及びLAN側通信I/F202と、ルータB30のWAN側通信I/F301及びLAN側通信I/F302とには、それぞれプライベートアドレスが割り当てられる。   The router C40 is a gateway that connects the home network 1 and the Internet 2 by connecting to the router D50 of the Internet 2. In the router C40, a global address is assigned to the WAN-side communication I / F 401, and a private address is assigned to the LAN-side I / F 402. Private addresses are assigned to the WAN side communication I / F 201 and the LAN side communication I / F 202 of the router A20, and the WAN side communication I / F 301 and the LAN side communication I / F 302 of the router B30, respectively.

図2は、第1の通信端末10の構成を示すブロック図である。第1の通信端末10は、制御部101と、ルータディスカバリ用パケット作成部102と、受信パケット解析部103と、パケット送受信部104と、通信部105と、アドレス空間衝突検出部106とを含む。   FIG. 2 is a block diagram showing a configuration of the first communication terminal 10. The first communication terminal 10 includes a control unit 101, a router discovery packet creation unit 102, a received packet analysis unit 103, a packet transmission / reception unit 104, a communication unit 105, and an address space collision detection unit 106.

制御部101は、第1の通信端末10の各構成を制御する。ルータディスカバリ用パケット作成部102は、ルータを発見するためのパケットであるルータディスカバリ用パケット(以下、TTLパケットという)を作成して、TTLパケットの送信指示を行う。受信パケット解析部103は、TTLパケットの応答としてルータが送信した応答パケット(以下、TTL応答パケットという)を解析して、ルータを検出して、検出したルータのアドレスを把握する。パケット送受信部104は、通信部105に対してパケットの送信処理を指示するとともに、通信部105が受信した受信パケットを解析して、受信パケットを対応するブロックへ引き渡す。アドレス空間衝突検出部106は、検出したルータのアドレス空間を推定し、その情報を記録する。そして、アドレス空間衝突検出部106は、記憶しているルータのアドレス空間で衝突しているものがある場合、これを検出する。   The control unit 101 controls each configuration of the first communication terminal 10. The router discovery packet creation unit 102 creates a router discovery packet (hereinafter referred to as a TTL packet), which is a packet for discovering a router, and issues a TTL packet transmission instruction. The received packet analysis unit 103 analyzes a response packet (hereinafter referred to as a TTL response packet) transmitted by the router as a response to the TTL packet, detects the router, and grasps the detected router address. The packet transmitting / receiving unit 104 instructs the communication unit 105 to perform packet transmission processing, analyzes the received packet received by the communication unit 105, and delivers the received packet to the corresponding block. The address space collision detection unit 106 estimates the address space of the detected router and records the information. Then, the address space collision detection unit 106 detects, if there is a collision in the stored router address space.

図3は、第1の通信端末10が行う、宅内ネットワーク1内のアドレス空間の衝突検出処理を示すフローチャートである。第1の通信端末10は、ルータのLAN側アドレス空間の衝突検出処理を開始すると、ルータディスカバリ用パケット作成部102が行うTTLパケット送信処理を起動する(ステップS101)。ここで、起動したTTLパケット送信処理は、TTL応答パケット受信処理(ステップS102)などと並行して実行される。第1の通信端末10は、TTLパケット送信処理の起動後、TTL応答パケットを受信したか否かを判断する(ステップS102)。TTL応答パケットを受信すると、第1の通信端末10は、ルータを検出したと判断して、TTL応答パケットの受信処理を実行する(ステップS103)。TTL応答パケットは、具体的には、ICMP(Internet Control Message Protocol) TIME EXCEEDED MESSAGEである。ICMP TIME EXCEEDED MESSAGEとは、中継するパケットの生存時間(TTL:Time To Live)の超過によるパケットの破棄を、送信元に報告するメッセージである。   FIG. 3 is a flowchart showing the collision detection processing of the address space in the home network 1 performed by the first communication terminal 10. When the first communication terminal 10 starts the collision detection process for the router's LAN address space, the first communication terminal 10 starts the TTL packet transmission process performed by the router discovery packet creation unit 102 (step S101). Here, the activated TTL packet transmission processing is executed in parallel with the TTL response packet reception processing (step S102). The first communication terminal 10 determines whether or not a TTL response packet has been received after the activation of the TTL packet transmission process (step S102). When receiving the TTL response packet, the first communication terminal 10 determines that a router has been detected, and executes a TTL response packet reception process (step S103). More specifically, the TTL response packet is ICMP (Internet Control Message Protocol) TIME EXCEEDED MESSAGE. The ICMP TIME EXCEEDED MESSAGE is a message that reports to the transmission source that the packet is discarded due to the surviving time (TTL: Time To Live) of the packet to be relayed.

第1の通信端末10は、TTL応答パケットの送信元アドレスが、グローバルアドレスであるか否か判断する(ステップS104)。TTL応答パケットの送信元アドレスがグローバルアドレスでない場合、第1の通信端末10は、アドレス空間推定処理を実行する(ステップS105)。続いて、第1の通信端末10は、アドレス衝突判定処理を実行する(ステップS106)。TTL応答パケットの送信元アドレスがグローバルアドレスであった場合、第1の通信端末10は、TTLパケット送信処理を中止する(ステップS107)。   The first communication terminal 10 determines whether or not the transmission source address of the TTL response packet is a global address (step S104). If the transmission source address of the TTL response packet is not a global address, the first communication terminal 10 executes an address space estimation process (step S105). Subsequently, the first communication terminal 10 executes an address collision determination process (step S106). When the transmission source address of the TTL response packet is a global address, the first communication terminal 10 stops the TTL packet transmission process (step S107).

第1の通信端末10は、送信したTTLパケットに対するTTL応答パケットを全て受信したか否かを判断する(ステップS108)。全て受信した場合、第1の通信端末10は、図3に示すアドレス空間の衝突検出処理を終了する。全て受信していない場合、第1の通信端末10は、ステップS102に戻り、TTL応答パケットの受信待機状態となる。送信したTTLパケットに対するTTL応答パケットを全て受信するまで、受信処理を継続する理由は、TTLパケットを送信した順にTTL応答パケットを受信するとは限らないためである。なお、送信元アドレスがグローバルアドレスであったTTL応答パケットに対応するTTLパケットにおいて、設定したTTL値をTTLgとすると、TTLg以下のTTL値のTTLパケットに対するTTL応答パケットを全て受信した場合、TTL応答パケットを全て受信したと判断してもよい。   The first communication terminal 10 determines whether or not all TTL response packets for the transmitted TTL packet have been received (step S108). When all the signals have been received, the first communication terminal 10 ends the address space collision detection processing shown in FIG. If not received completely, the first communication terminal 10 returns to step S102 and enters a TTL response packet reception standby state. The reason why the reception process is continued until all the TTL response packets for the transmitted TTL packet are received is that the TTL response packets are not necessarily received in the order in which the TTL packets are transmitted. In the TTL packet corresponding to the TTL response packet whose source address is the global address, if the set TTL value is TTLg, the TTL response is received when all the TTL response packets for the TTL packet having a TTL value equal to or less than TTLg are received. It may be determined that all packets have been received.

図4〜6を用いて、TTLパケット送信処理の詳細を説明する。図4は、TTLパケット送信処理のフローチャートである。図5は、TTLパケットの送信にUDP(User Datagram Protocol)を用いる場合の、TTLパケットの構成を示す図である。図6は、TTLパケットにおける、TTLと宛先ポート番号との対応関係の一例を示す図である。   Details of the TTL packet transmission processing will be described with reference to FIGS. FIG. 4 is a flowchart of the TTL packet transmission process. FIG. 5 is a diagram illustrating a configuration of a TTL packet when UDP (User Datagram Protocol) is used for transmission of the TTL packet. FIG. 6 is a diagram illustrating an example of a correspondence relationship between a TTL and a destination port number in a TTL packet.

図4を用いて、TTLパケット送信処理を説明する。第1の通信端末10において、ルータディスカバリ用パケット作成部102は、制御部101からのTTLパケット送信処理の指示に基づいて、図4に示す処理を開始する。ルータディスカバリ用パケット作成部102は、制御部101がTTLパケットの作成の続行を指示しているか否かを確認する(ステップS111)。制御部101が行うTTLパケットの作成を続行するか否かの判断基準については、後述する。   The TTL packet transmission process will be described with reference to FIG. In the first communication terminal 10, the router discovery packet creation unit 102 starts the process shown in FIG. 4 based on the TTL packet transmission process instruction from the control unit 101. The router discovery packet creation unit 102 confirms whether or not the control unit 101 has instructed the continuation of the creation of the TTL packet (step S111). A criterion for determining whether or not to continue the creation of the TTL packet performed by the control unit 101 will be described later.

TTLパケット作成の中止を指示している場合、ルータディスカバリ用パケット作成部102は、TTLパケット送信処理を終了する。TTLパケット作成の続行を指示している場合、ルータディスカバリ用パケット作成部102は、TTLと宛先ポート番号とを、1つずつインクリメントしたTTLパケットを作成する(ステップS112)。ルータディスカバリ用パケット作成部102は、パケット送受信部104と通信部105とを介して、作成したTTLパケットを送信する(ステップS113)。なお、ルータディスカバリ用パケット作成部102は、送信したTTLパケットに対応するTTL応答パケットの受信を待つことなく、TTLをインクリメントした次のTTLパケットを送信してもよい。この場合、第1の通信端末10は、複数のTTLパケットを同時に送信できるため、高速にルータを検出することが可能となる。また、TTLパケットは、インターネット上の特定のグローバルアドレス宛(例えば、ルータD50のLAN側I/F501、あるいはインターネット上の特定のサーバのアドレス(例えば、http://panasonic.comなど)に向けて送信してもよい。   If an instruction to stop TTL packet creation is given, the router discovery packet creation unit 102 ends the TTL packet transmission processing. When the instruction to continue the TTL packet creation is given, the router discovery packet creation unit 102 creates a TTL packet in which the TTL and the destination port number are incremented by one (step S112). The router discovery packet creation unit 102 transmits the created TTL packet via the packet transmission / reception unit 104 and the communication unit 105 (step S113). Note that the router discovery packet creation unit 102 may transmit the next TTL packet incremented by TTL without waiting for the reception of the TTL response packet corresponding to the transmitted TTL packet. In this case, since the first communication terminal 10 can transmit a plurality of TTL packets at the same time, the router can be detected at high speed. The TTL packet is directed to a specific global address on the Internet (for example, the LAN side I / F 501 of the router D50 or a specific server address on the Internet (for example, http://panasonic.com)). You may send it.

ルータディスカバリ用パケット作成部102は、図6に示すように、IPヘッダのTTLフィールドの値を1からインクリメントするとともに、UDPヘッダの宛先ポート番号フィールドを10001からインクリメントしながら、TTLパケットを作成する。宛先ポート番号は、図6に示す例に限られず、他のポート番号でもよい。宛先ポート番号は、宛先ポート番号からTTLが一意に判別できればよい。   As shown in FIG. 6, the router discovery packet creation unit 102 creates a TTL packet while incrementing the value of the TTL field of the IP header from 1 and incrementing the destination port number field of the UDP header from 10001. The destination port number is not limited to the example shown in FIG. 6, and may be another port number. The destination port number only needs to be able to uniquely determine the TTL from the destination port number.

図7〜図9を用いて、TTL応答パケットの受信処理を説明する。図7は、TTLパケットと、TTL応答パケットとの対応を示す図である。図8は、TTL応答パケットの一例を示す図である。図9は、TTL応答パケット受信処理を示すフローチャートである。   TTL response packet reception processing will be described with reference to FIGS. FIG. 7 is a diagram showing the correspondence between TTL packets and TTL response packets. FIG. 8 is a diagram illustrating an example of a TTL response packet. FIG. 9 is a flowchart showing TTL response packet reception processing.

図7において、ルータA20、ルータB30、ルータC40、及びルータD50は、それぞれのLAN側通信I/Fで受信したTTLパケットを、TTL値を1だけ引いてWAN側のルータに送信する。それぞれのルータは、TTL値を1引いて、TTL=0となった場合、TTLパケットをWAN側のルータに送信せずに廃棄する。そして、それぞれのルータは、TTL値が原因であるパケットの廃棄が発生したことを示すために、TTL応答パケットをTTLパケットの送信元へ送信する。図8に示すTTL応答パケットのデータ部には、廃棄したルータディスカバリ用パケットのIPヘッダと、それに続くUDPヘッダを含む64ビットのデータが付加される。   In FIG. 7, a router A20, a router B30, a router C40, and a router D50 subtract a TTL value from the TTL packet received by each LAN side communication I / F and transmit it to the WAN side router. Each router subtracts the TTL value by 1 and discards the TTL packet without transmitting it to the router on the WAN side when TTL = 0. Then, each router transmits a TTL response packet to the transmission source of the TTL packet in order to indicate that the packet discard due to the TTL value has occurred. In the data portion of the TTL response packet shown in FIG. 8, 64-bit data including the discarded router discovery packet IP header and the subsequent UDP header is added.

第1の通信端末10が、TTL=1に設定したTTLパケットを、インターネット2上の特定のIPアドレスに向けて送信した場合を考える。TTL=1のTTLパケットは、ルータA20のLAN側I/F202で受信される。TTL=1に設定したTTLパケットは、WAN側I/F201から送信される前に、TTL=0となる。このため、ルータA20は、TTL=1のTTLパケットは廃棄する。ルータA20は、TTL=1のTTLパケットを廃棄したことを通知するために、TTL応答パケットを第1の通信端末10に送信する。このとき、TTL応答パケットの送信元IPアドレス(以下、送信元アドレスという)は、ルータA20のLAN側通信I/F202のIPアドレスとなる。(以下、各ルータのLAN側通信I/FのIPアドレスを、各ルータのLAN側アドレスという)第1の通信端末10は、TTL応答パケットの送信元アドレスを確認することによって、ルータA20のLAN側アドレスを知ることが可能となる。   Consider a case where the first communication terminal 10 transmits a TTL packet set to TTL = 1 toward a specific IP address on the Internet 2. The TTL packet with TTL = 1 is received by the LAN side I / F 202 of the router A20. The TTL packet set to TTL = 1 is set to TTL = 0 before being transmitted from the WAN side I / F 201. Therefore, the router A20 discards the TTL packet with TTL = 1. The router A20 transmits a TTL response packet to the first communication terminal 10 in order to notify that the TTL packet with TTL = 1 has been discarded. At this time, the transmission source IP address (hereinafter referred to as the transmission source address) of the TTL response packet is the IP address of the LAN side communication I / F 202 of the router A20. The first communication terminal 10 (hereinafter, the IP address of each router's LAN-side communication I / F is referred to as the LAN-side address of each router) confirms the source address of the TTL response packet, so that the router A20 LAN It becomes possible to know the side address.

同様に、第1の通信端末10が、TTL=2に設定したTTLパケットを、インターネット上の特定のIPアドレスに向けて送信すると、ルータB30は、ルータB30自身のLAN側アドレスを送信元アドレスとしたTTL応答パケットを、第1の通信端末10に送信する。また、第1の通信端末10が、TTL=3に設定したTTLパケットを、インターネット上の特定のIPアドレスに向けて送信すると、ルータC40は、ルータC40自身のLAN側アドレスを送信元アドレスとしたTTL応答パケットを、第1の通信端末10に送信する。このように、第1の通信端末10は、TTLパケットに対応するTTL応答パケットを受信することで、それぞれのルータを検出するとともに、それぞれのルータのLAN側アドレスを取得することができる。また、第1の通信端末10は、自身とインターネット2との間に接続されているルータの接続順序に関する接続順序情報を取得することができる。   Similarly, when the first communication terminal 10 transmits a TTL packet set to TTL = 2 toward a specific IP address on the Internet, the router B30 uses the LAN address of the router B30 itself as the source address. The transmitted TTL response packet is transmitted to the first communication terminal 10. Also, when the first communication terminal 10 transmits a TTL packet set to TTL = 3 toward a specific IP address on the Internet, the router C40 uses the LAN side address of the router C40 itself as the source address. The TTL response packet is transmitted to the first communication terminal 10. As described above, the first communication terminal 10 can detect each router and obtain the LAN side address of each router by receiving the TTL response packet corresponding to the TTL packet. Further, the first communication terminal 10 can acquire connection order information regarding the connection order of routers connected between itself and the Internet 2.

図9を用いて、TTL応答パケットの受信処理の詳細を説明する。第1の通信端末10は、TTL応答パケットを受信すると、図9に示す処理を開始する。パケット送受信部104は、TTL応答パケットを受信パケット解析部103に引き渡す(ステップS131)。受信パケット解析部103は、図8に示すTTL応答パケットから送信元ポート番号を取り出し、取り出した送信元ポート番号を用いて、受信したTTL応答パケットに対応するのTTL値を特定する(ステップS132)。また、受信パケット解析部103は、TTL応答パケットの送信元アドレスを参照することで、送信元ルータのLAN側アドレスを取得する(ステップS133)。   The details of the TTL response packet reception process will be described with reference to FIG. When receiving the TTL response packet, the first communication terminal 10 starts the process shown in FIG. The packet transmitter / receiver 104 delivers the TTL response packet to the received packet analyzer 103 (step S131). The received packet analysis unit 103 extracts the transmission source port number from the TTL response packet shown in FIG. 8 and specifies the TTL value corresponding to the received TTL response packet using the extracted transmission source port number (step S132). . Also, the received packet analysis unit 103 refers to the transmission source address of the TTL response packet to acquire the LAN side address of the transmission source router (step S133).

ステップS132とステップS133において、例えば、TTL応答パケットの送信元ポートが10001である場合、図6に示す関係から、第1の通信端末10は、TTL=1のTTL応答パケットを受信したことが分かる。このため、第1の通信端末10は、自身の一番近くに存在するルータA20のLAN側アドレスを取得したことを認識できる。また、TTL応答パケットの送信元ポートが10002である場合、第1の通信端末10は、TTL=2のTTL応答パケットを受信したことが分かる。このため、第1の通信端末10は、ルータB30のLAN側アドレスを検出したことを認識できる。   In step S132 and step S133, for example, when the transmission source port of the TTL response packet is 10001, the relationship shown in FIG. 6 indicates that the first communication terminal 10 has received the TTL response packet with TTL = 1. . For this reason, the first communication terminal 10 can recognize that the LAN side address of the router A20 existing closest to itself is acquired. Further, when the source port of the TTL response packet is 10002, it can be seen that the first communication terminal 10 has received a TTL response packet with TTL = 2. For this reason, the first communication terminal 10 can recognize that the LAN side address of the router B30 has been detected.

受信パケット解析部103は、検出したルータのLAN側アドレスがローカルアドレスか否かを判断する(ステップS134)。検出したルータのLAN側アドレスがローカルアドレスである場合、受信パケット解析部103は、制御部101を通じて、アドレス空間衝突検出部106に、アドレス空間推定処理及びアドレス衝突判定処理の実行を指示する(ステップS135)。一方、検出したルータのLAN側アドレスがグローバルアドレスである場合、受信パケット解析部103は、制御部101を通じて、ルータディスカバリ用パケット作成部102に、グローバルアドレスを検出したTTL応答パケットに対応するTTL値以上のTTLパケットの作成中止を指示する(ステップS136)。このように、第1の通信端末10は、TTL値と送信先ポート番号とを一対一で対応させたTTLパケットを送信し、受信したTTL応答パケットに対応するTTL値と送信元ポート番号とをチェックすることによって、宅内ネットワーク1内に存在するルータのLAN側アドレスとを全て知ることが可能となる。   The received packet analysis unit 103 determines whether or not the detected LAN side address of the router is a local address (step S134). If the detected LAN address of the router is a local address, the received packet analysis unit 103 instructs the address space collision detection unit 106 to execute an address space estimation process and an address collision determination process through the control unit 101 (step S1). S135). On the other hand, when the detected LAN address of the router is a global address, the received packet analysis unit 103 sends a TTL value corresponding to the TTL response packet that detected the global address to the router discovery packet creation unit 102 through the control unit 101. An instruction to stop the creation of the above TTL packet is given (step S136). As described above, the first communication terminal 10 transmits a TTL packet in which a TTL value and a transmission destination port number are associated with each other in a one-to-one correspondence. A TTL value corresponding to the received TTL response packet and a transmission source port number are By checking, it is possible to know all the LAN addresses of routers existing in the home network 1.

図9に示すフローチャートを用いることによって、第1の通信端末10は、宅内ネットワーク1内のルータの存在を確認して、自身からインターネット2までに存在するルータのルータの接続順序情報を記憶することができる。また、第1の通信端末10は、検出したルータのLAN側アドレスを記憶する。ルータのLAN側アドレスを用いて、第1の通信端末10は、アドレス空間推定処理及びアドレス衝突判定処理を実行する。   By using the flowchart shown in FIG. 9, the first communication terminal 10 confirms the presence of the router in the home network 1 and stores the connection order information of the routers of the routers existing from the Internet 2 to itself. Can do. Further, the first communication terminal 10 stores the detected LAN address of the router. Using the router's LAN address, the first communication terminal 10 executes an address space estimation process and an address collision determination process.

図10〜図12を用いて、アドレス空間の推定処理を説明する。図10は、アドレス空間衝突検出部106が行うアドレス空間の推定処理を示すフローチャートである。図11は、ICMPを用いたアドレス範囲推定パケットのフォーマットを示す図である。図12は、アドレス範囲推定パケットの送信先とアドレス範囲推定パケットの応答との対応関係の一例を示す図である。   The address space estimation process will be described with reference to FIGS. FIG. 10 is a flowchart showing address space estimation processing performed by the address space collision detection unit 106. FIG. 11 is a diagram showing a format of an address range estimation packet using ICMP. FIG. 12 is a diagram illustrating an example of a correspondence relationship between the transmission destination of the address range estimation packet and the response of the address range estimation packet.

図10を用いて、アドレス空間推定処理を説明する。アドレス空間衝突検出部106は、TTL応答パケットの送信元アドレスがローカルアドレスであった場合に、TTL応答パケットの送信元ルータを対象として、図10に示す処理を実行する。アドレス空間衝突検出部106は、TTL応答パケットに対応するTTLパケットで指定したTTL値を用いて、送信先アドレスを変化させたアドレス範囲推定パケットを送信する(ステップS151)。例えば、ルータA20であればTTL値は1、ルータB30であれば、TTL値は2を用いることになる。   The address space estimation process will be described with reference to FIG. When the transmission source address of the TTL response packet is a local address, the address space collision detection unit 106 executes the process illustrated in FIG. 10 for the transmission source router of the TTL response packet. The address space collision detection unit 106 transmits an address range estimation packet in which the transmission destination address is changed using the TTL value designated by the TTL packet corresponding to the TTL response packet (step S151). For example, the router A20 uses a TTL value of 1, and the router B30 uses a TTL value of 2.

また、アドレス空間衝突検出部106は、TTL応答パケットから得られたルータのLAN側アドレスを基に、そのルータのアドレス空間を一次推測し記憶する。アドレス空間の一次推測の具体的な方法は、アドレス空間をクラスCのアドレスとして推測する方法が考えられる。例えば、ルータA20のLAN側アドレスが、192.168.0.1であれば、ルータA20のアドレス空間は、192.168.0.1〜192.168.0.254と推測できる。なお、得られたルータのLAN側アドレスが、クラスAまたはクラスBのプライベートアドレスである場合、得られたルータのアドレス空間が、それぞれのクラスに応じたアドレス空間であると一次推測してもよい。例えば、ルータA20のプライベートアドレスが10.1.0.130であった場合、そのルータのアドレス空間を10.0.0.1〜10.255.255.254であると一次推測する。また、10.1.0.1〜10.1.0.254(最下位8ビットだけを変化)又は10.1.0.129〜10.1.0.254(最下位7ビットだけを変化)などのように一次推測してもよい。   In addition, the address space collision detection unit 106 primarily estimates and stores the address space of the router based on the LAN side address of the router obtained from the TTL response packet. As a specific method of the primary estimation of the address space, a method of estimating the address space as a class C address can be considered. For example, if the LAN address of the router A20 is 192.168.0.1, the address space of the router A20 can be estimated as 192.168.0.1 to 192.168.0.254. When the obtained router's LAN address is a class A or class B private address, it may be presumed that the obtained router's address space is an address space corresponding to each class. . For example, when the private address of the router A 20 is 10.1.0.130, the router presumes that the address space of the router is 10.0.0.1-10.255.255.254. Also, 10.1.0.1-10.0.2554 (only the least significant 8 bits are changed) or 10.1.0.129 to 10.1.0.254 (only the least significant 7 bits are changed) ) Or the like.

アドレス空間衝突検出部106は、アドレス空間を一次推測する際に、少なくとも得られたルータのLAN側アドレスが含まれるように得られたルータのアドレス空間を一次推測して記憶する。そして、アドレス空間衝突検出部106は、記憶したアドレス空間のアドレスを順に送信先として指定し、アドレス範囲推定パケットを送信する。このとき、得られたルータのLAN側アドレスは必ず一次推測したアドレス空間に含まれていると考えることができるので、アドレス空間衝突検出部106は、得られたルータのLAN側アドレスにアドレス範囲推定パケットを送信しなくてもよい。   When first presuming the address space, the address space collision detection unit 106 first presumes and stores the obtained router address space so as to include the obtained LAN address of the router. Then, the address space collision detection unit 106 sequentially designates the addresses in the stored address space as a transmission destination, and transmits an address range estimation packet. At this time, since it can be considered that the obtained LAN address of the router is always included in the primary estimated address space, the address space collision detection unit 106 estimates the address range to the obtained router LAN address. It is not necessary to send a packet.

アドレス範囲推定パケットとは、アドレス空間衝突検出部106が、対象となるルータのアドレス空間として推定したアドレス空間が、対象ルータのアドレス空間であるか否かを確認するためのパケットである。アドレス範囲推定パケットは、図5に示すUDPパケットまたは、図11に示すICMPパケットを用いる。TTLパケットとアドレス範囲推定パケットとの相違点は、TTLパケットの送信先アドレスが、インターネット上の特定のアドレスであるのに対し、アドレス範囲推定パケットの送信先アドレスが、対象ルータのアドレス空間内と思われるアドレス空間のローカルアドレスである点である。   The address range estimation packet is a packet for confirming whether or not the address space estimated by the address space collision detection unit 106 as the address space of the target router is the address space of the target router. As the address range estimation packet, the UDP packet shown in FIG. 5 or the ICMP packet shown in FIG. 11 is used. The difference between the TTL packet and the address range estimation packet is that the destination address of the TTL packet is a specific address on the Internet, whereas the destination address of the address range estimation packet is different from the address space of the target router. This is a local address in the possible address space.

また、パケット送受信部104において、TTL応答パケットと、アドレス範囲推定パケットの応答であるICMP TIME EXCEEDED MESSAGEとを識別可能とするために、アドレス空間衝突検出部106は、図5に示すUDPパケットを用いる場合、TTLパケットで使用しないポート番号を指定したUDPパケットを、アドレス範囲推定パケットとして送信する。この結果、アドレス範囲推定パケットの応答であるICMP TIME EXCEEDED MESSAGEのデータ部には、アドレス範囲推定パケットで指定したポート番号が含まれることになる。このように、パケット送受信部104は、ポート番号を参照することによって、TTL応答パケットと、アドレス範囲推定パケットの応答であるICMP TIME EXCEEDED MESSAGEとを識別することができる。同様に、アドレス範囲推定パケットとしてICMPを使用する場合、シーケンス番号等にTTLパケットでは使用しない値を設定する。なお、アドレス範囲推定パケットの応答を用いたルータのアドレス空間の推定方法は後述する。   Further, in order to make it possible to identify the TTL response packet and the ICMP TIME EXCEEDED MESSAGE that is the response of the address range estimation packet in the packet transmission / reception unit 104, the address space collision detection unit 106 uses the UDP packet shown in FIG. In this case, a UDP packet specifying a port number not used in the TTL packet is transmitted as an address range estimation packet. As a result, the port number specified by the address range estimation packet is included in the data portion of ICMP TIME EXCEEDED MESSAGE which is a response to the address range estimation packet. As described above, the packet transmitting / receiving unit 104 can identify the TTL response packet and the ICMP TIME EXCEEDED MESSAGE that is the response of the address range estimation packet by referring to the port number. Similarly, when ICMP is used as the address range estimation packet, a value not used in the TTL packet is set for the sequence number and the like. A router address space estimation method using the address range estimation packet response will be described later.

アドレス範囲推定パケットに対する応答があった場合、アドレス空間衝突検出部106は、パケット送受信部104を通じて応答を受け取る。そして、アドレス空間衝突検出部106は、応答がICMP TIME EXCEEDED MESSAGEであるか否かを判定する(ステップS152)。応答がICMP TIME EXCEEDED MESSAGEでない場合、アドレス範囲推定パケットの送信先アドレスが、ルータのアドレス空間内であると判定する(ステップS153)。そして、アドレス空間衝突検出部106は、判定結果に基づきルータのアドレス空間の推定情報を更新して記憶する。   When there is a response to the address range estimation packet, the address space collision detection unit 106 receives the response through the packet transmission / reception unit 104. Then, the address space collision detection unit 106 determines whether or not the response is ICMP TIME EXCEEDED MESSAGE (step S152). If the response is not ICMP TIME EXCEEDED MESSAGE, it is determined that the transmission destination address of the address range estimation packet is within the address space of the router (step S153). Then, the address space collision detection unit 106 updates and stores the estimated address space information of the router based on the determination result.

アドレス範囲推定パケットの応答としてICMP TIME EXCEEDED MESSAGEを受信することによって、アドレス範囲推定パケットの送信先が、ルータのアドレス空間の範囲外のアドレスと判断できる理由について説明する。アドレス範囲推定パケットは、ルータのLAN側アドレスを取得するために送信したTTLパケットと同一のTTL値を指定して送信される(例えば、ルータA20のアドレス空間を推測する場合、TTL値は1が指定される)。ルータのアドレス空間の範囲外のアドレスを指定してパケットを送信すると、ルータは、上位のルータにパケットを送信しようとする。このとき、TTL値の減算が実行され、TTL=0となるため、ルータはアドレス範囲推定パケットを廃棄し、ICMP TIME EXCEEDED MESSAGEを送信する。ゆえに、アドレス範囲推定パケットの応答としてICMP TIME EXCEEDED MESSAGEを受信すると、アドレス範囲推定パケットの送信先アドレスは、ルータのアドレス空間の範囲外であることがわかる。   The reason why the destination of the address range estimation packet can be determined as an address outside the range of the router address space by receiving ICMP TIME EXCEEDED MESSAGE as a response to the address range estimation packet will be described. The address range estimation packet is transmitted by designating the same TTL value as the TTL packet transmitted to acquire the router's LAN address (for example, when estimating the address space of the router A20, the TTL value is 1). It is specified). When a packet is transmitted by specifying an address outside the range of the router address space, the router attempts to transmit the packet to the upper router. At this time, since the TTL value is subtracted and TTL = 0, the router discards the address range estimation packet and transmits ICMP TIME EXCEEDED MESSAGE. Therefore, when ICMP TIME EXCEEDED MESSAGE is received as a response to the address range estimation packet, it is understood that the transmission destination address of the address range estimation packet is outside the range of the router address space.

なお、アドレス範囲推定パケットに対する応答がない場合も、アドレス空間衝突検出部106は、アドレス範囲推定パケットの送信先アドレスが対象ルータのアドレス空間内であると判定してよい。応答がICMP TIME EXCEEDED MESSAGEである場合(ステップS154、Yes)、アドレス空間衝突検出部106は、アドレス範囲推定パケットの送信先アドレスが、ルータのアドレス空間外であると判定する(ステップS154)。そして、アドレス空間衝突検出部106は、判定結果に基づきルータのLAN側アドレス空間の推定情報を更新して記憶する。アドレス空間衝突検出部106は、アドレス空間の推定が終了したか否かを判定する(ステップS155)。具体的には、アドレス空間は、アドレス範囲推定パケットの送信及びアドレス範囲推定パケットに対する応答を全て受信したか否かを確認する。終了していない場合、アドレス空間衝突検出部106は、ステップS151へ戻る。終了した場合、アドレス空間衝突検出部106は、アドレス空間の推定処理を終了する。   Even when there is no response to the address range estimation packet, the address space collision detection unit 106 may determine that the transmission destination address of the address range estimation packet is within the address space of the target router. When the response is ICMP TIME EXCEEDED MESSAGE (step S154, Yes), the address space collision detection unit 106 determines that the transmission destination address of the address range estimation packet is outside the address space of the router (step S154). Then, the address space collision detection unit 106 updates and stores the estimated information of the router's LAN side address space based on the determination result. The address space collision detection unit 106 determines whether or not the estimation of the address space has been completed (step S155). Specifically, the address space confirms whether or not the transmission of the address range estimation packet and the response to the address range estimation packet have been received. If not completed, the address space collision detection unit 106 returns to Step S151. If completed, the address space collision detection unit 106 ends the address space estimation process.

なお、アドレス空間衝突検出部106は、アドレス空間内と判定されるアドレスと、アドレス空間外と判定されるアドレスとの境界のアドレスを検出した時に、アドレス空間の推定処理を終了してよい。これは、一般にルータのアドレス空間が、連続するアドレスで構成されるためである。例えば、図12のように、192.268.2.2から順に(192.168.2.3、192.168.2.4、・・・)、アドレス空間衝突検出部106が送信先としてアドレス範囲推定パケットを送信した場合(192.168.2.1はルータのアドレスであり、必ずアドレス空間内であると分かっているため送信しない)、192.168.2.128で初めてアドレス空間の範囲外と判断される。この結果、アドレス空間が連続なら、192.168.2.128以降のアドレスは、全てアドレス空間の範囲外と判断されると予測することができる。このため、アドレス空間衝突検出部106は、192.168.2.128をアドレス空間の範囲外と判断した時点で、実際に一次推測したアドレス空間全体のアドレスにアドレス範囲推定パケットを送信せず、アドレス空間の判定処理を終了してよい。このとき、アドレス空間衝突検出部106が記憶するルータのアドレス空間情報は、判定結果に基づき更新される。   Note that the address space collision detection unit 106 may end the address space estimation process when detecting an address at a boundary between an address determined to be within the address space and an address determined to be outside the address space. This is because the address space of the router is generally composed of continuous addresses. For example, as shown in FIG. 12, the address space collision detection unit 106 uses the address as the transmission destination in order from 192.268.2.2 (192.168.2.3, 192.168.2.4,...). When a range estimation packet is transmitted (192.168.2.1 is the address of the router and is not transmitted because it is always known to be in the address space), the range of the address space is the first time in 192.168.2.128 It is judged outside. As a result, if the address space is continuous, it can be predicted that all addresses after 192.168.2.128 are determined to be outside the range of the address space. For this reason, when the address space collision detection unit 106 determines that 192.168.2.128 is out of the address space range, the address space collision detection unit 106 does not transmit an address range estimation packet to the address of the entire address space that is actually primarily estimated, The address space determination process may be terminated. At this time, the address space information of the router stored in the address space collision detection unit 106 is updated based on the determination result.

図12を用いて、アドレス空間推定処理についてさらに詳しく説明する。図12において、アドレス空間推定処理の対象ルータのLAN側アドレスを、192.168.2.1とする。ルータのLAN側アドレスが上記のように設定されている場合、一般的なルータは、クラスCのアドレス空間(192.168.2.1〜192.168.2.254。192.168.2.255はブロードキャストアドレス)が初期値として設定されていることが多い。図12の例では、第1の通信端末10は、対象ルータのアドレスである192.168.2.1が確実にアドレス空間内にあることが分かっている。このため、アドレス空間衝突検出部106は、対象ルータのアドレス空間をクラスCのアドレス空間全体と一次推測して記憶し、対象ルータのアドレスを除いたクラスCのアドレス空間に対して、アドレス範囲推定パケットを送信する。   The address space estimation process will be described in more detail with reference to FIG. In FIG. 12, the LAN address of the target router for the address space estimation process is 192.168.2.1. When the router's LAN side address is set as described above, a general router has a class C address space (192.168.2.1 to 192.168.2.254. 192.168.8.2. In many cases, 255 is a broadcast address) as an initial value. In the example of FIG. 12, it is known that the first communication terminal 10 surely has the address 192.168.2.1 of the target router in the address space. For this reason, the address space collision detection unit 106 primarily stores the address space of the target router as the entire class C address space, and stores the address range estimation for the class C address space excluding the target router address. Send the packet.

アドレス範囲推定パケットを送信した結果、図12に示すように、アドレス範囲推定パケットの送信先アドレスに対応する応答が帰ってきたとする。アドレス範囲推定パケットの送信先アドレスが対象ルータのアドレス空間内であり、かつ、送信先アドレスに他の端末が接続されていた場合、アドレス空間衝突検出部106は、ICMP TIME EXCEEDED MESSAGEとは異なる応答を受信する。いま、対象ルータには1台の通信機器が接続されており、そのアドレスが192.168.2.4である場合を例に説明する。この場合、典型的な応答例としては、アドレス空間衝突検出部106は、送信先アドレス192.168.2.4にアドレス範囲推定パケットとしてICMPエコーメッセージを送信した場合、ICMPエコーリプライを応答として受信する。また、アドレス範囲推定パケットがルータのアドレス空間内であり、かつ、送信先アドレスに端末が接続されていない場合、アドレス空間衝突検出部106は、何の応答も受信しないか、ICMP Host Unreachableなどのメッセージを受信する。いずれの応答になるかは、対象ルータの実装によって変化する。いずれにしても、アドレス空間衝突検出部106は、アドレス範囲推定パケットの送信先アドレスがルータのアドレス空間内である場合、ICMP TIME EXCEEDE MESSAGEと異なる応答を受信しない。一方、アドレス範囲推定パケットの送信先アドレスが対象ルータのアドレス空間の範囲外であれば、アドレス空間衝突検出部106は、ICMP TIME EXCEEDED MESSAGEを受信する。ゆえに、ICMP TIME EXCEEDED MESSAGEだけに着目すれば、アドレス範囲推定パケットの送信先が対象ルータのアドレス空間の範囲内か、アドレス空間の範囲外かを容易に判定することができる。   As a result of transmitting the address range estimation packet, it is assumed that a response corresponding to the transmission destination address of the address range estimation packet is returned as shown in FIG. When the destination address of the address range estimation packet is within the address space of the target router and another terminal is connected to the destination address, the address space collision detection unit 106 has a response different from ICMP TIME EXCEEDED MESSAGE Receive. Now, a case where one communication device is connected to the target router and its address is 192.168.2.4 will be described as an example. In this case, as a typical response example, when the address space collision detection unit 106 transmits an ICMP echo message as an address range estimation packet to the transmission destination address 192.168.2.4, it receives an ICMP echo reply as a response. To do. If the address range estimation packet is within the address space of the router and the terminal is not connected to the destination address, the address space collision detection unit 106 does not receive any response, such as ICMP Host Unreachable. Receive a message. Which response is used depends on the implementation of the target router. In any case, the address space collision detection unit 106 does not receive a response different from ICMP TIME EXCEEDE MESSAGE when the transmission destination address of the address range estimation packet is within the address space of the router. On the other hand, if the destination address of the address range estimation packet is outside the address space range of the target router, the address space collision detection unit 106 receives ICMP TIME EXCEEDED MESSAGE. Therefore, if attention is paid only to ICMP TIME EXCEEDED MESSAGE, it is possible to easily determine whether the destination of the address range estimation packet is within the address space range of the target router or outside the address space range.

例えば、図12に示す例では、アドレス空間衝突検出部106は、192.168.2.128以降のアドレスに対して送信したアドレス範囲推定パケットの応答として、ICMP TIME EXCEEDED MESSAGEを受信している。このため、アドレス空間衝突検出部106は、対象ルータのアドレス空間が192,168.2.1〜192.168.2.126(192.168.2.127はブロードキャストアドレス)であると推測し、記憶している対象ルータのアドレス空間情報を更新する。   For example, in the example illustrated in FIG. 12, the address space collision detection unit 106 receives ICMP TIME EXCEEDED MESSAGE as a response to the address range estimation packet transmitted to addresses after 192.168.2.128. For this reason, the address space collision detection unit 106 estimates that the address space of the target router is 192,168.2.1 to 192.168.2.126 (192.168.2.127 is a broadcast address), The stored address space information of the target router is updated.

アドレス範囲推定パケットの送信先アドレスが対象ルータのアドレス空間の範囲外である場合に、ICMP TIME EXCEEDED MESSAGEが送信される原理について説明する。図1に示すルータC40を、アドレス空間推定処理の対象ルータとする。アドレス空間衝突検出部106がルータC40のアドレス空間の範囲外のアドレス宛てにアドレス範囲推定パケットを送信したとする。このとき、アドレス範囲推定パケットのTTL値は3となる。   The principle of sending ICMP TIME EXCEEDED MESSAGE when the transmission destination address of the address range estimation packet is outside the range of the address space of the target router will be described. The router C40 shown in FIG. 1 is a target router for the address space estimation process. Assume that the address space collision detection unit 106 transmits an address range estimation packet to an address outside the range of the address space of the router C40. At this time, the TTL value of the address range estimation packet is 3.

この場合、ルータC40の一段下位にあるルータB30のWAN側通信I/F302は、自身に設定されているアドレス空間(ルータC40のLAN側アドレスと一致している)に対して、アドレス範囲推定パケットの宛先アドレスがLAN側アドレス空間の範囲外となるため、別のネットワークへの通信と判断する。そして、ルータB30のWAN側通信I/F302は、デフォルトゲートウェイであるルータC40へアドレス範囲推定パケットを送信する。このとき、アドレス範囲推定パケットの送信先論理的アドレス(送信先のIPアドレス)は、変更されない。ルータC40は、受信したアドレス範囲推定パケットのルーティング処理を行うとともに、ルータC40のWAN側にある上位のネットワークに対して、アドレス範囲推定パケットの送信処理を開始しようとする。しかし、送信処理の開始の際に、アドレス範囲推定パケットのTTLの減算処理が実行されるため、TTL値は0となる。従って、ルータC40は、アドレス範囲推定パケットを廃棄した上で、送信元の第1の通信端末10に対して、ICMP TIME EXCEEDED MESSAGEを送信する。このとき、ICMP TIME EXCEEDED MESSAGEの送信元アドレスとして、ルータC40のLAN側アドレスが設定される。   In this case, the WAN-side communication I / F 302 of the router B30, which is one level lower than the router C40, has an address range estimation packet with respect to the address space set in itself (matches the LAN-side address of the router C40). Because the destination address is outside the range of the LAN address space, it is determined that the communication is to another network. Then, the WAN side communication I / F 302 of the router B30 transmits an address range estimation packet to the router C40 which is a default gateway. At this time, the transmission destination logical address (transmission destination IP address) of the address range estimation packet is not changed. The router C40 performs the routing process of the received address range estimation packet, and tries to start the transmission process of the address range estimation packet to the upper network on the WAN side of the router C40. However, since the TTL subtraction process of the address range estimation packet is executed at the start of the transmission process, the TTL value becomes zero. Therefore, after discarding the address range estimation packet, the router C40 transmits ICMP TIME EXCEEDED MESSAGE to the first communication terminal 10 that is the transmission source. At this time, the LAN side address of the router C40 is set as the source address of ICMP TIME EXCEEDED MESSAGE.

なお、図12に示す例では、アドレス空間衝突検出部106が192.168.2.2から順にアドレス範囲推定パケットを送信するものとして説明したが、送信先アドレスの送信順序は、これに限られない。一般に、ルータのアドレス空間の設定にはパターンがある。このため、特定のアドレスに対して優先的にアドレス範囲推定パケットを送信することによって、効率良くアドレス範囲を推定することもできる。例えば、アドレス空間衝突検出部106は、送信先を192.168.2.254としたアドレス範囲推定パケットを送信してもよい。このアドレス範囲推定パケットに対する応答として、ICMP TIME EXCEEDED MESSAGEを受信しなければ、アドレス空間衝突検出部106は、192.168.2.1〜192.168.2.254を対象ルータのアドレス空間として判定してもよい。また、アドレス空間衝突検出部106は、送信先を192.168.2.254としたアドレス範囲推定パケットに対してICMP TIME EXCEEDED MESSGEを受信した場合、次に、192.168.2.126及び192.168.2.129をそれぞれ送信先としたアドレス範囲推定パケットを送信してもよい。このとき、192.168.2.129を送信先としたアドレス範囲推定パケットに対するICMP TIME EXCEEDED MESSAGEを受信すれば、アドレス空間衝突検出部106は、対象ルータのアドレス空間が192.168.2.1〜192.168.2.126(192.168.2.127はブロードキャストアドレス)と推測できる。ここで、192.168.2.127及び192.168.2.128に対して、アドレス範囲推定パケットを送信しなかった理由は、以下の理由による。192.168.2.1〜192.168.2.126が対象ルータのアドレス空間として設定されている場合、192.168.2.127及び192.168.2.128は、ブロードキャスト等の特別なアドレスになる。これらの特別なアドレスは、ルータによって取り扱いが異なる可能性があるため、アドレス空間の推定には不向きである。   In the example illustrated in FIG. 12, the address space collision detection unit 106 has been described as transmitting address range estimation packets in order from 192.168.2.2. However, the transmission order of transmission destination addresses is limited to this. Absent. Generally, there is a pattern in setting the address space of the router. For this reason, it is possible to estimate the address range efficiently by preferentially transmitting the address range estimation packet to a specific address. For example, the address space collision detection unit 106 may transmit an address range estimation packet in which the transmission destination is 192.168.2.254. If ICMP TIME EXCEEDED MESSAGE is not received as a response to the address range estimation packet, the address space collision detection unit 106 determines 192.168.2.1 to 192.168.2.254 as the address space of the target router. May be. Further, when the address space collision detection unit 106 receives ICMP TIME EXCEEDED MESSGE for the address range estimation packet with the transmission destination set to 192.168.2.254, next, 192.168.2.126 and 192 .168.2.129 may be transmitted as an address range estimation packet. At this time, if ICMP TIME EXCEEDED MESSAGE for the address range estimation packet having 192.168.2.129 as the transmission destination is received, the address space collision detection unit 106 determines that the address space of the target router is 192.168.2.1. To 192.168.2.126 (192.168.2.127 is a broadcast address). Here, the reason why the address range estimation packet is not transmitted to 192.168.2.127 and 192.168.2.128 is as follows. When 192.168.2.1 to 192.168.2.126 is set as the address space of the target router, 192.168.2.127 and 192.168.2.128 are special types such as broadcast. Become an address. Since these special addresses may be handled differently depending on the router, they are not suitable for estimating the address space.

なお、アドレス空間推定処理において、アドレス空間衝突検出部106は、アドレス範囲推定パケットを1つずつ送信するものとして説明したが、TTLパケット送信処理と同様に、複数のアドレス範囲推定パケットを同時送信してもよい。この場合、アドレス範囲推定パケットの応答であるICMP TIME EXCEEDED MESSAGEの送信先アドレスは、ICMP TIME EXCEEDED MESSAGEのデータに格納されているIPヘッダを参照することによって確認することができる。   In the address space estimation process, the address space collision detection unit 106 has been described as transmitting address range estimation packets one by one. However, similar to the TTL packet transmission process, a plurality of address range estimation packets are transmitted simultaneously. May be. In this case, the destination address of ICMP TIME EXCEEDED MESSAGE, which is a response to the address range estimation packet, can be confirmed by referring to the IP header stored in the data of ICMP TIME EXCEEDED MESSAGE.

なお、第1の通信端末10が直接接続されているルータ(ルータA20)のLAN側アドレス空間に対して、上述のアドレス範囲推定パケットを用いたアドレス空間推定処理を行わず、第1の通信端末10に設定されているアドレス空間情報(ネットマスク情報)からアドレス空間を特定してもよい。例えば、第1の通信端末10に設定されているネットマスクが255.255.255.0で、第1の通信端末10のIPアドレスが192.168.0.10であった場合、ルータA20のアドレス空間は、192.168.0.1〜192.168.0.254であると判断できる。また、市販の家庭用ルータでは、ルータのLAN側アドレスは、クラスCのアドレス空間設定になっていることが非常に多いため、アドレス空間衝突検出部106は、上述のアドレス範囲推定パケットを用いたアドレス空間推定処理を行わず、ルータのLAN側アドレスを基にアドレス空間の一次推測だけを行い、アドレス衝突判定処理を実行してもよい。   The first communication terminal is not subjected to the address space estimation process using the address range estimation packet described above for the LAN side address space of the router (router A20) to which the first communication terminal 10 is directly connected. The address space may be specified from the address space information (net mask information) set to 10. For example, when the netmask set in the first communication terminal 10 is 255.255.255.0 and the IP address of the first communication terminal 10 is 192.168.0.10, the router A20 It can be determined that the address space is 192.168.0.1 to 192.168.0.254. In addition, in commercially available home routers, the router LAN address is very often set to a class C address space, so the address space collision detection unit 106 uses the address range estimation packet described above. Instead of performing the address space estimation process, only the address space primary estimation is performed based on the LAN address of the router, and the address collision determination process may be performed.

図13を用いて、アドレス衝突判定処理の詳細を説明する。アドレス空間衝突検出部106は、対象ルータのアドレス空間推定処理が終了すると、図13に示す処理を行う。アドレス空間衝突検出部106は、既に記憶している検出済みルータのアドレス空間と、新たに検出されたルータのアドレス空間とを比較して、アドレス空間の重なりがあるか否かを判断する(ステップS161)。アドレス空間の重なりがあるとは、既に検出されたルータのアドレス空間と、新たに検出されたルータのアドレス空間とに共通に含まれるアドレスが存在する状態のことをいう。アドレス空間に重なりがない場合、アドレス空間衝突検出部106は、アドレス空間衝突が検出されなかった旨を制御部101に通知して(ステップS162)、処理を終了する。アドレス空間に重なりがある場合、アドレス空間衝突検出部106は、衝突が発生しているルータの情報を制御部101に通知して(ステップS163)、処理を終了する。アドレス空間推定処理とアドレス衝突判定処理とを行うことによって、宅内ネットワーク1内に存在するルータのLAN側通信I/Fのアドレス空間の衝突を検出することができる。   Details of the address collision determination process will be described with reference to FIG. The address space collision detection unit 106 performs the process shown in FIG. 13 when the address space estimation process of the target router is completed. The address space collision detection unit 106 compares the address space of the already detected router that has been stored with the address space of the newly detected router, and determines whether there is an overlap of address spaces (step) S161). The address space overlap means a state in which addresses that are commonly included in the address space of the already detected router and the address space of the newly detected router exist. If there is no overlap in the address space, the address space collision detection unit 106 notifies the control unit 101 that no address space collision has been detected (step S162), and ends the process. If there is an overlap in the address space, the address space collision detection unit 106 notifies the control unit 101 of information on the router in which the collision has occurred (step S163), and ends the process. By performing the address space estimation process and the address collision determination process, it is possible to detect a collision in the address space of the LAN side communication I / F of the router existing in the home network 1.

なお、宅内ネットワーク1において、第1の通信端末10は、アドレス空間の衝突を検出した場合、アドレス空間の衝突を検出した旨をユーザに通知してもよい。この場合の、第1の通信端末10の構成を、図14に示す。図14に示す第1の通信端末10は、図2に示す構成に加えて、さらにユーザ通知部107を備える。ユーザ通知部107は、画像等を用いて、宅内ネットワーク1におけるアドレス空間の衝突をユーザに通知する。   Note that, in the home network 1, when the first communication terminal 10 detects an address space collision, the first communication terminal 10 may notify the user that an address space collision has been detected. The configuration of the first communication terminal 10 in this case is shown in FIG. The first communication terminal 10 shown in FIG. 14 further includes a user notification unit 107 in addition to the configuration shown in FIG. The user notification unit 107 notifies the user of an address space collision in the home network 1 using an image or the like.

アドレス空間の衝突の例を図15に示す。図15に示すように、宅内ネットワーク1において、ルータA20のアドレス空間と、ルータC40のアドレス空間とが衝突している場合を考える。この場合、ユーザ通知部107は、アドレス空間衝突検出部106が記憶したルータA20のアドレス空間の情報及びルータC40のアドレス空間の情報と、検出した各ルータの接続順序情報とを表示する。図16は、ユーザ通知部107が図15に示すアドレス空間の衝突をユーザに通知する内容の一例を示す図である。図16に示すように、ユーザ通知部107は、アドレス空間の衝突が発生しているルータ及びアドレス空間に対して、×印を表示することによって、アドレス空間の衝突の様子をユーザに通知する。   An example of address space collision is shown in FIG. As shown in FIG. 15, consider a case where the address space of the router A20 and the address space of the router C40 collide with each other in the home network 1. In this case, the user notification unit 107 displays the address space information of the router A20 and the information of the address space of the router C40 stored by the address space collision detection unit 106 and the detected connection order information of each router. FIG. 16 is a diagram illustrating an example of content that the user notification unit 107 notifies the user of a collision in the address space illustrated in FIG. 15. As shown in FIG. 16, the user notification unit 107 notifies the user of the address space collision state by displaying a cross mark for the router and address space where the address space collision occurs.

なお、アドレス空間の衝突が発生している場合、図16に示すように、ユーザ通知部107は、アドレス空間衝突検出部106が記憶する各ルータのLAN側アドレス空間情報を参照し、どのルータのLAN側アドレス空間情報とも衝突しないアドレス空間を特定した上で、アドレス空間を変更すべきルータと推奨する変更後のアドレス空間とをユーザに通知してもよい。   When an address space collision has occurred, as shown in FIG. 16, the user notification unit 107 refers to the LAN-side address space information of each router stored in the address space collision detection unit 106 and determines which router After specifying an address space that does not collide with the LAN side address space information, the user may be notified of the router to change the address space and the recommended changed address space.

アドレス空間の衝突の他の例を、図17に示す。図17に示す例では、宅内ネットワーク1において、ルータB30のアドレス空間と、ルータC40のアドレス空間とが衝突している。図18は、ユーザ通知部107が、ユーザ通知部107が図17に示すアドレス空間の衝突をユーザに通知する内容の一例を示す図である。図18に示すように、ユーザ通知部107は、図16と同様の表示方法を用いて表示している。   Another example of address space collision is shown in FIG. In the example shown in FIG. 17, in the home network 1, the address space of the router B30 and the address space of the router C40 collide. FIG. 18 is a diagram illustrating an example of content that the user notification unit 107 notifies the user of the collision of the address space illustrated in FIG. 17 by the user notification unit 107. As shown in FIG. 18, the user notification unit 107 displays using the same display method as in FIG. 16.

また、第1の通信端末10は、宅内ネットワーク1におけるアドレス空間の衝突を検出した場合、衝突が発生しているルータのアドレス空間の設定を自動的に変更してもよい。図19は、ルータのアドレス空間の設定を変更する第1の通信端末10の構成を示す図である。図19に示す第1の通信端末10は、図2に示す構成に対して、さらにアドレス空間設定修正部108を備えた構成である。アドレス空間設定修正部108は、各ルータの接続順序情報と、各ルータのアドレス空間の設定情報とを用いて、アドレス空間の衝突が発生しているルータにアクセスして、各ルータのアドレス空間の設定を変更する。ルータは、一般にWebベースでのユーザインターフェースを持っている。このため、アドレス空間設定修正部108は、各ルータに対して適切なhttpメッセージを送信することによって、アドレス空間の設定を変更することが可能である。   Further, when the first communication terminal 10 detects an address space collision in the home network 1, the first communication terminal 10 may automatically change the address space setting of the router in which the collision occurs. FIG. 19 is a diagram illustrating the configuration of the first communication terminal 10 that changes the setting of the address space of the router. The first communication terminal 10 shown in FIG. 19 has a configuration further including an address space setting correction unit 108 in addition to the configuration shown in FIG. The address space setting correction unit 108 uses the connection order information of each router and the setting information of the address space of each router to access the router in which the address space conflict has occurred, and Change the setting. The router generally has a web-based user interface. For this reason, the address space setting correction unit 108 can change the setting of the address space by transmitting an appropriate http message to each router.

図15に示す例を用いて、アドレス空間設定修正部108の動作を説明する。図16に示すように、ルータA20及びルータC40のそれぞれのアドレス空間が衝突している場合、アドレス空間設定修正部108は、ルータC40の下位のネットワークに位置するルータA20のアドレス空間を変更する。具体的には、図15において、アドレス空間設定修正部108は、ルータA20のアドレス空間を192.168.2.1〜192.168.2.254に変更する。また、アドレス空間設定修正部108は、DHCPを用いて第1の通信端末10のアドレスの再取得を実行する。また、図17に示す例の場合、アドレス空間設定修正部108は、ルータC40の下位に位置するルータB30にアクセスしてルータB30のアドレス空間の設定を変更する。続いて、アドレス空間設定修正部108は、ルータB30の下位のネットワークに位置するルータA20のWAN側通信I/F201のIPアドレスを再取得させる。図15及び図17に示すの例のように、第1の通信端末10は、アドレス空間の衝突が発生した場合、自身に近いルータ(インターネット2から遠い側のルータ)にアクセスして、ルータのアドレス空間の設定を変更する。これは、アドレス空間の衝突が発生している場合、衝突しているアドレス空間へのパケット送信において、ルータのルーティング機能や第1の通信端末10自身の通信機能が有効に機能しない状況が発生し、自身から遠い側にある(インターネット2に近い側)のルータにアクセスできない場合が発生するためである。   The operation of the address space setting correction unit 108 will be described using the example shown in FIG. As shown in FIG. 16, when the address spaces of the router A20 and the router C40 collide with each other, the address space setting correction unit 108 changes the address space of the router A20 located in the lower network of the router C40. Specifically, in FIG. 15, the address space setting correction unit 108 changes the address space of the router A20 from 192.168.2.1 to 192.168.2.254. In addition, the address space setting correction unit 108 performs reacquisition of the address of the first communication terminal 10 using DHCP. In the case of the example illustrated in FIG. 17, the address space setting correction unit 108 accesses the router B30 located below the router C40 and changes the address space setting of the router B30. Subsequently, the address space setting correction unit 108 reacquires the IP address of the WAN side communication I / F 201 of the router A20 located in the lower network of the router B30. 15 and 17, when the address space collision occurs, the first communication terminal 10 accesses a router close to itself (router far from the Internet 2) and Change address space settings. This is because when the address space collision occurs, the router routing function or the communication function of the first communication terminal 10 itself does not function effectively in packet transmission to the conflicting address space. This is because there may occur a case where the router on the side far from itself (the side close to the Internet 2) cannot be accessed.

このように、第1の実施形態に係るアドレス空間衝突検出装置は、TTLを変化させたTTLパケットを送信し、TTLパケットに対応するTTL応答パケットを受信することによって、宅内ネットワーク内のルータを検出する。そして、第1の実施形態に係るアドレス空間衝突検出装置は、検出したルータのLAN側アドレスを基に、そのルータのアドレス空間を一次推測する。そして、ICMP TIME EXCEEDED MESSAGEを用いてアドレス空間推定処理を行い、ルータのアドレス空間を推定する。これにより、アドレス空間衝突検出装置は、1つ以上のルータが接続された宅内ネットワーク内の各ルータのアドレス空間の衝突を判定することが可能になる。なお、プロバイダがローカルアドレスを割り当てるような場合、宅内ネットワーク1には1台のルータしかなくとも、宅内ネットワーク1のルータのアドレス空間と、プロバイダが割り当てるアドレス空間(ルータのWAN側アドレス空間)が衝突する場合が発生する。第1の実施形態に係るアドレス空間衝突検出装置は、このような場合でも、ルータでアドレス空間の衝突が発生していることを検出することが可能である。   As described above, the address space collision detection apparatus according to the first embodiment detects a router in a home network by transmitting a TTL packet with a changed TTL and receiving a TTL response packet corresponding to the TTL packet. To do. Then, the address space collision detection apparatus according to the first embodiment primarily estimates the address space of the router based on the detected LAN address of the router. Then, address space estimation processing is performed using ICMP TIME EXCEEDED MESSAGE to estimate the address space of the router. As a result, the address space collision detection device can determine a collision in the address space of each router in the home network to which one or more routers are connected. When a provider assigns a local address, even though the home network 1 has only one router, the address space of the router of the home network 1 and the address space assigned by the provider (router WAN address space) collide. If you happen to occur. Even in such a case, the address space collision detection apparatus according to the first embodiment can detect the occurrence of an address space collision in the router.

なお、アドレス空間設定修正部108は、httpメッセージを用いてルータのLAN側アドレス空間の設定を変更するとして説明したが、他の手段を用いてもよい。例えば、UPnP(Universal Plug and Play)や、SNMP(Simple Network Management Protocol)などのプロトコルを用いることが考えられる。また、アドレス空間衝突の発生及び各ルータのアドレス空間の設定変更処理に関するユーザへの通知は、宅内ネットワーク1内の全ルータの検出が終了してから行ってもよい。   Although the address space setting correction unit 108 has been described as changing the setting of the LAN address space of the router using an http message, other means may be used. For example, it is conceivable to use a protocol such as UPnP (Universal Plug and Play) or SNMP (Simple Network Management Protocol). Further, the notification to the user regarding the occurrence of the address space collision and the address space setting change process of each router may be performed after the detection of all the routers in the home network 1 is completed.

また、第1の実施形態では、第1の通信端末10がアドレス空間衝突検出機能を備えるものとして説明した。しかし、宅内ネットワーク1の各ルータがアドレス空間衝突検出機能を備えてもよい。例えば、ルータA20がアドレス空間衝突検出機能を備えている場合を、図19を用いて説明する。ルータA20は、自身のアドレス空間を既に取得している。上記に説明した方法と同様の手順を用いて、ルータA20のアドレス空間とルータC40のアドレス空間との衝突を検出する。そして、アドレス空間設定修正部108が、自身(ルータA20)のLAN側アドレス空間の設定を変更する。また、図16に示す例の場合、ルータA20は、ルータB30にアクセスして、ルータB30のLAN側アドレス空間の設定を変更する。そして、ルータA20は、自身のWAN側通信I/F201のIPアドレスの再取得を行う。このように、各ルータがアドレス空間衝突検出機能を備える場合、各ルータは、自身とインターネット2との間に存在するルータを検出する。アドレス空間衝突検出機能を備えるルータは、検出したルータのアドレス空間及び自身のアドレス空間の衝突を検出すればよい。   In the first embodiment, the first communication terminal 10 has been described as having an address space collision detection function. However, each router in the home network 1 may have an address space collision detection function. For example, a case where the router A20 has an address space collision detection function will be described with reference to FIG. Router A20 has already acquired its own address space. A collision between the address space of the router A20 and the address space of the router C40 is detected using a procedure similar to the method described above. Then, the address space setting correction unit 108 changes the setting of the LAN side address space of itself (router A20). In the example shown in FIG. 16, the router A20 accesses the router B30 and changes the setting of the LAN side address space of the router B30. Then, the router A20 reacquires the IP address of its own WAN-side communication I / F 201. Thus, when each router has an address space collision detection function, each router detects a router existing between itself and the Internet 2. A router having an address space collision detection function may detect a collision between the detected address space of the router and its own address space.

また、第1の実施形態において、各ルータのLAN側アドレスとして、グローバルアドレスを取得した際に、第1の通信端末10は、ルータディスカバリ用パケットの作成を中止するものとして説明した。しかし、ルータディスカバリ用パケットのTTLに上限値を設けてもよい。この場合、TTLが上限値に達すると、第1の通信端末10は、ルータディスカバリ用パケットの作成を中止する。   Further, in the first embodiment, it has been described that the first communication terminal 10 stops creating the router discovery packet when the global address is acquired as the LAN side address of each router. However, an upper limit value may be provided for the TTL of the router discovery packet. In this case, when the TTL reaches the upper limit value, the first communication terminal 10 stops creating the router discovery packet.

また、第1の実施形態において、ルータが3台接続された宅内ネットワーク1を例にして説明を行った。しかし、ルータの接続台数はこれに限られない。第1の実施形態に係るアドレス空間衝突検出装置は、ルータが1台からN台(Nは2以上の自然数)で構成される宅内ネットワークや企業内ネットワークに対して適用することが可能である。   In the first embodiment, the explanation has been given by taking the home network 1 to which three routers are connected as an example. However, the number of connected routers is not limited to this. The address space collision detection apparatus according to the first embodiment can be applied to a home network or a corporate network where one to N routers (N is a natural number of 2 or more).

また、第1実施形態において、第1の通信端末10とインターネット2との間に存在するルータが1つである場合、第1の通信端末10は、検出したルータのLAN側アドレス空間と、インターネット2のアドレス空間(図1のルータDのLAN側アドレス空間)とが衝突しているか否かを判定してもよい。   In the first embodiment, when there is one router between the first communication terminal 10 and the Internet 2, the first communication terminal 10 determines that the detected router LAN address space and the Internet It may be determined whether or not there is a collision with the address space of 2 (LAN side address space of the router D in FIG. 1).

また、第1の実施形態において、アドレス空間衝突検出部106が、アドレス範囲推定パケットを送信して、その応答を用いることによって、アドレス空間推定処理を行うとして説明した。しかし、アドレス空間衝突検出部106は、httpを用いて対象ルータにアクセスすることによって、ルータのアドレス空間の情報を取得してもよい。また、アドレス空間衝突検出部106は、UPnPまたはSNMPを用いて、対象ルータのLAN側アドレス空間の情報を取得してもよい。さらに、アドレス空間衝突検出部106は、対象ルータに対して、ICMP ADDRESS MASK MESSAGEを送信して、対象ルータのLAN側アドレス空間の情報を取得してもよい。   In the first embodiment, it has been described that the address space collision detection unit 106 performs an address space estimation process by transmitting an address range estimation packet and using the response. However, the address space collision detection unit 106 may acquire information on the address space of the router by accessing the target router using http. Further, the address space collision detection unit 106 may acquire information on the LAN side address space of the target router using UPnP or SNMP. Further, the address space collision detection unit 106 may acquire information on the LAN side address space of the target router by transmitting ICMP ADDRESS MASK MESSAGE to the target router.

さらに、第1の実施形態において、ルータディスカバリ用パケット作成部102は、TTLと宛先ポート番号とを変化させたルータディスカバリ用パケットを作成するとして説明した。しかし、ルータディスカバリ用パケットにおいて、TTLと宛先IPアドレス、またはTTLと送信元ポート番号とを変化させても、上記と同様の処理が可能である。また、ルータディスカバリ用パケットを、図10に示すようなICMPエコー要求として作成してもよい。この場合であっても、TTLを変化させることによって、TTL応答パケットであるICMP TIME EXCEEDED MESSAGEを得ることが可能である。また、ICMPエコー要求をTTLパケットして用いる場合、TTLに代えてシーケンス番号や宛先IPアドレス、識別子などを変化させることによって、UDPを用いたTTLパケットと同じ制御が可能となる。図20に、TTLとシーケンス番号とを対応させた場合の一例を示す。図20に示すシーケンス番号の値は、一例であり、この値に限られない。シーケンス番号から、TTL値が一意に特定できればよい。   Furthermore, in the first embodiment, the router discovery packet creation unit 102 has been described as creating a router discovery packet in which the TTL and the destination port number are changed. However, even if the TTL and the destination IP address or the TTL and the source port number are changed in the router discovery packet, the same processing as described above is possible. Alternatively, the router discovery packet may be created as an ICMP echo request as shown in FIG. Even in this case, it is possible to obtain ICMP TIME EXCEEDED MESSAGE which is a TTL response packet by changing the TTL. When the ICMP echo request is used as a TTL packet, the same control as a TTL packet using UDP can be performed by changing a sequence number, a destination IP address, an identifier, and the like instead of the TTL. FIG. 20 shows an example in which TTL is associated with a sequence number. The value of the sequence number shown in FIG. 20 is an example, and is not limited to this value. It is only necessary that the TTL value can be uniquely specified from the sequence number.

(第2の実施形態)
第1の実施形態では、TTLを変化させたTTLパケットと、ICMP TIME EXCEEDED MESSAGEとを利用したTTL応答パケットとを用いて、宅内ネットワーク1に存在するルータの検出を行った。しかし、TTL処理を行わないルータや、ICMPパケットをフィルタリングするルータ等が市販されている。このため、第1の実施形態で説明したアドレス空間衝突検出装置が適用できないルータが存在する。第2の実施形態では、この問題を解決するためのアドレス空間衝突検出装置を説明する。
(Second Embodiment)
In the first embodiment, a router existing in the home network 1 is detected using a TTL packet in which the TTL is changed and a TTL response packet using ICMP TIME EXCEEDED MESSAGE. However, routers that do not perform TTL processing, routers that filter ICMP packets, and the like are commercially available. For this reason, there is a router to which the address space collision detection device described in the first embodiment is not applicable. In the second embodiment, an address space collision detection apparatus for solving this problem will be described.

図21は、本発明の第2の実施形態に係るアドレス空間衝突検出装置が用いられるネットワークの一例を示す図である。図21において、宅内ネットワーク1は、第1の第1の通信端末10に代えて、第2の通信端末11を備える点が異なる。第2の通信端末11は、第2の実施形態に係るアドレス空間衝突検出装置である。第2の通信端末11は、ルータA20、ルータB30、及びルータC40のLAN側アドレスの他に、それぞれのWAN側アドレスを取得する点が、第1の通信端末10と異なる。   FIG. 21 is a diagram illustrating an example of a network in which the address space collision detection apparatus according to the second embodiment of the present invention is used. In FIG. 21, the home network 1 is different in that it includes a second communication terminal 11 instead of the first first communication terminal 10. The second communication terminal 11 is an address space collision detection device according to the second embodiment. The second communication terminal 11 is different from the first communication terminal 10 in that the second communication terminal 11 acquires the respective WAN side addresses in addition to the LAN side addresses of the router A20, the router B30, and the router C40.

第2の通信端末11の動作の概要を説明する。第1の実施形態において、第1の通信端末10は、TTL値を変化させたTTL応答パケットを用いて、宅内ネットワーク1の各ルータのLAN側アドレスを取得し、LAN側アドレスを用いて各ルータのアドレス空間の衝突の検出を行った。しかし、第2の通信端末11は、UPnP IGD(Internet Gateway Device)仕様などを用いて、自身が接続されているルータのLAN側アドレスを取得後、さらにWAN側アドレスを取得する。そして、第2の通信端末11は、上位のルータのLAN側アドレスを取得しながら、上位のルータのアドレス空間の衝突の検出を行う。図21に示す例の場合、第2の通信端末11が取得するアドレスの順序は、A→B→C→D→E→Fのようになる。なお、UPnP IGDの詳細な仕様については、非特許文献1及び非特許文献2に詳しく記載されている。   An outline of the operation of the second communication terminal 11 will be described. In the first embodiment, the first communication terminal 10 acquires the LAN side address of each router of the home network 1 using the TTL response packet in which the TTL value is changed, and uses the LAN side address for each router. The address space collision was detected. However, the second communication terminal 11 uses the UPnP IGD (Internet Gateway Device) specification or the like to obtain the LAN address of the router to which the second communication terminal 11 is connected, and then obtains the WAN address. Then, the second communication terminal 11 detects a collision in the address space of the upper router while acquiring the LAN address of the upper router. In the case of the example shown in FIG. 21, the order of addresses acquired by the second communication terminal 11 is A → B → C → D → E → F. Detailed specifications of UPnP IGD are described in detail in Non-Patent Document 1 and Non-Patent Document 2.

図22は、第2の通信端末11の構成を示すブロック図である。第2の通信端末11は、制御部101と、ルータディスカバリ用パケット作成部112と、受信パケット解析部103と、パケット送受信部104と、通信部105と、アドレス空間衝突検出部116と、WAN側アドレス取得部111とを備える。第2の通信端末11は、WAN側アドレス取得部111と、ルータディスカバリ用パケット作成部102に代えてルータディスカバリ用パケット作成部112と、アドレス空間衝突検出部106に代えてアドレス空間衝突検出部116とをさらに備える点が、図2に示す第1の通信端末10と異なる。なお、第1の通信端末10と同一の構成に対しては、同じ参照番号を付し、その説明を省略する。WAN側アドレス取得部111は、UPnP IGD使用を用いて、ルータのWAN側アドレスを取得する。ルータディスカバリ用パケット作成部112は、UPnPのディスカバリメッセージである“M−Search”を用いたルータディスカバリ用パケット(以下、推定ルータパケットという)を作成して、マルチキャストまたはユニキャストで送信する。ここで、推定ルータパケットをマルチキャストするのは、第2の通信端末11自身が接続されているルータ(図21の場合、ルータA20)を発見する場合のみである。   FIG. 22 is a block diagram illustrating a configuration of the second communication terminal 11. The second communication terminal 11 includes a control unit 101, a router discovery packet creation unit 112, a received packet analysis unit 103, a packet transmission / reception unit 104, a communication unit 105, an address space collision detection unit 116, and a WAN side. And an address acquisition unit 111. The second communication terminal 11 includes a WAN address acquisition unit 111, a router discovery packet creation unit 112 instead of the router discovery packet creation unit 102, and an address space collision detection unit 116 instead of the address space collision detection unit 106. Is different from the first communication terminal 10 shown in FIG. In addition, the same reference number is attached | subjected to the structure same as the 1st communication terminal 10, and the description is abbreviate | omitted. The WAN address acquisition unit 111 acquires the router WAN address using UPnP IGD. The router discovery packet creation unit 112 creates a router discovery packet (hereinafter referred to as an estimated router packet) using “M-Search”, which is a UPnP discovery message, and transmits the packet by multicast or unicast. Here, the estimated router packet is multicast only when the router to which the second communication terminal 11 itself is connected (router A20 in the case of FIG. 21) is discovered.

図23を用いて、第2の通信端末11が行うアドレス空間の衝突検出処理を説明する。図23は、第2の通信端末11が行うアドレス空間の衝突検出処理を示すフローチャートである。図23に示す処理は、制御部101がルータディスカバリ用パケット作成部112に、自身が接続されているルータを検出する指示を行うことによって開始される。ルータディスカバリ用パケット作成部112は、自身が接続されたルータ(図21の場合、ルータA20)に対して推定ルータパケットをマルチキャスト送信する(ステップS201)。受信パケット解析部103は、送信した推定ルータパケットに対する応答パケット(以下、推定ルータ応答パケットという)を、通信部105及びパケット送受信部104を通じて受信したか否かを判断する(ステップS202)。図24に、推定ルータパケットのデータ部の一例を示す。また、図25に推定ルータ応答パケットのデータ部の一例を示す。なお、図24及び図25の詳細については、後述する。   The address space collision detection process performed by the second communication terminal 11 will be described with reference to FIG. FIG. 23 is a flowchart showing address space collision detection processing performed by the second communication terminal 11. The process illustrated in FIG. 23 is started when the control unit 101 instructs the router discovery packet creation unit 112 to detect a router to which the control unit 101 is connected. The router discovery packet creation unit 112 multicast-transmits the estimated router packet to the router to which it is connected (in the case of FIG. 21, router A20) (step S201). The received packet analysis unit 103 determines whether a response packet to the transmitted estimated router packet (hereinafter referred to as an estimated router response packet) has been received through the communication unit 105 and the packet transmitting / receiving unit 104 (step S202). FIG. 24 shows an example of the data portion of the estimated router packet. FIG. 25 shows an example of the data portion of the estimated router response packet. Details of FIGS. 24 and 25 will be described later.

受信パケット解析部103は、推定ルータ応答パケットを受信した場合、推定ルータ応答パケットを解析して、送信元ルータのLAN側アドレスを取得する(ステップS203)。なお、第2の通信端末11は、UPnPを使用しているため、推定ルータ応答パケットに含まれる情報から、デバイスディスクリプション及びサービスディスクリプションを取得する。これらの情報は、アクション送信のための情報として用いられる。受信パケット解析部103は、制御部101を通じてルータディスカバリ用パケット作成部112に、推定ルータパケットの送信処理中止を指示する(ステップS204)。受信パケット解析部103は、制御部101を通じてWAN側アドレス取得部111に、推定ルータ応答パケットの送信元ルータのWAN側アドレスの取得を指示する。WAN側アドレス取得部111は、推定ルータ応答パケットの送信元のルータのWAN側アドレスを取得する(ステップS205)。   When receiving the estimated router response packet, the received packet analysis unit 103 analyzes the estimated router response packet and obtains the LAN address of the transmission source router (step S203). Since the second communication terminal 11 uses UPnP, the second communication terminal 11 acquires a device description and a service description from information included in the estimated router response packet. These pieces of information are used as information for action transmission. The received packet analysis unit 103 instructs the router discovery packet creation unit 112 through the control unit 101 to stop the transmission process of the estimated router packet (step S204). The received packet analysis unit 103 instructs the WAN address acquisition unit 111 through the control unit 101 to acquire the WAN address of the transmission source router of the estimated router response packet. The WAN address acquisition unit 111 acquires the WAN address of the router that is the source of the estimated router response packet (step S205).

ルータのWAN側アドレスを、UPnP IGD仕様を用いて取得する手順を説明する。推定ルータ応答パケットの送信元ルータのLAN側アドレスに対して、第2の通信端末11は、GetExternalIPAddressアクションを送信する。図26は、GetExternalIPAddressアクションの一例を示す図である。GetExternalIPAddressアクションを受信したルータは、応答を第2の通信端末11に返信することよって、第2の通信端末11は、ルータのWAN側アドレスを取得する。図27は、GetExternalIPAddressアクションに対する応答の一例を示す図である。本応答において、ルータのLAN側アドレスは、<NewExternalIPAddress>タグで囲まれた部分にセットされる。そのため、第2の通信端末11は、<NewExternalIPAddress>タグの値を取り出すことで、ルータのWAN側アドレスを取得することができる。なお、ルータは、通常、Webベースでのユーザインターフェースが実装されている。このため、第2の通信端末11は、Webベースのユーザインターフェースを用いて、推定ルータ応答パケットの送信元ルータのWAN側アドレスを取得してもよい。具体的には、httpメッセージを推定ルータ応答パケットの送信元ルータに送信して、その応答を受信することによって、推定ルータ応答パケットの送信元ルータのWAN側アドレスを取得できる。   A procedure for acquiring the WAN address of the router using the UPnP IGD specification will be described. The second communication terminal 11 transmits a GetExternalIPAddress action to the LAN address of the transmission source router of the estimated router response packet. FIG. 26 is a diagram illustrating an example of the GetExternalIPAddress action. The router that has received the GetExternalIPAddress action returns a response to the second communication terminal 11 so that the second communication terminal 11 obtains the WAN address of the router. FIG. 27 is a diagram illustrating an example of a response to the GetExternalIPAddress action. In this response, the LAN side address of the router is set in a portion surrounded by <NewExternalIPAddress> tags. Therefore, the second communication terminal 11 can acquire the WAN address of the router by extracting the value of the <NewExternalIPAddress> tag. Note that a router usually has a web-based user interface. For this reason, the second communication terminal 11 may acquire the WAN address of the transmission source router of the estimated router response packet using a Web-based user interface. Specifically, the WAN address of the source router of the estimated router response packet can be acquired by transmitting an http message to the source router of the estimated router response packet and receiving the response.

受信パケット解析部103は、推定ルータ応答パケットの送信元ルータのWAN側アドレスが、ローカルアドレスであるか否かを確認する(ステップS206)。受信パケット解析部103は、取得したWAN側アドレスがグローバルアドレスである場合、推定ルータ応答パケットの送信元ルータの上位ルータがインターネット2上のルータであると特定する。すなわち、受信パケット解析部103は、宅内ネットワーク1の全てのルータの検出が完了したと推測して、処理を終了する。一方、受信パケット解析部103は、取得したWAN側アドレスがローカルアドレスである場合、推定ルータ応答パケットの送信元ルータの上位に、宅内ネットワーク1に属するルータが存在すると判断する。そして、受信パケット解析部103は、制御部101を通じて、ルータディスカバリ用パケット作成部112に、ルータのWAN側アドレス情報を引き渡し、推定ルータパケットの送信処理を指示する(ステップS207)。推定ルータパケットの送信処理については、後述する。   The received packet analysis unit 103 checks whether or not the WAN address of the source router of the estimated router response packet is a local address (step S206). When the acquired WAN address is a global address, the received packet analysis unit 103 specifies that the upper router of the estimated router response packet source router is a router on the Internet 2. That is, the received packet analysis unit 103 estimates that all the routers in the home network 1 have been detected, and ends the process. On the other hand, when the acquired WAN address is a local address, the received packet analysis unit 103 determines that a router belonging to the home network 1 exists above the source router of the estimated router response packet. Then, the received packet analysis unit 103 passes the router WAN address information to the router discovery packet creation unit 112 through the control unit 101, and instructs the transmission processing of the estimated router packet (step S207). The estimated router packet transmission process will be described later.

そして、受信パケット解析部103は、制御部101を通じて、推定ルータ応答パケットの送信元ルータの情報(LAN側アドレスやWAN側アドレスなど)をアドレス空間衝突検出部116に引き渡す。アドレス空間衝突検出部116は、アドレス空間推定処理を実行する(ステップS208)。   Then, the received packet analysis unit 103 passes the information of the transmission source router of the estimated router response packet (LAN side address, WAN side address, etc.) to the address space collision detection unit 116 through the control unit 101. The address space collision detection unit 116 performs an address space estimation process (step S208).

ここで、アドレス空間衝突検出部116は、第1の実施形態のアドレス空間衝突検出部106と異なり、通知されたWAN側アドレスを基に、上位ルータのアドレス空間を推測する。例えば、図21において、第2の通信端末11は、ルータB30のWAN側アドレスを取得すると、アドレス空間推定処理(ステップS207)が起動される。具体的には、アドレス空間衝突検出部116は、ルータB30のWAN側アドレスを用いて、ルータC40のアドレス空間を一次推測し、推定したアドレス空間情報を記憶する。そして、アドレス空間衝突検出部116は、第1の実施形態と同様のアドレス範囲推定パケットを用いたアドレス空間推定を実行し、アドレス空間情報を更新する。第1の実施形態との違いは、アドレス空間に必ず含まれるアドレスが、推定対象のルータのLAN側アドレス(ルータC40のLAN側アドレス)ではなく、下位ルータのWAN側アドレス(ルータB30のWAN側アドレス)である点のみである。   Here, unlike the address space collision detection unit 106 of the first embodiment, the address space collision detection unit 116 estimates the address space of the upper router based on the notified WAN address. For example, in FIG. 21, when the second communication terminal 11 acquires the WAN address of the router B30, the address space estimation process (step S207) is started. Specifically, the address space collision detection unit 116 primarily estimates the address space of the router C40 using the WAN address of the router B30, and stores the estimated address space information. Then, the address space collision detection unit 116 performs address space estimation using the same address range estimation packet as in the first embodiment, and updates the address space information. The difference from the first embodiment is that the address always included in the address space is not the LAN address of the router to be estimated (the LAN address of the router C40), but the WAN address of the lower router (the WAN side of the router B30) Address).

第2の通信端末11が直接接続されたルータ(ルータA20)のWAN側アドレスを取得した場合、アドレス空間衝突検出部116は、ルータA20のWAN側アドレスを用いて、上述のようにルータB30のアドレス空間を推定し、記憶する。それに加えて、第2の通信端末11自身のIPアドレスとネットマスク情報とを用いて、ルータA20のLAN側アドレス情報を推測し、記憶する。   When the WAN address of the router (router A20) to which the second communication terminal 11 is directly connected is acquired, the address space collision detection unit 116 uses the WAN address of the router A20 as described above. Estimate and store the address space. In addition, the LAN address information of the router A 20 is estimated and stored using the IP address and netmask information of the second communication terminal 11 itself.

ステップS208を実行後、アドレス空間衝突検出部116アドレス衝突判定処理を実行し(ステップS209)。アドレス空間衝突検出部116は、各ルータのアドレス空間に重なりがあることを検出した場合、制御部101にその旨を通知する。アドレス衝突判定処理の詳細は、第1の実施形態と同様のため、説明を省略する。次に、制御部101は、アドレス衝突判定処理の結果、ルータのアドレス空間の衝突が検出されたか否かをチェックする(ステップS210)。ルータのアドレス空間の衝突が検出された場合、第2の通信端末11は、図23に示す処理を終了する。ルータのアドレス空間の衝突が検出されていない場合、制御部101は、推定ルータパケット送信処理を起動し、推定ルータ応答パケットを受信するため、ステップS202に戻る。   After executing step S208, the address space collision detection unit 116 performs address collision determination processing (step S209). When the address space collision detection unit 116 detects that there is an overlap in the address space of each router, the address space collision detection unit 116 notifies the control unit 101 accordingly. The details of the address collision determination process are the same as those in the first embodiment, and a description thereof will be omitted. Next, the control unit 101 checks whether or not a router address space collision has been detected as a result of the address collision determination process (step S210). When a router address space collision is detected, the second communication terminal 11 ends the process shown in FIG. If no collision in the router address space is detected, the control unit 101 activates the estimated router packet transmission process and returns to step S202 to receive the estimated router response packet.

図23に示すフローチャートを用いることによって、第2の通信端末11は、自身に接続されているルータから上位のルータの存在を確認することができるため、宅内ネットワーク1のルータの接続順序情報を記憶することができる。また、アドレス空間衝突検出部116は、各ルータのLAN側アドレス空間情報を記憶している。このため、第2の通信端末11は、第1の実施形態で説明したアドレス衝突判定処理を実行できる。なお、上記では、アドレス空間推定処理において、アドレス範囲推定パケットを用いたアドレス空間推定処理を実行するとして説明した。しかし、第1の実施形態と同様に、アドレス空間衝突検出部116は、アドレス範囲推定パケットを用いたアドレス空間推定処理を実行せず、一次推測したアドレス空間情報を用いて、アドレス空間衝突判定処理を行ってもよい。   By using the flowchart shown in FIG. 23, the second communication terminal 11 can confirm the existence of a higher-order router from the router connected to itself, and therefore stores connection order information of routers in the home network 1. can do. Further, the address space collision detection unit 116 stores the LAN side address space information of each router. For this reason, the second communication terminal 11 can execute the address collision determination process described in the first embodiment. In the above description, it has been described that the address space estimation process using the address range estimation packet is executed in the address space estimation process. However, as in the first embodiment, the address space collision detection unit 116 does not execute the address space estimation process using the address range estimation packet, and uses the address space information that is primarily estimated to perform the address space collision determination process. May be performed.

次に、アドレス空間衝突検出部116が、通知されたWAN側アドレスを基に上位ルータのLAN側アドレス空間を推測する理由について説明する。第2の通信端末11は、第2の通信端末11自身が直接接続されているルータ(ルータA20)を除き、ルータのLAN側アドレスと考えられるアドレスに推定ルータパケットを送信し、推定ルータ応答パケットを受信することによって、ルータのLAN側アドレスを取得する。しかし、LAN側アドレスを取得しようとしているルータのアドレス空間が他のルータのアドレス空間と衝突している場合、第2の通信端末11自身の通信機能またはルータのルーティング機能が有効に動作しない。このため、第2の通信端末11が正しいLAN側アドレスで推定ルータパケットを送信しても、正しい応答を得ることができない場合が発生する。ゆえに、第1の実施形態のアドレス空間衝突検出部106のように、ルータのLAN側アドレスを基にアドレス空間を推測し、アドレス空間衝突の判定処理を行った場合、第2の通信端末11は、アドレス空間衝突判定処理を実施できず、アドレス空間の衝突を検出できないおそれがある。一方、アドレス空間衝突検出部116は、WAN側アドレスを基に上位ルータのLAN側アドレス空間を推測して、アドレス空間衝突の判定処理を行う。これにより、アドレス空間衝突の判定処理の対象となるルータのLAN側アドレスを取得する前に、アドレス空間衝突の判定処理を行うことができるため、上述のような問題を避けることが可能となる。   Next, the reason why the address space collision detection unit 116 estimates the LAN side address space of the upper router based on the notified WAN side address will be described. The second communication terminal 11 transmits an estimated router packet to an address considered to be the LAN side address of the router, except for a router (router A20) to which the second communication terminal 11 is directly connected, and an estimated router response packet Is received, the LAN side address of the router is acquired. However, when the address space of the router trying to acquire the LAN side address collides with the address space of another router, the communication function of the second communication terminal 11 itself or the routing function of the router does not operate effectively. For this reason, even if the second communication terminal 11 transmits the estimated router packet with the correct LAN side address, a case where a correct response cannot be obtained may occur. Therefore, as in the address space collision detection unit 106 of the first embodiment, when the address space is estimated based on the LAN address of the router and the address space collision determination process is performed, the second communication terminal 11 The address space collision determination process cannot be performed, and there is a possibility that the address space collision cannot be detected. On the other hand, the address space collision detection unit 116 estimates the LAN side address space of the upper router based on the WAN side address and performs address space collision determination processing. Accordingly, since the address space collision determination process can be performed before the LAN address of the router that is the target of the address space collision determination process is acquired, the above-described problem can be avoided.

図28を用いて、ステップS210で起動される推定ルータパケット送信処理について説明する。図28は、第2の通信端末11に直接接続されていない上位ルータ(例えば、ルータB30またはルータC40)を検出するための推定ルータパケット送信処理を示すフローチャートである。図28において、ルータディスカバリ用パケット作成部112は、制御部101が推定ルータパケットの作成の続行を指示しているか否か確認する(ステップS211)。第2の通信端末11は、ステップS212を実行することによって、推定ルータパケットの作成と、推定ルータ応答パケットの受信処理とが独立に動作している状態で、ルータを検出することができる。このため、推定ルータパケットを送信する必要がない状態の場合、第2の通信端末11は、推定ルータパケットの送信処理を停止することができる。   The estimated router packet transmission process activated in step S210 will be described with reference to FIG. FIG. 28 is a flowchart illustrating an estimated router packet transmission process for detecting an upper router (for example, router B30 or router C40) that is not directly connected to the second communication terminal 11. In FIG. 28, the router discovery packet creation unit 112 confirms whether the control unit 101 has instructed the continuation of creation of the estimated router packet (step S211). By executing step S212, the second communication terminal 11 can detect the router while the creation of the estimated router packet and the reception process of the estimated router response packet are operating independently. For this reason, when it is not necessary to transmit the estimated router packet, the second communication terminal 11 can stop the transmission process of the estimated router packet.

ルータディスカバリ用パケット作成部112は、作成の続行が指示されている場合、推定ルータパケットを作成するために、検出したルータのWAN側アドレスを制御部101から受け取る(ステップS212)。ルータディスカバリ用パケット作成部112は、検出したルータのWAN側アドレスから、上位ルータのLAN側アドレスを推測して、推定ルータパケットを作成する(ステップS213)。上記のように、推定ルータパケットは、UPnPのディスカバリメッセージM−Searchである。ルータディスカバリ用パケット作成部112は、パケット送受信部104及び通信部105を通じて、推定ルータパケットを送信する(ステップS214)。一方、ルータディスカバリ用パケット作成部112は、作成の中止が指示されている場合、図28の処理を終了する。なお、図28に示す処理は、UPnPを用いて推定ルータパケットを送信しているが、この場合、推測した上位ルータのLAN側アドレスに対して、ユニキャストでM−Searchを送信するようにすることができる(UPnP Forumの規格上では、M−Searchはマルチキャストのみであるが、ほとんどのルータは、ユニキャストのM−Searchも受信可能としている)。   If the router discovery packet creation unit 112 is instructed to continue creation, the router discovery packet creation unit 112 receives the WAN address of the detected router from the control unit 101 in order to create an estimated router packet (step S212). The router discovery packet creation unit 112 estimates the LAN address of the upper router from the detected WAN address of the router, and creates an estimated router packet (step S213). As described above, the estimated router packet is a UPnP discovery message M-Search. The router discovery packet creation unit 112 transmits the estimated router packet through the packet transmission / reception unit 104 and the communication unit 105 (step S214). On the other hand, the router discovery packet creation unit 112 terminates the process of FIG. 28 when an instruction to cancel the creation is given. In the process shown in FIG. 28, an estimated router packet is transmitted using UPnP. In this case, an M-Search is transmitted by unicast to the LAN address of the estimated upper router. (In the UPnP Forum standard, M-Search is only multicast, but most routers can also receive unicast M-Search).

図29に、ルータディスカバリ用パケット作成部112が、推定ルータパケットの送信先として推測する上位ルータのLAN側アドレスの一例を示す。通常、ルータのLAN側アドレスは、工場出荷時の状態で使用すると、クラスCのローカルアドレスが使用されている。この場合、ローカルアドレスの下位8ビットの値は、1または254である。このため、ルータディスカバリ用パケット作成部112は、上位ルータのLAN側アドレスを推測する場合、制御部101が検出したルータのWAN側アドレスの下位8ビットを1または254に置き換えたアドレスを、上位ルータのLAN側アドレスとして優先的に推測する。このように推測することで、ルータディスカバリ用パケット作成部112は、高速に上位ルータを検出することが可能となる。また、ユーザは、ルータのLAN側アドレスを変更する場合、LAN側アドレスの下位8ビットの値を64または128などの特定の値に設定することが多い。このため、ルータディスカバリ用パケット作成部112は、LAN側アドレスの下位8ビットの値を、ユーザが設定する頻度が高い特定の値に設定したアドレスを、上位ルータのアドレスとして、優先的に推測する。   FIG. 29 shows an example of the LAN address of the upper router that the router discovery packet creation unit 112 estimates as the destination of the estimated router packet. Normally, the local address of class C is used as the LAN address of the router when it is used in the factory default state. In this case, the value of the lower 8 bits of the local address is 1 or 254. Therefore, when the router discovery packet creation unit 112 estimates the LAN address of the upper router, the router 8 replaces the lower 8 bits of the router WAN address detected by the control unit 101 with 1 or 254. Is preferentially estimated as the LAN side address. By guessing in this way, the router discovery packet creation unit 112 can detect the upper router at high speed. In addition, when the user changes the LAN side address of the router, the lower 8 bits of the LAN side address are often set to a specific value such as 64 or 128. For this reason, the router discovery packet creation unit 112 preferentially estimates an address in which the lower 8 bits of the LAN side address is set to a specific value that is frequently set by the user as the address of the upper router. .

原理的には、ルータディスカバリ用パケット作成部112は、図29のように推測可能な全てのアドレスを宛先とした多量の推定ルータパケットを作成し、一度に送信することが可能である。しかし、多量の推定ルータパケットを一度に送信すると、ネットワークが輻輳状態になり、他の通信に悪影響が出る場合がある。また、送信した推定ルータパケットが廃棄され、ルータのLAN側アドレス獲得に悪影響がでることも考えられる。このような影響を避けるため、ルータディスカバリ用パケット作成部112は、一定期間に規定の数以下の推定ルータパケットを送信するように制御する。また、推定ルータパケットは、図24に示すように、ルータだけが応答を返すように指定して送信される。   In principle, the router discovery packet creation unit 112 can create a large number of estimated router packets destined for all addresses that can be guessed as shown in FIG. 29 and transmit them at a time. However, if a large number of estimated router packets are transmitted at once, the network becomes congested and other communications may be adversely affected. In addition, it is conceivable that the estimated router packet transmitted is discarded, and the router side LAN address acquisition is adversely affected. In order to avoid such an influence, the router discovery packet creation unit 112 performs control so as to transmit an estimated router packet equal to or less than a predetermined number in a certain period. Further, as shown in FIG. 24, the estimated router packet is transmitted by designating that only the router returns a response.

図24の例では、ST(SearchTarget)として、“urn:schemas−upnp−org:device:InternetGatewayDevice:1”を設定することにより、ルータだけが応答を返すようになる。このため、第2の通信端末11は、複数のアドレスに対して推定ルータパケットを送信しても、ルータ以外のアドレスから応答を受信しない。一方、ルータのアドレスを指定した推定ルータパケットに対して、第2の通信端末11は、図25の例のような推定ルータ応答パケットを受信する。第2の通信端末11は、推定ルータ応答パケットのIPヘッダの送信元アドレスを参照することで、ルータのLAN側アドレスを入手することができる。   In the example of FIG. 24, by setting “urn: schemas-upnp-org: device: InternetGatewayDevice: 1” as ST (SearchTarget), only the router returns a response. For this reason, even if the second communication terminal 11 transmits the estimated router packet to a plurality of addresses, it does not receive a response from an address other than the router. On the other hand, the second communication terminal 11 receives the estimated router response packet as in the example of FIG. 25 for the estimated router packet in which the router address is specified. The second communication terminal 11 can obtain the LAN side address of the router by referring to the source address of the IP header of the estimated router response packet.

このように、第2の通信端末11は、自身が接続するルータのLAN側アドレスを取得した後に、WAN側アドレスを取得する。そして、得られたWAN側アドレスを基に、上位ルータのアドレス空間の推定処理を行い、アドレス衝突判定処理を実行する。さらに、自身が接続するルータのWAN側アドレスから、上位のルータのLAN側アドレスを取得する。この動作を繰り返すことによって、第2の通信端末11は、宅内ネットワーク1内の全てのルータのアドレスとルータの接続情報とを取得して、宅内ネットワーク1内のルータのLAN側アドレス空間の衝突検出処理を行う。これにより、第2の通信端末11は、TTLパケットに含まれるTTLの操作や、ICMP TIME EXCEEDED MESSAGEの受信処理を行う必要がない。また、TTL処理を行わない市販のルータや、ICMPパケットをフィルタリングする市販のルータに対しても適用することが可能となる。   As described above, the second communication terminal 11 acquires the WAN address after acquiring the LAN address of the router to which the second communication terminal 11 is connected. Then, based on the obtained WAN address, the address space of the upper router is estimated, and the address collision determination process is executed. Further, the LAN address of the upper router is acquired from the WAN address of the router to which it is connected. By repeating this operation, the second communication terminal 11 acquires the addresses of all the routers in the home network 1 and the connection information of the routers, and detects the collision in the LAN side address space of the routers in the home network 1. Process. Accordingly, the second communication terminal 11 does not need to perform the operation of the TTL included in the TTL packet or the reception process of the ICMP TIME EXCEEDED MESSAGE. Further, the present invention can be applied to a commercially available router that does not perform TTL processing and a commercially available router that filters ICMP packets.

なお、第2の実施形態の図23に示すフローチャートにおいて、ルータディスカバリ用パケット作成部112は、推定ルータパケットの送信の際に、UPnP IGD仕様のディスカバリメッセージであるM−Search送信を行うものとして説明した。しかし、通常のルータに実装されているWebベースのユーザインターフェースを用いて、推定ルータパケットを作成してもよい。例えば、デフォルトGW(GateWay)のLAN側通信I/Fのアドレスに適切なhttpメッセージを送信し、その応答を受信することによって、httpメッセージの送信先がルータであることを確認できる。この場合、第2の通信端末11は、自身が接続するルータのLAN側アドレスの取得の際に、図23に示すフローチャートのステップS201〜S204に代えて、上記の処理を行えばよい。   In the flowchart shown in FIG. 23 of the second embodiment, it is assumed that the router discovery packet creation unit 112 performs M-Search transmission, which is a discovery message of UPnP IGD specifications, when transmitting the estimated router packet. did. However, an estimated router packet may be created using a web-based user interface implemented in a normal router. For example, it is possible to confirm that the destination of the http message is a router by transmitting an appropriate http message to the address of the LAN side communication I / F of the default GW (Gateway) and receiving the response. In this case, the second communication terminal 11 may perform the above processing instead of steps S201 to S204 in the flowchart shown in FIG. 23 when acquiring the LAN side address of the router to which it is connected.

また、第2の実施形態において、アドレス空間推定処理及びアドレス衝突判定処理は、宅内ネットワーク1内の全ルータの検出が終了してから実行してもよい。この場合、第2の通信端末11は、全ルータのアドレス空間推定処理を行った後で、各ルータのアドレス衝突判定処理を実行すればよい。   In the second embodiment, the address space estimation process and the address collision determination process may be executed after the detection of all routers in the home network 1 is completed. In this case, the second communication terminal 11 may perform the address collision determination process for each router after performing the address space estimation process for all routers.

また、第2の実施形態において、推定ルータ応答パケットを受信した場合、推定ルータパケットの作成中止の指示を行うものとして説明した。しかし、推定ルータパケットの作成中止の指示は、推測可能な全てのルータのアドレスに推定ルータパケットを送信した後に行ってもよい。これにより、ルータの上位に複数のルータが接続されている宅内ネットワークの場合(マルチホーミング)などでも、アドレス空間の衝突検出を正確に行うことが可能となる。   Further, in the second embodiment, it has been described that when an estimated router response packet is received, an instruction to cancel generation of the estimated router packet is issued. However, the instruction to cancel the creation of the estimated router packet may be given after the estimated router packet is transmitted to all the addresses of the router that can be estimated. This makes it possible to accurately detect a collision in the address space even in a home network (multihoming) in which a plurality of routers are connected above the router.

また、第2の実施形態において、ルータディスカバリ用パケット作成部112は、推定ルータパケットの作成指示と関係なく、次の推定ルータパケットを送信してもよい。すなわち、ルータディスカバリ用パケット作成部112は、推定ルータ応答パケットの受信処理と関係なく、送信してもよい。これにより、宅内ネットワーク1内の上位ルータを高速に発見することが可能となる。   In the second embodiment, the router discovery packet creation unit 112 may transmit the next estimated router packet irrespective of the estimated router packet creation instruction. That is, the router discovery packet creation unit 112 may transmit regardless of the process of receiving the estimated router response packet. As a result, it is possible to find the upper router in the home network 1 at high speed.

また、第2の実施形態において、第2の通信端末11は、推定ルータパケットにアドレス範囲推定パケットの機能を持たせることによって、ルータディスカバリ処理とアドレス空間の推定処理とを同時に実行してもよい。この場合、推定ルータパケットのTTL値を、上位ルータと第2の通信端末11との間に存在するルータ数に応じて適切に設定する。第2の通信端末11が推定ルータパケットに対するICMP TIME EXCEEDED MESSAGEを受信した場合、アドレス空間衝突検出部116は、推定ルータパケットの送信先のアドレスが、上位ルータのアドレス空間外であると判断すればよい。   In the second embodiment, the second communication terminal 11 may simultaneously execute the router discovery process and the address space estimation process by providing the estimated router packet with the function of the address range estimation packet. . In this case, the TTL value of the estimated router packet is appropriately set according to the number of routers existing between the upper router and the second communication terminal 11. When the second communication terminal 11 receives ICMP TIME EXCEEDED MESSAGE for the estimated router packet, the address space collision detection unit 116 determines that the destination address of the estimated router packet is outside the address space of the upper router. Good.

具体的には、図22に示すルータディスカバリ用パケット作成部112と、アドレス空間衝突検出部116とを一体化する。アドレス範囲推定パケットは、上記で説明した推定ルータパケットのフォーマット(M−Searchパケット)とする。このとき、第2の通信端末11からターゲットとするルータまでの間に存在するルータ数に応じて、アドレス範囲推定パケットのTTL値を設定する。例えば、ルータB30のLAN側アドレスを推定する場合には、TTL値を2とし、ルータC40のLAN側アドレスを推定する場合には、TTL値を3に設定する。第2の実施形態では、第2の通信端末11が自身に近いルータから順番にルータのアドレスを取得していくため、設定すべきTTL値は、1から新たなルータのLAN側アドレスを推測するたびにインクリメントしていけばよい。   Specifically, the router discovery packet creation unit 112 and the address space collision detection unit 116 shown in FIG. 22 are integrated. The address range estimation packet has the estimated router packet format (M-Search packet) described above. At this time, the TTL value of the address range estimation packet is set according to the number of routers existing between the second communication terminal 11 and the target router. For example, when estimating the LAN side address of the router B30, the TTL value is set to 2. When estimating the LAN side address of the router C40, the TTL value is set to 3. In the second embodiment, since the second communication terminal 11 obtains router addresses sequentially from the router closest to itself, the TTL value to be set is estimated from 1 as the LAN address of the new router. Just increment it each time.

このようにして、送信された推定ルータパケット兼アドレス範囲推定パケットは、ターゲットとするルータのLAN側アドレスに送信されると、ルータは、応答として推定ルータ応答パケットを第2の通信端末11に送信する。推定ルータ応答パケットを受信することで、第2の通信端末11は、ターゲットとするルータのLAN側アドレスを知ることができる。一方、第2の通信端末11は、ルータのLAN側アドレス以外に送信された推定ルータパケット兼アドレス範囲推定パケットの応答を受信しない。しかし、推定ルータパケット兼アドレス範囲推定パケットの送信先が、ターゲットとするルータのアドレス空間の範囲外であった場合、ターゲットのルータが上位のルータに推定ルータパケット兼アドレス範囲推定パケットを送信しようとするために、推定ルータパケット兼アドレス範囲推定パケットのTTL値が0になる。この結果、ターゲットのルータは、ICMP TIME EXCEEDED MESSAGEを、第2の通信端末11に送信する。第2の通信端末11は、ICMP TIME EXCEEDED MESSAGEに格納されている推定ルータパケット兼アドレス範囲推定パケットの送信先アドレス情報を参照することによって、送信先アドレスがターゲットのルータのアドレス空間の範囲外であることを知ることができる。結果として、この情報を加味してアドレス空間推定を行うことができる。   Thus, when the transmitted estimated router packet / address range estimation packet is transmitted to the LAN address of the target router, the router transmits the estimated router response packet to the second communication terminal 11 as a response. To do. By receiving the estimated router response packet, the second communication terminal 11 can know the LAN address of the target router. On the other hand, the second communication terminal 11 does not receive the response of the estimated router packet / address range estimation packet transmitted to other than the LAN side address of the router. However, if the destination of the estimated router packet / address range estimation packet is outside the range of the address space of the target router, the target router attempts to send the estimated router packet / address range estimation packet to the upper router. Therefore, the TTL value of the estimated router packet / address range estimation packet becomes 0. As a result, the target router transmits ICMP TIME EXCEEDED MESSAGE to the second communication terminal 11. The second communication terminal 11 refers to the destination address information of the estimated router packet / address range estimation packet stored in ICMP TIME EXCEEDED MESSAGE so that the destination address is outside the range of the address space of the target router. You can know that there is. As a result, the address space can be estimated by taking this information into consideration.

また、第2の実施形態において、アドレス空間推定処理は、第1の実施形態と同様の方法を行うものとして説明した。しかし、アドレス空間推定処理は、ICMP TIME EXCEEDED MESSAGEを利用するため、第2の通信端末11は、ICMPメッセージをフィルタリングするルータに対して、第1の実施形態と同様のアドレス空間の推定処理を行うことができない。この場合、第2の通信端末11は、ICMPメッセージをフィルタリングするルータのアドレス空間が、クラスCのアドレス空間であると推測してもよい。また、httpメッセージやSNMPなどのプロトコルを利用して、ICMPメッセージをフィルタリングするルータのアドレス空間を読み出してもよい。   In the second embodiment, the address space estimation process has been described as performing the same method as in the first embodiment. However, since the address space estimation process uses ICMP TIME EXCEEDED MESSAGE, the second communication terminal 11 performs an address space estimation process similar to that of the first embodiment on the router that filters the ICMP message. I can't. In this case, the second communication terminal 11 may infer that the address space of the router that filters the ICMP message is a class C address space. Further, the address space of the router for filtering the ICMP message may be read using a protocol such as an http message or SNMP.

(第3の実施形態)
図30は、本発明の第3の実施形態に係るアドレス空間衝突検出装置が用いられるネットワークの一例を示す図である。図30において、宅内ネットワーク1は、第2の通信端末11に代えて、第3の通信端末12を備える点が異なる。第3の通信端末12は、第3の実施形態に係るアドレス空間衝突検出装置である。
(Third embodiment)
FIG. 30 is a diagram illustrating an example of a network in which the address space collision detection apparatus according to the third embodiment of the present invention is used. In FIG. 30, the home network 1 is different in that it includes a third communication terminal 12 instead of the second communication terminal 11. The third communication terminal 12 is an address space collision detection device according to the third embodiment.

第1の実施形態において、第1の通信端末10は、TTLを変化させたTTLパケットを用いて、宅内ネットワーク1内のルータのLAN側アドレスを取得した。また、第1の通信端末10は、ICMP TIME EXCEEDED MESSAGEを用いて、ルータのアドレス空間を推定して、ルータのアドレス空間の衝突検出を行う。第1の実施形態で説明したルータのアドレス空間の衝突検出方法は、TTL応答パケットの受信を待つことなく送信することによって、非常に効率よくルータのLAN側アドレスを知ることができる。このため、アドレス空間の衝突検出処理を高速に実行することが可能となる。   In the first embodiment, the first communication terminal 10 acquires the LAN side address of the router in the home network 1 using the TTL packet with the TTL changed. Also, the first communication terminal 10 estimates the router address space using ICMP TIME EXCEEDED MESSAGE, and performs collision detection of the router address space. The router address space collision detection method described in the first embodiment can know the router's LAN address very efficiently by transmitting without waiting for the reception of the TTL response packet. For this reason, it is possible to execute address space collision detection processing at high speed.

しかし、市販されているルータには、ICMPメッセージをフィルタリングするものがある。そのため、ICMPメッセージをフィルタリングするルータを含む宅内ネットワークに対して第1の通信端末10を用いた場合、ICMPメッセージをフィルタリングするルータは、上位ルータが第1の通信端末10に送信するICMP TIME EXCEEDED MESSAGEを破棄する。このため、第1の通信端末10は、宅内ネットワーク内のルータを正確に検出することができない場合がある。結果として、第1の通信端末10は、宅内ネットワーク内における完全なアドレス空間の衝突検出ができないという問題が生じる。   However, some commercially available routers filter ICMP messages. Therefore, when the first communication terminal 10 is used for a home network including a router for filtering an ICMP message, the router for filtering the ICMP message is an ICMP TIME EXCEEDED MESSAGE that the upper router transmits to the first communication terminal 10. Is discarded. For this reason, the first communication terminal 10 may not be able to accurately detect the router in the home network. As a result, there arises a problem that the first communication terminal 10 cannot detect a complete address space collision in the home network.

図30は、ルータB30がICMPメッセージをフィルタリングするルータである例を示している。第3の通信端末12は、TTL=3及びTTL=4にそれぞれ設定されたTTLパケットを送信すると、ルータC40及びルータD50は、TTL応答パケットを送信する。しかし、ルータB30は、ICMPメッセージをフィルタリングするため、ルータC40及びルータD50が送信したTTL応答パケットを破棄する。このため、第1の通信端末10は、TTLパケットを利用して、ルータC40及びルータD50を検出することができない。   FIG. 30 shows an example in which the router B30 is a router that filters ICMP messages. When the third communication terminal 12 transmits the TTL packet set to TTL = 3 and TTL = 4, the router C40 and the router D50 transmit the TTL response packet. However, the router B30 discards the TTL response packet transmitted by the router C40 and the router D50 in order to filter the ICMP message. For this reason, the 1st communication terminal 10 cannot detect the router C40 and the router D50 using a TTL packet.

また、第2の実施形態では、検出したルータのWAN側アドレスを取得して、WAN側アドレスを用いて上位ルータを検出することによって、ルータのアドレス空間の衝突検出を行う方法を説明した。この方法は、ICMPを使用しないため、ICMPメッセージをフィルタリングするルータを含む宅内ネットワークに適用することができる。しかし、ルータのアドレスを推測してルータ推定パケットを送信する必要があるため、処理効率の面で、第1の実施形態より劣るという問題がある。   In the second embodiment, the method of detecting the router address space collision by acquiring the WAN address of the detected router and detecting the upper router using the WAN address has been described. Since this method does not use ICMP, it can be applied to a home network including a router for filtering ICMP messages. However, since it is necessary to estimate the address of the router and transmit the router estimation packet, there is a problem that the processing efficiency is inferior to that of the first embodiment.

そこで、第3の実施形態では、ICMPメッセージをフィルタリングするルータを含むネットワークに適用できるとともに、処理効率を高めたアドレス空間衝突の検出装置を説明する。具体的には、第1の実施形態で説明したTTLパケットを用いてルータを検出する方法と、第2の実施形態で説明した推定ルータパケットを用いてルータを検出する方法との両方の方法を使用する。以下に、詳しく説明する。   Therefore, in the third embodiment, an address space collision detection apparatus that can be applied to a network including a router that filters ICMP messages and has improved processing efficiency will be described. Specifically, both the method of detecting a router using the TTL packet described in the first embodiment and the method of detecting a router using the estimated router packet described in the second embodiment are used. use. This will be described in detail below.

図31を用いて、宅内ネットワーク1内のルータの検出を行う際に、第3の通信端末12が行う動作の概要を説明する。図31において、ルータB30が、ICMPメッセージのフィルタリング機能を備えているものとする。第3の通信端末12は、TTLを変化させたTTLパケットを送信すると、ルータA20及びルータB30からTTL応答パケットを受信する(矢印A及び矢印B)。そして、第3の通信端末12は、ルータA20及びルータB30のLAN側アドレスを取得する。   The outline of the operation performed by the third communication terminal 12 when detecting a router in the home network 1 will be described with reference to FIG. In FIG. 31, it is assumed that the router B30 has an ICMP message filtering function. When the third communication terminal 12 transmits the TTL packet with the TTL changed, the third communication terminal 12 receives the TTL response packet from the router A20 and the router B30 (arrow A and arrow B). And the 3rd communication terminal 12 acquires the LAN side address of router A20 and router B30.

ルータB30は、ルータC40及びルータD50が送信するTTL応答パケットを破棄する。このため、第3の通信端末12は、ルータB30より上位にあるルータC40及びルータB50が送信する、TTL応答パケットを受信することができない。このため、第3の通信端末12は、TTL=3のTTLパケット(ルータC40を検出するためのTTLパケット)に対するTTL応答パケットの受信について、タイムアウトを検出する。第3の通信端末12は、タイムアウトを検出すると、TTLパケット送信処理を中止する。第3の通信端末12は、ルータB30のWAN側アドレスを取得する(矢印C)。第3の通信端末12は、ルータBのWAN側アドレスを用いて、上位ルータのLAN側アドレスを推測した推定ルータパケットの送信処理を開始する。   Router B30 discards the TTL response packet transmitted by router C40 and router D50. For this reason, the third communication terminal 12 cannot receive the TTL response packet transmitted by the router C40 and the router B50 that are higher than the router B30. For this reason, the third communication terminal 12 detects a timeout for the reception of the TTL response packet with respect to the TTL packet (TTL packet for detecting the router C40) with TTL = 3. When the third communication terminal 12 detects a timeout, the third communication terminal 12 stops the TTL packet transmission process. The third communication terminal 12 acquires the WAN address of the router B30 (arrow C). The third communication terminal 12 uses the WAN address of router B to start the transmission process of the estimated router packet that estimates the LAN address of the upper router.

第3の通信端末12は、送信した推定ルータパケットによって、ルータC40のLAN側アドレスを取得し(矢印D)、ルータC40に対してNAT設定及びファイアウォール設定を実行する。第3の通信端末12は、ルータC40のWAN側アドレスを取得し(矢印E)、WAN側アドレスがグローバルアドレスであることを検出して、処理を終了する。   The third communication terminal 12 acquires the LAN side address of the router C40 by the transmitted estimated router packet (arrow D), and executes NAT setting and firewall setting for the router C40. The third communication terminal 12 acquires the WAN address of the router C40 (arrow E), detects that the WAN address is a global address, and ends the process.

図32は、第3の通信端末12の構成を示すブロック図である。第3の通信端末12は、制御部101と、ルータディスカバリ用パケット作成部122と、受信パケット解析部103と、パケット送受信部104と、通信部105と、アドレス空間衝突検出部126と、WAN側アドレス取得部111と、タイムアウト検出部121とを備える。第3の通信端末12は、タイムアウト検出部121と、ルータディスカバリ用パケット作成部112に代えてルータディスカバリ用パケット作成部122と、アドレス空間衝突検出部106に代えてアドレス空間衝突検出部126とをさらに備える点が、図22に示す第2の通信端末11と異なる。タイムアウト検出部121は、TTL応答パケットの受信に対するタイムアウトを検出する。ルータディスカバリ用パケット作成部112は、制御部101に指示に応じて、TTLパケット及び推定ルータパケットの送信処理を行う。アドレス空間衝突検出部126は、ルータのLAN側アドレスを用いたアドレス空間の推定と、ルータのWAN側アドレスを用いた上位ルータのアドレス空間の推定と、アドレス空間衝突の判定処理とを行う。なお、第2の通信端末11と同一の構成に対しては、同じ参照番号を付し、その説明を省略する。   FIG. 32 is a block diagram showing a configuration of the third communication terminal 12. The third communication terminal 12 includes a control unit 101, a router discovery packet creation unit 122, a received packet analysis unit 103, a packet transmission / reception unit 104, a communication unit 105, an address space collision detection unit 126, and a WAN side. An address acquisition unit 111 and a timeout detection unit 121 are provided. The third communication terminal 12 includes a timeout detection unit 121, a router discovery packet creation unit 122 instead of the router discovery packet creation unit 112, and an address space collision detection unit 126 instead of the address space collision detection unit 106. Furthermore, the point provided is different from the second communication terminal 11 shown in FIG. The timeout detection unit 121 detects a timeout for reception of the TTL response packet. The router discovery packet creation unit 112 performs transmission processing of the TTL packet and the estimated router packet in response to an instruction to the control unit 101. The address space collision detection unit 126 performs address space estimation using the router LAN address, router address space estimation using the router WAN address, and address space collision determination processing. In addition, the same reference number is attached | subjected to the structure same as the 2nd communication terminal 11, and the description is abbreviate | omitted.

第3の通信端末12の詳細な動作を図33〜図36を用いて説明する。図33は、第3の通信端末12のアドレス空間衝突の検出動作全体を示すフローチャートである。図34は、ルータディスカバリ用パケット作成部112が行うTTLパケット送信処理を示すフローチャートである。図35は、タイムアウト検出部121がタイムアウトを検出後に、第3の通信端末12が行う処理を示すフローチャートである。図36は、ルータディスカバリ用パケットに対する応答パケットの受信処理を示すフローチャートである。   The detailed operation of the third communication terminal 12 will be described with reference to FIGS. FIG. 33 is a flowchart showing the entire operation of detecting the address space collision of the third communication terminal 12. FIG. 34 is a flowchart showing TTL packet transmission processing performed by the router discovery packet creation unit 112. FIG. 35 is a flowchart illustrating processing performed by the third communication terminal 12 after the timeout detection unit 121 detects a timeout. FIG. 36 is a flowchart showing a response packet reception process for a router discovery packet.

第3の通信端末12は、ルータディスカバリ用パケットとして、TTLパケット及び推定ルータパケットの2種類を送信する。また、第3の通信端末12は、ルータディスカバリ用パケットに対する応答パケットとしても、TTL応答パケット及び推定ルータ応答パケットの2種類を受信する。まず、第3の通信端末12のアドレス空間衝突の検出動作全体について、図33を用いて説明する。第3の通信端末12がアドレス空間衝突検出処理を開始すると、制御部101は、ルータディスカバリ用パケットの送信処理(TTLパケット送信処理及び推定ルータパケット送信処理)を起動し、TTLパケットの作成を指示する(ステップS31)。この結果、図34に示すTTLパケット送信処理と、推定ルータパケット送信処理とが開始される。なお、この段階では、制御部101は、推定ルータパケットの作成の指示を行わない。   The third communication terminal 12 transmits two types of TTL packets and estimated router packets as router discovery packets. The third communication terminal 12 also receives two types of response packets for router discovery packets: TTL response packets and estimated router response packets. First, the entire address space collision detection operation of the third communication terminal 12 will be described with reference to FIG. When the third communication terminal 12 starts address space collision detection processing, the control unit 101 activates router discovery packet transmission processing (TTL packet transmission processing and estimated router packet transmission processing), and instructs to create a TTL packet. (Step S31). As a result, the TTL packet transmission process and the estimated router packet transmission process shown in FIG. 34 are started. At this stage, the control unit 101 does not give an instruction to create an estimated router packet.

制御部101は、TTL応答パケットのタイムアウト監視処理を起動する(ステップS32)。TTL応答パケットのタイムアウト監視処理は、TTLパケット送信処理で送信されたTTLパケットに対する応答が、予め規定している時間内に返ってきているか否かを監視する。タイムアウト監視処理が、TTL応答パケットに対する応答が帰ってきていないことを検出した場合、制御部101により、図35に示す処理が実行される。   The control unit 101 activates a timeout monitoring process for the TTL response packet (step S32). The timeout monitoring process of the TTL response packet monitors whether or not a response to the TTL packet transmitted in the TTL packet transmission process is returned within a predetermined time. When the timeout monitoring process detects that the response to the TTL response packet has not returned, the process shown in FIG.

TTL応答パケットのタイムアウト監視処理起動後、制御部101は、図36に示すルータディスカバリ用パケットに対する応答パケット(以下、ルータ応答パケットという)の受信処理を起動する。その後、宅内ネットワーク1のアドレス空間の衝突チェックが完了するまで処理を継続し、完了すると、図33に示す処理を終了する(ステップS34)。   After starting the timeout monitoring process of the TTL response packet, the control unit 101 starts a reception process of a response packet (hereinafter referred to as a router response packet) for the router discovery packet shown in FIG. Thereafter, the process is continued until the address space collision check of the home network 1 is completed. When the check is completed, the process shown in FIG. 33 is terminated (step S34).

以下、第3の通信端末12の動作を、ルータディスカバリ用パケットの送信処理、TTL応答パケット受信のタイムアウト検出処理、ルータ応答パケット受信処理の3つの分けて説明を行う。   Hereinafter, the operation of the third communication terminal 12 will be described in three parts: router discovery packet transmission processing, TTL response packet reception timeout detection processing, and router response packet reception processing.

ルータディスカバリ用パケットの送信処理は、TTLパケット送信処理及び推定ルータパケット送信処理の2つの処理が行われる。TTLパケット送信処理について、図34を用いて説明を行う。宅内ネットワーク1内のアドレス空間の衝突検出を行う場合、制御部101は、TTLパケット送信処理の開始をルータディスカバリ用パケット作成部112に指示する。ルータディスカバリ用パケット作成部112は、制御部101がTTLパケットの作成の続行を指示しているか否か確認する(ステップS301)。続行を指示していない場合、ルータディスカバリ用パケット作成部102は、図34に示す処理を終了する。一方、続行を指示している場合、ルータディスカバリ用パケット作成部102は、TTLパケットを作成する(ステップS302)。ルータディスカバリ用パケット作成部102は、作成したTTLパケットと対応付けたタイムアウト時間を、タイムアウト検出部121に登録する(ステップS303)。ルータディスカバリ用パケット作成部102は、パケット送受信部104と通信部105とを介して、TTLパケットを送信する(ステップS304)。第3の実施形態におけるTTLパケット送信処理は、TTLパケットに対するタイムアウト時間を登録処理を行う点が、第1の実施形態におけるTTLパケット送信処理と異なっている。   The router discovery packet transmission process includes two processes: a TTL packet transmission process and an estimated router packet transmission process. The TTL packet transmission process will be described with reference to FIG. When the collision detection of the address space in the home network 1 is performed, the control unit 101 instructs the router discovery packet creation unit 112 to start the TTL packet transmission process. The router discovery packet creation unit 112 confirms whether the control unit 101 has instructed the continuation of the creation of the TTL packet (step S301). If the continuation instruction has not been given, the router discovery packet creation unit 102 ends the process shown in FIG. On the other hand, when an instruction to continue is issued, the router discovery packet creation unit 102 creates a TTL packet (step S302). The router discovery packet creation unit 102 registers the timeout time associated with the created TTL packet in the timeout detection unit 121 (step S303). The router discovery packet creation unit 102 transmits a TTL packet via the packet transmission / reception unit 104 and the communication unit 105 (step S304). The TTL packet transmission processing in the third embodiment is different from the TTL packet transmission processing in the first embodiment in that registration processing is performed for the timeout time for the TTL packet.

推定ルータパケット送信処理は、第2の実施形態(図28)と同様の処理であるため、説明を省略する。   The estimated router packet transmission process is the same as that of the second embodiment (FIG. 28), and thus the description thereof is omitted.

図35を用いて、TTL応答パケット受信のタイムアウト検出後の処理について説明する。タイムアウト検出部121は、TTL応答パケットのタイムアウト監視処理を実行し、送信したTTLパケットに対応するTTL応答パケットをタイムアウト時間以内に受信しないことを検出した場合、タイムアウトを検出した旨を制御部101に通知する。タイムアウトの通知を受けた制御部101は、既にタイムアウト検出後に行われる、推定ルータパケットの送信処理が行われているか否かを判断する(ステップS311)。制御部101は、推定ルータパケット送信処理が行われている場合、図35に示す処理を終了する。   Processing after timeout detection of TTL response packet reception will be described with reference to FIG. The timeout detection unit 121 executes the timeout monitoring process of the TTL response packet, and when detecting that the TTL response packet corresponding to the transmitted TTL packet is not received within the timeout time, notifies the control unit 101 that the timeout has been detected. Notice. Receiving the timeout notification, the control unit 101 determines whether or not the estimated router packet transmission processing already performed after the timeout is detected (step S311). When the estimated router packet transmission process is performed, the control unit 101 ends the process illustrated in FIG.

一方、推定ルータパケット送信処理が行われていない場合、制御部101は、受信したTTL応答パケットのうち、TTL値が最大のTTL応答パケットから、送信元ルータのLAN側アドレスを取り出す(ステップS312)。これによって、ICMPメッセージをフィルタリングするルータを推測することができる。TTLパケットは、TTL=1から順にインクリメントしながら送信される。このため、タイムアウトの発生は、TTL値が小さいTTL応答パケットから順に発生する。このため、タイムアウトしたTTL応答パケットのTTL値より、1小さいTTL値に対応して検出されたルータが、ICMPメッセージをフィルタリングするルータであると考えることができる。   On the other hand, when the estimated router packet transmission processing is not performed, the control unit 101 extracts the LAN address of the transmission source router from the TTL response packet having the maximum TTL value among the received TTL response packets (step S312). . This makes it possible to infer a router that filters ICMP messages. The TTL packet is transmitted while sequentially incrementing from TTL = 1. For this reason, the occurrence of timeout occurs in order from the TTL response packet having the smallest TTL value. For this reason, it can be considered that the router detected corresponding to the TTL value one smaller than the TTL value of the time-out TTL response packet is a router that filters the ICMP message.

具体的な例を、図30を用いて説明する。図30に示すように、ルータB30がICMPメッセージをフィルタリングするルータである。このため、ルータB30の上位ルータであるルータC40がTTL=3に設定されたTTLパケットに対応するTTL応答パケットを送信しても、第3の通信端末12において、TTL応答パケットの受信は、タイムアウトとなる。同様に、ルータD50がTTL=4に設定されたTTLパケットに対応するTTL応答パケットを送信しても、第3の通信端末12において、TTL応答パケットの受信は、タイムアウトとなる。ここで、TTL値の順番にTTLパケットを送信した場合、最初にタイムアウトするのは、TTL=3に設定されたTTLパケットに対するTTL応答パケットの受信である。TTL=3に対応するTTL応答パケットの受信がタイムアウトするため、TTL=2に対応するTTL応答パケットを送信したルータB30が、ICMPメッセージをフィルタリングするルータとなる。なお、タイムアウトしたTTL応答パケットのTTL値を取得することが困難である場合、受信したTTL応答パケットのうち最大のTTL値を有するTTL応答パケットから検出されたルータが、ICMPメッセージをフィルタリングするルータであるとみなしてもよい。   A specific example will be described with reference to FIG. As shown in FIG. 30, router B30 is a router that filters ICMP messages. For this reason, even if the router C40, which is the upper router of the router B30, transmits a TTL response packet corresponding to the TTL packet set to TTL = 3, the reception of the TTL response packet in the third communication terminal 12 is timed out. It becomes. Similarly, even when the router D50 transmits a TTL response packet corresponding to the TTL packet for which TTL = 4 is set, the reception of the TTL response packet in the third communication terminal 12 times out. Here, when the TTL packets are transmitted in the order of the TTL values, the first time-out is the reception of the TTL response packet for the TTL packet set to TTL = 3. Since reception of the TTL response packet corresponding to TTL = 3 times out, the router B30 that has transmitted the TTL response packet corresponding to TTL = 2 becomes a router that filters the ICMP message. When it is difficult to obtain the TTL value of the time-out TTL response packet, the router detected from the TTL response packet having the maximum TTL value among the received TTL response packets is a router that filters the ICMP message. You may consider it to be.

ステップS312の処理を実行後、制御部101は、WAN側アドレス取得部111に、ICMPメッセージをフィルタリングするルータのLAN側アドレスを引き渡す。WAN側アドレス取得部111は、第2の実施形態で説明した方法(UPnP IGD仕様等を用いる方法)と同様の方法を用いて、ステップS312で検出した、ICMPメッセージをフィルタリングするルータのWAN側アドレスを取得する(ステップS313)。なお、ステップS313の処理は、図23のステップS205の処理が相当する。   After executing the processing of step S312, the control unit 101 hands over the LAN side address of the router that filters the ICMP message to the WAN side address acquisition unit 111. The WAN address acquisition unit 111 uses a method similar to the method described in the second embodiment (method using the UPnP IGD specification), and the WAN address of the router that filters the ICMP message detected in step S312 Is acquired (step S313). Note that the processing in step S313 corresponds to the processing in step S205 in FIG.

制御部101は、ルータディスカバリ用パケット作成部122に対し、TTLパケット送信処理(図34に示す処理)を中止するように指示する(ステップS314)。TTLパケット送信処理は、TTL応答パケットのタイムアウト監視処理と並行して動作している。TTLパケット送信処理は、上記指示(ステップS301におけるNo)によって、終了する。制御部101は、取得したWAN側アドレスをルータディスカバリ用パケット作成部122に引き渡すとともに、タイムアウト検出後のルータディスカバリ用パケットの送信処理として、推定ルータパケットを作成するように指示する(ステップS315)。   The control unit 101 instructs the router discovery packet creation unit 122 to stop the TTL packet transmission process (the process shown in FIG. 34) (step S314). The TTL packet transmission process operates in parallel with the timeout monitoring process of the TTL response packet. The TTL packet transmission process is terminated by the above instruction (No in step S301). The control unit 101 hands over the acquired WAN address to the router discovery packet creation unit 122 and instructs to create an estimated router packet as a router discovery packet transmission process after timeout detection (step S315).

図36を用いて、ルータディスカバリ用パケットに対する応答パケット(以下、ルータ応答パケットという)の受信処理を説明する。制御部101は、ルータディスカバリ用パケット作成部122にTTLパケット送信処理を指示した後、受信パケット解析部103にルータディスカバリ用パケットに対する応答パケットの受信処理を指示する。受信パケット解析部103は、制御部101からの指示に基づいて、図36に示す処理を実行する。   Using FIG. 36, a reception process of a response packet (hereinafter referred to as a router response packet) to the router discovery packet will be described. The control unit 101 instructs the router discovery packet creation unit 122 to perform TTL packet transmission processing, and then instructs the reception packet analysis unit 103 to perform reception processing of a response packet for the router discovery packet. Received packet analysis section 103 executes the processing shown in FIG. 36 based on an instruction from control section 101.

受信パケット解析部は、ルータ応答パケットの受信を待機する(ステップS321)。受信パケット解析部103は、ルータ応答パケットを受信すると、受信したルータ応答パケットが、TTL応答パケットであるか、推定ルータ応答パケットであるかを判断する(ステップS322)。   The received packet analysis unit waits for reception of a router response packet (step S321). When receiving the router response packet, the received packet analysis unit 103 determines whether the received router response packet is a TTL response packet or an estimated router response packet (step S322).

受信したルータ応答パケットがTTL応答パケットである場合(ステップS322,No)、受信パケット解析部103は、ステップS323〜S327に示す処理を実行する。受信パケット解析部103は、TTL応答パケット(ICMP TIME EXCEEDED MESSAGE)の受信処理を実行する(ステップS323)。受信パケット解析部103は、TTL応答パケットの送信元ルータのLAN側アドレスが、ローカルアドレスであるか否かを判断する(ステップS324)。TTL応答パケットの送信元ルータのLAN側アドレスがローカルアドレスである場合、アドレス空間衝突検出部126は、制御部101を通じて、アドレス空間推定処理(ステップS325)と、アドレス空間衝突処理(ステップS326)とを実行する。なお、図36に示すステップS323〜ステップS326において行われる処理は、図3に示すステップS103〜ステップS106の処理にそれぞれ相当する。これらのステップの詳細については、第1の実施形態で詳しく説明しているため、詳細な説明を省略する。一方、ステップS324において、ルータ応答パケットの送信元ルータのLAN側アドレスがローカルアドレスでない場合、受信パケット解析部103は、制御部101を通じて、ルータディスカバリ用パケット作成部102に、受信したTTL応答パケットに対応するTTL値以上のTTLパケット送信処理の中止を指示する(ステップS327)。そして、受信パケット解析部103は、受信すべき他のルータ応答パケットを受信する必要があるか否かを判断する(ステップS328)。他のルータ応答パケットを受信する場合、受信パケット解析部103は、ステップS211に戻る。他のルータ応答パケットを受信しない場合、受信パケット解析部103は、処理を終了する。具体的には、受信パケット解析部103は、推定ルータ応答パケットや、TTL応答パケットを受信する必要があるかないかを判断する。   When the received router response packet is a TTL response packet (step S322, No), the received packet analysis unit 103 executes the processes shown in steps S323 to S327. The reception packet analysis unit 103 performs reception processing of the TTL response packet (ICMP TIME EXCEEDED MESSAGE) (step S323). The received packet analysis unit 103 determines whether the LAN address of the transmission source router of the TTL response packet is a local address (step S324). When the LAN address of the transmission source router of the TTL response packet is a local address, the address space collision detection unit 126, through the control unit 101, performs an address space estimation process (step S325), an address space collision process (step S326), and Execute. Note that the processing performed in steps S323 to S326 shown in FIG. 36 corresponds to the processing in steps S103 to S106 shown in FIG. Since details of these steps are described in detail in the first embodiment, detailed description thereof is omitted. On the other hand, if the LAN address of the source router of the router response packet is not a local address in step S324, the received packet analysis unit 103 sends the received TTL response packet to the router discovery packet creation unit 102 through the control unit 101. An instruction to stop transmission processing of TTL packets having a corresponding TTL value or more is given (step S327). Then, the received packet analysis unit 103 determines whether it is necessary to receive another router response packet to be received (step S328). When receiving another router response packet, the received packet analysis unit 103 returns to step S211. If no other router response packet is received, the received packet analysis unit 103 ends the process. Specifically, the received packet analysis unit 103 determines whether it is necessary to receive an estimated router response packet or a TTL response packet.

ステップS322において、受信したルータ応答パケットが、推定ルータ応答パケットである場合、受信パケット解析部103は、ステップS329〜S335に示す処理を実行する。受信パケット解析部103は、推定ルータ応答パケットを解析して、送信元ルータのLAN側アドレスを取得する(ステップS329)。受信パケット解析部103は、制御部101を通じて、ルータディスカバリ用パケット作成部122に、推定ルータパケットの送信処理中止を指示する(ステップS330)。受信パケット解析部103は、WAN側アドレス取得部111を通じて、推定ルータ応答パケットの送信元ルータのWAN側アドレスを取得する(ステップS331)。受信パケット解析部103は、取得したWAN側アドレスが、ローカルアドレスであるか否かを判断する(ステップS332)。取得したWAN側アドレスがローカルアドレスの場合、受信パケット解析部103は、制御部101を通じてルータディスカバリ用パケット作成部122に、取得したWAN側アドレスを利用した推定ルータパケットの送信処理を指示する(ステップS333)。アドレス空間衝突検出部126は、制御部101を通じて、アドレス空間推定処理(ステップS334)と、アドレス空間衝突処理(ステップS335)とを実行する。なお、図36に示すステップS329〜ステップS335において行われる処理は、図23に示すステップS203〜S209の処理にそれぞれ相当する。これらのステップの詳細は、第1の実施形態で詳しく説明しているため、詳細な説明を省略する。一方、ステップS332において、取得したWAN側アドレスがローカルアドレスでない場合(グローバルアドレスの場合)、受信パケット解析部103は、ステップS328の処理に進む。   If the received router response packet is an estimated router response packet in step S322, the received packet analysis unit 103 executes the processes shown in steps S329 to S335. The received packet analysis unit 103 analyzes the estimated router response packet and obtains the LAN address of the transmission source router (step S329). The received packet analysis unit 103 instructs the router discovery packet creation unit 122 to stop the transmission processing of the estimated router packet through the control unit 101 (step S330). The received packet analysis unit 103 acquires the WAN side address of the transmission source router of the estimated router response packet through the WAN side address acquisition unit 111 (step S331). The received packet analysis unit 103 determines whether or not the acquired WAN address is a local address (step S332). When the acquired WAN side address is a local address, the received packet analysis unit 103 instructs the router discovery packet creation unit 122 through the control unit 101 to transmit the estimated router packet using the acquired WAN side address (Step S1). S333). The address space collision detection unit 126 performs an address space estimation process (step S334) and an address space collision process (step S335) through the control unit 101. Note that the processing performed in steps S329 to S335 shown in FIG. 36 corresponds to the processing in steps S203 to S209 shown in FIG. Since details of these steps are described in detail in the first embodiment, detailed description thereof is omitted. On the other hand, in step S332, if the acquired WAN address is not a local address (in the case of a global address), the received packet analysis unit 103 proceeds to the process of step S328.

このように、第3の通信端末12は、TTLパケットに対するTTL応答パケットの受信がタイムアウトした場合、TTL値が最大のTTL応答パケットの送信元ルータが、ICMPメッセージをフィルタリングするルータであると判断する。そして、第3の通信端末12は、ICMPメッセージをフィルタリングするルータのWAN側アドレスを取得し、上位のルータに対して推定ルータパケットを送信するとともに、アドレス空間推定処理及びアドレス衝突判定処理を行う。これにより、ICMPメッセージを破棄するルータを含むネットワークにおいても、アドレス空間の衝突検出を高速に、しかも確実に実行することができる。   As described above, when the reception of the TTL response packet with respect to the TTL packet times out, the third communication terminal 12 determines that the transmission source router of the TTL response packet having the maximum TTL value is a router that filters the ICMP message. . Then, the third communication terminal 12 acquires the WAN address of the router that filters the ICMP message, transmits the estimated router packet to the upper router, and performs the address space estimation process and the address collision determination process. As a result, even in a network including a router that discards the ICMP message, address space collision detection can be performed at high speed and reliably.

なお、アドレス空間推定処理及びアドレス衝突判定処理は、宅内ネットワーク1の全ルータの検出が終了してから行ってもよい。この場合、アドレス空間推定処理は、全ルータのLAN側アドレス空間を推定して記憶した後、各ルータのLAN側アドレス空間を比較すればよい。   The address space estimation process and the address collision determination process may be performed after detection of all routers in the home network 1 is completed. In this case, in the address space estimation process, the LAN side address spaces of all routers are estimated and stored, and then the LAN side address spaces of the routers are compared.

また、アドレス空間推定処理は、第1の実施形態で説明した方法と同様の方法を行うものとして説明した。しかし、ICMP TIME EXCEEDED MESSAGEを利用してアドレス空間推定処理を行うため、第3の通信端末12は、ICMPメッセージをフィルタリングするルータに対して、第1の実施形態と同様のアドレス空間の推定処理を行うことができない。この場合、市販ルータは、一般にクラスCのアドレス空間を使用するため、第3の通信端末12は、ICMPメッセージをフィルタリングするルータのアドレス空間がクラスCのアドレス空間であると推測してもよい。また、httpメッセージやSNMPなどのプロトコルを利用して、ICMPメッセージをフィルタリングするルータのアドレス空間を読み出してもよい。   The address space estimation process has been described as performing the same method as the method described in the first embodiment. However, since the address space estimation process is performed using ICMP TIME EXCEEDED MESSAGE, the third communication terminal 12 performs the same address space estimation process as that of the first embodiment on the router that filters the ICMP message. I can't do it. In this case, since a commercially available router generally uses a class C address space, the third communication terminal 12 may assume that the address space of the router that filters the ICMP message is a class C address space. Further, the address space of the router for filtering the ICMP message may be read using a protocol such as an http message or SNMP.

(第4の実施形態)
第3の実施形態では、ICMPメッセージをフィルタリングするルータを含むネットワークに対して適用可能な、効率的なアドレス空間の衝突検出方法を説明した。第4の実施形態では、TTLを処理しないルータを含む宅内ネットワークに対して適用可能な、効率的なアドレス空間の衝突検出方法について説明する。
(Fourth embodiment)
In the third embodiment, an efficient address space collision detection method applicable to a network including a router that filters ICMP messages has been described. In the fourth embodiment, an efficient address space collision detection method applicable to a home network including a router that does not process TTL will be described.

図37は、本発明の第4の実施形態に係るアドレス空間衝突検出装置が用いられるネットワークの一例を示す図である。図37に示す宅内ネットワーク1は、図30に示す第3の通信端末12に代えて、第4の通信端末13を備える点が異なる。第4の通信端末13は、第4の実施形態に係るアドレス空間衝突検出装置である。   FIG. 37 is a diagram illustrating an example of a network in which the address space collision detection apparatus according to the fourth embodiment of the present invention is used. The home network 1 shown in FIG. 37 is different in that a fourth communication terminal 13 is provided instead of the third communication terminal 12 shown in FIG. The fourth communication terminal 13 is an address space collision detection device according to the fourth embodiment.

図37を用いて、TTLを処理しないルータを宅内ネットワーク1が含む場合に発生する問題点について説明する。図37において、ルータB30がTTLを処理しないルータであるとする。第4の通信端末13は、TTLパケットをTTL=1からインクリメントした値を順に設定して送信する。TTL=2に設定されたTTLパケットは、通常、ルータB30においてTTL=0となり、ルータB30からTTL応答パケットが送信される。しかし、ルータB30がTTLを処理しないため、TTL=2に設定された第1のディスカバリ用パケットは、ルータA20においてTTLがデクリメントされたTTL=1の状態で、ルータC40に送信される。TTL=2に設定されたTTLパケットは、ルータC40においてTTL=0となる。このため、ルータC40が、TTL=2に設定されたTTLパケットに対応するTTL応答パケットを送信することになる。   A problem that occurs when the home network 1 includes a router that does not process TTL will be described with reference to FIG. In FIG. 37, it is assumed that the router B30 is a router that does not process TTL. The 4th communication terminal 13 sets and transmits the value which incremented the TTL packet from TTL = 1 in order. A TTL packet set to TTL = 2 normally has TTL = 0 in the router B30, and a TTL response packet is transmitted from the router B30. However, since the router B30 does not process the TTL, the first discovery packet set to TTL = 2 is transmitted to the router C40 in the state of TTL = 1 in which the TTL is decremented in the router A20. The TTL packet set to TTL = 2 is TTL = 0 in the router C40. Therefore, the router C40 transmits a TTL response packet corresponding to the TTL packet set to TTL = 2.

この結果、TTLを処理しないルータを含む宅内ネットワークに対して、第1の実施形態に係るアドレス空間衝突検出装置を適用すると、ルータA20とルータC40との間に存在するルータB30を検出することができないまま、アドレス空間の衝突検出を行うという問題が発生する。第2の実施形態に係るアドレス空間衝突検出装置は、TTLを処理しないルータの検出が可能なため、TTLを処理しないルータを含む宅内ネットワークに対して適用することができる。しかし、第2の実施形態に係るアドレス空間衝突検出装置は、上位のルータのLAN側アドレスを推測しながら推定ルータパケットの送信処理を行う必要があるため、処理効率が第1の実施形態に係るアドレス空間衝突検出装置に対して劣るという問題がある。   As a result, when the address space collision detection apparatus according to the first embodiment is applied to a home network including a router that does not process TTL, the router B30 existing between the router A20 and the router C40 can be detected. There is a problem that address space collision detection is performed without being possible. Since the address space collision detection apparatus according to the second embodiment can detect a router that does not process TTL, it can be applied to a home network including a router that does not process TTL. However, since the address space collision detection apparatus according to the second embodiment needs to perform transmission processing of the estimated router packet while estimating the LAN address of the upper router, the processing efficiency is related to the first embodiment. There is a problem that it is inferior to the address space collision detection device.

そこで、第4の実施形態では、TTLを処理しないルータを含む宅内ネットワークに対して適用できるとともに、処理効率の良いアドレス空間衝突検出処理装置について説明する。   Therefore, in the fourth embodiment, an address space collision detection processing apparatus that can be applied to a home network including a router that does not process TTL and has high processing efficiency will be described.

第4の実施形態に係るアドレス空間衝突検出装置の動作の概要を、図38を用いて説明する。図38に示すネットワークの構成は、図37に示すネットワークと同じである。第4の通信端末13が、第4の実施形態に係るアドレス空間衝突検出装置であり、ルータB30がTTLを処理しないルータであるとする。   An outline of the operation of the address space collision detection apparatus according to the fourth embodiment will be described with reference to FIG. The network configuration shown in FIG. 38 is the same as the network shown in FIG. Assume that the fourth communication terminal 13 is the address space collision detection device according to the fourth embodiment, and the router B30 is a router that does not process TTL.

第4の通信端末13は、TTLパケットを送信する。第4の通信端末13は、TTLパケットに対応するTTL応答パケットをルータA20から受信することによって、ルータA20のLAN側アドレスを取得する(矢印A)。第4の通信端末13は、TTL=2のTTLパケットに対するTTL応答パケットをルータC40から受信して、ルータC40のLAN側アドレスを取得する(矢印B)。第4の通信端末13は、ルータA20のWAN側アドレスを取得する(矢印C)。このとき、ルータA20のWAN側アドレスが、“192.168.10.3”であり、ルータC40のLAN側アドレスが、“192.168.2.1”であるとする。この場合、第4の通信端末13は、ルータA20のWAN側アドレス及びルータC40のLAN側アドレスのネットワークアドレスが一致していないことを検出する。この場合、第4の通信端末13は、ルータA20とルータC40との間に他のルータが存在することを認識できる。ルータA20のWAN側アドレス“192.168.10.3”を用いて、検出されていないルータB30のLAN側アドレスを推測して、推定ルータパケットを送信する(矢印D)。これにより、第4の通信端末13は、ルータB30のLAN側アドレスを取得することができるため、ルータB30のアドレス空間の衝突検出処理を行う。   The fourth communication terminal 13 transmits a TTL packet. The fourth communication terminal 13 acquires the LAN side address of the router A20 by receiving a TTL response packet corresponding to the TTL packet from the router A20 (arrow A). The fourth communication terminal 13 receives the TTL response packet for the TTL packet with TTL = 2 from the router C40, and acquires the LAN side address of the router C40 (arrow B). The fourth communication terminal 13 acquires the WAN address of the router A20 (arrow C). At this time, it is assumed that the WAN side address of the router A20 is “192.168.10.3” and the LAN side address of the router C40 is “192.168.2.1”. In this case, the fourth communication terminal 13 detects that the WAN address of the router A20 and the network address of the LAN address of the router C40 do not match. In this case, the fourth communication terminal 13 can recognize that another router exists between the router A20 and the router C40. Using the WAN side address “192.168.10.3” of the router A20, the LAN side address of the router B30 that has not been detected is estimated and an estimated router packet is transmitted (arrow D). As a result, the fourth communication terminal 13 can acquire the LAN side address of the router B30, and thus performs a collision detection process for the address space of the router B30.

第4の通信端末13は、ルータB30のWAN側アドレスを取得する(矢印E)。第4の通信端末13は、ルータB30のWAN側アドレスから上位ルータのLAN側アドレスを推測して、推定ルータパケットを送信する。これにより、第4の通信端末13は、ルータC40のLAN側アドレスを取得する(矢印F)。ルータB30のWAN側アドレスを用いて取得したルータC40のLAN側アドレスと、TTL=2のTTLパケットに対応するTTL応答パケットから得たLAN側アドレスとが一致するため、第4の通信端末13は、ルータA20とルータC40との間にあるルータを全て検出したと判断する。このように、第4の通信端末13は、TTLを処理しないルータを検出することによって、宅内ネットワーク1内の全てのルータを検出する。   The fourth communication terminal 13 acquires the WAN address of the router B30 (arrow E). The fourth communication terminal 13 estimates the LAN address of the upper router from the WAN address of the router B30 and transmits the estimated router packet. Thereby, the 4th communication terminal 13 acquires the LAN side address of the router C40 (arrow F). Since the LAN side address of the router C40 obtained using the WAN side address of the router B30 matches the LAN side address obtained from the TTL response packet corresponding to the TTL packet with TTL = 2, the fourth communication terminal 13 It is determined that all the routers between the router A20 and the router C40 have been detected. As described above, the fourth communication terminal 13 detects all routers in the home network 1 by detecting routers that do not process TTL.

図39は、第4の通信端末13の構成を示すブロック図である。第4の通信端末13は、制御部101と、ルータディスカバリ用パケット作成部132と、受信パケット解析部103と、パケット送受信部104と、通信部105と、アドレス空間衝突検出部126と、WAN側アドレス取得部111と、ルータアドレス検証部131とを備える。第4の通信端末13は、ルータアドレス検証部131と、ルータディスカバリ用パケット作成部112に代えてルータディスカバリ用パケット作成部132をさらに備える点が、図22に示す第2の通信端末11と異なる。ルータアドレス検証部131は、TTL応答パケットの送信元ルータのLAN側アドレスの正当性を検証する。すなわち、ルータアドレス検証部131は、検出されていないルータが存在するか否かを検証する。なお、第2の通信端末11と同一の構成に対しては、同じ参照番号を付し、その説明を省略する。   FIG. 39 is a block diagram showing a configuration of the fourth communication terminal 13. The fourth communication terminal 13 includes a control unit 101, a router discovery packet creation unit 132, a received packet analysis unit 103, a packet transmission / reception unit 104, a communication unit 105, an address space collision detection unit 126, and a WAN side. An address acquisition unit 111 and a router address verification unit 131 are provided. The fourth communication terminal 13 is different from the second communication terminal 11 shown in FIG. 22 in that it further includes a router address verification unit 131 and a router discovery packet creation unit 132 instead of the router discovery packet creation unit 112. . The router address verification unit 131 verifies the validity of the LAN side address of the transmission source router of the TTL response packet. That is, the router address verification unit 131 verifies whether there is a router that has not been detected. In addition, the same reference number is attached | subjected to the structure same as the 2nd communication terminal 11, and the description is abbreviate | omitted.

図40及び図41を用いて、第4の通信端末13が行うアドレス空間の衝突判定処理について説明する。図40は、ルータ応答パケットの受信処理を示すフローチャートである。図41は、TTL応答パケットの受信処理を示すフローチャートである。   The address space collision determination process performed by the fourth communication terminal 13 will be described with reference to FIGS. 40 and 41. FIG. 40 is a flowchart showing the reception processing of the router response packet. FIG. 41 is a flowchart showing a TTL response packet reception process.

まず、ルータディスカバリ用パケット送信処理について説明する。第4の通信端末は、図4に示すフローチャートに従って、TTLパケット送信処理をするため、その説明を省略する。なお、第3の実施形態で説明したように、第3の通信端末12は、ICMPメッセージを処理しないルータを検出した場合、TTLパケット送信処理を中止する。しかし、第4の通信端末13は、TTL応答パケットを用いてTTLを処理しないルータを検出することはできないため、ルータのLAN側アドレスがグローバルアドレスとなるまで、TTLパケット送信処理の中止しない。この点が、第3の実施形態と異なる。また、第4の通信端末13は、図28に示すフローチャートに従って第2のディスカバリ用パケットの送信処理をするため、その説明を省略する。   First, router discovery packet transmission processing will be described. The fourth communication terminal performs TTL packet transmission processing according to the flowchart shown in FIG. As described in the third embodiment, when the third communication terminal 12 detects a router that does not process the ICMP message, the third communication terminal 12 stops the TTL packet transmission process. However, since the fourth communication terminal 13 cannot detect a router that does not process TTL using the TTL response packet, the TTL packet transmission processing is not stopped until the LAN address of the router becomes a global address. This point is different from the third embodiment. Also, the fourth communication terminal 13 performs the second discovery packet transmission process according to the flowchart shown in FIG.

図40を用いて、ルータ応答パケットの受信処理について説明する。制御部101は、ルータディスカバリ用パケットの送信処理をルータディスカバリ用パケット作成部102に指示すると、受信パケット解析部103にルータ応答パケットの受信処理を指示する。受信パケット解析部103は、ルータ応答パケットの受信を待機する(ステップS411)。受信パケット解析部103は、ルータ応答パケットを受信した場合、ルータ応答パケットが、TTL応答パケットであるか、推定ルータ応答パケットであるか否かを判断する(ステップS412)。   The router response packet reception process will be described with reference to FIG. When the control unit 101 instructs the router discovery packet creation unit 102 to transmit the router discovery packet, the control unit 101 instructs the reception packet analysis unit 103 to receive the router response packet. The received packet analysis unit 103 waits for reception of a router response packet (step S411). When receiving the router response packet, the received packet analysis unit 103 determines whether the router response packet is a TTL response packet or an estimated router response packet (step S412).

ルータ応答パケットがTTL応答パケットである場合(ステップS412、No)、受信パケット解析部103は、ステップS413〜S417に示す処理を実行する。以下に説明する。受信パケット解析部103は、TTL応答パケットを通信部105及びパケット送受信部104を介して受信する。受信パケット解析部103は、TTL応答パケットの受信処理を行う(ステップS413)。ステップS413の処理の詳細については、図41を用いて説明する。   When the router response packet is a TTL response packet (No in step S412), the received packet analysis unit 103 executes the processes shown in steps S413 to S417. This will be described below. The reception packet analysis unit 103 receives the TTL response packet via the communication unit 105 and the packet transmission / reception unit 104. The reception packet analysis unit 103 performs reception processing of the TTL response packet (step S413). Details of the processing in step S413 will be described with reference to FIG.

図41において、受信パケット解析部103は、TTL応答パケットに含まれる送信先ポート番号を取り出し、送信先ポート番号を元にTTLパケットを送信した際のTTL値を特定する。ここでは、TTL=Nであるとして説明を行う。受信パケット解析部は、TTL=Nに設定されたTTLパケットに対応するTTL応答パケットの送信元ルータのLAN側アドレスを取り出す(ステップS451)。   In FIG. 41, the received packet analysis unit 103 extracts the transmission destination port number included in the TTL response packet, and identifies the TTL value when the TTL packet is transmitted based on the transmission destination port number. Here, description will be made assuming that TTL = N. The received packet analysis unit extracts the LAN address of the transmission source router of the TTL response packet corresponding to the TTL packet set to TTL = N (step S451).

受信パケット解析部103は、制御部101を通じてWAN側アドレス取得部111に、TTL=N−1に設定したTTLパケットによって検出されたルータのWAN側アドレスを取得するように指示する(ステップS452)。   The received packet analysis unit 103 instructs the WAN side address acquisition unit 111 through the control unit 101 to acquire the WAN side address of the router detected by the TTL packet set to TTL = N−1 (step S452).

受信パケット解析部103は、制御部101を通じてルータアドレス検証部131に、取得したWAN側アドレスの検証を指示する。ルータアドレス検証部131は、TTL=Nに対応するルータのLAN側アドレスから推測されるアドレス空間内と、TTL=N−1に対応するルータのWAN側アドレスとを比較し、TTL=N−1のWAN側アドレスが、TTL=NのルータのLAN側アドレス空間の範囲内であるか否かを判断する(ステップS453)。TTL=N−1のルータのWAN側アドレスが、TTL=NのルータのLAN側アドレス空間の範囲内でない場合、ルータアドレス検証部131は、ルータディスカバリ用パケット作成部132に、TTL=N−1に対応するルータのWAN側アドレスを用いた推定ルータパケットの作成を指示して(ステップS454)、図35のステップS414に進む。   The received packet analysis unit 103 instructs the router address verification unit 131 to verify the acquired WAN address through the control unit 101. The router address verification unit 131 compares the address space inferred from the LAN address of the router corresponding to TTL = N with the WAN address of the router corresponding to TTL = N−1, and TTL = N−1. It is determined whether or not the WAN side address is within the LAN side address space of the router with TTL = N (step S453). If the WAN address of the router with TTL = N−1 is not within the range of the LAN address space of the router with TTL = N, the router address verification unit 131 sends the TTL = N−1 to the router discovery packet creation unit 132. 35 is instructed to create an estimated router packet using the WAN address of the router corresponding to (step S454), and the process proceeds to step S414 in FIG.

図35に戻って、TTL応答パケットの受信処理の続きを説明する。受信パケット解析部103は、検出したルータのLAN側アドレスが、ローカルアドレスであるか否か判断する(ステップS414)。検出したルータのLAN側アドレスがローカルアドレスの場合、アドレス空間衝突検出部126は、アドレス空間推定処理(ステップS415)及びアドレス衝突判定処理(ステップS416)を実行する。アドレス空間推定処理及びアドレス衝突判定処理は、第1の実施形態で説明した処理と同様であるため、その説明を省略する。そして、受信パケット解析部103は、ルータ応答パケットの受信待機状態に戻る(ステップS411)。   Returning to FIG. 35, the continuation of the TTL response packet reception process will be described. The received packet analysis unit 103 determines whether or not the detected LAN address of the router is a local address (step S414). If the detected LAN side address of the router is a local address, the address space collision detection unit 126 executes an address space estimation process (step S415) and an address collision determination process (step S416). Since the address space estimation process and the address collision determination process are the same as those described in the first embodiment, the description thereof is omitted. Then, the received packet analysis unit 103 returns to the router response packet reception standby state (step S411).

一方、ステップS414において、検出したルータのLAN側アドレスがローカルアドレスでない場合、受信パケット解析部103は、制御部101を通じてルータディスカバリ用パケット作成部132に、TTLパケット送信処理の中止を指示する(ステップS417)。受信パケット解析部103は、他のルータ応答パケットを受信する必要があるか否かを判断する(ステップS418)。具体的には、推定ルータ応答パケットや、今回受信したTTL=Nより小さい値に設定されたTTLパケットに対応するTTL応答パケットを受信する必要があるかないかを判断する。他のルータ応答パケットを受信する必要がない場合、受信パケット解析部103は、図35に示す処理を終了する。他のルータ応答パケットを受信する必要がある場合、受信パケット解析部103は、ルータ応答パケットの受信待機状態に戻る(ステップS411)。このようにして、受信パケット解析部103は、TTL応答パケットの受信処理を行う。   On the other hand, when the detected LAN address of the router is not a local address in step S414, the received packet analysis unit 103 instructs the router discovery packet creation unit 132 through the control unit 101 to stop the TTL packet transmission process (step S414). S417). The received packet analysis unit 103 determines whether it is necessary to receive another router response packet (step S418). Specifically, it is determined whether it is necessary to receive an estimated router response packet or a TTL response packet corresponding to a TTL packet set to a value smaller than TTL = N received this time. When it is not necessary to receive another router response packet, the received packet analysis unit 103 ends the process shown in FIG. If it is necessary to receive another router response packet, the received packet analysis unit 103 returns to the router response packet reception standby state (step S411). In this way, the received packet analysis unit 103 performs reception processing of the TTL response packet.

ステップS412において、受信したルータ応答パケットが、推定ルータ応答パケットである場合、受信パケット解析部103は、ステップS419〜S425に示す処理を実行する。以下に説明する。   In step S412, when the received router response packet is an estimated router response packet, the received packet analysis unit 103 performs the processes shown in steps S419 to S425. This will be described below.

受信パケット解析部103は、推定ルータ応答パケットを受信すると、推定ルータ応答パケットを解析して、送信元ルータのLAN側アドレスを取得する(ステップS419)。推定ルータパケットにUPnPを利用する場合、受信パケット解析部103は、推定ルータ応答パケットから、アクション送信のための情報であるデバイスディスクリプション及びサービスディスクリプションを取得する。受信パケット解析部103は、制御部101を通じてルータディスカバリ用パケット作成部132に、推定ルータパケットの送信処理の中止を指示する(ステップS420)。   When receiving the estimated router response packet, the received packet analysis unit 103 analyzes the estimated router response packet and obtains the LAN address of the transmission source router (step S419). When UPnP is used for the estimated router packet, the received packet analysis unit 103 acquires a device description and a service description, which are information for action transmission, from the estimated router response packet. The received packet analysis unit 103 instructs the router discovery packet creation unit 132 to stop the transmission process of the estimated router packet through the control unit 101 (step S420).

受信パケット解析部103は、取得したルータのLAN側アドレスと、TTL=Nのルータディスカバリ用パケットで得たルータのLAN側アドレスとが、一致するか否か確認する(ステップS421)。一致する場合、受信パケット解析部103は、ステップS418に進む。ステップS418以降の処理については、TTL応答パケットの受信処理において既に説明しているため、その説明を省略する。   The received packet analysis unit 103 checks whether or not the acquired LAN address of the router matches the LAN address of the router obtained by the router discovery packet with TTL = N (step S421). If they match, the received packet analysis unit 103 proceeds to step S418. Since the processing after step S418 has already been described in the reception processing of the TTL response packet, the description thereof is omitted.

一方、一致しない場合、アドレス空間衝突検出部126は、アドレス空間推定処理(ステップS422)とアドレス衝突判定処理(ステップS423)とを実行する。取得したルータのLAN側アドレスとTTL=Nに設定されたTTLパケットで得たルータのLAN側アドレスとが一致しない場合、TTL=Nに設定したTTLパケットで検出されたルータと今回検出したルータとの間に、他のルータが存在する可能性があるため、受信パケット解析部103は、制御部101を通じてWAN側アドレス取得部111に、今回検出したルータのWAN側アドレスの取得を指示する(ステップS424)。受信パケット解析部103は、制御部101を通じてルータディスカバリ用パケット作成部102に、取得したWAN側アドレス用いた推定ルータパケットの送信処理を指示する(ステップS425)。そして、受信パケット解析部103は、ルータ応答パケットの受信待機状態に戻る(ステップS411)。以上のようにして、受信パケット解析部103は、ルータのWAN側アドレスを用いて上位ルータのLAN側アドレスを推測したルータディスカバリ用パケットに対するルータ応答パケットの受信処理を行う。   On the other hand, if they do not match, the address space collision detection unit 126 executes an address space estimation process (step S422) and an address collision determination process (step S423). If the acquired LAN address of the router and the LAN address of the router obtained by the TTL packet set to TTL = N do not match, the router detected by the TTL packet set to TTL = N and the router detected this time Since there is a possibility that another router exists, the received packet analysis unit 103 instructs the WAN address acquisition unit 111 through the control unit 101 to acquire the WAN address of the router detected this time (step S424). The received packet analysis unit 103 instructs the router discovery packet creation unit 102 to transmit the estimated router packet using the acquired WAN side address through the control unit 101 (step S425). Then, the received packet analysis unit 103 returns to the router response packet reception standby state (step S411). As described above, the received packet analysis unit 103 performs a router response packet reception process for a router discovery packet in which the LAN address of the upper router is estimated using the WAN address of the router.

このように、第4の実施形態に係るアドレス空間衝突検出装置は、検出したルータのLAN側アドレスと、検出したルータの下位ルータのLAN側アドレスを取得し、それぞれのアドレス空間が一致するか否かを判断する。一致しない場合、アドレス空間衝突検出装置は、TTLを処理しないルータが検出したルータと検出したルータの下位ルータとの間に存在すると判断して、推定ルータパケットを用いてTTLを処理しないルータのLAN側アドレスを取得する。以上のような動作をすることによって、TTLを処理しないルータを含む宅内ネットワークであっても、アドレス空間の衝突の検出を高速に行うアドレス空間衝突検出装置を提供することが可能となる。   As described above, the address space collision detection device according to the fourth embodiment acquires the detected LAN side address of the router and the detected LAN side address of the lower router of the router, and whether or not each address space matches. Determine whether. If they do not match, the address space collision detection device determines that the router that does not process TTL exists between the router detected by the router that does not process TTL and the lower router of the detected router, and the router LAN that does not process TTL using the estimated router packet Get side address. By performing the operation as described above, it is possible to provide an address space collision detection device that detects address space collision at high speed even in a home network including a router that does not process TTL.

また、第4の実施形態において、アドレス空間推定処理は、第1の実施形態と同様の方法を行うものとして説明した。しかし、アドレス空間推定処理は、ICMP TIME EXCEEDED MESSAGEを利用するため、第4の通信端末13は、ICMPメッセージをフィルタリングするルータに対して、第1の実施形態と同様のアドレス空間の推定処理を行うことができない。この場合、第3の通信端末12は、ICMPメッセージをフィルタリングするルータのアドレス空間がクラスCのアドレス空間であると推測してもよい。また、httpメッセージやSNMPなどのプロトコルを利用して、ICMPメッセージをフィルタリングするルータのアドレス空間を読み出してもよい。   In the fourth embodiment, the address space estimation process has been described as performing the same method as in the first embodiment. However, since the address space estimation process uses ICMP TIME EXCEEDED MESSAGE, the fourth communication terminal 13 performs the same address space estimation process as in the first embodiment on the router that filters the ICMP message. I can't. In this case, the third communication terminal 12 may estimate that the address space of the router that filters the ICMP message is a class C address space. Further, the address space of the router for filtering the ICMP message may be read using a protocol such as an http message or SNMP.

なお、第1〜第4の実施形態において、アドレス空間の衝突検出は、端末またはルータの機能部が行うものとして説明したが、アドレス空間の衝突検出機能を全てソフトウェア(アドレス空間衝突検出ソフトウェア)として実装してもよい。このようにすることによって、PC等の情報処理装置にアドレス空間衝突検出ソフトウェアをインストールすることで、PC等の情報処理装置を第1〜第4の実施形態で説明したアドレス空間衝突検出装置としてどうさせることが可能となる。また、アドレス空間衝突検出ソフトウェアを、CD−ROM、メモリカード、フロッピー(登録商標)ディスクなどの記憶媒体に記憶してもよい。このようにすることによって、本記憶媒体を用いて、PC等の情報処理装置にアドレス空間衝突検出ソフトウェアをインストールすることが可能となる。   In the first to fourth embodiments, the address space collision detection has been described as being performed by the functional unit of the terminal or the router. However, all address space collision detection functions are software (address space collision detection software). May be implemented. In this way, by installing the address space collision detection software in the information processing apparatus such as a PC, the information processing apparatus such as the PC can be used as the address space collision detection apparatus described in the first to fourth embodiments. It becomes possible to make it. The address space collision detection software may be stored in a storage medium such as a CD-ROM, a memory card, or a floppy (registered trademark) disk. By doing so, it is possible to install the address space collision detection software in an information processing apparatus such as a PC using this storage medium.

また、第2〜第4の実施形態において、通信端末がアドレス空間検出機能を備えるものとして説明した。しかし、第1の実施形態と同様に、宅内ネットワーク1の各ルータがアドレス空間検出機能を備えてもよい。   In the second to fourth embodiments, the communication terminal has been described as having an address space detection function. However, as in the first embodiment, each router of the home network 1 may have an address space detection function.

また、第2〜第4の実施形態において、ルータが3台接続された宅内ネットワーク1を例にして説明を行った。しかし、ルータの接続台数はこれに限られない。第1の実施形態と同様に、アドレス空間衝突検出装置は、ルータが1台からN台(Nは2以上の自然数)で構成される宅内ネットワークや企業内ネットワークに対して適用することが可能である。また、通信端末とインターネット2との間に存在するルータが1つである場合、通信端末は、検出したルータのLAN側アドレス空間と、インターネット2のアドレス空間(図1のルータDのLAN側アドレス空間)とが衝突しているか否かを判定してもよい。   In the second to fourth embodiments, the explanation has been given by taking the home network 1 to which three routers are connected as an example. However, the number of connected routers is not limited to this. Similar to the first embodiment, the address space collision detection device can be applied to a home network or a corporate network where one to N routers (N is a natural number of 2 or more). is there. In addition, when there is one router between the communication terminal and the Internet 2, the communication terminal detects the detected LAN side address space of the router and the address space of the Internet 2 (LAN side address of the router D in FIG. 1). It may be determined whether or not the space is colliding.

また、第2〜第4の実施形態において、アドレス空間衝突検出処理装置は、第1の実施形態と同様に、アドレス空間の衝突を検出した場合、アドレス空間の衝突を検出した旨をユーザに通知するユーザ通知部107を備えてもよい。また、第2の通信端末11は、第1の実施形態と同様に、宅内ネットワーク1におけるアドレス空間の衝突を検出した場合、衝突が発生しているルータの設定を自動的に変更するアドレス空間設定修正部108をさらに備えていてもよい。   In the second to fourth embodiments, the address space collision detection processing device notifies the user that the address space collision has been detected when the address space collision is detected, as in the first embodiment. The user notification unit 107 may be provided. Similarly to the first embodiment, when the second communication terminal 11 detects an address space collision in the home network 1, an address space setting for automatically changing the setting of the router in which the collision occurs. A correction unit 108 may be further provided.

また、第3及び第4の実施形態において、第1の実施形態で説明したTTLを変化させたルータディスカバリ用パケットをTTL=1からインクリメントして送信する方法を用いて、ルータのアドレス情報を検出する過程で問題を検出した時に、第2の実施形態で説明したルータのLAN側アドレスを推測してルータディスカバリ用パケットを送信して、ルータのアドレス情報を取得する方法について説明した。しかし、上記の方法は一例であり、第1の実施形態で説明した方法と第2の実施形態で説明した方法とを、最初から同時に実行してもよい。この場合、得られた結果を合成するように制御することによって、第3及び第4の実施形態と同様の効果を得ることが可能になる。   In the third and fourth embodiments, the router address information is detected by using the method for transmitting the router discovery packet in which the TTL is changed as described in the first embodiment, incrementing from TTL = 1. A method has been described in which when a problem is detected in the process, the router side packet described in the second embodiment is estimated and a router discovery packet is transmitted to acquire router address information. However, the above method is an example, and the method described in the first embodiment and the method described in the second embodiment may be executed simultaneously from the beginning. In this case, it is possible to obtain the same effect as in the third and fourth embodiments by controlling to synthesize the obtained results.

本発明に係るアドレス空間衝突の検出方法及びアドレス空間衝突の検出装置は、2つ以上のルータが接続された宅内ネットワーク内の各ルータのアドレス空間の衝突を判定が可能であり、アドレス空間衝突の検出方法及びアドレス空間衝突の検出装置に関し、より特定的には、2つ以上のルータが接続されたネットワークにおける、アドレス空間衝突の検出方法及びアドレス空間衝突の検出装置として有用である。   The address space collision detection method and the address space collision detection apparatus according to the present invention can determine the address space collision of each router in a home network to which two or more routers are connected. More specifically, the present invention is useful as an address space collision detection method and an address space collision detection device in a network in which two or more routers are connected.

第1の実施形態に係るアドレス空間検出装置が用いられるネットワークの一例を示す図The figure which shows an example of the network where the address space detection apparatus which concerns on 1st Embodiment is used. 第1の通信端末10の構成を示すブロック図Block diagram showing the configuration of the first communication terminal 10 第1の通信端末10が行うアドレス空間の衝突検出処理を示すフローチャートThe flowchart which shows the collision detection process of the address space which the 1st communication terminal 10 performs TTLパケット送信処理のフローチャートTTL packet transmission processing flowchart UDPを用いる場合の、TTLパケットの構成を示す図The figure which shows the structure of the TTL packet when using UDP TTLパケットにおける、TTLと宛先ポート番号との対応関係の一例を示す図The figure which shows an example of the correspondence of TTL and a destination port number in a TTL packet TTLパケットとTTL応答パケットとの対応を示す図The figure which shows a response | compatibility with a TTL packet and a TTL response packet TTL応答パケットの一例を示す図The figure which shows an example of a TTL response packet ルータ応答パケット受信処理を示すフローチャートFlowchart showing router response packet reception processing アドレス空間衝突検出部106が行うアドレス空間の推定処理を示すフローチャートA flowchart showing an address space estimation process performed by the address space collision detection unit 106 ICMPを用いたアドレス範囲推定パケットのフォーマットを示す図The figure which shows the format of the address range estimation packet using ICMP アドレス範囲推定パケットの送信先とアドレス範囲推定パケットの応答との対応関係の一例を示す図The figure which shows an example of the correspondence of the transmission destination of an address range estimation packet, and the response of an address range estimation packet アドレス衝突判定処理のフローチャートFlow chart of address collision judgment processing 第1の通信端末の他のブロック構成例を示す図The figure which shows the other block structural example of a 1st communication terminal. アドレス空間の衝突の一例を示す図Diagram showing an example of address space collision ユーザ通知部107の表示の一例を示す図The figure which shows an example of a display of the user notification part 107 アドレス空間の衝突の他の例を示す図Diagram showing another example of address space collision ユーザ通知部107の表示の他の例を示す図The figure which shows the other example of a display of the user notification part 107. 第1の通信端末10の他のブロック構成例を示す図The figure which shows the other block structural example of the 1st communication terminal 10. TTLとシーケンス番号とを対応させた場合の一例を示す図The figure which shows an example at the time of making TTL respond | correspond to a sequence number 第2の実施形態に係るアドレス空間衝突検出装置が用いられるネットワークの一例を示す図The figure which shows an example of the network where the address space collision detection apparatus which concerns on 2nd Embodiment is used. 第2の通信端末11の構成を示すブロック図Block diagram showing the configuration of the second communication terminal 11 第2の通信端末11が行うアドレス空間の衝突検出処理を説明する図The figure explaining the collision detection process of the address space which the 2nd communication terminal 11 performs 推定ルータパケットのデータ部の一例を示す図The figure which shows an example of the data part of an estimation router packet 推定ルータ応答パケットのデータ部の一例を示す図The figure which shows an example of the data part of a presumed router response packet GetExternalIPAddressアクションの一例を示す図The figure which shows an example of GetExternalIPAddress action GetExternalIPAddressアクションに対する応答の一例を示す図The figure which shows an example of the response with respect to GetExternalIPAddress action 推定ルータパケットの送信処理を説明する図The figure explaining the transmission processing of an estimation router packet 推定ルータパケットの送信先として推測する上位ルータのLAN側アドレスの一例を示す図The figure which shows an example of the LAN side address of the high-order router guessed as a transmission destination of a presumed router packet 第3の実施形態に係るアドレス空間衝突検出装置が用いられるネットワークの一例を示す図The figure which shows an example of the network where the address space collision detection apparatus which concerns on 3rd Embodiment is used. 第3の通信端末12の構成を示すブロック図Block diagram showing the configuration of the third communication terminal 12 第3の通信端末12のルータの検出動作の概要を説明する図The figure explaining the outline | summary of the detection operation of the router of the 3rd communication terminal 12 第3の通信端末12のアドレス空間衝突の検出動作全体を示すフローチャートThe flowchart which shows the whole detection operation | movement of the address space collision of the 3rd communication terminal 12. TTLパケット送信処理を示すフローチャートFlow chart showing TTL packet transmission processing タイムアウト検出部121がタイムアウトを検出した際に第3の通信端末12が行う処理を示すフローチャートThe flowchart which shows the process which the 3rd communication terminal 12 performs when the timeout detection part 121 detects timeout. ルータ応答パケットの受信処理を示すフローチャートFlowchart showing reception processing of router response packet 第4の実施形態に係るアドレス空間衝突検出装置が用いられるネットワークの一例を示す図The figure which shows an example of the network where the address space collision detection apparatus which concerns on 4th Embodiment is used. 第4の実施形態に係るアドレス空間衝突検出装置の動作の概要を説明する図The figure explaining the outline | summary of operation | movement of the address space collision detection apparatus which concerns on 4th Embodiment. 第4の通信端末13の構成を示すブロック図Block diagram showing the configuration of the fourth communication terminal 13 ルータ応答パケットの受信処理を示すフローチャートFlowchart showing reception processing of router response packet TTL応答パケットの受信処理を示すフローチャートFlowchart showing reception processing of TTL response packet 特許文献1が示すアドレス空間衝突の検出方法の問題点を説明する図The figure explaining the problem of the detection method of the address space collision which patent document 1 shows 特許文献1が示すアドレス空間の衝突検出方法を示す図The figure which shows the collision detection method of the address space which patent document 1 shows

符号の説明Explanation of symbols

10、11、12、13 通信端末
20、30、40、50 ルータ
201、301、401、501 WAN側通信I/F
202、302、402、502 LAN側通信I/F
101 制御部
102、112、122、132 ルータディスカバリ用パケット作成部
103 受信パケット解析部
104 パケット送受信部
105 通信部
106、116、126 アドレス空間衝突検出部
107 ユーザ通知部
108 アドレス空間設定修正部
111 WAN側アドレス取得部
121 タイムアウト検出部
131 ルータアドレス検証部
10, 11, 12, 13 Communication terminal 20, 30, 40, 50 Router 201, 301, 401, 501 WAN side communication I / F
202, 302, 402, 502 LAN side communication I / F
101 Control unit 102, 112, 122, 132 Router discovery packet creation unit 103 Received packet analysis unit 104 Packet transmission / reception unit 105 Communication unit 106, 116, 126 Address space collision detection unit 107 User notification unit 108 Address space setting modification unit 111 WAN Side address acquisition unit 121 timeout detection unit 131 router address verification unit

Claims (16)

外部ネットワークに接続するローカルネットワークにおいて、当該ローカルネットワーク内の通信機器と当該外部ネットワークとの間に1つ以上の中継装置が直列に接続されており、当該1つ以上の中継装置がそれぞれ備えるLAN側インターフェースに設定されたLAN側アドレス空間の衝突を検出する、当該通信機器に組み込まれたアドレス空間衝突検出装置であって、
前記1つ以上の中継装置とパケットの送受信を行うパケット送受信部と、
前記1つ以上の中継装置を検出するための1つ以上のルータディスカバリ用パケットを作成し、前記パケット送受信部に当該ルータディスカバリ用パケットの送信を指示するルータディスカバリ用パケット作成部と、
前記パケット送受信部がそれぞれの前記ルータディスカバリ用パケットに対する応答を受信したことを確認して前記1つ以上の中継装置を検出し、当該応答を参照して前記1つ以上の中継装置のLAN側インターフェースのIPアドレスであるLAN側アドレスを取得する受信パケット解析部と、
前記1つ以上の中継装置のアドレスを用いて前記LAN側アドレス空間を推定し、前記1つ以上の中継装置の相互間、及び前記1つ以上の中継装置と前記外部ネットワークとの相互間において、LAN側アドレス空間の衝突が発生しているか否かを判断するアドレス空間衝突検出部とを備える、アドレス空間衝突検出装置。
In a local network connected to an external network, one or more relay devices are connected in series between a communication device in the local network and the external network, and each of the one or more relay devices includes a LAN side. An address space collision detection device incorporated in the communication device for detecting a collision in a LAN side address space set in an interface,
A packet transmitting / receiving unit that transmits and receives packets to and from the one or more relay devices;
A router discovery packet creating unit that creates one or more router discovery packets for detecting the one or more relay devices, and instructs the packet transmitting / receiving unit to transmit the router discovery packets;
Confirm that the packet transmitting / receiving unit has received a response to each of the router discovery packets, detect the one or more relay devices, and refer to the response to the LAN side interface of the one or more relay devices A received packet analysis unit that acquires a LAN side address that is an IP address of
Estimating the LAN-side address space using addresses of the one or more relay devices, and between the one or more relay devices and between the one or more relay devices and the external network, An address space collision detection apparatus comprising: an address space collision detection unit that determines whether or not a LAN side address space collision has occurred.
前記ルータディスカバリ用パケット作成部は、TTL(Time To Live)を変化させたTTLパケットを、ルータディスカバリ用パケットとして作成し、
前記ルータディスカバリ用パケットに対する応答は、ICMP(Internet Control Message Protocol) TIME EXCEEDED MESSAGEであることを特徴とする、請求項1に記載のアドレス空間衝突検出装置。
The router discovery packet creation unit creates a TTL packet with a changed TTL (Time To Live) as a router discovery packet,
The address space collision detection apparatus according to claim 1, wherein a response to the packet for router discovery is ICMP (Internet Control Message Protocol) TIME EXCEEDED MESSAGE.
前記1つ以上の中継装置は、前記通信機器から外部ネットワークに向けて第1から第N(Nは1以上の自然数)の順に直列に接続されており、
前記アドレス空間衝突検出装置は、
既に検出された前記中継装置のWAN側インターフェースのIPアドレスであるWAN側アドレスを取得するWAN側アドレス取得部とをさらに備え、
前記ルータディスカバリ用パケット作成部は、第1の中継装置のLAN側アドレスを取得し、第i(iは2〜Nの自然数)の中継装置を検出する場合、既に検出された前記第i−1の中継装置のWAN側アドレスを用いて第iの中継装置のLAN側アドレスを推定し、推定した1つ以上のLAN側アドレスを送信先とした第iの推定ルータパケットを、前記ルータディスカバリ用パケットとして作成することを特徴とする、請求項1に記載のアドレス空間衝突検出装置。
The one or more relay devices are connected in series from the first to Nth (N is a natural number of 1 or more) in order from the communication device to the external network,
The address space collision detection device includes:
A WAN address acquisition unit that acquires a WAN address that is an IP address of the WAN interface of the relay device that has already been detected,
The router discovery packet creation unit acquires the LAN address of the first relay device, and when detecting the i-th (i is a natural number from 2 to N) relay device, the i-1th already detected The LAN address of the i-th relay device is estimated using the WAN-side address of the relay device, and the i-th estimated router packet having the estimated one or more LAN-side addresses as the transmission destination is used as the router discovery packet. The address space collision detection device according to claim 1, wherein the address space collision detection device is created as follows.
前記1つ以上の中継装置は、前記通信機器から外部ネットワークに向けて第1から第N(Nは1以上の自然数)の順に直列に接続されており、
前記アドレス空間衝突検出装置は、
既に検出された前記中継装置のWAN側インターフェースのIPアドレスであるWAN側アドレスを取得するWAN側アドレス取得部と、
前記TTLパケットに対する応答のタイムアウトを検出するタイムアウト検出部とをさらに備え、
前記WAN側アドレス取得部は、
前記タイムアウト検出部がTTL=1に設定された前記TTLパケットに対する応答のタイムアウトを検出した場合、前記ルータディスカバリ用パケット作成部が取得する第1の中継装置のLAN側アドレスに基づいて、当該第1の中継装置のWAN側アドレスを取得し、
前記タイムアウト検出部がTTL=i(iは2〜Nの自然数)に設定された前記TTLパケットに対する応答のタイムアウトを検出した場合、既に検出された第i−1の中継装置のWAN側アドレスを取得し、
前記ルータディスカバリ用パケット作成部は、前記タイムアウト検出部がタイムアウトを検出した場合、前記TTLパケットの作成を中止し、前記第i−1の中継装置のWAN側アドレスを用いて第iの中継装置のLAN側アドレスを推定し、推定した1つ以上のLAN側アドレスを送信先とした第iの推定ルータパケットを、前記ルータディスカバリ用パケットとして作成することを特徴とする、請求項2に記載のアドレス空間衝突検出装置。
The one or more relay devices are connected in series from the first to Nth (N is a natural number of 1 or more) in order from the communication device to the external network,
The address space collision detection device includes:
A WAN address acquisition unit that acquires a WAN address that is an IP address of the WAN interface of the relay device that has already been detected;
A timeout detector for detecting a timeout of a response to the TTL packet;
The WAN address acquisition unit
When the timeout detection unit detects a timeout of a response to the TTL packet set to TTL = 1, the first packet is generated based on the LAN address of the first relay device acquired by the router discovery packet creation unit. Obtain the WAN address of the relay device of
When the timeout detection unit detects a timeout of a response to the TTL packet in which TTL = i (i is a natural number of 2 to N), the WAN side address of the already detected i−1th relay device is acquired. And
The packet creation unit for router discovery stops the creation of the TTL packet when the timeout detection unit detects a timeout, and uses the WAN side address of the i-1th relay device to The address according to claim 2, wherein a LAN side address is estimated, and an i-th estimated router packet having the estimated one or more LAN side addresses as destinations is created as the router discovery packet. Spatial collision detection device.
前記1つ以上の中継装置は、前記通信機器から外部ネットワークに向けて第1から第N(Nは1以上の自然数)の順に直列に接続されており、
前記アドレス空間衝突検出装置は、
既に検出された前記中継装置のWAN側インターフェースのIPアドレスであるWAN側アドレスを取得するWAN側アドレス取得部と、
既に検出された前記第i(iは1〜Nの自然数)の中継装置のWAN側アドレスが、既に検出された第j(jはi+1〜N−1の自然数)の中継装置のLAN側アドレス空間の範囲内であるか否かを判定するルータアドレス検証部とをさらに備え、
前記ルータアドレス検証部は、第iの中継装置のWAN側アドレスが第jの中継装置のLAN側アドレス空間の範囲内でない場合、前記WAN側アドレス検出部及び前記ルータディスカバリ用パケット作成部に、一致しない旨を通知し、
前記WAN側アドレス取得部は、前記ルータアドレス検証部の通知に基づいて、前記第iの中継装置のWAN側アドレスを取得し、
前記ルータディスカバリ用パケット作成部は、第1の中継装置のLAN側アドレスを取得し、前記ルータアドレス検証部からの通知に基づいて、前記第iの中継装置のWAN側アドレスを用いて第i+1の中継装置のLAN側アドレスを推定し、推定した1つ以上のLAN側アドレスを送信した第i+1の推定ルータパケットを、前記ルータディスカバリ用パケットとして作成することを特徴とする、請求項2に記載のアドレス空間衝突検出装置。
The one or more relay devices are connected in series from the first to Nth (N is a natural number of 1 or more) in order from the communication device to the external network,
The address space collision detection device includes:
A WAN address acquisition unit that acquires a WAN address that is an IP address of the WAN interface of the relay device that has already been detected;
The LAN-side address space of the already detected j-th (j is a natural number of i + 1 to N−1) WAN address of the i-th (i is a natural number of 1 to N) relay device. And a router address verification unit for determining whether or not it is within the range of
If the WAN address of the i-th relay device is not within the LAN-side address space of the j-th relay device, the router address verification unit matches the WAN-side address detection unit and the router discovery packet creation unit. Notify that,
The WAN address acquisition unit acquires the WAN address of the i-th relay device based on the notification of the router address verification unit;
The router discovery packet creation unit obtains the LAN address of the first relay device, and based on the notification from the router address verification unit, uses the WAN address of the i-th relay device. 3. The router discovery packet according to claim 2, wherein the LAN address of the relay device is estimated, and the i + 1 estimated router packet that transmits the estimated one or more LAN addresses is created as the router discovery packet. Address space collision detection device.
前記1つ以上の中継装置は、前記通信機器から外部ネットワークに向けて第1から第N(Nは1以上の自然数)の順に直列に接続しており、
前記アドレス空間衝突検出装置は、
既に検出された前記の中継装置のWAN側インターフェースのIPアドレスであるWAN側アドレスを取得するWAN側アドレス取得部とをさらに備え、
前記ルータディスカバリ用パケット作成部は、第1の中継装置のLAN側アドレスを取得し、ルータディスカバリ用パケットとして、前記第i(iは1〜Nの自然数)の中継装置のWAN側アドレスを用いて推定した第i+1の中継装置のLAN側アドレスを送信先とした第i+1の推定ルータパケットと、TTL(Time To Live)=i+1に設定した前記TTLパケットとを送信することを特徴とする、請求項2に記載のアドレス空間衝突検出装置。
The one or more relay devices are connected in series from the communication device to the external network in the order of 1st to Nth (N is a natural number of 1 or more),
The address space collision detection device includes:
A WAN address acquisition unit that acquires a WAN address that is an IP address of the WAN interface of the relay device that has already been detected,
The router discovery packet creation unit obtains the LAN address of the first relay device, and uses the WAN address of the i-th (i is a natural number from 1 to N) relay device WAN address as the router discovery packet. The i + 1-th estimated router packet having the destination of the estimated LAN side address of the i + 1-th relay device and the TTL packet set to TTL (Time To Live) = i + 1 are transmitted. 2. The address space collision detection device according to 2.
前記ルータディスカバリ用パケット作成部は、TTLの値と送信先ポート番号とを一対一で対応させた前記TTLパケットを作成することを特徴とする、請求項2または4〜6のいずれかに記載のアドレス空間衝突検出装置。   7. The router discovery packet creation unit creates the TTL packet in which a TTL value and a destination port number are associated one-to-one with the TTL value. 8. Address space collision detection device. 前記推定ルータパケットは、UPnP(Universal Plug and Play) IGD(Internet Gateway Device)仕様に基づくM−Searchであることを特徴とする、請求項3〜6のいずれかに記載のアドレス空間衝突検出装置。   The address space collision detection device according to claim 3, wherein the estimated router packet is an M-Search based on a Universal Plug and Play (UPnP) IGD (Internet Gateway Device) specification. 前記アドレス空間衝突検出部は、検出した前記中継装置のLAN側アドレスを用いて、検出した前記中継装置のLAN側アドレス空間を推定し、
推定した前記LAN側アドレス空間のIPアドレスを送信先としたアドレス空間推定パケットを作成し、前記パケット送受信部が当該アドレス空間推定パケットの応答としてICMP(Internet Control Message Protocol) TIME EXCEEDED MESSAGEを受信した場合、当該アドレス空間推定パケットの送信先のIPアドレスが推定した前記LAN側アドレス空間の範囲外であると判断し、判断結果に基づいて、推定した前記LAN側アドレス空間を更新し、
前記アドレス空間推定パケットのTTL(Time To Live)の値は、前記検出した中継装置と前記通信装置との間に直列に接続される前記中継装置の数に応じた値であることを特徴とする、請求項1に記載のアドレス空間衝突検出装置。
The address space collision detection unit estimates the detected LAN side address space of the relay device using the detected LAN side address of the relay device,
When an address space estimation packet is created with the estimated IP address of the LAN side address space as the destination, and the packet transmitting / receiving unit receives ICMP (Internet Control Message Protocol) TIME EXCEEDED MESSAGE as a response to the address space estimation packet Determining that the IP address of the destination of the address space estimation packet is outside the range of the estimated LAN address space, and updating the estimated LAN address space based on the determination result,
The TTL (Time To Live) value of the address space estimation packet is a value corresponding to the number of the relay devices connected in series between the detected relay device and the communication device. The address space collision detection device according to claim 1.
前記アドレス空間衝突検出部は、検出した前記中継装置のWAN側アドレスを用いて、検出した前記中継装置のWAN側インターフェースと接続する上位中継装置の前記LAN側アドレス空間を推定し、推定した当該上位中継装置のLAN側アドレス空間のIPアドレスを送信先としたアドレス空間推定パケットを作成し、前記パケット送受信部が当該アドレス空間推定パケットの応答としてICMP(Internet Control Message Protocol) TIME EXCEEDED MESSAGEを受信した場合、当該アドレス空間推定パケットの送信先のIPアドレスが推定した当該上位中継装置のLAN側アドレス空間の範囲外であると判断し、判断結果に基づいて、推定した当該上位中継装置のLAN側アドレス空間を更新し、
前記アドレス空間推定パケットのTTL(Time To Live)の値は、前記上位中継装置と前記通信装置との間に直列に接続される前記中継装置の数に応じた値であることを特徴とする、請求項1に記載のアドレス空間衝突検出装置。
The address space collision detection unit estimates the LAN side address space of the higher level relay device connected to the detected WAN side interface of the relay device using the detected WAN side address of the relay device, and estimates the higher level When an address space estimation packet is created with the IP address of the LAN side address space of the relay device as the transmission destination, and the packet transmitting / receiving unit receives ICMP (Internet Control Message Protocol) TIME EXCEEDED MESSAGE as a response to the address space estimation packet The IP address of the destination of the address space estimation packet is determined to be outside the range of the estimated LAN address space of the upper relay apparatus, and the estimated LAN address of the upper relay apparatus is determined based on the determination result Updates between,
The TTL (Time To Live) value of the address space estimation packet is a value corresponding to the number of the relay devices connected in series between the upper relay device and the communication device, The address space collision detection device according to claim 1.
前記アドレス空間衝突検出装置は、LAN側アドレス空間の衝突を検出した場合、ユーザにLAN側アドレス空間の衝突の発生と、LAN側アドレス空間の設定の変更内容とのうち、少なくとも1つを通知するユーザ通知部をさらに備える、請求項1に記載のアドレス空間衝突検出装置。   When the address space collision detection device detects a collision in the LAN side address space, the address space collision detection apparatus notifies the user of at least one of the occurrence of the collision in the LAN side address space and the change in the setting of the LAN side address space The address space collision detection device according to claim 1, further comprising a user notification unit. 前記アドレス空間衝突検出装置は、アドレス空間の衝突を検出した場合、アドレス空間の衝突が発生している前記中継装置にアクセスして、LAN側アドレス空間の設定を変更するアドレス空間設定修正部をさらに備えることを特徴とする、請求項1に記載のアドレス空間衝突検出装置。   The address space collision detection device further includes an address space setting correction unit that accesses the relay device in which the address space collision has occurred and changes the setting of the address space on the LAN side when the address space collision is detected. The address space collision detection device according to claim 1, further comprising: 前記アドレス空間設定修正部は、第i(iは2〜Nの自然数)の中継装置のLAN側アドレス空間と、第j(jは、1〜i−1の自然数)の中継装置のLAN側アドレス空間との衝突を検出した場合、前記第jの中継装置のLAN側アドレス空間の設定を、他の中継装置のLAN側アドレス空間と異なるアドレス空間に変更することを特徴とする、請求項11に記載のアドレス空間衝突検出装置。   The address space setting correction unit includes the LAN side address space of the i-th (i is a natural number from 2 to N) relay device and the LAN side address of the j-th (j is a natural number from 1 to i-1) relay device. 12. When a collision with a space is detected, the setting of the LAN side address space of the j-th relay device is changed to an address space different from the LAN side address space of other relay devices. The address space collision detection device described. 前記アドレス空間衝突検出装置は、前記ローカルネットワーク内を伝送されるデータを中継するためのルーティング部をさらに備え、
前記アドレス空間衝突検出部は、前記ルーティング部と前記1つ以上の中継装置との相互間において、LAN側アドレス空間が衝突しているか否かを検出し、
前記アドレス空間設定修正部は、前記ルーティング部と前記1つ以上の中継装置との相互間において、LAN側アドレス空間の衝突を検出した場合、前記ルーティング部のLAN側アドレス空間を、前記1つ以上の中継装置のLAN側アドレス空間と異なるアドレス空間に変更することを特徴とする、請求項12に記載のアドレス空間衝突検出装置。
The address space collision detection device further includes a routing unit for relaying data transmitted in the local network,
The address space collision detection unit detects whether or not a LAN side address space collides between the routing unit and the one or more relay devices,
When the address space setting correction unit detects a collision of a LAN side address space between the routing unit and the one or more relay devices, the address space setting correction unit sets the one or more LAN side address spaces of the routing unit. The address space collision detection device according to claim 12, wherein the address space is changed to an address space different from the LAN side address space of the relay device.
外部ネットワークに接続するローカルネットワークにおいて、当該ローカルネットワーク内の通信機器と当該外部ネットワークとの間に1つ以上の中継装置が直列に接続されており、当該通信機器が実行可能な、当該1つ以上の中継装置が備える各LAN側インターフェースに設定されたLAN側アドレス空間の衝突を検出するアドレス空間衝突検出方法であって、
前記1つ以上の中継装置を検出するための1つ以上のルータディスカバリ用パケットを作成するステップと、
前記パケット送受信部に当該ルータディスカバリ用パケットの送信を指示するステップと、
前記パケット送受信部がそれぞれの前記ルータディスカバリ用パケットに対する応答を受信したことを確認して前記1つ以上の中継装置を検出するステップと、
当該応答を参照して前記1つ以上の中継装置のLAN側インターフェースのIPアドレスであるLAN側アドレスを取得するステップと、
前記1つ以上の中継装置のアドレスを用いて前記LAN側アドレス空間を推定するステップと、
前記1つ以上の中継装置の相互間、及び前記1つ以上の中継装置と前記外部ネットワークとの相互間において、LAN側アドレス空間の衝突が発生しているか否かを判断するステップとを備える、アドレス空間衝突検出方法。
In the local network connected to the external network, one or more relay devices are connected in series between the communication device in the local network and the external network, and the one or more that can be executed by the communication device An address space collision detection method for detecting a collision in a LAN side address space set in each LAN side interface included in the relay device,
Creating one or more router discovery packets for detecting the one or more relay devices;
Instructing the packet transceiver to transmit the router discovery packet;
Detecting the one or more relay devices by confirming that the packet transmitting / receiving unit has received a response to each of the router discovery packets;
Obtaining a LAN-side address that is an IP address of a LAN-side interface of the one or more relay devices with reference to the response;
Estimating the LAN side address space using addresses of the one or more relay devices;
Determining whether or not a LAN-side address space collision occurs between the one or more relay devices and between the one or more relay devices and the external network. Address space collision detection method.
外部ネットワークに接続するローカルネットワークにおいて、当該ローカルネットワーク内の通信機器と当該外部ネットワークとの間に1つ以上の中継装置が直列に接続されており、当該通信機器が実行可能な、当該1つ以上の中継装置が備える各LAN側インターフェースに設定されたLAN側アドレス空間の衝突を検出するプログラムを記録した記録媒体であって、
前記1つ以上の中継装置を検出するための1つ以上のルータディスカバリ用パケットを作成するステップと、
前記パケット送受信部に当該ルータディスカバリ用パケットの送信を指示するステップと、
前記パケット送受信部がそれぞれの前記ルータディスカバリ用パケットに対する応答を受信したことを確認して前記1つ以上の中継装置を検出するステップと、
当該応答を参照して前記1つ以上の中継装置のLAN側インターフェースのIPアドレスであるLAN側アドレスを取得するステップと、
前記1つ以上の中継装置のアドレスを用いて前記LAN側アドレス空間を推定するステップと、
前記1つ以上の中継装置の相互間、及び前記1つ以上の中継装置と前記外部ネットワークとの相互間において、LAN側アドレス空間の衝突が発生しているか否かを判断するステップとを備えるプログラムを記録した記録媒体。
In the local network connected to the external network, one or more relay devices are connected in series between the communication device in the local network and the external network, and the one or more that can be executed by the communication device A recording medium on which a program for detecting a collision in a LAN address space set in each LAN interface included in the relay device is recorded,
Creating one or more router discovery packets for detecting the one or more relay devices;
Instructing the packet transceiver to transmit the router discovery packet;
Detecting the one or more relay devices by confirming that the packet transmitting / receiving unit has received a response to each of the router discovery packets;
Obtaining a LAN-side address that is an IP address of a LAN-side interface of the one or more relay devices with reference to the response;
Estimating the LAN side address space using addresses of the one or more relay devices;
Determining whether or not a LAN-side address space collision has occurred between the one or more relay devices and between the one or more relay devices and the external network. A recording medium on which is recorded.
JP2005103059A 2005-03-31 2005-03-31 Detecting method of address space collision, and detecting apparatus of address space collision Pending JP2006287478A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005103059A JP2006287478A (en) 2005-03-31 2005-03-31 Detecting method of address space collision, and detecting apparatus of address space collision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005103059A JP2006287478A (en) 2005-03-31 2005-03-31 Detecting method of address space collision, and detecting apparatus of address space collision

Publications (1)

Publication Number Publication Date
JP2006287478A true JP2006287478A (en) 2006-10-19

Family

ID=37408923

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005103059A Pending JP2006287478A (en) 2005-03-31 2005-03-31 Detecting method of address space collision, and detecting apparatus of address space collision

Country Status (1)

Country Link
JP (1) JP2006287478A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011130205A (en) * 2009-12-17 2011-06-30 Canon Inc Information processing apparatus with multiple communication interfaces and control method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011130205A (en) * 2009-12-17 2011-06-30 Canon Inc Information processing apparatus with multiple communication interfaces and control method

Similar Documents

Publication Publication Date Title
US8077632B2 (en) Automatic LAN/WAN port detection
US8103744B2 (en) Consumer equipment remote operation system and operating method for the same
US7436783B2 (en) Method and apparatus for detecting a router that improperly responds to ARP requests
CN101502049B (en) Method and device for identifying and selecting an interface to access a network
US20050220100A1 (en) Device and method for interconnecting network devices
US8725843B2 (en) Method and apparatus for adaptively configuring a router
US7839807B2 (en) Communication apparatus, method executed by communication apparatus, and storage medium storing software for executing method
EP1454256B1 (en) Method and apparatus for adaptively configuring a router
KR20080078802A (en) Device and method to detect applications running on a local network for automatically performing the network address translation
JP2004357016A (en) Apparatus for restricting use of specific address
JP2007104396A (en) Unjust connection preventing system, method, and program
US7873037B2 (en) Information processing device, information processing system, information processing method, and program
US20100302995A1 (en) Router apparatus
JP2006287478A (en) Detecting method of address space collision, and detecting apparatus of address space collision
US9015280B2 (en) Communication terminal, address resolution server, and computer program
KR100975232B1 (en) network apparatus having port auto-configuration function and method thereof
JP2006324737A (en) Communication system, packet processing apparatus, and packet processing method
JP4635523B2 (en) POSITION INFORMATION SYSTEM AND DEVICE USED IN THE SYSTEM, CONCENTRATOR, AND DEVICE MANAGEMENT DEVICE
WO2014132774A1 (en) Node information detection device, node information detection method, and program
JP6076933B2 (en) Switching hub and equipment verification network system
JP4266985B2 (en) COMMUNICATION SYSTEM, GATEWAY DEVICE, AND TERMINAL MAC ADDRESS REUSE METHOD USED FOR THEM
JP2008028989A (en) Communication equipment, method and program for controlling communication equipment
JP5018232B2 (en) COMMUNICATION DEVICE, COMMUNICATION DEVICE CONTROL METHOD, AND COMMUNICATION DEVICE CONTROL PROGRAM
JP2006333187A (en) Communication system, packet processor and packet processing method
JP2006203605A (en) Information processing system, information processing apparatus, communication processing apparatus, and information processing method