JP2013141072A - Relay server - Google Patents

Relay server Download PDF

Info

Publication number
JP2013141072A
JP2013141072A JP2011289650A JP2011289650A JP2013141072A JP 2013141072 A JP2013141072 A JP 2013141072A JP 2011289650 A JP2011289650 A JP 2011289650A JP 2011289650 A JP2011289650 A JP 2011289650A JP 2013141072 A JP2013141072 A JP 2013141072A
Authority
JP
Japan
Prior art keywords
routing
relay server
lan
wan
internet
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
JP2011289650A
Other languages
Japanese (ja)
Other versions
JP5849695B2 (en
Inventor
Yasutake Ueda
泰毅 上田
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.)
Murata Machinery Ltd
Original Assignee
Murata Machinery Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Murata Machinery Ltd filed Critical Murata Machinery Ltd
Priority to JP2011289650A priority Critical patent/JP5849695B2/en
Publication of JP2013141072A publication Critical patent/JP2013141072A/en
Application granted granted Critical
Publication of JP5849695B2 publication Critical patent/JP5849695B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a configuration that can adequately perform routing of a packet even in the case of a relay server that constructs a VPN by a radio communication terminal.SOLUTION: A LAN interface 34 utilizes an IP address which was address converted at a LAN gateway as its IP address when it connects to the Internet. A USB interface 35 utilizes a global IP address as its IP address when it connects to the Internet. A routing processing unit 41 routes a received packet according to a preset routing table. An additional routing information storage unit 42 registers routing information to be added to the routing table. A routing setting unit 43 sets the routing information stored in the additional routing information storage unit 42 to the routing table when the USB interface 35 is used to connect to the Internet.

Description

本発明は、主として、異なるLANに接続されている端末間の通信を可能とする中継サーバの構成に関する。   The present invention mainly relates to a configuration of a relay server that enables communication between terminals connected to different LANs.

遠隔地にあるLAN(Local Area Network)同士を、インターネットなどのWAN(Wide Area Network)を介して接続するVPN(Virtual Private Network)が開発されている。このような技術は、例えば特許文献1に開示されている。特許文献1に記載の技術は、各LANに中継サーバを設置し、当該中継サーバ同士がWANを介した中継通信を行うことにより、異なるLANに所属しているクライアント端末同士を相互に通信可能とするものである。   A VPN (Virtual Private Network) that connects LANs (Local Area Networks) at remote locations via a WAN (Wide Area Network) such as the Internet has been developed. Such a technique is disclosed in Patent Document 1, for example. The technology described in Patent Document 1 enables a client server belonging to a different LAN to communicate with each other by installing a relay server in each LAN and performing relay communication between the relay servers via the WAN. To do.

この種のVPNにおいては、ユーザがデフォルトゲートウェイを設定することにより、VPNによる通信と、VPNを使わない通信(通常のインターネット接続など)を適切に利用することができる。   In this type of VPN, when a user sets a default gateway, communication using VPN and communication not using VPN (normal Internet connection or the like) can be appropriately used.

近年、WANに対して有線で接続することが難しい環境でもVPNに参加したいというニーズが高まっている。このようなニーズに対応するため、前記中継サーバに、携帯電話回線(移動体通信網)に接続するための無線通信端末(いわゆるデータ通信カード)を設ける場合がある。この無線通信端末を備えた中継サーバは、携帯電話回線を介してWANに接続することができるので、有線でWANに接続することが難しい環境であってもVPNに参加することが可能となる。例えば特許文献2は、携帯電話をPCに接続することで、携帯電話通信網を利用してVPNを行う構成を開示している。   In recent years, there is an increasing need to participate in a VPN even in an environment where it is difficult to connect to a WAN by wire. In order to respond to such needs, a wireless communication terminal (so-called data communication card) for connecting to a mobile phone line (mobile communication network) may be provided in the relay server. Since the relay server provided with this wireless communication terminal can be connected to the WAN via the mobile phone line, it can participate in the VPN even in an environment where it is difficult to connect to the WAN by wire. For example, Patent Document 2 discloses a configuration in which VPN is performed using a mobile phone communication network by connecting a mobile phone to a PC.

特開2009−157825号公報JP 2009-157825 A 特開2008−219643号公報JP 2008-219643 A

WANに対して有線で接続することができないLANにおいて、無線通信端末を設けた中継サーバによってVPNを構築する場合、当該中継サーバは、LAN内とWANとを結ぶ唯一の機器となる。従って、当該中継サーバをデフォルトゲートウェイに設定することが考えられる。しかしこの場合、中継サーバ自体のデフォルトゲートウェイは、携帯電話回線のゲートウェイとなるため、LAN内の別セグメントに対するping通信等を適切にルーティングすることができない。   When a VPN is constructed by a relay server provided with a wireless communication terminal in a LAN that cannot be connected to the WAN by wire, the relay server is the only device that connects the LAN and the WAN. Therefore, it is conceivable to set the relay server as a default gateway. However, in this case, since the default gateway of the relay server itself is a mobile phone line gateway, ping communication or the like for another segment in the LAN cannot be properly routed.

本発明は以上の事情に鑑みてされたものであり、その目的は、無線通信端末によってVPNを構築する中継サーバであっても、パケットのルーティングを適切に行うことができる構成を提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a configuration capable of appropriately routing packets even in a relay server that constructs a VPN by a wireless communication terminal. is there.

課題を解決するための手段及び効果Means and effects for solving the problems

本発明の解決しようとする課題は以上の如くであり、次にこの課題を解決するための手段とその効果を説明する。   The problems to be solved by the present invention are as described above. Next, means for solving the problems and the effects thereof will be described.

本発明の観点によれば、以下の構成の中継サーバが提供される。この中継サーバは、第1LAN内のクライアント端末と、第2LAN内のクライアント端末と、の通信を、前記第2LANに接続された第2中継サーバとの間でWANを介して中継するために前記第1LANに接続される。当該中継サーバは、第1通信部と、第2通信部と、ルーティング処理部と、追加ルーティング情報記憶部と、ルーティング設定部と、を備える。前記第1通信部は、WANに接続する際に、自身のIPアドレスとして、前記第1LANのゲートウェイでアドレス変換されたIPアドレスを利用する。前記第2通信部は、WANに接続する際に、自身のIPアドレスとして、グローバルIPアドレスを利用する。前記ルーティング処理部は、受信したパケットを、予め設定されたルーティングテーブルに従ってルーティングする。前記追加ルーティング情報記憶部は、前記ルーティングテーブルに対して追加するルーティング情報を登録する。前記ルーティング設定部は、前記第2通信部によって前記WANに接続する際に、前記追加ルーティング情報記憶部に記憶されている前記ルーティング情報を、前記ルーティングテーブルに設定する。   According to an aspect of the present invention, a relay server having the following configuration is provided. The relay server relays communication between the client terminal in the first LAN and the client terminal in the second LAN via the WAN between the second relay server connected to the second LAN. 1 LAN is connected. The relay server includes a first communication unit, a second communication unit, a routing processing unit, an additional routing information storage unit, and a routing setting unit. When the first communication unit is connected to the WAN, the first communication unit uses an IP address that has been converted by the gateway of the first LAN as its own IP address. The second communication unit uses a global IP address as its own IP address when connecting to the WAN. The routing processing unit routes the received packet according to a preset routing table. The additional routing information storage unit registers routing information to be added to the routing table. The routing setting unit sets the routing information stored in the additional routing information storage unit in the routing table when connecting to the WAN by the second communication unit.

即ち、中継サーバがゲートウェイを介さずに直接的にWANに接続されてグローバルIPアドレスが割り当てられている場合(第2通信部によって接続されている場合)、当該中継サーバは、デフォルトゲートウェイとして、第1LAN内のパケットをルーティングする機能を果たす必要がある。そこで上記のように、中継サーバが第2通信部によってWANに接続されているときには、ルーティングテーブルにルールを追加することで、当該中継サーバをルーティング機器として適切に動作させる。これにより、LAN内でのパケットの送受信を適切に行うことができるようになる。   That is, when the relay server is directly connected to the WAN without a gateway and is assigned a global IP address (when connected by the second communication unit), the relay server serves as the default gateway. It is necessary to fulfill the function of routing packets in one LAN. Therefore, as described above, when the relay server is connected to the WAN by the second communication unit, the relay server is appropriately operated as a routing device by adding a rule to the routing table. As a result, packet transmission and reception within the LAN can be performed appropriately.

