JP2016184882A - Control device and system - Google Patents

Control device and system Download PDF

Info

Publication number
JP2016184882A
JP2016184882A JP2015064800A JP2015064800A JP2016184882A JP 2016184882 A JP2016184882 A JP 2016184882A JP 2015064800 A JP2015064800 A JP 2015064800A JP 2015064800 A JP2015064800 A JP 2015064800A JP 2016184882 A JP2016184882 A JP 2016184882A
Authority
JP
Japan
Prior art keywords
address
node
search
packet
node information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2015064800A
Other languages
Japanese (ja)
Other versions
JP6411262B2 (en
Inventor
山田 雄介
Yusuke Yamada
雄介 山田
直 大倉
Tadashi Okura
直 大倉
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.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2015064800A priority Critical patent/JP6411262B2/en
Publication of JP2016184882A publication Critical patent/JP2016184882A/en
Application granted granted Critical
Publication of JP6411262B2 publication Critical patent/JP6411262B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To search for a node an IP address of which is erroneously set from a node in a sub-network.SOLUTION: A control device comprises: a communication unit (140) for transmitting and receiving packets on a sub-network; a search unit (170) for searching for a target node by transmitting a search request packet via the communication unit and receiving a search response packet; and a node information management unit (150) for passively detecting the presence of a start-up node on the sub-network every time a packet is received to manage the start-up node as node information. When transmitting the search request packet, the search unit transmits it to an IP address in the node information held by the node information management unit as a destination by unicast. At that time, for a node of which an IP address is erroneously set, the search unit transmits the search request packet having a MAC address in the corresponding node information as a destination MAC, and a dummy address close to the IP address set erroneously as a transmission source IP address.SELECTED DRAWING: Figure 8

Description

本開示は、制御装置およびシステムに関し、ネットワーク上の目的機器を探索するための制御装置およびシステムに関する。   The present disclosure relates to a control apparatus and system, and relates to a control apparatus and system for searching for a target device on a network.

従来、探索機器が、ネットワーク上の目的機器(以下、被探索機器ともいう)を探索するプロトコルは、IP(Internet Protocol)レベルのパケットを用いるのが一般的である。具体的には、探索機器は、予め定められたマルチキャスト・アドレスを宛先アドレスに、予め定められたポートを宛先ポートにした、特定の形式の「探索要求パケット」を送信し、それに対応する「探索応答パケット」を受信することによって、目的機器を見つける。「探索要求パケット」の宛先アドレスには、マルチキャスト・アドレスの代わりに、ブロードキャスト・アドレスが用いられることもある。他方、被探索機器は、「探索応答パケット」を返信する際には、探索機器を宛先アドレスとする、ユニキャスト・アドレスで返信することが一般的である。探索機器が被探索機器を見つけるためには、行きの「探索要求パケット」が被探索機器に届き、かつ、帰りの「探索応答パケット」が探索機器に届くことが必要である。
しかし、ネットワーク環境によっては、マルチキャスト・パケットやブロードキャスト・パケットが転送されない場合がある。IPレベルのパケットを転送するのはルーターの役割であるが、マルチキャスト転送機能を備えていない場合には、マルチキャスト・パケットは転送されない。また、ルーターがマルチキャスト転送機能を備えていたとしても、マルチキャストSnooping機能が正しく動作しないがために、しばしばマルチキャスト・パケットが転送されないことがある。また、ブロードキャスト・パケットもまれに転送されないことがある。特に無線LAN(Local Area Network)環境においては、転送されないことがある。このようなネットワーク環境においては、被探索機器に「探索要求パケット」が届かないので、探索機器は被探索機器を見つけることができない。
Conventionally, as a protocol for a searcher device to search for a target device (hereinafter also referred to as a searchee device) on a network, an IP (Internet Protocol) level packet is generally used. Specifically, the searching device transmits a “search request packet” in a specific format in which a predetermined multicast address is a destination address and a predetermined port is a destination port, and a corresponding “search” The target device is found by receiving the “response packet”. As the destination address of the “search request packet”, a broadcast address may be used instead of the multicast address. On the other hand, when a search target device returns a “search response packet”, it is common to return the search device with a unicast address with the search device as a destination address. In order for the searching device to find the search target device, it is necessary that the outgoing “search request packet” reaches the search target device and the return “search response packet” reaches the search device.
However, depending on the network environment, multicast packets and broadcast packets may not be transferred. It is the router's role to transfer IP level packets, but multicast packets are not transferred if the multicast transfer function is not provided. Even if the router has a multicast forwarding function, multicast packets are often not forwarded because the multicast snooping function does not operate correctly. In addition, broadcast packets may not be transferred in rare cases. In particular, in a wireless LAN (Local Area Network) environment, the data may not be transferred. In such a network environment, since the “search request packet” does not reach the searched device, the searching device cannot find the searched device.

そこで、マルチキャストまたはブロードキャストによる送信に加えて、宛先アドレスを特定のIPアドレスにした「探索要求パケット」をユニキャストで送信する方法が考えられる。   Therefore, in addition to transmission by multicast or broadcast, a method of transmitting a “search request packet” with a destination address as a specific IP address by unicast is conceivable.

しかし、ユニキャストで送信するにしても、目的機器のIPアドレスが誤って設定されている場合には、ルーターは、目的機器にパケットを転送することができない。ここで、IPアドレスが誤って設定されているというのは、正確に言うと、ルーターの定めるネットワーク・セグメントの範囲にないという意味である。ルーターの定めるネットワーク・セグメントについては、ルーターの設定画面等で確認できる。例えば、LAN側のIPアドレスが192.168.11.1、サブネットマスクが255.255.255.0となっていれば、ネットワーク・セグメントの範囲内にあるIPアドレスとしては192.168.11.2〜192.168.11.254までとなる。ルーターは、自身が管轄しているネットワーク・セグメントの範囲外にあるIPアドレスに対しては、より上位のルーターへ転送しようとする。従って、LAN側に転送されないために、目的機器にパケットが到達することはない。   However, even if the transmission is performed by unicast, if the IP address of the target device is set in error, the router cannot transfer the packet to the target device. Here, the IP address being set erroneously means that it is not within the network segment range defined by the router. You can check the network segment defined by the router on the router setting screen. For example, if the IP address on the LAN side is 192.168.11.1 and the subnet mask is 255.255.255.0, the IP address within the network segment range is 192.168.11. 2 to 192.168.11.254. A router will attempt to forward IP addresses that are outside the network segment it is responsible for to a higher router. Accordingly, since the packet is not transferred to the LAN side, the packet does not reach the target device.

IPアドレスが誤って設定される場合として、例えば、DHCP(Dynamic Host Configuration Protocol)が無効に設定されているケースと、ルーターが交換されるケースが想定される。ネットワークに接続される機器は、通常、初期状態でDHCPが有効になっており、ネットワークに接続するとルーターから動的にIPアドレスが割り振られる。しかし、DHCPが無効に設定されているケースでは、機器のIPアドレスは静的なIPアドレスとなってしまい、IPアドレスの設定が誤っている可能性がある。また、ルーターが交換されるケースでは、各機器に、交換後のルーターによってIPアドレスが再設定されないときは、各機器のIPアドレスの設定は誤っている可能性がある。   As a case where the IP address is set erroneously, for example, a case where DHCP (Dynamic Host Configuration Protocol) is set to invalid and a case where the router is replaced are assumed. Devices connected to the network are normally enabled with DHCP in the initial state, and when connected to the network, an IP address is dynamically allocated from the router. However, in the case where DHCP is set to be invalid, the IP address of the device becomes a static IP address, and there is a possibility that the IP address setting is incorrect. In the case where the router is replaced, if the IP address is not reset for each device by the router after replacement, the IP address setting of each device may be incorrect.

探索機器は、IPアドレスの設定が誤っている目的機器であっても、同じルーターの下に接続されているならば当該機器を発見できることが望まれる。   Even if the search device is a target device with an incorrect IP address setting, it is desirable that the search device can find the device if it is connected to the same router.

探索機器が、目的機器を探索する技術として、例えば、特許文献1(特開2009−49894号公報)は、「複数の機器がネットワークを介して通信するシステムであって、当該システムに属する他の機器から発見されるために、所定時間おきに近隣のルーターに対して小規模な通信を行う機能を有する被発見側機器と、上記システムに属する他の機器を発見するために、自身の近隣のルーターから接続装置情報を取得し、当該接続装置情報に記載された機器と通信することで所望の機器であることを確認する機能を有する発見側機器とを備えるネットワーク通信システム」を開示する。   For example, Patent Document 1 (Japanese Patent Laid-Open No. 2009-49894) discloses a technique in which a search device searches for a target device as follows: “A system in which a plurality of devices communicate via a network, and other devices belonging to the system. In order to be discovered from a device, in order to discover a discovered device that has a function of performing small-scale communication with a neighboring router every predetermined time and other devices belonging to the above system, A network communication system including a discovery device having a function of confirming a desired device by acquiring connection device information from a router and communicating with the device described in the connection device information is disclosed.

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

しかし、特許文献1では、同じルーターに接続された端末装置(またはノード)でありながら、IPアドレスの設定が誤っている端末装置(またはノード)を発見するための構成は示されていない。したがって、特許文献1では、上記の要望に応えることはできない。   However, Patent Document 1 does not show a configuration for finding a terminal device (or node) that is a terminal device (or node) connected to the same router but has an incorrect IP address setting. Therefore, in patent document 1, it cannot respond to said request.

本開示は、かかる実情に鑑み考え出されたものであり、ある局面における目的は、同じサブネットに接続されたノードのうち、アドレスの設定が誤っているノードを探索する制御装置およびシステムを提供することである。   The present disclosure has been devised in view of such circumstances, and an object in one aspect thereof is to provide a control device and a system for searching for a node having an incorrect address setting among nodes connected to the same subnet. That is.

一実施の形態に従うと、ネットワークの同一サブネット上にある目的ノードを探索する制御装置は、サブネット上のパケットを送受信する通信部と、通信部を介して探索要求パケットを送信し、探索応答パケットを受信することによって目的ノードを探索する探索部と、通信部を介してパケットを受信する毎に、サブネット上にある起動ノードの存在を受動的に検出して、ノード情報として管理するノード情報管理部と、を備える。   According to one embodiment, a control device that searches for a target node on the same subnet of a network transmits a search request packet via a communication unit that transmits and receives packets on the subnet, and transmits a search response packet. A search unit that searches for a target node by receiving, and a node information management unit that passively detects the presence of an activation node on a subnet and manages it as node information each time a packet is received via a communication unit And comprising.

探索部は、探索要求パケットを送信する際に、ノード情報管理部にあるノード情報のIPアドレスを宛先IPアドレスにしてユニキャストで送信するが、その際、ノード情報のIPアドレスが誤って設定されていると判断すれば、ノード情報管理部にあるノード情報のMACアドレスを宛先MACアドレスとし、当該誤って設定されているIPアドレスに近いダミーアドレスを生成して、当該ダミーアドレスを送信元IPアドレスにして探索要求パケットを送信する。   When the search unit transmits a search request packet, the IP address of the node information in the node information management unit is transmitted as a destination IP address by unicast, but at this time, the IP address of the node information is set incorrectly. If it is determined that the destination MAC address is the MAC address of the node information in the node information management unit, a dummy address close to the erroneously set IP address is generated, and the dummy address is set as the source IP address. To transmit a search request packet.

好ましくは、探索部は、さらに、探索要求パケットを送信した後に、ダミーアドレスを探索IPアドレスとするARPリクエストを受信したとき、ダミーアドレスを送信者IPアドレスとする当該ARPリクエストに対するARPリプライを送信する。   Preferably, the search unit further transmits an ARP reply for the ARP request having the dummy address as the sender IP address when receiving the ARP request having the dummy address as the search IP address after transmitting the search request packet. .

好ましくは、探索部により、当該ダミーアドレスを宛先IPアドレスとする探索応答パケットを受信したとき、制御装置は、IPアドレスが誤って設定されている目的ノードが探索されたことを示す情報を出力する。   Preferably, when the search unit receives a search response packet having the dummy address as the destination IP address, the control device outputs information indicating that the target node in which the IP address is set incorrectly is searched. .

好ましくは、探索部は、探索要求パケットを送信する際に、マルチキャストで送信するとともに、ノード情報管理部にあるノード情報のIPアドレスを宛先IPアドレスにしてユニキャストで送信する。   Preferably, the search unit transmits the search request packet by multicast and transmits the node information IP address in the node information management unit by unicast using the destination IP address as the destination IP address.

好ましくは、探索部は、探索要求パケットを送信する際に、ブロードキャストで送信するとともに、ノード情報管理部にあるノード情報のIPアドレスを宛先IPアドレスにしてユニキャストで送信する。   Preferably, when the search unit transmits a search request packet, the search unit transmits the packet by broadcast, and transmits the IP address of the node information in the node information management unit as a destination IP address by unicast.

他の実施の形態によれば、ネットワークの同一サブネット上にある複数のノードと、複数のノードから目的ノードを探索する制御装置とを備えるシステムが提供される。   According to another embodiment, a system including a plurality of nodes on the same subnet of a network and a control device that searches for a target node from the plurality of nodes is provided.

制御装置は、サブネット上のパケットを送受信する通信部と、通信部を介して探索要求パケットを送信し、探索応答パケットを受信することによって目的ノードを探索する探索部と、通信部を介してパケットを受信する毎に、サブネット上にある起動ノードの存在を受動的に検出して、ノード情報として管理するノード情報管理部と、を備える。   The control device includes: a communication unit that transmits and receives packets on the subnet; a search unit that transmits a search request packet through the communication unit and receives a search response packet; and a packet through the communication unit. A node information management unit that passively detects the presence of an activation node on the subnet and manages it as node information.

探索部は、探索要求パケットを送信する際に、ノード情報管理部にあるノード情報のIPアドレスを宛先IPアドレスにしてユニキャストで送信するが、その際、ノード情報のIPアドレスが誤って設定されていると判断すれば、ノード情報管理部にあるノード情報のMACアドレスを宛先MACアドレスとし、当該誤って設定されているIPアドレスに近いダミーアドレスを生成して、当該ダミーアドレスを送信元IPアドレスにして探索要求パケットを送信する。   When the search unit transmits a search request packet, the IP address of the node information in the node information management unit is transmitted as a destination IP address by unicast, but at this time, the IP address of the node information is set incorrectly. If it is determined that the destination MAC address is the MAC address of the node information in the node information management unit, a dummy address close to the erroneously set IP address is generated, and the dummy address is set as the source IP address. To transmit a search request packet.

本開示のある局面によれば、制御装置は、ダミーアドレスを送信元にした探索要求パケットに対する探索応答パケットを受信することにより、サブネット体系のアドレスとは異なるアドレスが設定されているノードを探索(発見)することができる。   According to an aspect of the present disclosure, the control device searches for a node in which an address different from the subnet address is set by receiving a search response packet for a search request packet having a dummy address as a transmission source ( Discovery).

実施の形態1に係る通信ネットワーク1の概略構成を説明するための図である。2 is a diagram for explaining a schematic configuration of a communication network 1 according to Embodiment 1. FIG. 図1のHEMS(Home Energy Management System)コントローラ100のブロック図である。FIG. 2 is a block diagram of a HEMS (Home Energy Management System) controller 100 in FIG. 1. 図1のHEMSコントローラ100のソフトウェア構成を説明するための図である。It is a figure for demonstrating the software structure of the HEMS controller 100 of FIG. 実施の形態1に係るノードリスト123の構成の一例を示す図である。6 is a diagram illustrating an example of a configuration of a node list 123 according to Embodiment 1. FIG. 実施の形態1に係るノード情報の構成の一例を示す図である。6 is a diagram showing an example of a configuration of node information according to Embodiment 1. FIG. ARPパケットの構成を示す図である。It is a figure which shows the structure of an ARP packet. 任意のIPパケットの構成を示す図である。It is a figure which shows the structure of arbitrary IP packets. 実施の形態1に係るHEMSコントローラ100の機能的構成を説明するための機能ブロック図である。3 is a functional block diagram for explaining a functional configuration of a HEMS controller 100 according to Embodiment 1. FIG. 実施の形態1に係るノード情報の削除処理を示すフローチャートである。6 is a flowchart showing node information deletion processing according to the first embodiment. 実施の形態1に係るARPリクエストまたはARPリプライを受信した時のノードリストの情報更新の処理を示すフローチャートである。6 is a flowchart showing a node list information update process when receiving an ARP request or an ARP reply according to the first embodiment. 実施の形態1に係るIPパケットを受信した時のノードリスト123の情報更新の処理を示すフローチャートである。7 is a flowchart showing information update processing of the node list 123 when an IP packet according to the first embodiment is received. 本実施の形態1に係る目的ノードを探索する処理を示すフローチャートである。It is a flowchart which shows the process which searches the target node which concerns on this Embodiment 1. 本実施の形態2に係る目的ノードを探索する処理を示すフローチャートである。It is a flowchart which shows the process which searches the target node which concerns on this Embodiment 2. FIG. 実施の形態1に係るサブネットマスク表の一例を示す図である。It is a figure which shows an example of the subnet mask table | surface which concerns on Embodiment 1. FIG. 実施の形態1に係るダミーのIPアドレスを用いた探索シーケンスを模式的に示す図である。FIG. 5 is a diagram schematically showing a search sequence using a dummy IP address according to the first embodiment. 図15の探索シーケンスの探索要求パケットの構成の一例を示す図である。FIG. 16 is a diagram illustrating an example of a configuration of a search request packet in the search sequence of FIG. 15. 図15の探索シーケンスのARPリクエストの構成の一例を示す図である。It is a figure which shows an example of a structure of the ARP request of the search sequence of FIG. 図15の探索シーケンスのARPリプライの構成の一例を示す図である。FIG. 16 is a diagram illustrating an example of a configuration of an ARP reply of the search sequence in FIG. 15. 図15の探索シーケンスの探索応答パケットの構成の一例を示す図である。It is a figure which shows an example of a structure of the search response packet of the search sequence of FIG. 実施の形態3に係る情報の出力例を示す図である。10 is a diagram illustrating an output example of information according to Embodiment 3. FIG.

以下、図面を参照しつつ、本開示の実施の形態について説明する。以下の説明では、同一の部品には同一の符号を付してある。それらの名称および機能も同じである。したがって、それらについての詳細な説明は繰り返さない。   Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. In the following description, the same parts are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed description thereof will not be repeated.

[実施の形態1]
本実施の形態では、サブネットにおいて探索機器により目的ノードの探索処理(図1〜図19参照)が実施される。また、この探索処理では、IPアドレスの設定が誤っている被探索機器を目的ノードとして探索(発見)するために、ダミーのIPアドレスを用いた探索処理(図14〜図19参照)が実施される。
[Embodiment 1]
In the present embodiment, a search process for a target node (see FIGS. 1 to 19) is performed by a search device in a subnet. Further, in this search process, a search process using a dummy IP address (see FIGS. 14 to 19) is performed in order to search (discover) a search target device having an incorrect IP address setting as a target node. The

<通信ネットワーク1の概略構成>
図1は、実施の形態1に係る通信ネットワーク1の概略構成を説明するための図である。図1を参照して、通信ネットワーク1は、無線LANルーター302およびサブネット10を備える。無線LANルーター302は、インターネット等の外部のネットワーク900と接続する。ネットワーク900には、クラウドサーバ等のサーバ装置901が接続される。サーバ装置901は、ブラウザを有した端末902と通信する。端末902は、スマートフォン、タブレット端末、パーソナルコンピュータ等のブラウザを有した端末であれば何であってもよい。
<Schematic configuration of communication network 1>
FIG. 1 is a diagram for explaining a schematic configuration of a communication network 1 according to the first embodiment. With reference to FIG. 1, the communication network 1 includes a wireless LAN router 302 and a subnet 10. The wireless LAN router 302 is connected to an external network 900 such as the Internet. A server device 901 such as a cloud server is connected to the network 900. The server device 901 communicates with a terminal 902 having a browser. The terminal 902 may be any terminal having a browser such as a smartphone, a tablet terminal, or a personal computer.

サブネット10は、HEMSコントローラ100、複数のノード201,202,203…、およびスイッチングハブ300を備える。「ノード」とは、IPアドレスを持つ通信機器(IP対応機器)である。一般的に、ノードは、パーソナルコンピュータ、プリンタ、NAS(Network Attached Storage、ネットワークストレージともいう)、タブレット端末、AV(Audio Visual)機器、および白物家電等を含む。図1では、無線LANルーター302は、有線LAN803を介してHEMSコントローラ100、ノード202、およびスイッチングハブ300に接続され、また、無線LAN802を介してノード203に接続される。ノード201は、スイッチングハブ300に接続され、さらに、スイッチングハブ300を経由して無線LANルーター302に接続される。   The subnet 10 includes a HEMS controller 100, a plurality of nodes 201, 202, 203..., And a switching hub 300. A “node” is a communication device (IP compatible device) having an IP address. In general, the node includes a personal computer, a printer, a NAS (Network Attached Storage, also referred to as network storage), a tablet terminal, an AV (Audio Visual) device, and white goods. In FIG. 1, the wireless LAN router 302 is connected to the HEMS controller 100, the node 202, and the switching hub 300 via the wired LAN 803, and is connected to the node 203 via the wireless LAN 802. The node 201 is connected to the switching hub 300 and further connected to the wireless LAN router 302 via the switching hub 300.

無線LANルーター302に接続される複数のノード201,202,203,…のうちいくつかが、ECHONET Lite機器に相当する「ECHONET Liteノード」である。本実施の形態では、例えば、ノード202と203がECHONET Liteノードである。ノード201は電力モニタである。   Some of the plurality of nodes 201, 202, 203,... Connected to the wireless LAN router 302 are “ECHONET Lite nodes” corresponding to ECHONET Lite devices. In the present embodiment, for example, the nodes 202 and 203 are ECHONET Lite nodes. Node 201 is a power monitor.

HEMSコントローラ100は、通信ネットワーク1において制御装置として機能する。具体的には、HEMSコントローラ100は、複数のノード201,202,203,…と通信することにより、複数のノード201,202,203,…を制御する。   The HEMS controller 100 functions as a control device in the communication network 1. Specifically, the HEMS controller 100 controls the plurality of nodes 201, 202, 203,... By communicating with the plurality of nodes 201, 202, 203,.

本実施の形態では、新規ノード209がサブネット10に参加し、またサブネット10に参加しているノード(以下、「既存ノード」とも称する)がサブネット10から離脱することがある。なお、新規ノード209がネットワークに参加した場合には、新規ノード209は既存ノードとして扱われる。   In the present embodiment, the new node 209 may join the subnet 10, and a node participating in the subnet 10 (hereinafter also referred to as “existing node”) may leave the subnet 10. When the new node 209 joins the network, the new node 209 is treated as an existing node.

図1を参照して、無線LANルーター302、HEMSコントローラ100、および各ノードに関連して示される括弧内の数字(たとえば、192.168.11.1)は、当該機器またはノードのIPアドレスを表している。無線LANルーター302は、DHCP機能を有する。無線LANルーター302は、DHCP機能により、HEMSコントローラ100、および複数のノード202,203,…に対して、図示されるようなIPアドレスを自動的に付与する。付与されたIPアドレスは、各ノードが有する記憶部に格納されるとともに、HEMSコントローラ100では、後述する記憶部160に格納される。また、HEMSコントローラ100および各ノードは、固有の番号を示すMAC(Media Access Control)アドレスが予め設定(記憶)されたLANカード等のネットワークアダプタ(図示せず)を有する。ここでは、MACアドレスは、ノードまたはHEMSコントローラ100に「固有の識別情報」の一実施例であり、また、IPアドレスはノードまたはHEMSコントローラ100に割当てられる「可変の識別情報」の一実施例である。   Referring to FIG. 1, the numbers in parentheses (for example, 192.168.11.1) shown in relation to the wireless LAN router 302, the HEMS controller 100, and each node represent the IP address of the device or node. The wireless LAN router 302 has a DHCP function. The wireless LAN router 302 automatically assigns IP addresses as shown to the HEMS controller 100 and the plurality of nodes 202, 203,... By the DHCP function. The assigned IP address is stored in a storage unit included in each node, and in the HEMS controller 100, is stored in a storage unit 160 described later. The HEMS controller 100 and each node have a network adapter (not shown) such as a LAN card in which a MAC (Media Access Control) address indicating a unique number is preset (stored). Here, the MAC address is an example of “unique identification information” for the node or the HEMS controller 100, and the IP address is an example of “variable identification information” assigned to the node or the HEMS controller 100. is there.

図1を参照して、無線LANルーター302のサブネットマスクが255.255.255.0に設定されていたとする。無線LANルーター302によって付与されたIPアドレスから分かるように、IPアドレスのうちのネットワークアドレスとして使用される部分(たとえば“192.168.11.5”であれば“192.168.11”の部分)が共通であるノードの集合が1つのサブネット10(分割されたネットワーク)を構成している。   Referring to FIG. 1, it is assumed that the subnet mask of wireless LAN router 302 is set to 255.255.255.0. As can be seen from the IP address assigned by the wireless LAN router 302, the node used as a network address in the IP address (for example, “192.168.11” if “192.168.11.5”) is common. A group of the above constitutes one subnet 10 (divided network).

ノード201には、本来ならIPアドレスは“192.168.11.X”が割当てられるはずである。しかし、図1では、ノード201には、DHCPが無効に設定されており、静的なIPアドレス、例えば、 “192.168.100.100”が設定されているものとする。このIPアドレスは、無線LANルーター302が管理するサブネット10の範囲内ではない。従って、HEMSコントローラ100(探索機器)は、ノード201(被探索機器)との間で、通常の方法では、IPレベルのパケットを送受信することができない。   The node 201 should normally be assigned “192.168.11.X” as the IP address. However, in FIG. 1, it is assumed that DHCP is disabled in the node 201 and a static IP address, for example, “192.168.100.100” is set. This IP address is not within the range of the subnet 10 managed by the wireless LAN router 302. Therefore, the HEMS controller 100 (searching device) cannot send and receive IP level packets to and from the node 201 (searched device) by a normal method.

しかしながら、HEMSコントローラ100(探索機器)は、ノード201(被探索機器)から送信されるARP(Address Resolution Protocol)リクエストを受信できる。ARPリクエストは、MACレベルで送受信されるからである。したがって、HEMSコントローラ100は、ノード201を、起動ノードとして検出することができる。   However, the HEMS controller 100 (searching device) can receive an ARP (Address Resolution Protocol) request transmitted from the node 201 (searched device). This is because the ARP request is transmitted and received at the MAC level. Therefore, the HEMS controller 100 can detect the node 201 as an activation node.

本実施の形態では、ノード201にIPアドレスが誤って設定されている場合でも、HEMSコントローラ100は、ダミーのIPアドレスを用いて、IPレベルで、ノード201を探索することができる。   In the present embodiment, even when an IP address is erroneously set in the node 201, the HEMS controller 100 can search for the node 201 at the IP level using a dummy IP address.

なお、本実施の形態では、HEMSコントローラ100は、サブネット10に存在する目的ノードを探索する主体である探索機器の一例であり、ノード201,202,203,…それぞれは、探索の対象となり得る被探索機器の一例である。また、本実施の形態においては、「起動ノード」とは、電源が入り起動中のノードをいう。また、本実施の形態では、“IPアドレスの誤った設定”とは、被探索機器に、サブネット10のサブネット体系に基づくIPアドレスとは異なるIPアドレスが設定されていることを示す。探索機器による探索処理および上述のダミーのIPアドレスを用いた探索処理の詳細については、後述する。   In the present embodiment, the HEMS controller 100 is an example of a search device that is a subject that searches for a target node existing in the subnet 10, and each of the nodes 201, 202, 203,... It is an example of a search device. In the present embodiment, the “startup node” refers to a node that is turned on and activated. Further, in the present embodiment, “IP address incorrect setting” indicates that an IP address different from the IP address based on the subnet system of the subnet 10 is set in the search target device. Details of the search process by the search device and the search process using the dummy IP address described above will be described later.

<HEMSコントローラの構成>
図2は、図1のHEMSコントローラ100のブロック図である。図2を参照して、HEMSコントローラ100は、CPU(Central Processing Unit)1101を備える。HEMSコントローラ100は、さらに、CPU1101に接続されたROM(Read Only Memory)1107、発光素子1103、高速通信インターフェイス1104、電源1105、時間(時刻)を測定するタイマ1106、RAM(Random Access Memory)1102、プッシュボタン1108、スライドスイッチ1109、およびリセットスイッチ(図示しない)を備える。
<Configuration of HEMS controller>
FIG. 2 is a block diagram of the HEMS controller 100 of FIG. Referring to FIG. 2, HEMS controller 100 includes a CPU (Central Processing Unit) 1101. The HEMS controller 100 further includes a ROM (Read Only Memory) 1107 connected to the CPU 1101, a light emitting element 1103, a high-speed communication interface 1104, a power source 1105, a timer 1106 for measuring time (time), a RAM (Random Access Memory) 1102, A push button 1108, a slide switch 1109, and a reset switch (not shown) are provided.

CPU1101は、HEMSコントローラ100の全体的な動作を制御する。CPU1101は、プッシュボタン1108およびスライドスイッチ1109からの入力を受け付ける。また、CPU1101は、発光素子1103に発光指示を出力する。   The CPU 1101 controls the overall operation of the HEMS controller 100. The CPU 1101 receives input from the push button 1108 and the slide switch 1109. In addition, the CPU 1101 outputs a light emission instruction to the light emitting element 1103.

ROM1107はプログラムや変更不可なデータ等が格納される不揮発性のメモリデバイスである。RAM1102はプログラムがロードされ、プログラムのワークエリアやファイルシステム、変更可能なデータ等が格納される揮発性のメモリデバイスである。高速通信インターフェイス1104は、無線LANルーター302との間でEthernet(登録商標)を用いた通信を行なうインターフェイスである。電源1105は、HEMSコントローラ100の各部に電力を供給する。   The ROM 1107 is a non-volatile memory device that stores programs, data that cannot be changed, and the like. The RAM 1102 is a volatile memory device in which a program is loaded and a work area and file system of the program, changeable data, and the like are stored. The high-speed communication interface 1104 is an interface that performs communication with the wireless LAN router 302 using Ethernet (registered trademark). The power source 1105 supplies power to each unit of the HEMS controller 100.

<HEMSコントローラ100のソフトウェア構成>
図3は、図1のHEMSコントローラ100のソフトウェア構成を説明するための図である。図3を参照して、HEMSコントローラ100は、デバイス側アプリケーション110、ホスト側アプリケーション120、および上位層130を少なくとも備える。デバイス側アプリケーション110はUDP(User Datagram Protocol)ソケット111を含む。UDPソケット111は送信用と受信用に使用される。また、ホスト側アプリケーション120は、送信用のUDPソケット121、および送受信用のRAWソケット122を含む。また、ホスト側アプリケーション120は、RAM1102にノードリスト123(後述する)を記憶する。
<Software configuration of HEMS controller 100>
FIG. 3 is a diagram for explaining a software configuration of the HEMS controller 100 of FIG. With reference to FIG. 3, the HEMS controller 100 includes at least a device-side application 110, a host-side application 120, and an upper layer 130. The device side application 110 includes a UDP (User Datagram Protocol) socket 111. The UDP socket 111 is used for transmission and reception. The host-side application 120 includes a UDP socket 121 for transmission and a RAW socket 122 for transmission / reception. The host-side application 120 stores a node list 123 (described later) in the RAM 1102.

デバイス側アプリケーション110は、HEMSコントローラ100自身が、ECHONET Liteにおけるコントローラクラスとして振る舞うためのアプリケーションである。デバイス側アプリケーション110は、ノード201,202,203,…から要求があれば、それらを受信して、当該要求に対して応答または通知を送信する。デバイス側アプリケーション110は、本実施の形態にとって必要ではない。   The device-side application 110 is an application for the HEMS controller 100 itself to behave as a controller class in ECHONET Lite. If there are requests from the nodes 201, 202, 203,..., The device-side application 110 receives them and transmits a response or notification to the request. The device side application 110 is not necessary for the present embodiment.

ホスト側アプリケーション120は、RAWソケット122を通じて、サブネット10に接続された起動ノードからパケットを受信する。ホスト側アプリケーション120は、ノードリスト123の情報を最新の状態に維持する。   The host-side application 120 receives a packet from the activation node connected to the subnet 10 through the RAW socket 122. The host-side application 120 maintains the information in the node list 123 in the latest state.

ホスト側アプリケーション120は、さらに、上位層130(家電制御アプリケーション等)にAPI(Application Programming Interface)を提供する。ホスト側アプリケーション120は、上位層130からの指示を受けて、最新のECHONET Lite機器のリストなどを上位層130に返す。また、ホスト側アプリケーション120は、上位層130からの指示を受けて、ノードへ要求を送信する。また、ホスト側アプリケーション120は、通知または当該要求に対する応答を当該ノードから受信し、上位層130へ返す。   The host-side application 120 further provides an API (Application Programming Interface) to the upper layer 130 (home appliance control application or the like). The host-side application 120 receives an instruction from the upper layer 130 and returns a list of the latest ECHONET Lite devices and the like to the upper layer 130. In addition, the host-side application 120 receives an instruction from the upper layer 130 and transmits a request to the node. Further, the host-side application 120 receives a notification or a response to the request from the node and returns it to the upper layer 130.

なお、上位層130としては、家電制御アプリケーション、家電制御CGI(Common Gateway Interface)などがある。これらは互いに独立である。各々が独立して、ホスト側アプリケーション120と通信する。家電制御アプリケーションは、サーバ装置901と通信することによって、端末902からのユーザ指示を間接的に受信することができる。   The upper layer 130 includes a home appliance control application, a home appliance control CGI (Common Gateway Interface), and the like. These are independent of each other. Each communicates with the host-side application 120 independently. The home appliance control application can indirectly receive a user instruction from the terminal 902 by communicating with the server device 901.

デバイス側アプリケーション110およびホスト側アプリケーション120の各々は、パケットを送信するときは送信先UDPポート番号を3610にする。送信元UDPポート番号は任意で良い。デバイス側アプリケーション110およびホスト側アプリケーション120の各々は、パケットを受信するときは、送信先UDPポート番号が3610であるパケットを処理する。   Each of the device-side application 110 and the host-side application 120 sets the destination UDP port number to 3610 when transmitting a packet. The source UDP port number may be arbitrary. When each of the device-side application 110 and the host-side application 120 receives a packet, it processes the packet whose destination UDP port number is 3610.

ホスト側アプリケーション120は、送信用にUDPソケット121を開く。なお、上述したように、ホスト側アプリケーション120は、UDPソケット121の送信元ポート番号を任意に設定する。   The host-side application 120 opens the UDP socket 121 for transmission. As described above, the host-side application 120 arbitrarily sets the transmission source port number of the UDP socket 121.

ホスト側アプリケーション120は、送受信用にRAWソケット122を開く。RAWソケット122を開くのは、パケットを受信すると同時に送信元MACアドレスも得るためである。RAWソケット122は、サブネット10上を伝送されるデータのうち、ネットワークインターフェイス“eth0”で受信できるデータをすべて受信する。ホスト側アプリケーション120は、受信した全てのデータの中から、UDP/IPかつ宛先UDPポート番号が3610であるデータを利用する。あるいは、後述するARPパケットまたは任意のIPパケットなどを利用する。   The host-side application 120 opens the RAW socket 122 for transmission / reception. The reason why the RAW socket 122 is opened is that the source MAC address is obtained at the same time when the packet is received. The RAW socket 122 receives all data that can be received by the network interface “eth0” among the data transmitted on the subnet 10. The host-side application 120 uses data having UDP / IP and destination UDP port number 3610 out of all received data. Alternatively, an ARP packet described later or an arbitrary IP packet is used.

上記の構成を有したHEMSコントローラ100は、サブネット10上の目的ノードを制御するために、目的ノードを探索する。より詳しくは、HEMSコントローラ100は、探索要求パケットをマルチキャストあるいはブロードキャストでサブネット10に送信する。それに加えて、HEMSコントローラ100は、探索要求パケットをユニキャストでも送信する。ここで目的ノードとは、被探索機器のことである。図1の例で言えば、電力モニタ201、ECHONET Liteノード202、203が相当する。   The HEMS controller 100 having the above configuration searches for a target node in order to control the target node on the subnet 10. More specifically, the HEMS controller 100 transmits a search request packet to the subnet 10 by multicast or broadcast. In addition, the HEMS controller 100 also transmits a search request packet by unicast. Here, the target node is a searched device. In the example of FIG. 1, the power monitor 201 and the ECHONET Lite nodes 202 and 203 are equivalent.

本実施の形態では、HEMSコントローラ100は、サブネット10における起動ノードの最新の情報(後述するノード情報)を、ノードリスト123(詳細は後述する)によって管理する。HEMSコントローラ100は、探索要求パケットを送信する場合は、マルチキャストあるいはブロードキャストで送信するとともに、サブネット10上に起動しているノードのノード情報に基づき、当該ノード情報のIPアドレスを宛先アドレスとする探索要求パケットをユニキャストで送信する。これにより、マルチキャストあるいはブロードキャストが転送されないようなネットワーク環境であっても、HEMSコントローラ100は、目的ノードを見つけることができる。   In the present embodiment, the HEMS controller 100 manages the latest information (node information to be described later) of the startup node in the subnet 10 using the node list 123 (details will be described later). When transmitting the search request packet, the HEMS controller 100 transmits the search request packet by multicast or broadcast, and based on the node information of the node activated on the subnet 10, the search request having the IP address of the node information as the destination address Send the packet by unicast. Thereby, even in a network environment where multicast or broadcast is not transferred, the HEMS controller 100 can find the target node.

(ノードリストの構成)
HEMSコントローラ100が有するノードリスト123には、サブネット10における「起動ノード」の情報を管理するためのノード情報が登録される。図4は、ノードリスト123の構成を説明するための図である。ノードリスト123は複数のノード情報を含むコンテナである。サブネット10で見つかった1つのノードにつき1つのノード情報がある。ノードリスト123の構成方法は、いろいろ考えられるが、目的とするノード情報を高速に検索できるようにハッシュテーブルの構成とするのが良い。可変長の配列(図4の例では、[0]から[22]まで23個の配列要素がある)と、配列要素のそれぞれはリンクリストで構成される。配列の長さは、ノード情報の個数が増えるに従って動的に拡張される。図4の構成は、ハッシュテーブルの構成としては一般的なものである。ノード情報は、当該ノードのMACアドレスとIPアドレスを少なくとも含む。
(Node list configuration)
In the node list 123 included in the HEMS controller 100, node information for managing the information of the “starting node” in the subnet 10 is registered. FIG. 4 is a diagram for explaining the configuration of the node list 123. The node list 123 is a container including a plurality of node information. There is one node information for each node found in the subnet 10. Various methods of configuring the node list 123 are conceivable, but it is preferable to configure a hash table so that target node information can be searched at high speed. A variable-length array (in the example of FIG. 4, there are 23 array elements from [0] to [22]) and each array element is configured by a link list. The length of the array is dynamically expanded as the number of node information increases. The configuration of FIG. 4 is a general hash table configuration. The node information includes at least the MAC address and IP address of the node.

ノードリスト123からノード情報を読み出す時には、パケットを受信した送信元MACアドレスに基づき検索される。具体的には、当該MACアドレスから所定ハッシュ演算により算出されたハッシュ値が、ノードリスト123の配列の長さ(図4の例では、値23)で除算される。そして、ノードリスト123において、当該余りを示す値に対応した要素のリンクリストをたどっていき、当該MACアドレスに一致するMACアドレスを有したノード情報が読み出される。   When reading node information from the node list 123, a search is performed based on the source MAC address that received the packet. Specifically, the hash value calculated from the MAC address by a predetermined hash operation is divided by the length of the array of the node list 123 (value 23 in the example of FIG. 4). Then, in the node list 123, the link list of the element corresponding to the value indicating the remainder is traced, and node information having a MAC address that matches the MAC address is read out.

ノード情報の書き込み時には、先ほどと同様に、パケットを受信した送信元のMACアドレスから算出されたハッシュ値が、ノードリスト123の配列の長さ(図4の例では、値23)で除算される。そして、ノードリスト123において、当該余りを示す値に対応した要素のリンクリストの先頭または最後に、当該ノード情報が登録される。   At the time of writing the node information, the hash value calculated from the MAC address of the transmission source that received the packet is divided by the length of the array of the node list 123 (value 23 in the example of FIG. 4) as before. . In the node list 123, the node information is registered at the beginning or end of the link list of the element corresponding to the value indicating the remainder.

図5は、本実施の形態1に係るノード情報の構成の一例を示す図である。図5を参照して、ノード情報は、当該ノードのMACアドレス、IPアドレス、当該ノード情報をノードリスト123から削除すべき時刻、削除前ARP(Address Resolution Protocol)リクエスト送信済みフラグ、および探索要求パケット送信カウンタを少なくとも含む。   FIG. 5 is a diagram showing an example of the configuration of the node information according to the first embodiment. Referring to FIG. 5, the node information includes the MAC address and IP address of the node, the time at which the node information should be deleted from the node list 123, the pre-deletion ARP (Address Resolution Protocol) request transmitted flag, and the search request packet. At least a transmission counter is included.

サブネット10においては、上述したようにノードが参加または離脱する可能性がある等、サブネット10の状態は変化する。この変化に追従するために、ノードリスト123からは起動が確認されないノード情報は削除されなければならない。ノード情報には、削除すべき時刻が含まれており、削除すべき時刻に到達すれば削除される。例えば、削除すべき時刻は、HEMSコントローラ100が、当該ノード情報のパケットを最後に(最近に)受信したときから、所定時間後(例えば15分経過後の)時刻とする。HEMSコントローラ100は、削除すべき時刻を、当該ノードからパケットを受信する毎に更新する。削除すべき時刻の設定方法の詳細は後述する。   In the subnet 10, the state of the subnet 10 changes, such as the possibility that a node may join or leave as described above. In order to follow this change, node information whose activation is not confirmed must be deleted from the node list 123. The node information includes the time to be deleted, and is deleted when the time to be deleted is reached. For example, the time to be deleted is a time after a predetermined time (for example, after 15 minutes) from when the HEMS controller 100 last (recently) received the packet of the node information. The HEMS controller 100 updates the time to be deleted every time a packet is received from the node. Details of the method for setting the time to be deleted will be described later.

削除前ARPリクエスト送信済みフラグは、HEMSコントローラ100がノード情報を削除する直前にARPリクエスト送信済みであるか否かを判断するために使われる。削除前ARPリクエスト送信済みフラグが0であれば、当該ノードのIPアドレスを探索IPアドレスにしてARPリクエストを送信する。その応答があれば、ノード情報は削除されない。削除前ARPリクエスト送信済みフラグの初期値は0とする。   The pre-deletion ARP request transmitted flag is used to determine whether or not the EMS request has been transmitted immediately before the HEMS controller 100 deletes the node information. If the pre-deletion ARP request transmission flag is 0, the ARP request is transmitted with the IP address of the node as the search IP address. If there is a response, the node information is not deleted. The initial value of the pre-deletion ARP request transmission flag is set to zero.

探索要求パケット送信カウンタは、HEMSコントローラ100が、当該ノードが目的とするノードであるかどうかを調べるために探索要求パケットを送信した回数をカウントしたものである。探索要求パケットが届かない可能性もあるので、同一ノードに対して探索要求パケットを何度も送信することとする。探索要求パケット送信カウンタの初期値は0である。   The search request packet transmission counter counts the number of times that the HEMS controller 100 transmits a search request packet in order to check whether or not the node is the target node. Since the search request packet may not arrive, the search request packet is transmitted to the same node many times. The initial value of the search request packet transmission counter is zero.

<パケットの構成>
サブネット10上を伝送されるデータを説明する。本実施の形態では、伝送データはパケットの構成を有する。
<Packet configuration>
Data transmitted on the subnet 10 will be described. In the present embodiment, the transmission data has a packet configuration.

図6は、ARPパケットの構成を示す図である。ARPリクエストまたはARPリプライは、図6のARPパケットの構成を有する。   FIG. 6 is a diagram illustrating a configuration of an ARP packet. The ARP request or ARP reply has the configuration of the ARP packet shown in FIG.

図6を参照して、ARPパケットは、Ethernetヘッダ部と、ARPプロトコル部を含む。Ethernetヘッダ部は、宛先ノードのMACアドレス、送信元ノードのMACアドレス、および上位層プロトコルのタイプを含む。上位層がARPパケットである場合は、このプロトコルのタイプは“ARP”を示す。   Referring to FIG. 6, the ARP packet includes an Ethernet header part and an ARP protocol part. The Ethernet header part includes the MAC address of the destination node, the MAC address of the source node, and the type of the upper layer protocol. When the upper layer is an ARP packet, the type of this protocol indicates “ARP”.

ARPプロトコル部は、ネットワークの物理的な媒体(本実施の形態ではEthernet)の種類、ARPプロトコルで取り扱う上位のプロトコルの種類(本実施の形態ではIP)、物理層で利用されるアドレスの長さを示すハードウェアサイズ、および上位プロトコルで利用されるアドレスの長さを示すプロトコルサイズを含む。さらに、ARPの動作の種類を表すためのOPコード、送信者MACアドレス、送信者IPアドレス、探索MACアドレス、および探索IPアドレスを含む。OPコードには、ARP要求を表す“request”およびARP要求に対する応答を表す“reply”のいずれかがセットされる。   The ARP protocol section includes the type of physical network medium (Ethernet in this embodiment), the type of higher-level protocol handled by the ARP protocol (IP in this embodiment), and the length of the address used in the physical layer. And a protocol size indicating the length of an address used in the upper protocol. Furthermore, an OP code for indicating the type of ARP operation, a sender MAC address, a sender IP address, a search MAC address, and a search IP address are included. In the OP code, either “request” indicating an ARP request or “reply” indicating a response to the ARP request is set.

送信者MACアドレスおよび送信者IPアドレスは、ARPリクエストまたはARPリプライを送信したノード自身のMACアドレスおよびIPアドレスをそれぞれ示す。   The sender MAC address and the sender IP address indicate the MAC address and IP address of the node itself that transmitted the ARP request or ARP reply, respectively.

ARPパケットがARPリクエストを示す場合には、探索MACアドレスには0にセットされ、探索IPアドレスには探索したいIPアドレスがセットされる。ARPパケットがARPリプライを示す場合には、探索MACアドレスおよび探索IPアドレスには、対応するARPリクエストの送信ノードのMACアドレスおよびIPアドレスがそれぞれセットされる。   When the ARP packet indicates an ARP request, the search MAC address is set to 0, and the search IP address is set to the IP address to be searched. When the ARP packet indicates an ARP reply, the MAC address and IP address of the transmission node of the corresponding ARP request are set in the search MAC address and the search IP address, respectively.

図7は、任意のIPパケットの構成を示す図である。図7を参照して、任意のIPパケットは、Ethernetヘッダ部と、IPヘッダ部とペイロード部を含む。Ethernetヘッダ部は、宛先ノードのMACアドレス、送信元ノードのMACアドレス、および上位層プロトコルのタイプを含む。上位層がIPパケットである場合は、このプロトコルのタイプは“IP”を示す。   FIG. 7 is a diagram illustrating a configuration of an arbitrary IP packet. Referring to FIG. 7, an arbitrary IP packet includes an Ethernet header part, an IP header part, and a payload part. The Ethernet header part includes the MAC address of the destination node, the MAC address of the source node, and the type of the upper layer protocol. When the upper layer is an IP packet, this protocol type indicates “IP”.

IPヘッダ部は、IPプロトコルのバージョンとIPヘッダ部分のサイズとを示すヘッダ長、サービスタイプ、パケット長、IPパケットに識別子、フラグとフラグメントオフセット、TTL(time to live)、上位層のプロトコル番号、および整合性検査のためのヘッダチェックサムを含む。上位層のプロトコル番号には、例えば、上位層がUDPパケットまたはDHCPパケットならば“17”が入る。IGMPパケットならば“2”が入る。   The IP header part includes a header length indicating the version of the IP protocol and the size of the IP header part, a service type, a packet length, an identifier for the IP packet, a flag and a fragment offset, a TTL (time to live), an upper layer protocol number, And a header checksum for consistency checking. For example, if the upper layer is a UDP packet or a DHCP packet, “17” is entered in the upper layer protocol number. If the packet is an IGMP packet, “2” is entered.

さらに、IPヘッダ部は、当該IPパケットの送信元ノードのIPアドレスを示す送信元IPアドレス、および当該IPパケットの宛先ノードのIPアドレスを含む。さらにペイロード部には、上位層の具体的なデータが含まれる。例えば、上位層がUDPパケットの場合ならばUDPヘッダ部が続く。   Furthermore, the IP header part includes a source IP address indicating the IP address of the source node of the IP packet and an IP address of the destination node of the IP packet. Further, the payload portion includes specific data of the upper layer. For example, if the upper layer is a UDP packet, a UDP header portion follows.

本実施の形態では、HEMSコントローラ100および各ノードは、パケットを受信した場合には、当該パケットのタイプに基づき、当該パケットはARPパケットであるかIPパケットであるかを判断することができる。   In the present embodiment, when receiving a packet, the HEMS controller 100 and each node can determine whether the packet is an ARP packet or an IP packet based on the type of the packet.

<MACアドレスとIPアドレスとの組が正しくない場合>
HEMSコントローラ100が、任意のIPパケットを受信したとき、その送信元MACアドレスと送信元IPアドレスとの組が正しくない可能性がある。
<When the pair of MAC address and IP address is not correct>
When the HEMS controller 100 receives an arbitrary IP packet, there is a possibility that the combination of the source MAC address and the source IP address is not correct.

例えば、任意のIPパケットが、無線LANルーター302を超えたネットワーク(すなわち、サブネット10とは異なるネットワーク)から送信されたものである場合には、当該IPパケットの送信元IPアドレスには真の送信者のIPアドレスがセットされているが、送信元MACアドレスには、無線LANルーター302のMACアドレスがセットされている。   For example, when an arbitrary IP packet is transmitted from a network beyond the wireless LAN router 302 (that is, a network different from the subnet 10), true transmission is performed for the source IP address of the IP packet. The IP address of the wireless LAN router 302 is set as the source MAC address.

また、IPパケットがDHCPパケットである場合は、送信元IPアドレスは、一律に0.0.0.0にセットされている。このような場合は、送信元MACアドレスと送信元IPアドレスとの組が正しくないと言える。   If the IP packet is a DHCP packet, the source IP address is uniformly set to 0.0.0.0. In such a case, it can be said that the combination of the source MAC address and the source IP address is not correct.

<ノードリスト123の管理>
次に、HEMSコントローラ100によるノードリスト123の管理について説明する。ノードリスト123は初期状態で空であるが、ノードリスト123の管理処理によって、サブネット10における「起動ノード」の情報の追加または削除が行われる。
<Management of node list 123>
Next, management of the node list 123 by the HEMS controller 100 will be described. Although the node list 123 is empty in the initial state, information on the “starting node” in the subnet 10 is added or deleted by the management process of the node list 123.

図9は、実施の形態1に係るノードリスト123からノード情報を削除するための処理を示すフローチャートである。   FIG. 9 is a flowchart showing processing for deleting node information from the node list 123 according to the first embodiment.

図10は、本実施の形態1に係るARPリクエストまたはARPリプライを受信した時のノードリスト123の情報更新の処理を示すフローチャートである。   FIG. 10 is a flowchart showing information update processing of the node list 123 when receiving an ARP request or ARP reply according to the first embodiment.

図11は、本実施の形態1に係る任意のIPパケットを受信した時のノードリスト123の情報更新の処理を示すフローチャートである。   FIG. 11 is a flowchart showing information update processing of the node list 123 when an arbitrary IP packet according to the first embodiment is received.

(ノード情報の削除処理)
図9を参照して、ノードリスト123からノード情報を削除する処理を説明する。図9の処理は定期的に(例えば250ms毎に)実行される。
(Deleting node information)
A process of deleting node information from the node list 123 will be described with reference to FIG. The processing of FIG. 9 is executed periodically (for example, every 250 ms).

まず、HEMSコントローラ100は、ノードリスト123から次のノード情報を取り出す(ステップS3)。次のノード情報がなければ(ステップS5でNO)、処理を終了する。次のノード情報があれば(ステップS5でYES)、HEMSコントローラ100は、当該ノードがタイムアウトされたか(削除すべき時刻になったか)否かを判断する(ステップS7)。   First, the HEMS controller 100 takes out the next node information from the node list 123 (step S3). If there is no next node information (NO in step S5), the process is terminated. If there is next node information (YES in step S5), the HEMS controller 100 determines whether or not the node has timed out (time to be deleted) (step S7).

当該ノードがタイムアウトされていなければ(ステップS7でNO)、ステップS3に戻る。ノードリスト123から次のノード情報を取り出して、ステップS5以降の処理が同様に実行される。   If the node has not timed out (NO in step S7), the process returns to step S3. The next node information is extracted from the node list 123, and the processing from step S5 is similarly executed.

当該ノードがタイムアウトされていれば(ステップS7でYES)、HEMSコントローラ100は、当該ノードの削除前ARPリクエスト送信済みフラグが“0”であるか否かを判断する(ステップS9)。   If the node has timed out (YES in step S7), the HEMS controller 100 determines whether or not the pre-deletion ARP request transmission flag of the node is “0” (step S9).

削除前ARPリクエスト送信済みフラグが“0”であるならば(ステップS9でYES)、HEMSコントローラ100は、当該ノードのIPアドレスを探索IPアドレスとするARPリクエストを送信する。ただし、当該ノードのIPアドレスが0.0.0.0のときは(一時的なIPアドレスなので)ARPリクエストを送信せずすぐに当該ノードのノード情報を削除する(ステップS11)。   If the pre-deletion ARP request transmission flag is “0” (YES in step S9), the HEMS controller 100 transmits an ARP request with the IP address of the node as the search IP address. However, when the IP address of the node is 0.0.0.0 (since it is a temporary IP address), the node information of the node is immediately deleted without transmitting the ARP request (step S11).

HEMSコントローラ100は、上記のARPリクエストを送信した場合に、ノード情報のリクエスト送信済みフラグを“1”にセットし(ステップS13)、当該ノードの削除すべき時刻を10秒間だけ延長する(ステップS15)。その後、ステップS3に戻る。   When the HEMS controller 100 transmits the above ARP request, the HEMS controller 100 sets the request transmission completion flag of the node information to “1” (step S13), and extends the time to delete the node by 10 seconds (step S15). ). Then, it returns to step S3.

