JP2017005516A - Communication device, control method for the same, and computer program - Google Patents

Communication device, control method for the same, and computer program Download PDF

Info

Publication number
JP2017005516A
JP2017005516A JP2015117778A JP2015117778A JP2017005516A JP 2017005516 A JP2017005516 A JP 2017005516A JP 2015117778 A JP2015117778 A JP 2015117778A JP 2015117778 A JP2015117778 A JP 2015117778A JP 2017005516 A JP2017005516 A JP 2017005516A
Authority
JP
Japan
Prior art keywords
communication
packet
communication device
communication interface
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.)
Granted
Application number
JP2015117778A
Other languages
Japanese (ja)
Other versions
JP6470640B2 (en
Inventor
佐々木 章友
Akitomo Sasaki
章友 佐々木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2015117778A priority Critical patent/JP6470640B2/en
Publication of JP2017005516A publication Critical patent/JP2017005516A/en
Application granted granted Critical
Publication of JP6470640B2 publication Critical patent/JP6470640B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a technique in which a device having a plurality of communication interfaces can appropriately select a communication interface.SOLUTION: A communication device: associates a communication interface with a network identifier which identifies a network to store them in a storage section; determines whether the association between the first communication interface with the network identifier which other communication device belongs is stored in the storage section, when receiving a packet from the other communication device through the first communication interface; associates the first communication interface with the identification information for identifying the other communication device to register them in the storage section, when it is determined that the association is not held in the storage section; and transmits the packet to the other communication device through the first communication interface, on the basis of the registered association.SELECTED DRAWING: Figure 7

Description

本発明は、ネットワークを介して所定のプロトコルにて通信を行う、通信装置及びその制御方法、コンピュータプログラムに関する。   The present invention relates to a communication apparatus, a control method therefor, and a computer program that perform communication using a predetermined protocol via a network.

複数の通信インタフェースを備えた通信機器が、通信に使用する通信インタフェースを選択する構成が知られている。例えば、特許文献1には、機器が複数の通信インタフェースを持つ場合、通信インタフェースの使用頻度を管理し、使用頻度の低い通信インタフェースを選択する構成が記載されている。   A configuration in which a communication device having a plurality of communication interfaces selects a communication interface to be used for communication is known. For example, Patent Document 1 describes a configuration in which when a device has a plurality of communication interfaces, the use frequency of the communication interface is managed and a communication interface with a low use frequency is selected.

特許文献2には、機器が複数の通信インタフェースを持つ場合、通信インタフェースに対応付けられた誘引力に応じて、通信インタフェースの選択を行う構成が記載されている。ここで、誘因力とは、伝送経路における通信トラフィック量を反映したパラメータであり、トラフィック量が大きいほど大きな値をとる。   Patent Document 2 describes a configuration in which, when a device has a plurality of communication interfaces, a communication interface is selected according to the attractive force associated with the communication interface. Here, the incentive is a parameter reflecting the amount of communication traffic in the transmission path, and takes a larger value as the traffic amount increases.

特開平7−202943号公報JP 7-202943 A 特開2010-206467号公報JP 2010-206467 A

しかし、上記従来の構成においては、通信機器が同一のネットワークアドレスが割り当てられた複数のネットワークに接続されている場合、この通信機器は、ネットワークを適切に選択して通信することができなかった。   However, in the above-described conventional configuration, when a communication device is connected to a plurality of networks to which the same network address is assigned, the communication device cannot appropriately select a network and perform communication.

例えば、通信機器が2つのネットワークに接続しており、これらのネットワークのネットワークマスク長が24で、ネットワークアドレスが192.168.1.0である場合を考える。この場合、通信機器が192.168.1.154へパケットを送信するときは、宛先に対応するルーティングエントリが複数存在することになるため、どちらが選択されるかは実装に依存することとなる。そのため、一方のネットワーク上の端末から送信された要求パケットに通信機器が応答する場合に、この端末が存在しないルーティングエントリが選択されたときは、この機器にパケットを返信することができない。   For example, consider a case where a communication device is connected to two networks, the network mask length of these networks is 24, and the network address is 192.168.1.0. In this case, when the communication device transmits a packet to 192.168.1.154, there are a plurality of routing entries corresponding to the destination, and which one is selected depends on the implementation. Therefore, when a communication device responds to a request packet transmitted from a terminal on one network, if a routing entry that does not have this terminal is selected, the packet cannot be returned to this device.

このように、従来の構成においては、通信機器が同一のネットワークアドレスを有する複数のネットワークに接続している場合、通信機器は、一方のネットワークからの要求パケットに対して応答できない可能性があった。   Thus, in the conventional configuration, when a communication device is connected to a plurality of networks having the same network address, the communication device may not be able to respond to a request packet from one network. .

本発明は上記課題に鑑みなされたものであり、複数の通信インタフェースを備えた装置が、通信インタフェースを適切に選択可能とする技術を提供することを目的とする。   The present invention has been made in view of the above-described problems, and an object of the present invention is to provide a technique that enables an apparatus including a plurality of communication interfaces to appropriately select a communication interface.

上記目的を達成するため、本発明による通信装置は以下の構成を備える。即ち、複数の通信インタフェースを有する通信装置であって、通信インタフェースとネットワークを識別するネットワーク識別子とを対応付けて記憶部に保持させる保持手段と、他の通信装置から第1の通信インタフェースを介してパケットを受信した場合に、前記第1の通信インタフェースと前記他の通信装置が属するネットワーク識別子との対応付けが前記記憶部に保持されているかを判定する判定手段と、前記判定手段により前記対応付けが前記記憶部に保持されていないと判定された場合、前記第1の通信インタフェースと前記他の通信装置を識別する識別情報とを対応付けて前記記憶部に登録する登録手段と、前記登録手段により登録された前記対応付けに基づいて、前記第1の通信インタフェースを介して前記他の通信装置にパケットを送信する送信手段と、を有する。   In order to achieve the above object, a communication apparatus according to the present invention comprises the following arrangement. That is, a communication device having a plurality of communication interfaces, a holding unit that associates a communication interface with a network identifier for identifying a network, and stores them in a storage unit, and another communication device via a first communication interface A determination unit that determines whether a correspondence between the first communication interface and the network identifier to which the other communication device belongs is held in the storage unit when the packet is received; and the association by the determination unit Is registered in the storage unit in association with the first communication interface and identification information for identifying the other communication device, and the registration unit On the basis of the association registered by the second communication device to the other communication device via the first communication interface. It has a transmission means for transmitting the dot and.

また、本発明の別の側面の通信装置は、複数の通信インタフェースを有する通信装置であって、通信インタフェースとネットワークを識別するネットワーク識別子とを対応付けて記憶部に保持させる保持手段と、他の通信装置から第1の通信インタフェースを介してパケットを受信した場合に、前記他の通信装置が属するネットワーク識別子と前記第1の通信インタフェースとは異なる第2の通信インタフェースとが対応付けられている場合、前記第1の通信インタフェースと前記他の通信装置を識別する識別情報とを対応付けて前記記憶部に登録する登録手段と、前記登録手段により登録された前記対応付けに基づいて、前記第1の通信インタフェースを介して前記他の通信装置にパケットを送信する送信手段と、を有する。   Further, a communication device according to another aspect of the present invention is a communication device having a plurality of communication interfaces, a holding unit that holds the communication interface and a network identifier for identifying a network in association with each other, When a packet is received from a communication device via a first communication interface, a network identifier to which the other communication device belongs is associated with a second communication interface different from the first communication interface Registration means for registering the first communication interface and identification information for identifying the other communication device in association with each other in the storage unit, and the first registration based on the association registered by the registration means. Transmitting means for transmitting a packet to the other communication device via the communication interface.

また、本発明の別の側面の通信装置は、複数の通信インタフェースを有する通信装置であって、前記複数の通信インタフェースのいずれかを介してパケットを受信した場合、該パケットを受信した通信インタフェースを記憶する記憶手段と、前記記憶手段により記憶された前記通信インタフェースを介して、当該パケットに対する応答パケットを送信する送信手段と、を有する。   A communication apparatus according to another aspect of the present invention is a communication apparatus having a plurality of communication interfaces. When a packet is received via any of the plurality of communication interfaces, the communication interface that has received the packet is Storage means for storing, and transmission means for transmitting a response packet to the packet via the communication interface stored by the storage means.

本発明によれば、複数の通信インタフェースを備えた装置が、通信インタフェースを適切に選択可能とする技術を提供することができる。   According to the present invention, it is possible to provide a technique that enables a device including a plurality of communication interfaces to appropriately select a communication interface.

通信システムのネットワーク構成例を示すネットワークトポロジ図Network topology diagram showing network configuration example of communication system 通信装置が保持するルーティングテーブルの一例を示す図The figure which shows an example of the routing table which a communication apparatus hold | maintains 通信システムのネットワーク構成例を示すネットワークトポロジ図Network topology diagram showing network configuration example of communication system 通信装置が保持するルーティングテーブルの一例を示す図The figure which shows an example of the routing table which a communication apparatus hold | maintains 通信システムのネットワーク構成例を示すネットワークトポロジ図Network topology diagram showing network configuration example of communication system 通信装置が保持するルーティングテーブルの一例を示す図The figure which shows an example of the routing table which a communication apparatus hold | maintains 通信装置の構成例を示すブロック図Block diagram showing a configuration example of a communication device 通信装置が保持するルーティングテーブルの一例を示す図The figure which shows an example of the routing table which a communication apparatus hold | maintains 通信装置が実行する処理の処理手順を示すフローチャートThe flowchart which shows the process sequence of the process which a communication apparatus performs 通信装置が保持するルーティングテーブルの一例を示す図The figure which shows an example of the routing table which a communication apparatus hold | maintains 通信システムのネットワーク構成例を示すネットワークトポロジ図Network topology diagram showing network configuration example of communication system 通信装置が保持するルーティングテーブルの一例を示す図The figure which shows an example of the routing table which a communication apparatus hold | maintains 通信装置が実行する処理の処理手順を示すフローチャートThe flowchart which shows the process sequence of the process which a communication apparatus performs 通信装置が実行する処理の処理手順を示すフローチャートThe flowchart which shows the process sequence of the process which a communication apparatus performs 通信装置が保持するルーティングテーブルの一例を示す図The figure which shows an example of the routing table which a communication apparatus hold | maintains コネクション切断の際の処理の処理手順を示すフローチャートFlow chart showing the processing procedure for disconnection

以下、添付図面を参照して本発明の実施の形態を詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

<<実施形態1>>
(ルーティング)
インターネット通信では、一般に、IP(Internet Protocol、インターネットプロトコル)プロトコルが使用されている。また、インターネット通信では、パケットを送信する際、送信する通信インタフェース(ネットワークI/F)を決定するために、ルーティングテーブルが使用されている。ルーティングテーブルとは、機器から送信するパケットの経路を示すテーブルである。送信するパケットをどの通信インタフェースから送信するか、直接相手に送信するのか、ルータを経由するのかなどを検索するために使用する。
<< Embodiment 1 >>
(routing)
In Internet communication, an IP (Internet Protocol) protocol is generally used. In Internet communication, when a packet is transmitted, a routing table is used to determine a communication interface (network I / F) to be transmitted. The routing table is a table indicating a route of a packet transmitted from the device. It is used to search from which communication interface the packet to be sent is sent, whether it is sent directly to the other party, or via a router.

ルーティングテーブルのエントリには、IPアドレス(宛先IPアドレス)、ゲートウェイIPアドレス(ゲートウェイアドレス)、ネットワークマスク長(サブネットマスク)、通信インタフェースなどの情報が含まれる。ルーティングを行う際は、まず、送信するパケットの宛先IPアドレスとルーティングテーブルのエントリのネットワークマスク長を用いて、ネットワークIPアドレスを求める。すなわち、宛先のIPアドレスの最上位ビットからマスク長のビットを切り出し、この切り出したビットに0を連結したものをネットワークIPアドレスとする。そして、このネットワークIPアドレスとルーティングテーブルのエントリのIPアドレスのネットワークアドレスとを比較する。一致したものが存在した場合、そのIPアドレスをルーティングの転送先として決定する。一致したものが複数存在した場合は、ネットワークマスク長が最も長いIPアドレスを転送先として決定する。   The entry of the routing table includes information such as an IP address (destination IP address), a gateway IP address (gateway address), a network mask length (subnet mask), and a communication interface. When routing is performed, first, a network IP address is obtained using the destination IP address of the packet to be transmitted and the network mask length of the entry in the routing table. That is, a mask length bit is extracted from the most significant bit of the destination IP address, and a network IP address is obtained by concatenating 0 to the extracted bit. Then, the network IP address is compared with the network address of the IP address of the routing table entry. If there is a match, the IP address is determined as a routing transfer destination. If there are a plurality of matches, the IP address with the longest network mask length is determined as the transfer destination.

なお、ルーティングテーブルのエントリにデフォルトエントリがある場合がある。これは、ルーティングテーブルの他のエントリのどれにも一致しなかった場合に転送先として決定されるエントリである。また、ルーティングテーブルにおいて、ルーティングの優先順位を示すメトリックが規定されている場合、ルーティングテーブルのエントリのIPアドレスと一致するものが複数存在したときは、その優先順位に従って転送先を決定する。   There may be a default entry in the routing table entry. This is an entry determined as a transfer destination when it does not match any of the other entries in the routing table. In addition, when a metric indicating the routing priority is defined in the routing table, when there are a plurality of items that match the IP address of the entry in the routing table, the transfer destination is determined according to the priority.

一例として、図1の通信装置(機器)1001がPC−A1003に送信する場合について説明する。通信装置1001には、図2のようなルーティングテーブル108が設定されているとする。PC−A1003のIPアドレスは192.168.1.30であり、ルーティングエントリ2012のネットワークマスク長が24ビットなので、そのマスクを適用したネットワークアドレスは192.168.1.0となる。192.168.1.0のネットワークアドレスは、ルーティングエントリ2012の宛先IPアドレスと一致する。ルーティングエントリ2012の通信インタフェースはネットワークAであり、また、ゲートウェイのIPアドレスが設定されていないので、送信する通信インタフェースはネットワークAである。したがって、通信装置1001は、ネットワークAを介して、PC−A1003へ直接送信することが分かる。   As an example, a case where the communication apparatus (device) 1001 in FIG. 1 transmits to the PC-A 1003 will be described. Assume that a routing table 108 as shown in FIG. 2 is set in the communication apparatus 1001. Since the IP address of the PC-A 1003 is 192.168.1.30 and the network mask length of the routing entry 2012 is 24 bits, the network address to which the mask is applied is 192.168.1.0. The network address of 192.168.1.0 matches the destination IP address of the routing entry 2012. The communication interface of the routing entry 2012 is the network A, and since the gateway IP address is not set, the communication interface to be transmitted is the network A. Therefore, it can be seen that the communication device 1001 transmits directly to the PC-A 1003 via the network A.

次に、図1の通信装置1001が、PC−B1002へ送信する場合について説明する。PC−BのIPアドレスは192.168.25.64であり、ルーティングエントリ2012のネットワークマスク長が24ビットなので、そのマスクを適用した宛先のネットワークアドレスは192.168.25.0となる。192.168.25.0のネットワークアドレスは、ルーティングエントリ2012の宛先IPアドレスと一致しない。そして、ルーティングテーブル108はデフォルトエントリ2013以外に他のエントリを持たないので、デフォルトエントリ2013が転送先として採用される。   Next, a case where the communication apparatus 1001 in FIG. 1 transmits to the PC-B 1002 will be described. Since the IP address of PC-B is 192.168.25.64 and the network mask length of the routing entry 2012 is 24 bits, the destination network address to which the mask is applied is 192.168.25.0. The network address of 192.168.25.0 does not match the destination IP address of the routing entry 2012. Since the routing table 108 has no other entries other than the default entry 2013, the default entry 2013 is adopted as the transfer destination.

ルーティングエントリ2013の通信インタフェースはネットワークAであり、ゲートウェイのIPアドレスが設定されている。このため、送信したいパケットをネットワークAからルータ1004に送信し、ルータ1004により中継されることになる。   The communication interface of the routing entry 2013 is the network A, and the gateway IP address is set. Therefore, the packet to be transmitted is transmitted from the network A to the router 1004 and relayed by the router 1004.

(複数の通信インタフェースを有する場合)
図3のように、モバイル端末1005が一時的に通信装置1001と直接ネットワーク接続し、通信する場合がある。この場合、通信装置1001は2つの通信インタフェースでネットワークAとネットワークCの2つのネットワークに同時に接続されることになる。このような場合、通信装置1001において、図4のようなルーティングテーブルが生成される。この場合も同様に、PC−A1003に送信する場合はPC−A1003のIPアドレス192.168.1.30から図4のルーティングエントリ2012が選択され、通信インタフェースはネットワークAが選択される。
(When there are multiple communication interfaces)
As shown in FIG. 3, the mobile terminal 1005 may temporarily communicate with the communication device 1001 via a direct network connection. In this case, the communication device 1001 is simultaneously connected to two networks of the network A and the network C through two communication interfaces. In such a case, a routing table as shown in FIG. Similarly, in this case, when transmitting to the PC-A 1003, the routing entry 2012 of FIG. 4 is selected from the IP address 192.168.1.30 of the PC-A 1003, and the network A is selected as the communication interface.

図3のPC−B1002に送信する場合には、PC−BのIPアドレス192.168.25.64から図4のルーティングエントリ2013が選択され、通信インタフェースはネットワークAが選択される。モバイル端末1005に送信する場合には、モバイル端末1005のIPアドレス172.23.43.154から図4のルーティングエントリ2017が選択され、通信インタフェースはネットワークCが選択される。   When transmitting to the PC-B 1002 in FIG. 3, the routing entry 2013 in FIG. 4 is selected from the IP address 192.168.25.64 of the PC-B, and the network A is selected as the communication interface. When transmitting to the mobile terminal 1005, the routing entry 2017 of FIG. 4 is selected from the IP address 172.23.43.154 of the mobile terminal 1005, and the network C is selected as the communication interface.

図5のように通信装置1001が複数の通信インタフェースに接続されているとする。この場合、通信装置1001に対して、ネットワークAとネットワークCで同じネットワークアドレスが割り当てられると、ルーティングテーブル108に同じ宛先アドレスのルーティングエントリが設定されてしまう(図6の2012、2014)。   Assume that the communication device 1001 is connected to a plurality of communication interfaces as shown in FIG. In this case, if the same network address is assigned to the communication device 1001 in the network A and the network C, routing entries having the same destination address are set in the routing table 108 (2012 and 2014 in FIG. 6).

例えば、192.168.1.154へパケットを送信する場合、図6のルーティングテーブル108のルーティングエントリのうち、ルーティングエントリ2012とルーティングエントリ2014とが一致する。ネットワークマスク長も24と同じであるので、どちらが選択されるかは実装依存となる。そのため、モバイル端末1005から送信された要求パケットに通信装置1001が応答する場合、ルーティングエントリ2014が選択されたときは、正しくモバイル端末1005に応答を送信できる。しかし、ルーティングエントリ2012が選択された場合は、モバイル端末1005宛の応答パケットがネットワークAから送信されてしまうことになる。このように、従来の構成においては、複数のネットワークに接続する通信装置1001は、パケットを送出すべきネットワークを適切に選択することができない可能性があった。   For example, when a packet is transmitted to 192.168.1.154, the routing entry 2012 and the routing entry 2014 match among the routing entries in the routing table 108 of FIG. Since the network mask length is also the same as 24, it is implementation-dependent which one is selected. Therefore, when the communication apparatus 1001 responds to the request packet transmitted from the mobile terminal 1005, when the routing entry 2014 is selected, the response can be correctly transmitted to the mobile terminal 1005. However, when the routing entry 2012 is selected, a response packet addressed to the mobile terminal 1005 is transmitted from the network A. As described above, in the conventional configuration, the communication device 1001 connected to a plurality of networks may not be able to appropriately select a network to which a packet is to be transmitted.

本実施形態に係る通信装置は、ネットワークを通じて要求データを受信した場合、その要求データの送信元アドレス(送信元の通信装置の識別情報)と要求データを受信した通信インタフェースとを対応付けてルーティングテーブルに登録する。これにより要求データに対して応答を行う際に、ルーティングテーブルを参照して、要求データを受信した通信インタフェースを選択して応答データを送信することができ、応答データを要求データの送信元へ到達させることが可能となる。   When the request data is received through the network, the communication device according to the present embodiment associates the transmission source address (identification information of the transmission source communication device) of the request data with the communication interface that has received the request data. Register with. As a result, when responding to the request data, the response data can be transmitted by selecting the communication interface that received the request data by referring to the routing table, and the response data reaches the source of the request data It becomes possible to make it.

(ネットワークトポロジ)
図5は、本発明の一実施形態(実施形態1)に係る通信システムのネットワーク構成を示すネットワークトポロジ図である。本実施形態では、通信装置(機器)1001が、PC−A1003、PC−B1002、ないし、モバイル端末1005と通信する場合を一例として説明する。
(Network topology)
FIG. 5 is a network topology diagram showing a network configuration of a communication system according to an embodiment (Embodiment 1) of the present invention. In this embodiment, a case where the communication apparatus (device) 1001 communicates with the PC-A 1003, the PC-B 1002, or the mobile terminal 1005 will be described as an example.

通信装置1001は複数の通信インタフェースを備えた通信機器である。通信装置1001は、ルーティングテーブルに従い通信インタフェースを選択してパケットを送出する。本実施形態では、通信装置1001は、ネットワークAとネットワークCとに接続している。PC−A1003は、ネットワークAに接続されたパーソナルコンピュータ(PC)である。1004はルータであり、ネットワークAとネットワークBとの間で必要に応じてパケットを中継する。PC−B1002はネットワークBに接続されたPCである。モバイル端末1005は、通信装置1001に一時的に接続されうる。   The communication device 1001 is a communication device provided with a plurality of communication interfaces. The communication device 1001 selects a communication interface according to the routing table and transmits a packet. In the present embodiment, the communication device 1001 is connected to the network A and the network C. The PC-A 1003 is a personal computer (PC) connected to the network A. A router 1004 relays packets between the network A and the network B as necessary. A PC-B 1002 is a PC connected to the network B. The mobile terminal 1005 can be temporarily connected to the communication device 1001.

図5の例では、ネットワークAとネットワークBは、Ethernet(登録商標)などの有線ネットワークで構成されている。ネットワークCは、通信装置1001とモバイル端末1005が接続された時のネットワークであり、無線LAN等の無線ネットワークにより実現される。   In the example of FIG. 5, the network A and the network B are configured by wired networks such as Ethernet (registered trademark). A network C is a network when the communication device 1001 and the mobile terminal 1005 are connected, and is realized by a wireless network such as a wireless LAN.

図5のように、通信装置1001は、ネットワークAにおいてはIPアドレス192.168.1.2が割り当てられ、ネットワークCにおいてはIPアドレス192.168.1.5が割り当てられている。モバイル端末1005は、ネットワークCにおいて、IPアドレス192.168.1.154が割り当てられている。PC−A1003は、ネットワークAにおいて、IPアドレス192.168.1.30が割り当てられている。ルータ1004は、ネットワークAにおいてはIPアドレス192.168.1.1が割り当てられ、ネットワークBにおいてはIPアドレス192.168.25.1が割り当てられている。PC−B1002は、ネットワークBにおいて、IPアドレス192.168.25.64が割り当てられている。   As shown in FIG. 5, the communication apparatus 1001 is assigned an IP address 192.168.1.2 in the network A and an IP address 192.168.1.5 in the network C. The mobile terminal 1005 is assigned an IP address 192.168.1.154 in the network C. The PC-A 1003 is assigned an IP address 192.168.1.30 in the network A. The router 1004 is assigned an IP address 192.168.1.1 in the network A and an IP address 192.168.25.1 in the network B. The PC-B 1002 is assigned the IP address 192.168.25.64 in the network B.

図1は、モバイル端末1005が接続されていない場合のネットワークトポロジ図である。図1では、図5と異なり、モバイル端末1005及びネットワークCが存在しない。   FIG. 1 is a network topology diagram when the mobile terminal 1005 is not connected. In FIG. 1, unlike FIG. 5, the mobile terminal 1005 and the network C do not exist.

(通信装置の構成)
図7は本実施形態に係る通信装置1001の構成例を示すブロック図である。通信装置1001は、例えば、パーソナルコンピュータ(PC)やタブレット端末、スマートフォン等の情報処理装置により実現される。
(Configuration of communication device)
FIG. 7 is a block diagram illustrating a configuration example of the communication apparatus 1001 according to the present embodiment. The communication device 1001 is realized by an information processing device such as a personal computer (PC), a tablet terminal, or a smartphone, for example.

102はCPU(Central Processing Unit、中央演算処理装置)である。CPU102は、オペレーティングシステム(OS)やアプリケーションプログラム等のコンピュータプログラムに基づいて他の構成要素と協働し、通信装置1001全体の動作を制御する。103はDRAM(書込み可能メモリ)であり、ワークメモリ(記憶部)として機能する。   Reference numeral 102 denotes a CPU (Central Processing Unit). The CPU 102 cooperates with other components based on a computer program such as an operating system (OS) or an application program, and controls the overall operation of the communication device 1001. Reference numeral 103 denotes a DRAM (writable memory), which functions as a work memory (storage unit).

104は有線LANモジュールであり、Ethernet(登録商標)110などの有線ネットワークを介した通信を行う通信部として機能する。有線LANモジュール104は、インタフェース(インタフェースAという)を介してEthernet(登録商標)110と接続されている。105は無線LANモジュールであり、無線ネットワークを介した無線通信を行う通信部として機能する。無線LANモジュール105は、インタフェース(インタフェースBという)を介してアンテナ111と接続されている。   Reference numeral 104 denotes a wired LAN module, which functions as a communication unit that performs communication via a wired network such as Ethernet (registered trademark) 110. The wired LAN module 104 is connected to the Ethernet (registered trademark) 110 via an interface (referred to as interface A). A wireless LAN module 105 functions as a communication unit that performs wireless communication via a wireless network. The wireless LAN module 105 is connected to the antenna 111 via an interface (referred to as interface B).

106は検索部(ルーティングテーブル検索部)であり、所定の条件に従い後述するルーティングテーブル108を検索(探索)する。107は設定部(ルーティングテーブル設定部)であり、ルーティングテーブル108に対して値を設定する。   Reference numeral 106 denotes a search unit (routing table search unit) that searches (searches) a routing table 108 to be described later according to a predetermined condition. Reference numeral 107 denotes a setting unit (routing table setting unit) that sets a value for the routing table 108.

108はルーティングテーブルであり、通信インタフェースとネットワークを識別するネットワークアドレス(ネットワーク識別子)との対応関係を少なくとも示すルーティングエントリを複数有する。ルーティングテーブル108は、図7の例では、DRAM103に配置・保持されている。ルーティングテーブルの具体例については後述する。なお、本ブロック図では、説明の容易のため、検索部106、設定部107が独立したブロックとして書かれているが、CPU102で実行されるプログラムにより実現してもよい。   Reference numeral 108 denotes a routing table, which has a plurality of routing entries indicating at least correspondence relationships between communication interfaces and network addresses (network identifiers) for identifying networks. The routing table 108 is disposed and held in the DRAM 103 in the example of FIG. A specific example of the routing table will be described later. In this block diagram, for ease of explanation, the search unit 106 and the setting unit 107 are written as independent blocks, but may be realized by a program executed by the CPU 102.

109はROM(読出し専用メモリ)であり、CPU102が実行するプログラムなどを格納する。111は無線LANのアンテナである。   Reference numeral 109 denotes a ROM (read only memory) that stores a program executed by the CPU 102. Reference numeral 111 denotes a wireless LAN antenna.

なお、本実施形態では、一例として、通信装置1001が、有線LANと無線LANの2つの通信方式により通信可能な場合を説明するが、通信装置1001が備える通信インタフェースはこれらに限られない。例えば、有線LANと無線LANのいずれか一方の通信インタフェースを複数設けるようにしてもよい。また、通信方式は、有線LANや無線LANに限られない。例えば、無線通信方式として、Bluetooth(登録商標)や、NFC(Near Field Communication)を用いるようにしてもよい。また、以上の各装置と同等の機能を実現するソフトウェアにより、ハードウェア装置の代替として構成することもできる。   In the present embodiment, as an example, a case in which the communication device 1001 can communicate by two communication methods of a wired LAN and a wireless LAN will be described, but the communication interface provided in the communication device 1001 is not limited to these. For example, a plurality of communication interfaces of either a wired LAN or a wireless LAN may be provided. The communication method is not limited to a wired LAN or a wireless LAN. For example, Bluetooth (registered trademark) or NFC (Near Field Communication) may be used as a wireless communication method. Moreover, it can also be comprised as an alternative of a hardware apparatus with the software which implement | achieves a function equivalent to the above each apparatus.

(ルーティングテーブル)
図8は、本実施形態の説明で使用するルーティングテーブル108の一例を示す図である。図8において、2012、2013、2015はルーティングテーブルのルーティングエントリである。ルーティングエントリ2012には、宛先IPアドレス192.168.1.0、マスク長 24、MTU(Maximum Transmission Unit) 1500、ネットワークAの通信インタフェースが設定されている。ルーティングエントリ2013には、宛先IPアドレスとしてデフォルト、ゲートウェイアドレス192.168.1.1、MTU 1500、ネットワークAの通信インタフェースが設定されている。ルーティングエントリ2015には、宛先IPアドレス192.168.1.154、マスク長 32、MTU 1500、ネットワークCの通信インタフェースが設定されている。
(Routing table)
FIG. 8 is a diagram illustrating an example of the routing table 108 used in the description of the present embodiment. In FIG. 8, 2012, 2013, and 2015 are routing entries of the routing table. In the routing entry 2012, a destination IP address 192.168.1.0, a mask length 24, an MTU (Maximum Transmission Unit) 1500, and a communication interface of the network A are set. In the routing entry 2013, default, gateway address 192.168.1.1, MTU 1500, and network A communication interface are set as destination IP addresses. In the routing entry 2015, the destination IP address 192.168.1.154, the mask length 32, the MTU 1500, and the communication interface of the network C are set.

図2は、モバイル端末1005が接続されていない場合のルーティングテーブルの図である。図2のルーティングテーブル108では、図8と異なり、ネットワークCに対応するルーティングエントリ2015が存在しない。   FIG. 2 is a diagram of a routing table when the mobile terminal 1005 is not connected. In the routing table 108 of FIG. 2, unlike FIG. 8, the routing entry 2015 corresponding to the network C does not exist.

(通信装置の動作)
通信装置1001の動作について、図1、図2、図5、図7、図8、図9を用いて説明する。図9は、本実施形態に係る通信装置1001の動作手順を表すフローチャートである。図9の各ステップは、通信装置1001のCPU102の制御に基づき実行される。
(Communication device operation)
The operation of the communication apparatus 1001 will be described with reference to FIGS. 1, 2, 5, 7, 8, and 9. FIG. 9 is a flowchart showing an operation procedure of the communication apparatus 1001 according to the present embodiment. Each step in FIG. 9 is executed based on the control of the CPU 102 of the communication apparatus 1001.

まず、図1のように、通信装置1001がネットワークAにのみ接続されているとする。この状態におけるルーティングテーブル108の構成は、図2のようになる。次に、モバイル端末1005が通信装置1001に接続し、通信装置1001とモバイル端末1005にIPアドレスが割り当てられ、図5に示すようにネットワークCが構成されたとする。これにより、通信装置1001は、ネットワークAとネットワークCに同時に接続される。図5に示すように、ネットワークAとネットワークCが同じネットワークアドレスで構成されたとする。この状態において、モバイル端末1005が通信装置1001にパケットを送信した場合の通信装置1001の動作について、図9のフローチャートに従い説明する。   First, it is assumed that the communication apparatus 1001 is connected only to the network A as shown in FIG. The configuration of the routing table 108 in this state is as shown in FIG. Next, it is assumed that the mobile terminal 1005 is connected to the communication device 1001, IP addresses are assigned to the communication device 1001 and the mobile terminal 1005, and the network C is configured as shown in FIG. As a result, the communication apparatus 1001 is simultaneously connected to the network A and the network C. As shown in FIG. 5, it is assumed that the network A and the network C are configured with the same network address. In this state, the operation of the communication apparatus 1001 when the mobile terminal 1005 transmits a packet to the communication apparatus 1001 will be described with reference to the flowchart of FIG.

通信装置1001は、パケットを受信すると(S201)、パケットの送信元アドレスをキーにルーティングテーブルを検索する(S202)。すなわち、S201、S202では、複数の通信インタフェースのいずれかを介してパケットを受信したことに応じて、当該パケットの送信元アドレスが属するネットワークに係るルーティングエントリを、ルーティングテーブルにおいて検索する。検索の結果、デフォルトエントリを除くルーティングエントリが発見されたか否かを判定する(S203)。発見された場合(S203でYES)はS204へ進み、発見されなかった場合(S203でNO)はS206へ進む。図5の例では、送信元アドレスは192.168.1.154であるから、図2のルーティングテーブル108においては、ルーティングエントリ2012がこの送信元アドレスに対応するエントリとして発見される。送信元アドレスの最上位ビットからマスク長の24ビットを切り出した192.168.1.0は、ルーティングエントリ2012の宛先IPアドレスに一致するためである。   Upon receiving the packet (S201), the communication device 1001 searches the routing table using the packet source address as a key (S202). That is, in S201 and S202, in response to receiving a packet via any of a plurality of communication interfaces, a routing entry related to the network to which the source address of the packet belongs is searched in the routing table. As a result of the search, it is determined whether a routing entry excluding the default entry has been found (S203). If found (YES in S203), the process proceeds to S204, and if not found (NO in S203), the process proceeds to S206. In the example of FIG. 5, since the source address is 192.168.1.154, the routing entry 2012 is found as an entry corresponding to this source address in the routing table 108 of FIG. This is because 192.168.1.0 obtained by extracting 24 bits of the mask length from the most significant bit of the transmission source address matches the destination IP address of the routing entry 2012.

S204では、パケットを受信した通信インタフェースと、S203で発見したルーティングテーブルエントリの通信インタフェースとを比較する。これらが同一である場合(S205でYES)はS207へ進み、異なる場合(S205でNO)はS206へ進む。上記の例では、図2のルーティングエントリ2012の通信インタフェースはネットワークAであるのに対し、受信したパケットの通信インタフェースはネットワークCであり、両者は異なる。そこで、S206へ進む。   In S204, the communication interface that received the packet is compared with the communication interface of the routing table entry found in S203. If they are the same (YES in S205), the process proceeds to S207, and if different (NO in S205), the process proceeds to S206. In the above example, the communication interface of the routing entry 2012 in FIG. 2 is the network A, whereas the communication interface of the received packet is the network C, and both are different. Therefore, the process proceeds to S206.

S206では、受信したパケットの送信元アドレスに対応するルーティングエントリをルーティングテーブル108に登録する。上記の例では、図8のように、ルーティングエントリ2015を登録する。なお、パケットの受信に応じてルーティングエントリを登録する場合、ネットワークアドレスでなく機器のIPアドレスそのもので比較できるように、ネットワークマスク長を32ビットとして登録する。このように、送信元が属するネットワークに係るルーティングエントリがルーティングテーブルにおいて発見されたものの、そのネットワークI/Fとパケットを受信したネットワークI/Fとが一致しない場合は新たなルーティングエントリを追加する。すなわち、パケットを受信した通信インタフェースと送信元アドレスとを対応付けたルーティングエントリを前記ルーティングテーブルに登録する。これにより、ルーティングテーブルを参照して、パケットを受信した通信インタフェースから、当該パケットに対する応答パケットを送出することが可能となる。   In S206, a routing entry corresponding to the source address of the received packet is registered in the routing table 108. In the above example, the routing entry 2015 is registered as shown in FIG. When a routing entry is registered in response to packet reception, the network mask length is registered as 32 bits so that the IP address itself of the device can be compared instead of the network address. As described above, when a routing entry related to the network to which the transmission source belongs is found in the routing table, but the network I / F does not match the network I / F that received the packet, a new routing entry is added. That is, a routing entry that associates the communication interface that received the packet with the source address is registered in the routing table. Thereby, referring to the routing table, it is possible to send a response packet to the packet from the communication interface that has received the packet.

次に、図8のようにルーティングエントリ2015が登録された後に、さらに、通信装置1001がモバイル端末1005のパケットを受信したの動作について、図9に従い説明する。   Next, after the routing entry 2015 is registered as shown in FIG. 8, the operation of the communication device 1001 receiving the packet of the mobile terminal 1005 will be described with reference to FIG.

S201でモバイル端末1005のパケットを受信すると、通信装置1001は、パケットの送信元アドレスをキーにルーティングテーブルを検索する(S202)。この例では、図8に示すルーティングエントリ2015が発見される(S203でYES)。   Upon receiving the packet of the mobile terminal 1005 in S201, the communication device 1001 searches the routing table using the packet source address as a key (S202). In this example, the routing entry 2015 shown in FIG. 8 is found (YES in S203).

そこで、S204へ進み、パケットを受信した通信インタフェースとルーティングエントリ2015の通信インタフェースを比較する。この例では通信インタフェースが同じなので(S205でYES)、ルーティングエントリを登録せずに、S207へ進んで受信処理を継続する。   In step S204, the communication interface that has received the packet is compared with the communication interface of the routing entry 2015. In this example, since the communication interfaces are the same (YES in S205), the routing entry is not registered, and the process proceeds to S207 to continue the reception process.

次に、図8のようにルーティングエントリ2015が登録された後に、通信装置1001がパケットをモバイル端末1005へ送信する際の通信インタフェースの選択について、図5と図8を用いて説明する。   Next, selection of a communication interface when the communication apparatus 1001 transmits a packet to the mobile terminal 1005 after the routing entry 2015 is registered as shown in FIG. 8 will be described with reference to FIGS.

前述のように、モバイル端末1005のIPアドレスは、192.168.1.154である。そして、図8のルーティングテーブル108は、2012、2013、2015と3つのルーティングエントリがある。ルーティングエントリ2012のネットワークマスク長は24ビットなので、ルーティングエントリ2012におけるモバイル端末1005が接続しているネットワークCのネットワークアドレスは、192.168.1.0である。アドレス192.168.1.0は、ルーティングエントリ2012の宛先IPアドレスの上位24ビットと一致する。続いてルーティングエントリ2015とも比較すると、このエントリのネットワークマスク長は32ビットなので、ルーティングエントリ2015におけるモバイル端末1005についてのネットワークアドレスは、192.168.1.154となる。このネットワークアドレスは、ルーティングエントリ2015の宛先IPアドレスと一致する。そして、ルーティングエントリ2012のネットワークマスク長が24ビット、ルーティングエントリ2015のネットワークマスク長が32ビットであるので、より長いビット長でビットが一致しているルーティングエントリ2015が選択される。ルーティングエントリ2015の通信インタフェースはネットワークCであり、ゲートウェイのIPアドレスが設定されていない。そのため、送信する通信インタフェースはネットワークCであり、モバイル端末1005に直接送信することが分かる。   As described above, the IP address of the mobile terminal 1005 is 192.168.1.154. The routing table 108 in FIG. 8 includes three routing entries 2012, 2013, and 2015. Since the network mask length of the routing entry 2012 is 24 bits, the network address of the network C to which the mobile terminal 1005 is connected in the routing entry 2012 is 192.168.1.0. The address 192.168.1.0 matches the upper 24 bits of the destination IP address of the routing entry 2012. Subsequently, when compared with the routing entry 2015, since the network mask length of this entry is 32 bits, the network address for the mobile terminal 1005 in the routing entry 2015 is 192.168.1.154. This network address matches the destination IP address of the routing entry 2015. Since the network mask length of the routing entry 2012 is 24 bits and the network mask length of the routing entry 2015 is 32 bits, the routing entry 2015 having a longer bit length and matching bits is selected. The communication interface of the routing entry 2015 is the network C, and the gateway IP address is not set. Therefore, it can be seen that the communication interface to be transmitted is the network C and is directly transmitted to the mobile terminal 1005.

次に、図8のようにルーティングエントリ2015が登録された後に、通信装置1001がPC−A1003へパケットを送信する場合の通信インタフェースの選択について説明する。   Next, selection of a communication interface when the communication apparatus 1001 transmits a packet to the PC-A 1003 after the routing entry 2015 is registered as illustrated in FIG. 8 will be described.

PC−A1003のIPアドレスは、192.168.1.30である。ルーティングエントリ2012との比較では、PC−A1003が接続しているネットワークAのネットワークアドレスが192.168.1.0であるから、ルーティングエントリ2012の宛先アドレスは192.168.1.0で一致する。ルーティングエントリ2015との比較では、PC−A1003についてのネットワークアドレスが192.168.1.30であるから、これはルーティングエントリ2015の宛先アドレス192.168.1.154と一致しない。そのため、ルーティングエントリ2012が選択され、通信インタフェースはネットワークAが選択される。   The IP address of the PC-A 1003 is 192.168.1.30. In comparison with the routing entry 2012, since the network address of the network A to which the PC-A 1003 is connected is 192.168.1.0, the destination address of the routing entry 2012 matches with 192.168.1.0. . In comparison with the routing entry 2015, since the network address for the PC-A 1003 is 192.168.1.30, this does not match the destination address 192.168.1.154 of the routing entry 2015. Therefore, the routing entry 2012 is selected, and the network A is selected as the communication interface.

上記のように、通信装置1001は、パケットを受信した際に、パケットの送信元IPアドレスからルーティングテーブルを検索する。該当するルーティングエントリが存在した場合は、そのルーティングエントリの通信インタフェースとパケットを受信した通信インタフェースとを比較する。比較した結果、これらの通信インタフェースが異なる場合、受信したパケットの送信元IPアドレスをルーティングテーブルのエントリとして登録する。このように通信装置1001において、送信元IPアドレスと通信インタフェースとが関連付けられてルーティングテーブルに登録されるため、パケットを受信した通信インタフェースから、応答パケットを送信できるようになる。   As described above, when the communication device 1001 receives a packet, the communication device 1001 searches the routing table from the source IP address of the packet. When the corresponding routing entry exists, the communication interface of the routing entry is compared with the communication interface that has received the packet. As a result of comparison, if these communication interfaces are different, the source IP address of the received packet is registered as an entry in the routing table. In this way, in the communication device 1001, the transmission source IP address and the communication interface are associated with each other and registered in the routing table, so that a response packet can be transmitted from the communication interface that has received the packet.

また、パケットを受信した際に、パケットの送信元IPアドレスからルーティングテーブルを検索し、該当するルーティングエントリが見つからなかった場合は、送信元IPアドレス宛のルーティングテーブルのエントリを登録する。このように、パケットの送信元IPアドレスに対応するルーティングエントリがルーティングテーブルに登録されていない場合においても、送信元IPアドレスと通信インタフェースとが関連付けられてルーティングテーブルに登録される。したがって、送信相手が送信したパケットを受信した通信インタフェースから、送信できるようになる。   When a packet is received, the routing table is searched from the source IP address of the packet, and if no corresponding routing entry is found, an entry in the routing table addressed to the source IP address is registered. Thus, even when the routing entry corresponding to the source IP address of the packet is not registered in the routing table, the source IP address and the communication interface are associated and registered in the routing table. Therefore, it is possible to transmit from the communication interface that has received the packet transmitted by the transmission partner.

次に、図3に示すように、ネットワークA、ネットワークB、ネットワークCのネットワークアドレスが全てが異なる場合の動作例について、図2、図3、図9、図10を用いて説明する。この状態において、通信装置1001のルーティングテーブル108は、図2のように、ネットワークCについてのルーティングエントリが登録されておらず、モバイル端末1005が通信装置1001にパケットを送信したとする。通信装置1001は、パケットを受信すると(図9のS201)、パケットの送信元アドレスをキーにルーティングテーブルを検索する(S202)。図2のルーティングテーブル108ではデフォルトエントリを除くルーティングエントリが発見されないので(S203でNO)、図10のルーティングエントリ2020を登録する(S206)。すなわち、検索の結果、送信元が属するネットワークに係るルーティングエントリが発見されなかったときは、パケットを受信した通信インタフェースと送信元アドレスとを対応付けたルーティングエントリをルーティングテーブルに登録する。これにより、以後、ネットワークCを経由して、モバイル端末1005に対してパケットを送信することが可能となる。   Next, as shown in FIG. 3, an operation example when the network addresses of the network A, the network B, and the network C are all different will be described with reference to FIG. 2, FIG. 3, FIG. 9, and FIG. In this state, it is assumed that the routing table 108 of the communication device 1001 has no registered routing entry for the network C and the mobile terminal 1005 transmits a packet to the communication device 1001 as shown in FIG. When receiving the packet (S201 in FIG. 9), the communication device 1001 searches the routing table using the packet source address as a key (S202). Since no routing entry other than the default entry is found in the routing table 108 of FIG. 2 (NO in S203), the routing entry 2020 of FIG. 10 is registered (S206). That is, as a result of the search, when a routing entry related to the network to which the transmission source belongs is not found, a routing entry that associates the communication interface that received the packet with the transmission source address is registered in the routing table. As a result, the packet can be transmitted to the mobile terminal 1005 via the network C thereafter.

次に、図11のように、ネットワークBとネットワークCのネットワークアドレスが同一の場合に、通信装置1001が、モバイル端末1005へパケットを送信する際の通信インタフェースの選択について、図11と図12を用いて説明する。図11の例では、モバイル端末1005のIPアドレスは、192.168.25.154である。また、この例では、通信装置1001は、図12に示されるルーティングテーブル108を保持している。この場合、ルーティングエントリ2012との比較では、モバイル端末1005が接続しているネットワークCのネットワークアドレス192.168.25.0は、このエントリの宛先アドレス192.168.1.0と一致しない。ルーティングエントリ2016との比較では、モバイル端末1005についてのネットワークアドレス192.168.25.154は、このエントリの宛先アドレス192.168.25.154と一致する。そのため、ルーティングエントリ2016が選択され、通信インタフェースはネットワークCが選択される。よって、図11のように、ネットワークBとネットワークCのネットワークアドレスが同一の場合であっても、ネットワークCを経由して、モバイル端末1005に対してパケットを送信することが可能となる。   Next, as shown in FIG. 11, when the network addresses of the network B and the network C are the same, the communication device 1001 selects a communication interface when transmitting a packet to the mobile terminal 1005 as shown in FIGS. It explains using. In the example of FIG. 11, the IP address of the mobile terminal 1005 is 192.168.25.154. In this example, the communication apparatus 1001 holds the routing table 108 shown in FIG. In this case, in comparison with the routing entry 2012, the network address 192.168.25.0 of the network C to which the mobile terminal 1005 is connected does not match the destination address 192.168.1.0 of this entry. In comparison with the routing entry 2016, the network address 192.168.25.154 for the mobile terminal 1005 matches the destination address 192.168.25.154 of this entry. Therefore, the routing entry 2016 is selected, and the network C is selected as the communication interface. Therefore, as shown in FIG. 11, even if the network addresses of the network B and the network C are the same, the packet can be transmitted to the mobile terminal 1005 via the network C.

次に、図11のように、ネットワークBとネットワークCのネットワークアドレスが同一の場合に、通信装置1001がPC−B1002へパケットを送信する際の通信インタフェースの選択について、図11と図12を用いて説明する。図11の例では、PC−B1002のIPアドレスは、192.168.25.64である。ルーティングエントリ2012との比較では、PC−B1002のネットワークアドレス192.168.25.0は、このエントリの宛先アドレス192.168.1.0と一致しない。ルーティングエントリ2016との比較でも、PC−B1002のネットワークアドレスは、このエントリの宛先アドレス192.168.25.154と一致しない。そして、他に一致するルーティングエントリもないため、デフォルトルーティングエントリ2013が選択され、送信するパケットをネットワークAに接続されているルータ1004へ送信し、ルータ1004がパケットを中継することになる。したがって、PC−B1002へパケットを到達することが可能である。   Next, as shown in FIG. 11, when the network addresses of the network B and the network C are the same, the selection of the communication interface when the communication device 1001 transmits a packet to the PC-B 1002 will be described with reference to FIGS. I will explain. In the example of FIG. 11, the IP address of the PC-B 1002 is 192.168.25.64. In comparison with the routing entry 2012, the network address 192.168.25.0 of the PC-B 1002 does not match the destination address 192.168.1.0 of this entry. Even in comparison with the routing entry 2016, the network address of the PC-B 1002 does not match the destination address 192.168.25.154 of this entry. Since there is no other matching routing entry, the default routing entry 2013 is selected, the packet to be transmitted is transmitted to the router 1004 connected to the network A, and the router 1004 relays the packet. Therefore, it is possible to reach the packet to the PC-B 1002.

以上のように、通信装置1001は、パケットを受信した際に、パケットの送信元IPアドレスからルーティングテーブルを検索する。該当するルーティングエントリが存在する場合、そのルーティングエントリの通信インタフェースとパケットを受信した通信インタフェースを比較する。比較の結果、通信インタフェースが異なる場合は、通信装置1001は、送信元IPアドレス宛のルーティングテーブルのエントリを登録する。これにより、ルータを越えた先のネットワークと、受信したパケットの送信元IPアドレスのネットワークアドレスが同一になる場合でも、通信装置1001は、パケットを受信した通信インタフェースから、応答パケットを送信することができる。   As described above, when receiving a packet, the communication device 1001 searches the routing table from the source IP address of the packet. When the corresponding routing entry exists, the communication interface of the routing entry is compared with the communication interface that has received the packet. If the communication interfaces are different as a result of the comparison, the communication apparatus 1001 registers an entry in the routing table addressed to the source IP address. Thus, even when the network beyond the router and the network address of the source IP address of the received packet are the same, the communication device 1001 can transmit a response packet from the communication interface that has received the packet. it can.

<<実施形態2>>
本実施形態では、受信したパケットに対する応答の要否を判別し、応答が必要な場合にのみルーティングエントリの登録を行うことで、不必要なルーティングテーブルの更新を行わない構成を説明する。本実施形態に係る通信装置1001の動作について、図1、図2、図5、図8、図13を用いて説明する。図13は、本実施形態に係る通信装置1001の動作手順を表すフローチャートである。図13の各ステップは、通信装置1001のCPU102の制御に基づき実行される。
<< Embodiment 2 >>
In the present embodiment, a configuration will be described in which whether or not a response to a received packet is necessary is determined and a routing entry is registered only when a response is necessary, so that an unnecessary routing table is not updated. The operation of the communication apparatus 1001 according to the present embodiment will be described with reference to FIGS. 1, 2, 5, 8, and 13. FIG. FIG. 13 is a flowchart showing an operation procedure of the communication apparatus 1001 according to the present embodiment. Each step of FIG. 13 is executed based on the control of the CPU 102 of the communication apparatus 1001.

まず、図1のように、通信装置1001がネットワークAにのみ接続されているとする。この状態におけるルーティングテーブル108の構成は、図2のようになっている。次に、モバイル端末1005が接続し、モバイル端末1005にIPアドレスが割り当てられ、図5に示すようにネットワークCが構成されたとする。これにより、通信装置1001は、ネットワークAとネットワークCに同時に接続される。   First, it is assumed that the communication apparatus 1001 is connected only to the network A as shown in FIG. The configuration of the routing table 108 in this state is as shown in FIG. Next, it is assumed that the mobile terminal 1005 is connected, an IP address is assigned to the mobile terminal 1005, and the network C is configured as shown in FIG. As a result, the communication apparatus 1001 is simultaneously connected to the network A and the network C.

そして、図5に示すように、ネットワークAとネットワークCが同じネットワークアドレス(192.168.1.0)で構成されたとする。機器1001がパケットを受信すると(図13のS1601)、S1602において要求パケットかどうか調べる。ここでいう要求パケットとは、要求パケットの送信側が受信側に対して応答を要求するパケットである。要求パケットの例としては、TCPの接続要求であるTCP SYNパケット、ICMP Echoパケットなどがある。TCPのSYNパケットを受信した場合、TCP SYN ACKパケットを応答することで接続の受け付けることを通知する。ICMP Echoパケットの受信した場合は、ICMP Echo Replyパケットを送信する。このようにして、S1602では、受信したパケットに対して応答をする必要があるか否かを判定する。応答が必要な場合、すなわち、受信したパケットが要求パケットである場合(S1602でYES)はS1603へ進む。必要でない場合、すなわち、要求パケットでない場合(S1602でNO)はS1608へ進み、ルーティングテーブルの登録・更新を行わずに、受信処理を継続する。   As shown in FIG. 5, it is assumed that the network A and the network C are configured with the same network address (192.168.1.0). When the device 1001 receives the packet (S1601 in FIG. 13), it checks whether it is a request packet in S1602. The request packet here is a packet in which the transmission side of the request packet requests a response from the reception side. Examples of the request packet include a TCP SYN packet and an ICMP Echo packet that are TCP connection requests. When a TCP SYN packet is received, a TCP SYN ACK packet is returned as a response to notify that the connection is accepted. When an ICMP Echo packet is received, an ICMP Echo Reply packet is transmitted. In this way, in S1602, it is determined whether it is necessary to respond to the received packet. If a response is required, that is, if the received packet is a request packet (YES in S1602), the process proceeds to S1603. If it is not necessary, that is, if it is not a request packet (NO in S1602), the process proceeds to S1608, and the reception process is continued without registering or updating the routing table.

S1603以降の処理は、図9の各ステップと同様である。すなわち、S1603では、パケットの送信元アドレスをキーにルーティングテーブルを検索する。検索の結果、デフォルトエントリを除くルーティングエントリが発見されたか否かを判定する(S1604)。発見された場合(S1604でYES)はS1605へ進み、発見されなかった場合(S1604でNO)はS1607へ進む。上記の例では、送信元アドレスは192.168.1.154であるから、図2のルーティングテーブル108においては、ルーティングエントリ2012がこの送信元アドレスに対応するエントリとして発見される。   The processes after S1603 are the same as those in FIG. That is, in S1603, the routing table is searched using the packet source address as a key. As a result of the search, it is determined whether or not a routing entry excluding the default entry has been found (S1604). If found (YES in S1604), the process proceeds to S1605, and if not found (NO in S1604), the process proceeds to S1607. In the above example, since the source address is 192.168.1.154, the routing entry 2012 is found as an entry corresponding to this source address in the routing table 108 of FIG.

S1605では、パケットを受信した通信インタフェースと、検索により発見されたルーティングテーブルエントリ(上記の例では2012)の通信インタフェースとを比較する。これらが同一の場合(S1605でYES)はS1608へ進み、異なる場合(S1605でNO)はS1607へ進む。上記の例では、図2のルーティングエントリ2012では通信インタフェースはネットワークAであり、受信したパケットの通信インタフェースはネットワークCであるから、両者は異なる。そこでS1607へ進むことになる。   In S1605, the communication interface that received the packet is compared with the communication interface of the routing table entry (2012 in the above example) found by the search. If they are the same (YES in S1605), the process proceeds to S1608, and if they are different (NO in S1605), the process proceeds to S1607. In the above example, the communication interface is the network A in the routing entry 2012 of FIG. 2, and the communication interface of the received packet is the network C. Therefore, the two are different. Therefore, the process proceeds to S1607.

S1607では、パケットの送信元アドレスと通信インタフェースを対応付けたルーティングエントリをルーティングテーブル108に登録する。上記の例では、図8のルーティングエントリ2015を登録することになる。   In step S 1607, a routing entry that associates the packet source address with the communication interface is registered in the routing table 108. In the above example, the routing entry 2015 in FIG. 8 is registered.

以上のように、本実施形態では、通信装置が受信したパケットに応答する必要があるか否かを判定し、必要な場合のみ、ルーティングテーブルにルーティングエントリを追加する。このため、送信する必要のない受信パケットに対して、ルーティングエントリを追加することがなくなり、誤動作や不要な処理を防ぐことが可能となる。   As described above, in this embodiment, it is determined whether or not it is necessary to respond to a packet received by the communication apparatus, and a routing entry is added to the routing table only when necessary. For this reason, a routing entry is not added to a received packet that does not need to be transmitted, and malfunctions and unnecessary processing can be prevented.

<<実施形態3>>
本実施形態では、パケットの受信に応じて登録したルーティングエントリを、パケットの送信元とのコネクション終了等に応じて、ルーティングテーブルから削除する構成を説明する。本実施形態に係る通信装置1001の動作について、図14、図15、図16を用いて説明する。図14は、パケットを受信した場合のフローチャート、図15は本実施形態におけるルーティングテーブル108の例、図16はコネクション切断時のフローチャートである。図14、図16の各ステップは、通信装置1001のCPU102の制御に基づき実行される。
<< Embodiment 3 >>
In the present embodiment, a configuration will be described in which a routing entry registered in response to reception of a packet is deleted from the routing table in response to termination of connection with the packet transmission source. The operation of the communication apparatus 1001 according to the present embodiment will be described with reference to FIGS. FIG. 14 is a flowchart when a packet is received, FIG. 15 is an example of the routing table 108 in the present embodiment, and FIG. 16 is a flowchart when the connection is disconnected. Each step in FIG. 14 and FIG. 16 is executed based on the control of the CPU 102 of the communication apparatus 1001.

(ルーティングテーブル)
図15は、本実施形態におけるルーティングテーブル108の例を示す図である。本実施形態では、ルーティングエントリにフラグと参照カウンタの項目が追加されている。フラグは、TCP SYNパケットを受信したことにより追加されたエントリかどうかを判定するために使用される。参照カウンタは、TCP SYNパケットを受信し、ルーティングエントリを使用する場合にインクリメントするカウンタである。
(Routing table)
FIG. 15 is a diagram showing an example of the routing table 108 in the present embodiment. In the present embodiment, items of a flag and a reference counter are added to the routing entry. The flag is used to determine whether the entry has been added by receiving a TCP SYN packet. The reference counter is a counter that is incremented when a TCP SYN packet is received and a routing entry is used.

(パケット受信の際の動作)
図14のS701においてパケットを受信すると、通信装置1001は、受信したパケットの送信元IPアドレスでルーティングテーブル108を検索する(S702)。
(Operation when receiving packets)
When the packet is received in S701 of FIG. 14, the communication device 1001 searches the routing table 108 with the source IP address of the received packet (S702).

ルーティングエントリが発見されなかった場合(S703でNO)は、S706へ進み、受信したパケットが接続要求(TCP SYN)パケットかどうかを判定する。ルーティングエントリが発見された場合(S703でYES)は、受信したパケットの通信インタフェースとルーティングエントリの通信インタフェースを比較する(S704)。両者が異なる場合(S705でNO)はS706へ進み、同一である場合(S705でYES)はS708へ進む。   If the routing entry is not found (NO in S703), the process proceeds to S706, and it is determined whether the received packet is a connection request (TCP SYN) packet. When the routing entry is found (YES in S703), the communication interface of the received packet is compared with the communication interface of the routing entry (S704). If they are different (NO in S705), the process proceeds to S706, and if they are the same (YES in S705), the process proceeds to S708.

S706では、S701で受信したパケットが接続要求(TCP SYN)パケットかどうか判断する。これにより、受信したパケットが接続要求(TCP SYN)パケットであると判定された場合(S706でYES)は、S707へ進む。S707では、参照カウンタを1に、フラグにSYNを設定し、ルーティングエントリを登録する。そして、S712へ進んで受信処理を継続する。   In step S706, it is determined whether the packet received in step S701 is a connection request (TCP SYN) packet. Thereby, when it is determined that the received packet is a connection request (TCP SYN) packet (YES in S706), the process proceeds to S707. In S707, the reference counter is set to 1, the flag is set to SYN, and the routing entry is registered. Then, the process proceeds to S712 and the reception process is continued.

S706において、受信したパケットが接続要求(TCP SYN)パケットではないと判定された場合(S706でNO)は、S711へ進む。S711では、参照カウンタとフラグを設定せずにルーティングエントリを登録する。そして、S712へ進んで受信処理を継続する。   If it is determined in S706 that the received packet is not a connection request (TCP SYN) packet (NO in S706), the process proceeds to S711. In S711, the routing entry is registered without setting the reference counter and the flag. Then, the process proceeds to S712 and the reception process is continued.

S708では、S701で受信したパケットが接続要求パケット(TCP SYN)かどうか判定する。接続要求パケット(TCP SYN)でない場合(S708でNO)は、S712へ進んで受信処理を継続する。接続要求パケット(TCP SYN)である場合(S708でYES)は、ルーティングエントリのフラグにSYNマークがあるかどうかを判定する(S709)。SYNマークがない場合(S709でNO)は、S712へ進んで受信処理を継続する。SYNマークがあった場合(S709でYES)は、ルーティングエントリの参照カウンタをインクリメントする(S710)。そして、S712へ進み、受信処理を継続する。   In S708, it is determined whether the packet received in S701 is a connection request packet (TCP SYN). If the packet is not a connection request packet (TCP SYN) (NO in S708), the process proceeds to S712 and the reception process is continued. If it is a connection request packet (TCP SYN) (YES in S708), it is determined whether there is a SYN mark in the flag of the routing entry (S709). If there is no SYN mark (NO in S709), the process proceeds to S712 and the reception process is continued. If there is a SYN mark (YES in S709), the routing entry reference counter is incremented (S710). Then, the process proceeds to S712 and the reception process is continued.

(コネクション切断の動作)
次に、TCP通信を終え、TCPのコネクションを切断し、TCPのコネクション情報を削除する場合の動作について、図16を用いて説明する。コネクションが削除されると(S901)、S902へ進む。TCPのコネクション情報は、宛先IPアドレス、送信元IPアドレス、宛先ポート番号、送信元ポート番号の組み合わせを含んでいる。S902では、TCPのコネクション情報の中の宛先IPアドレスをキーとして、ルーティングテーブル108を検索する。発見されなかった場合(S903でNO)は、S908へ進んで、コネクション情報削除処理を継続する。発見された場合(S903でYES)は、S904へ進む。
(Connection disconnection operation)
Next, the operation when TCP communication is finished, the TCP connection is disconnected, and the TCP connection information is deleted will be described with reference to FIG. When the connection is deleted (S901), the process proceeds to S902. TCP connection information includes a combination of a destination IP address, a source IP address, a destination port number, and a source port number. In step S902, the routing table 108 is searched using the destination IP address in the TCP connection information as a key. If not found (NO in S903), the process proceeds to S908, and the connection information deletion process is continued. If found (YES in S903), the process proceeds to S904.

S904では、発見されたルーティングエントリのフラグにSYNのマークがあるかどうかを判定する。SYNマークが存在しない場合(S904でNO)は、S908へ進んで、コネクション情報削除処理を継続する。SYNマークが存在した場合(S904でYES)は、S905へ進む。   In S904, it is determined whether the flag of the discovered routing entry has a SYN mark. When the SYN mark does not exist (NO in S904), the process proceeds to S908, and the connection information deletion process is continued. If the SYN mark exists (YES in S904), the process proceeds to S905.

S905では、ルーティングエントリの参照カウンタをデクリメントする。そして、S906において、ルーティングエントリの参照カウンタが0かどうかを判定する。0でない場合(S906でNO)は、S908へ進んで、コネクション情報削除処理を継続する。0である場合(S906でYES)は、S907へ進む。S907では、参照カウンタが0のルーティングエントリを削除し(S907)、S908へ進んでコネクション情報削除処理を継続する。   In step S905, the routing entry reference counter is decremented. In step S906, it is determined whether the reference counter of the routing entry is 0. If it is not 0 (NO in S906), the process proceeds to S908, and the connection information deletion process is continued. If it is 0 (YES in S906), the process proceeds to S907. In S907, the routing entry whose reference counter is 0 is deleted (S907), and the process proceeds to S908 to continue the connection information deletion process.

以上のように、本実施形態では、コネクション切断後、コネクション情報を削除する場合に、接続要求パケットによって追加されたルーティングエントリを削除する。このため、不要なルーティングエントリを削除して誤作動を防ぎ、必要なルーティングエントリのみをルーティングテーブルに保持することが可能となる。   As described above, in this embodiment, when the connection information is deleted after the connection is disconnected, the routing entry added by the connection request packet is deleted. For this reason, unnecessary routing entries can be deleted to prevent malfunction, and only necessary routing entries can be held in the routing table.

なお、ルーティングエントリをルーティングテーブルから削除するのは、受信したパケットの送信元とのコネクションが終了した場合に限られない。例えば、ルーティングテーブルにルーティングエントリを登録してから所定時間が経過したことに応じて、当該ルーティングエントリをルーティングテーブルから削除するようにしてもよい。具体的には、例えば、UDPやICMPなど接続を持たないプロトコルにおいて、ルーティングエントリを削除するためのタイマを設け、当該タイマが一定時間を計時したことに応じて切断処理を行ってもよい。   The deletion of the routing entry from the routing table is not limited to when the connection with the transmission source of the received packet is terminated. For example, the routing entry may be deleted from the routing table when a predetermined time has elapsed since the routing entry was registered in the routing table. Specifically, for example, in a protocol having no connection such as UDP or ICMP, a timer for deleting a routing entry may be provided, and the disconnection process may be performed in response to the timer measuring a certain time.

以上の各実施形態では、複数の通信インタフェースを備えた通信装置において、通信インタフェースのいずれかを介してデータを受信した場合、データを受信した通信インタフェースから、データに対する応答データを送出する。具体的には、受信したパケットの送信元IPアドレスからルーティングテーブルを検索し、検索したルーティングエントリの通信インタフェースがパケットを受信したインタフェースと異なる場合は、送信元のルーティングエントリを登録する。これにより、ルーティングテーブルを用いて、通信インタフェースを適切に選択し、送信するパケットの宛先IPアドレスに応じた適切な通信インタフェースからパケットを送信することが可能となる。   In each of the above embodiments, when data is received via any one of the communication interfaces in a communication device having a plurality of communication interfaces, response data for the data is transmitted from the communication interface that received the data. Specifically, the routing table is searched from the source IP address of the received packet, and if the communication interface of the searched routing entry is different from the interface that received the packet, the source routing entry is registered. Accordingly, it is possible to appropriately select a communication interface using the routing table and transmit a packet from an appropriate communication interface corresponding to the destination IP address of the packet to be transmitted.

<<その他の実施形態>>
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
<< Other Embodiments >>
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

1001:通信装置、102:CPU、103:DRAM、104:有線LANモジュール、105:無線LANモジュール、106:検索部、107:設定部、108:ルーティングテーブル、109:ROM、110:LAN、111:アンテナ 1001: Communication device 102: CPU 103: DRAM 104: Wired LAN module 105: Wireless LAN module 106: Search unit 107: Setting unit 108: Routing table 109: ROM 110: LAN 111: antenna

Claims (16)

複数の通信インタフェースを有する通信装置であって、
通信インタフェースとネットワークを識別するネットワーク識別子とを対応付けて記憶部に保持させる保持手段と、
他の通信装置から第1の通信インタフェースを介してパケットを受信した場合に、前記第1の通信インタフェースと前記他の通信装置が属するネットワーク識別子との対応付けが前記記憶部に保持されているかを判定する判定手段と、
前記判定手段により前記対応付けが前記記憶部に保持されていないと判定された場合、前記第1の通信インタフェースと前記他の通信装置を識別する識別情報とを対応付けて前記記憶部に登録する登録手段と、
前記登録手段により登録された前記対応付けに基づいて、前記第1の通信インタフェースを介して前記他の通信装置にパケットを送信する送信手段と、
を有することを特徴とする通信装置。
A communication device having a plurality of communication interfaces,
Holding means for associating and holding the communication interface and a network identifier for identifying the network in the storage unit;
Whether or not a correspondence between the first communication interface and the network identifier to which the other communication device belongs is held in the storage unit when a packet is received from another communication device via the first communication interface. Determination means for determining;
When the determination unit determines that the association is not held in the storage unit, the first communication interface and identification information for identifying the other communication device are associated and registered in the storage unit. Registration means;
A transmission unit configured to transmit a packet to the other communication device via the first communication interface based on the association registered by the registration unit;
A communication apparatus comprising:
前記保持手段は、通信インタフェースと前記ネットワーク識別子とを対応付けたルーティングエントリを複数有するルーティングテーブルを前記記憶部に保持させることを特徴とする請求項1に記載の通信装置。   The communication apparatus according to claim 1, wherein the holding unit holds a routing table having a plurality of routing entries in which a communication interface and the network identifier are associated with each other in the storage unit. 前記他の通信装置からパケットを受信した場合、前記ルーティングテーブルを探索する探索手段を更に有し、
前記判定手段は、前記探索手段による探索の結果に基づいて、前記対応付けが前記記憶部に保持されているかを判定することを特徴とする請求項2に記載の通信装置。
In the case where a packet is received from the other communication device, it further includes search means for searching the routing table,
The communication device according to claim 2, wherein the determination unit determines whether the association is held in the storage unit based on a search result by the search unit.
前記登録手段は、前記対応付けが前記記憶部に保持されていると判定された場合、前記第1の通信インタフェースと前記他の通信装置を識別する識別情報とを対応付けて前記記憶部に登録する処理を行わないことを特徴とする請求項1または2に記載の通信装置。   When it is determined that the association is held in the storage unit, the registration unit associates the first communication interface with identification information for identifying the other communication device and registers the association information in the storage unit The communication apparatus according to claim 1, wherein the processing is not performed. 複数の通信インタフェースを有する通信装置であって、
通信インタフェースとネットワークを識別するネットワーク識別子とを対応付けて記憶部に保持させる保持手段と、
他の通信装置から第1の通信インタフェースを介してパケットを受信した場合に、前記他の通信装置が属するネットワーク識別子と前記第1の通信インタフェースとは異なる第2の通信インタフェースとが対応付けられている場合、前記第1の通信インタフェースと前記他の通信装置を識別する識別情報とを対応付けて前記記憶部に登録する登録手段と、
前記登録手段により登録された前記対応付けに基づいて、前記第1の通信インタフェースを介して前記他の通信装置にパケットを送信する送信手段と、
を有することを特徴とする通信装置。
A communication device having a plurality of communication interfaces,
Holding means for associating and holding the communication interface and a network identifier for identifying the network in the storage unit;
When a packet is received from another communication device via the first communication interface, a network identifier to which the other communication device belongs is associated with a second communication interface different from the first communication interface. If there is, a registration unit that registers the first communication interface and identification information for identifying the other communication device in association with each other in the storage unit;
A transmission unit configured to transmit a packet to the other communication device via the first communication interface based on the association registered by the registration unit;
A communication apparatus comprising:
前記ネットワーク識別子はIP(Internet Protocol)層におけるネットワークアドレスであることを特徴とする請求項1から5のいずれか1項に記載の通信装置。   The communication apparatus according to claim 1, wherein the network identifier is a network address in an IP (Internet Protocol) layer. 前記送信手段は、前記登録手段により登録された対応付けに基づいて、前記他の通信装置から受信したパケットに対する応答パケットを前記第1の通信インタフェースを介して送信することを特徴とする請求項1から6のいずれか1項に記載の通信装置。   2. The transmission unit according to claim 1, wherein the transmission unit transmits a response packet to the packet received from the other communication device based on the association registered by the registration unit via the first communication interface. 7. The communication device according to any one of 1 to 6. 前記他の通信装置から受信したパケットに対する応答パケットを送信するか否かを判別する判別手段を更に有し、
前記送信手段は、前記判別手段により前記応答パケットを送信すると判別された場合に、当該応答パケットを送信することを特徴とする請求項7に記載の通信装置。
A determination unit that determines whether to transmit a response packet to the packet received from the other communication device;
The communication device according to claim 7, wherein the transmission unit transmits the response packet when the determination unit determines that the response packet is to be transmitted.
前記他の通信装置と切断した場合、前記登録手段により登録された対応付けを前記記憶部から削除する削除手段を更に有することを特徴とする請求項1から8のいずれか1項に記載の通信装置。   9. The communication according to claim 1, further comprising: a deletion unit that deletes the association registered by the registration unit from the storage unit when disconnected from the other communication device. 10. apparatus. 前記登録手段により登録されてから所定時間が経過すると、前記登録手段により登録された対応付けを前記記憶部から削除する削除手段を更に有することを特徴とする請求項1から8のいずれか1項に記載の通信装置。   9. The apparatus according to claim 1, further comprising a deletion unit that deletes the association registered by the registration unit from the storage unit when a predetermined time has elapsed since the registration by the registration unit. The communication apparatus as described in. 前記他の通信装置と所定時間、通信が無かった場合、前記登録手段により登録された対応付けを前記記憶部から削除する削除手段を更に有することを特徴とする請求項1から8のいずれか1項に記載の通信装置。   9. The apparatus according to claim 1, further comprising: a deletion unit that deletes the association registered by the registration unit from the storage unit when there is no communication with the other communication device for a predetermined time. The communication device according to item. 複数の通信インタフェースを有する通信装置であって、
前記複数の通信インタフェースのいずれかを介してパケットを受信した場合、該パケットを受信した通信インタフェースを記憶する記憶手段と、
前記記憶手段により記憶された前記通信インタフェースを介して、当該パケットに対する応答パケットを送信する送信手段と、
を有することを特徴とする通信装置。
A communication device having a plurality of communication interfaces,
When a packet is received via any of the plurality of communication interfaces, storage means for storing the communication interface that has received the packet;
A transmission means for transmitting a response packet to the packet via the communication interface stored by the storage means;
A communication apparatus comprising:
複数の通信インタフェースを有する通信装置の制御方法であって、
通信インタフェースとネットワークを識別するネットワーク識別子とを対応付けて記憶部に保持させる保持工程と、
他の通信装置から第1の通信インタフェースを介してパケットを受信した場合に、前記第1の通信インタフェースと前記他の通信装置が属するネットワーク識別子との対応付けが前記記憶部に保持されているかを判定する判定工程と、
前記対応付けが前記記憶部に保持されていないと判定された場合、前記第1の通信インタフェースと前記他の通信装置を識別する識別情報とを対応付けて前記記憶部に登録する登録工程と、
登録された前記対応付けに基づいて、前記第1の通信インタフェースを介して前記他の通信装置にパケットを送信する送信工程と、
を有することを特徴とする制御方法。
A method of controlling a communication device having a plurality of communication interfaces,
A holding step of associating and holding the communication interface and the network identifier for identifying the network in the storage unit;
Whether or not a correspondence between the first communication interface and the network identifier to which the other communication device belongs is held in the storage unit when a packet is received from another communication device via the first communication interface. A determination step for determining;
When it is determined that the association is not held in the storage unit, a registration step of registering the first communication interface and identification information for identifying the other communication device in association with each other in the storage unit;
A transmission step of transmitting a packet to the other communication device via the first communication interface based on the registered association;
A control method characterized by comprising:
複数の通信インタフェースを有する通信装置の制御方法であって、
通信インタフェースとネットワークを識別するネットワーク識別子とを対応付けて記憶部に保持させる保持工程と、
他の通信装置から第1の通信インタフェースを介してパケットを受信した場合に、前記他の通信装置が属するネットワーク識別子と前記第1の通信インタフェースとは異なる第2の通信インタフェースとが対応付けられている場合、前記第1の通信インタフェースと前記他の通信装置を識別する識別情報とを対応付けて前記記憶部に登録する登録工程と、
登録された前記対応付けに基づいて、前記第1の通信インタフェースを介して前記他の通信装置にパケットを送信する送信工程と、
を有することを特徴とする制御方法。
A method of controlling a communication device having a plurality of communication interfaces,
A holding step of associating and holding the communication interface and the network identifier for identifying the network in the storage unit;
When a packet is received from another communication device via the first communication interface, a network identifier to which the other communication device belongs is associated with a second communication interface different from the first communication interface. A registration step of registering the first communication interface and the identification information for identifying the other communication device in association with each other in the storage unit;
A transmission step of transmitting a packet to the other communication device via the first communication interface based on the registered association;
A control method characterized by comprising:
複数の通信インタフェースを有する通信装置の制御方法であって、
前記複数の通信インタフェースのいずれかを介してパケットを受信した場合、該パケットを受信した通信インタフェースを記憶部に記憶させる記憶工程と、
前記記憶部により記憶された前記通信インタフェースを介して、当該パケットに対する応答パケットを送信する送信工程と、
を有することを特徴とする通信装置の制御方法。
A method of controlling a communication device having a plurality of communication interfaces,
A storage step of storing a communication interface that has received the packet in a storage unit when a packet is received via any of the plurality of communication interfaces;
A transmission step of transmitting a response packet to the packet via the communication interface stored by the storage unit;
A method for controlling a communication apparatus, comprising:
コンピュータを請求項1から12のいずれか1項に記載の通信装置が有する各手段として機能させるためのコンピュータプログラム。   A computer program for causing a computer to function as each unit included in the communication device according to any one of claims 1 to 12.
JP2015117778A 2015-06-10 2015-06-10 COMMUNICATION DEVICE, ITS CONTROL METHOD, COMPUTER PROGRAM Active JP6470640B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015117778A JP6470640B2 (en) 2015-06-10 2015-06-10 COMMUNICATION DEVICE, ITS CONTROL METHOD, COMPUTER PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015117778A JP6470640B2 (en) 2015-06-10 2015-06-10 COMMUNICATION DEVICE, ITS CONTROL METHOD, COMPUTER PROGRAM

Publications (2)

Publication Number Publication Date
JP2017005516A true JP2017005516A (en) 2017-01-05
JP6470640B2 JP6470640B2 (en) 2019-02-13

Family

ID=57754481

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015117778A Active JP6470640B2 (en) 2015-06-10 2015-06-10 COMMUNICATION DEVICE, ITS CONTROL METHOD, COMPUTER PROGRAM

Country Status (1)

Country Link
JP (1) JP6470640B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020088727A (en) * 2018-11-29 2020-06-04 株式会社沖データ Image formation apparatus
JP2020162051A (en) * 2019-03-27 2020-10-01 キヤノン株式会社 Information processing device, communication control method and program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030145104A1 (en) * 2002-01-23 2003-07-31 International Business Machines Corporation Virtual private network and tunnel gateway with multiple overlapping, remote subnets
JP2003348228A (en) * 2002-05-27 2003-12-05 Yozan Inc Network communication management device, communication device and network communication management system of communication device
JP2005033351A (en) * 2003-07-09 2005-02-03 Hitachi Information Technology Co Ltd Packet relaying apparatus
JP2007173899A (en) * 2005-12-19 2007-07-05 Fujitsu Ltd Repeater
US20080002705A1 (en) * 2006-06-28 2008-01-03 Fujitsu Limited Communication device, address learning method, and address learning program
JP2012160903A (en) * 2011-01-31 2012-08-23 Ricoh Co Ltd Communication device, communication method, and communication program

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030145104A1 (en) * 2002-01-23 2003-07-31 International Business Machines Corporation Virtual private network and tunnel gateway with multiple overlapping, remote subnets
JP2003348228A (en) * 2002-05-27 2003-12-05 Yozan Inc Network communication management device, communication device and network communication management system of communication device
JP2005033351A (en) * 2003-07-09 2005-02-03 Hitachi Information Technology Co Ltd Packet relaying apparatus
JP2007173899A (en) * 2005-12-19 2007-07-05 Fujitsu Ltd Repeater
US20080002705A1 (en) * 2006-06-28 2008-01-03 Fujitsu Limited Communication device, address learning method, and address learning program
JP2008011081A (en) * 2006-06-28 2008-01-17 Fujitsu Ltd Communication device, and method and program for learning address
JP2012160903A (en) * 2011-01-31 2012-08-23 Ricoh Co Ltd Communication device, communication method, and communication program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020088727A (en) * 2018-11-29 2020-06-04 株式会社沖データ Image formation apparatus
JP7067442B2 (en) 2018-11-29 2022-05-16 沖電気工業株式会社 Image forming device
JP2020162051A (en) * 2019-03-27 2020-10-01 キヤノン株式会社 Information processing device, communication control method and program
JP7402613B2 (en) 2019-03-27 2023-12-21 キヤノン株式会社 Information processing equipment, communication control method and program

Also Published As

Publication number Publication date
JP6470640B2 (en) 2019-02-13

Similar Documents

Publication Publication Date Title
US10715482B2 (en) Wide area service discovery for internet of things
KR101468831B1 (en) Mapping private and public addresses
US9712485B2 (en) Dynamic DNS-based service discovery
JP4173401B2 (en) Router, address identification information management server
WO2017113238A1 (en) Method for establishing routing table, electronic device and network
JP2001230803A (en) Position identifier management unit and mobile computer, and position identifier management method and position identifier processing method
US9979643B2 (en) Communication apparatus, communication method, and computer-readable recording medium
US10574570B2 (en) Communication processing method and apparatus
JP6118122B2 (en) COMMUNICATION DEVICE, ITS CONTROL METHOD, PROGRAM
JP6195014B2 (en) COMMUNICATION SYSTEM, COMMUNICATION METHOD, RELAY DEVICE, AND COMMUNICATION PROGRAM
EP3026872A1 (en) Packet forwarding method, apparatus, and system
US11178101B1 (en) Method and apparatus of establishing a connection between devices using cached connection information
US10904202B2 (en) Packet routing using a network device
US7940760B2 (en) Method and apparatus for discovering component in at least one sub-network
JP6470640B2 (en) COMMUNICATION DEVICE, ITS CONTROL METHOD, COMPUTER PROGRAM
TWI513239B (en) Network device and method for routing
JP2003258859A (en) Communication system, communicating method, transferring device and network managing device
WO2015184979A1 (en) Methods and devices for processing packet, sending information, and receiving information
JP2016178530A (en) Communication system, communication terminal, communication method, and program
CN115361328B (en) Method and related equipment for addressing and forwarding identity identification message
JP6435002B2 (en) COMMUNICATION DEVICE, ITS CONTROL METHOD, PROGRAM
WO2012083676A1 (en) Method and system for improving use efficiency of mapping and routing table
JP5130022B2 (en) Route information management device
KR101311864B1 (en) A method of communicating data by distributed scheme

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181011

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181015

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181023

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20181221

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190118

R151 Written notification of patent or utility model registration

Ref document number: 6470640

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151