上記の中継サーバは、以下のように構成されることが好ましい。即ち、前記第1通信部は、前記WANに接続する際に、前記第1LANの前記ゲートウェイを介して前記WANに接続する。前記第2通信部は、前記WANに接続する際に、移動体通信網に無線接続し、当該移動体通信網を介して前記WANに接続する。   The relay server is preferably configured as follows. That is, when connecting to the WAN, the first communication unit connects to the WAN via the gateway of the first LAN. The second communication unit wirelessly connects to the mobile communication network when connecting to the WAN, and connects to the WAN via the mobile communication network.

このように、中継サーバを、移動体通信網を介してWANに接続可能に構成することにより、有線でWANに接続することが難しい環境であっても、VPNを構築することができる。   In this way, by configuring the relay server to be connectable to the WAN via the mobile communication network, it is possible to construct a VPN even in an environment where it is difficult to connect to the WAN by wire.

上記の中継サーバは、前記第2通信部がWANに接続可能な場合、当該第2通信部によって前記WANに接続するとともに、前記第1通信部による前記WANへの接続を禁止するWAN接続選択部を備えることが好ましい。   When the second communication unit can be connected to the WAN, the relay server connects to the WAN by the second communication unit and prohibits connection to the WAN by the first communication unit It is preferable to provide.

即ち、移動体通信網を介してWANへ接続する第2通信部がわざわざ有効化されているということは、当該第2通信部によってWANに接続することが意図されていると考えられる。そこで、第2通信部がWANに接続できる場合には、当該第2通信部による接続を、第1通信部よりも優先させる。   That is, the fact that the second communication unit connected to the WAN via the mobile communication network is bothered to be effective is considered to be intended to connect to the WAN by the second communication unit. Therefore, when the second communication unit can connect to the WAN, priority is given to the connection by the second communication unit over the first communication unit.

上記の中継サーバは、以下のように構成されることが好ましい。即ち、所定のアプリケーションを起動する際に、前記ルーティング設定部は、前記第2通信部によって前記WANに接続されているときには、前記ルーティングテーブルに前記ルーティング情報を追加設定する。また、前記ルーティング設定部は、前記第1通信部によって前記WANに接続されているときには、前記ルーティングテーブルに前記ルーティング情報を追加設定しない。   The relay server is preferably configured as follows. That is, when starting a predetermined application, the routing setting unit additionally sets the routing information in the routing table when connected to the WAN by the second communication unit. In addition, the routing setting unit does not additionally set the routing information in the routing table when connected to the WAN by the first communication unit.

これにより、第1通信部又は第2通信部による通信状況に応じてルーティングテーブルを適切に設定したうえで、アプリケーションを起動することができる。   Thereby, the application can be activated after the routing table is appropriately set according to the communication status of the first communication unit or the second communication unit.

上記の中継サーバは、以下のように構成することができる。即ち、前記所定のアプリケーションが終了した時に、前記ルーティング設定部は、前記ルーティング情報が前記ルーティングテーブルに追加設定されていた場合は、当該追加されたルーティング情報を、前記ルーティングテーブルから削除する。   The relay server can be configured as follows. That is, when the predetermined application is terminated, if the routing information is additionally set in the routing table, the routing setting unit deletes the added routing information from the routing table.

このように、アプリケーションが終了したときには、追加したルーティング情報を削除するので、当該追加した情報がルーティングテーブルに残ってしまうことを防止できる。   Thus, when the application is terminated, the added routing information is deleted, so that the added information can be prevented from remaining in the routing table.

本発明の一実施形態に係る中継サーバによって構築されたVPNの概略図。The schematic diagram of VPN constructed | assembled by the relay server which concerns on one Embodiment of this invention. 中継サーバのブロック図。The block diagram of a relay server. アプリケーション起動時にルーティングテーブルを設定するフローチャート。The flowchart which sets a routing table at the time of application starting. アプリケーション終了時にルーティングテーブルを設定するフローチャート。The flowchart which sets a routing table at the time of application completion.

次に、図面を参照して本発明の実施の形態を説明する。図1は、本実施形態に係る中継サーバを用いて構築されたVPN(仮想プライベートネットワーク)10の概略的な構成を示している。このVPN10は、例えば、遠隔地に設置された第1LAN11と第2LAN12を、インターネット(WAN)14を介して接続するためのものである。   Next, embodiments of the present invention will be described with reference to the drawings. FIG. 1 shows a schematic configuration of a VPN (virtual private network) 10 constructed using a relay server according to the present embodiment. The VPN 10 is, for example, for connecting a first LAN 11 and a second LAN 12 installed at a remote place via the Internet (WAN) 14.

第1LAN11及び第2LAN12の構成は特に限定されないが、通常、各LANは1つ以上のクライアント端末を含んでいる。例えば図1の場合、第1LAN11にはクライアント端末17,18,19,20が、第2LANにはクライアント端末21,22,45,46が、それぞれ接続されている。また、各LANは、比較的小規模なLANを複数接続した構成であっても良い。例えば図1の場合、第1LAN11は、LAN23,24,25を、ルータ26,27によって接続した構成となっている。また、第2LAN12は、LAN47,48を、ルータ49によって接続した構成となっている。   The configurations of the first LAN 11 and the second LAN 12 are not particularly limited, but each LAN usually includes one or more client terminals. For example, in the case of FIG. 1, client terminals 17, 18, 19, and 20 are connected to the first LAN 11, and client terminals 21, 22, 45, and 46 are connected to the second LAN, respectively. Each LAN may have a configuration in which a plurality of relatively small LANs are connected. For example, in the case of FIG. 1, the first LAN 11 has a configuration in which LANs 23, 24, and 25 are connected by routers 26 and 27. The second LAN 12 has a configuration in which LANs 47 and 48 are connected by a router 49.

図1に示すように、第1LAN11内には第1中継サーバ15が、第2LAN12内には第2中継サーバ16が、それぞれ接続されている。第1中継サーバ15と第2中継サーバ16は、それぞれインターネット14に接続可能に構成されている。   As shown in FIG. 1, a first relay server 15 is connected to the first LAN 11, and a second relay server 16 is connected to the second LAN 12. The first relay server 15 and the second relay server 16 are each configured to be connectable to the Internet 14.

図1の第1LAN11は、インターネット14に対して有線では接続することが難しい環境に構築されたLANを想定したものである。このようなLANでもVPN10に接続できるようにするため、本実施形態の第1中継サーバ15は、携帯電話回線(移動体通信網)30に接続可能な無線通信端末29を備えている。具体的には、この無線通信端末29は、携帯電話のアクセスポイント31との間で無線通信が可能である。アクセスポイント31は、携帯電話回線30に接続されている。この携帯電話回線30には、プロバイダが提供するゲートウェイ33が配置されており、このゲートウェイ33においてプロトコル変換等が行われて、携帯電話回線30とインターネット14とが相互に通信可能となっている。   The first LAN 11 in FIG. 1 is assumed to be a LAN constructed in an environment where it is difficult to connect to the Internet 14 by wire. In order to be able to connect to the VPN 10 even in such a LAN, the first relay server 15 of this embodiment includes a wireless communication terminal 29 that can be connected to a mobile phone line (mobile communication network) 30. Specifically, the wireless communication terminal 29 can perform wireless communication with an access point 31 of a mobile phone. The access point 31 is connected to the mobile phone line 30. The mobile phone line 30 is provided with a gateway 33 provided by a provider. Protocol conversion or the like is performed in the gateway 33 so that the mobile phone line 30 and the Internet 14 can communicate with each other.

以上の構成で、第1中継サーバ15が、携帯電話回線30を介してインターネット14に無線で接続することが可能となっている。これにより、インターネット14に対して有線では接続することが難しい第1LAN11であっても、VPN10に参加することができる。なお、プロバイダのゲートウェイ33においては、第1中継サーバ15に対してグローバルIPv4アドレスが割り当てられる。従って、第1中継サーバ15は、自身に割り当てられたグローバルIPv4アドレスによってインターネット14に接続することになる。   With the above configuration, the first relay server 15 can wirelessly connect to the Internet 14 via the mobile phone line 30. Accordingly, even the first LAN 11 that is difficult to connect to the Internet 14 by wire can participate in the VPN 10. In the provider gateway 33, a global IPv4 address is assigned to the first relay server 15. Accordingly, the first relay server 15 is connected to the Internet 14 by the global IPv4 address assigned to itself.