ステップS9において、削除前ARPリクエスト送信済みフラグが“0”でないならば(ステップS9でNO)、HEMSコントローラ100は、ノードリスト123から当該ノードのノード情報を削除する(ステップS17)。その後、ステップS3に戻る。   If the pre-deletion ARP request transmitted flag is not “0” in step S9 (NO in step S9), the HEMS controller 100 deletes the node information of the node from the node list 123 (step S17). Then, it returns to step S3.

このように、HEMSコントローラ100は、基本的には、各ノード情報の削除すべき時刻になれば当該ノード情報をノードリスト123から削除するが、削除する直前に当該ノードがまだ起動しているかどうかを確認するために(RAWソケット122を通じて)ARPリクエストを送信する。当該ノードからARPレスポンス(または任意のIPパケット)を10秒以内に受信できなければ当該ノード情報は削除される。当該ノードからARPレスポンス(または任意のIPパケット)を受信できれば当該ノード情報は削除されない。   As described above, the HEMS controller 100 basically deletes the node information from the node list 123 when it is time to delete each node information, but whether or not the node is still activated immediately before the deletion. Send an ARP request (via RAW socket 122) to confirm If the ARP response (or any IP packet) cannot be received from the node within 10 seconds, the node information is deleted. If the ARP response (or any IP packet) can be received from the node, the node information is not deleted.

