JP2008140209A - Communication device with switchable server function, and switching method therefor and system - Google Patents
Communication device with switchable server function, and switching method therefor and system Download PDFInfo
- Publication number
- JP2008140209A JP2008140209A JP2006326598A JP2006326598A JP2008140209A JP 2008140209 A JP2008140209 A JP 2008140209A JP 2006326598 A JP2006326598 A JP 2006326598A JP 2006326598 A JP2006326598 A JP 2006326598A JP 2008140209 A JP2008140209 A JP 2008140209A
- Authority
- JP
- Japan
- Prior art keywords
- server function
- communication device
- router
- server
- network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、通信装置の交代方法に関し、より特定的には、ローカルネットワークにおいて、ネットワークに接続された通信装置間の通信に関し、特に宅内ネットワークが1台以上のルータで構成されるネットワークにおいて、ネットワーク構成の変化によりサービスを提供する通信装置を他の通信装置へ交代する方法に関するものである。 The present invention relates to a method for switching communication devices, and more particularly, to communication between communication devices connected to a network in a local network, and particularly in a network in which a home network is composed of one or more routers. The present invention relates to a method for switching a communication device that provides a service to another communication device due to a change in configuration.
近年、情報化社会の急速な進展とともに宅内におけるネットワーク化が普及しつつある。 In recent years, networking in the home has become widespread with the rapid development of the information society.
また、宅内のネットワークに接続される通信装置や通信機器(以降、併せて「通信機器」とよぶ)は、それらの通信機器が互いに連携して動作、つまり、通信機器間で通信し合いながら動作することで通信機器が提供するサービスの利便性を高めることが期待されている。しかし、宅内ネットワークの構成によってはサービスを受給できない(通信機器間の通信ができない)場合がある。 In addition, communication devices and communication devices (hereinafter collectively referred to as “communication devices”) connected to the home network operate in cooperation with each other, that is, communicate with each other. By doing so, it is expected to improve the convenience of the service provided by the communication device. However, depending on the configuration of the home network, the service may not be received (communication between communication devices may not be possible).
例えば、ハブの代わりにルータを接続したり、無線アクセスポイントの代わりに無線ルータを接続したりした場合、宅内ネットワークは複数のルータで構成されることになる。 For example, when a router is connected instead of a hub, or when a wireless router is connected instead of a wireless access point, the home network is composed of a plurality of routers.
ここで、家庭用ルータ(家庭用無線ルータ含む)にはNATまたはNAPT機能が搭載されている。図1はモデム内蔵ルータ3aの配下に無線ルータ3bを、さらにその配下に無線ルータ3cを接続し、宅内で複数のルータが直列に接続されたネットワーク構成の場合を示している。通信機器5bからサーバ機能付き通信機器4bに対しては、ルータ3bにとって同一ネットワーク内であるので通信可能である。また、通信機器5bから通信機器5aに対して開始する通信は、ルータ3bにとって、LAN側からWAN側への通信になるため、自動的にルータ3bにアドレス変換(NAPT)設定が行われ通信を行うことは可能である。しかし、通信機器5aからサーバ機能付き通信機器4bに対して開始する通信は、ルータ3bにとって、WAN側からLAN側への通信になるため、NAPT機能やファイアウォール機能が動作し通信することができない。この場合、LAN側からWAN側の通信機器へは通信が可能であるため、サーバ機能付き通信機器4bにサーバ機能付き通信機器4bから通信機器5aへ通信を開始する機能を持たせることで通信は可能である。ルータ3c配下の通信機器についても同様である。しかし、図2のようにルータ3aの配下にルータ3dが接続され、宅内で3台のルータがトライアングル状に接続されたネットワーク構成の場合は、前述の方法をもってしてもルータ3d配下の通信機器5dとルータ3b配下のサーバ機能付き通信機器4bが通信をすることは不可能である。この場合、サーバ機能付き通信機器4bではなくサーバ機能付き通信機器4aがサービスを供給していれば、全ての通信機器にとってLAN側からWAN側の通信となりサーバ機能付き通信機器と通信することが可能である。
Here, the home router (including the home wireless router) is equipped with a NAT or NAPT function. FIG. 1 shows a network configuration in which a
このようにネットワーク構成によってサービスの受給ができなくなることを回避するために、ネットワーク構成が変化した際にサービスを供給する通信機器をより最適な通信機器に交代させることが必要である。 In order to avoid such a situation that the service cannot be received due to the network configuration, it is necessary to replace the communication device that supplies the service with a more optimal communication device when the network configuration changes.
従来の通信機器の交代の方法としては、ネットワーク内の各子機のバッテリ残量や各端末の位置関係を調査し、ネットワークの維持に適した端末(通信可能な子機の多い子機)を新たな親機とするものがあった(例えば、特許文献1参照)。図42は、前記特許文献1に記載された従来の通信端末交代方法のシーケンスを示すものである。
As a conventional method of replacing communication devices, check the remaining battery capacity of each slave unit in the network and the positional relationship of each terminal, and select a terminal suitable for network maintenance (slave unit with many slave units that can communicate). There was a new parent device (for example, see Patent Document 1). FIG. 42 shows a sequence of the conventional communication terminal changing method described in
図42において、親機である端末1は自身のバッテリ残量を測定し(ステップS100)、残量が規定値より少なければ親機の切り替えを決定し(ステップS101)、端末2、端末3にそれぞれのバッテリ残量の情報を要求する(ステップS102)。端末2、端末3はそれぞれ自身のバッテリ残量を測定して(ステップS103)親機である端末1に通知し(ステップS104)、端末1は、各端末から受信したそれぞれのバッテリ残量を比較して親機を交代する端末を決定していた(ステップS105)。
しかしながら、前記従来の構成では同一ネットワークに接続する複数台の通信機器の中から1台を選択してサーバ機能を交代することは可能であるが、そもそも接続できないネットワーク構成が存在するという概念がないため、課題となる複数のルータで構成される宅内ネットワークに適用ができない。 However, in the conventional configuration, it is possible to select one of a plurality of communication devices connected to the same network and change the server function, but there is no concept that there is a network configuration that cannot be connected in the first place. Therefore, it cannot be applied to a home network composed of a plurality of routers as a problem.
つまり、複数のルータで構成される宅内ネットワークにおいて接続性を考慮すると上述の理由により、上位サブネットワークの通信機器にサーバ機能を交代することが望まれるが、従来の構成は同一のネットワーク上においてのみしか接続性を考慮できていないため、上位サブネットワークの通信機器にサーバ機能を交代させることができない。このことにより、上位サブネットワークの通信機器が下位サブネットワークのサーバ機能をもつ通信機器からサービスを受給できないという問題が発生する。 In other words, considering the connectivity in a home network composed of a plurality of routers, for the reasons described above, it is desirable to switch the server function to the communication device of the upper subnetwork. However, the conventional configuration is only on the same network. However, since the connectivity can only be taken into consideration, the server function cannot be changed to the communication device of the upper subnetwork. This causes a problem that the communication device of the upper subnetwork cannot receive service from the communication device having the server function of the lower subnetwork.
本発明は、前記従来の課題を解決するもので、ネットワーク構成が変化した際にサービスを供給する通信機器をより最適な通信機器に交代させる方法を提供することを目的とする。 An object of the present invention is to solve the above-described conventional problems, and to provide a method for replacing a communication device that supplies a service with a more optimal communication device when a network configuration changes.
前記従来の課題を解決するために、本発明の請求項1にかかるサーバ機能を有する通信装置は、外部ネットワークに接続するローカルネットワークにおいて、前記ローカルネットワーク内の通信装置と前記外部ネットワークとの間に1つ以上のルータが存在し、ローカルネットワークは1つ以上のルータにより1つ以上の異なるサブネットワークに区切られており、ローカルネットワークのいずれかのルータに接続され、ローカルネットワーク内の他の通信装置にサービスを提供する機能(サーバ機能)を有する通信装置であって、ローカルネットワーク内に存在するサーバ機能を有する他の通信装置を発見するサーバ機能発見手段と、少なくとも、サーバ機能発見手段の結果を用いてサーバ機能を有効にするべき通信装置を判断するサーバ機能適正判断手段と、サーバ機能適正判断手段の結果、または、他の通信装置からのサーバ機能切り替えメッセージの受信により、サーバ機能の有効及び無効を切り替えるサーバ機能切り替え手段と、を備える。
In order to solve the conventional problem, a communication device having a server function according to
本構成によって、ネットワーク上にサーバ機能を有する通信装置が複数台存在する場合に、サービスを供給する通信装置をより最適な通信装置に交代させることが可能となる。 With this configuration, when there are a plurality of communication devices having a server function on the network, it is possible to replace the communication device that supplies the service with a more optimal communication device.
本発明の請求項2にかかる通信装置は、請求項1に記載のサーバ機能を有する通信装置であって、サーバ機能発見手段は、ローカルネットワーク内に存在するサーバ機能を有する他の通信装置を探索するサーバ機能探索手段と、サーバ機能を有する他の通信装置からサーバ機能探索用パケットを受信し、サーバ機能探索用パケットに対して応答パケットを送信する探索応答手段を備え、サーバ機能探索手段が、ローカルネットワーク内に存在するサーバ機能を有する他の通信装置宛にサーバ機能探索用パケットを送信し、サーバ機能を有する他の通信装置からの応答パケットを受信する、または、探索応答手段が、サーバ機能を有する他の通信装置からサーバ機能探索用パケットを受信することでサーバ機能を有する通信装置を発見する。 According to a second aspect of the present invention, there is provided a communication apparatus having the server function according to the first aspect, wherein the server function discovery means searches for another communication apparatus having a server function existing in the local network. Server function search means for receiving the server function search packet from another communication device having a server function, and transmitting a response packet to the server function search packet, the server function search means, A server function search packet is transmitted to another communication apparatus having a server function existing in the local network, and a response packet is received from another communication apparatus having the server function, or the search response means has a server function The communication device having the server function is found by receiving the server function search packet from the other communication device having.
本構成によって、ネットワーク上にサーバ機能を有する装置が複数台存在するかどうかを検出することが可能となる。 With this configuration, it is possible to detect whether there are a plurality of apparatuses having a server function on the network.
本発明の請求項3にかかる通信装置は、請求項2に記載のサーバ機能を有する通信装置であって、サーバ機能を有する通信装置が接続されたルータから外部ネットワークとの間に位置するルータの内1つ以上のルータのLAN側アドレス情報又は、LAN側アドレス情報とWAN側アドレス情報を取得して、取得したアドレス情報を用いて、取得したアドレス情報が属する第1のネットワークに接続される通信装置が取ることが可能なアドレスの範囲を推測して記憶する上位サブネットワーク存在判断手段をさらに備え、サーバ機能探索手段は、上位サブネットワーク存在判断手段が記憶した1つ以上の前記第1のネットワークのアドレス範囲の情報を用いて、サーバ機能を有する通信装置が取りうるアドレスを得て、該アドレス宛にサーバ機能探索用パケットを送信する。
A communication device according to
本構成によって、自身が接続されたルータまたは、自身が接続されたルータと外部ネットワークとの間に存在する他のルータ(上位ルータ)に属するネットワークに存在するサーバ機能を有する通信装置および、自身が接続されたルータ配下に存在するサーバ機能を有する通信装置を発見することが可能となる。 With this configuration, a communication device having a server function that exists in a network to which the router to which the router is connected or another router (upper router) that exists between the router to which the router is connected and an external network, It becomes possible to find a communication device having a server function that exists under the connected router.
本発明の請求項4にかかる通信装置は、請求項2に記載のサーバ機能を有する通信装置であって、探索応答手段は、サーバ機能を有する他の通信装置からサーバ機能探索用パケットを受信し、サーバ機能適正判断手段が、自身はサーバ機能を有効にするべき通信装置であると判断している場合に、サーバ機能探索用パケットの応答パケットを送信する。
A communication device according to
本構成によって、サーバ機能を有する通信装置が多数存在した場合の探索応答によるトラフィック負荷を下げることが可能である。 With this configuration, it is possible to reduce the traffic load due to a search response when there are a large number of communication devices having a server function.
本発明の請求項5にかかる通信装置は、請求項1に記載のサーバ機能を有する通信装置であって、サーバ機能適正判断手段は、サーバ機能適正判断手段は、サーバ機能発見手段が、サーバ機能を有する通信装置が接続されたルータまたは、サーバ機能を有する通信装置が接続されたルータと外部ネットワークとの間に存在する他のルータ(上位ルータ)に属するネットワークにおいて、サーバ機能を有する他の通信装置を発見しなかった場合に、自身はサーバ機能を有効にするべき通信装置であると判断し、サーバ機能を有する他の通信装置を発見した場合に、自身はサーバ機能を無効にするべき通信装置である、と判断する。 According to a fifth aspect of the present invention, there is provided a communication apparatus having the server function according to the first aspect, wherein the server function appropriateness determining means is a server function appropriateness determining means, and the server function finding means is a server function. Other communication having a server function in a router to which a communication device having a network or a router to which a communication device having a server function is connected and another router (upper router) existing between an external network If a device is not found, it is determined that it is a communication device for which the server function is to be enabled, and if another communication device having the server function is found, it is a communication for which the server function is to be disabled. Judged to be a device.
本構成によって、常にサーバ機能を有する通信装置の中で最上位に位置する装置のサーバ機能を有効化できるため、サーバ機能を有する装置と他の通信装置との接続性を向上させることができる。また、自身が属するネットワークと同位ネットワークにサーバ機能を有効化しているサーバ機能を有する通信装置が存在している場合は交代しないことにより、サービスの提供を中断することなく維持することが可能である。 With this configuration, the server function of the device positioned at the highest level among the communication devices having the server function can be validated at all times, so that the connectivity between the device having the server function and other communication devices can be improved. In addition, if there is a communication device having a server function that enables the server function in the network to which it belongs and the peer network, it is possible to maintain the service provision without interruption by not replacing it. .
本発明の請求項6にかかる通信装置は、請求項1に記載のサーバ機能を有する通信装置であって、サーバ機能切り替え手段は、自身のサーバ機能を有効化から無効化に切り替える場合、自身がサービスを提供している通信装置に、サーバ機能を交代する他の通信装置の情報を送信する。 A communication device according to a sixth aspect of the present invention is the communication device having the server function according to the first aspect, wherein the server function switching means is configured such that when the server function is switched from being enabled to being disabled, Information of another communication device whose server function is changed is transmitted to the communication device providing the service.
本構成によって、サービスを提供されている各通信機器は新しくサーバ機能を有効化する通信装置に対して該装置をネットワーク上で検索することなく瞬時にセッションを接続しなおすことができ、サーバ機能を有効化する通信装置を交代することによるサービスの受給中断の可能性を低くすることが可能となる。 With this configuration, each communication device provided with a service can reconnect the session instantaneously without searching for the device on the network to the communication device that newly activates the server function. It is possible to reduce the possibility of interruption of service reception by changing the communication device to be activated.
本発明の請求項7にかかる通信装置は、請求項1に記載のサーバ機能を有する通信装置であって、サーバ機能切り替え手段は、自身のサーバ機能を無効化する場合、サーバ機能を交代する他の通信装置に自身がサービスを提供している通信装置の情報を送信する。 A communication device according to a seventh aspect of the present invention is the communication device having the server function according to the first aspect, wherein the server function switching means replaces the server function when invalidating its own server function. The information of the communication device that is providing the service is transmitted to the other communication device.
本構成によって、サービスを提供していた通信装置がサーバ機能が交代したことを検知できずサービスが受給不能となっている場合に、交代したサーバ機能を有効にした通信装置からサービスを提供していた通信装置に対してサービス提供を試みることが可能となる。 With this configuration, if the communication device that provided the service cannot detect that the server function has changed and the service cannot be received, the service is provided from the communication device that has enabled the replaced server function. It is possible to try to provide services to the communication apparatus.
本発明の請求項8にかかる通信装置は、請求項1に記載のサーバ機能を有する通信装置であって、サーバ機能切り替え手段は、前記サーバ機能適正判断手段が自身はサーバ機能を有効にするべき通信装置であると判断した場合に、サーバ機能発見手段が発見したサーバ機能を有する他の通信装置に、サーバ機能の無効化を指示するサーバ機能切り替えメッセージを送信し、自身のサーバ機能が有効化されていなければ自身のサーバ機能を有効化し、サーバ機能適正判断手段が自身はサーバ機能を無効にするべき通信装置であると判断した場合に、自身のサーバ機能が有効化されていれば、サーバ機能発見手段が発見したサーバ機能を有する他の通信装置に、サーバ機能の有効化を指示するサーバ機能切り替えメッセージを送信し、自身のサーバ機能を無効化する。 A communication apparatus according to an eighth aspect of the present invention is the communication apparatus having the server function according to the first aspect, wherein the server function switching means should enable the server function by itself. When it is determined that the server is a communication device, a server function switching message for instructing the server function to be invalidated is transmitted to another communication device having the server function discovered by the server function discovery means, and the server function is activated. If the server function is not enabled, the server function is enabled. If the server function appropriateness determining means determines that the server function is a communication device that should disable the server function, the server function is enabled. A server function switching message instructing the activation of the server function is transmitted to another communication device having the server function discovered by the function discovery means, and its own server To disable the function.
本構成によって、自身でサーバ機能の有効及び無効を切り替えるだけでなく、他のサーバ機能付き通信装置にサーバ機能の有効及び無効の切り替えを指示することが可能となる。 With this configuration, it is possible not only to switch the validity / invalidity of the server function by itself, but also to instruct other communication apparatuses with a server function to switch the validity / invalidity of the server function.
本発明の請求項9にかかる通信装置は、請求項1に記載のサーバ機能を有する通信装置であって、サーバ機能を有する通信装置が属するルータの下位に複数の異なるルータが並列に接続されていることを判断する下位サブネットワーク存在判断手段をさらに備え、下位サブネットワーク存在判断手段は、他の通信装置から受信するネットワーク構成変更通知メッセージを用いるか、または、ローカルネットワーク内の他の通信装置から受信するパケットに含まれる情報を用いて、サーバ機能を有する通信装置が属するルータの下位に複数の異なるルータが並列に接続されていることを判断し、サーバ機能適正判断手段は、下位サブネットワーク存在判断手段の結果によりサーバ機能を有効にする通信装置を判断する。
A communication device according to claim 9 of the present invention is the communication device having the server function according to
本構成によって、通信不可能な状態が発生した場合にのみサーバ機能を有効にした通信装置を交代させて通信不可な状態を回避させることができ、サービスを提供されている各通信装置がサーバ機能を有効化している通信装置とのセッションを張りなおす回数を削減でき、また、サーバ機能を有効にした通信装置をできるだけ変更させたくない場合などにも対応可能である。 With this configuration, it is possible to avoid the communication disabled state by replacing the communication device with the server function enabled only when the communication disabled state occurs, and each communication device provided with the service functions as a server function. It is possible to reduce the number of times of re-establishing a session with a communication apparatus that has enabled the server, and it is also possible to cope with a case where it is not desired to change the communication apparatus in which the server function is enabled as much as possible.
本発明の請求項10にかかる通信装置は、請求項9に記載のサーバ機能を有する通信装置であって、ローカルネットワーク内の他の通信装置から受信するパケットには、ローカルネットワーク内の他の通信装置が接続されたルータを識別可能な情報が含まれ、下位サブネットワーク存在判断手段は、少なくともローカルネットワーク内の他の通信装置から受信するパケットに含まれるルータを識別可能な情報を比較することで、サーバ機能を有する通信装置が属するルータの下位に複数の異なるルータが並列に接続されていることを判断する。 A communication device according to a tenth aspect of the present invention is the communication device having the server function according to the ninth aspect, wherein a packet received from another communication device in the local network includes other communication in the local network. Information that can identify the router to which the device is connected is included, and the sub-network existence determination means compares at least information that can identify the router included in a packet received from another communication device in the local network. Then, it is determined that a plurality of different routers are connected in parallel below the router to which the communication device having the server function belongs.
本構成によって、サーバ機能を有する通信装置自身で、自身が属するルータの下位に複数の異なるルータが並列に接続されていることを判断できる。 With this configuration, the communication device itself having the server function can determine that a plurality of different routers are connected in parallel below the router to which the communication device belongs.
本発明の請求項11にかかる通信装置は、請求項10に記載のサーバ機能を有する通信装置であって、下位サブネットワーク存在判断手段は、サーバ機能を有する通信装置が接続されたルータの識別情報と異なるルータの識別情報を含むパケットを複数受信し、かつ、受信した前記異なるルータの識別情報を含むパケットのIPヘッダに含まれる送信元アドレスが同一でない場合、サーバ機能を有する通信装置が属するルータの下位に複数の異なるルータが並列に接続されていることを判断する。 A communication apparatus according to an eleventh aspect of the present invention is the communication apparatus having the server function according to the tenth aspect, wherein the lower-layer sub-network existence determining means is identification information of a router to which the communication apparatus having the server function is connected. The router to which the communication device having the server function belongs is received when a plurality of packets including identification information of different routers are received and the source address included in the IP header of the received packet including identification information of the different routers is not the same Is determined that a plurality of different routers are connected in parallel.
本構成によって、サーバ機能を有する通信装置自身で、自身が属するルータの下位に複数の異なるルータが並列に接続されていることを確実に判断できる。 With this configuration, the communication device itself having the server function can reliably determine that a plurality of different routers are connected in parallel below the router to which the communication device belongs.
本発明の請求項12にかかる通信装置は、請求項9に記載のサーバ機能を有する通信装置であって、サーバ機能適正判断手段は、サーバ機能発見手段が、外部ネットワークに接続するローカルネットワークにおいて、サーバ機能を有する他の通信装置を発見しなかった場合に、自身はサーバ機能を有効にするべき通信装置であると判断し、サーバ機能を有する他の通信装置を発見した場合に、自身はサーバ機能を無効にするべき通信装置である、と判断する。 A communication apparatus according to a twelfth aspect of the present invention is a communication apparatus having the server function according to the ninth aspect, wherein the server function appropriateness determining means is configured so that the server function finding means is in a local network connected to an external network. If no other communication device having the server function is found, the device determines that it is a communication device to enable the server function, and if it finds another communication device having the server function, It is determined that the communication device is to disable the function.
本構成によって、各通信装置がサービスを受給可能なネットワーク構成である限りはサーバ機能を有効化する通信装置を変更させないことが可能である。 With this configuration, as long as each communication device has a network configuration that can receive a service, it is possible not to change the communication device that validates the server function.
本発明の請求項13にかかる通信装置は、請求項9に記載のサーバ機能を有する通信装置であって、サーバ機能適正判断手段は、サーバ機能発見手段が、サーバ機能を有する通信装置が属するルータの下位に、サーバ機能を有効化したサーバ機能を有する他の通信装置を発見しており、かつ、下位サブネットワーク存在判断手段が、サーバ機能を有する通信装置が属するルータの下位に複数の異なるルータが並列に接続されていると判断した場合に、サーバ機能を有効化する通信装置を変更すべきと判断する。 According to a thirteenth aspect of the present invention, there is provided a communication apparatus having the server function according to the ninth aspect, wherein the server function appropriateness determining means is a router to which the server function finding means belongs and the communication apparatus having the server function belongs. The lower sub-network existence determination means has found a plurality of different routers below the router to which the communication device having the server function belongs. Are determined to be connected in parallel, it is determined that the communication device that activates the server function should be changed.
本構成によって、各通信装置がサービスを受給不可能なネットワーク構成に変更された場合にのみ、各通信装置がサービスを受給可能なサーバ機能を有する通信装置にサーバ機能を交代させることが可能である。 With this configuration, only when each communication device is changed to a network configuration that cannot receive a service, it is possible to change the server function to a communication device having a server function that allows each communication device to receive a service. .
本発明の請求項14にかかる通信装置は、外部ネットワークに接続するローカルネットワークにおいて、前記ローカルネットワーク内の通信装置と前記外部ネットワークとの間に1つ以上のルータが存在し、ローカルネットワークは前記1つ以上のルータにより1つ以上の異なるサブネットワークに区切られており、ローカルネットワークのいずれかのルータに接続され、記ローカルネットワーク内のサーバ機能を有する通信装置および、他の通信装置とメッセージ通信を行う通信装置であって、サーバ機能を有する通信装置が接続されたルータと外部ネットワークとの間に位置するルータの内1つ以上のルータについて、LAN側ネットワークに接続される通信装置に設定することが可能なアドレスの範囲に関する情報を得て、記憶する上位サブネットワーク存在判断手段と、通信装置が属するルータの下位に複数の異なるルータが並列に接続されていることを判断する下位サブネットワーク存在判断手段を備え、ローカルネットワーク内の他の通信装置から受信するパケットには、前記ローカルネットワーク内の他の通信装置が接続されたルータを識別可能な情報が含まれ、下位サブネットワーク存在判断手段は、少なくとも前記ローカルネットワーク内の他の通信装置から受信するパケットに含まれる前記ルータを識別可能な情報を比較することで、通信装置が属するルータの下位に複数の異なるルータが並列に接続されていることを判断する。 In a communication device according to a fourteenth aspect of the present invention, in a local network connected to an external network, one or more routers exist between the communication device in the local network and the external network. It is divided into one or more different sub-networks by one or more routers, is connected to any router in the local network, and has a server function in the local network and performs message communication with other communication devices. One or more of the routers located between the router to which the communication device having the server function is connected and the external network are set as communication devices connected to the LAN side network. Obtain and store information about the range of possible addresses Subnetwork presence determination means and lower subnetwork presence determination means for determining that a plurality of different routers are connected in parallel below the router to which the communication device belongs are received from other communication devices in the local network The packet includes information capable of identifying a router to which another communication device in the local network is connected, and the lower subnetwork existence determination means includes at least a packet received from another communication device in the local network. By comparing information that can identify the routers included, it is determined that a plurality of different routers are connected in parallel below the router to which the communication device belongs.
本構成によって、サーバ機能をもたない通信装置が自身が属するルータの下位に複数の異なるルータが並列に接続されていることを判断可能となる。 With this configuration, it is possible to determine that a plurality of different routers are connected in parallel below the router to which the communication device having no server function belongs.
本発明の請求項15にかかる通信装置は、請求項14に記載の通信装置であって、下位サブネットワーク存在判断手段は、サーバ機能を有する通信装置が接続されたルータの識別情報と異なるルータの識別情報を含むパケットを複数受信し、かつ、受信した前記異なるルータの識別情報を含むパケットのIPヘッダに含まれる送信元アドレスが同一でない場合、通信装置が属するルータの下位に複数の異なるルータが並列に接続されていることを判断する。 A communication device according to claim 15 of the present invention is the communication device according to claim 14, wherein the lower subnetwork existence determination means is a router different from the identification information of the router to which the communication device having a server function is connected. When a plurality of packets including identification information are received and the source address included in the IP header of the received packet including the identification information of the different router is not the same, a plurality of different routers are located below the router to which the communication device belongs. Determine that they are connected in parallel.
本構成によって、サーバ機能をもたない通信装置自身で、自身が属するルータの下位に複数の異なるルータが並列に接続されていることを判断できる。 With this configuration, it is possible for a communication device itself having no server function to determine that a plurality of different routers are connected in parallel below the router to which the communication device belongs.
本発明の請求項16にかかる通信装置は、請求項14に記載の通信装置であって、下位サブネットワーク存在判断手段は、通信装置が属するルータの下位に複数の異なるルータが並列に接続されていると判断した場合に、上位サブネットワーク存在判断手段が記憶した1つ以上の前記第1のネットワークのアドレス範囲の情報を用いて、通信装置が接続されたルータまたは、前記通信装置が接続されたルータと外部ネットワークとの間に存在する他のルータ(上位ルータ)に属するネットワークに対し、ネットワーク構成変更通知メッセージを送信する。 The communication device according to claim 16 of the present invention is the communication device according to claim 14, wherein the lower subnetwork existence determination means includes a plurality of different routers connected in parallel below the router to which the communication device belongs. When it is determined that there is a router connected to the communication device or the communication device is connected using information on one or more address ranges of the first network stored by the upper subnetwork presence determination means A network configuration change notification message is transmitted to a network belonging to another router (upper router) existing between the router and the external network.
本構成によって、上位サブネットワークに存在する他の通信装置に対し、該ネットワークより下位のネットワークにおいて複数の異なるルータが並列に接続されていることを通知することが可能となる。 With this configuration, it is possible to notify other communication apparatuses existing in the upper subnetwork that a plurality of different routers are connected in parallel in a network lower than the network.
本発明の請求項17にかかるサーバ機能交代方法は、外部ネットワークに接続するローカルネットワークにおいて、前記ローカルネットワーク内の通信装置と前記外部ネットワークとの間に1つ以上のルータが存在し、ローカルネットワークは前記1つ以上のルータにより1つ以上の異なるサブネットワークに区切られており、ローカルネットワークのいずれかのルータに接続され、ローカルネットワーク内の他の通信装置にサービスを提供する機能(サーバ機能)を有する通信装置の交代方法であって、ローカルネットワーク内に存在するサーバ機能を有する他の通信装置を発見するステップと、サーバ機能を有効にするべき通信装置を判断するステップと、サーバ機能の有効及び無効を切り替えるステップと、を備える。 In the server function switching method according to claim 17 of the present invention, in a local network connected to an external network, one or more routers exist between the communication device in the local network and the external network. A function (server function) that is divided into one or more different sub-networks by the one or more routers, is connected to any router of the local network, and provides services to other communication devices in the local network A method of replacing a communication device having a step of discovering another communication device having a server function existing in a local network, a step of determining a communication device in which the server function is to be enabled, And a step of switching invalidity.
本構成によって、ネットワーク上にサーバ機能を有する通信装置が複数台存在する場合に、サービスを供給する通信装置をより最適な通信装置に交代させることが可能となる。 With this configuration, when there are a plurality of communication devices having a server function on the network, it is possible to replace the communication device that supplies the service with a more optimal communication device.
本発明の請求項18にかかる通信システムは、外部ネットワークに接続するローカルネットワークにおいて、前記ローカルネットワーク内の通信装置と前記外部ネットワークとの間に1つ以上のルータが存在し、ローカルネットワークは前記1つ以上のルータにより1つ以上の異なるサブネットワークに区切られており、ローカルネットワークのいずれかのルータに接続され、ローカルネットワーク内の他の通信装置にサービスを提供する機能(サーバ機能)を有する通信装置と、ローカルネットワークのいずれかのルータに接続され、前記ローカルネットワーク内のサーバ機能を有する通信装置および、他の通信装置とメッセージ通信を行う通信装置とを備え、サーバ機能を有する通信装置は、ローカルネットワーク内に存在するサーバ機能を有する他の通信装置を発見するサーバ発見部と、サーバ機能を有効にする通信装置を判断するサーバ適正判断部と、サーバ機能の有効及び無効を切り替えるサーバ機能切り替え部と含む。 In the communication system according to claim 18 of the present invention, in a local network connected to an external network, one or more routers exist between the communication device in the local network and the external network, and the local network is the 1 Communication divided into one or more different sub-networks by one or more routers, connected to any router in the local network, and having a function (server function) for providing services to other communication devices in the local network A communication device connected to one of the routers of the local network and having a server function in the local network, and a communication device that performs message communication with another communication device, the communication device having a server function, Server machine in the local network To discover other communication devices having comprising a server discovery unit, a server proper determination unit that determines a communication device to enable a server function, a server function switching unit for switching the valid and invalid server functions.
本構成によって、ネットワーク上にサーバ機能を有する通信装置が複数台存在する場合に、サービスを供給する通信装置をより最適な通信装置に交代させることが可能となる。 With this configuration, when there are a plurality of communication devices having a server function on the network, it is possible to replace the communication device that supplies the service with a more optimal communication device.
本発明の通信機器によれば、ネットワーク構成が変化した際にサービスを供給する通信機器をより最適な通信機器に交代させることで、ネットワーク構成に依存せず機器同士の接続性を向上させることができる。 According to the communication device of the present invention, it is possible to improve connectivity between devices without depending on the network configuration by replacing the communication device that supplies the service when the network configuration changes with a more optimal communication device. it can.
以下本発明の実施の形態について、図面を参照しながら説明する。 Embodiments of the present invention will be described below with reference to the drawings.
(実施の形態1)
[サーバ交代方法の適用環境]
図1は、本発明の実施の形態1における宅内ネットワークの一構成例である。
(Embodiment 1)
[Applicable environment for server replacement method]
FIG. 1 is a configuration example of a home network according to
宅内ネットワーク2は、3台のルータ3a〜3cが接続され構成されており、ルータ3aがインターネット1に接続している最上位ルータになっている。各ルータには、サーバ機能を有したサーバ機能付き通信機器4a〜4cとサーバ機能を持たない通信機器5a〜5cが接続されている。この宅内ネットワーク2の構成は有線でも無線でもよい。各通信機器4a〜4c、5a〜5cは、ネットワークを通じて通信することが可能である。また、サーバ機能付き通信機器はユーザや他の通信機器に自身が持つサービスを提供する機能を備えている。サーバ機能付き通信機器の一例としては、他の通信機器からの要求によりコンテンツ一覧の情報を応答送信したり、他の通信機器から要求されたコンテンツの内容を送信したりするネットワーク対応のAVのレコーダや、通信機器からの要求や応答を別の通信機器へ中継する中継装置などが考えられる。なお、ここで述べたAVレコーダや中継装置は、通信機器の一例でありこれに限定するものではない。また、3台のルータで構成された宅内ネットワークの構成は一例であり、3台より少ないルータで構成されたネットワーク又は3台以上のルータで構成されたネットワークでも同様に適用可能である。
The
ここで、本実施の形態ではサーバ機能付き通信機器4a〜4cが持つサーバ機能は、他の通信機器と間に通信路を確保して、メッセージの中継を行うことで異なるルータ配下に接続する通信機器間のメッセージ通信を可能とする中継機能として説明する。よって本実施の形態においては、サーバ機能を有効にしているサーバ機能付き通信機器と一度メッセージの送受信を行った後は、通信機器とサーバ機能付き通信機器とは通信路を保持し、通信機器はサーバ機能付き通信機器を介して、他の通信機器とルータを越えた通信を行うことが可能となる。
Here, in the present embodiment, the server functions of the server-equipped
図3は、本発明の実施の形態1における通信機器の基本的なハード構成の一例を示している。通信機器は、メインCPUとROM、RAM、ユーザI/OとネットワークI/Fで構成される。メインCPUは、他の通信機器とデータの送受信を行うための通信サービスと、通信機器がユーザや他の通信機器にその通信機器固有のサービスを提供するアプリケーションサービスに関する処理を行う。このメインCPUが行う処理実行時に、データやプログラムをROM、RAMから読み出し、RAMへの書き込みを実行する。そして、このとき、ユーザI/Oを通じて、ユーザからの入力受付やサービスに関する情報の表示等を実行する。また、ネットワークI/Fを通じて、宅内ネットワークの通信機器やルータとデータのやりとりを実行する。
FIG. 3 shows an example of a basic hardware configuration of the communication device according to
ここで述べたアプリケーションサービスとは、前述のAVレコーダの例で言うと、コンテンツ一覧情報の提供やコンテンツデータの送信等のサービス等に該当する。また、通信サービスとは、通信相手の通信機器との間で情報のやりとりを行うための通信制御等に該当する。 The application service described here corresponds to a service such as provision of content list information and transmission of content data in the example of the AV recorder described above. The communication service corresponds to communication control for exchanging information with the communication device of the communication partner.
[サーバ機能付き通信機器の機能構成]
図4は、本発明の実施の形態1におけるサーバ機能付き通信機器4aの構成を示す機能ブロック図である。なお、本実施の形態における他のサーバ機能付き通信機器も同じ構成をとるものとする。
[Functional configuration of communication equipment with server function]
FIG. 4 is a functional block diagram showing the configuration of the
図4において、サーバ機能付き通信機器4aは、通信I/F部400と、上位サブネットワーク判断部401と、記憶部402と、サーバ機能探索・応答部403とサーバ適正判断部404と、サーバ機能切り替え部405と、サーバ機能部/クライアント機能部406とを備えている。
In FIG. 4, the communication device with
[通信I/F部]
通信I/F部400は、ネットワークI/Fを制御し、ネットワークからの情報の受信とネットワークへの情報の送信を実行する。
[Communication I / F part]
The communication I /
なお、通信I/F部400において通信に用いる自身のアドレス情報を管理し、下位のルータ配下の通信機器からサーバ機能を有効にした通信機器を発見しやすくするために、ネットワークで実際に設定可能なアドレスの内、ある決められたアドレス範囲内のアドレスを設定するアドレスの再設定処理を実行するようにしてもよい。このときアドレス情報として管理する情報の一例としては、自身のIPアドレス、ネットマスク、デフォルトゲートウエイアドレス等が考えられる。
In addition, the communication I /
[上位サブネットワーク判断部]
上位サブネットワーク判断部401は、上位サブネットワーク解析(後述)を実施し、自身が接続されているルータのより上位(インターネット側)に接続されたルータ配下のネットワーク情報を取得する。例えば、図1のルータ3bに接続されたサーバ機能付き通信機器4bの上位サブネットワーク判断部は、ルータ3a配下のネットワーク情報を取得する。上位サブネットワーク解析を簡単に記述すると、trace routeを用いて上位ルータのLAN側アドレスを取得、又はUPnP IGD使用を用いて自身が接続しているルータのWAN側アドレスを取得し、取得したアドレスを用いて上位サブネットワークのネットワークアドレスを特定することによって、上位ルータに接続される通信機器に設定可能なアドレスを推測する処理である。
[High-level subnetwork judgment unit]
The upper
上位サブネットワーク判断部401は上位サブネットワーク解析で取得した上位サブネットワーク情報を記憶部402に記憶する。上位サブネットワーク情報の一例としては、上位サブネットワークのネットワークアドレス情報があげられる。つまり、ルータ3a配下のネットワークアドレスが、192.168.1.0/24である場合、ルータ3bに接続されたサーバ機能付き通信機器4bの上位サブネットワーク情報には、192.168.1.0/24が記憶される。ここで、192.168.1.0はネットワークアドレスを示しており、/24はネットマスクのビット数を示している。同様に、ルータ3b配下のネットワークアドレスが192.168.2.0/24である場合、ルータ3cに接続されたサーバ機能付き通信機器4cの上位サブネットワーク情報には、192.168.1.0/24と192.168.2.0/24の2つのネットワークアドレスが記憶される。なお、ネットワークアドレスが分かれば、ホストアドレスの取り得る値が容易に類推できるため、そのネットワークに接続される通信機器に設定される可能性があるアドレスを容易に特定することが可能である。
The upper
[記憶部]
記憶部402は、上位サブネットワーク情報、ルータの識別情報、通信相手の通信機器の情報、現在サーバ機能を有効にしているサーバ機能付き通信機器の情報などを記憶する。
[Storage unit]
The
[サーバ機能探索・応答部]
サーバ機能探索・応答部403は、記憶部402に記憶されている上位サブネットワーク情報を利用し、上位のルータに属するネットワーク上に”サーバ機能が有効である通信機器”が接続されていないかを探索する処理と、同位のルータに属するネットワーク上に”サーバ機能が有効である通信機器”が接続されていないかを探索する処理と、自身のサーバ機能が有効になっている場合、他の通信機器から受信したサーバ機能探索要求に対して応答を返信する機能を提供する機能である。このとき、探索処理によりサーバ機能が有効になっている他の通信機器を発見した場合は、その旨をサーバ適正判断部404に通知し、発見した通信機器の情報をサーバ機能切り替え部405に通知する。探索によりサーバ機能が有効になっている他の通信機器を発見できなかった場合は、その旨をサーバ適正判断部404に通知する。また、サーバ機能探索・応答部403は、他の通信機器からのサーバ機能探索要求の受信を常に待つ。他の通信機器からサーバ機能探索要求を受信した場合は、自身のサーバ機能が有効であればサーバ機能探索要求の応答を送信する。
[Server function search / response section]
The server function search /
[サーバ適正判断部]
サーバ適正判断部404は、サーバ機能を有効にするべき通信機器を判断する機能部である。サーバ適正判断部404は、サーバ機能探索・応答部403から、探索によりサーバ機能が有効になっている通信機器を発見した旨の通知を受けると上位サブネットワークまたは同位ネットワークにサーバ機能が有効になっている通信機器が存在すると判断する。また、探索によりサーバ機能が有効になっている通信機器を発見できなかった旨の通知を受けると上位サブネットワークまたは同位ネットワークにサーバ機能が有効になっている通信機器が存在しないと判断する。これは、家庭用ルータのNAPT機能やファイアウォール機能が妨げとなりWAN側に位置する通信機器からLAN側に位置する通信機器に対して通信を開始することができないことにより、自身を通信の開始者として通信可能な通信機器は、自身と同じネットワークに存在する通信機器、または自身に対しWAN側に位置する通信機器であると判断できるからである。よって、探索によりサーバ機能が有効である通信機器を発見した場合は発見した機器は上位サブネットワークまたは同位ネットワークに存在すると判断できる。また、WAN側に位置する通信機器から通信を開始してLAN側に位置する通信機器と通信することができないという問題は、LAN側に位置する通信機器からWAN側に位置する通信機器に通信を開始することで回避可能である。つまり、サーバ機能を有効にした通信機器を最上位サブネットワークに設置することで各通信機器はサーバ機能を有効にした通信機器に対してLAN側に位置することになり、自身を通信の開始者として通信することが可能となる。よって、サーバ機能探索・応答部403から探索によりサーバ機能が有効になっている通信機器を発見した旨の通知を受けると、発見した通信機器は上位サブネットワークまたは同位ネットワークに存在するため自身はサーバ機能を無効にするべき通信機器であると判断し、判断結果をサーバ機能切り替え部405に通知する。一方、探索によりサーバ機能が有効になっている通信機器を発見できなかった旨の通知を受けると、サーバ機能付き通信機器はネットワーク上に存在しない、もしくは下位サブネットワークに存在するため自身はサーバ機能を有効にするべき通信機器であると判断し、判断結果をサーバ機能切り替え部405に通知する。
[Server suitability determination section]
The server
[サーバ機能切り替え部]
サーバ機能切り替え部405は、サーバ機能切り替えの指示を受けてサーバ機能部/クライアント機能部406の機能を切り替える機能部である。サーバ機能切り替えの指示としては、他のサーバ機能付き通信機器からのサーバ機能切り替えメッセージ、サーバ適正判断部404からの判断結果がある。サーバ機能切り替え部405は、サーバ機能を有効化する場合は、サーバ機能部/クライアント機能部406のサーバ機能部を有効化し、クライアント機能部を無効化する。一方、サーバ機能を無効化する場合は、サーバ機能部/クライアント機能部406のサーバ機能部を無効化し、クライアント機能部を有効化する。なお、本実施の形態の初期状態では、サーバ機能部/クライアント機能部406のサーバ機能部は無効化、クライアント機能部は有効化されているものとする。
[Server function switching section]
The server
また、サーバ機能を有効な状態から無効な状態へ切り替える場合は、切り替える前にサービスを提供している通信機器に対し交代するサーバ機能付き通信機器の情報を通知し、該情報をサーバ機能が有効になっている通信機器の情報として記憶部402に記憶する。サーバ機能を無効な状態から有効な状態へ切り替える場合は、有効化後自身の情報をサーバ機能が有効になっている通信機器の情報として記憶部402に記憶する。なお、交代するサーバ機能付き通信機器の情報は、サーバ機能探索・応答部403から通知されるか、他のサーバ機能付き通信機器からのサーバ機能切り替えメッセージから取得する。
In addition, when switching the server function from the valid state to the invalid state, before switching, the communication device with the server function is notified to the communication device providing the service, and the server function is valid. Is stored in the
また、サーバ適正判断部404からの判断結果によりサーバ機能を切り替える場合は、サーバ機能を切り替える前に発見したサーバ機能付き通信機器に対しサーバ適正判断部404からの判断結果の指示をサーバ機能切り替えメッセージとして通知する。
In addition, when switching the server function based on the determination result from the server
[サーバ機能部/クライアント機能部]
サーバ機能部/クライアント機能部406は、他の通信機器にサービスを提供するサーバ機能と、サーバ機能が有効になっている通信機器と通信する(サービスを受ける)ためのクライアント機能部とからなり、サーバ機能切り替え部405により制御され、一方の機能が有効な場合は他方の機能は無効となるように制御される。
[Server Function / Client Function]
The server function unit /
サーバ機能部として機能する場合は、記憶部402に記憶されている他の通信機器の情報を用いて通信を行い、クライアント機能部として機能する場合は、記憶部402に記憶されているサーバ機能が有効になっている通信機器の情報を用いて該通信機器と通信する。
When functioning as a server function unit, communication is performed using information of other communication devices stored in the
[サーバ機能付き通信機器の動作の概要]
以上のように構成されたサーバ機能付き通信機器4a〜4cの動作概要について、図6、図7、図8、図9、図10を用いて説明する。
[Overview of operation of communication equipment with server function]
An outline of the operation of the server-equipped
図6は本発明の実施の形態におけるサーバ機能付き通信機器の全体的な処理フローである。 FIG. 6 is an overall processing flow of the communication device with a server function in the embodiment of the present invention.
サーバ機能付き通信機器はメッセージを受信すると(ステップS600でYes)メッセージ受信処理(ステップS601)を、また、一定時間ごとにサーバ機能付き通信機器探索処理(ステップS603)を実行している。 When the communication device with a server function receives a message (Yes in step S600), the communication device search processing with a server function (step S603) is executed (step S601).
[サーバ機能付き通信機器探索処理]
図7は本発明の実施の形態1におけるサーバ機能付き通信機器のサーバ機能付き通信機器探索処理(ステップS603)の処理フローである。
[Communication device search processing with server function]
FIG. 7 is a processing flow of the communication device searching process with a server function (step S603) of the communication apparatus with a server function according to the first embodiment of the present invention.
まず、上位サブネットワーク判断部401が上位サブネットワーク解析(ステップS700、詳細は後述)を実施して、自身が接続されているルータのより上位(インターネット側)に接続されたルータ配下のネットワークアドレスの情報(上位サブネットワーク情報)を取得し、記憶部402に記憶する。そして、サーバ機能探索・応答部403が、上位サブネットワーク情報を利用して上位の各ルータに接続された”サーバ機能が有効である通信機器”のアドレスを推定し、サーバ機能探索要求をユニキャストで送信する(ステップS701)。また、同時に自身が属するルータ配下のネットワーク内にサーバ機能探索要求をマルチキャストまたはブロードキャスト送信する(ステップS701)。なお、上位サブネットワーク解析で上位にルータの存在を検知しなかった場合は、自身が属するルータ内にのみサーバ機能探索要求をマルチキャストまたはブロードキャスト送信する(ステップS701)。
First, the upper
例えば、図1のルータ3cに接続されたサーバ機能付き通信機器4cは、ルータ3a及びルータ3bのネットワークアドレス情報を元にして、ルータ3a及びルータ3bに接続された”サーバ機能が有効である通信機器”のアドレスを推定し、サーバ機能探索要求をユニキャスト送信する。なお、この”サーバ機能が有効である通信機器”のアドレスを推定する処理において、”サーバ機能が有効である通信機器”が特定のアドレス範囲を取るように制御される(アドレスの再設定処理を実行している)場合、候補となるアドレスにのみサーバ機能探索要求を送信する。この処理によって、ルータ3a及びルータ3cの有効なホストアドレス全体(例えば、クラスCのプライベートアドレス場合、192.168.x.1〜192.168.x.254)にサーバ機能索要求を送信する必要がなくなり、定められたアドレス範囲にだけ、サーバ機能探索要求を送信すればよくなる。結果として、処理の高速化、通信トラヒックの削減が可能となる。
For example, the
図12にサーバ機能探索要求の一例を示す。サーバ機能探索要求では、ボディ内のメッセージIDフィールドに本メッセージがサーバ機能探索要求であることを示すIDをセットする。また、送信元IDとして、送信元通信機器固有のIDを設定する。なお、サーバ機能探索要求送信元の通信機器がサーバ機能を有するか有さないかの情報は通信機器固有のIDに含めてもよいし、他のフィールドを用意してもよい。 FIG. 12 shows an example of a server function search request. In the server function search request, an ID indicating that this message is a server function search request is set in the message ID field in the body. Also, an ID unique to the transmission source communication device is set as the transmission source ID. Information indicating whether the communication device that is the server function search request transmission source has the server function may be included in the ID unique to the communication device, or another field may be prepared.
上位ルータに接続されたサーバ機能付き通信機器は、サーバ機能探索要求を受信すると、自身のサーバ機能が有効である場合にのみ、サーバ機能探索・応答部403がサーバ機能探索応答をサーバ機能探索要求の送信元アドレス(IPアドレス、ポート番号)宛てに送信する。サーバ機能探索応答のフォーマットの一例は、サーバ機能探索要求と同一である。但し、メッセージIDとしてはサーバ機能探索応答であることを示すID値がセットされる。
When the server function communication device connected to the upper router receives the server function search request, the server function search /
ここで、一般にルータはLAN側ネットワークに接続された機器からWAN側ネットワークに接続された機器に通信を開始した場合、自動的にアドレス変換設定(NAPT設定)が実行され、WAN側のネットワークに接続された機器に送信される。そのため、WAN側ネットワークに接続された機器は、受信したパケットの送信元アドレス(IPアドレス、ポート番号)宛にパケットを送信することで、LAN側ネットワークに接続された機器と通信が可能である。このため、上記のようなサーバ機能探索要求パケットを上位のルータに接続された通信機器に向けて送信することにより、上位側のルータに接続された”サーバ機能が有効である通信機器”からの応答を受信することが可能となり、結果として”サーバ機能が有効である通信機器”を発見することができる。 Here, in general, when a router starts communication from a device connected to the LAN side network to a device connected to the WAN side network, address conversion setting (NAPT setting) is automatically executed and connected to the WAN side network. Sent to the connected device. Therefore, a device connected to the WAN side network can communicate with a device connected to the LAN side network by transmitting the packet to the source address (IP address, port number) of the received packet. For this reason, by transmitting the server function search request packet as described above to the communication device connected to the upper router, the “communication device having an effective server function” connected to the upper router is transmitted. A response can be received, and as a result, a “communication device in which the server function is effective” can be found.
次に、サーバ機能探索・応答部403がサーバ機能探索応答を受信できたかを判断する(ステップS702)。
Next, it is determined whether the server function search /
サーバ機能探索応答を受信できなかった場合は(ステップS702でNo)、サーバ適正判断部404において、上位サブネットワークまたは同位ネットワークにサーバ機能が有効である通信機器が存在しないため、自身はサーバ機能を有効にするべき通信機器であると判断する(ステップS703)。その後、サーバ機能がすでに有効であるかどうかを判断し(ステップS704)、すでに有効であれば(ステップS704でYes)処理を終了し、サーバ機能が有効でなければ(ステップS704でNo)、サーバ機能切り替え部405において適正判断によるサーバ機能切り替え処理を行う(ステップS705)。
If the server function search response has not been received (No in step S702), the server
一方、サーバ機能探索応答を受信した場合は(ステップS702でYes)、サーバ適正判断部404において、発見したサーバ機能が有効である通信機器は上位サブネットワークまたは同位ネットワークに存在するため自身はサーバ機能を無効にするべき通信機器であると判断する(ステップS706)。その後、サーバ機能がすでに有効であるかどうかを判断し(ステップS707)、サーバ機能が有効でなければ(ステップS707でNo)処理を終了し、有効であれば(ステップS707でYes)サーバ機能切り替え部405において適正判断によるサーバ機能切り替え処理を行う(ステップS705)。
On the other hand, if the server function search response is received (Yes in step S702), the server
[メッセージ受信処理]
図8は本発明の実施の形態1におけるサーバ機能付き通信機器のメッセージ受信処理(ステップS601)の処理フローである。
[Message reception processing]
FIG. 8 is a processing flow of message reception processing (step S601) of the communication device with server function according to the first embodiment of the present invention.
サーバ機能付き通信機器4aのサーバ機能探索・応答部403は、常に、下位のルータに接続された通信機器からのサーバ機能探索要求の受信(ステップS800)、およびサーバ機能付き通信機器からのサーバ機能切り替えメッセージの受信(ステップS803)を待っている。下位のルータに接続された通信機器からのサーバ機能探索要求を受信すると(ステップS800でYes)、自身のサーバ機能が有効であるかどうかを判断し(ステップS801)、有効であれば(ステップS801でYes)サーバ機能探索要求の応答を送信する(ステップS802)。サーバ機能が有効でなければ(ステップS801でNo)処理を終了する。
The server function search /
一方、受信したメッセージが他のサーバ機能付き通信機器からのサーバ機能探索要求ではなく(ステップS800でNo)サーバ機能切り替えメッセージであった場合は(ステップS808でYes)、サーバ機能切り替え部405においてメッセージ受信によるサーバの切り替え処理を行い(ステップS804)、処理を終了する。
On the other hand, when the received message is not a server function search request from another communication device with a server function (No in step S800) but a server function switching message (Yes in step S808), the server
サーバ機能探索要求もサーバ機能切り替えメッセージも受信しなかった場合は(ステップS800でNo、かつステップS803でNo)、その他のメッセージ受信処理を行い(ステップS805)、処理を終了する。 If neither a server function search request nor a server function switching message is received (No in step S800 and No in step S803), other message reception processing is performed (step S805), and the processing is terminated.
[メッセージ受信によるサーバ機能切り替え処理]
図9は、図8のステップS804におけるメッセージ受信によるサーバ機能切り替え処理を示す図である。
[Server function switching processing by message reception]
FIG. 9 is a diagram showing server function switching processing by message reception in step S804 of FIG.
サーバ機能切り替え処理のトリガとして、他のサーバ機能付き通信機器からサーバ機能の有効化を指示するサーバ機能切り替えメッセージを受信した場合(ステップS900でYes)、自身のサーバ機能が有効化されているかどうかを判断する(ステップS902)。有効化されていれば(ステップS902でYes)特に何もせず処理を終了し、自身のサーバ機能が有効化されていなければ(ステップS902でNo)サーバ機能部/クライアント機能部406のクライアント機能部を無効化・サーバ機能部を有効化して(ステップS903)処理を終了する。一方、他のサーバ機能付き通信機器からサーバ機能の無効化を指示するサーバ機能切り替えメッセージを受信した場合は(ステップS900でNo、かつステップS901でYes)、自身のサーバ機能が有効化されているかどうかを判断する(ステップS904)。有効化されていなければ(ステップS904でNo)特に何もせず処理を終了し、自身のサーバ機能が有効化されていれば(ステップS904でYes)自身がサービスを提供している通信機器にサーバ機能を交代する他の通信機器の情報を送信し(ステップS905)、サーバ機能部/クライアント機能部406のサーバ機能部を無効化・クライアント機能部を有効化して(ステップS906)処理を終了する。
If a server function switching message for instructing activation of the server function is received from another communication device with a server function as a trigger for the server function switching process (Yes in step S900), whether or not the server function is enabled Is determined (step S902). If enabled (Yes in step S902), the process is terminated without doing anything, and if the server function is not enabled (No in step S902), the client function unit of the server function unit /
[適性判断によるサーバ機能切り替え処理]
図10は、図7のステップS705における適性判断によるサーバ機能切り替え処理を示す図である。
[Server function switching processing based on suitability judgment]
FIG. 10 is a diagram showing server function switching processing based on suitability determination in step S705 of FIG.
サーバ機能切り替え処理のトリガとして、サーバ適正判断部404から自身はサーバ機能を有効にするべき通信機器である判断通知を受信すると(ステップS1000でYes)、探索により発見したサーバ機能付き通信機器にサーバ機能の無効化を指示するサーバ機能切り替えメッセージを送信し(ステップS1005)、サーバ機能部/クライアント機能部406のクライアント機能部を無効化・サーバ機能部を有効化して(ステップS1006)処理を終了する。サーバ適正判断部404から自身はサーバ機能を無効にするべき通信機器である判断通知を受信すると(ステップS1000でNo、ステップS1001でYes)、探索により発見したサーバ機能付き通信機器にサーバ機能の有効化を指示するサーバ機能切り替えメッセージを送信し(ステップS1002)、自身がサービスを提供している通信機器にサーバ機能を交代する他のサーバ機能付き通信機器の情報を送信し(ステップS1003)、サーバ機能部/クライアント機能部406のサーバ機能部を無効化・クライアント機能部を有効化して(ステップS1004)処理を終了する。
As a trigger for the server function switching process, when receiving a determination notification indicating that the server function is to be enabled by the server suitability determination unit 404 (Yes in step S1000), the server function communication device with the server function discovered by the search is sent to the server. A server function switching message for instructing the function invalidation is transmitted (step S1005), the client function unit of the server function unit /
[上位サブネットワーク解析処理]
次に、通信機器が実行する上位サブネットワーク解析処理について説明する。
[Upper subnetwork analysis processing]
Next, upper subnetwork analysis processing executed by the communication device will be described.
上位サブネットワーク解析処理は、“サーバ機能が有効である通信機器”を含めた各通信機器で実行される処理であり、自身が接続しているルータ配下のネットワークと、その上位側(すなわち、インターネット側)のルータ配下のネットワークのネットワークアドレスを取得する処理である。まず、自身が接続しているルータ配下のネットワークのネットワークアドレス情報は、通信I/F部400から取得する。
The upper sub-network analysis process is a process executed by each communication device including “communication device in which the server function is valid”. The network under the router to which it is connected and its upper side (that is, the Internet) This is a process of acquiring the network address of the network under the router on the side). First, network address information of a network under a router to which it is connected is acquired from the communication I /
そして、上位側のルータのネットワークアドレスを取得する処理の一例としては、特願2005−103059と同様の方法を用いることができる。ここでは、その概要を説明する。 As an example of processing for acquiring the network address of the upper router, the same method as in Japanese Patent Application No. 2005-103059 can be used. Here, the outline will be described.
上位サブネットワーク解析処理は、2つのステップからなる。最初のステップは、上位側ルータのネットワークアドレス情報を取得するために、宅内ネットワーク内の上位側ルータのアドレスを取得するステップである。そして、次のステップは、取得したルータのアドレスを用いて、そのルータのネットワークアドレス(又は、そのネットワークで有効なアドレスの範囲)を取得するステップである。 The upper subnetwork analysis process consists of two steps. The first step is a step of acquiring the address of the upper router in the home network in order to acquire the network address information of the upper router. The next step is a step of acquiring the network address of the router (or a range of addresses effective in the network) using the acquired address of the router.
ここでルータのネットワークアドレス(又は、そのネットワークで有効なアドレスの範囲)をそのネットワークのアドレス空間と呼ぶことにする。また、ルータのアドレス情報を用いて、このネットワークのアドレス空間を推定する処理をアドレス空間推定処理と呼ぶことにする。 Here, a network address of a router (or a range of addresses effective in the network) is referred to as an address space of the network. In addition, a process for estimating the address space of the network using the address information of the router is referred to as an address space estimation process.
この宅内ネットワーク内の上位側ルータのアドレスを取得する方法として、TTL(Time To Live)を変化させたパケットを用いてアドレスを取得する方法(trace routeと同様な方法)と、UPnP(Universal Plug and Play) IGD(Internet Gateway Device)仕様を用いてアドレスを取得する方法を利用することができる。 As a method of acquiring the address of the upper router in the home network, a method of acquiring an address using a packet in which TTL (Time To Live) is changed (a method similar to trace route), UPnP (Universal Plug and Play) A method of acquiring an address using an IGD (Internet Gateway Device) specification can be used.
(TTLを変化させたパケットを利用する方法)
まず、TTLを変化させたパケットを利用してルータのアドレスを取得する方法を説明する。図27は、宅内ネットワークの構成例である。図27において、宅内ネットワーク2及びインターネット1の異なる2つのネットワークが接続している。なお、宅内ネットワーク2は、ローカルネットワークであれば、家庭内のネットワークでなくても良い。図27に示すように、宅内ネットワーク2は、通信機器10と、ルータA20と、ルータB30と、ルータC40とを備える。ルータA20は、WAN側通信I/F2721と、LAN側通信I/F2722とを含む。ルータB30は、WAN側通信I/F2731と、LAN側通信I/F2732とを含む。ルータC40は、WAN側通信I/F2741と、LAN側通信I/F2742とを含む。なお、ルータA20、ルータB30、及びルータC40において、WAN側通信I/F及びLAN側通信I/F以外の構成の記載を省略している。
(Method of using packet with changed TTL)
First, a method of acquiring a router address using a packet whose TTL has been changed will be described. FIG. 27 is a configuration example of a home network. In FIG. 27, two different networks, the
ルータC40は、インターネット1のルータD50と接続することによって、宅内ネットワーク2とインターネット1とを接続するゲートウェイである。ルータC40において、WAN側通信I/F2741には、グローバルアドレスが割り当てられ、LAN側I/F2742には、プライベートアドレスが割り当てられる。ルータA20のWAN側通信I/F2721及びLAN側通信I/F2722と、ルータB30のWAN側通信I/F2731及びLAN側通信I/F2732とには、それぞれプライベートアドレスが割り当てられる。
The router C40 is a gateway that connects the
図28は、通信機器10が行う、TTLを変化させたパケットを利用してルータのネットワークアドレス(又は、ルータ配下の端末が取ることが可能な有効なアドレスの範囲)を取得する処理を示すフローチャートである。通信機器10は、上位サブネットワーク解析処理を開始すると、TTLパケット送信処理を起動する(ステップS101)。ここで、起動したTTLパケット送信処理は、TTL応答パケット受信処理(ステップS102)などと並行して実行される。通信機器10は、TTLパケット送信処理の起動後、TTL応答パケットを受信したか否かを判断する(ステップS102)。TTL応答パケットを受信すると(ステップS102でYes)、通信機器10は、ルータを検出したと判断して、TTL応答パケットの受信処理を実行する(ステップS103)。TTL応答パケットは、具体的には、ICMP(Internet Control Message Protocol) TIME EXCEEDED MESSAGEである。ICMP TIME EXCEEDED MESSAGEとは、中継するパケットの生存時間(TTL:Time To Live)の超過によるパケットの破棄を、送信元に報告するメッセージである。
FIG. 28 is a flowchart showing a process performed by the
通信機器10は、TTL応答パケットの送信元アドレスが、グローバルアドレスであるか否か判断する(ステップS104)。TTL応答パケットの送信元アドレスがグローバルアドレスでない場合(ステップS104でNo)、第1の通信機器10は、アドレス空間推定処理を実行する(ステップS105)。TTL応答パケットの送信元アドレスがグローバルアドレスであった場合(ステップS104でYes)、第1の通信機器10は、TTLパケット送信処理を中止する(ステップS107)。
The
通信機器10は、送信したTTLパケットに対するTTL応答パケットを全て受信したか否かを判断する(ステップS108)。全て受信した場合(ステップS108でYes)、第1の通信機器10は、図28に示すアドレス空間の推定処理を終了する。全て受信していない場合(ステップS108でNo)、第1の通信機器10は、ステップS102に戻り、TTL応答パケットの受信待機状態となる。送信したTTLパケットに対するTTL応答パケットを全て受信するまで、受信処理を継続する理由は、TTLパケットを送信した順にTTL応答パケットを受信するとは限らないためである。なお、送信元アドレスがグローバルアドレスであったTTL応答パケットに対応するTTLパケットにおいて、設定したTTL値をTTLgとすると、TTLg以下のTTL値のTTLパケットに対するTTL応答パケットを全て受信した場合、TTL応答パケットを全て受信したと判断してもよい。
The
図29〜図31を用いて、TTLパケット送信処理の詳細を説明する。図29は、TTLパケット送信処理のフローチャートである。図30は、TTLパケットの送信にUDP(User Datagram Protocol)を用いる場合の、TTLパケットの構成を示す図である。図31は、TTLパケットにおける、TTLと宛先ポート番号との対応関係の一例を示す図である。 Details of the TTL packet transmission processing will be described with reference to FIGS. FIG. 29 is a flowchart of TTL packet transmission processing. FIG. 30 is a diagram illustrating a configuration of a TTL packet when UDP (User Datagram Protocol) is used for transmission of the TTL packet. FIG. 31 is a diagram illustrating an example of a correspondence relationship between a TTL and a destination port number in a TTL packet.
図29を用いて、TTLパケット送信処理を説明する。通信機器10は、TTLパケットの作成の続行をするか否かを確認する(ステップS111)。このTTLパケット作成続行かの判断は、後で記述するTTLパケット応答受信で、送信元がグローバルアドレスの応答パケットを受信したかで判断する。グローバルアドレスの応答を受信している場合、パケット続行を中止と判断し(ステップS111でNo)、グローバルアドレスの応答を受信していない場合、続行と判断する(ステップS111でYes)。
The TTL packet transmission process will be described with reference to FIG. The
TTLパケット作成の中止と判断する場合、TTLパケット送信処理を終了する。TTLパケット作成の続行と判断した場合、TTLと宛先ポート番号とを、1つずつインクリメントしたTTLパケットを作成する(ステップS112)。上位サブネットワーク判断部401は、通信I/F部400を介して、作成したTTLパケットを送信する(ステップS113)。なお、上位サブネットワーク判断部401は、送信したTTLパケットに対応するTTL応答パケットの受信を待つことなく、TTLをインクリメントした次のTTLパケットを送信してもよい。この場合、通信機器10は、複数のTTLパケットを同時に送信できるため、高速にルータを検出することが可能となる。また、TTLパケットは、インターネット上の特定のグローバルアドレス宛(例えば、ルータD50のLAN側I/F501、あるいはインターネット上の特定サーバのアドレス(例えば、panasonic.comなど)に向けて送信してもよい。
When it is determined that the TTL packet creation is to be stopped, the TTL packet transmission process is terminated. If it is determined that the TTL packet creation is to be continued, a TTL packet is created by incrementing the TTL and the destination port number by one (step S112). The upper
上位サブネットワーク判断部401は、図31に示すように、IPヘッダのTTLフィールドの値を1からインクリメントするとともに、UDPヘッダの宛先ポート番号フィールドを10001からインクリメントしながら、TTLパケットを作成する。宛先ポート番号は、図31に示す例に限られず、他のポート番号でもよい。宛先ポート番号は、宛先ポート番号からTTLが一意に判別できればよい。
As shown in FIG. 31, the upper
また、TTLパケットは図30のようなUDPを用いた例に限られず、例えば、図32に示すICMPを用いてもよい。この場合、図33に示すようにIPヘッダのTTLとシーケンス番号を対応付ける方法が利用できる。 Further, the TTL packet is not limited to the example using UDP as shown in FIG. 30, and for example, ICMP shown in FIG. 32 may be used. In this case, as shown in FIG. 33, a method of associating the TTL of the IP header with the sequence number can be used.
図27、図34を用いて、TTL応答パケットの受信処理を説明する。図27は、TTLパケットと、TTL応答パケットとの対応を示している。図34は、TTL応答パケットの一例を示す図である。 TTL response packet reception processing will be described with reference to FIGS. FIG. 27 shows the correspondence between TTL packets and TTL response packets. FIG. 34 is a diagram illustrating an example of a TTL response packet.
図27において、ルータA20、ルータB30、ルータC40、及びルータD50は、それぞれのLAN側通信I/Fで受信したTTLパケットを、TTL値を1だけ引いてWAN側のルータに送信する。それぞれのルータは、TTL値を1引いて、TTL=0となった場合、TTLパケットをWAN側のルータに送信せずに廃棄する。そして、それぞれのルータは、TTL値が原因であるパケットの廃棄が発生したことを示すために、TTL応答パケットをTTLパケットの送信元へ送信する。図34に示すTTL応答パケットのデータ部には、廃棄したルータディスカバリ用パケットのIPヘッダと、それに続くUDPヘッダを含む64ビットのデータが付加される。 In FIG. 27, a router A20, a router B30, a router C40, and a router D50 transmit the TTL packet received by each LAN side communication I / F to the WAN side router by subtracting the TTL value by one. Each router decrements the TTL value by 1 and discards the TTL packet without transmitting it to the router on the WAN side when TTL = 0. Then, each router transmits a TTL response packet to the transmission source of the TTL packet to indicate that the packet discard due to the TTL value has occurred. In the data portion of the TTL response packet shown in FIG. 34, 64-bit data including the discarded router discovery packet IP header and the subsequent UDP header is added.
通信機器10が、TTL=1に設定したTTLパケットを、インターネット1上の特定のIPアドレスに向けて送信した場合を考える。TTL=1のTTLパケットは、ルータA20のLAN側I/F2722で受信される。TTL=1に設定したTTLパケットは、WAN側I/F2721から送信される前に、TTL=0となる。このため、ルータA20は、TTL=1のTTLパケットは廃棄する。ルータA20は、TTL=1のTTLパケットを廃棄したことを通知するために、TTL応答パケットを第1の通信機器10に送信する。このとき、TTL応答パケットの送信元IPアドレス(以下、送信元アドレスという)は、ルータA20のLAN側通信I/F2722のIPアドレスとなる(以下、各ルータのLAN側通信I/FのIPアドレスを、各ルータのLAN側アドレスという)。第1の通信機器10は、TTL応答パケットの送信元アドレスを確認することによって、ルータA20のLAN側アドレスを知ることが可能となる。
Consider a case in which the
同様に、第1の通信機器10が、TTL=2に設定したTTLパケットを、インターネット上の特定のIPアドレスに向けて送信すると、ルータB30は、ルータB30自身のLAN側アドレスを送信元アドレスとしたTTL応答パケットを、通信機器10に送信する。また、通信機器10が、TTL=3に設定したTTLパケットを、インターネット上の特定のIPアドレスに向けて送信すると、ルータC40は、ルータC40自身のLAN側アドレスを送信元アドレスとしたTTL応答パケットを、通信機器10に送信する。このように、通信機器10は、TTLパケットに対応するTTL応答パケットを受信することで、それぞれのルータを検出するとともに、それぞれのルータのLAN側アドレスを取得することができる。第1の通信機器10は、自身とインターネット1との間に接続されているルータの接続順序に関する接続順序情報を取得することができる。
Similarly, when the
次に、通信機器10が行うアドレス空間の推定処理を説明する。ここで述べるアドレス空間推定処理とは、ルータ配下のネットワークに接続される端末に設定できるアドレスの範囲を推定する処理である。端末に設定できるアドレスの範囲は、すなわち、ホストアドレスの範囲に対応するため、これからネットワークアドレスを求めることが可能である。
Next, address space estimation processing performed by the
通信機器10は、TTL応答パケットの送信元アドレスがローカルアドレスであった場合に、TTL応答パケットの送信元ルータを対象として、TTL応答パケットに対応するTTLパケットで指定したTTL値を用いて、送信先アドレスを変化させたアドレス範囲推定パケットを送信する。例えば、ルータA20であればTTL値は1、ルータB30であれば、TTL値は2を用いることになる。
When the transmission source address of the TTL response packet is a local address, the
また、通信機器10は、TTL応答パケットから得られたルータのLAN側アドレスを基に、そのルータのアドレス空間を一次推測し記憶する。アドレス空間の一次推測の具体的な方法は、アドレス空間をクラスCのアドレスとして推測する方法が考えられる。例えば、ルータA20のLAN側アドレスが、192.168.0.1であれば、ルータA20のアドレス空間は、192.168.0.1〜192.168.0.254と推測できる。なお、得られたルータのLAN側アドレスが、クラスAまたはクラスBのプライベートアドレスである場合、得られたルータのアドレス空間が、それぞれのクラスに応じたアドレス空間であると一次推測してもよい。例えば、ルータA20のプライベートアドレスが10.1.0.130であった場合、そのルータのアドレス空間を10.0.0.1〜10.255.255.254であると一次推測する。また、10.1.0.1〜10.1.0.254(最下位8ビットだけを変化)又は10.1.0.129〜10.1.0.254(最下位7ビットだけを変化)などのように一次推測してもよい。
Also, the
通信機器10は、アドレス空間を一次推測する際に、少なくとも得られたルータのLAN側アドレスが含まれるように得られたルータのアドレス空間を一次推測して記憶する。そして、上位サブネットワーク判断部401は、記憶したアドレス空間のアドレスを順に送信先として指定し、アドレス範囲推定パケットを送信する。このとき、得られたルータのLAN側アドレスは必ず一次推測したアドレス空間に含まれていると考えることができるので、通信機器10は、得られたルータのLAN側アドレスにアドレス範囲推定パケットを送信しなくてもよい。
When the
アドレス範囲推定パケットとは、通信機器10が、対象となるルータのアドレス空間として推定したアドレス空間が、対象ルータのアドレス空間であるか否かを確認するためのパケットである。アドレス範囲推定パケットは、図30に示すUDPパケットまたは、図32に示すICMPパケットを用いる。TTLパケットとアドレス範囲推定パケットとの相違点は、TTLパケットの送信先アドレスが、インターネット上の特定のアドレスであるのに対し、アドレス範囲推定パケットの送信先アドレスが、対象ルータのアドレス空間内と思われるローカルアドレスである点である。
The address range estimation packet is a packet for confirming whether or not the address space estimated by the
また、通信I/F部400において、TTL応答パケットと、アドレス範囲推定パケットの応答であるICMP TIME EXCEEDED MESSAGEとを識別可能とするために、通信機器10は、図30に示すUDPパケットを用いる場合、TTLパケットで使用しないポート番号を指定したUDPパケットを、アドレス範囲推定パケットとして送信する。この結果、アドレス範囲推定パケットの応答であるICMP TIME EXCEEDED MESSAGEのデータ部には、アドレス範囲推定パケットで指定したポート番号が含まれることになる。このように、通信機器10は、ポート番号を参照することによって、TTL応答パケットと、アドレス範囲推定パケットの応答であるICMP TIME EXCEEDED MESSAGEとを識別することができる。同様に、アドレス範囲推定パケットとしてICMPを使用する場合、シーケンス番号等にTTLパケットでは使用しない値を設定する。なお、アドレス範囲推定パケットの応答を用いたルータのアドレス空間の推定方法は後述する。
Further, in the communication I /
アドレス範囲推定パケットに対する応答があった場合、通信機器10は、応答がICMP TIME EXCEEDED MESSAGEであるか否かを判定する。応答がICMP TIME EXCEEDED MESSAGEでない場合、アドレス範囲推定パケットの送信先アドレスが、ルータのアドレス空間内であると判定する。そして、通信機器10は、判定結果に基づきルータのアドレス空間の推定情報を更新して記憶する。
When there is a response to the address range estimation packet, the
アドレス範囲推定パケットの応答としてICMP TIME EXCEEDED MESSAGEを受信することによって、アドレス範囲推定パケットの送信先が、ルータのアドレス空間の範囲外のアドレスと判断できる理由について説明する。アドレス範囲推定パケットは、ルータのLAN側アドレスを取得するために送信したTTLパケットと同一のTTL値を指定して送信される(例えば、ルータA20のアドレス空間を推測する場合、TTL値は1が指定される)。ルータのアドレス空間の範囲外のアドレスを指定してパケットを送信すると、ルータは、上位のルータにパケットを送信しようとする。このとき、TTL値の減算が実行され、TTL=0となるため、ルータはアドレス範囲推定パケットを廃棄し、ICMP TIME EXCEEDED MESSAGEを送信する。ゆえに、アドレス範囲推定パケットの応答としてICMP TIME EXCEEDED MESSAGEを受信すると、アドレス範囲推定パケットの送信先アドレスは、ルータのアドレス空間の範囲外であることがわかる。 The reason why the destination of the address range estimation packet can be determined as an address outside the range of the router address space by receiving ICMP TIME EXCEEDED MESSAGE as a response to the address range estimation packet will be described. The address range estimation packet is transmitted by designating the same TTL value as the TTL packet transmitted to acquire the router's LAN address (for example, when estimating the address space of the router A20, the TTL value is 1). It is specified). When a packet is transmitted by specifying an address outside the range of the router address space, the router attempts to transmit the packet to the upper router. At this time, since the TTL value is subtracted and TTL = 0, the router discards the address range estimation packet and transmits ICMP TIME EXCEEDED MESSAGE. Therefore, when ICMP TIME EXCEEDED MESSAGE is received as a response to the address range estimation packet, it is understood that the transmission destination address of the address range estimation packet is outside the range of the router address space.
なお、アドレス範囲推定パケットに対する応答がない場合も、通信機器10は、アドレス範囲推定パケットの送信先アドレスが対象ルータのアドレス空間内であると判定してよい。応答がICMP TIME EXCEEDED MESSAGEである場合、通信機器10は、アドレス範囲推定パケットの送信先アドレスが、ルータのアドレス空間外であると判定する。そして、通信機器10は、判定結果に基づきルータのLAN側アドレス空間の推定情報を更新して記憶する。その後、通信機器10は、アドレス空間の推定が終了したか否かを判定する。具体的には、アドレス空間は、アドレス範囲推定パケットの送信及びアドレス範囲推定パケットに対する応答を全て受信したか否かを確認する。終了していない場合、上位サブネットワーク判断部は、処理を続行する。終了と判断した場合、通信機器は、アドレス空間の推定処理を終了、すなわち、上位サブネットワーク解析を終了する。
Even if there is no response to the address range estimation packet, the
なお、通信機器10は、アドレス空間内と判定されるアドレスと、アドレス空間外と判定されるアドレスとの境界のアドレスを検出した時に、アドレス空間の推定処理を終了してよい。これは、一般にルータのアドレス空間が、連続するアドレスで構成されるためである。例えば、192.268.2.2から順に(192.168.2.3、192.168.2.4、・・・)、通信機器10が送信先としてアドレス範囲推定パケットを送信した場合(192.168.2.1はルータのアドレスであり、必ずアドレス空間内であると分かっているため送信しない)、192.168.2.128で初めてアドレス空間の範囲外と判断された場合を説明する。この場合、アドレス空間が連続なら、192.168.2.128以降のアドレスは、全てアドレス空間の範囲外と判断されると予測することができる。このため、通信機器10は、192.168.2.128をアドレス空間の範囲外と判断した時点で、実際に一次推測したアドレス空間全体のアドレスにアドレス範囲推定パケットを送信せず、アドレス空間の判定処理を終了してよい。このとき、通信機器10が記憶するルータのアドレス空間情報は、判定結果に基づき更新される。
Note that the
(UPnP IGD仕様を利用する方法)
次に、UPnP IGD仕様を利用して、ルータのアドレスを取得する方法を説明する。
(Method using UPnP IGD specification)
Next, a method for acquiring a router address using the UPnP IGD specification will be described.
なお、ルータアドレスを取得した後に、アドレス空間の範囲を推定する処理については、TTLを変化させたパケットを利用する方法と同様である。 Note that, after obtaining the router address, the process of estimating the range of the address space is the same as the method of using the packet with the TTL changed.
TTLを変化させたパケットを利用する方法では、TTLを変化させたTTLパケットと、ICMP TIME EXCEEDED MESSAGEとを利用したTTL応答パケットとを用いて、宅内ネットワーク2に存在するルータの検出を行った。しかし、TTL処理を行わないルータや、ICMPパケットをフィルタリングするルータ等が市販されている。このため、TTLを変化させたパケットを利用する方法で説明した上位サブネットワーク解析処理が適用できないルータが存在する。UPnP IGD仕様を利用する方法では、この問題を解決するための上位サブネットワーク解析処理を説明する。
In the method of using the packet with the TTL changed, the router existing in the
図35は、UPnP IGD仕様を利用する上位サブネットワーク解析処理が用いられるネットワークの一例を示す図である。図35において、宅内ネットワーク2は、通信機器10に代えて、第2の通信機器11を備える点が異なる。第2の通信機器11は、IGD仕様を利用する上位サブネットワーク解析処理を実行する通信端末である。第2の通信機器11(以下、単に通信機器11と記す)は、ルータA20、ルータB30、及びルータC40のLAN側アドレスの他に、それぞれのWAN側アドレスを取得する点が、通信機器10と異なる。
FIG. 35 is a diagram illustrating an example of a network in which the upper subnetwork analysis process using the UPnP IGD specification is used. In FIG. 35, the
通信機器11の上位サブネットワーク解析処理の動作を説明する。通信機器11は、UPnP IGD(Internet Gateway Device)仕様などを用いて、自身が接続されているルータのLAN側アドレスを取得後、さらにWAN側アドレスを取得する。そして、通信機器11は、上位のルータのLAN側アドレスを取得しながら、上位のルータのアドレス空間の範囲の推定を行う。図35に示す例の場合、通信機器11が取得するアドレスの順序は、A→B→C→D→E→Fのようになる。
The operation of the upper subnetwork analysis process of the
図36を用いて、通信機器11が行うアドレス空間の推定処理を説明する。図36は、通信機器11が行う上位サブネットワーク解析処理を示すフローチャートである。図36に示す処理は、通信機器11は、自身が接続されたルータ(図35の場合、ルータA20)に対してUPnPのディスカバリメッセージである“M−SEARCH”を用いたルータディスカバリ用パケット(以下、推定ルータパケットという)をマルチキャスト送信する(ステップS201)。通信機器11は、送信した推定ルータパケットに対する応答パケット(以下、推定ルータ応答パケットという)を受信したか否かを判断する(ステップS202)。図37に、推定ルータパケットのデータ部の一例を示す。また、図38に推定ルータ応答パケットのデータ部の一例を示す。
The address space estimation process performed by the
通信機器11は、推定ルータ応答パケットを受信した場合(ステップS202でYes)、推定ルータ応答パケットを解析して、送信元ルータのLAN側アドレスを取得する(ステップS203)。なお、通信機器11は、UPnPを使用しているため、推定ルータ応答パケットに含まれる情報から、デバイスディスクリプション及びサービスディスクリプションを取得する。これらの情報は、アクション送信のための情報として用いられる。そして、通信機器11は、推定ルータパケットの送信処理中止する(ステップS204)。通信機器11は、推定ルータ応答パケットの送信元のルータのWAN側アドレスを取得する(ステップS205)。
When the
ルータのWAN側アドレスを、UPnP IGD仕様を用いて取得する手順を説明する。推定ルータ応答パケットの送信元ルータのLAN側アドレスに対して、通信機器11は、GetExternalIPAddressアクションを送信する。図39は、GetExternalIPAddressアクションの一例を示す図である。GetExternalIPAddressアクションを受信したルータは、応答を第2の通信機器11に返信することよって、第2の通信機器11は、ルータのWAN側アドレスを取得する。図40は、GetExternalIPAddressアクションに対する応答の一例を示す図である。本応答において、ルータのLAN側アドレスは、<NewExternalIPAddress>タグで囲まれた部分にセットされる。そのため、通信機器11は、<NewExternalIPAddress>タグの値を取り出すことで、ルータのWAN側アドレスを取得することができる。なお、ルータは、通常、Webベースでのユーザインターフェースが実装されている。このため、通信機器11は、Webベースのユーザインターフェースを用いて、推定ルータ応答パケットの送信元ルータのWAN側アドレスを取得してもよい。具体的には、httpメッセージを推定ルータ応答パケットの送信元ルータに送信して、その応答を受信することによって、推定ルータ応答パケットの送信元ルータのWAN側アドレスを取得できる。
A procedure for acquiring the WAN address of the router using the UPnP IGD specification will be described. The
通信機器11は、推定ルータ応答パケットの送信元ルータのWAN側アドレスが、ローカルアドレスであるか否かを確認する(ステップS206)。通信機器11は、取得したWAN側アドレスがグローバルアドレスである場合(ステップS206でNo)、推定ルータ応答パケットの送信元ルータの上位ルータがインターネット1上のルータであると特定する。すなわち、通信機器11は、宅内ネットワーク2の全てのルータの検出が完了したと推測して、処理を終了する。一方、通信機器11は、取得したWAN側アドレスがローカルアドレスである場合(ステップS206でYes)、推定ルータ応答パケットの送信元ルータの上位に、宅内ネットワーク2に属するルータが存在すると判断する。そして、再び、ルータのWAN側アドレス情報を用いて、推定ルータパケットの送信処理を行う(ステップS207)。この推定ルータパケットの送信処理については、後述する。
The
そして、推定ルータ応答パケットの送信元ルータの情報(LAN側アドレスやWAN側アドレスなど)を用いて、アドレス空間推定処理を実行する(ステップS208)。 Then, address space estimation processing is executed using information on the source router of the estimated router response packet (LAN side address, WAN side address, etc.) (step S208).
ここでのアドレス空間推定処理は、TTLを変化させたパケットを利用する場合とは若干異なり、通知されたWAN側アドレスを基に、上位ルータのアドレス空間を推測する。例えば、図35において、第2の通信機器11は、ルータB30のWAN側アドレスを取得すると、アドレス空間推定処理(ステップS208)が起動される。具体的には、上位サブネットワーク判断部は、ルータB30のWAN側アドレスを用いて、ルータC40のアドレス空間を一次推測し、推定したアドレス空間情報を記憶する。そして、上位サブネットワーク判断部は、実施の形態1と同様のアドレス範囲推定パケットを用いたアドレス空間推定を実行し、アドレス空間情報を更新する。TTLを変化させたパケットを利用する方法との違いは、アドレス空間に必ず含まれるアドレスが、推定対象のルータのLAN側アドレス(ルータC40のLAN側アドレス)ではなく、下位ルータのWAN側アドレス(ルータB30のWAN側アドレス)である点のみである。
The address space estimation process here is slightly different from the case of using a packet whose TTL is changed, and the address space of the upper router is estimated based on the notified WAN address. For example, in FIG. 35, when the
通信機器11が直接接続されたルータ(ルータA20)のWAN側アドレスを取得した場合、ルータA20のWAN側アドレスを用いて、上述のようにルータB30のアドレス空間を推定し、記憶する。それに加えて、通信機器11自身のIPアドレスとネットマスク情報とを用いて、ルータA20のLAN側アドレス情報を推測し、記憶する。
When the WAN address of the router (router A20) to which the
そして、再度推定ルータパケット送信処理を起動し、推定ルータ応答パケットを受信するため、ステップS202に戻る。 Then, the estimated router packet transmission process is started again, and the process returns to step S202 to receive the estimated router response packet.
図36に示すフローチャートを用いることによって、通信機器11は、自身に接続されているルータから上位のルータの存在を確認することができるため、宅内ネットワーク2のルータの接続順序情報を記憶することができる。
By using the flowchart shown in FIG. 36, the
なお、上記では、アドレス空間推定処理において、アドレス範囲推定パケットを用いたアドレス空間推定処理を実行するとして説明した。TTLを変化させたパケットを利用する方法と同様に、アドレス範囲推定パケットを用いたアドレス空間推定処理を実行せず、一次推測したアドレス空間情報を用いて、上位サブネットワーク解析処理を完了してもよい。 In the above description, the address space estimation process using the address range estimation packet is executed in the address space estimation process. Similar to the method of using a packet whose TTL is changed, the address space estimation process using the address range estimation packet is not executed, and the upper subnetwork analysis process is completed using the address space information estimated first. Good.
(推定ルータパケット送信処理)
なお、UPnPを用いて推定ルータパケットを送信処理おいて、推測した上位ルータのLAN側アドレスに対して、ユニキャストでM−SEARCHを送信するようにすることができる(UPnP Forumの規格上では、M−SEARCHはマルチキャストのみであるが、ほとんどのルータは、ユニキャストのM−SEARCHも受信可能としている)。
(Estimated router packet transmission processing)
In addition, it is possible to transmit the estimated router packet using UPnP and transmit M-SEARCH by unicast to the estimated LAN address of the upper router (in the UPnP Forum standard, M-SEARCH is only multicast, but most routers can also receive unicast M-SEARCH).
図41に、通信機器11が、推定ルータパケットの送信先として推測する上位ルータのLAN側アドレスの一例を示す。通常、ルータのLAN側アドレスは、工場出荷時の状態で使用すると、クラスCのローカルアドレスが使用されている。この場合、ローカルアドレスの下位8ビットの値は、1または254である。このため、上位サブネットワーク判断部401は、上位ルータのLAN側アドレスを推測する場合、制御部101が検出したルータのWAN側アドレスの下位8ビットを1または254に置き換えたアドレスを、上位ルータのLAN側アドレスとして優先的に推測する。このように推測することで、上位サブネットワーク判断部401は、高速に上位ルータを検出することが可能となる。また、ユーザは、ルータのLAN側アドレスを変更する場合、LAN側アドレスの下位8ビットの値を64または128などの特定の値に設定することが多い。このため、上位サブネットワーク判断部401は、LAN側アドレスの下位8ビットの値を、ユーザが設定する頻度が高い特定の値に設定したアドレスを、上位ルータのアドレスとして、優先的に推測する。
FIG. 41 shows an example of the LAN address of the upper router that the
原理的には、通信機器11は、図41のように推測可能な全てのアドレスを宛先とした多量の推定ルータパケットを作成し、一度に送信することが可能である。しかし、多量の推定ルータパケットを一度に送信すると、ネットワークが輻輳状態になり、他の通信に悪影響が出る場合がある。また、送信した推定ルータパケットが廃棄され、ルータのLAN側アドレス獲得に悪影響が出ることも考えられる。このような影響を避けるため、上位サブネットワーク判断部401は、一定期間に規定の数以下の推定ルータパケットを送信するように制御する。また、推定ルータパケットは、図37に示すように、ルータだけが応答を返すように指定して送信される。
In principle, the
図37の例では、ST(SearchTarget)として、“urn:schemas−upnp−org:device:InternetGatewayDevice:1”を設定することにより、ルータだけが応答を返すようになる。このため、第2の通信機器11は、複数のアドレスに対して推定ルータパケットを送信しても、ルータ以外のアドレスから応答を受信しない。一方、ルータのアドレスを指定した推定ルータパケットに対して、第2の通信機器11は、図37の例のような推定ルータ応答パケットを受信する。第2の通信機器11は、推定ルータ応答パケットのIPヘッダの送信元アドレスを参照することで、ルータのLAN側アドレスを入手することができる。
In the example of FIG. 37, by setting “urn: schemas-upnp-org: device: InternetGatewayDevice: 1” as ST (SearchTarget), only the router returns a response. For this reason, even if the
このように、第2の通信機器11は、自身が接続するルータのLAN側アドレスを取得した後に、WAN側アドレスを取得する。そして、得られたWAN側アドレスを基に、上位ルータのアドレス空間の推定処理を行う。さらに、自身が接続するルータのWAN側アドレスから、上位のルータのLAN側アドレスを取得する。この動作を繰り返すことによって、第2の通信機器11は、宅内ネットワーク2内の全てのルータのアドレスとルータの接続情報とを取得して、宅内ネットワーク2内の各ルータのLAN側アドレス空間の推定処理を行う。これにより、第2の通信機器11は、TTLパケットに含まれるTTLの操作や、ICMP TIME EXCEEDED MESSAGEの受信処理を行う必要がない。また、TTL処理を行わない市販のルータや、ICMPパケットをフィルタリングする市販のルータに対しても適用することが可能となる。
In this way, the
[サーバ機能をもたない通信機器の機能構成]
図5は、本発明の実施の形態1におけるサーバ機能をもたない通信機器5aの構成を示す機能ブロック図である。サーバ機能を持たない通信機器の機能構成は、サーバ機能を持つ通信機器からサーバ機能の処理に関する機能部を取り除いた構成となる。なお、本実施の形態におけるサーバ機能をもたない他の通信機器も同じ構成をとるものとする。以下、その機能構成について説明する。
[Functional configuration of communication equipment without server function]
FIG. 5 is a functional block diagram showing a configuration of the
図5において、サーバ機能をもたない通信機器5aは、通信I/F部500と、上位サブネットワーク判断部501と、記憶部502と、サーバ機能探索部503と、クライアント機能部506とを備えている。
In FIG. 5, the
[通信I/F部]
通信I/F部500は、ネットワークI/Fを制御し、ネットワークからの情報の受信とネットワークへの情報の送信を実行する。
[Communication I / F part]
The communication I /
[上位サブネットワーク判断部]
上位サブネットワーク判断部501は、前述の上位サブネットワーク判断部401と同様の上位サブネットワーク解析を実施し、自身が接続されているルータのより上位(インターネット側)に接続されたルータ配下のネットワーク情報を取得し、記憶部502に記憶する。
[High-level subnetwork judgment unit]
The upper
[サーバ機能探索部]
サーバ機能探索部503は、前述のサーバ機能探索・応答部403により”サーバ機能が有効である通信機器”の探索処理のみを行う。
[Server Function Search Unit]
The server
[クライアント機能部]
クライアント機能部506は、前述のサーバ機能部/クライアント機能部406のサーバ機能が有効になっている通信機器と通信する(サービスを受ける)処理のみを行う。
[Client Function]
The
[サーバ機能をもたない通信機器の動作の概要]
以上のように構成されたサーバ機能をもたない通信機器5a〜5cの動作概要について、図11を用いて説明する。
[Overview of operation of communication equipment without server function]
An outline of operations of the
図11は本発明の実施の形態1におけるサーバ機能をもたない通信機器の処理フローである。
FIG. 11 is a processing flow of a communication device having no server function in
サーバ機能をもたない通信機器は、サーバ機能付き通信機器と同様に一定時間ごとに上位サブネットワーク判断部501により上位サブネットワーク解析(ステップS1105)を実施し、上位サブネットワーク解析の結果を基に”サーバ機能が有効である通信機器”を探すためにサーバ機能探索要求を送信する(ステップS1106)。なお、本動作は前述のサーバ機能付き通信機器の動作と同様であるため詳細な説明は省略する。
A communication device having no server function performs upper subnetwork analysis (step S1105) by the upper
サーバ機能探索要求送信後、サーバ機能探索部503はサーバ機能探索応答受信を待ち(ステップS1100)、サーバ機能探索応答を受信すると(ステップS1100でYes)、サーバ機能探索応答の送信元であるサーバ機能付き通信機器に対し通信路を接続して(ステップS1101)サービスを受ける。
After transmitting the server function search request, the server
一方、サーバ機能探索応答以外のメッセージを受信した場合は(ステップS1100でNo,かつ、ステップS1102でYes)、その他のメッセージ受信処理を行う(ステップS1103)。 On the other hand, when a message other than the server function search response is received (No in step S1100 and Yes in step S1102), other message reception processing is performed (step S1103).
なお、上位サブネットワーク解析およびサーバ機能探索要求の送信は定期的に行うとして説明したが、サーバ機能付き通信機器との通信路が切断された場合にのみ実施してもよいし、ユーザが通信機器に信号を入力する入力手段を備え、前記入力手段の信号に応じて行ってもよい。 Although it has been described that the upper subnetwork analysis and the transmission of the server function search request are periodically performed, the upper subnetwork analysis and the server function search request may be performed only when the communication path with the communication device with the server function is disconnected. An input means for inputting a signal may be provided, and the input may be performed in accordance with a signal from the input means.
以下、このような環境において、サーバ機能切り替え処理が行われる例を説明する。 Hereinafter, an example in which server function switching processing is performed in such an environment will be described.
[サーバ機能付き通信機器が上位サブネットワークに新規に接続された場合]
図1において、サーバ機能付き通信機器4bがサーバ機能を有効にしている状態でサーバ機能付き通信機器4aがネットワークに新規に接続された例を用いて、上位サブネットワークにサーバ機能付き通信機器が新規に接続された場合の処理について説明する。
[When a communication device with a server function is newly connected to the upper subnetwork]
In FIG. 1, using the example in which the server-equipped
サーバ機能付き通信機器4aはネットワークに新規に接続されると、初回のみ一定時間を待たずにすぐにサーバ機能付き通信機器探索処理(ステップS603)を行う。サーバ機能付き通信機器探索処理(ステップS603)において上位サブネットワーク解析を実施する(ステップS700)。その結果、本実施の形態1においてはサーバ機能付き通信機器4aが接続されているルータ3aが最上位ルータであり自身より上位にネットワークが存在しないと判断されるため、同位ネットワークにのみサーバ機能探索要求をマルチキャストで送信する(ステップS701)。同位ネットワークに”サーバ機能が有効である通信機器”が存在しないため探索要求の応答はなく(ステップS702でNo)、自身はサーバ機能を有効にするべき通信機器であると判断する(ステップS703)。またサーバ機能付き通信機器4aはネットワークに新規に接続され、サーバ機能部/クライアント機能部406のサーバ機能が有効化されていない状態であるため(ステップS704でNo)適正判断によるサーバ機能切り替え処理を行う(ステップS705)。適正判断によるサーバ機能切り替え処理においては、自身はサーバ機能を有効にするべき通信機器であると判断しているため(ステップS1000でYes)、自身のサーバ機能を有効化する(ステップS1006)。
When the server-equipped
ここで、自身のサーバ機能を有効化した後にサーバ機能を有効にしている他のサーバ機能付き通信機器から発見された場合の処理について説明する。 Here, a description will be given of processing in a case where the server function is discovered from another communication device with a server function that has been validated after the server function is validated.
サーバ機能付き通信機器4bは定期的に上位サブネットワークに対してサーバ機能探索要求を送信している。サーバ機能付き通信機器4aはサーバ機能付き通信機器4bよりサーバ機能探索要求を受信すると(ステップS800でYes)、自身のサーバ機能が有効化されているため(ステップS801でYes)サーバ機能付き通信機器4bに対しサーバ機能探索応答を送信する(ステップS802)。このとき、サーバ機能付き通信機器4aがサーバ機能を有効化する前にサーバ機能付き通信機器4bよりサーバ機能探索要求を受信した場合は(ステップS801でNo)、特に何もしない。
The server-equipped
サーバ機能付き通信機器4bは、サーバ機能付き通信機器4aからサーバ機能探索応答を受信すると、自身の属するネットワークより上位のサブネットワークに存在するサーバ機能付き通信機器を発見しているため、自身はサーバ機能を無効にするべき通信機器であると判断しサーバ機能付き通信機器4aに対しサーバ機能の有効化を指示するサーバ機能切り替えメッセージを送信する。サーバ機能付き通信機器は4aは、サーバ機能付き通信機器4bからサーバ機能切り替えメッセージを受信すると(ステップS803でYes)、メッセージ受信によるサーバ機能切り替え処理を行う(ステップS804)。メッセージ受信によるサーバ機能切り替え処理においては、サーバ機能の有効化を指示するサーバ機能切り替えメッセージを受信し(ステップS900でYes)かつ、サーバ機能自体はすでに有効化されているため(ステップS902でYes)切り替えずそのまま処理を終了する。
When the server-equipped
[サーバ機能付き通信機器が下位サブネットワークに新規に接続された場合]
図1において、サーバ機能付き通信機器4bがサーバ機能を有効にしている状態でサーバ機能付き通信機器4cがネットワークに新規に接続された例を用いて、下位サブネットワークにサーバ機能付き通信機器が新規に接続された場合の処理について説明する。なお、図1においては、サーバ機能付き通信機器4aが図示されているが本実施の形態ではサーバ機能付き通信機器4aは存在しないものとして説明する。
[When a communication device with server function is newly connected to a lower subnetwork]
In FIG. 1, a communication device with a server function is newly added to a lower subnetwork by using an example in which the
サーバ機能付き通信機器4cはネットワークに新規に接続されると、初回のみ一定時間を待たずにすぐにサーバ機能付き通信機器探索処理(ステップS603)を行う。サーバ機能付き通信機器探索処理(ステップS603)において上位サブネットワーク解析を実施する(ステップS700)。その結果得られたルータ3a及びルータ3bのネットワークアドレス情報を元にして、ルータ3a及びルータ3bに接続された”サーバ機能が有効である通信機器”のアドレスを推定し、サーバ機能探索要求を送信する(ステップS701)。また、自身が接続されているルータ3cのネットワークに対しサーバ機能探索要求をマルチキャストで送信する(ステップS701)。ここで、上位サブネットワークのルータ3bに接続されるサーバ機能付き通信機器4bはサーバ機能を有効にしており、サーバ機能付通信機器4cからサーバ機能探索要求を受信すると(ステップS800でYes)、自身のサーバ機能が有効化されているので(ステップS801でYes)サーバ機能付き通信機器4cに対しサーバ機能探索応答を送信する(ステップS802)。サーバ機能付き通信機器4cはサーバ機能付通信機器4bからサーバ機能探索応答を受信し(ステップS702でYes)、上位サブネットワークにサーバ機能を有効にしたサーバ機能付き通信機器が存在するため自身はサーバ機能を無効にするべき通信機器であると判断し(ステップS706)、かつ、ネットワークに新規に接続されており自身のサーバ機能が有効化されていない状態であるため(ステップS707でNo)、サーバ機能を切り替えず処理を終了する。
When the server-equipped
[サーバ機能を有効にしたサーバ機能付き通信機器を含む上位サブネットワークが接続された場合]
図1において、サーバ機能付き通信機器4bがサーバ機能を有効にしている状態でサーバ機能を有効にしたサーバ機能付き通信機器4aを含むネットワーク(ルータ3aとルータ3aに接続する通信機器)が新規に接続された例を用いて、上位サブネットワークが新規に接続された場合の処理について説明する。
[When a higher-level subnetwork that includes a server-equipped communication device with the server function enabled is connected]
In FIG. 1, a network (
サーバ機能付き通信機器4bは定期的に上位サブネットワーク解析を実施している(ステップS700)。上位サブネットワーク(ルータ3aに接続されたネットワーク)が接続されたことを上位サブネットワーク解析により発見した場合、サーバ機能付き通信機器4bは上位サブネットワークに対してサーバ機能探索要求を送信する(ステップS701)。ここで、上位サブネットワークのルータ3aに接続されるサーバ機能付き通信機器4aがサーバ機能を有効にしているためサーバ機能探索応答を受信する(ステップS702でYes)。上位サブネットワークにサーバ機能を有効にしたサーバ機能付き通信機器が存在するため、自身はサーバ機能を無効にするべき通信機器であると判断し(ステップS706)、サーバ機能が有効であるため(ステップS707でYes)、適正判断によるサーバ機能切り替え処理を行う(ステップS705)。適正判断によるサーバ機能切り替え処理において、自身はサーバ機能を無効にするべき通信機器であると判断しているため(ステップS1001でYes)、発見したサーバ機能付き通信機器4aに対しサーバ機能の有効化を指示するサーバ機能切り替えメッセージを送信する(ステップS1002)。同時に現在サービスを提供している他の通信機器に対し、交代するサーバ機能付き通信機器であるサーバ機能付き通信機器4aの情報、例えばIPアドレスなどを通知する(ステップS1003)。そして、自身のサーバ機能を無効化(サーバ機能部・クライアント機能部406のサーバ機能部を無効化、かつクライアント機能部を有効化)し(ステップS1004)、切り替え処理を終了する。
The server-equipped
一方、サーバ機能付き通信機器4aは前述の[サーバ機能付き通信機器が上位サブネットワークに新規に接続された場合]のサーバ機能付き通信機器4aと同様の動作を行い、自身のサーバ機能を有効化のまま切り替えない。
On the other hand, the
[サーバ機能を有効にしたサーバ機能付き通信機器を含む下位サブネットワークが接続された場合]
図1において、サーバ機能付き通信機器4bがサーバ機能を有効にしている状態でサーバ機能を有効にしたサーバ機能付き通信機器4cを含むネットワーク(ルータ3cとルータ3cに接続する通信機器)が新規に接続された例を用いて、下位サブネットワークが新規に接続された場合の処理について説明する。
[When a sub-network including a server-equipped communication device with the server function enabled is connected]
In FIG. 1, a network (
サーバ機能付き通信機器4cは定期的に上位サブネットワーク解析(ステップS700)を実施している。ネットワーク接続後、上位サブネットワーク解析により上位サブネットワーク(ルータ3bに接続されたネットワーク)が接続されていることを発見した場合、前述の[サーバ機能を有効にしたサーバ機能付き通信機器を含む上位サブネットワークが接続された場合]のサーバ機能付き通信機器4bと同様の動作を行い、自身のサーバ機能を無効化する。
The server-equipped
一方、サーバ機能付き通信機器4bは前述の[サーバ機能付き通信機器が上位サブネットワークに新規に接続された場合]のサーバ機能付き通信機器4aと同様の動作を行い、自身のサーバ機能を有効化のまま切り替えない。
On the other hand, the
なお、本実施の形態では、定期的に上位サブネットワーク解析を行うとして説明したが、ユーザが通信機器に信号を入力する入力手段を備え、前記入力手段の信号に応じて上位サブネットワーク解析を行ってもよい。 In the present embodiment, the upper subnetwork analysis is periodically performed. However, the user has input means for inputting a signal to the communication device, and the upper subnetwork analysis is performed according to the signal of the input means. May be.
(実施の形態2)
[サーバ交代方法の適用環境]
図26は、本発明の実施の形態2における宅内ネットワークの一構成例である。
(Embodiment 2)
[Applicable environment for server replacement method]
FIG. 26 is a configuration example of a home network according to
宅内ネットワーク2は、4台のルータ3a〜3dが接続され構成されており、ルータ3aがインターネット1に接続している最上位ルータであり、ルータ3cとルータ3dはルータ3bの下位に並列に接続されている。各ルータには、サーバ機能を有したサーバ機能付き通信機器4a〜4dとサーバ機能を持たない通信機器5a〜5dが接続されている。この宅内ネットワーク2の構成は有線でも無線でもよい。なお、各通信機器4a〜4d、5a〜5dが提供する機能は下位サブネットワーク判断機能を除いて本発明の実施の形態1における通信機器と同様である。また、ハードウエア構成も実施の形態1における通信機器と同様である。また、4台のルータで構成された宅内ネットワークの構成は一例であり、4台より少ないルータで構成されたネットワーク又は4台以上のルータで構成されたネットワークでも同様に適用可能である。
The
[サーバ機能付き通信機器の機能構成]
図13は、本発明の実施の形態2におけるサーバ機能付き通信機器4aの構成を示す機能ブロック図である。図13に示す機能ブロック図は、図4に示す機能ブロック図と比較し、下位サブネットワーク判断部1307を備えている点で相違する。その他の構成要素は、図4と同様であるため、図4と同様の構成要素には同一の符号を付し、詳細な説明は省略する。なお、本実施の形態における他のサーバ機能付き通信機器も同じ構成をとるものとする。以下、その機能構成について説明する。
[Functional configuration of communication equipment with server function]
FIG. 13 is a functional block diagram showing a configuration of the
図4において、サーバ機能付き通信機器4aは、通信I/F部400と、上位サブネットワーク判断部401と、記憶部402と、サーバ機能探索・応答部403とサーバ適正判断部404と、サーバ機能切り替え部405と、サーバ機能部/クライアント機能部406と、下位サブネットワーク判断部1307とを備えている。
4, the communication device with
通信I/F部400、上位サブネットワーク判断部401、記憶部402、サーバ機能探索・応答部403およびサーバ機能部/クライアント機能部406は実施の形態1に示す同機能部と処理機能が同様であるため説明を省略する。
The communication I /
[下位サブネットワーク判断部]
下位サブネットワーク判断部1307は、自身が属するルータの下位に複数の異なるルータが並列に接続されていることを判断する機能部である。下位サブネットワーク判断部1307は、自身以外の通信機器から通信を開始して受信したパケットのボディに含まれるルータの識別情報、およびIPヘッダに含まれる送信元のIPアドレスを比較して複数の異なるルータの存在を検知した場合に、自身が属するルータの下位に複数の異なるルータが並列に接続されている旨をサーバ適正判断部404に通知する。これは、家庭用ルータのNAPT機能やファイアウォール機能が妨げとなり、WAN側に位置する通信機器からLAN側に位置する通信機器に対して通信を開始することができないことから、受信したパケットは下位サブネットワークに属する通信機器からのものであると判断でき、また自身の属するルータの識別情報と異なるルータの識別情報を含み、かつIPヘッダに含まれる送信元のIPアドレス(ルータのWAN側アドレス)が異なるパケットを2つ以上受信することで、自身が属するルータの下位に複数の異なるルータが並列に接続されていると判断できるからである。
[Low-level subnetwork judgment unit]
The lower
[サーバ適正判断部]
サーバ適正判断部404は、サーバ機能を有効にするべき通信機器を判断する機能部である。サーバ機能が無効化されている状態で、一定時間内に他のサーバ機能付き通信機器からのサーバ機能探索要求を受信するか、もしくは、サーバ機能探索・応答部403における探索処理によりサーバ機能が有効になっている他のサーバ機能付き通信機器を発見した通知を受けると、すでにネットワーク内に他のサーバ機能付き通信機器が存在するため、自身はサーバ機能を無効にするべき通信機器であると判断する。このとき、サーバ機能を切り替える必要はないので判断結果をサーバ機能切り替え部405に通知しない。また、サーバ機能が無効化されている状態で、一定時間内に他のサーバ機能付き通信機器からのサーバ機能探索要求を受信せず、かつ、サーバ機能探索・応答部403における探索処理によりサーバ機能が有効になっている他のサーバ機能付き通信機器を発見できなかった旨の通知を受けると、ネットワーク内に他にサーバ機能付き通信機器が存在しないため、自身はサーバ機能を有効にするべき通信機器であると判断し、判断結果をサーバ機能切り替え部405に通知する。
[Server suitability determination section]
The server
一方、サーバ機能が有効化されている状態で、サーバ機能探索・応答部403における探索処理によりサーバ機能が有効になっている他のサーバ機能付き通信機器を発見した通知を受けると、サーバ機能調停処理(後述)によりサーバ機能を有効にするべき通信機器を判断する。
On the other hand, when the server function is activated and the server function search /
また、下位サブネットワーク判断部1307から自身が属するルータの下位に複数の異なるルータが並列に接続されていると通知されると、サーバ機能を有効化する通信機器を変更する必要があるかどうかを判断する。自身のサーバ機能が有効化されているか、もしくは上位または同位ネットワークにサーバ機能を有効にしているサーバ機能付き通信機器が存在する場合は、サーバ機能を有効化する通信機器を変更する必要がないと判断する。このとき、サーバ機能を切り替える必要はないので判断結果をサーバ機能切り替え部405に通知しない。一方、自身のサーバ機能が有効化されておらず、かつ、上位または同位ネットワークにサーバ機能を有効にしているサーバ機能付き通信機器が存在しない場合は、サーバ機能を有効化する通信機器を変更すべきと判断し、判断結果をサーバ機能切り替え部405に通知する。
Also, if the lower
これは、実施の形態1で述べたようにネットワーク構成が変化するたびにサーバ機能を有効にした通信機器を最上位に設置して接続性を向上させるのではなく、通信不可能な状態が発生した場合にのみサーバ機能を有効にした通信機器を交代させて、通信不可な状態を回避させることにより、サーバ機能を有効にした通信機器をできるだけ変更させたくない場合などに対応可能である。一般に家庭用ルータでは、NAPT機能やファイアウォール機能の影響により、WAN側に位置する通信機器から通信を開始してLAN側に位置する通信機器と通信することができないが、LAN側に位置する通信機器からWAN側に位置する通信機器に通信を開始することは可能である。よって、直列にルータが接続されている場合は、LAN側に位置する通信機器からWAN側に位置する通信機器に通信を開始しさえすれば通信が可能であり、下位にサーバ機能を有効にした通信機器を配置して通信を行うことも不可能ではない。しかし、ルータが並列に接続された場合は、並列に接続されたルータ配下の通信機器同士は、どちらから通信を開始しても必ず通信相手に対してWAN側から開始することになり通信を行うことができない。そのため、並列にルータが接続され、それぞれのルータ配下の通信機器同士が必ず通信ができない状況を検知した場合のみ、上位サブネットワークにサーバ機能を有効にした通信機器を切り替えることにより、必要最低限の切り替え回数で通信機器同士が通信可能となる。
This is because, as described in
[サーバ機能切り替え部]
サーバ機能切り替え部405は、サーバ機能切り替えの指示を受けてサーバ機能部/クライアント機能部406の機能を切り替える機能部である。サーバ機能切り替えの指示としては、他のサーバ機能付き通信機器からのサーバ機能切り替えメッセージ、サーバ適正判断部404からの判断結果がある。サーバ機能切り替えの指示としては、他のサーバ機能付き通信機器からのサーバ機能切り替えメッセージ、サーバ適正判断部404からの判断結果がある。サーバ機能切り替え部405は、サーバ機能を有効化する場合は、サーバ機能部/クライアント機能部406のサーバ機能部を有効化し、クライアント機能部を無効化する。一方、サーバ機能を無効化する場合は、サーバ機能部/クライアント機能部406のサーバ機能部を無効化し、クライアント機能部を有効化する。
[Server function switching section]
The server
また、サーバ機能を有効化する通信機器の変更を示す指示を受けた場合は、現在のサーバ機能を有効化している通信機器にサーバ機能の無効化を指示するサーバ機能切り替えメッセージを送信し、自身のサーバ機能を有効化するか、または、上位および同位ネットワークにサーバ機能の有効化を指示するサーバ機能切り替えメッセージを送信し、サーバ機能を有効化する通信機器を交代させる。 In addition, when receiving an instruction to change the communication device that activates the server function, it sends a server function switching message to instruct the server device to disable the server function to the communication device that is currently enabling the server function. The server function is activated or a server function switching message for instructing the activation of the server function is transmitted to the upper and peer networks, and the communication device for activating the server function is replaced.
また、サーバ機能を有効な状態から無効な状態へ切り替える場合は、切り替える前にサービスを提供している通信機器に対し交代するサーバ機能付き通信機器の情報を通知し、該情報をサーバ機能が有効になっている通信機器の情報として記憶部402に記憶する。サーバ機能を無効な状態から有効な状態へ切り替える場合は、有効化後、自身の情報をサーバ機能が有効になっている通信機器の情報として記憶部402に記憶する。なお、交代するサーバ機能付き通信機器の情報は、サーバ機能探索・応答部403から通知されるか、あるいは他のサーバ機能付き通信機器からのサーバ機能切り替えメッセージから取得する。
In addition, when switching the server function from the valid state to the invalid state, before switching, the communication device with the server function is notified to the communication device providing the service, and the server function is valid. Is stored in the
また、サーバ適正判断部404からの判断結果によりサーバ機能を切り替える場合は、サーバ機能を切り替える前に発見したサーバ機能付き通信機器に対し、サーバ適正判断部404からの判断結果の指示をサーバ機能切り替えメッセージとして通知する。
In addition, when switching the server function according to the determination result from the server
[サーバ機能付き通信機器の動作の概要]
以上のように構成されたサーバ機能付き通信機器4a〜4dの動作概要について、図15〜図21、図25を用いて説明する。
[Overview of operation of communication equipment with server function]
An outline of operations of the
図25は本発明の実施の形態におけるサーバ機能付き通信機器の全体的な処理フローである。 FIG. 25 is an overall processing flow of the communication device with a server function in the embodiment of the present invention.
サーバ機能付き通信機器はメッセージを受信すると(ステップS2500でYes)メッセージ受信処理(ステップS2501)を実行し、また、一定時間ごとにサーバ機能付き通信機器探索処理(ステップS2503)を実行している。また、サーバ機能付き通信機器探索処理(ステップS2503)において上位または同位ネットワークにサーバ機能付き通信機器を発見できなかった場合は、サーバ機能付き通信機器探索処理(ステップS2508)では探索不能な下位サブネットワークにサーバ機能付き通信機器が存在するかどうかを検出するために、一定時間サーバ機能付き通信機器からのサーバ機能探索要求を受信したかどうかを判断する。 When the communication device with the server function receives the message (Yes in step S2500), the communication device with the server function is executed (step S2501), and the communication device search process with the server function (step S2503) is executed at regular intervals. In addition, if a communication device with a server function cannot be found in the host or peer network in the communication device search process with a server function (step S2503), the lower subnetwork that cannot be searched with the communication device search process with a server function (step S2508) In order to detect whether or not a communication device with a server function exists, it is determined whether a server function search request has been received from the communication device with a server function for a certain period of time.
サーバ機能付き通信機器は、メッセージを受信すると(ステップS2500でYes)メッセージ受信処理(ステップS2501)を実行する。メッセージを受信しなかった場合(ステップS2500でNo)、および、メッセージ受信処理(ステップS2501)後、一定時間経過していれば(ステップS2502でYes)、サーバ機能付き通信機器探索処理を行う(ステップS2503)。サーバ機能付き通信機器探索処理(ステップS2503)において、サーバ機能探索要求の応答を受信した場合(ステップS2504でYes)は、再びメッセージ受信待ちの状態に戻る。一方、サーバ機能付き通信機器探索処理(ステップS2503)において、サーバ機能探索要求の応答を受信しなかった場合(ステップS2504でNo)、または、一定時間経過しておらず(ステップS2502でNo)、サーバ機能付き通信機器探索処理を実行していない場合は、自身のサーバ機能がすでに有効であるかどうかを判断する(ステップS2505)。自身のサーバ機能がすでに有効である場合は(ステップS2505でYes)、再びメッセージ受信待ちの状態に戻る。一方、自身のサーバ機能が有効化されていない場合(ステップS2505でNo)は、一定時間内にサーバ機能付き通信機器からサーバ機能探索要求を受信したかどうかを判断する。これにより、下位サブネットワークにサーバ機能付き通信機器が存在しているかどうか検知することができる。一定時間内にサーバ機能付き通信機器からサーバ機能探索要求を受信していない場合(ステップS2506でNo、かつ、ステップS2507でYes)は、ネットワーク内に他にサーバ機能付き通信機器が存在しないため、自身はサーバ機能を有効にするべき通信機器であると判断し(ステップS2508)、サーバ機能切り替え部405において適正判断によるサーバ機能切り替え処理を行い(ステップS2509)、再びメッセージ受信待ちの状態に戻る。一方、サーバ機能付き通信機器からサーバ機能探索要求を受信したことがある場合(ステップS2506でYes)は、下位サブネットワークにすでにサーバ機能付き通信機器が存在するため、再びメッセージ受信待ちの状態に戻る。
When the server-equipped communication device receives the message (Yes in step S2500), the communication device with the server function executes a message reception process (step S2501). If a message has not been received (No in step S2500), and if a certain time has elapsed after the message reception process (step S2501) (Yes in step S2502), a communication device search process with a server function is performed (step S2502). S2503). In the server device-equipped communication device search process (step S2503), when a response to the server function search request is received (Yes in step S2504), the process again returns to a message reception wait state. On the other hand, in the server device-equipped communication device search process (step S2503), when a response to the server function search request is not received (No in step S2504), or a certain time has not elapsed (No in step S2502), If the server-equipped communication device search process has not been executed, it is determined whether or not its own server function is already valid (step S2505). If its own server function is already valid (Yes in step S2505), it returns to the message reception waiting state again. On the other hand, if the server function is not enabled (No in step S2505), it is determined whether a server function search request is received from the communication device with the server function within a certain time. Thereby, it is possible to detect whether or not a communication device with a server function exists in the lower subnetwork. If no server function search request is received from the communication device with server function within a certain time (No in step S2506 and Yes in step S2507), there is no other communication device with server function in the network. The server itself determines that it is a communication device whose server function should be validated (step S2508), the server
[サーバ機能付き通信機器探索処理]
図15は本発明の実施の形態2におけるサーバ機能付き通信機器のサーバ機能付き通信機器探索処理(ステップS2503)の処理フローである。
[Communication device search processing with server function]
FIG. 15 is a processing flow of the communication device search processing with server function (step S2503) of the communication device with server function according to the second embodiment of the present invention.
探索によりサーバ機能付き通信機器を発見した場合の処理(ステップS1500〜ステップS1501)については前述の実施の形態1と処理が同様であるので説明を省略する。 Since processing (step S1500 to step S1501) when a communication device with a server function is found by searching is the same as that in the first embodiment, description thereof is omitted.
図24にサーバ機能探索要求の一例を示す。サーバ機能探索要求では、ボディ内のメッセージIDフィールドに本メッセージがサーバ機能探索要求であることを示すIDをセットする。また、送信元IDとして、送信元通信機器固有のIDを設定する。また、どのルータに属する通信機器か判別できるようにルータの識別情報として、例えばルータのMACアドレスや製品番号などを設定する。なお、サーバ機能探索要求送信元の通信機器がサーバ機能を有するか有さないかの情報は送信元通信機器固有のIDに含めてもよいし、他のフィールドを用意してもよい。 FIG. 24 shows an example of a server function search request. In the server function search request, an ID indicating that this message is a server function search request is set in the message ID field in the body. Also, an ID unique to the transmission source communication device is set as the transmission source ID. In addition, for example, a router MAC address or a product number is set as router identification information so that it can be determined which router a communication device belongs to. Information on whether or not the communication device of the server function search request transmission source has the server function may be included in the ID unique to the transmission source communication device, or other fields may be prepared.
上位ルータに接続されたサーバ機能付き通信機器は、サーバ機能探索要求を受信すると、自身のサーバ機能が有効である場合にのみ、サーバ機能探索・応答部403がサーバ機能探索応答をサーバ機能探索要求の送信元アドレス(IPアドレス、ポート番号)宛てに送信する。サーバ機能探索応答のフォーマットの一例は、サーバ機能探索要求と同一である。但し、メッセージIDとしてはサーバ機能探索応答であることを示すID値がセットされる。
When the server function communication device connected to the upper router receives the server function search request, the server function search /
サーバ機能付き通信機器は、サーバ機能探索要求送信後サーバ機能探索応答を受信できたかを判断する(ステップS1502)。 The server-equipped communication device determines whether a server function search response has been received after transmitting the server function search request (step S1502).
サーバ機能探索応答を受信できなかった場合は(ステップS1502でNo)、何もせず処理を終了する。 If the server function search response cannot be received (No in step S1502), the process ends without doing anything.
サーバ機能探索応答を受信した場合は(ステップS1502でYes)、自身のサーバ機能がすでに有効であるかどうかを判断する(ステップS1503)。サーバ機能が有効でなければ(ステップS1503でNo)、サーバ機能が有効である通信機器がすでにネットワーク内に存在するため自身はサーバ機能を無効にするべき通信機器であると判断し(ステップS1505)、サーバ機能を切り替える必要はないので処理を終了する。サーバ機能が有効である場合は(ステップS1503でYes)、発見したサーバ機能が有効である通信機器との間でどちらがサーバ機能を有効にするべきかサーバ機能調停処理を行う(ステップS1504・後述)。 If a server function search response has been received (Yes in step S1502), it is determined whether or not its own server function is already valid (step S1503). If the server function is not valid (No in step S1503), it is determined that the server device is a communication device whose server function should be invalidated because a communication device in which the server function is valid already exists in the network (step S1505). Since it is not necessary to switch the server function, the process is terminated. When the server function is valid (Yes in step S1503), server function arbitration processing is performed to determine which server function should be validated with the communication device for which the discovered server function is valid (step S1504, which will be described later). .
[メッセージ受信処理]
図16は、本発明の実施の形態2におけるサーバ機能付き通信機器のメッセージ受信処理(ステップS2501)の処理フローである。
[Message reception processing]
FIG. 16 is a process flow of the message reception process (step S2501) of the communication device with a server function according to the second embodiment of the present invention.
サーバ機能付き通信機器4aのサーバ機能探索・応答部403は、常に、下位のルータに接続された通信機器からのサーバ機能探索要求の受信(ステップS1600)、他のサーバ機能付き通信機器からサーバ機能切り替えメッセージの受信(ステップS1602)、およびサーバ機能を持たない通信機器からの自身が属するルータの下位に複数の異なるルータが並列に接続されている旨のネットワーク構成変更通知メッセージの受信(ステップS1604)を待っている。下位のルータに接続された通信機器からのサーバ機能探索要求を受信すると(ステップS1600でYes)、後述のサーバ機能探索要求受信処理(ステップS1601)を行う。
The server function search /
一方、他のサーバ機能付き通信機器からサーバ機能切り替えメッセージを受信すると(ステップS1600でNo、かつ、ステップS1602でYes)、サーバ機能切り替え部405においてメッセージ受信によるサーバの切り替え処理を行う(ステップS1603)。
On the other hand, when a server function switching message is received from another communication device with a server function (No in step S1600 and Yes in step S1602), the server
また、サーバ機能を持たない通信機器からのネットワーク構成変更通知メッセージを受信すると(ステップS1600でNo、かつ、ステップS1602でNo、かつ、ステップS1604でYes)、下位サブネットワーク判断部1307において、自身が属するルータの下位に複数の異なるルータが並列に接続されていると判断し、判断結果をサーバ適正判断部404に通知する。サーバ適正判断部404は、下位サブネットワーク判断部1307の通知を受けて、自身のサーバ機能が有効であるかどうかを判断する(ステップS1605)。自身のサーバ機能が有効であれば(ステップS1605でYes)、自身が属するルータの下位に複数の異なるルータが並列に接続されていてもそれぞれのルータ配下の通信機器同士は自身を介して通信が可能なため、サーバ機能を有効化する通信機器を変更する必要がないと判断し処理を終了する。自身のサーバ機能が有効でなければ(ステップS1605でNo)、上位または同位ネットワークにサーバ機能を有効にしているサーバ機能付き通信機器が存在するかどうかを判断する(ステップS1606)。
When a network configuration change notification message is received from a communication device that does not have a server function (No in step S1600, No in step S1602, and Yes in step S1604), the lower
上位または同位ネットワークにサーバ機能を有効にしているサーバ機能付き通信機器が存在する場合は(ステップS1606でYes)、自身が属するルータの下位に複数の異なるルータが並列に接続されていてもそれぞれのルータ配下の通信機器同士は現在サーバ機能を有効にしているサーバ機能付き通信機器を介して通信が可能なため、サーバ機能を有効化する通信機器を変更する必要がないと判断し処理を終了する。上位または同位ネットワークにサーバ機能を有効にしているサーバ機能付き通信機器が存在しない場合は(ステップS1606でNo)、自身が属するルータの下位に並列に接続されたルータ配下の通信機器同士は通信ができないため、サーバ機能を有効化する通信機器を変更すべきと判断し(ステップS1607)、判断結果をサーバ機能切り替え部405に通知し、サーバ機能切り替え部405において適正判断によるサーバ機能切り替え処理を行う(ステップS1608)。
If there is a communication device with a server function that enables the server function in the higher level or peer network (Yes in step S1606), even if a plurality of different routers are connected in parallel below the router to which it belongs, Since communication devices under the router can communicate with each other via a communication device with a server function that currently enables the server function, it is determined that there is no need to change the communication device that enables the server function, and the processing is terminated. . When there is no communication device with a server function that enables the server function in the higher level or peer network (No in step S1606), communication between the communication devices under the router connected in parallel to the lower level of the router to which the device belongs is communicating. Therefore, it is determined that the communication device that activates the server function should be changed (step S1607), the determination result is notified to the server
サーバ機能探索要求もサーバ機能切り替えメッセージもネットワーク構成変更メッセージも受信しなかった場合は(ステップS1600でNo、かつステップS1602でNo、かつS1604でNo)、その他のメッセージ受信処理を行う(ステップS1609)。 If no server function search request, server function switching message, or network configuration change message has been received (No in step S1600, No in step S1602, and No in S1604), other message reception processing is performed (step S1609). .
[サーバ機能探索要求受信処理]
図17を参照しながら、サーバ機能付き通信機器のサーバ機能探索要求受信処理(ステップS1601)について説明する。
[Server function search request reception processing]
The server function search request reception process (step S1601) of the communication device with a server function will be described with reference to FIG.
サーバ機能探索要求受信処理においては、まず自身のサーバ機能が有効であるかどうかを判断する(ステップS1700)。自身のサーバ機能が有効であれば(ステップS1700でYes)サーバ機能探索要求の応答を送信し(ステップS1701)、後述の下位サブネットワーク存在判定処理(ステップS1702)を行う。自身のサーバ機能が有効でない場合は(ステップS1700でNo)、受信したサーバ機能探索要求の送信元の機器がサーバ機能付き通信機器かどうかを判断する(ステップS1704)。受信したサーバ機能探索要求の送信元の機器がサーバ機能付き通信機器であった場合は(ステップS1704でYes)、すでに他のサーバ機能が有効になった通信機器とコネクションを接続しているかどうかを判断する(ステップS1710)。すでに、サーバ機能が有効になった通信機器とコネクションを接続している場合は(ステップS1710でYes)、下位サブネットワーク存在判定処理(ステップS1702)を行う。まだ、サーバ機能が有効になった通信機器とコネクションを接続していない場合は、サーバ機能探索要求の送信元のサーバ機能付き通信機器がすでにサーバ機能を有効にしている可能性があるため、自身はサーバ機能を無効にするべき通信機器であると判断し(ステップS1707)、下位サブネットワーク存在判定処理(ステップS1702)を行う。受信したサーバ機能探索要求の送信元の機器がサーバ機能付き通信機器でなかった場合は(ステップS1704でNo)、下位サブネットワーク存在判定処理(ステップS1702)を行う。 In the server function search request reception process, first, it is determined whether or not its own server function is valid (step S1700). If the server function is valid (Yes in step S1700), a response to the server function search request is transmitted (step S1701), and a lower subnetwork existence determination process (step S1702) described later is performed. If the server function of the server is not valid (No in step S1700), it is determined whether the device that has transmitted the received server function search request is a communication device with a server function (step S1704). If the transmission source device of the received server function search request is a communication device with a server function (Yes in step S1704), it is determined whether a connection is already established with a communication device in which another server function is enabled. Judgment is made (step S1710). If the connection is already established with the communication device in which the server function is enabled (Yes in step S1710), the lower subnetwork existence determination process (step S1702) is performed. If the connection is not yet connected to a communication device with the server function enabled, the server function communication device that sent the server function search request may have already enabled the server function. Is determined to be a communication device whose server function should be invalidated (step S1707), and lower subnetwork existence determination processing (step S1702) is performed. If the transmission source device of the received server function search request is not a communication device with a server function (No in step S1704), lower subnetwork existence determination processing (step S1702) is performed.
下位サブネットワーク存在判定処理(ステップS1702)の結果、下位サブネットワーク判断部1307が自身が属するルータの下位には複数の異なるルータは並列に接続されていないと判断した場合は(ステップS1703でNo)、処理を終了する。自身が属するルータの下位に複数の異なるルータが並列に接続されていると判断した場合は(ステップS1703でYes)、自身のサーバ機能が有効であるかどうかを判断する(ステップS1705)。自身のサーバ機能が有効であれば(ステップS1705でYes)、自身が属するルータの下位に複数の異なるルータが並列に接続されていてもそれぞれのルータ配下の通信機器同士は自身を介して通信が可能なため、サーバ機能を有効化する通信機器を変更する必要がないと判断し処理を終了する。自身のサーバ機能が有効でなければ(ステップS1705でNo)、上位または同位ネットワークにサーバ機能を有効にしているサーバ機能付き通信機器が存在するかどうかを判断する(ステップS1706)。
As a result of the lower subnetwork existence determination process (step S1702), when the lower
上位または同位ネットワークにサーバ機能を有効にしているサーバ機能付き通信機器が存在する場合は(ステップS1706でYes)、自身が属するルータの下位に複数の異なるルータが並列に接続されていてもそれぞれのルータ配下の通信機器同士は現在サーバ機能を有効にしているサーバ機能付き通信機器を介して通信が可能なため、サーバ機能を有効化する通信機器を変更する必要がないと判断し処理を終了する。上位または同位ネットワークにサーバ機能を有効にしているサーバ機能付き通信機器が存在しない場合は(ステップS1706でNo)、自身が属するルータの下位に並列に接続されたルータ配下の通信機器同士は通信ができないため、サーバ機能を有効化する通信機器を変更すべきと判断し(ステップS1708)、判断結果をサーバ機能切り替え部405に通知し、サーバ機能切り替え部405において適正判断によるサーバ機能切り替え処理を行う(ステップS1709)。
If there is a communication device with a server function that enables the server function in the higher level or peer network (Yes in step S1706), even if a plurality of different routers are connected in parallel below the router to which the server belongs, Since communication devices under the router can communicate with each other via a communication device with a server function that currently enables the server function, it is determined that there is no need to change the communication device that enables the server function, and the processing is terminated. . If there is no server-equipped communication device that enables the server function in the upper level or peer network (No in step S1706), the communication devices under the router connected in parallel below the router to which the device belongs belong to each other. Therefore, it is determined that the communication device that activates the server function should be changed (step S1708), the determination result is notified to the server
[下位サブネットワーク存在判定処理]
図18を参照しながら、サーバ機能付き通信機器の下位サブネットワーク存在判定処理(ステップS1702)について説明する。
[Low-level subnetwork existence determination processing]
With reference to FIG. 18, the lower subnetwork presence determination process (step S1702) of the communication device with a server function will be described.
下位サブネットワーク存在判定処理(ステップS1702)においては、まず下位サブネットワーク判断部1307において、受信したサーバ機能探索要求に含まれるルータの識別情報と自身が属するルータの識別情報とを比較する(ステップS1800)。これは、一般の家庭用ルータがもつNAPT機能やファイアウォール機能の影響によりサーバ機能探索要求は同位ネットワークまたは自身より下位のサブネットワークに存在する通信機器からしか受信しないため、ルータの識別情報が異なる場合は自身が属するルータの下位にルータが存在すると判断するためである。受信したサーバ機能探索要求に含まれるルータの識別情報と自身が属するルータの識別情報とが同じ場合は(ステップS1800でNo)同位ネットワークに存在する通信機器より受信したパケットであるため、自身が属するルータの下位には複数の異なるルータは並列に接続されていないと判断して(ステップS1801)、判断結果をサーバ適正判断部404に通知し処理を終了する。一方、受信したサーバ機能探索要求に含まれるルータの識別情報と自身が属するルータの識別情報とが異なる場合(ステップS1800でYes)は、自身が属するルータの下位にルータが存在するため、パケットのボディ内のルータ識別情報およびIPヘッダの送信元アドレスを記憶部402に記憶し、受信したパケットのIPヘッダの送信元アドレスと、以前に他の通信機器から受信し記憶部402に記憶したサーバ機能探索要求のIPヘッダの送信元アドレスとを比較する(ステップS1802)。これは、自身が属するルータの下位に直列に複数の異なるルータが接続されているのか、並列に複数の異なるルータが接続されているかを判断するためである。家庭用ルータのNAPT機能やファイアウォール機能により、自身より下位のサブネットワークに属する通信機器から送信されたパケットの送信元アドレスはルータのWAN側アドレスに変換されることを利用すると、パケットのIPヘッダの送信元アドレスつまりルータのWAN側アドレスを比較することで、自身のルータの識別情報とは異なりかつ送信元アドレスが同じ複数のパケットを受信した場合は、直列に接続されている複数のルータに属する複数の通信機器から受信したと判断でき、また、送信元アドレスが異なる複数のパケットを受信した場合は、並列に接続されている複数のルータに属する複数の通信機器から受信したと判断できる。ゆえに、受信したパケットのIPヘッダの送信元アドレスと、以前に受信し記憶部402に記憶したサーバ機能探索要求のIPヘッダの送信元アドレスとが同じ場合は(ステップS1802でNo)、自身が属するルータの下位に直列に複数の異なるルータが接続されており、並列には接続されていないと判断して(ステップS1801)、判断結果をサーバ適正判断部404に通知し処理を終了する。一方、受信したパケットのIPヘッダの送信元アドレスと、以前に受信し記憶部402に記憶したサーバ機能探索要求のIPヘッダの送信元アドレスとが異なる場合は(ステップS1802でYes)、自身が属するルータの下位に複数の異なるルータが並列に接続されていると判断し(ステップS1803)、判断結果をサーバ適正判断部404に通知し処理を終了する。
In the lower subnetwork existence determination process (step S1702), first, the lower
なお、本実施の形態2では、自身が属するルータの下位に複数の異なるルータが並列に接続されていることを、複数の異なるルータに属する通信機器からサーバ機能探索要求を受信することで判断したが、サーバ機能探索要求以外のメッセージであってもよい。また、同種のメッセージではなく、異なるメッセージのルータの識別情報および送信元通信機器の識別情報を比較してもよい。 In the second embodiment, it is determined by receiving a server function search request from a communication device belonging to a plurality of different routers that a plurality of different routers are connected in parallel below the router to which the router belongs. However, it may be a message other than the server function search request. Further, the router identification information and the transmission source communication device identification information of different messages may be compared instead of the same type of message.
また、受信したサーバ機能探索要求のルータ識別情報が自身が属するルータの識別情報と異なった場合にパケット内のルータ識別情報およびIPヘッダの送信元アドレスを記憶部402に記憶するとして説明したが、サーバ機能探索要求を受信した時点で記憶部402に記憶し、受信したサーバ機能探索要求のルータ識別情報が自身が属するルータの識別情報と異なった場合に、以前に受信し記憶部402に記憶したサーバ機能探索要求のルータ識別情報とIPヘッダの送信元アドレスとを比較してもよい。
In addition, when the router identification information of the received server function search request is different from the identification information of the router to which the server belongs, the router identification information in the packet and the source address of the IP header are described as being stored in the
また、自身が属するルータと異なるルータの識別情報であり、かつ記憶部402に登録されていないルータの識別情報をもつパケットを受信した場合のみ記憶するとしてもよい。
Further, it may be stored only when a packet having router identification information different from the router to which it belongs and having router identification information not registered in the
また、ルータの識別情報としてMACアドレスや製造番号、ルータのLAN側アドレスなどが考えられるがこれに限定するものではなく、ルータを唯一に識別可能な情報であればよい。 The router identification information may be a MAC address, serial number, router LAN address, etc., but is not limited to this, and any information that can uniquely identify the router may be used.
また、IPヘッダの送信元アドレスを比較することにより、自身が属するルータの下位に直列に複数の異なるルータが存在するのか、あるいは並列に複数の異なるルータが存在するのかを判断するとして説明したが、直列であるか並列であるかを判断できる方法であればよくこれに限定するものではない。 In addition, although it has been described that by comparing the source address of the IP header, it is determined whether there are a plurality of different routers in series below the router to which the IP header belongs, or a plurality of different routers in parallel. Any method can be used as long as it can determine whether it is serial or parallel.
また、受信したサーバ機能探索要求に含まれるルータの識別情報が自身が属するルータと異なる場合に、以前受信し記憶部402に記憶したサーバ機能探索要求のIPヘッダの送信元アドレスと比較するとして説明したが、先に記憶部402に記憶されているサーバ機能探索要求のIPヘッダの送信元アドレスを比較し、異なる場合にルータの識別情報を比較してもよく、比較の順番をこれ一つに定めるものではない。
In addition, when the identification information of the router included in the received server function search request is different from the router to which the server belongs, it is compared with the source address of the IP header of the server function search request received and stored in the
[メッセージ受信によるサーバ機能切り替え処理]
図19は、図16のステップS1603におけるメッセージ受信によるサーバ機能切り替え処理を示す図である。
[Server function switching processing by message reception]
FIG. 19 is a diagram showing server function switching processing by message reception in step S1603 of FIG.
サーバ機能切り替え処理のトリガとして、他のサーバ機能付き通信機器からサーバ機能の有効化を指示するサーバ機能切り替えメッセージを受信した場合(ステップS1900でYes)、サーバ機能切り替え部405は、サーバ機能部/クライアント機能部406のサーバ機能部を有効化し(ステップS1901)、上位サブネットワーク解析(ステップS1500)の結果から判明した上位ルータのネットワークおよび同位ネットワークに通信機器に対し、サーバ機能探索要求を送信する(ステップS1902)。サーバ探索要求送信後、上位サブネットワークに属する通信機器からサーバ機能探索応答の受信を待ち(ステップS1903)、上位サブネットワークに属する通信機器からサーバ機能探索応答を受信した場合は(ステップS1903でYes)、自身より接続性を向上できる上位サブネットワークにサーバ機能付き通信機器が存在するためサーバ機能部/クライアント機能部406のサーバ機能部を無効化・クライアント機能部を有効化して(ステップS1904)処理を終了する。一方、上位サブネットワークに存在する通信機器からサーバ機能探索応答を受信できなかった場合は(ステップS1903でNo)、同位ネットワークに存在する通信機器からのサーバ機能探索応答の受信を待つ(ステップS1905)。同位ネットワークに存在する通信機器からサーバ機能探索応答を受信した場合は(ステップS1905でYes)、後述のサーバ機能調停処理を行い(ステップS1906)、サーバ機能調停処理の結果、自身のサーバ機能が有効化されたままの場合は(ステップS1907でYes)、サーバ機能の有効化を指示したサーバ機能切り替えメッセージの送信元であるサーバ機能付き通信機器に対しサーバ機能有効化応答を送信して(ステップS1909)、処理を終了する。サーバ機能調停処理の結果、自身のサーバ機能が無効化された場合は(ステップS1907でNo)、そのまま処理を終了する。同位ネットワークに存在する通信機器からサーバ機能探索応答を受信しなかった場合は(ステップS1905でNo)、現在までサーバ機能を有効化していた通信機器に対しサーバ機能の無効化を指示するサーバ機能切り替えメッセージを送信し(ステップS1908)、サーバ機能の有効化を指示したサーバ機能切り替えメッセージの送信元であるサーバ機能付き通信機器に対しサーバ機能有効化応答を送信して(ステップS1909)、処理を終了する。
When a server function switching message instructing activation of the server function is received from another communication device with a server function as a trigger for the server function switching process (Yes in step S1900), the server
一方、他のサーバ機能付き通信機器からサーバ機能の無効化を指示するサーバ機能切り替えメッセージを受信した場合は(ステップS1900でNo、かつ、ステップS1910でYes)、自身がサービスを提供している通信機器にサーバ機能を交代する他の通信機器の情報を送信し(ステップS1911)、サーバ機能部/クライアント機能部406のサーバ機能部を無効化・クライアント機能部を有効化して(ステップS1912)処理を終了する。
On the other hand, when a server function switching message for instructing invalidation of the server function is received from another communication device with a server function (No in step S1900 and Yes in step S1910), the communication that provides the service itself Information on other communication devices that replace the server function is transmitted to the device (step S 1911), the server function unit of the server function unit /
[適正判断によるサーバ機能切り替え処理]
図20は、図16のステップS1608、図17のステップS1709、および、図25のステップS2509における適性判断によるサーバ機能切り替え処理を示す図である。
[Server function switching process based on appropriate judgment]
FIG. 20 is a diagram showing server function switching processing based on suitability determination in step S1608 in FIG. 16, step S1709 in FIG. 17, and step S2509 in FIG.
サーバ機能切り替え処理のトリガとして、サーバ適正判断部404から自身はサーバ機能を有効にするべき通信機器である判断通知を受信すると(ステップS2000でYes)、サーバ機能部/クライアント機能部406のサーバ機能部を有効化・クライアント機能部を無効化して(ステップS2003)処理を終了する。サーバ適正判断部404から自身はサーバ機能を無効にするべき通信機器である判断通知を受信すると(ステップS2000でNo、かつ、ステップS2001でYes)、サーバ機能部/クライアント機能部406のサーバ機能部を無効化・クライアント機能部を有効化して(ステップS2004)処理を終了する。
When the server function switching process trigger is received from the server
一方、サーバ適正判断部404からサーバ機能を有効化する通信機器を変更するべきである判断通知を受信すると(S2000でNo、かつ、S2001でNo、かつ、ステップS2002でYes)、上位、および同位ネットワークに対してサーバ機能の有効化を指示するサーバ機能切り替えメッセージを送信し(ステップS2005)、サーバ機能有効化応答の受信を待つ(ステップS2006)。一定時間内にサーバ機能有効化応答を受信した場合は(ステップS2007でNo、かつ、ステップS2006でYes)、上位または同位ネットワークに存在するいずれかのサーバ機能付き通信機器がサーバ機能を有効化したため何もせずに処理を終了する。一方、一定時間内にサーバ機能有効化応答を受信しなかった場合は(ステップS2006でNo、かつ、ステップS2007でYes)、上位および同位ネットワークにサーバ機能付き通信機器が存在しないためサーバ機能部/クライアント機能部406のサーバ機能部を有効化・クライアント機能部を無効化し(ステップS2008)、現在サーバ機能を有効化しているサーバ機能付き通信機器に対しサーバ機能の無効化を指示するサーバ機能切り替えメッセージを送信して(ステップS2009)処理を終了する。
On the other hand, when a notification of determination that the communication device that activates the server function should be changed is received from the server suitability determination unit 404 (No in S2000, No in S2001, and Yes in step S2002), the higher rank and the peer A server function switching message for instructing activation of the server function is transmitted to the network (step S2005), and reception of a server function activation response is awaited (step S2006). If a server function activation response is received within a certain time (No in step S2007 and Yes in step S2006), either one of the communication devices with the server function in the upper level or peer network has activated the server function. The process ends without doing anything. On the other hand, if the server function activation response is not received within a certain time (No in step S2006 and Yes in step S2007), the server function unit / Server function switching message for instructing to disable the server function for the server function communication device that currently enables the server function by enabling the server function part of the
なお、本実施の形態では、自身のサーバ機能が有効化されておらず、かつ、上位または同位ネットワークにサーバ機能を有効にしているサーバ機能付き通信機器が存在しない場合に、サーバ機能を有効化する通信機器を変更すべきと判断するとして説明したが、自身が属するルータの下位に複数の異なるルータが並列に接続されていることを検知した際に常に最上位にサーバ機能を有効化する通信装置を設置するように交代したい場合は、自身のサーバ機能が有効化されている場合であっても、上位サブネットワークにサーバ機能を有効にしているサーバ機能付き通信機器が存在していなければ、サーバ機能を有効化する通信機器を変更すべきと判断して上位サブネットワークに対しサーバ機能の有効化を指示するサーバ機能切り替えメッセージを送信してもよい。 In this embodiment, the server function is enabled when the server function is not enabled and there is no communication device with the server function that enables the server function in the host or peer network. It is explained that it is determined that the communication device to be changed should be changed. However, when it is detected that multiple different routers are connected in parallel under the router to which it belongs, communication that always enables the server function at the highest level. If you want to switch to install the device, even if your server function is enabled, if there is no communication device with server function that enables the server function in the upper subnetwork, A server function switching message that determines that the communication device that activates the server function should be changed and instructs the higher-level subnetwork to activate the server function. It may be transmitted di.
なお、本実施の形態では、上位、および同位ネットワークに対しサーバ機能の有効化を指示するサーバ機能切り替えメッセージを送信するとして説明したが、自身のサーバ機能が有効でなければサーバ機能切り替えメッセージを送信せずに自身のサーバ機能を有効にしてもよい。また、複数のサーバ機能付き通信機器に対しサーバ機能の有効化を指示するサーバ機能切り替えメッセージを送信するのではなく、上位または同位ネットワークに存在するサーバ機能付き通信機器の中であらかじめ決めておいた1台に対してサーバ機能の有効化を指示するサーバ機能切り替えメッセージを送信してもよい。 In this embodiment, the server function switching message for instructing the server function to be activated is transmitted to the host and peer networks. However, if the server function is not valid, the server function switching message is transmitted. Instead, the server function may be validated. Also, instead of sending a server function switching message for instructing the server function to be activated to a plurality of communication devices with a server function, it is determined in advance among communication devices with a server function existing in a higher level or peer network. You may transmit the server function switching message which instruct | indicates validation of a server function with respect to 1 unit | set.
[サーバ機能調停処理]
図21を参照しながら、図15のステップS1504、および図19のステップS1908におけるサーバ機能調停処理について説明する。
[Server function arbitration]
The server function arbitration process in step S1504 in FIG. 15 and step S1908 in FIG. 19 will be described with reference to FIG.
サーバ機能調停処理は、サーバ機能を有効化してサービスを提供する通信機器を1台に調停するための処理である。 The server function arbitration process is a process for mediating one communication device that provides a service by enabling the server function.
サーバ機能調停処理においては、発見したサーバ機能を有効化しているサーバ機能通信機器と自身とのサーバ機能を有効化している時間を比較し(ステップS2100)、自身の方が短ければ(ステップS2101でNo)、現在サービスを提供している通信機器が存在するかどうかを判断する(ステップS2102)。現在ネットワーク上のいずれかの通信機器にサービスを提供している場合は(ステップS2102でYes)、自身がサービスを提供している通信機器にサーバ機能を交代する他の通信機器の情報を送信し(ステップS2104)、サーバ機能部/クライアント機能部406のサーバ機能部を無効化・クライアント機能部を有効化して(ステップS2103)処理を終了する。現在ネットワーク上の通信機器にサービスを提供していない場合は(ステップS2102でNo)、サーバ機能部/クライアント機能部406のサーバ機能部を無効化・クライアント機能部を有効化して(ステップS2103)処理を終了する。サーバ機能を有効化している時間が自身のほうが長ければ(ステップS2101でYes)、発見したサーバ機能を有効化していた通信機器に対しサーバ機能の無効化を指示するサーバ機能切り替えメッセージを送信し(ステップS2105)、処理を終了する。
In the server function arbitration process, the server function communication device that activates the found server function is compared with the time during which the server function is activated (step S2100), and if the server function is shorter (in step S2101) No), it is determined whether there is a communication device that currently provides a service (step S2102). If a service is currently being provided to any communication device on the network (Yes in step S2102), information on the other communication device that replaces the server function is transmitted to the communication device that is providing the service. (Step S2104) The server function unit /
なお、同位ネットワークに存在するサーバ機能付き通信機器からサーバ機能探索応答を受信した場合にサーバ機能を有効化しいている時間を比較するとして説明したが、サーバ機能を有効化している時間はサーバ機能探索要求およびサーバ機能探索応答にフィールドを用意して情報交換してもよいし、その他のメッセージを使用してもよい。 Although it has been described that the server function search time is compared when a server function search response is received from a communication device with a server function that exists in the peer network, the server function search time is the server function search time. Information may be exchanged by preparing fields in the request and server function search response, or other messages may be used.
また、本実施の形態においては調停のための判断材料としてサーバ機能を有効化している時間を用いるが、サーバ機能の調停方法は本記述に限るものではなく、サーバ機能を有効化している時間以外の判断基準、例えば、サービスを提供している通信機器の台数、備えている機能や処理能力、製造月日(通信機器としての新しさ)などを用いて比較してもよく、これに限定するものではなく、他の方法によって1台に調停してもよい。 In this embodiment, the time for which the server function is activated is used as a judgment material for arbitration. However, the arbitration method for the server function is not limited to this description, and other than the time for which the server function is activated. May be compared using, for example, the number of communication devices providing services, the functions and processing capabilities provided, the date of manufacture (newness as a communication device), etc. It may not be a thing but may mediate to one by other methods.
[サーバ機能をもたない通信機器の機能構成]
図14は、本発明の実施の形態2におけるサーバ機能をもたない通信機器5aの構成を示す機能ブロック図である。サーバ機能を持たない通信機器の機能構成は、サーバ機能を持つ通信機器からサーバ機能の処理に関する機能部を取り除いた構成となる。図14に示す機能ブロック図は、図5に示す機能ブロック図と比較し、下位サブネットワーク判断部1407を備えている点で相違する。その他の構成要素は、図5と同様であるため、図5と同様の構成要素には同一の符号を付し、詳細な説明は省略する。なお、本実施の形態におけるサーバ機能をもたない他の通信機器も同じ構成をとるものとする。以下、その機能構成について説明する。
[Functional configuration of communication equipment without server function]
FIG. 14 is a functional block diagram showing the configuration of the
図14において、サーバ機能をもたない通信機器5aは、通信I/F部500と、上位サブネットワーク判断部501と、記憶部502と、サーバ機能探索部503と、クライアント機能部506と、下位サブネットワーク判断部1407を備えている。
In FIG. 14, the
通信I/F部500、上位サブネットワーク判断部501、記憶部502と、サーバ機能探索部503およびクライアント機能部506は実施の形態1に示す同機能部と処理機能が同様であるため説明を省略する。
The communication I /
[下位サブネットワーク判断部]
下位サブネットワーク判断部1407は、自身が属するルータの下位に複数の異なるルータが並列に接続されていることを判断する機能部である。下位サブネットワーク判断部1407は、自身以外の通信機器から通信を開始して受信したパケットのボディに含まれるルータの識別情報、およびIPヘッダに含まれる送信元のIPアドレスを比較して複数の異なるルータの存在を検知した場合に、自身が属するネットワークおよび上位サブネットワーク宛に自身が属するルータの下位に複数の異なるルータが並列に接続されている旨のネットワーク構成変更通知メッセージを送信する。
[Low-level subnetwork judgment unit]
The lower
[サーバ機能をもたない通信機器の動作の概要]
以上のように構成されたサーバ機能をもたない付き通信機器5a〜5dの動作概要について、図22、図23を用いて説明する。
[Overview of operation of communication equipment without server function]
An outline of operations of the attached
図22は本発明の実施の形態2におけるサーバ機能をもたない通信機器の処理フローである。
FIG. 22 is a processing flow of a communication device having no server function in
サーバ機能をもたない通信機器は、サーバ機能付き通信機器と同様に一定時間ごとに上位サブネットワーク判断部501により上位サブネットワーク解析(ステップS2208)を実施し、上位サブネットワーク解析の結果を基に”サーバ機能が有効である通信機器”を探すためにサーバ機能探索要求を送信する(ステップS2209)。なお、本動作は実施の形態1におけるサーバ機能をもたない通信機器の動作と同様であるため詳細な説明は省略する。ただし、サーバ機能探索要求およびサーバ機能探索応答は図24に示すフォーマットに従うものとする。
The communication device having no server function performs upper subnetwork analysis (step S2208) by the upper
サーバ機能探索要求送信後、サーバ機能探索部503はサーバ機能探索応答受信を待ち(ステップS2200)、サーバ機能探索応答を受信すると(ステップS2200でYes)、サーバ機能探索応答の送信元であるサーバ機能付き通信機器に対し通信路を接続して(ステップS2201)サービスを受ける。
After transmitting the server function search request, the server
また、サーバ機能探索要求を受信すると(ステップS2203でYes)、後述の下位サブネットワーク存在判定処理(ステップS2204)を行う。 Further, when a server function search request is received (Yes in step S2203), a lower subnetwork existence determination process (step S2204) described later is performed.
一方、サーバ機能探索応答以外のメッセージを受信した場合は(ステップS2200でNo、かつ、ステップS2203でNo、かつ、ステップS2205でYes)、その他のメッセージ受信処理を行う(ステップS2206)。 On the other hand, when a message other than the server function search response is received (No in step S2200, No in step S2203, and Yes in step S2205), other message reception processing is performed (step S2206).
[下位サブネットワーク存在判定処理]
図23を参照しながら、サーバ機能をもたない通信機器の下位サブネットワーク存在判定処理(ステップS2204)について説明する。
[Low-level subnetwork existence determination processing]
With reference to FIG. 23, the lower subnetwork existence determination process (step S2204) of the communication device having no server function will be described.
下位サブネットワーク存在判定処理(ステップS2204)においては、まず下位サブネットワーク判断部1407において、受信したサーバ機能探索要求に含まれるルータの識別情報と自身が属するルータの識別情報とを比較する(ステップS2300)。受信したサーバ機能探索要求に含まれるルータの識別情報と自身が属するルータの識別情報とが同じ場合は(ステップS2300でNo)同位ネットワークに存在する通信機器より受信したパケットであるため、自身が属するルータの下位には複数の異なるルータは並列に接続されていないと判断し処理を終了する。一方、受信したサーバ機能探索要求に含まれるルータの識別情報と自身が属するルータの識別情報とが異なる場合(ステップS2300でYes)は、自身が属するルータの下位にルータが存在するため、パケットのボディ内のルータ識別情報およびIPヘッダの送信元アドレスを記憶部502に記憶し、受信したパケットのIPヘッダの送信元アドレスと、以前に他の通信機器から受信し記憶部502に記憶したサーバ機能探索要求のIPヘッダの送信元アドレスとを比較する(ステップS2301)。受信したパケットのIPヘッダの送信元アドレスと、以前に受信し記憶部502に記憶したサーバ機能探索要求のIPヘッダの送信元アドレスとが同じ場合は(ステップS2301でNo)、自身が属するルータの下位に直列に複数の異なるルータが接続されており、並列には接続されていないと判断して処理を終了する。一方、受信したパケットのIPヘッダの送信元アドレスと、以前に受信し記憶部502に記憶したサーバ機能探索要求のIPヘッダの送信元アドレスとが異なる場合は(ステップS2301でYes)、自身が属するルータの下位に複数の異なるルータが並列に接続されていると判断し、上位サブネットワーク解析(ステップS2308)の結果から判明した上位または同位ネットワークにサーバ機能を有効化したサーバ機能付き通信機器が存在していれば(ステップS2302でYes)特に何もせず処理を終了し、存在していなければ(ステップS2302でNo)、上位および同位ネットワークに対し、下位に複数の異なるルータが並列に接続された旨を示すネットワーク構成変更通知を送信して(ステップS2303)処理を終了する。
In the lower subnetwork existence determination process (step S2204), first, the lower
以下、このような環境において、サーバ機能切り替え処理が行われる例を説明する。 Hereinafter, an example in which server function switching processing is performed in such an environment will be described.
[サーバ機能付き通信機器が上位サブネットワークに新規に接続された場合]
図1において、サーバ機能付き通信機器4bがサーバ機能を有効にしている状態でサーバ機能付き通信機器4aがネットワークに新規に接続された例を用いて、上位サブネットワークにサーバ機能付き通信機器が新規に接続された場合の処理について説明する。なお、ルータ3aのMACアドレスは00−0E−7F−F9−87−28、送信元アドレスは192.168.1.1、ルータ3bのMACアドレスは00−08−02−0A−DA−86、送信元アドレスは192.168.2.220、ルータ3cのMACアドレスは00−11−43−BD−BE−43、送信元アドレスは192.168.3.10、とする。
[When a communication device with a server function is newly connected to the upper subnetwork]
In FIG. 1, using the example in which the server-equipped
サーバ機能付き通信機器4aはネットワークに新規に接続されると、初回のみ一定時間を待たずにすぐにサーバ機能付き通信機器探索処理(ステップS2503)を行う。サーバ機能付き通信機器探索処理(ステップS2503)において上位サブネットワーク解析を実施する(ステップS1500)。その結果、本実施の形態2においてはサーバ機能付き通信機器4aが接続されているルータ3aが最上位ルータであり自身より上位にネットワークが存在しないと判断されるため、同位ネットワークにのみサーバ機能探索要求をマルチキャストで送信する(ステップS1501)。同位ネットワークに”サーバ機能が有効である通信機器”が存在しないため探索要求の応答はなく(ステップS1502でNo)、サーバ機能付き通信機器探索処理(ステップS2503)を終了する。サーバ機能付き通信機器4aは、サーバ機能付き通信機器探索処理(ステップS2503)において、サーバ機能探索要求の応答を受信しておらず(ステップS2504でNo)、かつ、新規にネットワークに接続されており、サーバ機能部/クライアント機能部406のサーバ機能が有効化されていない状態であるため(ステップS2505でYes)、一定時間下位のサブネットワークからのサーバ機能探索要求の受信を待つ。ルータ3aの下位には、ルータ3bおよびルータ3cが存在し、それぞれにサーバ機能付き通信機器4bおよび4cが接続されているため、サーバ機能付き通信機器4aはいずれかのサーバ機能付き通信機器からサーバ機能探索要求を受信し(ステップS2500でYes、ステップS2501を実行し、ステップS1600でYes)、サーバ機能探索要求受信処理(ステップS1601)を実行する。ここでは、仮にサーバ機能付き通信機器4bからサーバ機能探索要求を受信したことにする。サーバ機能探索要求受信処理(ステップS1601)において、サーバ機能が有効でないため(ステップS1700でNo)サーバ機能探索応答は送信しない。また、サーバ機能探索要求の送信元の通信機器はサーバ機能付き通信機器4bであり(ステップS1704でYes)、かつ、サーバ機能付き通信機器4aはサーバ機能を有効化しているサーバ機能付き通信機器4bとはコネクションを接続していないため(ステップS1710でNo)、自身はサーバ機能を無効にするべき通信機器であると判断し(ステップS1707)、下位サブネットワーク存在判定処理(ステップS1702)を行う。下位サブネットワーク存在判定処理(ステップS1702)においては、受信したサーバ機能探索要求に含まれるルータの識別情報と自身が属するルータの識別情報とを比較する(ステップS1800)。自身が属するルータ3aのMACアドレス00−0E−7F−F9−87−28と受信したパケットに含まれるルータの識別情報であるルータ3bのMACアドレス00−08−02−0A−DA−86とは異なるため(ステップS1800でYes)、受信したサーバ機能探索要求のIPヘッダの送信元アドレスと、以前に受信し記憶部402に記憶したサーバ機能探索要求のIPヘッダの送信元アドレスとを比較する(ステップS1802)。ここで、サーバ機能付き通信機器4aは新規に接続されたばかりで他にサーバ機能探索要求を受信していないため比較することができない(ステップS1802でNo)。サーバ機能付き通信機器4bから受信したサーバ機能探索要求に含まれるルータの識別情報とIPヘッダの送信元アドレスを記憶部402に記憶し、自身が属するルータの下位には複数の異なるルータは並列に接続されていないと判断して(ステップS1801)下位サブネットワーク存在判定処理(ステップS1702)を終了する。下位サブネットワーク存在判定処理(ステップS1702)の結果、自身が属するルータの下位には複数の異なるルータは並列に接続されていないと判断したため(ステップS1703でYes)、メッセージ受信処理を終了し、サーバ機能部/クライアント機能部406のサーバ機能が有効化されていない状態で以降の動作を行う。
When the server-equipped
[サーバ機能付き通信機器が下位サブネットワークに新規に接続された場合]
図1において、サーバ機能付き通信機器4bがサーバ機能を有効にしている状態でサーバ機能付き通信機器4cがネットワークに新規に接続された例を用いて、上位サブネットワークにサーバ機能付き通信機器が新規に接続された場合の処理について説明する。なお、ルータ3aのMACアドレスは00−0E−7F−F9−87−28、送信元アドレスは192.168.1.1、ルータ3bのMACアドレスは00−08−02−0A−DA−86、送信元アドレスは192.168.2.220、ルータ3cのMACアドレスは00−11−43−BD−BE−43、送信元アドレスは192.168.3.10、とする。
[When a communication device with server function is newly connected to a lower subnetwork]
In FIG. 1, a communication device with a server function is newly added to a higher-level subnetwork using an example in which the communication device with a
サーバ機能付き通信機器4cはネットワークに新規に接続されると、初回のみ一定時間を待たずにすぐにサーバ機能付き通信機器探索処理(ステップS2503)を行う。サーバ機能付き通信機器探索処理(ステップS2503)において上位サブネットワーク解析を実施する(ステップS1500)。その結果得られたルータ3a及びルータ3bのネットワークアドレス情報を元にして、ルータ3a及びルータ3bに接続された”サーバ機能が有効である通信機器”のアドレスを推定し、サーバ機能探索要求を送信する(ステップS1501)。また、自身が接続されているルータ3cのネットワークに対しサーバ機能探索要求をマルチキャストで送信する(ステップS1501)。ここで、上位サブネットワークのルータ3bに接続されるサーバ機能付き通信機器4bはサーバ機能を有効にしており、サーバ機能付通信機器4cからサーバ機能探索要求を受信すると(ステップS2500でYes、ステップS2501を実行し、ステップS1600でYes)、サーバ機能探索要求受信処理(ステップS1601)を実行する。サーバ機能探索要求受信処理(ステップS1601)において、サーバ機能付き通信機器4bは自身のサーバ機能が有効化されているので(ステップS1700でYes)サーバ機能付き通信機器4cに対しサーバ機能探索応答を送信する(ステップS1701)。サーバ機能付き通信機器4cはサーバ機能付通信機器4bからサーバ機能探索応答を受信し(ステップS1502でYes)、かつ、新規にネットワークに接続されており、サーバ機能部/クライアント機能部406のサーバ機能が有効化されていない状態であるため(ステップS1503でNo)、自身はサーバ機能を無効にするべき通信機器であると判断して(ステップS706)サーバ機能付き通信機器探索処理を終了し、サーバ機能部/クライアント機能部406のサーバ機能が有効化されていない状態で以降の動作を行う。
When the server-equipped
一方、サーバ機能付き通信機器4cよりサーバ機能探索要求を受信したサーバ機能付き通信機器4は、サーバ機能付き通信機器4cに対しサーバ機能探索応答を送信後(ステップS1701)、下位サブネットワーク存在判定処理(ステップS1702)を行う。下位サブネットワーク存在判定処理(ステップS1702)においては、受信したサーバ機能探索要求に含まれるルータの識別情報と自身が属するルータの識別情報とを比較する(ステップS1800)。自身が属するルータ3bのMACアドレス00−08−02−0A−DA−86と受信したパケットに含まれるルータの識別情報であるルータ3cのMACアドレス00−11−43−BD−BE−43とは異なるため(ステップS1800でYes)、受信したサーバ機能探索要求のIPヘッダの送信元アドレスと、以前に受信し記憶部402に記憶したサーバ機能探索要求のIPヘッダの送信元アドレスとを比較する(ステップS1802)。ここで、サーバ機能付き通信機器4bはサーバ機能を有効化しているため、ルータ3cに接続された下位サブネットワークに存在するサーバ機能をもたない通信機器5cとコネクションを接続しているとすると、記憶部402にはサーバ機能をもたない通信機器5cからサーバ機能探索要求を受信した際にルータ3cのMACアドレスとIPヘッダの送信元アドレス192.168.3.10が記憶されている。サーバ機能付き通信機器4bは、サーバ機能付き通信機器4cから受信したサーバ機能探索要求の送信元アドレス192.168.3.10と、記憶部402に記憶されているサーバ機能をもたない通信機器5cから受信したサーバ機能探索要求の送信元アドレス192.168.3.10とが同じなため(ステップS1802でNo)、自身が属するルータの下位には複数の異なるルータは並列に接続されていないと判断して(ステップS1801)下位サブネットワーク存在判定処理(ステップS1702)を終了する。下位サブネットワーク存在判定処理(ステップS1702)の結果、自身が属するルータの下位には複数の異なるルータは並列に接続されていないと判断したため(ステップS1703でYes)、メッセージ受信処理を終了する。
On the other hand, the server-equipped
一方、サーバ機能付き通信機器3cが送信したサーバ機能探索要求はサーバ機能付き通信機器4aも受信する。サーバ機能付き通信機器4aもサーバ機能付き4b同様に下位サブネットワーク存在判定処理を行うが、ルータ3bおよびルータ3cが直列に接続されているため、下位サブネットワークに存在するいかなる通信機器より受信するサーバ機能探索要求も全てルータ3bのMACアドレスおよび送信元アドレスで構成されるため、自身が属するルータの下位には複数の異なるルータは並列に接続されていないと判断し、メッセージ受信処理を終了する。
On the other hand, the server function search request transmitted by the server
[サーバ機能を有効にしたサーバ機能付き通信機器を含む上位サブネットワークが接続された場合]
図1において、サーバ機能付き通信機器4bがサーバ機能を有効にしている状態でサーバ機能を有効にしたサーバ機能付き通信機器4aを含むネットワーク(ルータ3aとルータ3aに接続する通信機器)が新規に接続された例を用いて、上位サブネットワークが新規に接続された場合の処理について説明する。なお、ルータ3aのMACアドレスは00−0E−7F−F9−87−28、送信元アドレスは192.168.1.1、ルータ3bのMACアドレスは00−08−02−0A−DA−86、送信元アドレスは192.168.2.220、ルータ3cのMACアドレスは00−11−43−BD−BE−43、送信元アドレスは192.168.3.10、とする。
[When a higher-level subnetwork that includes a server-equipped communication device with the server function enabled is connected]
In FIG. 1, a network (
サーバ機能付き通信機器4bは定期的にサーバ機能探索付き通信機器探索処理(ステップS2503)を実施している。サーバ機能付き通信機器探索処理(ステップS2503)において、上位サブネットワーク解析(ステップS1500)を実施し、上位サブネットワーク(ルータ3aに接続されたネットワーク)が新たに接続されていることを上位サブネットワーク解析により発見した場合、サーバ機能付き通信機器4bは上位サブネットワークに対してサーバ機能探索要求を送信する(ステップS1501)。また、同位ネットワークに対しても同様にサーバ機能探索要求を送信する(ステップS1501)。ここで、上位サブネットワークのルータ3aに接続されるサーバ機能付き通信機器4aがサーバ機能を有効にしているためサーバ機能探索応答を受信する(ステップS1502でYes)。上位サブネットワークにサーバ機能を有効にしたサーバ機能付き通信機器が存在し、かつ自身のサーバ機能は有効であるため(ステップS1503でYes)、サーバ機能を有効にするサーバ機能付き通信機器をどちらか一方にしぼるべくサーバ機能調停処理を行う(ステップS1504)。サーバ機能調停処理(ステップS1504)において、発見したサーバ機能付き通信機器4aと自身とのサーバ機能を有効化している時間を比較する(ステップS2100)。ここでは、仮にサーバ機能付き通信機器4aがサーバ機能を有効化している時間を5分、サーバ機能付き通信機器4bがサーバ機能を有効化している時間を1時間とする。発見したサーバ機能付き通信機器4aと自身とのサーバ機能を有効化している時間を比較した結果、自身の方がサーバ機能を有効化している時間が長いため(ステップS2101でYes)、サーバ機能付き通信機器4bは、サーバ機能付き通信機器4aに対しサーバ機能の無効化を指示するサーバ機能切り替えメッセージを送信し(ステップS2105)、サーバ機能調停処理(ステップS2503)を終了する。
The communication device with
一方、サーバ機能付き通信機器4aは自身が属しているルータ3aの下位にルータ3bおよびルータ3cが接続されそれぞれにサーバ機能付き通信機器4bおよび4cが接続されているため、いずれかのサーバ機能付き通信機器からサーバ機能探索要求を受信し(ステップS2500でYes、ステップS2501を実行し、ステップS1600でYes)、サーバ機能探索要求受信処理(ステップS1601)を実行する。ここでは、仮にサーバ機能付き通信機器4bからサーバ機能探索要求を受信したことにする。サーバ機能探索要求受信処理(ステップS1601)において、サーバ機能が有効であるため(ステップS1700でYes)、サーバ機能付き通信機器4bに対しサーバ機能探索応答を送信し(ステップS1701)、下位サブネットワーク存在判定処理(ステップS1702)を行う。下位サブネットワーク存在判定処理(ステップS1702)においては、受信したサーバ機能探索要求に含まれるルータの識別情報と自身が属するルータの識別情報とを比較する(ステップS1800)。自身が属するルータ3aのMACアドレス00−0E−7F−F9−87−28と受信したパケットに含まれるルータの識別情報であるルータ3bのMACアドレス00−08−02−0A−DA−86とは異なるため(ステップS1800でYes)、受信したサーバ機能探索要求のIPヘッダの送信元アドレスと、以前に受信し記憶部402に記憶したサーバ機能探索要求のIPヘッダの送信元アドレスとを比較する(ステップS1802)。ここで、サーバ機能付き通信機器4aを含むネットワークは新規に接続されたばかりであり、ルータ3bおよびルータ3cに接続された通信機器とコネクションを接続していないとすると、下位サブネットワークに存在する通信機器からは他にサーバ機能探索要求を受信していないため比較することができない(ステップS1802でNo)。サーバ機能付き通信機器4bから受信したサーバ機能探索要求に含まれるルータの識別情報とIPヘッダの送信元アドレスを記憶部402に記憶し、自身が属するルータの下位には複数の異なるルータは並列に接続されていないと判断して(ステップS1801)下位サブネットワーク存在判定処理(ステップS1702)を終了する。下位サブネットワーク存在判定処理(ステップS1702)の結果、自身が属するルータの下位には複数の異なるルータは並列に接続されていないと判断したため(ステップS1703でYes)、メッセージ受信処理を終了する。その後サーバ機能通信機器4bよりサーバ機能の無効化を指示するサーバ機能切り替えメッセージを受信し(ステップS2500でYes、ステップS2501を実行し、ステップS1600でNo、かつ、S1602でYes)、メッセージ受信によるサーバ機能切り替え処理を行う(ステップS1603)。メッセージ受信によるサーバ機能切り替え処理(ステップS1603)において、メッセージ受信によるサーバ機能切り替え処理を行う(ステップS1603)。メッセージ受信によるサーバ機能切り替え処理(ステップS1603)においては、サーバ機能の無効化を指示するサーバ機能切り替えメッセージを受信しているため(ステップS1900でNo、かつ、ステップS1910でYes)、サービスを提供している通信機器に対し交代するサーバ機能付き通信機器4bの情報を通知し(ステップS1911)、自身のサーバ機能を無効化する(ステップS1912)。
On the other hand, since the
[サーバ機能を有効にしたサーバ機能付き通信機器を含む下位サブネットワークが接続された場合]
図1において、サーバ機能付き通信機器4bがサーバ機能を有効にしている状態でサーバ機能を有効にしたサーバ機能付き通信機器4cを含むネットワーク(ルータ3cとルータ3cに接続する通信機器)が新規に接続された例を用いて、下位サブネットワークが新規に接続された場合の処理について説明する。なお、ルータ3aのMACアドレスは00−0E−7F−F9−87−28、送信元アドレスは192.168.1.1、ルータ3bのMACアドレスは00−08−02−0A−DA−86、送信元アドレスは192.168.2.220、ルータ3cのMACアドレスは00−11−43−BD−BE−43、送信元アドレスは192.168.3.10、とする。
[When a sub-network including a server-equipped communication device with the server function enabled is connected]
In FIG. 1, a network (
サーバ機能付き通信機器4cは定期的にサーバ機能探索付き通信機器探索処理(ステップS2503)を実施している。サーバ機能付き通信機器探索処理(ステップS2503)において、上位サブネットワーク解析(ステップS1500)を実施し、上位サブネットワーク(ルータ3aに接続されたネットワークおよびルータ3bに接続されたネットワーク)が新たに接続されていることを上位サブネットワーク解析により発見した場合、サーバ機能付き通信機器4cは上位サブネットワークに対してサーバ機能探索要求を送信する(ステップS1501)。また、同位ネットワークに対しても同様にサーバ機能探索要求を送信する(ステップS1501)。ここで、上位サブネットワークのルータ3bに接続されるサーバ機能付き通信機器4bがサーバ機能を有効にしているためサーバ機能探索応答を受信する(ステップS1502でYes)。上位サブネットワークにサーバ機能を有効にしたサーバ機能付き通信機器が存在し、かつ自身のサーバ機能は有効であるため(ステップS1503でYes)、サーバ機能を有効にするサーバ機能付き通信機器をどちらか一方にしぼるべくサーバ機能調停処理を行う(ステップS1504)。サーバ機能調停処理(ステップS1504)において、発見したサーバ機能付き通信機器4bと自身とのサーバ機能を有効化している時間を比較する(ステップS2100)。ここでは、仮にサーバ機能付き通信機器4cがサーバ機能を有効化している時間を5分、サーバ機能付き通信機器4bがサーバ機能を有効化している時間を1時間とする。発見したサーバ機能付き通信機器4bと自身とのサーバ機能を有効化している時間を比較した結果、自身の方がサーバ機能を有効化している時間が短く(ステップS2101でNo)、かつ、サーバ機能を持たない通信機器4cにサービスを提供しているため(ステップS2102でYes)、サービスを提供しているサーバ機能をもたない通信機器3cに対して交代するサーバ機能付き通信機器4bの情報を通知し(ステップS2104)、自身のサーバ機能を無効化して(ステップS2103)以降の動作を行う。
The server-equipped
一方、サーバ機能付き通信機器4bは自身が属しているルータ3bの下位にルータ3cが接続されそれぞれにサーバ機能付き通信機器4cが接続されているため、サーバ機能付き通信機器4cからサーバ機能探索要求を受信し(ステップS2500でYes、ステップS2501を実行し、ステップS1600でYes)、サーバ機能探索要求受信処理(ステップS1601)を実行する。サーバ機能探索要求受信処理(ステップS1601)において、サーバ機能が有効であるため(ステップS1700でYes)、サーバ機能付き通信機器4cに対しサーバ機能探索応答を送信し(ステップS1701)、下位サブネットワーク存在判定処理(ステップS1702)を行う。下位サブネットワーク存在判定処理(ステップS1702)においては、受信したサーバ機能探索要求に含まれるルータの識別情報と自身が属するルータの識別情報とを比較する(ステップS1800)。自身が属するルータ3bのMACアドレス00−08−02−0A−DA−86と受信したパケットに含まれるルータの識別情報であるルータ3cのMACアドレス00−11−43−BD−BE−43とは異なるため(ステップS1800でYes)、受信したサーバ機能探索要求のIPヘッダの送信元アドレスと、以前に受信し記憶部402に記憶したサーバ機能探索要求のIPヘッダの送信元アドレスとを比較する(ステップS1802)。ここで、サーバ機能付き通信機器4bを含むネットワークの下位にはこれまでサブネットワークが存在しなかったため他に下位サブネットワークに存在する通信機器からはサーバ機能探索要求を受信しておらず比較することができない(ステップS1802でNo)。サーバ機能付き通信機器4cから受信したサーバ機能探索要求に含まれるルータの識別情報とIPヘッダの送信元アドレスを記憶部402に記憶し、自身が属するルータの下位には複数の異なるルータは並列に接続されていないと判断して(ステップS1801)下位サブネットワーク存在判定処理(ステップS1702)を終了する。下位サブネットワーク存在判定処理(ステップS1702)の結果、自身が属するルータの下位には複数の異なるルータは並列に接続されていないと判断したため(ステップS1703でYes)、メッセージ受信処理を終了し、再びメッセージ受信処理待ちの状態に戻る。
On the other hand, since the
[サーバ機能付き通信機器が下位に複数の異なるルータが並列に接続されていることを検知した場合]
図26において、サーバ機能付き通信機器4cがサーバ機能を有効化している状態で、サーバ機能付き通信機器4bが自身が属するルータ3bの下位に複数の異なるルータが並列に接続されていることを検知してサーバ機能切り替え処理が行われる例を説明する。なお、ルータ3bのMACアドレスは00−08−02−0A−DA−86、送信元アドレスは192.168.2.220、ルータ3cのMACアドレスは00−11−43−BD−BE−43、送信元アドレスは192.168.3.10、ルータ3dのMACアドレスは00−D0−59−67−7A−FE、送信元アドレスは192.168.3.20とする。
[When a communication device with a server function detects that multiple different routers are connected in parallel underneath]
In FIG. 26, when the communication device with
ルータ3dおよびサーバ機能付き通信機器4dが新規にネットワークに接続されると、サーバ機能付き通信機器4dは初回のみ一定時間を待たずにすぐにサーバ機能付き通信機器探索処理(ステップS2503)を行う。サーバ機能付き通信機器探索処理(ステップS2503)において上位サブネットワーク解析を実施し(ステップS1500)、上位サブネットワーク解析の結果をうけて上位の各ルータに接続された”サーバ機能が有効である通信機器”のアドレスを推定し、サーバ機能探索要求をユニキャストで送信する(ステップS1501)、また、同時に同位ネットワーク内にサーバ機能探索要求をマルチキャストで送信する(ステップS1501)。現在サーバ機能を有効化しているサーバ機能付き通信機器は4cであり、サーバ機能付き通信機器4dの上位サブネットワークおよび同位ネットワークにサーバ機能を有効化しているサーバ機能付き通信機器が存在しないためサーバ機能探索要求の応答はなく(ステップS1502でNo)、サーバ機能付き通信機器探索処理(ステップS2503)を終了する。サーバ機能付き通信機器4dは、サーバ機能付き通信機器探索処理(ステップS2503)において、サーバ機能探索要求の応答を受信しておらず(ステップS2504でNo)、かつ、新規にネットワークに接続されており、サーバ機能部/クライアント機能部406のサーバ機能が有効化されていない状態であるため(ステップS2505でYes)、一定時間下位のサブネットワークからのサーバ機能探索要求の受信を待つ。しかし、下位サブネットワークが存在しないため一定時間内にメッセージを受信しない(ステップS2506でNo、かつ、ステップS2507でYes)。そのため自身のサーバ機能を有効化するべきと判断し(ステップS2508)、適正判断によるサーバ機能切り替え処理(ステップS2509)を行う。適正判断によるサーバ機能切り替え処理(ステップS2509)においては、自身はサーバ機能を有効にするべき通信機器であると判断しているため(ステップS2000でYes)、自身のサーバ機能を有効化する(ステップS2003)。
When the
一方、サーバ機能付き通信機器4bは常にメッセージの受信を待っている(ステップS2500)。ルータ3dおよびサーバ機能付き通信機器4dがネットワークに接続されると、サーバ機能付き通信機器4dからのサーバ機能探索要求を受信し(ステップS2500でYes、ステップS2501を実行し、ステップS1600でYes)、サーバ機能探索要求受信処理(ステップS1601)を実行する。サーバ機能探索要求受信処理(ステップS1601)において、サーバ機能が有効でないため(ステップS1700でNo)サーバ機能探索応答は送信しない。また、サーバ機能探索要求の送信元の通信機器は、サーバ機能付き通信機器4dであるが(ステップS1704でYes)、すでにサーバ機能を有効化しているサーバ機能付き通信機器4cとコネクションを接続しているため(ステップS1710でYes)、下位サブネットワーク存在判定処理(ステップS1702)を行う。下位サブネットワーク存在判定処理(ステップS1702)においては、受信したサーバ機能探索要求に含まれるルータの識別情報と自身が属するルータの識別情報とを比較する(ステップS1800)。自身が属するルータ3bのMACアドレス00−08−02−0A−DA−86と受信したパケットに含まれるルータの識別情報であるルータ3dのMACアドレス00−D0−59−67−7A−FEとは異なるため(ステップS1800でYes)、受信したサーバ機能探索要求のIPヘッダの送信元アドレスと、以前に受信し記憶部402に記憶したサーバ機能探索要求のIPヘッダの送信元アドレスとを比較する(ステップS1802)。現在サーバ機能を有効化しているサーバ機能付き通信機器4cには、定期的に上位サブネットワーク解析を行い上位サブネットワークのサーバ機能付き通信機器に対してサーバ機能探索要求を送信する機能が存在するため、サーバ機能付き通信機器4bの記憶部402には、サーバ機能付き通信機器4cが属しているルータ3cのMACアドレスおよび送信元アドレスが記憶されている。サーバ機能付き通信機器4cから受信したサーバ機能探索要求の送信元アドレス192.168.3.10と、サーバ機能付き通信機器4dから受信したサーバ機能探索要求の送信元アドレス192.168.3.20とは異なるため(ステップS1802でYes)、自身が属するルータの下位に複数の異なるルータが並列に接続されていると判断する(ステップS1803)。下位サブネットワーク存在判定処理(ステップS1702)の結果、自身が属するルータの下位に複数の異なるルータが並列に接続されていることを検知し(ステップS1703でYes)、かつ、自身のサーバ機能は有効化されていないので(ステップS1705でNo)、サーバ機能を有効化した通信機器が上位または同位ネットワークに存在するかどうか判断する(ステップS1706)。現在サーバ機能を有効化しているサーバ機能付き通信機器は3cであり、自身が属するルータの下位に存在するルータに属しているため(ステップS1706でNo)、サーバ機能を有効化するべき通信機器を変更するべきと判断し(ステップS1708)、適正判断によるサーバ機能切り替え処理を行う(ステップS1709)。適正判断によるサーバ機能切り替え処理(ステップS1709)においては、サーバ機能を有効化する通信機器を変更するべきと判断しているため(ステップS200でNo、かつ、ステップS2001でNo、かつ、ステップS2002でYes)、上位ルータ3aのネットワークおよび同位ネットワークに対し、サーバ機能の有効化を指示するサーバ機能切り替えメッセージを送信し(ステップS2005)、サーバ機能有効化応答の受信を待つ(ステップS2006)。
On the other hand, the communication device with
このとき、上位ルータ3aに接続するサーバ機能付き通信機器4aはサーバ機能付き通信機器4bからのサーバ機能の有効化を指示するサーバ機能切り替えメッセージを受信し(ステップS2500でYes、ステップS2501を実行し、ステップS1600でNo、かつステップS1602でYes)、メッセージ受信によるサーバ機能切り替え処理を行う(ステップS1603)。メッセージ受信によるサーバ機能切り替え処理(ステップS1603)においては、サーバ機能の有効化を指示するサーバ機能切り替えメッセージを受信しているため(ステップS1900でYes)、自身のサーバ機能を有効化する(ステップS1901)。次に、上位サブネットワーク解析(ステップS1500)の結果サーバ機能付き通信機器4aが接続されているルータ3aが最上位ルータであると判明しているため、同位ネットワークにのみサーバ機能探索要求をマルチキャストで送信する(ステップS1902)。同位ネットワークにサーバ機能付き通信機器は4aしか存在せず、サーバ機能探索応答を受信しないため(ステップS1903でNo、かつ、ステップS1905でNo)、サーバ機能を有効化しているサーバ機能付き通信機器4cおよび4dに対しサーバ機能の無効化を指示するサーバ機能切り替えメッセージを送信し(ステップS1908)、サーバ機能付き通信機器4bに対しサーバ機能有効化応答を送信する(ステップS1909)。
At this time, the
サーバ機能付き通信機器4bは一定時間内にサーバ機能付き通信機器4aからのサーバ機能有効化応答を受信したため(ステップS2007でNo、かつ、ステップS2006でYes)、サーバ機能を有効化する通信機器を切り替えられたとして処理を終了する。
Since the server-equipped
一方、サーバ機能付き通信機器4aからサーバ機能の無効化を指示するサーバ機能切り替えメッセージを受信(ステップS2500でYes、ステップS2501を実行し、ステップS1600でNo、かつステップS1602でYes)したサーバ機能付き通信機器4cおよび4dは、メッセージ受信によるサーバ機能切り替え処理を行う(ステップS1603)。メッセージ受信によるサーバ機能切り替え処理(ステップS1603)においては、サーバ機能の無効化を指示するサーバ機能切り替えメッセージを受信しているため(ステップS1900でNo、かつ、ステップS1910でYes)、サービスを提供している通信機器に対し交代するサーバ機能付き通信機器4aの情報を通知し(ステップS1911)、自身のサーバ機能を無効化する(ステップS1912)。
On the other hand, a server function switching message for instructing invalidation of the server function is received from the communication device with
なお、ルータ3dおよびサーバ機能をもたない通信機器5dが新規に接続された場合についても同様に、サーバ機能付き通信機器4bがサーバ機能をもたない通信機器5dによるサーバ機能探索要求を受信することで自身が属するルータの下位に複数の異なるルータが並列に接続されていることを検知してサーバ機能を有効化するべき通信機器を変更する。
Similarly, when the
[サーバ機能をもたない通信機器が下位に複数の異なるルータが並列に接続されていることを検知した場合]
図26において、サーバ機能付き通信機器4cがサーバ機能を有効化している状態で、サーバ機能をもたない通信機器5bが下位に複数の異なるルータが並列に接続されていることを検知してサーバ機能切り替え処理が行われる例を説明する。なお、図26においては、サーバ機能付き通信機器4bが図示されているが本実施の形態ではサーバ機能付き通信機器4bは存在しないものとして説明する。なお、ルータ3bのMACアドレスは00−08−02−0A−DA−86、送信元アドレスは192.168.2.220、ルータ3cのMACアドレスは00−11−43−BD−BE−43、送信元アドレスは192.168.3.10、ルータ3dのMACアドレスは00−D0−59−67−7A−FE、送信元アドレスは192.168.3.20とする。
[When a communication device that does not have a server function detects that multiple different routers are connected in parallel underneath]
In FIG. 26, when the
ルータ3dおよびサーバ機能付き通信機器4dが新規にネットワークに接続されると、サーバ機能付き通信機器4dは初回のみ一定時間を待たずにすぐにサーバ機能付き通信機器探索処理(ステップS2503)を行う。サーバ機能付き通信機器探索処理(ステップS2503)において上位サブネットワーク解析を実施し(ステップS1500)、上位サブネットワーク解析の結果をうけて上位の各ルータに接続された”サーバ機能が有効である通信機器”のアドレスを推定し、サーバ機能探索要求をユニキャストで送信する(ステップS1501)、また、同時に同位ネットワーク内にサーバ機能探索要求をマルチキャストで送信する(ステップS1501)。現在サーバ機能を有効化しているサーバ機能付き通信機器は4cであり、サーバ機能付き通信機器4dの上位サブネットワークおよび同位ネットワークにサーバ機能を有効化しているサーバ機能付き通信機器が存在しないためサーバ機能探索要求の応答はなく(ステップS1502でNo)、サーバ機能付き通信機器探索処理(ステップS2503)を終了する。サーバ機能付き通信機器4dは、サーバ機能付き通信機器探索処理(ステップS2503)において、サーバ機能探索要求の応答を受信しておらず(ステップS2504でNo)、かつ、新規にネットワークに接続されており、サーバ機能部/クライアント機能部406のサーバ機能が有効化されていない状態であるため(ステップS2505でYes)、一定時間下位のサブネットワークからのサーバ機能探索要求の受信を待つ。しかし、下位サブネットワークが存在しないため一定時間内にメッセージを受信しない(ステップS2506でNo、かつ、ステップS2507でYes)。そのため自身のサーバ機能を有効化するべきと判断し(ステップS2508)、適正判断によるサーバ機能切り替え処理を行う(ステップS2509)。適正判断によるサーバ機能切り替え処理(ステップS2509)においては、自身はサーバ機能を有効にするべき通信機器であると判断しているため(ステップS2000でYes)、自身のサーバ機能を有効化する(ステップS2003)。
When the
一方、サーバ機能をもたない通信機器5bは下位のルータに接続された通信機器からのサーバ機能探索要求の受信を含むメッセージの受信を常に待っている。”サーバ機能が有効である通信機器”のアドレスを推定する処理において、”サーバ機能が有効である通信機器”が特定のアドレス範囲を取るように制御される場合、かつ、同位ネットワークにサーバ機能付き通信機器が存在しない場合は、サーバ機能をもたない通信機器は定められたアドレス範囲にIPアドレスを変更してもよく、これにより、サーバ機能をもたない通信機器も下位サブネットワークに存在する通信機器からユニキャストで送信されるサーバ機能探索要求をサーバ機能付き通信機器と同様に受信可能となる。ルータ3dおよびサーバ機能付き通信機器4dがネットワークに接続されると、サーバ機能付き通信機器4dからのサーバ機能探索要求を受信し(ステップS2200でNo、かつ、ステップS2203でYes)、下位サブネットワーク存在判定処理(ステップS2204)を行う。下位サブネットワーク存在判定処理(ステップS2204)においては、受信したサーバ機能探索要求に含まれるルータの識別情報と自身が属するルータの識別情報とを比較する(ステップS2300)。自身が属するルータ3bのMACアドレス00−08−02−0A−DA−86と受信したパケットに含まれるルータの識別情報であるルータ3dのMACアドレス00−D0−59−67−7A−FEとは異なるため(ステップS2300でYes)、受信したサーバ機能探索要求のIPヘッダの送信元アドレスと、以前に受信し記憶部502に記憶したサーバ機能探索要求のIPヘッダの送信元アドレスとを比較する(ステップS2301)。現在サーバ機能を有効化しているサーバ機能付き通信機器4cには、定期的に上位サブネットワーク解析を行い上位サブネットワークのサーバ機能付き通信機器に対してサーバ機能探索要求を送信する機能が存在するため、サーバ機能をもたない通信機器5bの記憶部502には、サーバ機能付き通信機器4cが属しているルータ3cのMACアドレスおよび送信元アドレスが記憶されている。サーバ機能付き通信機器4cから受信したサーバ機能探索要求の送信元アドレスは192.168.3.10であり、サーバ機能付き通信機器4dから受信したサーバ機能探索要求の送信元アドレス192.168.3.20とは異なるため(ステップS2301でYes)、自身が属するルータの下位に複数の異なるルータが並列に接続されていることを検知し、サーバ機能を有効化した通信機器が上位または同位ネットワークに存在するかどうか判断する(ステップS2302)。現在サーバ機能を有効化しているサーバ機能付き通信機器は3cであり、自身が属するルータの下位に存在するルータに属しているため(ステップS2302でNo)、上位ルータ3aのネットワークおよび同位ネットワークに対し、自身が属するルータの下位に複数の異なるルータが並列に接続されている旨のネットワーク構成変更通知メッセージを送信する(ステップS2303)。
On the other hand, the
一方、ネットワーク構成変更通知を受信した(ステップS2500でYes、ステップS2501を実行し、ステップS1600でNo、かつステップS1602でNo、かつステップS1604でYes)サーバ機能付き通信機器4aは、いずれかの下位サブネットワークにおいて複数の異なるルータが並列に接続されたネットワーク構成が発見されたことを検知し、かつ、自身のサーバ機能は有効化されていないので(ステップS1605でNo)、サーバ機能を有効化した通信機器が上位または同位ネットワークに存在するかどうか判断する(ステップS1606)。現在サーバ機能を有効化しているサーバ機能付き通信機器は3cであり、自身が属するルータの下位に存在するルータに属しているため(ステップS1606でNo)、サーバ機能を有効化するべき通信機器を変更するべきと判断し(ステップS1607)、適正判断によるサーバ機能切り替え処理を行う(ステップS1608)。適正判断によるサーバ機能切り替え処理(ステップS1608)においては、上位ルータ3aに接続するサーバ機能付き通信機器4aはサーバ機能を有効化する通信機器を変更するべきと判断しており(ステップS200でNo、かつ、ステップS2001でNo、かつ、ステップS2002でYes)、かつ、上位サブネットワーク解析(ステップS1500)の結果からサーバ機能付き通信機器4aが接続されているルータ3aが最上位ルータであり、同位ネットワークにサーバ機能を有効化した通信機器が存在しないと判断されるため、同位ネットワークにのみサーバ機能の有効化を指示するサーバ機能切り替えメッセージを送信し(ステップS2005)、一定時間サーバ機能有効化応答の受信を待つ(ステップS2006)。ルータ3aは最上位ルータであり、同位ネットワークに他にサーバ機能付き通信機器も存在せず一定時間内にサーバ機能探索応答を受信しないため(ステップS2006でNo、かつ、ステップS2007でYes)、自身のサーバ機能を有効化し(ステップS2008)、現在サーバ機能を有効化しているサーバ機能付き通信機器4cおよび4dに対しサーバ機能の無効化を指示するサーバ機能切り替えメッセージを送信する(ステップS2009)。
On the other hand, the network configuration change notification is received (Yes in Step S2500, Step S2501 is executed, No in Step S1600, No in Step S1602, and Yes in Step S1604). Since it is detected that a network configuration in which a plurality of different routers are connected in parallel in the sub-network is found, and the server function is not activated (No in step S1605), the server function is activated. It is determined whether or not the communication device exists in the higher level or peer network (step S1606). Since the server-equipped communication device that currently activates the server function is 3c and belongs to a router that exists below the router to which it belongs (No in step S1606), the communication device that should activate the server function is selected. It is determined that it should be changed (step S1607), and server function switching processing based on appropriateness determination is performed (step S1608). In the server function switching process (step S1608) based on appropriateness determination, it is determined that the communication device with
一方、サーバ機能付き通信機器4aからサーバ機能の無効化を指示するサーバ機能切り替えメッセージを受信(ステップS2500でYes、ステップS2501を実行し、ステップS1600でNo、かつステップS1602でYes)したサーバ機能付き通信機器4cおよび4dは、メッセージ受信によるサーバ機能切り替え処理を行う(ステップS1603)。メッセージ受信によるサーバ機能切り替え処理(ステップS1603)においては、サーバ機能の無効化を指示するサーバ機能切り替えメッセージを受信しているため(ステップS1900でNo、かつ、ステップS1910でYes)、サービスを提供している通信機器に対し、交代するサーバ機能付き通信機器4aの情報を通知し(ステップS1911)、自身のサーバ機能を無効化する(ステップS1912)。
On the other hand, a server function switching message for instructing invalidation of the server function is received from the communication device with
なお、ルータ3dおよびサーバ機能をもたない通信機器5dが新規に接続された場合についても同様に、サーバ機能をもたない通信機器5bがサーバ機能をもたない通信機器5dによるサーバ機能探索要求を受信することで自身が属するルータの下位に複数の異なるルータが並列に接続されていることを検知してサーバ機能を有効化するべき通信機器を変更する。
Similarly, when the
なお、本実施の形態では、定期的に上位サブネットワーク解析を行うとして説明したが、ユーザが通信機器に信号を入力する入力手段を備え、前記入力手段の信号に応じて上位サブネットワーク解析を行ってもよい。 In the present embodiment, the upper subnetwork analysis is periodically performed. However, the user has input means for inputting a signal to the communication device, and the upper subnetwork analysis is performed according to the signal of the input means. May be.
本発明にかかる通信機器の交代方法、および通信機器は、1つ以上のルータにより構成されるローカルネットワークにおいて、ネットワーク構成が変化した際にサービスを供給する通信機器をより最適な通信機器に交代する方法等として有用である。本発明により通信機器はネットワーク構成に依存することなくサービスを受給することが可能となる。また、下位サブネットワーク存在判断手段は、ネットワーク構成を把握する用途にも応用できる。 A communication device replacement method and a communication device according to the present invention replace a communication device that supplies a service when a network configuration changes in a local network including one or more routers with a more optimal communication device. It is useful as a method. According to the present invention, a communication device can receive a service without depending on a network configuration. Further, the lower subnetwork presence determination means can be applied to the purpose of grasping the network configuration.
1 インターネット
2 宅内ネットワーク
3a,3b,3c,3d ルータ
4a,4b,4c,4d サーバ機能付き通信機器
5a,5b,5c,5d サーバ機能をもたない通信機器
400,500 通信I/F部
401,501 上位サブネットワーク判断部
402,502 記憶部
403 サーバ機能探索・応答部
404 サーバ適正判断部
405 サーバ機能切り替え部
406 サーバ機能部/クライアント機能部
503 サーバ機能探索部
506 クライアント機能部
1307,1407 下位サブネットワーク判断部
1
Claims (18)
前記ローカルネットワーク内の通信装置と前記外部ネットワークとの間に1つ以上のルータが存在し、
前記ローカルネットワークは前記1つ以上のルータにより1つ以上の異なるサブネットワークに区切られており、
前記ローカルネットワークのいずれかのルータに接続され、
前記ローカルネットワーク内の他の通信装置にサービスを提供する機能(サーバ機能)を有する通信装置であって、
前記ローカルネットワーク内に存在するサーバ機能を有する他の通信装置を発見するサーバ機能発見手段と、
少なくとも、前記サーバ機能発見手段の結果を用いてサーバ機能を有効にするべき通信装置を判断するサーバ機能適正判断手段と、
前記サーバ機能適正判断手段の結果、または、他の通信装置からのサーバ機能切り替えメッセージの受信により、サーバ機能の有効及び無効を切り替えるサーバ機能切り替え手段と、を備えるサーバ機能を有する通信装置。 In a local network connected to an external network,
One or more routers exist between the communication device in the local network and the external network;
The local network is divided into one or more different subnetworks by the one or more routers;
Connected to any router of the local network,
A communication device having a function (server function) for providing a service to another communication device in the local network,
Server function discovery means for discovering another communication device having a server function existing in the local network;
At least server function appropriateness determining means for determining a communication device that should validate the server function using the result of the server function finding means,
A communication device having a server function, comprising: a server function switching unit that switches between valid and invalid of a server function based on a result of the server function appropriateness determining unit or a server function switching message from another communication device.
前記ローカルネットワーク内に存在するサーバ機能を有する他の通信装置を探索するサーバ機能探索手段と、
サーバ機能を有する他の通信装置からサーバ機能探索用パケットを受信し、前記サーバ機能探索用パケットに対して応答パケットを送信する探索応答手段を備え
前記サーバ機能探索手段が、前記ローカルネットワーク内に存在するサーバ機能を有する他の通信装置宛にサーバ機能探索用パケットを送信し、
サーバ機能を有する他の通信装置からの応答パケットを受信する、
または
前記探索応答手段が、サーバ機能を有する他の通信装置からサーバ機能探索用パケットを受信する、
ことでサーバ機能を有する通信装置を発見する、
請求項1に記載のサーバ機能を有する通信装置。 The server function discovery means includes:
Server function search means for searching for another communication device having a server function existing in the local network;
A search response means for receiving a server function search packet from another communication device having a server function and transmitting a response packet to the server function search packet is provided. The server function search means exists in the local network. Send a server function search packet to another communication device having a server function to
Receiving a response packet from another communication device having a server function;
Or the search response means receives a server function search packet from another communication device having a server function.
To find a communication device having a server function,
A communication apparatus having the server function according to claim 1.
前記サーバ機能探索手段は、
前記上位サブネットワーク存在判断手段が記憶した1つ以上の前記第1のネットワークのアドレス範囲の情報を用いて、サーバ機能を有する通信装置が取りうるアドレスを得て、前記アドレス宛にサーバ機能探索用パケットを送信する、
請求項2に記載のサーバ機能を有する通信装置。 Obtaining LAN side address information or LAN side address information and WAN side address information of one or more routers among routers located between a router to which the communication device having the server function is connected and an external network, Using the acquired address information, further comprising a higher-level subnetwork presence determination means for estimating and storing a range of addresses that can be taken by a communication device connected to the first network to which the acquired address information belongs,
The server function search means includes
Using the information of the address range of one or more of the first networks stored by the upper subnetwork presence determination means, an address that can be taken by a communication device having a server function is obtained, and a server function search addressed to the address Send packets,
A communication apparatus having the server function according to claim 2.
サーバ機能を有する他の通信装置からサーバ機能探索用パケットを受信し、
前記サーバ機能適正判断手段が、自身はサーバ機能を有効にするべき通信装置であると判断している場合に、
請求項2に記載のサーバ機能を有する通信装置。 The search response means includes
Receive a server function search packet from another communication device having a server function,
When the server function appropriateness determining means determines that the server function is a communication device that should enable the server function,
A communication apparatus having the server function according to claim 2.
前記サーバ機能発見手段が、
前記サーバ機能を有する通信装置が接続されたルータまたは、前記サーバ機能を有する通信装置が接続されたルータと外部ネットワークとの間に存在する他のルータ(上位ルータ)に属するネットワークにおいて、
サーバ機能を有する他の通信装置を発見しなかった場合に、自身はサーバ機能を有効にするべき通信装置であると判断し、
サーバ機能を有する他の通信装置を発見した場合に、自身はサーバ機能を無効にするべき通信装置である、と判断する、
請求項1に記載のサーバ機能を有する通信装置。 The server function suitability determining means includes
The server function discovery means is
In a network that belongs to a router to which a communication device having the server function is connected or another router (upper router) that exists between a router to which the communication device having the server function is connected and an external network,
If no other communication device having the server function is found, the device itself determines that the communication device should enable the server function,
When another communication device having a server function is found, it determines that it is a communication device whose server function should be disabled.
A communication apparatus having the server function according to claim 1.
自身のサーバ機能を有効化から無効化に切り替える場合、
自身がサービスを提供している通信装置に、サーバ機能を交代する他の通信装置の情報を送信する、
請求項1に記載のサーバ機能を有する通信装置。 The server function switching means includes
If you switch your server function from enabled to disabled,
Send information of other communication devices that replace the server function to the communication device that is providing the service,
A communication apparatus having the server function according to claim 1.
自身のサーバ機能を無効化する場合、
サーバ機能を交代する他の通信装置に自身がサービスを提供している通信装置の情報を送信する、
請求項1に記載のサーバ機能を有する通信装置。 The server function switching means includes
When disabling its own server function,
Send information about the communication device that is providing the service to other communication devices that replace the server function.
A communication apparatus having the server function according to claim 1.
前記サーバ機能適正判断手段が自身はサーバ機能を有効にするべき通信装置であると判断した場合に、
前記サーバ機能発見手段が発見したサーバ機能を有する他の通信装置に、サーバ機能の無効化を指示するサーバ機能切り替えメッセージを送信し、
自身のサーバ機能が有効化されていなければ自身のサーバ機能を有効化し、
前記サーバ機能適正判断手段が自身はサーバ機能を無効にするべき通信装置であると判断した場合に、
自身のサーバ機能が有効化されていれば、
前記サーバ機能発見手段が発見したサーバ機能を有する他の通信装置に、サーバ機能の有効化を指示するサーバ機能切り替えメッセージを送信し、
自身のサーバ機能を無効化する、
請求項1に記載のサーバ機能を有する通信装置。 The server function switching means includes
When the server function appropriateness determining means determines that it is a communication device that should enable the server function,
A server function switching message for instructing invalidation of the server function is transmitted to another communication device having the server function discovered by the server function discovery unit;
If your server function is not enabled, enable your server function,
When the server function appropriateness determining means determines that it is a communication device that should invalidate the server function,
If your server function is enabled,
A server function switching message for instructing the activation of the server function is transmitted to another communication device having the server function discovered by the server function discovery means;
Disable its own server functionality,
A communication apparatus having the server function according to claim 1.
前記下位サブネットワーク存在判断手段は、
他の通信装置から受信するネットワーク構成変更通知メッセージを用いるか、
または、
ローカルネットワーク内の他の通信装置から受信するパケットに含まれる情報を用いて、
前記サーバ機能を有する通信装置が属するルータの下位に複数の異なるルータが並列に接続されていることを判断し、
前記サーバ機能適正判断手段は、
前記下位サブネットワーク存在判断手段の結果によりサーバ機能を有効にする通信装置を判断する、
請求項1に記載のサーバ機能を有する通信装置。 A lower subnetwork existence determination means for determining that a plurality of different routers are connected in parallel below a router to which the communication device having the server function belongs;
The lower subnetwork existence determination means includes:
Use a network configuration change notification message received from another communication device, or
Or
Using information contained in packets received from other communication devices in the local network,
It is determined that a plurality of different routers are connected in parallel below the router to which the communication device having the server function belongs,
The server function suitability determining means includes
Determining a communication device that enables a server function according to a result of the lower subnetwork presence determination means;
A communication apparatus having the server function according to claim 1.
前記下位サブネットワーク存在判断手段は、
少なくとも前記ローカルネットワーク内の他の通信装置から受信するパケットに含まれる前記ルータを識別可能な情報を比較することで、
前記サーバ機能を有する通信装置が属するルータの下位に複数の異なるルータが並列に接続されていることを判断する
請求項9に記載のサーバ機能を有する通信装置。 A packet received from another communication device in the local network includes information that can identify a router to which the other communication device in the local network is connected.
The lower subnetwork existence determination means includes:
By comparing at least information identifying the router included in a packet received from another communication device in the local network,
The communication device having a server function according to claim 9, wherein it is determined that a plurality of different routers are connected in parallel below a router to which the communication device having the server function belongs.
前記サーバ機能を有する通信装置が接続されたルータの識別情報と異なるルータの識別情報を含むパケットを複数受信し、
かつ、
受信した前記異なるルータの識別情報を含むパケットのIPヘッダに含まれる送信元アドレスが同一でない場合、
前記サーバ機能を有する通信装置が属するルータの下位に複数の異なるルータが並列に接続されていることを判断する
請求項10に記載のサーバ機能を有する通信装置。 The lower subnetwork existence determination means includes:
Receiving a plurality of packets containing router identification information different from the router identification information to which the communication device having the server function is connected;
And,
When the source address included in the IP header of the packet containing the received identification information of the different router is not the same,
The communication apparatus having a server function according to claim 10, wherein it is determined that a plurality of different routers are connected in parallel below a router to which the communication apparatus having the server function belongs.
前記サーバ機能発見手段が、
前記外部ネットワークに接続するローカルネットワークにおいて、
サーバ機能を有する他の通信装置を発見しなかった場合に、自身はサーバ機能を有効にするべき通信装置であると判断し、
サーバ機能を有する他の通信装置を発見した場合に、自身はサーバ機能を無効にするべき通信装置である、と判断する、
請求項9に記載のサーバ機能を有する通信装置。 The server function suitability determining means includes
The server function discovery means is
In a local network connected to the external network,
If no other communication device having the server function is found, the device itself determines that the communication device should enable the server function,
When another communication device having a server function is found, it determines that it is a communication device whose server function should be disabled.
A communication apparatus having the server function according to claim 9.
前記サーバ機能発見手段が、
前記サーバ機能を有する通信装置が属するルータの下位に、サーバ機能を有効化したサーバ機能を有する他の通信装置を発見しており、
かつ、
前記下位サブネットワーク存在判断手段が、
前記サーバ機能を有する通信装置が属するルータの下位に複数の異なるルータが並列に接続されていると判断した場合に、
サーバ機能を有効化する通信装置を変更すべきと判断する、
請求項9に記載のサーバ機能を有する通信装置。 The server function suitability determining means includes
The server function discovery means is
Under the router to which the communication device having the server function belongs, another communication device having a server function that enables the server function has been found,
And,
The lower subnetwork existence determination means includes
When it is determined that a plurality of different routers are connected in parallel below the router to which the communication device having the server function belongs,
Judge that the communication device that activates the server function should be changed,
A communication apparatus having the server function according to claim 9.
前記ローカルネットワーク内の通信装置と前記外部ネットワークとの間に1つ以上のルータが存在し、
前記ローカルネットワークは前記1つ以上のルータにより1つ以上の異なるサブネットワークに区切られており、
前記ローカルネットワークのいずれかのルータに接続され、
前記ローカルネットワーク内のサーバ機能を有する通信装置および、他の通信装置とメッセージ通信を行う通信装置であって、
前記サーバ機能を有する通信装置が接続されたルータと外部ネットワークとの間に位置するルータの内1つ以上のルータについて、LAN側ネットワークに接続される通信装置に設定することが可能なアドレスの範囲に関する情報を得て、記憶する上位サブネットワーク存在判断手段と、
前記通信装置が属するルータの下位に複数の異なるルータが並列に接続されていることを判断する下位サブネットワーク存在判断手段を備え、
前記ローカルネットワーク内の他の通信装置から受信するパケットには、前記ローカルネットワーク内の他の通信装置が接続されたルータを識別可能な情報が含まれ、
前記下位サブネットワーク存在判断手段は、
少なくとも前記ローカルネットワーク内の他の通信装置から受信するパケットに含まれる前記ルータを識別可能な情報を比較することで、
前記通信装置が属するルータの下位に複数の異なるルータが並列に接続されていることを判断する、
通信装置。 In a local network connected to an external network,
One or more routers exist between the communication device in the local network and the external network;
The local network is divided into one or more different subnetworks by the one or more routers;
Connected to any router of the local network,
A communication device having a server function in the local network, and a communication device that performs message communication with other communication devices,
Address range that can be set in the communication device connected to the LAN side network for one or more routers located between the router connected to the communication device having the server function and the external network An upper subnetwork existence determination means for obtaining and storing information on
Lower subnetwork existence determination means for determining that a plurality of different routers are connected in parallel below the router to which the communication device belongs,
A packet received from another communication device in the local network includes information that can identify a router to which the other communication device in the local network is connected.
The lower subnetwork existence determination means includes:
By comparing at least information identifying the router included in a packet received from another communication device in the local network,
Determining that a plurality of different routers are connected in parallel below the router to which the communication device belongs;
Communication device.
前記サーバ機能を有する通信装置が接続されたルータの識別情報と異なるルータの識別情報を含むパケットを複数受信し、
かつ、
受信した前記異なるルータの識別情報を含むパケットのIPヘッダに含まれる送信元アドレスが同一でない場合、
前記通信装置が属するルータの下位に複数の異なるルータが並列に接続されていることを判断する
請求項14に記載の通信装置。 The lower subnetwork existence determination means includes:
Receiving a plurality of packets containing router identification information different from the router identification information to which the communication device having the server function is connected;
And,
When the source address included in the IP header of the packet containing the received identification information of the different router is not the same,
The communication apparatus according to claim 14, wherein it is determined that a plurality of different routers are connected in parallel below a router to which the communication apparatus belongs.
前記通信装置が属するルータの下位に複数の異なるルータが並列に接続されていると判断した場合に、
前記上位サブネットワーク存在判断手段が記憶した1つ以上の前記第1のネットワークのアドレス範囲の情報を用いて、
前記通信装置が接続されたルータまたは、前記通信装置が接続されたルータと外部ネットワークとの間に存在する他のルータ(上位ルータ)に属するネットワークに対し、
ネットワーク構成変更通知メッセージを送信する、
請求項14に記載の通信装置。 The lower subnetwork existence determination means includes:
When it is determined that a plurality of different routers are connected in parallel below the router to which the communication device belongs,
Using the information of the address range of one or more of the first networks stored by the upper subnetwork presence determination means,
For a network that belongs to a router to which the communication device is connected or another router (upper router) that exists between the router to which the communication device is connected and an external network,
Send network configuration change notification messages,
The communication apparatus according to claim 14.
前記ローカルネットワーク内の通信装置と前記外部ネットワークとの間に1つ以上のルータが存在し、
前記ローカルネットワークは前記1つ以上のルータにより1つ以上の異なるサブネットワークに区切られており、
前記ローカルネットワークのいずれかのルータに接続され、
前記ローカルネットワーク内の他の通信装置にサービスを提供する機能(サーバ機能)を有する通信装置の交代方法であって、
前記ローカルネットワーク内に存在するサーバ機能を有する他の通信装置を発見するステップと、
サーバ機能を有効にするべき通信装置を判断するステップと、
サーバ機能の有効及び無効を切り替えるステップと、を備える、通信装置交代方法。 In a local network connected to an external network,
One or more routers exist between the communication device in the local network and the external network;
The local network is divided into one or more different subnetworks by the one or more routers;
Connected to any router of the local network,
A method of replacing a communication device having a function (server function) for providing a service to another communication device in the local network,
Discovering another communication device having a server function existing in the local network;
Determining a communication device for which the server function should be enabled;
And a step of switching between enabling and disabling the server function.
外部ネットワークに接続するローカルネットワークにおいて、
前記ローカルネットワーク内の通信装置と前記外部ネットワークとの間に1つ以上のルータが存在し、
前記ローカルネットワークは前記1つ以上のルータにより1つ以上の異なるサブネットワークに区切られており、
前記ローカルネットワークのいずれかのルータに接続され、
前記ローカルネットワーク内の他の通信装置にサービスを提供する機能(サーバ機能)を有する通信装置と、
前記ローカルネットワークのいずれかのルータに接続され、前記ローカルネットワーク内のサーバ機能を有する通信装置および、他の通信装置とメッセージ通信を行う通信装置とを備え、
前記サーバ機能を有する通信装置は、
前記ローカルネットワーク内に存在するサーバ機能を有する他の通信装置を発見するサーバ発見部と、
サーバ機能を有効にする通信装置を判断するサーバ適正判断部と、
サーバ機能の有効及び無効を切り替えるサーバ機能切り替え部と含む、
通信システム。 A communication system,
In a local network connected to an external network,
One or more routers exist between the communication device in the local network and the external network;
The local network is divided into one or more different subnetworks by the one or more routers;
Connected to any router of the local network,
A communication device having a function (server function) for providing a service to another communication device in the local network;
A communication device connected to any router of the local network and having a server function in the local network, and a communication device that performs message communication with other communication devices;
The communication device having the server function is:
A server discovery unit for discovering other communication devices having a server function existing in the local network;
A server suitability determination unit that determines a communication device that enables the server function;
Including a server function switching unit that switches between enabling and disabling the server function,
Communications system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006326598A JP2008140209A (en) | 2006-12-04 | 2006-12-04 | Communication device with switchable server function, and switching method therefor and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006326598A JP2008140209A (en) | 2006-12-04 | 2006-12-04 | Communication device with switchable server function, and switching method therefor and system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008140209A true JP2008140209A (en) | 2008-06-19 |
Family
ID=39601580
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006326598A Pending JP2008140209A (en) | 2006-12-04 | 2006-12-04 | Communication device with switchable server function, and switching method therefor and system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008140209A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012128190A1 (en) * | 2011-03-23 | 2012-09-27 | ソニー株式会社 | Information processing device and method, program, recording medium, and information processing system |
JP2015100074A (en) * | 2013-11-20 | 2015-05-28 | 株式会社リコー | Image projection device, and image processing apparatus |
-
2006
- 2006-12-04 JP JP2006326598A patent/JP2008140209A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2012128190A1 (en) * | 2011-03-23 | 2012-09-27 | ソニー株式会社 | Information processing device and method, program, recording medium, and information processing system |
CN103458979A (en) * | 2011-03-23 | 2013-12-18 | 索尼公司 | Information processing device and method, program, recording medium, and information processing system |
JP2015100074A (en) * | 2013-11-20 | 2015-05-28 | 株式会社リコー | Image projection device, and image processing apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11075802B2 (en) | Methods for dynamic router configuration in a mesh network | |
US8457014B2 (en) | Method for configuring control tunnel and direct tunnel in IPv4 network-based IPv6 service providing system | |
JP4327852B2 (en) | COMMUNICATION DEVICE, COMMUNICATION SETTING METHOD, COMMUNICATION SETTING PROGRAM, AND RECORDING MEDIUM CONTAINING COMMUNICATION SETTING PROGRAM | |
KR100975046B1 (en) | A system and method for self propagating information in ad-hoc peer-to-peer networks | |
Ravindran et al. | Information-centric networking based homenet | |
EP3656095B1 (en) | Method and system for communicating between private mesh network and public network | |
EP3025453B1 (en) | Probe routing in a network | |
US20100332605A1 (en) | Mesh network bridge routing | |
CN112654049B (en) | Method, system, node and medium for configuring a wireless communication coverage extension system | |
JP2009038653A (en) | Radio communications terminal unit and telecommunication network program | |
JPWO2007114251A1 (en) | Communication device, method executed by communication device, and storage medium storing software implementing the method | |
JP2018061267A (en) | Probe routing of network | |
KR100785482B1 (en) | Method and apparatus for discoverying component in at least one of sub-network | |
US11683275B2 (en) | Device and method for interconnecting two subnetworks | |
JP2008140209A (en) | Communication device with switchable server function, and switching method therefor and system | |
KR20120072060A (en) | Apparatus, system and method for managing node based on network lacked continuous network connectivity | |
CN113810288B (en) | Message backhaul method and device | |
WO2008069504A1 (en) | Method for configuring control tunnel and direct tunnel in ipv4 network-based ipv6 service providing system | |
JP2004080671A (en) | Autonomous communication path decision method, information terminal and server using the same, autonomous communication path decision program and record medium therefor | |
CN105472060B (en) | A kind of node identifier generation method of Kademlia network | |
CN101753419A (en) | Send method, equipment and the multi-address space mobile network of data, forwarding data | |
Khalid et al. | Design and Implementation of ID based MANET Auto-configuration Protocol | |
JP2005340983A (en) | Hierarchical network and configuration method thereof, and apparatus | |
Baccelli et al. | IP Links in multihop ad hoc wireless networks? | |
Grajzer et al. | Neighbor Discovery++− a Scalable and Robust Address Auto-Configuration for Future Internet of Things Networks |