図1の第2LAN12は、インターネット14に対して有線で接続できているLANを想定したものである。従って、第2LAN12に接続される第2中継サーバ16の場合は、第1中継サーバ15のような無線通信端末29は不要である。即ち、第2中継サーバ16は、第2LAN12のゲートウェイ28を介してインターネット14に接続することができる。なお、第2LAN12のゲートウェイ28は、ネットワークアドレス変換(Network Address Translation,NAT)を行うことにより、第2LAN12内の機器にプライベートIPv4アドレスをマッピングするように構成されている。従って、本実施形態の第2中継サーバ16は、自身に割り当てられたプライベートIPアドレスによってインターネット14に接続することになる。   The second LAN 12 in FIG. 1 is assumed to be a LAN that can be connected to the Internet 14 by wire. Therefore, in the case of the second relay server 16 connected to the second LAN 12, the wireless communication terminal 29 like the first relay server 15 is unnecessary. That is, the second relay server 16 can be connected to the Internet 14 via the gateway 28 of the second LAN 12. Note that the gateway 28 of the second LAN 12 is configured to map a private IPv4 address to a device in the second LAN 12 by performing network address translation (NAT). Therefore, the second relay server 16 of this embodiment is connected to the Internet 14 by the private IP address assigned to itself.

続いて、中継サーバ15,16の構成について説明する。なお、第1中継サーバ15と第2中継サーバ16は、無線通信端末29の有無を除いて同一のハードウェアからなっている。図2に示すように、中継サーバ15,16は、LANインタフェース(第1通信部)34と、USBインタフェース(第2通信部)35と、制御部36と、追加ルーティング情報記憶部42と、を備えている。   Next, the configuration of the relay servers 15 and 16 will be described. The first relay server 15 and the second relay server 16 are composed of the same hardware except for the presence or absence of the wireless communication terminal 29. As illustrated in FIG. 2, the relay servers 15 and 16 include a LAN interface (first communication unit) 34, a USB interface (second communication unit) 35, a control unit 36, and an additional routing information storage unit 42. I have.

LANインタフェース34は、LANケーブルを接続可能であるとともに、当該LANケーブルを介してデータの送受信が可能に構成されている。第1中継サーバ15は、このLANインタフェース34によって第1LAN11に(より具体的にはLAN23に)接続されている。また、第2中継サーバ16は、LANインタフェース34よって、第2LAN12に(より具体的にはLAN47に)接続されている。   The LAN interface 34 can be connected to a LAN cable and can transmit and receive data via the LAN cable. The first relay server 15 is connected to the first LAN 11 (more specifically, to the LAN 23) by the LAN interface 34. Further, the second relay server 16 is connected to the second LAN 12 (more specifically, to the LAN 47) by the LAN interface 34.

前述のように、第2LAN12はゲートウェイ28を介してインターネット14に接続されているので、当該第2LAN12に接続されている第2中継サーバ16は、LANインタフェース34によってインターネット14に接続することができる。第2中継サーバ16には、プライベートIPアドレスが割り当てられ、当該プライベートIPアドレスを利用してインターネット14に接続することになる。   As described above, since the second LAN 12 is connected to the Internet 14 via the gateway 28, the second relay server 16 connected to the second LAN 12 can be connected to the Internet 14 via the LAN interface 34. The second relay server 16 is assigned a private IP address, and is connected to the Internet 14 using the private IP address.

なお、第1中継サーバ15もLANインタフェース34を備えているが、後述のWAN接続選択部39によって、当該LANインタフェース34によるインターネット14への接続が禁止されている。従って、本実施形態の場合、第1中継サーバ15は、LANインタフェース34によってインターネット14に接続することはない。   Although the first relay server 15 also includes the LAN interface 34, connection to the Internet 14 by the LAN interface 34 is prohibited by the WAN connection selection unit 39 described later. Therefore, in the present embodiment, the first relay server 15 is not connected to the Internet 14 via the LAN interface 34.

従って、中継サーバ15,16が備えるLANインタフェース34は、インターネット14に接続する際には、プライベートIPアドレスを利用してインターネット14に接続するものであると言うことができる。   Therefore, it can be said that the LAN interface 34 included in the relay servers 15 and 16 is connected to the Internet 14 using a private IP address when connecting to the Internet 14.

USBインタフェース35は、USB(Universal Serial Bus)規格の機器を接続可能であるとともに、当該機器との間でデータのやり取りを行うことができるように構成されている。本実施形態において、前記無線通信端末29は、いわゆるUSBデータ通信カードであり、USBインタフェース35に接続可能に構成されている。第1中継サーバ15のUSBインタフェース35には、この無線通信端末29が接続されている。これにより、第1中継サーバ15のUSBインタフェース35は、無線通信端末29を介してインターネット14に接続可能となっている。前述のように、第1中継サーバ15には、グローバルIPアドレスが割り当てられ、当該グローバルIPアドレスを利用してインターネットに接続することになる。   The USB interface 35 can be connected to a USB (Universal Serial Bus) standard device and can exchange data with the device. In the present embodiment, the wireless communication terminal 29 is a so-called USB data communication card, and is configured to be connectable to the USB interface 35. The wireless communication terminal 29 is connected to the USB interface 35 of the first relay server 15. As a result, the USB interface 35 of the first relay server 15 can be connected to the Internet 14 via the wireless communication terminal 29. As described above, the first relay server 15 is assigned a global IP address and uses the global IP address to connect to the Internet.

なお、第2中継サーバ16のUSBインタフェース35には、無線通信端末29が接続されていない。従って、第2中継サーバ16は、USBインタフェース35によってインターネット14に接続することはない。   Note that the wireless communication terminal 29 is not connected to the USB interface 35 of the second relay server 16. Therefore, the second relay server 16 is not connected to the Internet 14 via the USB interface 35.

従って、中継サーバ15,16が備えるUSBインタフェース35は、インターネット14に接続する際には、グローバルIPアドレスを利用してインターネット14に接続するものであると言うことができる。   Therefore, it can be said that the USB interface 35 included in the relay servers 15 and 16 is connected to the Internet 14 using the global IP address when connecting to the Internet 14.

制御部36は、図略のCPU、ROM、RAM等のハードウェアを備えたコンピュータとして構成されている。また、前記RAMには、制御プログラム、サーバアプリケーションなどのソフトウェアが記憶されている。制御部36において前記ソフトウェアを実行することにより、当該制御部36を、ルーティング処理部41、WAN接続選択部39、ルーティング設定部43等として機能させることができる。   The control unit 36 is configured as a computer including hardware such as a CPU, a ROM, and a RAM (not shown). The RAM stores software such as a control program and a server application. By executing the software in the control unit 36, the control unit 36 can function as a routing processing unit 41, a WAN connection selection unit 39, a routing setting unit 43, and the like.

ルーティング処理部41には、予めルーティングテーブルが設定されている。このルーティング処理部41は、中継サーバ15,16が受信したパケットを、前記ルーティングテーブルに基づいてルーティングすることにより、適切な転送先に転送するように機能する。   In the routing processing unit 41, a routing table is set in advance. The routing processing unit 41 functions to transfer packets received by the relay servers 15 and 16 to an appropriate transfer destination by routing based on the routing table.

WAN接続選択部39は、LANインタフェース34とUSBインタフェース35の何れを利用してインターネット14に接続するかを選択するように機能する。即ち、本実施形態の中継サーバ15,16は、USBインタフェース35に無線通信端末29を接続した場合、当該USBインタフェース35とLANインタフェース34の両方でインターネット14に接続可能な状態となる。このような場合は、何れのインタフェースを用いてインターネット14に接続するかを選択しなければ、中継サーバをインターネット14に適切に接続させることができない。   The WAN connection selection unit 39 functions to select which of the LAN interface 34 and the USB interface 35 is used to connect to the Internet 14. That is, when the wireless communication terminal 29 is connected to the USB interface 35, the relay servers 15 and 16 of this embodiment can be connected to the Internet 14 through both the USB interface 35 and the LAN interface 34. In such a case, the relay server cannot be properly connected to the Internet 14 unless it is selected which interface is used to connect to the Internet 14.