(ノード情報の登録処理)
HEMSコントローラ100は、RAWソケット122を通じてパケットを受信したときに、送信元MACアドレスに基づきノードリスト123へノード情報を登録する。この対象となるパケットは、ARPリプライまたはARPリクエストのパケット、および任意のIPパケットである。
(Node information registration process)
When the HEMS controller 100 receives a packet through the RAW socket 122, the HEMS controller 100 registers the node information in the node list 123 based on the source MAC address. This target packet is an ARP reply or ARP request packet and an arbitrary IP packet.

−ARPリプライ/ARPリクエスト受信時の登録処理−
まず、図10を参照してARPリプライまたはARPリクエストのパケットを受信した場合の登録処理を説明する。図10の処理は、ARPリクエストまたはARPリプライを受信する毎に実行される。また、HEMSコントローラ100により生成されたダミーのIPアドレスは、RAM1102に格納されている。
-Registration process when receiving ARP reply / ARP request-
First, registration processing when an ARP reply or ARP request packet is received will be described with reference to FIG. The process of FIG. 10 is executed every time an ARP request or an ARP reply is received. The dummy IP address generated by the HEMS controller 100 is stored in the RAM 1102.

ただし、送信元MACアドレスと送信者MACアドレスとが一致しない場合もあるが、その場合は、HEMSコントローラ100は図10の処理を実施しない(重複IPアドレスを検出したときに、ルーターからもARPリプライが来ることがある)。従って、図10に記載された送信者MACアドレスは、送信元MACアドレスと同一の値である。   However, in some cases, the source MAC address and the sender MAC address do not match. In this case, the HEMS controller 100 does not perform the processing of FIG. 10 (when a duplicate IP address is detected, the router also receives an ARP reply). May come). Therefore, the sender MAC address described in FIG. 10 is the same value as the source MAC address.

HEMSコントローラ100は、まず、受信されたパケットの内容に基づき、探索IPアドレスとしてダミーのIPアドレスが設定されたARPリクエスト(図17参照)を受信したかを判断する(ステップS18)。   First, the HEMS controller 100 determines whether an ARP request (see FIG. 17) in which a dummy IP address is set as a search IP address has been received based on the content of the received packet (step S18).

HEMSコントローラ100は、受信されたパケットは、探索IPアドレスとしてダミーのIPアドレスが設定されたARPリクエストであると判断した場合(ステップ18でYES)、HEMSコントローラ100は、RAWソケット122を介して、ARPリプライ(図18参照)を送信する(ステップS19)。その後、処理は、ステップS20に移る。ステップS18〜S19の処理については、後述する図15のパスP3(ARPリプライ)に相当する。   When the HEMS controller 100 determines that the received packet is an ARP request in which a dummy IP address is set as the search IP address (YES in step 18), the HEMS controller 100 passes through the RAW socket 122. An ARP reply (see FIG. 18) is transmitted (step S19). Thereafter, the process proceeds to step S20. The processes in steps S18 to S19 correspond to a path P3 (ARP reply) in FIG.

一方、HEMSコントローラ100は、受信されたパケットは、探索IPアドレスとしてダミーのIPアドレスが設定されたARPリクエストではないと判断した場合(ステップ18でNO)、処理は、ステップS20に移行する。   On the other hand, if the HEMS controller 100 determines that the received packet is not an ARP request in which a dummy IP address is set as the search IP address (NO in step 18), the process proceeds to step S20.

ステップS20では、HEMSコントローラ100は、受信したパケット(ARPリクエストまたはARPリプライ)の送信者MACアドレスをキーに、ノードリスト123からノード情報を取り出す(ステップS20)。当該送信者MACアドレスに一致するノード情報があるか否かを判断する(ステップS21)。   In step S20, the HEMS controller 100 extracts node information from the node list 123 using the sender MAC address of the received packet (ARP request or ARP reply) as a key (step S20). It is determined whether there is node information that matches the sender MAC address (step S21).

当該送信者MACアドレスに一致するノード情報がなければ(ステップS21でNO)、HEMSコントローラ100は、ノード情報を新規作成する(ステップS22)。このノード情報のMACアドレスおよびIPアドレスとして、受信されたパケットの送信者MACアドレスと送信者IPアドレスがそれぞれセットされる。また、当該ノード情報のパケット送信カウンタは0(初期値)にセットされる。   If there is no node information that matches the sender MAC address (NO in step S21), the HEMS controller 100 newly creates node information (step S22). The sender MAC address and sender IP address of the received packet are set as the MAC address and IP address of the node information, respectively. Further, the packet transmission counter of the node information is set to 0 (initial value).

HEMSコントローラ100は、新規作成されたノード情報を、ノードリスト123に追加して登録する(ステップS23)。また、HEMSコントローラ100は、受信した当該ノード情報の削除すべき時刻53に、現在時間よりも15分経過後の時刻をセットする。また、削除前ARPリクエスト送信済みフラグを0(初期値)にセットする(ステップS26)。   The HEMS controller 100 adds the newly created node information to the node list 123 and registers it (step S23). In addition, the HEMS controller 100 sets a time after 15 minutes from the current time to the time 53 when the received node information is to be deleted. Further, the pre-deletion ARP request transmission completion flag is set to 0 (initial value) (step S26).

ステップS21において、当該送信者MACアドレスに一致するノード情報があれば(ステップS21でYES)、HEMSコントローラ100は、当該ノード情報のIPアドレスが、受信されたパケットの送信者IPアドレスと一致するか否かを判断する(ステップS24)。一致すると判断すると(ステップS24でYES)、ステップS26において、当該ノード情報について前述(ステップS26)と同様の処理が実行される。   If there is node information that matches the sender MAC address in step S21 (YES in step S21), the HEMS controller 100 determines whether the IP address of the node information matches the sender IP address of the received packet. It is determined whether or not (step S24). If it is determined that they match (YES in step S24), in step S26, the same processing as described above (step S26) is executed for the node information.

当該ノード情報のIPアドレスが、受信されたパケットの送信者IPアドレスと一致しないならば(ステップS24でNO)、HEMSコントローラ100は、当該ノード情報のIPアドレスを送信者IPアドレスに更新する(ステップS25)。その後、ステップS26の処理が上述と同様に実行される。   If the IP address of the node information does not match the sender IP address of the received packet (NO in step S24), the HEMS controller 100 updates the IP address of the node information to the sender IP address (step S24). S25). Thereafter, the process of step S26 is executed in the same manner as described above.

図10の処理によって、HEMSコントローラ100は、ARPリクエストまたはARPリプライを受信する毎に当該ノードのノード情報の削除すべき時刻を、パケットを受信した時の時刻から15分後を示すように更新(時間を延長)する。   10, the HEMS controller 100 updates the time at which the node information of the node should be deleted every time an ARP request or ARP reply is received, so as to indicate 15 minutes after the time when the packet is received ( Extend the time).

−任意のIPパケット受信時の登録処理−
次に、図11を参照して、任意のIPパケットを受信した場合の登録処理を説明する。HEMSコントローラ100は、任意のIPパケットを受信する毎に図11の処理を実行する。任意のIPパケットには、IGMPパケット、ICMP(Internet Control Message Protocolの略)パケット、DHCPパケット、UDPパケットおよびTCP(Transmission Control Protocolの略)パケットなどが含まれる。
-Registration process when receiving any IP packet-
Next, registration processing when an arbitrary IP packet is received will be described with reference to FIG. The HEMS controller 100 executes the process of FIG. 11 every time an arbitrary IP packet is received. The arbitrary IP packet includes an IGMP packet, an ICMP (abbreviation of Internet Control Message Protocol) packet, a DHCP packet, a UDP packet, a TCP (abbreviation of Transmission Control Protocol) packet, and the like.

図11を参照して、HEMSコントローラ100は、受信したIPパケットの送信元MACアドレスをキーに、ノードリスト123からノード情報を取り出す(ステップS30)。HEMSコントローラ100は、送信元MACアドレスに一致するノード情報があるか否かを判断する(ステップS31)。送信元MACアドレスに一致するノード情報があれば(ステップS31でYES)、HEMSコントローラ100は、図10のステップS26の処理と同様に、当該ノード情報の削除すべき時刻に、現在時刻よりも15分経過後の時刻をセットし、また、リクエスト送信済みフラグを0にセットする(ステップS35)。   Referring to FIG. 11, HEMS controller 100 extracts node information from node list 123 using the source MAC address of the received IP packet as a key (step S30). The HEMS controller 100 determines whether there is node information that matches the source MAC address (step S31). If there is node information that matches the transmission source MAC address (YES in step S31), the HEMS controller 100, as in the process of step S26 of FIG. The time after the lapse of minutes is set, and the request transmission completion flag is set to 0 (step S35).

送信元MACアドレスに一致するノード情報がなければ(ステップS31でNO)、HEMSコントローラ100は、ノード情報を新規に作成する(ステップS32)。HEMSコントローラ100は、このノード情報に、受信されたパケットの送信元MACアドレスをMACアドレスとしてセットするとともに、IPアドレスには0.0.0.0をセットする。また、パケット送信カウンタには0をセットする。   If there is no node information that matches the source MAC address (NO in step S31), the HEMS controller 100 newly creates node information (step S32). The HEMS controller 100 sets the source MAC address of the received packet as the MAC address in this node information, and also sets 0.0.0.0 as the IP address. Also, 0 is set in the packet transmission counter.

本実施の形態では、上記の“(MACアドレスとIPアドレスとの組が正しくない場合)”で説明したように、受信されたIPパケットの送信元MACアドレスと送信元IPアドレスとの組は常に正しいとは限らない。したがって、HEMSコントローラ100は、新規に作成したノード情報のIPアドレスに、上述のように 0.0.0.0を一時的に
セットする。
In the present embodiment, as described above in “(When the pair of MAC address and IP address is not correct)”, the pair of the source MAC address and source IP address of the received IP packet is always It is not always correct. Accordingly, the HEMS controller 100 temporarily sets 0.0.0.0 to the IP address of the newly created node information as described above.

HEMSコントローラ100は、新規作成されたノード情報を、ノードリスト123に追加する(ステップS33)。   The HEMS controller 100 adds the newly created node information to the node list 123 (step S33).