ところで、本実施形態において、無線通信端末29はUSB機器として構成されているので、不必要な場合はUSBインタフェース35から無線通信端末29を取り外しておくことができる。もし仮に、中継サーバ15,16を設置する際に、VPN10の管理者が、当該中継サーバをLANインタフェース34によってインターネット14に接続することを意図していたとすれば、無線通信端末29をUSBインタフェース35にわざわざ接続するとは考えにくい。つまり、無線通信端末29がUSBインタフェース35に接続されている場合は、当該USBインタフェース35によってインターネット14に接続することが意図されているものと考えられる。   By the way, in this embodiment, since the wireless communication terminal 29 is configured as a USB device, the wireless communication terminal 29 can be detached from the USB interface 35 if unnecessary. If the administrator of the VPN 10 intends to connect the relay server to the Internet 14 via the LAN interface 34 when installing the relay servers 15 and 16, the wireless communication terminal 29 is connected to the USB interface 35. It's hard to imagine connecting. That is, when the wireless communication terminal 29 is connected to the USB interface 35, it is considered that the connection to the Internet 14 is intended by the USB interface 35.

そこで、WAN接続選択部39は、USBインタフェース35によってインターネット14に接続可能な場合(無線通信端末29がUSBインタフェース35に接続されている場合、つまりUSBインタフェース35が有効化されている場合)には、前記USBインタフェース35を利用してインターネット14に接続するように設定する。このとき、WAN接続選択部39は、LANインタフェース34によってインターネット14に接続することを禁止する。このように、無線通信端末29を利用可能な場合には、USBインタフェース35を優先的に利用してインターネット14に接続することで、中継サーバ15,16を適切にインターネット14に接続することができる。一方、USBインタフェース35によってインターネットに接続できない場合(USBインタフェース35に無線通信端末29が接続されていない場合、つまりUSBインタフェース35が無効化されている場合)は、WAN接続選択部39は、LANインタフェース34を利用して、中継サーバをインターネット14に接続するように設定する。   Therefore, the WAN connection selection unit 39 can connect to the Internet 14 via the USB interface 35 (when the wireless communication terminal 29 is connected to the USB interface 35, that is, when the USB interface 35 is activated). The USB interface 35 is used to connect to the Internet 14. At this time, the WAN connection selection unit 39 prohibits connection to the Internet 14 via the LAN interface 34. Thus, when the wireless communication terminal 29 can be used, the relay servers 15 and 16 can be appropriately connected to the Internet 14 by using the USB interface 35 preferentially and connecting to the Internet 14. . On the other hand, when the USB interface 35 cannot connect to the Internet (when the wireless communication terminal 29 is not connected to the USB interface 35, that is, when the USB interface 35 is disabled), the WAN connection selection unit 39 uses the LAN interface. 34, the relay server is set to be connected to the Internet 14.

続いて、本実施形態のVPN10の動作について、簡単に説明する。なお、以下では、第1LAN11内のクライアント端末17が、第2LAN12内のクライアント端末21に対してパケットを送信する場合を例として説明する。   Next, the operation of the VPN 10 of this embodiment will be briefly described. In the following, a case where the client terminal 17 in the first LAN 11 transmits a packet to the client terminal 21 in the second LAN 12 will be described as an example.

クライアント端末17とクライアント端末21は互いに異なるLANに属しているので、パケットのやり取りを直接的に行うことはできない。このような場合に、本実施形態の中継サーバ15,16を利用して、第1LAN11と第2LAN12の間をVPN10で結ぶことにより、クライアント端末17とクライアント端末21の間でパケットのやり取りが可能となる。   Since the client terminal 17 and the client terminal 21 belong to different LANs, packet exchange cannot be performed directly. In such a case, packets can be exchanged between the client terminal 17 and the client terminal 21 by connecting the first LAN 11 and the second LAN 12 with the VPN 10 using the relay servers 15 and 16 of the present embodiment. Become.

まず、何れかのクライアント端末のユーザ、又はVPN10の管理者によって、第1中継サーバ15と第2中継サーバ16の間に、インターネット14を介した通信セッションを確立する操作が行われる。   First, an operation for establishing a communication session via the Internet 14 is performed between the first relay server 15 and the second relay server 16 by a user of any client terminal or an administrator of the VPN 10.

次に、クライアント端末17において、当該クライアント端末17からクライアント端末21に向けてVPN10を介してパケットを送信する操作が行われる。このパケットは、まず第1中継サーバ15に送信される。   Next, the client terminal 17 performs an operation of transmitting a packet from the client terminal 17 toward the client terminal 21 via the VPN 10. This packet is first transmitted to the first relay server 15.

パケットを受信した第1中継サーバ15のルーティング処理部41は、当該パケットを、既に確立されている通信セッションによって第2中継サーバ16に転送する。   The routing processing unit 41 of the first relay server 15 that has received the packet transfers the packet to the second relay server 16 through the already established communication session.

前記パケットが第2中継サーバ16に受信されると、当該第2中継サーバ16のルーティング処理部41は、予め設定されているルーティングテーブルに基づいて、前記パケットを送信先のクライアント端末21までルーティングする。これにより、クライアント端末21に前記パケットが到達する。   When the second relay server 16 receives the packet, the routing processing unit 41 of the second relay server 16 routes the packet to the destination client terminal 21 based on a preset routing table. . As a result, the packet reaches the client terminal 21.

以上のように、第1中継サーバ15と第2中継サーバ16の間にインターネットを介した通信セッションを確立させておき、当該通信セッションを介してパケットを転送することにより、異なるLAN11,12に属しているクライアント端末17,21の間でパケットのやり取りを行うことができる。   As described above, a communication session via the Internet is established between the first relay server 15 and the second relay server 16, and packets are transferred via the communication session, so that they belong to different LANs 11 and 12. Packets can be exchanged between the client terminals 17 and 21.

続いて、上記VPNを利用しないパケットのやり取りについて説明する。   Next, packet exchange not using the VPN will be described.

第2中継サーバ16のルーティング処理部41に設定されているルーティングテーブルには、デフォルトゲートウェイとして、第2LAN12のゲートウェイ28のアドレスが登録されている。VPNに関係のないパケットが第2中継サーバ16に受信された場合、当該パケットは、第2中継サーバ16のデフォルトゲートウェイであるゲートウェイ28に転送される。   In the routing table set in the routing processing unit 41 of the second relay server 16, the address of the gateway 28 of the second LAN 12 is registered as a default gateway. When a packet not related to VPN is received by the second relay server 16, the packet is transferred to the gateway 28 that is the default gateway of the second relay server 16.

このゲートウェイ28は、通常のLANのデフォルトゲートウェイと同様の機能を有しており、受信したパケットを、インターネット14又は第2LAN12に対して適切にルーティングできるように構成されている。VPNに関係ないパケットが第2中継サーバ16に送信された場合、当該パケットは、ゲートウェイ28に転送されて、当該ゲートウェイ28によって適切にルーティングされることになる。従って、VPNを利用するパケットであろうと、利用しないパケットであろうと、とりあえず第2中継サーバ16にルーティングしておけば、当該パケットは最終的に適切にルーティングされることになる。そこで、第2中継サーバ16と同一セグメント(LAN47)に接続されている各機器(クライアント端末21,22、ルータ49)のデフォルトゲートウェイは、第2中継サーバ16に設定されている。   The gateway 28 has the same function as a default gateway of a normal LAN, and is configured so that received packets can be appropriately routed to the Internet 14 or the second LAN 12. When a packet not related to VPN is transmitted to the second relay server 16, the packet is transferred to the gateway 28 and appropriately routed by the gateway 28. Therefore, whether the packet uses the VPN or not uses the packet, if it is routed to the second relay server 16 for the time being, the packet is finally routed appropriately. Therefore, the default gateway of each device (client terminals 21, 22 and router 49) connected to the same segment (LAN 47) as the second relay server 16 is set to the second relay server 16.

例えば、クライアント端末21が、web(world wide web)にアクセスする場合を考える。この場合、クライント端末21は、インターネット14上のwebサーバ(図略)へのパケットを、自身のデフォルトゲートウェイである第2中継サーバ16にルーティングする。第2中継サーバ16のルーティング処理部41は、当該パケットを、自身のデフォルトゲートウェイであるゲートウェイ28にルーティングする。ゲートウェイ28は、当該パケットを、前記webサーバに向けてインターネット14に送出する。このように、webアクセスの際のパケット(VPNを利用しないパケット)であっても、当該パケットを第2中継サーバ16にルーティングすることで、適切にwebアクセスを行うことができる。   For example, consider a case where the client terminal 21 accesses a web (world wide web). In this case, the client terminal 21 routes a packet to a web server (not shown) on the Internet 14 to the second relay server 16 which is its default gateway. The routing processing unit 41 of the second relay server 16 routes the packet to the gateway 28 that is its default gateway. The gateway 28 sends the packet to the Internet 14 toward the web server. Thus, even if it is a packet at the time of web access (packet which does not use VPN), by routing the said packet to the 2nd relay server 16, web access can be performed appropriately.

また例えば、クライアント端末21が、自身とは異なるセグメント(LAN48)に属しているクライアント端末45に対してping通信等を行う場合を考える。この場合、クライアント端末21は、クライアント端末45へのパケットを、自身のデフォルトゲートウェイである第2中継サーバ16にルーティングする。第2中継サーバ16のルーティング処理部41は、当該パケットを、自身のデフォルトゲートウェイであるゲートウェイ28にルーティングする。ゲートウェイ28は、当該パケットを、ルータ49にルーティングする。そして、ルータ49から、クライアント端末45に対して前記パケットが送信される。このように、異なるセグメントとの間でping通信等を行うパケット(VPNを利用しないパケット)であっても、当該パケットを第2中継サーバ16にルーティングすることで、適切にping通信等を行うことができる。   For example, consider a case where the client terminal 21 performs ping communication or the like to the client terminal 45 belonging to a segment (LAN 48) different from itself. In this case, the client terminal 21 routes the packet to the client terminal 45 to the second relay server 16 which is its default gateway. The routing processing unit 41 of the second relay server 16 routes the packet to the gateway 28 that is its default gateway. The gateway 28 routes the packet to the router 49. Then, the packet is transmitted from the router 49 to the client terminal 45. In this way, even for a packet that performs ping communication or the like with a different segment (packet that does not use VPN), the ping communication or the like can be appropriately performed by routing the packet to the second relay server 16 Can do.

以上のように、第2中継サーバ16をデフォルトゲートウェイにするという簡単な設定により、VPNを利用いないパケットであっても、適切にルーティングすることができる。   As described above, even a packet that does not use a VPN can be appropriately routed by a simple setting in which the second relay server 16 is used as a default gateway.

以上、第2LAN12について説明したので、次に第1LAN11について説明する。   The second LAN 12 has been described above. Next, the first LAN 11 will be described.

第1LAN11において、第1中継サーバ15は携帯電話回線30を介してインターネット14に接続されている。従って、第1中継サーバ15のデフォルトゲートウェイは、携帯電話回線30とインターネット14とを繋いでいるゲートウェイ33になる。   In the first LAN 11, the first relay server 15 is connected to the Internet 14 via the mobile phone line 30. Accordingly, the default gateway of the first relay server 15 is the gateway 33 that connects the mobile phone line 30 and the Internet 14.

第1LAN11においても、第2LAN12と同様に各機器のデフォルトゲートウェイが設定されている。即ち、第1中継サーバ15と同一セグメント(LAN23)に接続されている各機器(クライアント端末17,18、ルータ26)のデフォルトゲートウェイは、第1中継サーバ15に設定されている。従って、VPNを利用するパケットであろうと、利用しないパケットであろうと、とりあえず第1中継サーバ15にルーティングされることになる。   In the first LAN 11 as well, the default gateway of each device is set as in the second LAN 12. That is, the default gateway of each device (client terminals 17, 18, router 26) connected to the same segment (LAN 23) as the first relay server 15 is set to the first relay server 15. Therefore, whether the packet uses the VPN or not, the packet is routed to the first relay server 15 for the time being.

ここで例えば、クライアント端末17が、web(world wide web)にアクセスする場合を考える。この場合、クライント端末17は、インターネット14上のwebサーバ(図略)へのパケットを、自身のデフォルトゲートウェイである第1中継サーバ15にルーティングする。第1中継サーバ15のルーティング処理部41は、当該パケットを、自身のデフォルトゲートウェイであるゲートウェイ33から前記webサーバに向けてインターネット14に送出する。このように、第1LAN11においても、webアクセスの際のパケットを第1中継サーバ15にルーティングすることで、適切にwebアクセスを行うことができる。   Here, for example, consider a case where the client terminal 17 accesses a web (world wide web). In this case, the client terminal 17 routes a packet to a web server (not shown) on the Internet 14 to the first relay server 15 which is its default gateway. The routing processing unit 41 of the first relay server 15 sends the packet from the gateway 33 which is its own default gateway to the web server to the Internet 14. As described above, also in the first LAN 11, the web access can be appropriately performed by routing the packet at the time of the web access to the first relay server 15.

ところが、この第1LAN11では、異なるセグメント同士でパケットをやり取りする場合に問題が発生する。例えば、クライアント端末17が、自身とは異なるセグメント(LAN25)に属しているクライアント端末20に対してping通信等を行う場合を考える。この場合、クライアント端末17は、クライアント端末20へのパケットを、自身のデフォルトゲートウェイである第1中継サーバ15にルーティングする。ところが、第1中継サーバ15のルーティング処理部41は、当該パケットを、自身のデフォルトゲートウェイであるゲートウェイ33にルーティングしてしまう。このように、第1中継サーバ15をデフォルトゲートウェイに設定していると、パケットがうまくルーティングされない場合がある。   However, in the first LAN 11, a problem occurs when packets are exchanged between different segments. For example, consider a case where the client terminal 17 performs ping communication or the like to the client terminal 20 belonging to a segment (LAN 25) different from itself. In this case, the client terminal 17 routes the packet to the client terminal 20 to the first relay server 15 that is its default gateway. However, the routing processing unit 41 of the first relay server 15 routes the packet to the gateway 33 that is its default gateway. Thus, if the first relay server 15 is set as a default gateway, packets may not be routed well.

そこで本実施形態では、中継サーバ15,16のルーティング処理部41に設定されているルーティングテーブルに対して、ルーティング情報を追加できるように構成されている。ルーティングテーブルに追加するルーティング情報は、中継サーバ15,16が備える追加ルーティング情報記憶部42(図2)に、ユーザが予め登録しておく。ユーザは、適宜の操作を行うことにより、ルーティングテーブルに追加したいルーティング情報を、追加ルーティング情報記憶部42に登録することができる。またユーザは、適宜の操作を行うことにより、追加ルーティング情報記憶部42の記憶内容を削除することもできる。これにより、必要に応じてルーティング情報を追加、削除することができる。   Therefore, in this embodiment, it is configured so that routing information can be added to the routing table set in the routing processing unit 41 of the relay servers 15 and 16. Routing information to be added to the routing table is registered in advance by the user in the additional routing information storage unit 42 (FIG. 2) included in the relay servers 15 and 16. The user can register the routing information to be added to the routing table in the additional routing information storage unit 42 by performing an appropriate operation. The user can also delete the stored contents of the additional routing information storage unit 42 by performing an appropriate operation. Thereby, routing information can be added or deleted as necessary.

例えば、第1中継サーバ15の追加ルーティング情報記憶部42に、「クライアント端末20宛てのパケットは、ルータ26にルーティングすること」というルーティング情報を、ユーザが予め登録しておく。第1中継サーバ15のルーティング処理部41は、前記追加されたルーティング情報を考慮してルーティングを行う。これによれば、クライアント端末20宛てのパケットを、第1中継サーバ15のルーティング処理部41が、ルータ26に適切にルーティングすることができる。これにより、前記パケットを正常にクライアント端末20まで送信することができるのである。   For example, the user registers in advance in the additional routing information storage unit 42 of the first relay server 15 routing information “route packets addressed to the client terminal 20 to the router 26”. The routing processing unit 41 of the first relay server 15 performs routing in consideration of the added routing information. According to this, the routing processing unit 41 of the first relay server 15 can appropriately route the packet addressed to the client terminal 20 to the router 26. Thereby, the packet can be normally transmitted to the client terminal 20.

ところで、上記実施形態の第1LAN11は、有線でLANに接続することが難しい環境に敷設されているとした。しかし、環境が変化して、第1LAN11が有線でインターネット14に接続可能になることも考えられる(例えば、第1LAN11の設置地域まで光ケーブルが敷設された場合など)。この場合、第1中継サーバ15は、USBインタフェース35による無線接続を止めて(無線通信端末29を取り外して)、LANインタフェース34によってインターネット14に接続することができる。   By the way, the first LAN 11 of the above embodiment is laid in an environment where it is difficult to connect to the LAN by wire. However, it is conceivable that the environment changes and the first LAN 11 can be connected to the Internet 14 by wire (for example, when an optical cable is laid to the area where the first LAN 11 is installed). In this case, the first relay server 15 can stop the wireless connection via the USB interface 35 (remove the wireless communication terminal 29) and connect to the Internet 14 via the LAN interface 34.