また、HEMSコントローラ100は、受信したIPパケットの送信元IPアドレスを、探索IPアドレスにセットしたARPリクエストを送信する(ステップS34)。なお、このとき、受信IPパケットの送信元IPアドレスが0.0.0.0を示す場合には、ARPリクエストを送信しない。その後、新規作成されたノード情報について、ステップS35の処理が実行される。   Further, the HEMS controller 100 transmits an ARP request in which the source IP address of the received IP packet is set to the search IP address (step S34). At this time, if the source IP address of the received IP packet indicates 0.0.0.0, the ARP request is not transmitted. Then, the process of step S35 is performed about the newly created node information.

HEMSコントローラ100は、上記のステップS34においてARPリクエストを送信した後に、これに対するARPリプライを受信した場合には、図10のフローに従って、ステップS25の処理を実行することになる。これにより、当初0.0.0.0とセットされていたノード情報のIPアドレスが正しいIPアドレスに更新される。   When the HEMS controller 100 receives the ARP reply for the ARP request after transmitting the ARP request in step S34, the HEMS controller 100 executes the process of step S25 according to the flow of FIG. As a result, the IP address of the node information initially set to 0.0.0.0 is updated to the correct IP address.

このように、図11の場合も、図10と同様に、HEMSコントローラ100は、ノードから任意のIPパケットを受信する毎に、当該ノードのノード情報の削除すべき時刻を、パケットを受信した時刻の15分後を示すように更新(時間を延長)する。   Thus, in the case of FIG. 11 as well, as in FIG. 10, every time an HEMS controller 100 receives an arbitrary IP packet from a node, the time at which the node information of the node should be deleted is the time at which the packet is received. Update (extend time) to indicate 15 minutes later.

上述の削除処理(図9参照)は、図10と図11で更新される削除すべき時刻に基づき実行されるから、起動ノードについては、起動が確認される間は、ノード情報は削除されることはない。したがって、図9〜図11の処理によって、サブネット10上の「起動ノード」に関する情報を最新の状態に維持することができる。図9〜図11の処理は、基本的には、パケットを受信したときに実行される処理である。「サブネット10上にある起動ノードの存在を受動的に検出する」というのはそれゆえのことである。   Since the above-described deletion process (see FIG. 9) is executed based on the time to be deleted updated in FIG. 10 and FIG. 11, the node information is deleted while the activation is confirmed for the activation node. There is nothing. Therefore, the information regarding the “startup node” on the subnet 10 can be maintained in the latest state by the processing of FIGS. 9 to 11. The processes in FIGS. 9 to 11 are basically processes executed when a packet is received. This is why “passive detection of the presence of an activation node on the subnet 10” is performed.

<目的ノードの探索処理>
次に、HEMSコントローラ100が目的ノードをサブネット10上で探索する処理を説明する。
<Target node search processing>
Next, processing in which the HEMS controller 100 searches for the target node on the subnet 10 will be described.

本実施の形態では、HEMSコントローラ100は、サブネット10に探索要求パケットを送信し、それに対応する探索応答パケットを受信することにより、当該目的ノードを見つける。ここでは、目的ノードを見つけることを「探索に成功する」ともいう。   In the present embodiment, the HEMS controller 100 transmits a search request packet to the subnet 10 and receives a search response packet corresponding thereto to find the target node. Here, finding the target node is also referred to as “successful search”.

図12は、本実施の形態1に係る目的ノードを探索する処理のフローチャートである。HEMSコントローラ100は、図12の処理を一定間隔で(例えば、3分毎に)実行する。   FIG. 12 is a flowchart of processing for searching for a target node according to the first embodiment. The HEMS controller 100 executes the processing of FIG. 12 at regular intervals (for example, every 3 minutes).

図12を参照して、HEMSコントローラ100は、宛先IPアドレスをマルチキャスト・アドレスにセットした探索要求パケットを送信する(ステップS40)。マルチキャスト・アドレスとポート番号については、探索機器と被探索機器との間で予め定められている。   Referring to FIG. 12, HEMS controller 100 transmits a search request packet in which the destination IP address is set to the multicast address (step S40). The multicast address and port number are determined in advance between the searching device and the searched device.

例えば、被探索機器がECHONET Lite(登録商標)機器である場合、マルチキャスト・アドレスは224.0.23.0に、また、ポート番号は3610とする。   For example, when the searched device is an ECHONET Lite (registered trademark) device, the multicast address is 224.0.23.0 and the port number is 3610.

他の例として、被探索機器がUPnP(Universal Plug and Play- Simple Service Discovery Protocol)デバイスである場合、マルチキャスト・アドレスは239.255.255.250に、また、ポート番号は1900とする。   As another example, when the search target device is a UPnP (Universal Plug and Play-Simple Service Discovery Protocol) device, the multicast address is set to 239.255.255.250, and the port number is set to 1900.

本実施の形態では、サブネット10上の目的ノードを確実に探索するために、HEMSコントローラ100は、ノードリスト123の各ノード情報に基づいて探索要求パケットを生成して、ユニキャストで送信する(ステップS41とS42)。   In the present embodiment, in order to reliably search for a target node on the subnet 10, the HEMS controller 100 generates a search request packet based on each node information in the node list 123 and transmits it by unicast (step). S41 and S42).

具体的には、HEMSコントローラ100は、探索要求パケットの宛先IPアドレスを、ノードリスト123のノード情報から1つ選択する。この選択においては、ノードリスト123の各ノード情報から、探索要求パケット送信カウンタの値が最小であるノード情報を選択するのがよい。そのように選択したノード情報のMACアドレスおよびIPアドレスを、宛先MACアドレスおよび宛先IPアドレスにそれぞれセットして探索要求パケットを生成し、ユニキャストで送信する。   Specifically, the HEMS controller 100 selects one destination IP address of the search request packet from the node information in the node list 123. In this selection, it is preferable to select the node information having the smallest search request packet transmission counter value from each node information of the node list 123. The search request packet is generated by setting the MAC address and IP address of the node information thus selected to the destination MAC address and the destination IP address, and transmitted by unicast.

本実施の形態では、上述のステップS41におけるノード情報選択時に、IPアドレスが0.0.0.0であるノード情報を選択の対象から外す。これは、ステップS32(図11)でノード情報を新規作成した後、IPアドレスが更新されていない場合があるからである。   In the present embodiment, the node information having the IP address of 0.0.0.0 is excluded from the selection targets when the node information is selected in step S41 described above. This is because the IP address may not be updated after node information is newly created in step S32 (FIG. 11).

また、HEMSコントローラ100は、探索応答パケットを既に受信しているノードについても選択の対象から外す。これは、当該ノードについては既に探索に成功しているからであり、再度探索する必要はないからである。さらに、HEMSコントローラ100は、パケット送信カウンタが上限値(例えば、30回)に達しているノード情報も選択の対象から外す。これは、当該ノードに対して探索要求パケットを何度も繰り返し送信しているにもかかわらず、探索応答パケットを受信していないということは、当該ノードは目的とするノードではないと判断できるからである。ステップS41において、ノードリスト123で管理しているすべてのノード情報が、対象外である場合には、ステップS41にてユニキャストで送信する必要はない。   The HEMS controller 100 also excludes nodes that have already received the search response packet from selection targets. This is because the node has already been successfully searched and does not need to be searched again. Further, the HEMS controller 100 also excludes node information whose packet transmission counter has reached an upper limit (for example, 30 times) from selection targets. This is because the fact that the search response packet is not received even though the search request packet is repeatedly transmitted to the node can be determined that the node is not the target node. It is. In step S41, when all the node information managed in the node list 123 is not the target, it is not necessary to transmit by unicast in step S41.

ノードリスト123の各ノード情報に基づいて探索要求パケットが生成されて、ユニキャストで送信される場合に(ステップS41とS42)、HEMSコントローラ100は、当該ノード情報の機器について、“ダミーのIPアドレスを用いた探索”を実施する(ステップS42a)。“ダミーのIPアドレスを用いた探索”の詳細は後述する。   When a search request packet is generated based on each node information of the node list 123 and transmitted by unicast (steps S41 and S42), the HEMS controller 100 determines “dummy IP address” for the device of the node information. "Search using" is executed (step S42a). Details of the “search using a dummy IP address” will be described later.

HEMSコントローラ100は、選択されたノード情報のIPアドレスに基づいた探索要求パケットをユニキャストで送信したとき、当該ノード情報の探索要求パケット送信カウンタの値をインクリメントする(ステップS43)。   When the HEMS controller 100 transmits the search request packet based on the IP address of the selected node information by unicast, the HEMS controller 100 increments the value of the search request packet transmission counter of the node information (step S43).

なお、上記の探索要求パケットの送信元MACアドレスおよび送信元IPアドレスには、HEMSコントローラ100が有するMACアドレスおよびIPアドレスがセットされる。   The MAC address and IP address of the HEMS controller 100 are set in the source MAC address and source IP address of the search request packet.

HEMSコントローラ100は、探索要求パケットに対する探索応答パケットを受信するために所定期間(例えば、5秒間)経過するまで待つ(ステップS44)。   The HEMS controller 100 waits until a predetermined period (for example, 5 seconds) elapses in order to receive a search response packet for the search request packet (step S44).

探索応答パケットは、IPパケット(図7参照)の構成を有する。具体的には、探索応答パケットの送信元MACアドレスおよび送信元IPアドレスには、送信元ノードが有するMACアドレスおよびIPアドレスがそれぞれセットされている。   The search response packet has a configuration of an IP packet (see FIG. 7). Specifically, the MAC address and IP address of the source node are set in the source MAC address and source IP address of the search response packet, respectively.

ステップS44で、HEMSコントローラ100は、複数個の探索応答パケットを受信する場合があり得る(探索要求パケットをマルチキャストで送信しているため)。したがって、探索要求パケットを送信してから所定期間(例えば、5秒間)は必ず待つようにする。この所定期間内に探索応答パケットを受信し、その内容が先に送信した探索要求パケットに対する応答であることを確認できれば、目的ノードを見つけることができたと判断する。この場合には、HEMSコントローラは、目的ノードのノード情報を別途管理する。この管理方法は、本発明の範囲ではないので説明を省略する。   In step S44, the HEMS controller 100 may receive a plurality of search response packets (because the search request packet is transmitted by multicast). Therefore, it is necessary to always wait for a predetermined period (for example, 5 seconds) after transmitting the search request packet. If the search response packet is received within the predetermined period and it is confirmed that the content is a response to the previously transmitted search request packet, it is determined that the target node has been found. In this case, the HEMS controller separately manages the node information of the target node. Since this management method is not within the scope of the present invention, a description thereof will be omitted.

<ダミーのIPアドレスを用いた探索>
本実施の形態では、探索機器(HEMSコントローラ100)は、被探索機器にIPアドレスが誤って設定されていると判断したときは、ダミーのIPアドレスを有した探索要求パケットを用いた探索を実施する(ステップS42a)。
<Search using dummy IP address>
In the present embodiment, when the search device (HEMS controller 100) determines that the IP address is set in the search target device incorrectly, the search device (HEMS controller 100) performs a search using a search request packet having a dummy IP address. (Step S42a).

ダミーのIPアドレスを用いた探索について、IPアドレスとして“192.168.100.100”(以下、アドレス(A)と称する)を有した起動ノードが発見された場合を想定して説明する。   The search using the dummy IP address will be described on the assumption that an activation node having “192.168.100.100” (hereinafter referred to as address (A)) is found as an IP address.

HEMSコントローラ100は、ダミーのIPアドレスを用いた探索のために、アドレス(A)は、探索機器(HEMSコントローラ100)が属するサブネット10のサブネット体系のアドレスであるか否かを判断する。HEMSコントローラ100は、アドレス(A)が当該サブネット体系のアドレスはないと判断した場合、ダミーのIPアドレスを生成する。HEMSコントローラ100は、生成されたダミーのIPアドレスを用いて、当該起動ノードが目的ノードであるかを判断するための探索シーケンスを実施する。HEMSコントローラ100は、アドレス(A)が当該サブネット体系のアドレスであると判断した場合、通常の方法で、探索シーケンスを実施する。   For the search using the dummy IP address, the HEMS controller 100 determines whether the address (A) is an address of the subnet system of the subnet 10 to which the search device (HEMS controller 100) belongs. When the HEMS controller 100 determines that the address (A) is not an address of the subnet system, the HEMS controller 100 generates a dummy IP address. The HEMS controller 100 performs a search sequence for determining whether the activation node is the target node, using the generated dummy IP address. When the HEMS controller 100 determines that the address (A) is an address of the subnet system, the HEMS controller 100 performs a search sequence by a normal method.

a.アドレス判断処理
まず、アドレス(A)が、サブネット10のサブネット体系のアドレスであるかの判断処理について説明する。
a. Address Determination Process First, a process for determining whether the address (A) is an address of the subnet system of the subnet 10 will be described.

HEMSコントローラ100は、探索機器(HEMSコントローラ100)のIPアドレスとサブネットマスクとから、アドレス(A)がサブネット体系のアドレスであるか否かを判断する。HEMSコントローラ100は、探索機器のIPアドレスとサブネットマスクを、プログラムにより取得することができる。   The HEMS controller 100 determines whether the address (A) is an address of the subnet system from the IP address and subnet mask of the search device (HEMS controller 100). The HEMS controller 100 can acquire the IP address and subnet mask of the search device by a program.

具体的には、探索機器のIPアドレス=192.168.11.5(以下、アドレス(B)と称する)、およびサブネットマスク=255.255.255.0(以下、サブネットマスク(C)と称する)が取得された場合、HEMSコントローラ100は、以下の演算に従いネットワークアドレスを取得する。   Specifically, when the IP address of the search device = 192.168.11.5 (hereinafter referred to as address (B)) and the subnet mask = 255.255.255.0 (hereinafter referred to as subnet mask (C)) are acquired, the HEMS The controller 100 acquires a network address according to the following calculation.

演算では、HEMSコントローラ100は、まず、アドレス(A)とサブネットマスク(C)との第1の論理積演算(ビットAND)を実施する。この演算により、アドレス“192.168.100.0”が算出される。また、HEMSコントローラ100は、アドレス(B)とサブネットマスク(C)との第2の論理積演算(ビットAND)を実施する。この演算により、アドレス“192.168.11.0”が算出される。HEMSコントローラ100は、第1および第2の論理積演算の各算出値を比較し、比較結果に基づき、第1の論理積演算の算出値が、第2の論理積演算の算出値とは異なっていると判断すれば、HEMSコントローラ100は、アドレス(A)は、探索機器(当該起動ノード)が属するサブネット体系のアドレスではないと判断する。   In the calculation, the HEMS controller 100 first performs a first AND operation (bit AND) of the address (A) and the subnet mask (C). By this calculation, the address “192.168.100.0” is calculated. In addition, the HEMS controller 100 performs a second AND operation (bit AND) between the address (B) and the subnet mask (C). By this calculation, the address “192.168.11.0” is calculated. The HEMS controller 100 compares the calculated values of the first and second AND operations, and based on the comparison result, the calculated value of the first AND operation is different from the calculated value of the second AND operation. If it is determined, the HEMS controller 100 determines that the address (A) is not the address of the subnet system to which the search device (the activation node) belongs.

b.ダミーのIPアドレス生成処理
上記に述べたように、起動ノードのアドレス(A)(“192.168.100.100”)はサブネット体系のアドレスではないと判断された場合には、HEMSコントローラ100は、ダミーのIPアドレスを生成する。
b. Dummy IP Address Generation Processing As described above, when it is determined that the address (A) (“192.168.100.100”) of the activation node is not a subnet address, the HEMS controller 100 determines the dummy IP address. Generate an address.

HEMSコントローラ100は、アドレス(A)と同じサブネット体系であって、当該アドレス(A)とは異なるIPアドレスを生成する。ただし、生成されるべきIPアドレスは、他の起動ノードのIPアドレスと重複してはならない。   The HEMS controller 100 generates the same IP address as that of the address (A) and is different from the address (A). However, the IP address to be generated must not overlap with the IP address of another activation node.

ダミーのIPアドレスの生成処理において、HEMSコントローラ100は、アドレス(A)と同じサブネット体系に対応したサブネットマスクを求めるために、まず、サブネットマスクにより示され得るアドレスの範囲が一番狭いサブネットマスクを仮定する。具体的には、HEMSコントローラ100は、図14のIPアドレスのサブネットマスク表の中から、アドレスの範囲が一番狭いサブネットマスク(クラスC、プレフィックス/30)、すなわちサブネットマスク“255.255.255.252”を取得する(サブネットマスクはプログラムにより取得される)。   In the dummy IP address generation process, in order to obtain a subnet mask corresponding to the same subnet system as the address (A), the HEMS controller 100 first selects a subnet mask having the narrowest address range that can be indicated by the subnet mask. Assume. Specifically, the HEMS controller 100 sets the subnet mask (class C, prefix / 30) having the narrowest address range from the subnet mask table of the IP address in FIG. 14, that is, the subnet mask “255.255.255.252”. Acquire (subnet mask is acquired by the program).