このように、中継サーバ15,16のインターネット14に対する接続態様は、状況によって変わり得る。そこで本実施形態の中継サーバ15,16は、LANインタフェース34とUSBインタフェース35の何れによってインターネット14に接続しているかに応じて、前記ルーティングテーブルの設定を変更するルーティング設定部43を備えている。   As described above, the connection mode of the relay servers 15 and 16 to the Internet 14 can be changed depending on the situation. Therefore, the relay servers 15 and 16 of this embodiment include a routing setting unit 43 that changes the setting of the routing table depending on which of the LAN interface 34 and the USB interface 35 is connected to the Internet 14.

このルーティング設定部43の動作を、図3及び図4のフローチャートを参照して説明する。   The operation of the routing setting unit 43 will be described with reference to the flowcharts of FIGS.

中継サーバにおいて何らかのアプリケーションの起動が指示されると(S101)、当該中継サーバのルーティング設定部43は、当該中継サーバがグローバルIPアドレスを使ってインターネット14に接続しているか否かを判定する(ステップS102)。   When a relay server is instructed to start some application (S101), the routing setting unit 43 of the relay server determines whether or not the relay server is connected to the Internet 14 using a global IP address (step S101). S102).

中継サーバがグローバルIPアドレスを使っている場合(USBインタフェース35を用いてインターネット14に接続している場合)、ルーティング設定部43は、ユーザによって追加ルーティング情報記憶部42に登録されているルーティング情報を、ルーティング処理部41のルーティングテーブルに追加設定する(ステップS103)。これにより、中継サーバのルーティング処理部41は、ルーティング情報が追加されたルーティングテーブルに基づいてパケットをルーティングできる。追加ルーティング情報記憶部42に対して、詳細なルーティング情報を予め適切に登録しておくことにより、パケットを的確にルーティングできるようになる。   When the relay server uses a global IP address (when connected to the Internet 14 using the USB interface 35), the routing setting unit 43 displays the routing information registered in the additional routing information storage unit 42 by the user. Then, an additional setting is made in the routing table of the routing processing unit 41 (step S103). Thereby, the routing processing unit 41 of the relay server can route the packet based on the routing table to which the routing information is added. By appropriately registering detailed routing information in advance in the additional routing information storage unit 42, packets can be routed accurately.

一方、中継サーバがプライベートIPアドレスを使っている場合(LANインタフェース34を用いてインターネット14に接続している場合)、ルーティング設定部43は、ルーティング処理部41のルーティングテーブルに対するルーティング情報の追加設定を行わない。即ち、中継サーバがプライベートIPアドレスによってインターネット14に接続している場合(例えば図1の第2中継サーバ16)、パケットのルーティングは、当該中継サーバが接続されているLANのゲートウェイ(例えば図1のゲートウェイ28)によって適切に行うことができる。従って、このような場合は、あえて中継サーバのルーティング処理部41に詳細なルーティングテーブルを持たせる必要は無い。そこで上記のように、中継サーバがプライベートIPアドレスでインターネット14に接続しているときには、ルーティング処理部41のルーティングテーブルへの追加設定は行わないのである。   On the other hand, when the relay server uses a private IP address (when the LAN interface 34 is used to connect to the Internet 14), the routing setting unit 43 sets the routing information to the routing table of the routing processing unit 41. Not performed. That is, when the relay server is connected to the Internet 14 by a private IP address (for example, the second relay server 16 in FIG. 1), packet routing is performed for the LAN gateway (for example, in FIG. 1) to which the relay server is connected. It can be done appropriately by the gateway 28). Therefore, in such a case, it is not necessary to have a detailed routing table in the routing processing unit 41 of the relay server. Therefore, as described above, when the relay server is connected to the Internet 14 with a private IP address, no additional setting is made in the routing table of the routing processing unit 41.

以上の処理が終了した場合、中継サーバは、指定されたアプリケーションを起動する(ステップS104)。これにより、中継サーバの接続状況(グローバルIPアドレスか否か)に基づいて、ルーティング処理部41のルーティングテーブルを適切に設定した状態で、アプリケーションを起動することができる。   When the above processing is completed, the relay server activates the designated application (step S104). Thereby, based on the connection status of the relay server (whether or not it is a global IP address), the application can be started with the routing table of the routing processing unit 41 appropriately set.

なお、前記アプリケーションが終了した際には(ステップS201)、ルーティング設定部43は、中継サーバがグローバルIPアドレスを使ってインターネット14に接続しているか否かを判定する(S202)。中継サーバがグローバルIPアドレスを使っている場合(USBインタフェース35を用いてインターネット14に接続している場合)、前述のステップS103によって、追加のルーティング情報がルーティングテーブルに設定されているはずである。この場合、ルーティング設定部43は、ステップS103で追加されたルーティング情報を、ルーティングテーブルから削除する(ステップS203)。   When the application is terminated (step S201), the routing setting unit 43 determines whether the relay server is connected to the Internet 14 using the global IP address (S202). If the relay server uses a global IP address (when connected to the Internet 14 using the USB interface 35), additional routing information should be set in the routing table by the above-described step S103. In this case, the routing setting unit 43 deletes the routing information added in step S103 from the routing table (step S203).

以上の処理によれば、ユーザによって追加されたルーティング情報を、アプリケーションが終了した時点で削除し、ルーティングテーブルを元の状態に戻すことができる。これにより、ユーザが追加したルーティング情報が、不必要に残ってしまうことを防止できる。なお、この場合であっても、追加ルーティング情報記憶部42の記憶内容は削除されない。従って、再びアプリケーションが起動されたときに、中継サーバがグローバルIPアドレスでインターネット14に接続しているのであれば、前記ルーティング情報を再びルーティングテーブルに追加することができる。   According to the above processing, the routing information added by the user can be deleted when the application ends, and the routing table can be returned to the original state. Thereby, it is possible to prevent the routing information added by the user from remaining unnecessarily. Even in this case, the stored contents of the additional routing information storage unit 42 are not deleted. Therefore, if the relay server is connected to the Internet 14 with the global IP address when the application is started again, the routing information can be added to the routing table again.

以上で説明したように、本実施形態の中継サーバ15,16は、LANインタフェース34と、USBインタフェース35と、ルーティング処理部41と、追加ルーティング情報記憶部42と、ルーティング設定部43と、を備える。LANインタフェース34は、インターネット14に接続する際に、自身のIPアドレスとして、LANのゲートウェイでアドレス変換されたIPアドレスを利用する。USBインタフェース35は、インターネット14に接続する際に、自身のIPアドレスとして、グローバルIPアドレスを利用する。ルーティング処理部41は、受信したパケットを、予め設定されたルーティングテーブルに従ってルーティングする。追加ルーティング情報記憶部42は、前記ルーティングテーブルに対して追加するルーティング情報を登録する。ルーティング設定部43は、USBインタフェース35によってインターネット14に接続する際に、追加ルーティング情報記憶部42に記憶されているルーティング情報を、前記ルーティングテーブルに設定する。   As described above, the relay servers 15 and 16 of the present embodiment include the LAN interface 34, the USB interface 35, the routing processing unit 41, the additional routing information storage unit 42, and the routing setting unit 43. . When connecting to the Internet 14, the LAN interface 34 uses an IP address that has been converted by a LAN gateway as its own IP address. The USB interface 35 uses a global IP address as its own IP address when connecting to the Internet 14. The routing processing unit 41 routes the received packet according to a preset routing table. The additional routing information storage unit 42 registers routing information to be added to the routing table. The routing setting unit 43 sets the routing information stored in the additional routing information storage unit 42 in the routing table when connecting to the Internet 14 via the USB interface 35.

即ち、中継サーバがゲートウェイを介さずに直接的にインターネット14に接続されてグローバルIPアドレスが割り当てられている場合(USBインタフェース35によって接続されている場合)、当該中継サーバは、デフォルトゲートウェイとして、第1LAN11内のパケットをルーティングする機能を果たす必要がある。そこで上記のように、中継サーバがUSBインタフェース35によってインターネット14に接続されているときには、ルーティングテーブルにルールを追加することで、当該中継サーバをルーティング機器として適切に動作させる。これにより、LAN内でのパケットの送受信を適切に行うことができるようになる。   That is, when a relay server is directly connected to the Internet 14 without a gateway and assigned with a global IP address (when connected via the USB interface 35), the relay server is designated as a default gateway. It is necessary to fulfill the function of routing packets in one LAN 11. Therefore, as described above, when the relay server is connected to the Internet 14 via the USB interface 35, the relay server is appropriately operated as a routing device by adding a rule to the routing table. As a result, packet transmission and reception within the LAN can be performed appropriately.

また、本実施形態の中継サーバ15,16は、以下のように構成されている。即ち、LANインタフェース34は、インターネット14に接続する際に、LANのゲートウェイを介してインターネット14に接続する。USBインタフェース35は、インターネット14に接続する際に、携帯電話回線30に無線接続し、当該携帯電話回線30を介してインターネット14に接続する。   Moreover, the relay servers 15 and 16 of this embodiment are configured as follows. That is, the LAN interface 34 connects to the Internet 14 via a LAN gateway when connecting to the Internet 14. When connecting to the Internet 14, the USB interface 35 is wirelessly connected to the mobile phone line 30 and is connected to the Internet 14 via the mobile phone line 30.

このように、中継サーバを、携帯電話回線30を介してインターネット14に接続することにより、有線でインターネット14に接続することが難しい環境であっても、VPN10を構築することができる。   Thus, by connecting the relay server to the Internet 14 via the mobile phone line 30, the VPN 10 can be constructed even in an environment where it is difficult to connect to the Internet 14 by wire.

また、本実施形態の中継サーバ15,16は、USBインタフェース35がインターネット14に接続可能な場合、当該USBインタフェース35によってインターネット14に接続するとともに、LANインタフェース34によるインターネット14への接続を禁止するWAN接続選択部39を備える。   In addition, when the USB interface 35 can be connected to the Internet 14, the relay servers 15 and 16 of the present embodiment connect to the Internet 14 through the USB interface 35 and prohibit the connection to the Internet 14 through the LAN interface 34. A connection selection unit 39 is provided.

即ち、携帯電話回線30を介してインターネット14へ接続するUSBインタフェース35がわざわざ有効化されているということは、当該USBインタフェース35によってインターネット14に接続することが意図されていると考えられる。そこで、USBインタフェース35がインターネット14に接続できる場合には、当該USBインタフェース35による接続を、LANインタフェース34よりも優先させる。   That is, the fact that the USB interface 35 that connects to the Internet 14 via the mobile phone line 30 is purposely enabled is considered to be intended to connect to the Internet 14 by the USB interface 35. Therefore, when the USB interface 35 can be connected to the Internet 14, the USB interface 35 is given priority over the LAN interface 34.

また、本実施形態の中継サーバ15,16は、以下のように構成されている。即ち、所定のアプリケーションを起動する際に、ルーティング設定部43は、USBインタフェース35によってインターネット14に接続されているときには、前記ルーティングテーブルに前記ルーティング情報を追加設定する。また、ルーティング設定部43は、LANインタフェース34によってインターネット14に接続されているときには、前記ルーティングテーブルに前記ルーティング情報を追加設定しない。   Moreover, the relay servers 15 and 16 of this embodiment are configured as follows. That is, when starting a predetermined application, the routing setting unit 43 additionally sets the routing information in the routing table when connected to the Internet 14 via the USB interface 35. The routing setting unit 43 does not additionally set the routing information in the routing table when connected to the Internet 14 via the LAN interface 34.

これにより、LANインタフェース34又はUSBインタフェース35による通信状況に応じてルーティングテーブルを適切に設定したうえで、アプリケーションを起動することができる。   Thereby, the application can be activated after the routing table is appropriately set according to the communication status of the LAN interface 34 or the USB interface 35.

また、本実施形態の中継サーバ15,16は、以下のように構成されている。即ち、前記所定のアプリケーションが終了した時に、ルーティング設定部43は、前記ルーティング情報が前記ルーティングテーブルに追加設定されていた場合は、当該追加されたルーティング情報を、前記ルーティングテーブルから削除する。   Moreover, the relay servers 15 and 16 of this embodiment are configured as follows. That is, when the predetermined application ends, the routing setting unit 43 deletes the added routing information from the routing table if the routing information is additionally set in the routing table.

このように、アプリケーションが終了したときには、追加したルーティング情報を削除するので、当該追加した情報がルーティングテーブルに残ってしまうことを防止できる。   Thus, when the application is terminated, the added routing information is deleted, so that the added information can be prevented from remaining in the routing table.

以上に本発明の好適な実施の形態を説明したが、上記の構成は例えば以下のように変更することができる。   The preferred embodiment of the present invention has been described above, but the above configuration can be modified as follows, for example.

ルーティング設定部43がルーティング処理部41のルーティングテーブルを設定する態様等は、上記実施形態の構成に限定されない。要は、中継サーバがグローバルIPアドレスを利用してWANに接続する場合と、アドレス変換されたIPアドレス(プライベートIPアドレス)を利用してWANに接続する場合と、でルーティングのルールを変更することができれば良い。これにより、プライベートIPアドレスとグローバルIPアドレスの何れを利用しているかに応じて、適切なルーティングを実現することができる。   The manner in which the routing setting unit 43 sets the routing table of the routing processing unit 41 is not limited to the configuration of the above embodiment. In short, change the routing rule between when the relay server connects to the WAN using the global IP address and when it connects to the WAN using the IP address (private IP address) whose address has been converted. I hope you can. Accordingly, appropriate routing can be realized depending on whether a private IP address or a global IP address is used.

上記実施形態では、無線通信端末29はUSB機器であり、中継サーバから取り外し可能であるとした。しかしこれに限らず、無線通信端末が中継サーバに内蔵されていて、取り外し不可能に構成されていても良い。なおこの場合、無線通信端末による通信を無効化する手段(例えばスイッチなど)を設けておけば好適である。   In the above embodiment, the wireless communication terminal 29 is a USB device and can be removed from the relay server. However, the present invention is not limited to this, and the wireless communication terminal may be built in the relay server and cannot be removed. In this case, it is preferable to provide means (for example, a switch) for invalidating communication by the wireless communication terminal.

無線通信端末29を中継サーバから取り外し可能とする場合、当該無線通信端末29を中継サーバの第2通信部に接続するインタフェースはUSB規格に限定されず、例えばPCカード等の他の規格であっても良い。つまり、第2通信部はUSBインタフェースに限らず、その他のインタフェースであっても良い。更には、第2通信部は必ずしも無線でWANに接続するものでなくても良い。また、第1通信部は必ずしも有線でWANに接続するものでなくても良い。第2通信部がグローバルIPアドレスを利用してWANに接続し、第1通信部がアドレス変換されたIPアドレスを利用してWANに接続する構成の中継サーバであれば、第1通信部及び第2通信部の詳細にかかわらず本願発明を適用できる。   When the wireless communication terminal 29 is detachable from the relay server, the interface for connecting the wireless communication terminal 29 to the second communication unit of the relay server is not limited to the USB standard, but may be another standard such as a PC card. Also good. That is, the second communication unit is not limited to the USB interface, and may be another interface. Furthermore, the second communication unit does not necessarily have to be connected to the WAN wirelessly. The first communication unit does not necessarily have to be connected to the WAN by wire. If the second communication unit is connected to the WAN using the global IP address and the first communication unit is connected to the WAN using the IP address whose address is converted, the first communication unit and the first communication unit 2 The present invention can be applied regardless of the details of the communication unit.

上記実施形態では、IPv4のIPアドレスを利用するとしたが、例えばIPv6のIPアドレスを利用しても良い。   In the above embodiment, an IPv4 IP address is used. However, for example, an IPv6 IP address may be used.

上記実施形態では、アプリケーションの起動時に、グローバルIPアドレスとプライベートIPアドレスの何れを用いてWANに接続しているかを判定し、これに基づいてルーティングテーブルに追加のルーティング情報を設定するものとした。しかし、これに限らず、ルーティングテーブルへのルーティング情報の追加は、適宜のタイミングで行うことができる。また、上記実施形態では、アプリケーション終了時に、ルーティングテーブルに追加設定されているルーティング情報を削除するものとしたが、追加されたルーティング情報の削除は適宜のタイミングで行うことができる。ただし前述のように、中継サーバ15,16のWANへの接続態様は状況によって変わり得るので、当該接続態様に応じたルーティングテーブルの設定変更が適切なタイミングで行われることが好ましい。この点、上記実施形態のように構成すれば、中継サーバのWANへの接続態様に応じてルーティングテーブルを適切に設定したうえで、前記アプリケーションを動作させることができる。   In the above embodiment, when an application is started, it is determined which of the global IP address and the private IP address is used to connect to the WAN, and additional routing information is set in the routing table based on this. However, the present invention is not limited to this, and the addition of routing information to the routing table can be performed at an appropriate timing. In the above embodiment, the routing information additionally set in the routing table is deleted when the application ends. However, the added routing information can be deleted at an appropriate timing. However, as described above, since the connection mode of the relay servers 15 and 16 to the WAN can be changed depending on the situation, it is preferable that the setting change of the routing table according to the connection mode is performed at an appropriate timing. In this regard, if configured as in the above embodiment, the application can be operated after the routing table is appropriately set according to the connection mode of the relay server to the WAN.