HEMSコントローラ100は、サブネットマスク“255.255.255.252”を用いて、ダミーIPアドレスの候補を求める。ダミーIPアドレスの候補は、アドレス(A)の“192.168.100.100”とサブネットマスク“255.255.255.252”とを用いた以下の第3の論理積演算(ビットAND)を実施することにより算出される。第3の論理積演算は、2進数を用いて以下の式で示される。
11000000.10101000.01100100.01100100 (192.168.100.100)
11111111.11111111.11111111.11111100 (255.255.255.252)
-----------------------------------
11000000.10101000.01100100.01100100 (192.168.100.100)
上記の式の各値の下位2ビットはホスト部のビットを示す。したがって、HEMSコントローラ100が、生成可能なIPアドレスは、以下の4個(=2^2)ある。
11000000.10101000.01100100.01100100 (192.168.100.100)
11000000.10101000.01100100.01100101 (192.168.100.101)
11000000.10101000.01100100.01100110 (192.168.100.102)
11000000.10101000.01100100.01100111 (192.168.100.103)
HEMSコントローラ100は、第3の論理積演算により算出された複数のIPアドレス(上記の4個のIPアドレス)のうちから、予め定められた選択基準に従い、ダミーのIPアドレスを選択する。
The HEMS controller 100 obtains dummy IP address candidates using the subnet mask “255.255.255.252”. The dummy IP address candidate is calculated by performing the following third AND operation (bit AND) using the address (A) “192.168.100.100” and the subnet mask “255.255.255.252”. The third AND operation is expressed by the following equation using a binary number.
11000000.10101000.01100100.01100100 (192.168.100.100)
11111111.11111111.11111111.11111100 (255.255.255.252)
-----------------------------------
11000000.10101000.01100100.01100100 (192.168.100.100)
The lower 2 bits of each value in the above formula indicate the bits of the host part. Therefore, the HEMS controller 100 can generate the following four IP addresses (= 2 ^ 2).
11000000.10101000.01100100.01100100 (192.168.100.100)
11000000.10101000.01100100.01100101 (192.168.100.101)
11000000.10101000.01100100.01100110 (192.168.100.102)
11000000.10101000.01100100.01100111 (192.168.100.103)
The HEMS controller 100 selects a dummy IP address according to a predetermined selection criterion from among a plurality of IP addresses (the above-mentioned four IP addresses) calculated by the third AND operation.

この選択基準によれば、上記の複数のIPアドレスのうち、ホスト部のビットがすべて“1”であるIPアドレスおよびホスト部のビットがすべて“0”であるIPアドレスは、ダミーのIPアドレスとして選択されない。また、上記の複数のIPアドレスのうち、起動ノードの情報を管理するノードリスト123(後述する)に登録されたIPアドレスと一致するものも、ダミーのIPアドレスとして選択されない。例えば、上記の4個のIPアドレスのうち“192.168.100.101”がノードリスト123に既に登録されている場合には、“192.168.100.101”はダミーのIPアドレスとして選択されない。   According to this selection criterion, among the plurality of IP addresses, an IP address whose host part bits are all “1” and an IP address whose host part bits are all “0” are dummy IP addresses. Not selected. Also, among the plurality of IP addresses described above, an IP address that matches an IP address registered in a node list 123 (described later) that manages information on the activation node is not selected as a dummy IP address. For example, if “192.168.100.101” is already registered in the node list 123 among the above four IP addresses, “192.168.100.101” is not selected as a dummy IP address.

したがって、HEMSコントローラ100は、上記の第3の論理積演算により算出された4個のIPアドレスのうち、選択基準に従い、“192.168.100.102”をダミーのIPアドレスとして選択する。   Therefore, the HEMS controller 100 selects “192.168.100.102” as a dummy IP address according to the selection criterion among the four IP addresses calculated by the third logical product operation.

上記のサブネットマスク“255.255.255.252”により算出されたIPアドレスの範囲(上記の4個のIPアドレス)から、選択基準に従うIPアドレスが選択された場合には、当該IPアドレスはダミーのIPアドレスとして決定される。   When an IP address according to the selection criteria is selected from the IP address range (the above four IP addresses) calculated by the subnet mask “255.255.255.252”, the IP address is set as a dummy IP address. It is determined.

一方、サブネットマスク“255.255.255.252”を用いて、選択基準に従うIPアドレスが、すなわちダミーのIPアドレスが決定されなかった場合には、HEMSコントローラ100は、新たなサブネットマスクを用いてダミーのIPアドレスを生成する。つまり、HEMSコントローラ100は、サブネットマスクにより示されるアドレスの範囲が2番目に狭いサブネットマスク(図14の表の(クラスC、プレフィックス/29)の“255.255.255.248”)を用いて、上述したダミーのIPアドレス生成の処理によって、ダミーのIPアドレスを生成する。   On the other hand, if the IP address according to the selection criterion using the subnet mask “255.255.255.252”, that is, the dummy IP address is not determined, the HEMS controller 100 uses the new subnet mask to set the dummy IP address. Is generated. In other words, the HEMS controller 100 uses the subnet mask whose address range indicated by the subnet mask is the second narrowest (“255.255.255.248” of (class C, prefix / 29) in the table of FIG. 14) as described above. A dummy IP address is generated by the IP address generation process.

このように、HEMSコントローラ100は、サブネットマスクにより示されるアドレスの範囲が小さいものから順にサブネットマスクを切替えながら、上述の選択基準に従うIPアドレス(ダミーのIPアドレス)が取得されるまで、上記に述べたダミーのIPアドレス生成の処理を繰返す。これにより、IPアドレスが誤って設定されている被探索機器に対しては、当該被探索機器の誤って設定されたIPアドレスに近いダミーのIPアドレス(すなわち、誤って設定されたIPアドレスの値との差が小さい値のIPアドレス)が生成される。   As described above, the HEMS controller 100 is described above until the IP address (dummy IP address) according to the above selection criteria is acquired while switching the subnet mask in order from the smallest address range indicated by the subnet mask. The dummy IP address generation process is repeated. As a result, for a searched device in which an IP address is set incorrectly, a dummy IP address close to the incorrectly set IP address of the searched device (that is, the value of the incorrectly set IP address) IP address having a small difference from the IP address) is generated.

c.探索シーケンス
図15は、本実施の形態におけるダミーのIPアドレスを用いた探索シーケンスを模式的に示す図である。図16〜図19は、図15の探索シーケンスで転送されるパケットの構成を説明する図である。図15に示された探索シーケンスの前提は、以下の通りである。
c. Search Sequence FIG. 15 is a diagram schematically showing a search sequence using a dummy IP address in the present embodiment. 16 to 19 are diagrams illustrating the configuration of a packet transferred in the search sequence of FIG. The premise of the search sequence shown in FIG. 15 is as follows.

探索機器(HEMSコントローラ100)には、MACアドレスとして“MA1”が設定され、およびIPアドレスとして“IA1”(192.168.11.5)が設定されている。また、被探索機器(ノード201)には、MACアドレスとして“MA2”が設定され、IPアドレスとして“IA2”(192.168.100.100)が設定されている。探索機器は、起動ノードと判断された被探索機器のIPアドレス(192.168.100.100)は、探索機器が属するサブネット体系のアドレスではない(すなわち、誤って設定されたIPアドレスである)と判断する。探索機器は、当該判断結果に基づき、ダミーのIPアドレスとして“IA3”(192.168.100.102)を生成する。   In the search device (HEMS controller 100), “MA1” is set as the MAC address, and “IA1” (192.168.11.5) is set as the IP address. In the search target device (node 201), “MA2” is set as the MAC address, and “IA2” (192.168.100.100) is set as the IP address. The searcher device determines that the IP address (192.168.100.100) of the searchee device determined to be the activation node is not the address of the subnet system to which the searcher device belongs (that is, the IP address set in error). The searching device generates “IA3” (192.168.100.102) as a dummy IP address based on the determination result.

探索機器は、あらかじめ、ARPパケットまたは任意のIPパケットを監視することによって、ノード201の存在を認識しているものとする。すなわち、探索機器は、ノード201を起動ノードとして検出できており、そのMACアドレス“MA2”とそのIPアドレス“IA2”を把握している。ただし、ノード201が本当に目的機器であるかどうかはまだ分からない。   Assume that the searching device recognizes the presence of the node 201 in advance by monitoring an ARP packet or an arbitrary IP packet. That is, the searcher device can detect the node 201 as an activation node, and grasps the MAC address “MA2” and the IP address “IA2”. However, it is not yet known whether the node 201 is really the target device.

探索機器は、起動ノード(被探索機器)が目的ノードであるかどうかを、探索要求パケット(図16参照)を送信し(図15のパスP1を参照)、被探索機器から探索応答パケット(図19参照)を受信する(図15のパスP4を参照)ことより判断する。   The searching device transmits a search request packet (see FIG. 16) to determine whether the start node (searched device) is the target node (see path P1 in FIG. 15), and the search response packet (see FIG. 15). 19) (see path P4 in FIG. 15).

図15の探索シーケンスにより、探索機器が被探索機器を目的機器として検出に成功するには、被探索機器が、探索要求パケットを受信することができ、および探索機器が探索応答パケットを受信できることの両方が必要である。   With the search sequence of FIG. 15, in order for the searching device to successfully detect the searched device as the target device, the searching device can receive the search request packet and the searching device can receive the search response packet. Both are necessary.

−探索要求パケットの送信−
図15の探索要求パケットの送信を説明する。探索機器は、IPパケットである探索要求パケットを生成し、生成された探索要求パケットを送信する。探索要求パケットは、ノードリスト123のノード情報に基づき生成される。
-Transmission of search request packet-
Transmission of the search request packet in FIG. 15 will be described. The search device generates a search request packet that is an IP packet, and transmits the generated search request packet. The search request packet is generated based on the node information in the node list 123.

探索機器は、探索要求パケットを、通常IPレベルのパケットとして送信する。このとき、探索機器は、宛先IPアドレスを、探索機器が属するサブネット体系のアドレスとは異なるアドレスであると判断すると、通常、デフォルト・ゲートウェイに探索要求パケットを転送しようとする。デフォルト・ゲートウェイは通常ルーターに設定されるので、この場合、探索機器は、探索要求パケットをルーターに転送しようとする。探索要求パケットがルーターに転送されてしまうと、ルーターにとって、当該探索要求パケットの宛先IPアドレスは管轄外であるため、探索要求パケットをLAN側に転送しない。従って、探索要求パケットは被探索機器へ届かない。   The searcher device transmits a search request packet as a normal IP level packet. At this time, if the searching device determines that the destination IP address is an address different from the address of the subnet system to which the searching device belongs, the searching device normally tries to transfer the search request packet to the default gateway. Since the default gateway is normally set in the router, in this case, the searcher device tries to forward the search request packet to the router. When the search request packet is transferred to the router, the search request packet is not transferred to the LAN side because the destination IP address of the search request packet is outside the jurisdiction for the router. Therefore, the search request packet does not reach the searched device.

しかし、実施の形態1では、探索機器は、通常のIPレベルで探索要求パケットを送信せずに、RAWソケット122に、図16の探索要求パケットを生成させて、生成された探索要求パケットを送信させる。パケットが相手先に届くというのは、結局のところ、Ethernet(登録商標)のレベルでは、宛先MACアドレスが正しく設定されていれば良いのである。RAWソケットを使えば、直接、宛先MACアドレスを“MA2”に設定することで、デフォルト・ゲートウェイに転送されることなく、被探索機器(ノード201)にパケットを届けることができる。   However, in the first embodiment, the searcher device does not transmit the search request packet at the normal IP level, but causes the RAW socket 122 to generate the search request packet of FIG. 16 and transmits the generated search request packet. Let After all, the packet reaches the other party as long as the destination MAC address is set correctly at the Ethernet (registered trademark) level. If the RAW socket is used, the packet can be delivered to the search target device (node 201) without being transferred to the default gateway by directly setting the destination MAC address to “MA2”.

図16を参照して、探索要求パケットの宛先MACアドレスには、ノードリスト123のノード情報から読出されたMACアドレス“MA2”が設定される。また、探索要求パケットの送信元IPアドレスには、ダミーのIPアドレス“IA3”が設定される。ダミーのIPアドレス“IA3”は、被探索機器と同じサブネット体系のアドレスを示す。本実施の形態では、探索要求パケットに、送信元IPアドレスとして、ダミーのIPアドレスが設定されることを、“偽装する”という。   Referring to FIG. 16, the MAC address “MA2” read from the node information in node list 123 is set as the destination MAC address of the search request packet. A dummy IP address “IA3” is set as the source IP address of the search request packet. The dummy IP address “IA3” indicates an address of the same subnet system as that of the searched device. In the present embodiment, setting a dummy IP address as a source IP address in a search request packet is referred to as “spoofing”.

上記の送信元IPアドレスを偽装する理由について説明する。本来なら、探索要求パケットの送信元IPドレスには“IA1”が設定されるべきである。しかし、送信元IPアドレスとして“IA1”が設定された場合には、被探索機器は、探索要求パケットを受信できるが、探索機器は、被探索機器から探索応答パケットを受信することができない。なぜなら、被探索機器は、探索要求パケットの送信元IPアドレスは、当該被探索機器が属するサブネットは異なるサブネット体系のアドレスであると判断し、判断結果に基づき、当該探索応答パケットをデフォルト・ゲートウェイに転送しようとする。しかし、サブネット10において、当該デフォルト・ゲートウェイは存在しないため、被探索機器は、探索応答パケットを送信することができない。   The reason for impersonating the above source IP address will be described. Originally, “IA1” should be set in the source IP address of the search request packet. However, when “IA1” is set as the source IP address, the searched device can receive the search request packet, but the searching device cannot receive the search response packet from the searched device. This is because the searchee device determines that the source IP address of the search request packet is an address of a different subnet system from the subnet to which the searchee device belongs, and based on the determination result, the search response packet is sent to the default gateway. Try to transfer. However, since the default gateway does not exist in the subnet 10, the searchee device cannot transmit a search response packet.

したがって、実施の形態1では、探索機器は、探索要求パケットの送信元IPアドレスを、被探索機器と同じサブネット体系のアドレス(ダミーのIPアドレス)に偽装する。これにより、被探索機器は探索応答パケットを送信することが可能となる。   Therefore, in the first embodiment, the searcher device disguises the source IP address of the search request packet as an address (dummy IP address) in the same subnet system as that of the searchee device. As a result, the searchee device can transmit a search response packet.

−ARPリクエストの送信−
被探索機器は、図16の探索要求パケットを受信したとき、応答(図19の探索応答パケット)を探索機器に送信するために、まず、探索機器のMACアドレスを取得する必要がある。つまり、被探索機器は、受信した探索要求パケットの送信元IPアドレス“IA3”に対応したMACアドレスを取得していないので、被探索機器は、当該MACアドレスを取得するために、ARPリクエスト(図17参照)を用いてIPアドレス“IA3”の問い合わせを行なう。ARPリクエストは、通常、OS(オペレーティングシステム)レベルで送信されるARPパケットである。
-Send ARP request-
When the search target device receives the search request packet of FIG. 16, in order to transmit a response (search response packet of FIG. 19) to the search device, it is necessary to first obtain the MAC address of the search device. That is, since the searchee device has not acquired the MAC address corresponding to the transmission source IP address “IA3” of the received search request packet, the searchee device can obtain an ARP request (see FIG. 17) is used to make an inquiry about the IP address “IA3”. The ARP request is usually an ARP packet transmitted at the OS (operating system) level.

-ARPリプライの送信-
探索機器は、RAWソケット122を介して、被探索機器からARPリクエストを受信すると、ARPリプライ(図18参照)を送信する。図10のステップS18〜S19に相当する。
-Send ARP reply-
When the searching device receives the ARP request from the searching device via the RAW socket 122, the searching device transmits an ARP reply (see FIG. 18). This corresponds to steps S18 to S19 in FIG.

具体的には、探索機器は、受信されたパケットが、当該パケットの内容に基づき、探索IPアドレスとしてIPアドレス“IA3”が設定されたARPリクエストであると判断したときは、ARPリプライ(図18参照)を返信する。   Specifically, when the searcher device determines that the received packet is an ARP request in which the IP address “IA3” is set as the search IP address based on the contents of the packet, the ARP reply (FIG. 18). Reply).

ARPリプライは、通常、OSレベルで送信されるものであるが、本実施の形態1で、ARPリプライはダミーのIPアドレスについての機器を探索するためのものであるから、探索機器においては、OSレベルはなく、専用のプログラムによってARPリプライが生成されて送信される。探索機器は、探索IPアドレス“IA3”のARPリクエストに対応してARPリプライを応答する。   The ARP reply is normally transmitted at the OS level, but in the first embodiment, the ARP reply is for searching for a device for a dummy IP address. There is no level, and an ARP reply is generated and transmitted by a dedicated program. The searching device responds with an ARP reply in response to the ARP request of the search IP address “IA3”.