11 第1LAN
12 第2LAN
14 インターネット(WAN)
15 第1中継サーバ
16 第2中継サーバ
29 無線通信端末
34 LANインタフェース(第1通信部)
35 USBインタフェース(第2通信部)
41 ルーティング処理部
43 ルーティング設定部
11 First LAN
12 Second LAN
14 Internet (WAN)
15 1st relay server 16 2nd relay server 29 Wireless communication terminal 34 LAN interface (1st communication part)
35 USB interface (second communication unit)
41 Routing processing unit 43 Routing setting unit

Claims (5)

第1LAN内のクライアント端末と、第2LAN内のクライアント端末と、の通信を、前記第2LANに接続された第2中継サーバとの間でWANを介して中継するために前記第1LANに接続された中継サーバであって、
WANに接続する際に、自身のIPアドレスとして、前記第1LANのゲートウェイでアドレス変換されたIPアドレスを利用する第1通信部と、
WANに接続する際に、自身のIPアドレスとして、グローバルIPアドレスを利用する第2通信部と、
受信したパケットを、予め設定されたルーティングテーブルに従ってルーティングするルーティング処理部と、
前記ルーティングテーブルに対して追加するルーティング情報を登録した追加ルーティング情報記憶部と、
前記第2通信部によって前記WANに接続する際に、前記追加ルーティング情報記憶部に記憶されている前記ルーティング情報を、前記ルーティングテーブルに設定するルーティング設定部と、
を備えることを特徴とする中継サーバ。
Connected to the first LAN to relay communication between the client terminal in the first LAN and the client terminal in the second LAN via the WAN to the second relay server connected to the second LAN. A relay server,
A first communication unit that uses an IP address converted by the gateway of the first LAN as its own IP address when connecting to the WAN;
A second communication unit that uses a global IP address as its own IP address when connecting to the WAN;
A routing processor that routes received packets according to a preset routing table;
An additional routing information storage unit that registers routing information to be added to the routing table;
A routing setting unit that sets the routing information stored in the additional routing information storage unit in the routing table when connecting to the WAN by the second communication unit;
A relay server comprising:
請求項1に記載の中継サーバであって、
前記第1通信部は、前記WANに接続する際に、前記第1LANの前記ゲートウェイを介して前記WANに接続し、
前記第2通信部は、前記WANに接続する際に、移動体通信網に無線接続し、当該移動体通信網を介して前記WANに接続することを特徴とする中継サーバ。
The relay server according to claim 1,
The first communication unit connects to the WAN via the gateway of the first LAN when connecting to the WAN,
The second communication unit, when connecting to the WAN, wirelessly connects to a mobile communication network and connects to the WAN via the mobile communication network.
請求項2に記載の中継サーバであって、
前記第2通信部がWANに接続可能な場合、当該第2通信部によって前記WANに接続するとともに、前記第1通信部による前記WANへの接続を禁止するWAN接続選択部を備えることを特徴とする中継サーバ。
The relay server according to claim 2,
When the second communication unit is connectable to a WAN, the second communication unit includes a WAN connection selection unit that connects to the WAN by the second communication unit and prohibits connection to the WAN by the first communication unit. Relay server to be used.
請求項1から3までの何れか一項に記載の中継サーバであって、
所定のアプリケーションを起動する際に、
前記ルーティング設定部は、
前記第2通信部によって前記WANに接続されているときには、前記ルーティングテーブルに前記ルーティング情報を追加設定し、
前記第1通信部によって前記WANに接続されているときには、前記ルーティングテーブルに前記ルーティング情報を追加設定しないことを特徴とする中継サーバ。
A relay server according to any one of claims 1 to 3,
When starting a given application,
The routing setting unit
When connected to the WAN by the second communication unit, the routing information is additionally set in the routing table,
The relay server, wherein the routing information is not additionally set in the routing table when connected to the WAN by the first communication unit.
請求項4に記載の中継サーバであって、
前記所定のアプリケーションが終了した時に、
前記ルーティング設定部は、前記ルーティング情報が前記ルーティングテーブルに追加設定されていた場合は、当該追加されたルーティング情報を、前記ルーティングテーブルから削除することを特徴とする中継サーバ。
The relay server according to claim 4,
When the predetermined application is finished,
When the routing information is additionally set in the routing table, the routing setting unit deletes the added routing information from the routing table.
JP2011289650A 2011-12-28 2011-12-28 Relay server Active JP5849695B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011289650A JP5849695B2 (en) 2011-12-28 2011-12-28 Relay server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011289650A JP5849695B2 (en) 2011-12-28 2011-12-28 Relay server

Publications (2)

Publication Number Publication Date
JP2013141072A true JP2013141072A (en) 2013-07-18
JP5849695B2 JP5849695B2 (en) 2016-02-03

Family

ID=49038166

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011289650A Active JP5849695B2 (en) 2011-12-28 2011-12-28 Relay server

Country Status (1)

Country Link
JP (1) JP5849695B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7433624B2 (en) 2019-11-29 2024-02-20 有限会社マック remote control system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002325090A (en) * 2001-04-26 2002-11-08 Nec Corp Virtual router
JP2004194104A (en) * 2002-12-12 2004-07-08 Ntt Docomo Inc Communication system, gateway device, program, and recording medium
JP2007235695A (en) * 2006-03-02 2007-09-13 Matsushita Electric Ind Co Ltd Distributed network relay apparatus and distributed network system
JP2010068051A (en) * 2008-09-08 2010-03-25 Murata Machinery Ltd Relay server and relay communication system
JP2010114693A (en) * 2008-11-06 2010-05-20 Nomura Research Institute Ltd Transmitter

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002325090A (en) * 2001-04-26 2002-11-08 Nec Corp Virtual router
JP2004194104A (en) * 2002-12-12 2004-07-08 Ntt Docomo Inc Communication system, gateway device, program, and recording medium
JP2007235695A (en) * 2006-03-02 2007-09-13 Matsushita Electric Ind Co Ltd Distributed network relay apparatus and distributed network system
JP2010068051A (en) * 2008-09-08 2010-03-25 Murata Machinery Ltd Relay server and relay communication system
JP2010114693A (en) * 2008-11-06 2010-05-20 Nomura Research Institute Ltd Transmitter

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7433624B2 (en) 2019-11-29 2024-02-20 有限会社マック remote control system

Also Published As

Publication number Publication date
JP5849695B2 (en) 2016-02-03

Similar Documents

Publication Publication Date Title
JP5348094B2 (en) Support device and computer program
US9173117B2 (en) Enhancing a mobile backup channel to address a node failure in a wireline network
WO2016210196A1 (en) Media relay server
JP6434063B2 (en) Communication control device and program
WO2016210202A1 (en) Media relay server
JP6118122B2 (en) COMMUNICATION DEVICE, ITS CONTROL METHOD, PROGRAM
TWI551086B (en) Relay server and relay communication system
JP2009038653A (en) Radio communications terminal unit and telecommunication network program
TW201238293A (en) Relay server and relay communication system
JP5367764B2 (en) Virtual network system, configuration change method, tunnel connection apparatus, and program
JP2019519146A (en) Routing establishment, packet transmission
US10177973B2 (en) Communication apparatus, communication method, and communication system
US20120185603A1 (en) Relay server and relay communication system
JP5621639B2 (en) Relay server and relay communication system
JP2010283762A (en) Communication route setting device, communication route setting method, program, and storage medium
JP5849695B2 (en) Relay server
JP5437518B2 (en) Virtual network system, configuration change method, tunnel termination device, tunnel connection device, and program
JP2009246614A (en) Communication system, terminal, relay device, communication mode determination method, and program
JP2012170008A (en) Relay server and relay communication system
JP6728745B2 (en) Server and system
JP5845898B2 (en) Relay server
JP7370066B2 (en) Communication method
JP5464360B2 (en) Mesh network and base station for realizing improved terminal information management method and communication method in mobile communication
JP6520351B2 (en) Relay apparatus, communication control method and computer program
CN112187926B (en) Method and system for transmitting and receiving data packets via at least one end-to-end connection

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141030

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150813

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150828

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20151019

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20151117

R150 Certificate of patent or registration of utility model

Ref document number: 5849695

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250