−探索応答パケットの送信−
被探索機器は、探索機器からARPリプライを受信したとき、IPパケットである探索応答パケット(図19参照)を送信する。その探索応答パケットは、探索機器に届く。
-Transmission of search response packet-
When the searched device receives an ARP reply from the searching device, it transmits a search response packet (see FIG. 19) that is an IP packet. The search response packet reaches the search device.

探索機器は、被探索機器からの探索応答パケットが上述の探索要求パケットに対応したものであるかを判断する。   The searcher device determines whether the search response packet from the searchee device corresponds to the search request packet described above.

探索機器は、受信した探索応答パケットが、上述の探索要求パケットに対応したものであると判断すれば、当該被探索機器は目的ノードであると判断する。   If the searcher device determines that the received search response packet corresponds to the search request packet described above, the searcher device determines that the searchee device is the target node.

d.探索シーケンスの具体例
図15の探索シーケンスを、具体例を挙げて説明する。この例では、サブネット10の無線LANルーター302のIPアドレスは“192.168.11.1”であり、探索機器(HEMSコントローラ100)のIPアドレスは“192.168.11.93”であり、および被探索機器(ノード201の電力モニタ)のIPアドレスは、誤って設定されたIPアドレス“192.168.100.100”である。
d. Specific Example of Search Sequence The search sequence in FIG. 15 will be described with a specific example. In this example, the IP address of the wireless LAN router 302 in the subnet 10 is “192.168.11.1”, the IP address of the search device (HEMS controller 100) is “192.168.11.93”, and the search target device (node 201). The IP address of the power monitor is the IP address “192.168.100.100” set in error.

(ステップ1)まず、探索機器は、被探索機器に対して、探索要求パケット(図16参照)を送信する。図16を参照して、探索要求パケットは、宛先ノードのMACアドレス、送信元ノードのMACアドレス、および上位層プロトコルのタイプを含む。探索要求パケットはさらに、送信元ノードのIPアドレスを示す送信元IPアドレス、および宛先ノードのIPアドレスを含む。探索要求パケットはさらに具体的なデータであるペイロードを含む。   (Step 1) First, the searcher device transmits a search request packet (see FIG. 16) to the searchee device. Referring to FIG. 16, the search request packet includes the MAC address of the destination node, the MAC address of the source node, and the type of the upper layer protocol. The search request packet further includes a source IP address indicating the IP address of the source node and an IP address of the destination node. The search request packet further includes a payload that is specific data.

当該探索要求パケットの送信元IPアドレスは、本来ならば探索機器の本来のIPアドレス“192.168.11.93”が設定されるべきである。しかし、本来のIPアドレスが設定された場合には、当該探索要求パケットは被探索機器には届くが、探索機器は、被探索機器から対応の探索応答パケットを受信することができない。   The original IP address “192.168.11.93” of the search device should be set as the transmission source IP address of the search request packet. However, when the original IP address is set, the search request packet reaches the searched device, but the searching device cannot receive the corresponding search response packet from the searched device.

探索機器は、探索応答パケットを受信できるようにするために、相手(被探索機器)と同じサブネットのアドレス体系となるダミーのIPアドレス(例えば、“192.168.100.101”)を生成する。探索機器は、生成されたダミーのIPアドレスを、送信元IPアドレスとして設定された探索要求パケットを、RAWソケット122を介して送信する。被探索機器は、上記のダミーのIPアドレスを有した探索要求パケットを受信する。   The searcher device generates a dummy IP address (for example, “192.168.100.101”) having an address system of the same subnet as the partner (searched device) in order to be able to receive the search response packet. The search device transmits a search request packet in which the generated dummy IP address is set as the transmission source IP address via the RAW socket 122. The searched device receives the search request packet having the dummy IP address.

(ステップ2)被探索機器は、探索要求パケットを受信したとき、送信元IPアドレス(“192.168.100.101”)宛に、探索応答パケットを返信しようとする。探索応答パケットは、宛先のIPアドレスとハードウェアアドレス(MACアドレス)を必要とする。   (Step 2) When the searchee device receives the search request packet, the searchee device tries to return a search response packet to the transmission source IP address (“192.168.100.101”). The search response packet requires a destination IP address and a hardware address (MAC address).

被探索機器は、送信元IPアドレス(“192.168.100.101”)のハードウェアアドレスが分からないので、探索応答パケット送信の前に、ハードウェアアドレスを取得するために、ARPリクエスト(図17参照)を送信する。ARPリクエストは、探索要求パケットの送信元を問合わせるパケットである。   Since the searchee device does not know the hardware address of the transmission source IP address (“192.168.100.101”), an ARP request (see FIG. 17) is acquired to acquire the hardware address before transmitting the search response packet. Send. The ARP request is a packet that inquires the source of the search request packet.

図17を参照して、ARPリクエストは、宛先ノードのMACアドレス、送信元ノードのMACアドレス、および上位層プロトコルのタイプを含む。さらに、ARPリクエストは、ARPの動作の種類を表すためのOPコード、送信者MACアドレス、送信者IPアドレス、探索MACアドレス、および探索IPアドレスを含む。   Referring to FIG. 17, the ARP request includes the MAC address of the destination node, the MAC address of the source node, and the type of the upper layer protocol. Further, the ARP request includes an OP code for indicating the type of ARP operation, a sender MAC address, a sender IP address, a search MAC address, and a search IP address.

(ステップ3)探索機器は、被探索機器からのARPリクエストを受信する。探索機器は、受信されたARPリクエストの探索IPアドレスが、上記のダミーのIPアドレス(“192.168.100.101”)と一致していると判断したとき、ARPリプライ(図18参照)を送信する。ARPリプライは、探索機器が、ARPリクエストを受信したときに、ダミーのIPアドレスを送信元にした当該問合わせに対する応答を示す。ARPリプライのパケットの構造は、ARPリクエストの構造と同様であるので、説明は繰返さない。   (Step 3) The searching device receives an ARP request from the searching device. When the search device determines that the search IP address of the received ARP request matches the dummy IP address (“192.168.100.101”), the search device transmits an ARP reply (see FIG. 18). The ARP reply indicates a response to the inquiry with the dummy IP address as the transmission source when the searching device receives the ARP request. Since the structure of the ARP reply packet is the same as that of the ARP request, description thereof will not be repeated.

被探索機器は、探索機器からのARPリプライを受信する。被探索機器は、受信されたARPリプライから、探索機器のハードウェアアドレスを取得する。探索機器は、上記のダミーのIPアドレスおよび取得されたハードウェアアドレスが設定された探索応答パケット(図19参照)を送信する。探索応答パケットの構造は、探索要求パケットの構造と同様であるので、説明は繰返さない。   The searched device receives the ARP reply from the searching device. The searched device acquires the hardware address of the searching device from the received ARP reply. The searcher device transmits a search response packet (see FIG. 19) in which the dummy IP address and the acquired hardware address are set. Since the structure of the search response packet is the same as that of the search request packet, description thereof will not be repeated.

(ステップ4)探索機器は、被探索機器から送信された探索応答パケットを受信する。これにより、探索機器は、当該探索機器が接続されたサブネット10において、IPアドレスが誤って設定された被探索機器(ノード201の電力センサ)が接続されていることを発見する。   (Step 4) The searcher device receives the search response packet transmitted from the searchee device. As a result, the searcher device discovers that the searchee device (the power sensor of the node 201) whose IP address is set incorrectly is connected in the subnet 10 to which the searcher device is connected.

図12のステップS42aでは、上記に述べた“ダミーのIPアドレスを用いた探索”が実施される。具体的には、HEMSコントローラ100は、まず、起動ノードのノード情報のIPアドレスについて、上述した“アドレス判断処理”を実施する。“アドレス判断処理”において、当該IPアドレスは、探索機器(HEMSコントローラ100)が属するサブネット10のサブネット体系のアドレスではないと判断された場合には、HEMSコントローラ100は、上述の“ダミーのIPアドレス生成処理”を実施する。   In step S42a of FIG. 12, the above-described “search using a dummy IP address” is performed. Specifically, the HEMS controller 100 first performs the above-described “address determination process” for the IP address of the node information of the activation node. In the “address determination process”, when it is determined that the IP address is not an address of the subnet system of the subnet 10 to which the search device (HEMS controller 100) belongs, the HEMS controller 100 determines that the “dummy IP address” "Generation process" is executed.

生成されたダミーのIPアドレスを用いた“探索シーケンス”(図15参照)が実施される。HEMSコントローラ100は、“探索シーケンス”により、当該起動ノードを、IPアドレスの設定が誤っている目的ノードとして発見する。   A “search sequence” (see FIG. 15) using the generated dummy IP address is performed. The HEMS controller 100 uses the “search sequence” to find the activation node as a target node with an incorrect IP address setting.

なお、ステップS42aの“探索シーケンス”で転送される探索要求パケット(図16参照)は、ステップS43でカウントされる。また、“探索シーケンス”で転送される探索応答パケット(図19参照)も、ステップS44におけるタイムアウトの測定対象として処理される。   The search request packet (see FIG. 16) transferred in the “search sequence” in step S42a is counted in step S43. Also, the search response packet (see FIG. 19) transferred in the “search sequence” is also processed as a timeout measurement target in step S44.

[実施の形態2]
実施の形態2は、実施の形態1の変形例である。実施の形態1では、HEMSコントローラ100は、目的ノードの探索時に、マルチキャストで探索要求パケットを送信する(図12のステップS40参照)。これに対して、実施の形態2では、HEMSコントローラ100は、ブロードキャストで探索要求パケットを送信する。図13のステップS42においても、“ダミーのIPアドレスを用いた探索”(ステップS42a)が実施される。ステップS42aの処理は、図12に示されたものと同じであるから、説明は繰返さない。
[Embodiment 2]
The second embodiment is a modification of the first embodiment. In the first embodiment, the HEMS controller 100 transmits a search request packet by multicast when searching for a target node (see step S40 in FIG. 12). On the other hand, in Embodiment 2, the HEMS controller 100 transmits a search request packet by broadcast. Also in step S42 of FIG. 13, “search using a dummy IP address” (step S42a) is performed. Since the process of step S42a is the same as that shown in FIG. 12, the description thereof will not be repeated.

なお、HEMSコントローラ100は、探索要求パケットをマルチキャストで送信するか、ブロードキャストで送信するかは、被探索機器によって使い分ける。探索機器と被探索機器との間で発見プロトコルが予め定められている。   Note that the HEMS controller 100 uses a search request packet depending on whether a search request packet is transmitted by multicast or broadcast. A discovery protocol is predetermined between the searching device and the searched device.

なお、実施の形態2でも、探索要求パケットがブロードキャストで送信される点を除いた構成および機能については、実施の形態1と同様の構成および機能が実現されるので、それらの詳細説明は繰返さない。   In the second embodiment as well, the configuration and functions other than the point that the search request packet is transmitted by broadcasting are the same as those in the first embodiment, so that detailed description thereof will not be repeated. .

図13は、本実施の形態2に係る目的ノードを探索する処理を示すフローチャートである。HEMSコントローラ100は、図13の処理を一定間隔(例えば、3分毎)で実行する。   FIG. 13 is a flowchart showing processing for searching for a target node according to the second embodiment. The HEMS controller 100 executes the process of FIG. 13 at regular intervals (for example, every 3 minutes).

図13を参照して、HEMSコントローラ100は、宛先IPアドレスがブロードキャスト・アドレスにセットされた探索要求パケットを送信する(ステップS40a)。   Referring to FIG. 13, the HEMS controller 100 transmits a search request packet in which the destination IP address is set to the broadcast address (step S40a).

ブロードキャスト・アドレスについてはマルチキャスト・アドレスとは異なり特に取り決めはなくてもよいが、ポート番号については、探索機器と被探索機器との間で予め定められている。   Unlike the multicast address, the broadcast address does not need to be determined in particular, but the port number is determined in advance between the searching device and the searched device.

例えば、被探索機器がシャープ株式会社製の電力モニタのノードである場合、HEMSコントローラ100は、宛先IPアドレスをブロードキャスト・アドレスに、宛先ポート番号を12132にセットした探索要求パケットをブロードキャストで送信する。   For example, when the search target device is a power monitor node manufactured by Sharp Corporation, the HEMS controller 100 transmits a search request packet in which the destination IP address is set to the broadcast address and the destination port number is set to 12132 by broadcast.

なお、ブロードキャスト・アドレスについては、IPアドレスの全ビットを1にした、リミテッド・ブロードキャスト・アドレス(255.255.255.255)と、IPアドレスのホスト部だけをすべて1にしたディレクティッド・ブロードキャスト・アドレスとがある。例えば、サブネット10の各ノードのIPアドレスが192.168.11.Xで、サブネットマスクが255.255.255.0であるとき、192.168.11.255となる。いずれにせよサブネット10の各ノードに届くことが期待できるので、どちらを使ってもよい。   As for the broadcast address, a limited broadcast address (255.255.255.255) with all bits of the IP address set to 1, and a directed broadcast with all the host part of the IP address set to 1 only. There is an address. For example, the IP address of each node in the subnet 10 is 192.168.11. When X and the subnet mask is 255.255.255.0, 192.168.11.255 is obtained. In any case, since it can be expected to reach each node of the subnet 10, either one may be used.

実施の形態2でも、サブネット10上の目的ノードを確実に探索するために、HEMSコントローラ100は、ノードリスト123の各ノード情報のIPアドレスに基づいて探索要求パケットを生成して、ユニキャストで送信する(ステップS41とS42)。このユニキャスト送信においても、上述した“ダミーのIPアドレスを用いた探索”(ステップS42a)が実施される。   Also in the second embodiment, the HEMS controller 100 generates a search request packet based on the IP address of each node information in the node list 123 and transmits it by unicast in order to reliably search for the target node on the subnet 10. (Steps S41 and S42). Also in this unicast transmission, the above-described “search using a dummy IP address” (step S42a) is performed.

なお、図13のステップS41以降の処理は、図12で説明した処理と同様であるから、詳細説明は繰返さない。   Since the processing after step S41 in FIG. 13 is the same as the processing described in FIG. 12, detailed description will not be repeated.

[実施の形態3]
実施の形態3では、実施の形態1と2の変形例が示される。変形例では、HEMSコントローラ100は、サブネット10のサブネット体系のアドレスとは異なるアドレスが設定されている目的ノードが探索されたことを示す情報(図20参照)を出力する機能を有する。図20には、ダミーのIPアドレスを用いた探索シーケンス(図15参照)に基づく情報の出力例が示される。
[Embodiment 3]
In the third embodiment, a modification of the first and second embodiments is shown. In the modification, the HEMS controller 100 has a function of outputting information (see FIG. 20) indicating that a target node in which an address different from the subnet system address of the subnet 10 is set is searched. FIG. 20 shows an output example of information based on a search sequence (see FIG. 15) using a dummy IP address.

HEMSコントローラ100は、上記の情報を、無線LANルーター302を介してサーバ装置901に送信する。サーバ装置901は、HEMSコントローラ100からの情報を記憶する。ユーザの端末902は、サーバ装置901と通信したとき、端末902のブラウジング機能により、サーバ装置901に記憶された情報を端末902の表示部などに表示する(図20参照)。   The HEMS controller 100 transmits the above information to the server device 901 via the wireless LAN router 302. The server device 901 stores information from the HEMS controller 100. When the user terminal 902 communicates with the server apparatus 901, the browsing function of the terminal 902 displays information stored in the server apparatus 901 on a display unit of the terminal 902 (see FIG. 20).

図20の情報では、“XY”は、HEMSコントローラ100とは異なるサブネット体系のIPアドレスを有した目的ノードの名称(例えば、電力モニタ、またはECHONET Liteノードであればそのクラス名など)を示す。また、図20の情報は、機器“XY”のMACアドレス“XX”を示しながら、当該機器“XY”のIPアドレス“ZZ”を、サブネット10のサブネット体系のIPアドレスに変更することを促すメッセージを含む。ユーザは、当該メッセージに従い、機器のIPアドレスを変更することができる。機器のIPアドレスが、サブネット10のサブネット体系のIPアドレスに変更された後は、HEMSコントローラ100は、当該機器(目的ノード)と、通常のIPレベルで通信することができる。なお、HEMSコントローラ100は、目的ノード(被探索機器)から受信したパケットの内容から、上記の“XY”、“XX”および“ZZ”の情報を取得することができる。   In the information of FIG. 20, “XY” indicates the name of a target node having an IP address of a subnet system different from that of the HEMS controller 100 (for example, the class name of a power monitor or an ECHONET Lite node). In addition, the information in FIG. 20 indicates the MAC address “XX” of the device “XY”, and a message that prompts the user to change the IP address “ZZ” of the device “XY” to the IP address of the subnet system of the subnet 10 including. The user can change the IP address of the device according to the message. After the IP address of the device is changed to the IP address of the subnet system of the subnet 10, the HEMS controller 100 can communicate with the device (target node) at a normal IP level. It should be noted that the HEMS controller 100 can acquire the information of the above “XY”, “XX”, and “ZZ” from the content of the packet received from the target node (searched device).

<HEMSコントローラの機能構成>
図8は、各実施の形態に係るHEMSコントローラ100の機能的構成を表す機能ブロック図である。図8を参照して、HEMSコントローラ100は、サブネット10上のパケットを送受信する通信部140、ノード情報管理部150、記憶部160、および探索部170を含む。通信部140は、高速通信インターフェイス1104を介して通信するRAWソケット122およびUDPソケット121の機能を含む。
<Functional configuration of HEMS controller>
FIG. 8 is a functional block diagram showing a functional configuration of the HEMS controller 100 according to each embodiment. Referring to FIG. 8, HEMS controller 100 includes a communication unit 140 that transmits and receives packets on subnet 10, node information management unit 150, storage unit 160, and search unit 170. The communication unit 140 includes functions of a RAW socket 122 and a UDP socket 121 that communicate via the high-speed communication interface 1104.

ノード情報管理部150は、サブネット10上にある起動ノードの存在を受動的に検出する。具体的には、通信部140を介してパケットを受信する毎に、図10と図11に示すように、パケット送信元のノードに関する情報をノード情報としてノードリスト123により管理する。   The node information management unit 150 passively detects the presence of an activation node on the subnet 10. Specifically, every time a packet is received via the communication unit 140, as shown in FIG. 10 and FIG. 11, information related to the packet transmission source node is managed by the node list 123 as node information.

探索部170は、通信部140を介して探索要求パケットを送信し、探索応答パケットを受信することによって目的ノードを探索する。探索部170は、図12に示すように、探索要求パケットを送信する際に、マルチキャストで送信するとともに、ノード情報管理部150により管理されるノード情報のアドレスを宛先にして、当該探索要求パケットをユニキャストで送信する。   The search unit 170 searches for a target node by transmitting a search request packet via the communication unit 140 and receiving a search response packet. As shown in FIG. 12, when searching for a search request packet, the search unit 170 transmits the search request packet by multicast and sends the search request packet to the address of the node information managed by the node information management unit 150 as a destination. Send by unicast.

探索部170は、探索要求パケットを送信する際に、上記のマルチキャストでの送信に代えて、図13に示すように、ブロードキャストで送信してもよい。   The search unit 170 may transmit the search request packet by broadcast as shown in FIG. 13 instead of the multicast transmission described above.

また、探索部170は、ダミー利用探索部171を有する。ダミー利用探索部171は、上述のステップS42aで示された“ダミーのIPアドレスを用いた探索”を実施する。   In addition, the search unit 170 includes a dummy usage search unit 171. The dummy usage search unit 171 performs the “search using a dummy IP address” shown in step S42a.

ノード情報管理部150は、図9に示すように、ノード情報が所定の時間更新されなければ、当該ノードが起動されているかどうかを確認するパケットを、通信部140を介して送信し、確認するパケットに呼応する応答の受信がなければノード情報を削除する。   As shown in FIG. 9, if the node information is not updated for a predetermined time, the node information management unit 150 transmits a packet for confirming whether or not the node has been activated via the communication unit 140 and confirms it. If no response corresponding to the packet is received, the node information is deleted.

<実施の形態の効果>
このように各実施の形態では、探索機器は、当該探索機器と同じサブネットに接続されながら、IPアドレスが誤って設定されている目的機器(被探索機器)を発見することができる。また、探索機器は、発見された目的機器のIPアドレスを正しいアドレスに変更するのを支援するための情報(図20参照)を、ユーザに提示することができる。
<Effect of Embodiment>
As described above, in each embodiment, the searching device can find a target device (searched device) in which an IP address is incorrectly set while being connected to the same subnet as the searching device. In addition, the searching device can present information (see FIG. 20) for assisting in changing the IP address of the discovered target device to a correct address to the user.

また、通信部140にてパケットを受信する毎に、パケット送信元のノードに関する情報をノード情報としてノードリスト123により管理する。これにより、無駄なトラフィックを発生させずに、サブネット10上に起動しているノードを受動的に検出できる。   Further, every time the communication unit 140 receives a packet, the node list 123 manages information related to the packet transmission source node as node information. As a result, it is possible to passively detect a node activated on the subnet 10 without generating unnecessary traffic.

また、HEMSコントローラ100がサブネット10上の目的ノードを探索する場合には、マルチキャストまたはブロードキャストの送信に加え、ノードリスト123のノード情報に基づく探索要求パケットをユニキャストで送信する。その結果、マルチキャスト・パケットまたはブロードキャスト・パケットが目的ノードに届かないようなネットワーク環境であっても、HEMSコントローラ100は、目的ノードを確実に見つけ出すことができる。   Further, when the HEMS controller 100 searches for a target node on the subnet 10, in addition to transmission of multicast or broadcast, a search request packet based on the node information of the node list 123 is transmitted by unicast. As a result, even in a network environment where multicast packets or broadcast packets do not reach the target node, the HEMS controller 100 can reliably find the target node.

また、探索要求パケットは、ノードリスト123のノード情報に基づき生成されてサブネット10に送信されるから、HEMSコントローラ100は、当該探索要求パケットを起動しているノードに限定して送信することができる。従って、HEMSコントローラ100が目的ノード探索のために無駄なトラフィックを発生させることはない。   Further, since the search request packet is generated based on the node information in the node list 123 and transmitted to the subnet 10, the HEMS controller 100 can transmit only the search request packet to the active node. . Therefore, the HEMS controller 100 does not generate useless traffic for the target node search.

今回開示された実施の形態およびその変形例はすべての点で例示であって制限的なものではないと考えられるべきである。本開示の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。   It should be thought that embodiment disclosed this time and its modification are illustrations in all the points, and are not restrictive. The scope of the present disclosure is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

1 通信ネットワーク、302 無線LANルーター、10 サブネット、100 HEMSコントローラ、110 デバイス側アプリケーション、120 ホスト側アプリケーション、140 通信部、150 ノード情報管理部、160 記憶部、170 探索部、171 ダミー利用探索部。   DESCRIPTION OF SYMBOLS 1 Communication network, 302 Wireless LAN router, 10 subnets, 100 HEMS controller, 110 Device side application, 120 Host side application, 140 Communication part, 150 Node information management part, 160 Storage part, 170 search part, 171 Dummy use search part

Claims (7)

ネットワークの同一サブネット上にある目的ノードを探索する制御装置であって、
前記制御装置は、
サブネット上のパケットを送受信する通信部と、
前記通信部を介して探索要求パケットを送信し、探索応答パケットを受信することによって目的ノードを探索する探索部と、
前記通信部を介してパケットを受信する毎に、サブネット上にある起動ノードの存在を受動的に検出して、ノード情報として管理するノード情報管理部と、
を備え、
前記探索部は、前記探索要求パケットを送信する際に、前記ノード情報管理部にあるノード情報のIPアドレスを宛先IPアドレスにしてユニキャストで送信するが、
その際、前記ノード情報のIPアドレスが誤って設定されていると判断すれば、前記ノード情報管理部にあるノード情報のMACアドレスを宛先MACアドレスとし、当該誤って設定されているIPアドレスに近いダミーアドレスを生成して、当該ダミーアドレスを送信元IPアドレスにして前記探索要求パケットを送信する、制御装置。
A control device that searches for a target node on the same subnet of a network,
The control device includes:
A communication unit that transmits and receives packets on the subnet;
A search unit for searching for a target node by transmitting a search request packet via the communication unit and receiving a search response packet;
A node information management unit that passively detects the presence of an activation node on a subnet and manages it as node information each time a packet is received via the communication unit;
With
When the search unit transmits the search request packet, the IP address of the node information in the node information management unit is transmitted as a destination IP address by unicast,
At this time, if it is determined that the IP address of the node information is set in error, the MAC address of the node information in the node information management unit is set as the destination MAC address, and is close to the IP address set in error A control device that generates a dummy address and transmits the search request packet using the dummy address as a source IP address.
前記探索部は、さらに、
前記探索要求パケットを送信した後に、前記ダミーアドレスを探索IPアドレスとするARPリクエストを受信したとき、前記ダミーアドレスを送信者IPアドレスとする当該ARPリクエストに対するARPリプライを送信する、請求項1に記載の制御装置。
The search unit further includes:
The ARP reply for the ARP request having the dummy address as a sender IP address is transmitted when an ARP request having the dummy address as a search IP address is received after the search request packet is transmitted. Control device.
前記探索部により、当該ダミーアドレスを宛先IPアドレスとする前記探索応答パケットを受信したとき、
前記制御装置は、
IPアドレスが誤って設定されている目的ノードが探索されたことを示す情報を出力する、請求項1または2に記載の制御装置。
When the search response packet having the dummy address as a destination IP address is received by the search unit,
The control device includes:
The control device according to claim 1, wherein the control device outputs information indicating that a target node having an IP address set incorrectly is searched.
前記探索部は、探索要求パケットを送信する際に、マルチキャストで送信するとともに、前記ノード情報管理部にあるノード情報のIPアドレスを宛先IPアドレスにしてユニキャストで送信する、請求項1から3のいずれかに記載の制御装置。   4. The search unit according to claim 1, wherein when the search request packet is transmitted, the search unit transmits the packet by multicast and transmits the IP address of the node information in the node information management unit as a destination IP address by unicast. 5. The control apparatus in any one. 前記探索部は、探索要求パケットを送信する際に、ブロードキャストで送信するとともに、前記ノード情報管理部にあるノード情報のIPアドレスを宛先IPアドレスにしてユニキャストで送信する、請求項1から3のいずれかに記載の制御装置。   4. The search unit according to claim 1, wherein when the search request packet is transmitted, the search unit transmits the packet by broadcast, and transmits the IP address of the node information in the node information management unit as a destination IP address by unicast. 5. The control apparatus in any one. ネットワークの同一サブネット上にある複数のノードと、前記複数のノードから目的ノードを探索する制御装置とを備えるシステムであって、
前記制御装置は、
サブネット上のパケットを送受信する通信部と、
前記通信部を介して探索要求パケットを送信し、探索応答パケットを受信することによって目的ノードを探索する探索部と、
前記通信部を介してパケットを受信する毎に、サブネット上にある起動ノードの存在を受動的に検出して、ノード情報として管理するノード情報管理部と、
を備え、
前記探索部は、探索要求パケットを送信する際に、前記ノード情報管理部にあるノード情報のIPアドレスを宛先IPアドレスにしてユニキャストで送信するが、その際、前記ノード情報のIPアドレスが誤って設定されていると判断すれば、前記ノード情報管理部にあるノード情報のMACアドレスを宛先MACアドレスとし、当該誤って設定されているIPアドレスに近いダミーアドレスを生成して、当該ダミーアドレスを送信元IPアドレスにして前記探索要求パケットを送信する、システム。
A system comprising a plurality of nodes on the same subnet of a network, and a control device for searching for a target node from the plurality of nodes,
The control device includes:
A communication unit that transmits and receives packets on the subnet;
A search unit for searching for a target node by transmitting a search request packet via the communication unit and receiving a search response packet;
A node information management unit that passively detects the presence of an activation node on a subnet and manages it as node information each time a packet is received via the communication unit;
With
When the search unit transmits a search request packet, the node information IP address of the node information in the node information management unit is transmitted as a destination IP address by unicast, but the IP address of the node information is incorrect. If the destination address is the MAC address of the node information in the node information management unit, a dummy address close to the erroneously set IP address is generated, and the dummy address is A system for transmitting the search request packet using a source IP address.
前記システムは、ユーザ端末をさらに備え、
前記ユーザ端末は、IPアドレスが誤って設定されている目的ノードが探索されたことを示す情報を画面上に表示する、請求項6に記載のシステム。
The system further comprises a user terminal,
The system according to claim 6, wherein the user terminal displays on the screen information indicating that a target node having an IP address set incorrectly is searched.
JP2015064800A 2015-03-26 2015-03-26 Control device and system Active JP6411262B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015064800A JP6411262B2 (en) 2015-03-26 2015-03-26 Control device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015064800A JP6411262B2 (en) 2015-03-26 2015-03-26 Control device and system

Publications (2)

Publication Number Publication Date
JP2016184882A true JP2016184882A (en) 2016-10-20
JP6411262B2 JP6411262B2 (en) 2018-10-24

Family

ID=57241942

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015064800A Active JP6411262B2 (en) 2015-03-26 2015-03-26 Control device and system

Country Status (1)

Country Link
JP (1) JP6411262B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111654394A (en) * 2020-05-26 2020-09-11 浙江大华技术股份有限公司 Method and device for searching equipment, computing equipment and storage medium
KR20230004222A (en) * 2019-05-07 2023-01-06 비트데펜더 아이피알 매니지먼트 엘티디 System and method for selectively collecting computer forensic data using DNS messages

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001257721A (en) * 2000-03-09 2001-09-21 Hitachi Ltd Address inspection system
JP2006020157A (en) * 2004-07-02 2006-01-19 Hitachi Ltd Node information collecting device
JP2007243839A (en) * 2006-03-10 2007-09-20 Matsushita Electric Ind Co Ltd Apparatus, method, and program for verification
WO2012101859A1 (en) * 2011-01-28 2012-08-02 株式会社日立国際電気 Network system, network apparatus, and network information setting method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001257721A (en) * 2000-03-09 2001-09-21 Hitachi Ltd Address inspection system
JP2006020157A (en) * 2004-07-02 2006-01-19 Hitachi Ltd Node information collecting device
JP2007243839A (en) * 2006-03-10 2007-09-20 Matsushita Electric Ind Co Ltd Apparatus, method, and program for verification
WO2012101859A1 (en) * 2011-01-28 2012-08-02 株式会社日立国際電気 Network system, network apparatus, and network information setting method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230004222A (en) * 2019-05-07 2023-01-06 비트데펜더 아이피알 매니지먼트 엘티디 System and method for selectively collecting computer forensic data using DNS messages
KR102580898B1 (en) 2019-05-07 2023-09-25 비트데펜더 아이피알 매니지먼트 엘티디 System and method for selectively collecting computer forensics data using DNS messages
CN111654394A (en) * 2020-05-26 2020-09-11 浙江大华技术股份有限公司 Method and device for searching equipment, computing equipment and storage medium
CN111654394B (en) * 2020-05-26 2022-11-22 浙江大华技术股份有限公司 Method and device for searching equipment, computing equipment and storage medium

Also Published As

Publication number Publication date
JP6411262B2 (en) 2018-10-24

Similar Documents

Publication Publication Date Title
US8732283B2 (en) Management of network membership
US8009587B2 (en) System and method of discovery of wireless control device
EP3207690B1 (en) Duplicate address detection based on distributed bloom filter
JP5798598B2 (en) IPv6 network host blocking and searching method
US9749287B2 (en) Interface directionality assignment
US9699136B2 (en) Stateless autoconfiguration of hostnames of network devices
GB2559310A (en) Building technology device communication system with IoT-network devices
JPWO2008152807A1 (en) MAC address deduplication method, network device management system, server and information device
JP6665444B2 (en) Information processing apparatus, control program for information processing apparatus, control method, and information processing system
EP2991313A1 (en) Method and system for forwarding information in distributed network
WO2013186969A1 (en) Communication information detecting device and communication information detecting method
CN113938427A (en) Communication method and system, and routing node
JP6411262B2 (en) Control device and system
JP2004357016A (en) Apparatus for restricting use of specific address
EP2690832A1 (en) Communication device, communication system, and communication method
Lee et al. DNS name autoconfiguration for IoT home devices
US7693091B2 (en) Teredo connectivity between clients behind symmetric NATs
CN109842692B (en) VxLAN switch, system and method for obtaining host information in physical network
JP6289138B2 (en) Controller, subnet, and information processing method
JP6489837B2 (en) Control device and system
JP6119187B2 (en) Management device, address information management program, and address information management system
JP6002642B2 (en) Communication node, network system, and device control method
CN108632198B (en) Equipment management method and device
JP2010098640A (en) Address setting apparatus, network terminal, and address setting method
JP4704251B2 (en) Network equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170925

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180626

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180813

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180905

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180926

R150 Certificate of patent or registration of utility model

Ref document number: 6411262

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150