JP2019016995A - Repeating device, control method, program and system - Google Patents

Repeating device, control method, program and system Download PDF

Info

Publication number
JP2019016995A
JP2019016995A JP2017135337A JP2017135337A JP2019016995A JP 2019016995 A JP2019016995 A JP 2019016995A JP 2017135337 A JP2017135337 A JP 2017135337A JP 2017135337 A JP2017135337 A JP 2017135337A JP 2019016995 A JP2019016995 A JP 2019016995A
Authority
JP
Japan
Prior art keywords
session
communication
telnet
source
relay
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2017135337A
Other languages
Japanese (ja)
Inventor
健哉 森
Kenya Mori
健哉 森
祥順 中島
Yoshiyuki Nakashima
祥順 中島
雅英 相川
Masahide Aikawa
雅英 相川
幹夫 小曽根
Mikio Kosone
幹夫 小曽根
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2017135337A priority Critical patent/JP2019016995A/en
Publication of JP2019016995A publication Critical patent/JP2019016995A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a repeating device capable of reducing useless behaviors performed by the repeating device when a session between the repeating device and a communication destination device is disconnected, a control method, a program and a system.SOLUTION: The repeating device is a repeating device for repeating a communication between a communication source device and a communication destination device via sessions of multiple stages. The repeating device has a determination part for determining whether or not the session with the communication destination device is disconnected; and a disconnection part configured so as to, when determining the session with the communication destination device is disconnected, discontinue the session with the communication source device. The determination part is configured so as to, when a period of time has exceeded a reference without receiving any response packet from the communication destination device, check the operation of the communication destination device.SELECTED DRAWING: Figure 12

Description

本発明は、複数段のセッションによる通信を中継する技術に関する。   The present invention relates to a technique for relaying communication by a multi-stage session.

例えばtelnetのような遠隔操作プロトコルに従って、操作元装置と中継装置とを接続すると共に、中継装置と操作先装置とを接続することによって、2段セッションによる遠隔操作を行うことがある。   For example, according to a remote operation protocol such as telnet, the operation source device and the relay device may be connected, and the relay device and the operation destination device may be connected to perform remote operation using a two-stage session.

このようにすれば、操作元装置において入力されたコマンドが、操作先装置において実行され、操作元装置は、実行結果のメッセージを得ることができる。   In this way, the command input in the operation source device is executed in the operation destination device, and the operation source device can obtain an execution result message.

操作元装置と中継装置との間のセッションが何らかの理由で切断された場合に、操作元装置において入力されたコマンドは、転送されず、いずれの装置においても実行されない。一方、中継装置と操作先装置との間のセッションが切断された場合に、操作元装置において入力されたコマンドは、中継装置に至る。そして、中継装置は、コマンドを転送せずに、自ら実行してしまう場合がある。このような誤動作は、無用である。   When the session between the operation source device and the relay device is disconnected for some reason, the command input in the operation source device is not transferred and is not executed in any device. On the other hand, when the session between the relay device and the operation destination device is disconnected, the command input in the operation source device reaches the relay device. The relay device may execute the command itself without transferring the command. Such a malfunction is useless.

特開2011−129076号公報JP 2011-129076 A 特開2011−182372号公報JP 2011-182372 A

本発明の目的は、一側面では、中継装置と通信先装置とのセッションが切断された場合に、中継装置における無用な動作を減らすことである。   An object of the present invention is, in one aspect, to reduce unnecessary operations in a relay device when a session between the relay device and a communication destination device is disconnected.

一態様に係る中継装置は、複数段のセッションにより通信元装置と通信先装置との通信を中継する中継装置であって、(A)通信先装置とのセッションが切断されたか否かを判定する判定部と、(B)通信先装置とのセッションが切断されたと判定した場合に、通信元装置とのセッションを切断する切断部とを有する。   A relay device according to one aspect is a relay device that relays communication between a communication source device and a communication destination device through a multi-stage session, and determines whether or not (A) the session with the communication destination device is disconnected. A determination unit; and (B) a disconnection unit that disconnects the session with the communication source device when it is determined that the session with the communication destination device is disconnected.

一側面としては、中継装置と通信先装置とのセッションが切断された場合に、中継装置における無用な動作を減らすことができる。   As one aspect, when the session between the relay device and the communication destination device is disconnected, unnecessary operations in the relay device can be reduced.

図1は、telnetによる二段セッションの例を示す図である。FIG. 1 is a diagram illustrating an example of a two-stage session using telnet. 図2は、操作元装置、中継装置及び操作先装置のモジュール構成例を示す図である。FIG. 2 is a diagram illustrating a module configuration example of the operation source device, the relay device, and the operation destination device. 図3は、一次telnetの接続手続きに関するシーケンスを示す図である。FIG. 3 is a diagram illustrating a sequence relating to the connection procedure of the primary telnet. 図4は、二次telnetの接続手続きに関するシーケンスを示す図である。FIG. 4 is a diagram illustrating a sequence related to a secondary telnet connection procedure. 図5は、二次telnetの利用における操作元側のシーケンスを示す図である。FIG. 5 is a diagram illustrating a sequence on the operation source side in the use of the secondary telnet. 図6は、二次telnetの利用における操作先側のシーケンスを示す図である。FIG. 6 is a diagram illustrating a sequence on the operation destination side in using the secondary telnet. 図7は、二次telnetの利用における操作元側のシーケンスを示す図である。FIG. 7 is a diagram illustrating a sequence on the operation source side in the use of the secondary telnet. 図8は、二次telnetの接続切断に関するシーケンスを示す図である。FIG. 8 is a diagram illustrating a sequence relating to disconnection of the secondary telnet. 図9は、中継装置における誤動作に関するシーケンスを示す図である。FIG. 9 is a diagram illustrating a sequence relating to a malfunction in the relay device. 図10は、本実施の形態の概要を示す図である。FIG. 10 is a diagram showing an outline of the present embodiment. 図11Aは、パケットに設定されているIPアドレス及びポート番号の例を示す図である。FIG. 11A is a diagram illustrating an example of an IP address and a port number set in a packet. 図11Bは、パケットに設定されているIPアドレス及びポート番号の例を示す図である。FIG. 11B is a diagram illustrating an example of an IP address and a port number set in a packet. 図12は、中継管理部のモジュール構成例を示す図である。FIG. 12 is a diagram illustrating a module configuration example of the relay management unit. 図13は、中継テーブルの例を示す図である。FIG. 13 is a diagram illustrating an example of a relay table. 図14は、受信パケット処理フローを示す図である。FIG. 14 is a diagram showing a received packet processing flow. 図15は、受信パケット処理フローを示す図である。FIG. 15 is a diagram showing a received packet processing flow. 図16は、送信パケット処理フローを示す図である。FIG. 16 is a diagram showing a transmission packet processing flow. 図17は、中継監視処理フローを示す図である。FIG. 17 is a diagram showing a relay monitoring process flow. 図18は、中継監視処理フローを示す図である。FIG. 18 is a diagram showing a relay monitoring process flow. 図19は、コンピュータの機能ブロック図である。FIG. 19 is a functional block diagram of a computer.

図1に、telnetによる二段セッションの例を示す。操作元装置101と中継装置103との間に一次telnetセッションが確立し、更に中継装置103と操作先装置105との間に二次telnetセッションが確立している状態で、操作元装置101がコマンドを発行すると、当該コマンドは、中継装置103を介して操作先装置105へ伝送される。   FIG. 1 shows an example of a two-stage session using telnet. In a state where a primary telnet session is established between the operation source apparatus 101 and the relay apparatus 103 and a secondary telnet session is established between the relay apparatus 103 and the operation destination apparatus 105, the operation source apparatus 101 executes a command Is issued, the command is transmitted to the operation destination device 105 via the relay device 103.

なお、このように中継装置103を用いて二段セッションとするのは、たとえばセキュリティの観点により操作元装置101が属するネットワークと、操作先装置105が属するネットワークが分離されている場合などがある。   Note that the two-stage session using the relay device 103 in this way may be, for example, when the network to which the operation source device 101 belongs and the network to which the operation destination device 105 belongs are separated from the viewpoint of security.

操作先装置105は、受信したコマンドを実行して、実行結果のメッセージを返信する。実行結果のメッセージは、中継装置103を介して操作元装置101へ伝送される。このようにして、操作元装置101が、中継装置103を介して操作先装置105を遠隔操作する。この例では、操作元装置101において、遠隔操作のための一連のコマンド投入(テキスト入力)が自動化されていることを想定する。   The operation destination device 105 executes the received command and returns an execution result message. The execution result message is transmitted to the operation source apparatus 101 via the relay apparatus 103. In this way, the operation source device 101 remotely operates the operation destination device 105 via the relay device 103. In this example, it is assumed that a series of command input (text input) for remote operation is automated in the operation source apparatus 101.

図2に、操作元装置101、中継装置103及び操作先装置105のモジュール構成例を示す。   FIG. 2 shows a module configuration example of the operation source device 101, the relay device 103, and the operation destination device 105.

操作元装置101は、コマンドプログラム211、一次telnetクライアント213、ツール215、インターフェース制御部221及び通信インターフェース装置223を有する。   The operation source apparatus 101 includes a command program 211, a primary telnet client 213, a tool 215, an interface control unit 221, and a communication interface apparatus 223.

コマンドプログラム211は、コマンドを受け付けて実行する。具体的には、コマンドプログラム211は、オペレーティングシステムである。この例で、ツール215が、コマンドに相当するテキストを自動的にコマンドプログラム211へ入力する。一次telnetクライアント213は、コマンドプログラム211によって起動され、telnetの仕様に従ってクライアントとしての処理を行う。一次telnetクライアント213は、通信インターフェース装置223を制御するインターフェース制御部221を介して中継装置103との通信を行う。   The command program 211 receives and executes a command. Specifically, the command program 211 is an operating system. In this example, the tool 215 automatically inputs text corresponding to the command to the command program 211. The primary telnet client 213 is activated by the command program 211 and performs processing as a client according to the telnet specification. The primary telnet client 213 communicates with the relay apparatus 103 via the interface control unit 221 that controls the communication interface apparatus 223.

中継装置103は、一次telnetサーバ231、ネットワーク仮想端末233、コマンドプログラム235、二次telnetクライアント237、中継管理部239、インターフェース制御部241及び通信インターフェース装置243を有する。   The relay device 103 includes a primary telnet server 231, a network virtual terminal 233, a command program 235, a secondary telnet client 237, a relay management unit 239, an interface control unit 241, and a communication interface device 243.

一次telnetサーバ231は、telnetの仕様に従ってサーバとしての処理を行う。一次telnetサーバ231は、通信インターフェース装置243を制御するインターフェース制御部241を介して通信を行う。ネットワーク仮想端末233は、伝送データに関する形式的な変換を行う。尚、操作元装置101の一次telnetクライアント213、中継装置103の一次telnetサーバ231及びネットワーク仮想端末233における動作は、従来技術に基づく。   The primary telnet server 231 performs processing as a server in accordance with the telnet specification. The primary telnet server 231 performs communication via the interface control unit 241 that controls the communication interface device 243. The network virtual terminal 233 performs formal conversion on transmission data. The operations in the primary telnet client 213 of the operation source apparatus 101, the primary telnet server 231 and the network virtual terminal 233 of the relay apparatus 103 are based on the prior art.

コマンドプログラム235は、一次telnetセッションが確立している状態で、ネットワーク仮想端末233から文字又は記号のコードを受け付けて、受け付けた文字列がコマンドであると解釈した場合に、当該コマンドを実行する。具体的には、コマンドプログラム235は、オペレーティングシステムである。二次telnetクライアント237は、コマンドプログラム235によって起動され、telnetの仕様に従ってクライアントとしての処理を行う。二次telnetクライアント237は、通信インターフェース装置243を制御するインターフェース制御部241を介して操作先装置105との通信を行う。   When the command program 235 accepts a character or symbol code from the network virtual terminal 233 in a state where the primary telnet session is established, and interprets the accepted character string as a command, the command program 235 executes the command. Specifically, the command program 235 is an operating system. The secondary telnet client 237 is activated by the command program 235 and performs processing as a client according to the telnet specification. The secondary telnet client 237 communicates with the operation destination device 105 via the interface control unit 241 that controls the communication interface device 243.

操作先装置105は、二次telnetサーバ251、ネットワーク仮想端末253、コマンドプログラム255、インターフェース制御部261及び通信インターフェース装置263を有する。   The operation destination device 105 includes a secondary telnet server 251, a network virtual terminal 253, a command program 255, an interface control unit 261, and a communication interface device 263.

二次telnetサーバ251は、telnetの仕様に従ってサーバとしての処理を行う。二次telnetサーバ251は、通信インターフェース装置263を制御するインターフェース制御部261を介して通信を行う。ネットワーク仮想端末253は、伝送データに関する形式的な変換を行う。尚、中継装置103の二次telnetクライアント237、操作先装置105の二次telnetサーバ251及びネットワーク仮想端末253における動作は、従来技術に基づく。   The secondary telnet server 251 performs processing as a server in accordance with the telnet specification. The secondary telnet server 251 performs communication via the interface control unit 261 that controls the communication interface device 263. The network virtual terminal 253 performs formal conversion regarding transmission data. Note that the operations of the secondary telnet client 237 of the relay device 103 and the secondary telnet server 251 and the network virtual terminal 253 of the operation destination device 105 are based on the prior art.

コマンドプログラム255は、二次telnetセッションが確立している状態で、ネットワーク仮想端末253から文字又は記号のコードを受け付けて、受け付けた文字列がコマンドであると解釈した場合に、当該コマンドを実行する。具体的には、コマンドプログラム255は、オペレーティングシステムである。   When the secondary telnet session is established, the command program 255 receives a character or symbol code from the network virtual terminal 253, and executes the command when the received character string is interpreted as a command. . Specifically, the command program 255 is an operating system.

図3に、一次telnetの接続手続きに関するシーケンスを示す。操作元装置101のコマンドプログラム211が、操作元装置101のツール215から一次telnet接続のコマンドを受け付けたと判定すると(S301)、操作元装置101のコマンドプログラム211は、操作元装置101の一次telnetクライアント213を起動する(S303)。当該コマンドには、一次telnetの接続対象である中継装置103のIP(Internet Protocol)アドレスが含まれている。   FIG. 3 shows a sequence related to the primary telnet connection procedure. When the command program 211 of the operation source apparatus 101 determines that the command for the primary telnet connection has been received from the tool 215 of the operation source apparatus 101 (S301), the command program 211 of the operation source apparatus 101 determines that the primary telnet client of the operation source apparatus 101 is used. 213 is activated (S303). The command includes the IP (Internet Protocol) address of the relay apparatus 103 that is the connection target of the primary telnet.

操作元装置101の一次telnetクライアント213は、一次telnet接続の要求パケットを中継装置103の一次telnetサーバ231宛に送信する(S305)。そして、操作元装置101の一次telnetクライアント213と中継装置103の一次telnetサーバ231との間で、一次telnetセッションが確立される(S307)。   The primary telnet client 213 of the operation source apparatus 101 transmits a request packet for primary telnet connection to the primary telnet server 231 of the relay apparatus 103 (S305). Then, a primary telnet session is established between the primary telnet client 213 of the operation source apparatus 101 and the primary telnet server 231 of the relay apparatus 103 (S307).

一次telnetセッションが確立すると、操作元装置101の一次telnetクライアント213は、操作元装置101のコマンドプログラム211へ準備完了のメッセージを返す(S309)。準備完了のメッセージは、更に操作元装置101のツール215へ返される。   When the primary telnet session is established, the primary telnet client 213 of the operation source apparatus 101 returns a preparation completion message to the command program 211 of the operation source apparatus 101 (S309). The preparation completion message is further returned to the tool 215 of the operation source apparatus 101.

操作元装置101のツール215は、操作元装置101のコマンドプログラム211へ文字又は記号のコードを入力する。ここでは、二次telnet接続のコマンドが1文字ずつ入力されるものとする。   The tool 215 of the operation source apparatus 101 inputs a character or symbol code to the command program 211 of the operation source apparatus 101. Here, it is assumed that a command for secondary telnet connection is input character by character.

操作元装置101のコマンドプログラム211が、操作元装置101のツール215から文字又は記号のコードを受け付けると(S311)、文字又は記号のコードが操作元装置101の一次telnetクライアント213へ渡される。操作元装置101の一次telnetクライアント213は、文字又は記号のコードを所定形式に変換する。そして、所定形式の文字又は記号のコードを含む一次telnetの転送パケットが、操作元装置101の一次telnetクライアント213から中継装置103の一次telnetサーバ231へ送られる(S313)。   When the command program 211 of the operation source apparatus 101 receives a character or symbol code from the tool 215 of the operation source apparatus 101 (S311), the character or symbol code is passed to the primary telnet client 213 of the operation source apparatus 101. The primary telnet client 213 of the operation source apparatus 101 converts a character or symbol code into a predetermined format. Then, a primary telnet transfer packet including a character or symbol code in a predetermined format is sent from the primary telnet client 213 of the operation source apparatus 101 to the primary telnet server 231 of the relay apparatus 103 (S313).

中継装置103のネットワーク仮想端末233が、中継装置103の一次telnetサーバ231から受けた文字又は記号のコードを中継装置103における形式の文字又は記号のコードへ変換して、中継装置103のコマンドプログラム235へ渡す(S315、S317)。   The network virtual terminal 233 of the relay device 103 converts the character or symbol code received from the primary telnet server 231 of the relay device 103 into the character or symbol code in the format of the relay device 103, and the command program 235 of the relay device 103. (S315, S317).

図4に示したシーケンスに移る。中継装置103のコマンドプログラム235が、文字又は記号のコードを複数回受けて、その結果二次telnet接続のコマンドを受け付けたと判定すると(S401)、中継装置103のコマンドプログラム235は、中継装置103の二次telnetクライアント237を起動する(S403)。当該コマンドには、二次telnetの接続対象である操作先装置105のIPアドレスが含まれている。   The sequence moves to the sequence shown in FIG. When the command program 235 of the relay device 103 receives the code of the character or symbol multiple times and as a result determines that the command of the secondary telnet connection has been received (S401), the command program 235 of the relay device 103 The secondary telnet client 237 is activated (S403). The command includes the IP address of the operation destination device 105 that is the connection target of the secondary telnet.

中継装置103の二次telnetクライアント237は、二次telnet接続の要求パケットを操作先装置105の二次telnetサーバ251宛に送信する(S405)。そして、中継装置103の二次telnetクライアント237と操作先装置105の二次telnetサーバ251との間で、二次telnetセッションが確立される(S407)。   The secondary telnet client 237 of the relay device 103 transmits a request packet for secondary telnet connection to the secondary telnet server 251 of the operation destination device 105 (S405). Then, a secondary telnet session is established between the secondary telnet client 237 of the relay device 103 and the secondary telnet server 251 of the operation destination device 105 (S407).

二次telnetセッションが確立すると、中継装置103の二次telnetクライアント237は、中継装置103のコマンドプログラム235へ準備完了のメッセージを返す(S409)。このメッセージを受けた中継装置103のコマンドプログラム235は、図5に示すように、準備完了のメッセージを、中継装置103のネットワーク仮想端末233を介して中継装置103の一次telnetサーバ231へ送る(S501、S503)。   When the secondary telnet session is established, the secondary telnet client 237 of the relay apparatus 103 returns a preparation completion message to the command program 235 of the relay apparatus 103 (S409). Upon receiving this message, the command program 235 of the relay device 103 sends a message of completion of preparation to the primary telnet server 231 of the relay device 103 via the network virtual terminal 233 of the relay device 103 (S501). , S503).

中継装置103の一次telnetサーバ231は、この準備完了のメッセージを含む二次telnetの応答パケットを操作元装置101の一次telnetクライアント213へ返す(S505)。そして、準備完了のメッセージは、操作元装置101のコマンドプログラム211に送られ(S507)、操作元装置101のコマンドプログラム211からツール215へ返される。   The primary telnet server 231 of the relay apparatus 103 returns a response packet of the secondary telnet including this preparation completion message to the primary telnet client 213 of the operation source apparatus 101 (S505). The preparation completion message is sent to the command program 211 of the operation source apparatus 101 (S507), and is returned from the command program 211 of the operation source apparatus 101 to the tool 215.

操作元装置101のツール215は、続けて操作元装置101のコマンドプログラム211へ文字又は記号のコードを入力する。ここでは、操作先装置105のコマンドプログラム255に実行させることを意図したコマンド、つまり遠隔操作の内容に相当するコマンドが1文字ずつ入力されるものとする。なお、操作元装置101のツール215は、上記した二次telnetの接続に関する準備完了のメッセージの到達(S507)を確認してからコードを入力する処理を開始しても良い。また、操作元装置101のツール215は、操作先装置105に対する遠隔操作の内容に相当する一連のコマンドを記憶しておき、記憶されたコマンドを読み出してコマンドプログラム211へ入力するようにプログラムされていても良い。   The tool 215 of the operation source apparatus 101 subsequently inputs a character or symbol code to the command program 211 of the operation source apparatus 101. Here, it is assumed that a command intended to be executed by the command program 255 of the operation destination device 105, that is, a command corresponding to the content of the remote operation is input character by character. Note that the tool 215 of the operation source apparatus 101 may start the process of inputting a code after confirming the arrival of the preparation completion message regarding the secondary telnet connection (S507). Further, the tool 215 of the operation source apparatus 101 is programmed to store a series of commands corresponding to the contents of the remote operation on the operation destination apparatus 105, read the stored commands, and input them to the command program 211. May be.

操作元装置101のコマンドプログラム211が、操作元装置101のツール215から文字又は記号のコードを受け付けると(S509)、文字又は記号のコードが操作元装置101の一次telnetクライアント213へ渡される。上述の通り、操作元装置101の一次telnetクライアント213は、文字又は記号のコードを所定形式に変換する。所定形式の文字又は記号のコードを含む一次telnetの転送パケットが、操作元装置101の一次telnetクライアント213から中継装置103の一次telnetサーバ231へ送られる(S511)。   When the command program 211 of the operation source apparatus 101 receives a character or symbol code from the tool 215 of the operation source apparatus 101 (S509), the character or symbol code is passed to the primary telnet client 213 of the operation source apparatus 101. As described above, the primary telnet client 213 of the operation source apparatus 101 converts a character or symbol code into a predetermined format. A primary telnet transfer packet including a character or symbol code in a predetermined format is sent from the primary telnet client 213 of the operation source apparatus 101 to the primary telnet server 231 of the relay apparatus 103 (S511).

中継装置103のネットワーク仮想端末233が、中継装置103の一次telnetサーバ231から受けた文字又は記号のコードを中継装置103における形式の文字又は記号のコードへ変換して、中継装置103のコマンドプログラム235へ渡す(S513、S515)。   The network virtual terminal 233 of the relay device 103 converts the character or symbol code received from the primary telnet server 231 of the relay device 103 into the character or symbol code in the format of the relay device 103, and the command program 235 of the relay device 103. (S513, S515).

ここで、図4に示したシーケンスに戻る。中継装置103のコマンドプログラム235が、中継装置103のネットワーク仮想端末233から文字又は記号のコードを受け付けると(S411)、文字又は記号のコードが中継装置103の二次telnetクライアント237へ渡される。上述の通り、中継装置103の二次telnetクライアント237は、文字又は記号のコードを所定形式に変換する。所定形式の文字又は記号のコードを含む二次telnetの転送パケットが、中継装置103の二次telnetクライアント237から操作先装置105の二次telnetサーバ251へ送られる(S413)。   Here, the sequence returns to the sequence shown in FIG. When the command program 235 of the relay device 103 receives a character or symbol code from the network virtual terminal 233 of the relay device 103 (S411), the character or symbol code is passed to the secondary telnet client 237 of the relay device 103. As described above, the secondary telnet client 237 of the relay apparatus 103 converts the character or symbol code into a predetermined format. A secondary telnet transfer packet including a character or symbol code in a predetermined format is sent from the secondary telnet client 237 of the relay apparatus 103 to the secondary telnet server 251 of the operation destination apparatus 105 (S413).

操作先装置105のネットワーク仮想端末253が、操作先装置105の二次telnetサーバ251から受けた文字又は記号のコードを操作先装置105における形式の文字又は記号のコードへ変換して、操作先装置105のコマンドプログラム255へ渡す(S415、S417)。   The network virtual terminal 253 of the operation destination device 105 converts the character or symbol code received from the secondary telnet server 251 of the operation destination device 105 into the character or symbol code in the format of the operation destination device 105, and the operation destination device 105 is passed to the command program 255 (S415, S417).

図6に示したシーケンスに移る。操作先装置105のコマンドプログラム255は、文字又は記号のコードをたとえば複数回受けて、その結果自らが実行すべきコマンドを受け付けたと判定すると(S601)。当該コマンドの処理を実行する(S603)。   The sequence moves to the sequence shown in FIG. When the command program 255 of the operation destination device 105 receives a character or symbol code, for example, a plurality of times, and determines that it has received a command to be executed by itself (S601). Processing of the command is executed (S603).

このようにして操作元装置101から操作先装置105への、遠隔操作の内容に相当するコマンドが転送され、操作先装置105で実行されることになる。   In this way, a command corresponding to the content of the remote operation is transferred from the operation source apparatus 101 to the operation destination apparatus 105 and executed by the operation destination apparatus 105.

そして、操作先装置105のコマンドプログラム255は、操作先装置105のネットワーク仮想端末253へコマンドの実行結果のメッセージを返す(S605)。操作先装置105の二次telnetサーバ251は、操作先装置105のネットワーク仮想端末253から受けたコマンドの実行結果のメッセージを含む二次telnetの応答パケットを中継装置103の二次telnetクライアント237へ送信する(S607、S609)。   Then, the command program 255 of the operation destination device 105 returns a command execution result message to the network virtual terminal 253 of the operation destination device 105 (S605). The secondary telnet server 251 of the operation destination device 105 transmits a response packet of the secondary telnet including the command execution result message received from the network virtual terminal 253 of the operation destination device 105 to the secondary telnet client 237 of the relay device 103. (S607, S609).

中継装置103の二次telnetクライアント237は、二次telnetの応答パケットから抽出したコマンドの実行結果のメッセージを中継装置103のコマンドプログラム235へ渡す(S611)。   The secondary telnet client 237 of the relay device 103 passes a command execution result message extracted from the response packet of the secondary telnet to the command program 235 of the relay device 103 (S611).

図7に示したシーケンスに移る。中継装置103のコマンドプログラム235は、コマンドの実行結果のメッセージを中継装置103のネットワーク仮想端末233へ渡す(S701)。中継装置103の一次telnetサーバ231は、中継装置103のネットワーク仮想端末233から受けたコマンドの実行結果のメッセージを含む一次telnetの応答パケットを操作元装置101の一次telnetクライアント213宛に送信する(S703、S705)。   The sequence moves to the sequence shown in FIG. The command program 235 of the relay device 103 passes the message of the command execution result to the network virtual terminal 233 of the relay device 103 (S701). The primary telnet server 231 of the relay device 103 transmits a response packet of the primary telnet including a command execution result message received from the network virtual terminal 233 of the relay device 103 to the primary telnet client 213 of the operation source device 101 (S703). , S705).

操作元装置101の一次telnetクライアント213は、一次telnetの応答パケットから抽出したコマンドの実行結果のメッセージを操作元装置101のコマンドプログラム211へ渡す(S707)。そして、コマンドの実行結果のメッセージは、操作元装置101のツール215へ渡される。このようにして、遠隔操作が実現される。   The primary telnet client 213 of the operation source apparatus 101 passes a command execution result message extracted from the response packet of the primary telnet to the command program 211 of the operation source apparatus 101 (S707). The command execution result message is passed to the tool 215 of the operation source apparatus 101. In this way, remote operation is realized.

続いて、図8を用いて、上述したように一次telnetセッションと二次telnetセッションとが確立されている状態で、二次telnetセッションが切断された場合のシーケンスについて説明する。中継装置103の二次telnetクライアント237と操作先装置105の二次telnetサーバ251との間の二次telnetセッションが、何らかの理由によって切断されたと想定する(S801)。   Next, a sequence when the secondary telnet session is disconnected in a state where the primary telnet session and the secondary telnet session are established as described above will be described with reference to FIG. It is assumed that the secondary telnet session between the secondary telnet client 237 of the relay device 103 and the secondary telnet server 251 of the operation destination device 105 is disconnected for some reason (S801).

S803において、S411の場合と同様に、中継装置103のコマンドプログラム235が、中継装置103のネットワーク仮想端末233から文字又は記号のコードを受け付けると、文字又は記号のコードが中継装置103の二次telnetクライアント237へ渡される。但し、この場合には、中継装置103の二次telnetクライアント237は、所定形式の文字又は記号のコードを含む二次telnetの転送パケットを送れない(S805)。   In S803, as in S411, when the command program 235 of the relay device 103 receives a character or symbol code from the network virtual terminal 233 of the relay device 103, the character or symbol code is converted to the secondary telnet of the relay device 103. Passed to the client 237. However, in this case, the secondary telnet client 237 of the relay apparatus 103 cannot send a secondary telnet transfer packet including a character or symbol code in a predetermined format (S805).

図9に示したシーケンスに移る。この場合、中継装置103のコマンドプログラム235は、操作先装置105のコマンドプログラム255によって実行されることを意図して送られたコマンドを自らが受け付けたと判定する(S901)。その結果、中継装置103のコマンドプログラム235がこのコマンドの処理を実行する(S903)。そして、中継装置103のコマンドプログラム235は、自らのコマンドの実行結果のメッセージを中継装置103のネットワーク仮想端末233へ返す(S905)。中継装置103の一次telnetサーバ231は、中継装置103のネットワーク仮想端末233から受けたコマンドの実行結果のメッセージを含む一次telnetの応答パケットを操作元装置101の一次telnetクライアント213へ送信する(S907、S909)。   The sequence moves to the sequence shown in FIG. In this case, the command program 235 of the relay apparatus 103 determines that it has received a command sent with the intention of being executed by the command program 255 of the operation destination apparatus 105 (S901). As a result, the command program 235 of the relay apparatus 103 executes processing of this command (S903). Then, the command program 235 of the relay apparatus 103 returns a message of the execution result of its own command to the network virtual terminal 233 of the relay apparatus 103 (S905). The primary telnet server 231 of the relay device 103 transmits a response packet of the primary telnet including a command execution result message received from the network virtual terminal 233 of the relay device 103 to the primary telnet client 213 of the operation source device 101 (S907, S909).

操作元装置101の一次telnetクライアント213は、一次telnetの応答パケットから抽出したコマンドの実行結果のメッセージを操作元装置101のコマンドプログラム211へ渡す(S911)。そして、コマンドの実行結果のメッセージは、操作元装置101のツール215へ渡される。このとき、操作元装置101のツール215は、中継装置103のコマンドプログラム235におけるコマンドの実行結果のメッセージを、操作先装置105のコマンドプログラム255におけるコマンドの実行結果のメッセージであると解釈することになる。   The primary telnet client 213 of the operation source apparatus 101 passes a command execution result message extracted from the response packet of the primary telnet to the command program 211 of the operation source apparatus 101 (S911). The command execution result message is passed to the tool 215 of the operation source apparatus 101. At this time, the tool 215 of the operation source apparatus 101 interprets the message of the command execution result in the command program 235 of the relay apparatus 103 as the message of the command execution result in the command program 255 of the operation destination apparatus 105. Become.

以上のように、操作先装置105に対して正常な動作をさせることができずに、中継装置103に誤動作をさせることになる。また、操作元装置101において誤った認識をすることになる。そして、操作元装置101のツール215において自動化された動作が続けば、中継装置103に対する誤操作は継続される。   As described above, normal operation cannot be performed on the operation destination device 105, and the relay device 103 is caused to malfunction. In addition, the operation source apparatus 101 performs erroneous recognition. And if the operation | movement automated in the tool 215 of the operation origin apparatus 101 continues, the misoperation with respect to the relay apparatus 103 will be continued.

図10に、本実施の形態の概要を示す。上段に示すように、操作元装置101と中継装置103との間の一次telnetセッション及び中継装置103と操作先装置105との間の二次telnetセッションが確立している状態で、なんらかの理由で二次telnetセッションが切断されたとする。すると、中継装置103はこの二次telnetセッションの切断を検出する。そして、図10の下段に示すように、この二次telnetセッションの切断の検出を受けて、中継装置103は、対応する一次telnetセッションを切断する。このようにすれば、上述した不具合を未然に防ぐことができる。   FIG. 10 shows an outline of the present embodiment. As shown in the upper part, in a state where a primary telnet session between the operation source apparatus 101 and the relay apparatus 103 and a secondary telnet session between the relay apparatus 103 and the operation destination apparatus 105 have been established, there are two reasons for some reason. Assume that the next telnet session is disconnected. Then, the relay apparatus 103 detects disconnection of this secondary telnet session. Then, as shown in the lower part of FIG. 10, upon receiving the detection of the disconnection of the secondary telnet session, the relay apparatus 103 disconnects the corresponding primary telnet session. In this way, the above-described problems can be prevented.

ここで、この例で各パケットに設定されているIPアドレス及びポート番号の例について、図11A及び図11Bを用いて説明する。   Here, an example of the IP address and port number set in each packet in this example will be described with reference to FIGS. 11A and 11B.

図11Aに示すように、図3のS305に示した一次telnet接続の要求パケットの送信元IPアドレスにad_Aが設定され、更に送信元ポート番号にno_Nが設定されている。ad_Aは、操作元装置101のIPアドレスである。no_Nは、操作元装置101の一次telnetクライアント213におけるポート番号である。同じく一次telnet接続の要求パケットの宛先IPアドレスにはad_Bが設定され、更に宛先ポート番号に23が設定されている。ad_Bは、中継装置103の第1IPアドレスである。23は、中継装置103の一次telnetサーバ231におけるポート番号、つまりtelnet用のポート番号である。尚、この例で、中継装置103には、IPアドレスが2つ割り当てられているものとする。すなわち、中継装置103には、一次telnet用としてIPアドレス:ad_B、ポート番号23が、二次telnet用としてIPアドレス:ad_C、ポート番号no_Mが割当てられているものとする。ここで、ポート番号:23は、telnetサービスを提供するtelnetサーバのポート番号として一般的なもの(ウェルノウンポート番号)である。   As shown in FIG. 11A, ad_A is set in the source IP address of the request packet for the primary telnet connection shown in S305 in FIG. 3, and no_N is set in the source port number. ad_A is the IP address of the operation source apparatus 101. no_N is a port number in the primary telnet client 213 of the operation source apparatus 101. Similarly, ad_B is set as the destination IP address of the request packet for the primary telnet connection, and 23 is set as the destination port number. ad_B is the first IP address of the relay apparatus 103. 23 is a port number in the primary telnet server 231 of the relay apparatus 103, that is, a telnet port number. In this example, it is assumed that the relay apparatus 103 is assigned two IP addresses. That is, it is assumed that the relay apparatus 103 is assigned an IP address: ad_B and port number 23 for primary telnet, and an IP address: ad_C and port number no_M for secondary telnet. Here, the port number: 23 is a general port number of a telnet server that provides a telnet service (well-known port number).

図3のS313に示した一次telnetの転送パケットに設定されている送信元IPアドレス、送信元ポート番号、宛先IPアドレス及び宛先ポート番号は、図11Aに示すように上述した一次telnet接続の要求パケットの場合と同様である。   The source IP address, source port number, destination IP address, and destination port number set in the primary telnet transfer packet shown in S313 of FIG. 3 are the above-mentioned primary telnet connection request packets as shown in FIG. 11A. It is the same as the case of.

尚、S401において受け付けられた二次telnet接続のコマンド「telnet」に付加されているIPアドレスは、二次telnet接続の対象である操作先装置105のIPアドレス:ad_Dである。   Note that the IP address added to the command “telnet” of the secondary telnet connection accepted in S401 is the IP address: ad_D of the operation destination apparatus 105 that is the target of the secondary telnet connection.

図4のS405に示した二次telnet接続の要求パケットの送信元IPアドレスにad_Cが設定され、更に送信元ポート番号にno_Mが設定されている。ad_Cは、中継装置103の第2IPアドレスである。同じく二次telnet接続の要求パケットの宛先IPアドレスにad_Dが設定され、更に宛先ポート番号に23が設定されている。   In the secondary telnet connection request packet shown in S405 of FIG. 4, ad_C is set as the source IP address, and no_M is set as the source port number. ad_C is the second IP address of the relay apparatus 103. Similarly, ad_D is set as the destination IP address of the request packet for the secondary telnet connection, and 23 is set as the destination port number.

図11Bの説明に移る。図5のS511に示した一次telnetの転送パケットは、図11Aで説明した一次telnet接続の要求パケットの場合と同様である。   Turning to the description of FIG. 11B. The transfer packet of the primary telnet shown in S511 of FIG. 5 is the same as the request packet of the primary telnet connection described with reference to FIG. 11A.

図4のS413に示した二次telnetの転送パケットの送信元IPアドレスには、図11Bに示すようにad_Cが設定され、更に送信元ポート番号にno_Mが設定されている。同じく二次telnetの転送パケットの宛先IPアドレスにad_Dが設定され、宛先ポート番号に23が設定されている。   As shown in FIG. 11B, ad_C is set in the source IP address of the secondary telnet transfer packet shown in S413 of FIG. 4, and no_M is set in the source port number. Similarly, ad_D is set as the destination IP address of the transfer packet of the secondary telnet, and 23 is set as the destination port number.

図6のS609に示した二次telnetの応答パケットの送信元IPアドレスには、図11Bに示すようにad_Dが設定され、更に送信元ポート番号に23が設定されている。同じく二次telnetの応答パケットの宛先IPアドレスにad_Cが設定され、更に宛先ポート番号にno_Mが設定されている。   As shown in FIG. 11B, ad_D is set in the source IP address of the secondary telnet response packet shown in S609 in FIG. 6, and 23 is set in the source port number. Similarly, ad_C is set as the destination IP address of the response packet of the secondary telnet, and no_M is set as the destination port number.

図7のS705に示した一次telnetの応答パケットの送信元IPアドレスには、図11Bに示すようにad_Bが設定され、更に送信元ポート番号に23が設定されている。同じく一次telnetの応答パケットの宛先IPアドレスにad_Aが設定され、更に宛先ポート番号にno_Nが設定されている。このようにパケットの送信元IPアドレス、送信元ポート番号、宛先IPアドレス、宛先ポート番号には、そのセッションを終端している装置のIPアドレス、ポート番号が設定されることとなる。ここで、セッションを終端している装置は、一次telnetセッションでは操作元装置101と中継装置103であり、二次telnetセッションでは中継装置103と操作先装置105である。以上で本実施の形態における概要の説明を終える。   As shown in FIG. 11B, ad_B is set in the source IP address of the primary telnet response packet shown in S705 of FIG. 7, and 23 is set in the source port number. Similarly, ad_A is set as the destination IP address of the response packet of the primary telnet, and no_N is set as the destination port number. Thus, the IP address and port number of the device that terminates the session are set in the source IP address, source port number, destination IP address, and destination port number of the packet. Here, the devices that terminate the session are the operation source device 101 and the relay device 103 in the primary telnet session, and the relay device 103 and the operation destination device 105 in the secondary telnet session. This is the end of the description of the outline of the present embodiment.

以下、中継装置103の動作について説明する。図12に、中継装置103における中継管理部239のモジュール構成例を示す。中継管理部239は、第1取得部1201、第1抽出部1203、第2抽出部1205、第2取得部1207、第3抽出部1209、判定部1211、切断部1213、中継テーブル記憶部1221及びバッファ1223を有する。   Hereinafter, the operation of the relay apparatus 103 will be described. FIG. 12 shows a module configuration example of the relay management unit 239 in the relay apparatus 103. The relay management unit 239 includes a first acquisition unit 1201, a first extraction unit 1203, a second extraction unit 1205, a second acquisition unit 1207, a third extraction unit 1209, a determination unit 1211, a disconnection unit 1213, a relay table storage unit 1221, and A buffer 1223 is included.

第1取得部1201は、インターフェース制御部241から順次受信パケットを1つ取得する。第1抽出部1203は、一次telnet接続の要求パケットから送信元IPアドレス及び送信元ポート番号を抽出する。   The first acquisition unit 1201 sequentially acquires one received packet from the interface control unit 241. The first extraction unit 1203 extracts the transmission source IP address and the transmission source port number from the request packet for the primary telnet connection.

第2抽出部1205は、一次telnetの転送パケットから二次telnet接続のコマンドに付加されているIPアドレスを抽出する。   The second extraction unit 1205 extracts the IP address added to the secondary telnet connection command from the primary telnet transfer packet.

第2取得部1207は、インターフェース制御部241から順次送信パケットを1つ取得する。第3抽出部1209は、二次telnet接続の要求パケットから送信元ポート番号を抽出する。判定部1211は、二次telnetセッションが切断されたか否かを判定する。換言すると、判定部1211は二次telnetセッションの切断を検出する。切断部1213は、一次telnetセッションを切断する。   The second acquisition unit 1207 sequentially acquires one transmission packet from the interface control unit 241. The third extraction unit 1209 extracts the source port number from the secondary telnet connection request packet. The determination unit 1211 determines whether the secondary telnet session is disconnected. In other words, the determination unit 1211 detects disconnection of the secondary telnet session. The cutting unit 1213 cuts the primary telnet session.

中継テーブル記憶部1221は、中継テーブルを記憶する。中継テーブルについては、図13を用いて後述する。バッファ1223は、遠隔操作でコマンドラインに入力される文字列を記憶し、コマンドを特定するために用いられる。   The relay table storage unit 1221 stores the relay table. The relay table will be described later with reference to FIG. The buffer 1223 stores a character string input to the command line by remote control and is used for specifying a command.

上述した第1取得部1201、第1抽出部1203、第2抽出部1205、第2取得部1207、第3抽出部1209、判定部1211及び切断部1213、は、ハードウエア資源(例えば、図19)と、以下で述べる処理をプロセッサに実行させるプログラムとを用いて実現される。   The first acquisition unit 1201, the first extraction unit 1203, the second extraction unit 1205, the second acquisition unit 1207, the third extraction unit 1209, the determination unit 1211, and the cutting unit 1213 described above are hardware resources (for example, FIG. 19). ) And a program for causing the processor to execute the processing described below.

上述した中継テーブル記憶部1221及びバッファ1223は、ハードウエア資源(例えば、図19)を用いて実現される。   The relay table storage unit 1221 and the buffer 1223 described above are realized using hardware resources (for example, FIG. 19).

図13に、中継テーブルの例を示す。この例における中継テーブルは、二段セッションの中継イベントに対応するレコードを有している。中継テーブルのレコードは、操作元IPアドレスが格納されるフィールドと、操作元ポート番号が格納されるフィールドと、転送ポート番号が格納されるフィールドと、操作先IPアドレスが格納されるフィールドとを有している。   FIG. 13 shows an example of the relay table. The relay table in this example has a record corresponding to the relay event of the two-stage session. The record of the relay table has a field for storing the operation source IP address, a field for storing the operation source port number, a field for storing the transfer port number, and a field for storing the operation destination IP address. doing.

操作元IPアドレスは、一次telnet接続におけるクライアント装置のIPアドレスを示す。すなわち、操作元IPアドレスは操作元装置101のIPアドレス(この例では、ad_A)である。操作元ポート番号は、一次telnet接続におけるクライアント装置のポート番号を示す。すなわち、操作元ポート番号は、操作元装置101における一次telnetクライアント213のポート番号(この例では、no_N)である。転送ポート番号は、二次telnet接続におけるクライアント装置のポート番号を示す。すなわち、転送ポート番号は、中継装置103における二次telnetクライアント237のポート番号(この例では、no_M)である。操作先IPアドレスは、二次telnet接続におけるサーバ装置のIPアドレスを示す。すなわち、操作先IPアドレスは、操作先装置105のIPアドレス(この例では、ad_D)である。   The operation source IP address indicates the IP address of the client device in the primary telnet connection. That is, the operation source IP address is the IP address of the operation source apparatus 101 (in this example, ad_A). The operation source port number indicates the port number of the client device in the primary telnet connection. That is, the operation source port number is the port number of the primary telnet client 213 in the operation source apparatus 101 (in this example, no_N). The transfer port number indicates the port number of the client device in the secondary telnet connection. That is, the transfer port number is the port number of the secondary telnet client 237 in the relay apparatus 103 (in this example, no_M). The operation destination IP address indicates the IP address of the server device in the secondary telnet connection. That is, the operation destination IP address is the IP address of the operation destination device 105 (in this example, ad_D).

続いて、中継管理部239における処理について説明する。図14に、受信パケット処理フローを示す。第1取得部1201は、インターフェース制御部241から受信パケットを1つ取得する(S1401)。第1抽出部1203は、取得した受信パケットを解析し、telnet接続の要求であるか否かを判定する(S1403)。   Next, processing in the relay management unit 239 will be described. FIG. 14 shows a received packet processing flow. The first acquisition unit 1201 acquires one received packet from the interface control unit 241 (S1401). The first extraction unit 1203 analyzes the acquired received packet and determines whether it is a request for telnet connection (S1403).

取得した受信パケットがtelnet接続の要求であると判定した場合には、第1抽出部1203は、取得した受信パケットから送信元IPアドレス(この例では、ad_A)及び送信元ポート番号(この例では、no_N)を抽出する(S1405)。   When it is determined that the acquired received packet is a request for telnet connection, the first extraction unit 1203 determines the source IP address (ad_A in this example) and the source port number (in this example) from the acquired received packet. , No_N) is extracted (S1405).

第1抽出部1203は、中継テーブルに新しいレコードを設ける(S1407)。第1抽出部1203は、送信元IPアドレスを、当該レコードにおける操作元IPアドレスのフィールドに格納する(S1409)。第1抽出部1203は、送信元ポート番号を、当該レコードにおける操作元ポート番号のフィールドに格納する(S1411)。この段階で、図13の上段に示した状態になる。転送ポート番号のフィールド及び操作先IPアドレスのフィールドには、未設定の旨を示すコードが格納されている。   The first extraction unit 1203 provides a new record in the relay table (S1407). The first extraction unit 1203 stores the transmission source IP address in the field of the operation source IP address in the record (S1409). The first extraction unit 1203 stores the transmission source port number in the operation source port number field in the record (S1411). At this stage, the state shown in the upper part of FIG. 13 is obtained. In the transfer port number field and the operation destination IP address field, a code indicating that it is not set is stored.

その後、S1401に示した処理に戻る。   Thereafter, the process returns to S1401.

S1403において、取得した受信パケットがtelnet接続の要求でないと判定した場合には、端子Aを介して、図15に示したS1501の処理に移る。   If it is determined in S1403 that the acquired received packet is not a request for telnet connection, the process proceeds to the process of S1501 illustrated in FIG.

図15の説明に移る。第2抽出部1205は、図14のS1401において取得した受信パケットが、telnetの転送パケットであるか否かを判定する(S1501)。当該受信パケットがtelnetの転送パケットではないと判定した場合には、端子Bを介して、図14に示したS1401の処理に戻る。   Turning to the description of FIG. The second extraction unit 1205 determines whether or not the received packet acquired in S1401 of FIG. 14 is a telnet transfer packet (S1501). If it is determined that the received packet is not a telnet transfer packet, the process returns to the processing of S1401 illustrated in FIG.

一方、当該受信パケットがtelnetの転送パケットであると判定した場合には、第2抽出部1205は、図14のS1401において取得した受信パケットから送信元IPアドレス及び送信元ポート番号を抽出する(S1503)。   On the other hand, if it is determined that the received packet is a telnet transfer packet, the second extraction unit 1205 extracts the source IP address and the source port number from the received packet acquired in S1401 of FIG. 14 (S1503). ).

第2抽出部1205は、抽出した送信元IPアドレス及び送信元ポート番号が、中継テーブルにおけるいずれかのレコードの「操作元IPアドレス」フィールドの値及び「操作元ポート番号」フィールドの値と一致するか否かを判定する(S1505)。抽出した送信元IPアドレス及び送信元ポート番号と一致するレコードが中継テーブルにないと判定した場合には、端子Bを介して、図14に示したS1401の処理に戻る。   The second extraction unit 1205 matches the extracted source IP address and source port number with the value of the “operation source IP address” field and the value of the “operation source port number” field of any record in the relay table. It is determined whether or not (S1505). If it is determined that there is no record in the relay table that matches the extracted source IP address and source port number, the processing returns to the processing of S1401 shown in FIG.

一方、抽出した送信元IPアドレス及び送信元ポート番号と一致するレコードが中継テーブルにあると判定した場合には、第2抽出部1205は、図14のS1401において取得した受信パケットから、文字又は記号のコードを抽出する(S1507)。第2抽出部1205は、文字又は記号のコードをバッファ1223に加える(S1509)。   On the other hand, if it is determined that there is a record in the relay table that matches the extracted source IP address and source port number, the second extraction unit 1205 determines the character or symbol from the received packet acquired in S1401 of FIG. Are extracted (S1507). The second extraction unit 1205 adds the character or symbol code to the buffer 1223 (S1509).

第2抽出部1205は、バッファ1223に蓄えた文字列がtelnet接続のコマンド及びIPアドレスに該当するか否かを判定する(S1511)。バッファ1223に蓄えた文字列がtelnet接続のコマンド及びIPアドレスに該当しないと判定した場合には、端子Bを介して、図14に示したS1401の処理に戻る。一方、バッファ1223に蓄えた文字列がtelnet接続のコマンド及びIPアドレスに該当すると判定した場合には、第2抽出部1205は、当該IPアドレスを、図14のS1407に設けたレコードにおける操作先IPアドレスのフィールドに格納する(S1513)。このtelnet接続のコマンドは、一次telnetセッションを通して操作元装置101から送信した、二次telnet接続のコマンドである。そして、抽出されたIPアドレスは、二次telnet接続先の装置、すなわち、操作先装置105のIPアドレスである。この段階で、図13の中段に示した状態になる。そして、端子Bを介して、図14に示したS1401の処理に戻る。以上で、受信パケット処理の説明を終える。   The second extraction unit 1205 determines whether or not the character string stored in the buffer 1223 corresponds to a telnet connection command and an IP address (S1511). If it is determined that the character string stored in the buffer 1223 does not correspond to the telnet connection command and the IP address, the process returns to the process of S1401 illustrated in FIG. On the other hand, if it is determined that the character string stored in the buffer 1223 corresponds to the telnet connection command and the IP address, the second extraction unit 1205 uses the IP address in the record provided in S1407 of FIG. Store in the address field (S1513). This telnet connection command is a secondary telnet connection command transmitted from the operation source apparatus 101 through the primary telnet session. The extracted IP address is the IP address of the secondary telnet connection destination device, that is, the operation destination device 105. At this stage, the state shown in the middle of FIG. Then, the processing returns to S1401 shown in FIG. This is the end of the description of the received packet processing.

図16に、送信パケット処理フローを示す。送信パケット処理は、上述した受信パケット処理と並行に実行されても良い。   FIG. 16 shows a transmission packet processing flow. The transmission packet processing may be executed in parallel with the reception packet processing described above.

第2取得部1207は、インターフェース制御部241から送信パケットを1つ取得する(S1601)。第3抽出部1209は、取得した送信パケットがtelnet接続の要求であるか否かを判定する(S1603)。取得した送信パケットがtelnet接続の要求でないと判定した場合には、S1601に示した処理に戻る。   The second acquisition unit 1207 acquires one transmission packet from the interface control unit 241 (S1601). The third extraction unit 1209 determines whether or not the acquired transmission packet is a request for telnet connection (S1603). If it is determined that the acquired transmission packet is not a request for telnet connection, the process returns to S1601.

一方、取得した送信パケットがtelnet接続の要求であると判定した場合には、第3抽出部1209は、取得した送信パケットから宛先IPアドレスを抽出する(S1605)。これは、取得した送信パケットが二次telnet接続の要求パケットであることを意味する。第3抽出部1209は、抽出した宛先IPアドレスが中継テーブルの操作先IPアドレスに該当し、転送ポート番号が未設定であるレコードを特定する(S1607)。   On the other hand, if it is determined that the acquired transmission packet is a request for telnet connection, the third extraction unit 1209 extracts a destination IP address from the acquired transmission packet (S1605). This means that the acquired transmission packet is a request packet for secondary telnet connection. The third extraction unit 1209 identifies the record in which the extracted destination IP address corresponds to the operation destination IP address of the relay table and the transfer port number is not set (S1607).

第3抽出部1209は、S1601において取得した送信パケットから、送信元ポート番号を抽出する(S1609)。第3抽出部1209は、S1607において特定したレコードにおける転送ポート番号のフィールドに、抽出した送信元ポート番号を格納する(S1611)。この段階で、中継テーブルは図13の下段に示した状態になる。   The third extraction unit 1209 extracts the transmission source port number from the transmission packet acquired in S1601 (S1609). The third extraction unit 1209 stores the extracted transmission source port number in the transfer port number field in the record identified in S1607 (S1611). At this stage, the relay table is in the state shown in the lower part of FIG.

なお、この送信パケットは図11Aを参照して説明した、S405の二次接続の要求パケットであり、中継装置103から送信され、ネットワークを介して操作先装置105に受信される。   Note that this transmission packet is the secondary connection request packet in S405 described with reference to FIG. 11A, is transmitted from the relay device 103, and is received by the operation destination device 105 via the network.

第3抽出部1209は、判定部1211による中継監視処理を起動する(S1613)。中継監視処理は、送信パケット処理と並行に実行される。従って、中継監視処理の終了を待たずに、S1601に示した処理に戻る。中継監視処理は、S1607において特定したレコードの中継イベントを監視する。よって、複数の中継が行われている場合、すなわち、特定されたレコードが複数となった場合には、複数の中継監視処理が並行に実行される。   The third extraction unit 1209 activates the relay monitoring process by the determination unit 1211 (S1613). The relay monitoring process is executed in parallel with the transmission packet process. Therefore, the process returns to S1601 without waiting for the end of the relay monitoring process. The relay monitoring process monitors the relay event of the record specified in S1607. Therefore, when a plurality of relays are performed, that is, when a plurality of identified records are present, a plurality of relay monitoring processes are executed in parallel.

図17に、中継監視処理フローを示す。判定部1211は、経過時間の計測を開始する(S1701)。判定部1211は、インターフェース制御部241に受信パケットを1つ要求する(S1703)。判定部1211は、受信パケットを取得したか否かを判定する(S1705)。受信パケットを取得していない場合、つまり中継装置103がパケットを受信していない場合には、端子Cを介して図18のS1800に示した処理に移る。   FIG. 17 shows a relay monitoring process flow. The determination unit 1211 starts measuring elapsed time (S1701). The determination unit 1211 requests one received packet from the interface control unit 241 (S1703). The determination unit 1211 determines whether a received packet has been acquired (S1705). When the received packet has not been acquired, that is, when the relay apparatus 103 has not received the packet, the process proceeds to the process illustrated in S1800 of FIG.

受信パケットを取得した場合、つまり中継装置103がパケットを受信した場合には、判定部1211は、当該受信パケットが、telnetの応答パケットであるか否かを判定する(S1707)。当該受信パケットがtelnetの応答パケットでない場合には、S1703に示した処理に戻る。   When the received packet is acquired, that is, when the relay apparatus 103 receives the packet, the determination unit 1211 determines whether or not the received packet is a telnet response packet (S1707). If the received packet is not a telnet response packet, the process returns to S1703.

当該受信パケットがtelnetの応答パケットである場合には、判定部1211は、当該受信パケットから送信元IPアドレスと送信元ポート番号と宛先ポート番号とを抽出する(S1709)。   If the received packet is a telnet response packet, the determination unit 1211 extracts the source IP address, the source port number, and the destination port number from the received packet (S1709).

判定部1211は、抽出した送信元IPアドレスが、図16のS1607で特定したレコードの「操作先IPアドレス」フィールドの値と一致するか否かを判定する(S1711)。抽出した送信元IPアドレスが操作先IPアドレスと一致しないと判定した場合には、端子Cを介して図18のS1800に示した処理に移る。   The determination unit 1211 determines whether or not the extracted transmission source IP address matches the value of the “operation destination IP address” field of the record identified in S1607 of FIG. 16 (S1711). If it is determined that the extracted source IP address does not match the operation destination IP address, the process proceeds to the process illustrated in S1800 of FIG.

一方、抽出した送信元IPアドレスが操作先IPアドレスと一致すると判定した場合には、判定部1211は、抽出した送信元ポート番号が、操作先装置105のtelnet用のポート番号(23)であるか否かを判定する(S1713)。抽出した送信元ポート番号が操作先装置105のtelnet用のポート番号(23)でないと判定した場合には、端子Cを介して図18のS1800に示した処理に移る。   On the other hand, if it is determined that the extracted transmission source IP address matches the operation destination IP address, the determination unit 1211 determines that the extracted transmission source port number is the telnet port number (23) of the operation destination device 105. It is determined whether or not (S1713). When it is determined that the extracted transmission source port number is not the telnet port number (23) of the operation destination apparatus 105, the processing proceeds to the processing illustrated in S1800 of FIG.

一方、抽出した送信元ポート番号が操作先装置105のtelnet用のポート番号(23)であると判定した場合には、判定部1211は、抽出した宛先ポート番号が、図16のS1607で特定したレコードの「転送ポート番号」フィールドの値と一致するか否かを判定する(S1715)。これは、S1703で取得した受信パケットが、二次telnetセッションにおけるtelnet応答パケットであり、送信元である、操作先装置105のIPアドレス、操作先装置のポート番号、および、送信先の中継装置103のポート番号が期待どおりであることを示している。抽出した宛先ポート番号が転送ポート番号と一致しないと判定した場合には、端子Cを介して図18のS1800に示した処理に移る。   On the other hand, if it is determined that the extracted transmission source port number is the telnet port number (23) of the operation destination device 105, the determination unit 1211 identifies the extracted destination port number in S1607 of FIG. It is determined whether or not the value matches the value of the “transfer port number” field of the record (S1715). In this case, the received packet acquired in S1703 is a telnet response packet in the secondary telnet session, and is the transmission source, the IP address of the operation destination device 105, the port number of the operation destination device, and the transmission destination relay device 103. Indicates that the port number is as expected. If it is determined that the extracted destination port number does not match the transfer port number, the process proceeds to the process shown in S1800 of FIG.

一方、抽出した宛先ポート番号が転送ポート番号と一致すると判定した場合には、判定部1211は、一旦経過時間の計測を終える(S1717)。そして、S1701に示した処理に戻る。   On the other hand, if it is determined that the extracted destination port number matches the transfer port number, the determination unit 1211 once finishes measuring elapsed time (S1717). Then, the process returns to S1701.

図18の説明に移る。S1800において、判定部1211は、経過時間が閾値を超えたか否かを判定する。経過時間が閾値を超えていないと判定した場合には、端子Dを介してS1703に示した処理に戻る。   Turning to the description of FIG. In step S1800, the determination unit 1211 determines whether the elapsed time has exceeded a threshold value. If it is determined that the elapsed time does not exceed the threshold value, the process returns to S1703 via the terminal D.

一方、経過時間が閾値を超えていると判定した場合には、判定部1211は、宛先IPアドレスのフィールドに操作先IPアドレスを設定し、更に宛先ポート番号のフィールドにtelnet用のポート番号(23)を設定した動作確認パケットを送信する(S1801)。   On the other hand, if it is determined that the elapsed time exceeds the threshold, the determination unit 1211 sets the operation destination IP address in the destination IP address field, and further sets the telnet port number (23 in the destination port number field). ) Is set (S1801).

ここで、経過時間が閾値を超えていると判定した場合(S1800でYesと判定)は、換言すると、二次telnetセッションにおけるtelnetサーバ、つまり操作先装置105からのtelnetコマンドに対する応答パケットが一定時間受信されていないことに相当する。また、S1801の動作確認パケットの送信は、二次telnetセッションにおけるtelnetクライアントである中継装置103から、telnetサーバである操作先装置105に対して動作確認パケットを送信することを示している。   If it is determined that the elapsed time exceeds the threshold (Yes in S1800), in other words, the response packet for the telnet command in the secondary telnet session, that is, the telnet command from the operation destination device 105 is a certain time. This is equivalent to not being received. Further, the transmission of the operation confirmation packet in S1801 indicates that the operation confirmation packet is transmitted from the relay apparatus 103 that is a telnet client in the secondary telnet session to the operation destination apparatus 105 that is a telnet server.

そして、判定部1211は、動作確認パケットに対する応答パケットを受信したか否かを判定する(S1803)。動作確認パケットに対する応答パケットを受信していないと判定した場合には、判定部1211は、動作確認パケットを送信した時点から所定時間が過ぎたか否かを判定する(S1805)。所定時間が過ぎていないと判定した場合には、S1803に示した処理に戻る。   Then, the determination unit 1211 determines whether a response packet to the operation check packet has been received (S1803). If it is determined that a response packet for the operation confirmation packet has not been received, the determination unit 1211 determines whether or not a predetermined time has passed since the operation confirmation packet was transmitted (S1805). If it is determined that the predetermined time has not passed, the process returns to S1803.

S1803において、応答パケットを受信したと判定した場合には、端子Eを介して、図17に示したS1701の処理に戻る。   If it is determined in S1803 that a response packet has been received, the processing returns to S1701 shown in FIG.

S1805において、所定時間が過ぎたと判定した場合には、切断部1213は、図16のS1607で特定したレコードに格納されている操作元IPアドレス及び操作元ポート番号で特定されるセッションを切断する(S1807)。そして、切断部1213は、当該レコードを削除して(S1809)、中継監視処理を終える。   If it is determined in S1805 that the predetermined time has passed, the disconnection unit 1213 disconnects the session specified by the operation source IP address and the operation source port number stored in the record specified in S1607 of FIG. S1807). Then, the disconnection unit 1213 deletes the record (S1809) and ends the relay monitoring process.

ここで、所定時間が過ぎたと判定した場合(S1805でYesと判定)は、換言すると、二次telnetセッションにおけるtelnetサーバ、つまり操作先装置105から、動作確認パケットに対する応答パケットが所定時間内に受信されなかったことに相当する。これは二次telnetセッションの異常、または切断状態を検出したことに相当する。そしてS1807の処理は、この切断が検出された二次telnetセッションに対応する一次telnetセッションを切断することに相当する。   If it is determined that the predetermined time has passed (Yes in S1805), in other words, a response packet for the operation confirmation packet is received within a predetermined time from the telnet server in the secondary telnet session, that is, the operation destination device 105. Equivalent to not being done. This is equivalent to detecting an abnormal secondary telnet session or a disconnected state. The processing in S1807 corresponds to disconnecting the primary telnet session corresponding to the secondary telnet session in which this disconnection is detected.

本実施の形態によれば、中継装置103と操作先装置105とのセッションが切断された場合に、中継装置103に対する誤操作を防ぐことができる。   According to this embodiment, when the session between the relay apparatus 103 and the operation destination apparatus 105 is disconnected, an erroneous operation on the relay apparatus 103 can be prevented.

また、操作先装置105の動作確認を、より効率的に行うことができる。   Further, the operation confirmation of the operation destination device 105 can be performed more efficiently.

また、一次telnetクライアント213、一次telnetサーバ231、二次telnetクライアント237及び二次telnetサーバ251の改変を要しない。   Further, the primary telnet client 213, the primary telnet server 231, the secondary telnet client 237, and the secondary telnet server 251 are not required to be modified.

以上本発明の一実施の形態を説明したが、本発明はこれに限定されるものではない。例えば、上述の機能ブロック構成はプログラムモジュール構成に一致しない場合もある。   Although one embodiment of the present invention has been described above, the present invention is not limited to this. For example, the functional block configuration described above may not match the program module configuration.

また、上で説明した各記憶領域の構成は一例であって、上記のような構成でなければならないわけではない。さらに、処理フローにおいても、処理結果が変わらなければ、処理の順番を入れ替えることや複数の処理を並列に実行させるようにしても良い。   Further, the configuration of each storage area described above is an example, and the above configuration is not necessarily required. Further, in the processing flow, if the processing result does not change, the processing order may be changed or a plurality of processes may be executed in parallel.

また、本実施例では、図13で示したとおり、一次セッションの識別情報として操作元IPアドレスを、二次セッションの識別情報として操作先IPアドレスを用いた。これらは中継装置とそれぞれのセッションが確立される装置の装置識別子ということができる。   In this embodiment, as shown in FIG. 13, the operation source IP address is used as the identification information of the primary session, and the operation destination IP address is used as the identification information of the secondary session. These can be referred to as device identifiers of devices with which respective sessions are established with the relay device.

また、本実施例では、図13で示したとおり、一次セッションの識別情報として操作元ポート番号を、二次セッションの識別情報として転送ポート番号を用いた。これらはtelnetプロトコルにおいては、サーバ側ポート番号が基本的には23と決まっているため、クライアント側のポート番号を用いたものである。そして、例えば同一操作元、操作先の複数telnetセッションがあった場合でも、クライアント側ポート番号を異なるように設定しておけば、別セッションとして識別可能となる。   In this embodiment, as shown in FIG. 13, the operation source port number is used as the identification information of the primary session, and the transfer port number is used as the identification information of the secondary session. In the telnet protocol, since the server side port number is basically determined to be 23, the client side port number is used. For example, even when there are multiple telnet sessions of the same operation source and operation destination, if the client side port number is set differently, it can be identified as a different session.

本実施例ではセッションの識別情報として、対向装置の識別子(実施例では一次セッション:操作元IPアドレス、二次セッション:操作先IPアドレス)と、ポート番号(実施例では一次セッション:操作元(クライアント)ポート番号、二次セッション:転送(クライアント)ポート番号)としていた。他の例として、セッション識別子として、対向装置識別子と、たとえばセッション識別子(セッションID)との組を用いてもよい。   In this embodiment, as session identification information, the identifier of the opposite device (in the embodiment, primary session: operation source IP address, secondary session: operation destination IP address) and port number (in the embodiment, primary session: operation source (client) ) Port number, secondary session: forwarding (client) port number). As another example, as a session identifier, a pair of an opposing device identifier and, for example, a session identifier (session ID) may be used.

操作元IPアドレスと一次セッションIDとによって一次セッションを特定する場合には、図3のS307に示した一次telnetセッションの確立の手順において中継装置103から操作元装置101へ送信されるセッション確立完了の通知パケットから、操作元IPアドレスに相当する宛先IPアドレスと一次セッションIDとを抽出するようにしてもよい。この場合には、図13に示した中継テーブルにおいて、操作元ポート番号に代えて一次セッションIDを操作元IPアドレスと共に保持するようにしてもよい。そして、図18のS1807において操作元IPアドレス及び一次セッションIDで特定される一次セッションを切断するようにしてもよい。   When the primary session is specified by the operation source IP address and the primary session ID, the completion of the establishment of the session transmitted from the relay apparatus 103 to the operation source apparatus 101 in the procedure for establishing the primary telnet session shown in S307 of FIG. The destination IP address corresponding to the operation source IP address and the primary session ID may be extracted from the notification packet. In this case, in the relay table shown in FIG. 13, the primary session ID may be held together with the operation source IP address instead of the operation source port number. Then, the primary session specified by the operation source IP address and the primary session ID may be disconnected in S1807 of FIG.

また、操作先IPアドレスと二次セッションIDとによって二次セッションを特定する場合には、図4のS407に示した二次telnetセッションの確立の手順において操作先装置105から中継装置103へ送信されるセッション確立完了の通知パケットから、二次セッションIDを抽出するようにしてもよい。この場合には、図13に示した中継テーブルにおいて、転送ポート番号に代えて二次セッションIDを保持するようにしてもよい。そして、図17のS1715に示したポート番号一致の判定処理に代えて、telnetの応答パケットに含まれる二次セッションIDが、中継テーブルに保持されている二次セッションIDと一致するか否かを判定する処理を行うようにしてもよい。尚、この場合でも、Yesルート及びNoルートは上述の例と同様である。   When the secondary session is specified by the operation destination IP address and the secondary session ID, it is transmitted from the operation destination device 105 to the relay device 103 in the secondary telnet session establishment procedure shown in S407 of FIG. The secondary session ID may be extracted from the session establishment completion notification packet. In this case, in the relay table shown in FIG. 13, the secondary session ID may be held instead of the transfer port number. Then, in place of the port number match determination process shown in S1715 of FIG. 17, whether or not the secondary session ID included in the telnet response packet matches the secondary session ID held in the relay table. You may make it perform the process to determine. Even in this case, the Yes route and the No route are the same as in the above example.

また、例えば中継装置103において一次telnetサーバ231を2つ有する場合には、一方の一次telnetサーバ231において、23以外のポート番号を用いる。このような場合には、一次telnet接続の要求パケットから宛先ポート番号を抽出し、これを中継テーブルにおいて一次セッションを特定する中継ポート番号として保持するようにしてもよい。そして、中継監視処理において、中継ポート番号に基づいて、切断対象となる一次セッションを特定するようにしてもよい。   For example, when the relay apparatus 103 has two primary telnet servers 231, a port number other than 23 is used in one primary telnet server 231. In such a case, the destination port number may be extracted from the request packet for the primary telnet connection and held as a relay port number for specifying the primary session in the relay table. In the relay monitoring process, the primary session to be disconnected may be specified based on the relay port number.

また、例えば操作先装置105において二次telnetサーバ251を2つ有する場合には、一方の二次telnetサーバ251において、23以外のポート番号を用いる。このような場合には、二次telnet接続の要求パケットから宛先ポート番号を抽出し、これを中継テーブルにおいて二次セッションを特定する操作先ポート番号として保持するようにしてもよい。そして、中継監視処理において、操作先ポート番号に基づいて、監視対象となるtelnetの応答パケットを特定するようにしてもよい。   For example, when the operation destination apparatus 105 has two secondary telnet servers 251, a port number other than 23 is used in one of the secondary telnet servers 251. In such a case, the destination port number may be extracted from the request packet for the secondary telnet connection, and this may be held as the operation destination port number for specifying the secondary session in the relay table. In the relay monitoring process, the response packet of the telnet to be monitored may be specified based on the operation destination port number.

なお、上で述べた操作元装置101、中継装置103及び操作先装置105は、コンピュータ装置であって、図19に示すように、メモリ2501とCPU(Central Processing Unit)2503とハードディスク・ドライブ(HDD:Hard Disk Drive)2505と表示装置2509に接続される表示制御部2507とリムーバブル・ディスク2511用のドライブ装置2513と入力装置2515とネットワークに接続するための通信制御部2517とがバス2519で接続されている。オペレーティング・システム(OS:Operating System)及び本実施例における処理を実施するためのアプリケーション・プログラムは、HDD2505に格納されており、CPU2503により実行される際にはHDD2505からメモリ2501に読み出される。CPU2503は、アプリケーション・プログラムの処理内容に応じて表示制御部2507、通信制御部2517、ドライブ装置2513を制御して、所定の動作を行わせる。また、処理途中のデータについては、主としてメモリ2501に格納されるが、HDD2505に格納されるようにしてもよい。本発明の実施例では、上で述べた処理を実施するためのアプリケーション・プログラムはコンピュータ読み取り可能なリムーバブル・ディスク2511に格納されて頒布され、ドライブ装置2513からHDD2505にインストールされる。インターネットなどのネットワーク及び通信制御部2517を経由して、HDD2505にインストールされる場合もある。このようなコンピュータ装置は、上で述べたCPU2503、メモリ2501などのハードウエアとOS及びアプリケーション・プログラムなどのプログラムとが有機的に協働することにより、上で述べたような各種機能を実現する。   The operation source device 101, the relay device 103, and the operation destination device 105 described above are computer devices, and as shown in FIG. 19, a memory 2501, a CPU (Central Processing Unit) 2503, a hard disk drive (HDD). : Hard Disk Drive) 2505, a display control unit 2507 connected to the display device 2509, a drive device 2513 for the removable disk 2511, an input device 2515, and a communication control unit 2517 for connecting to the network are connected via a bus 2519. ing. An operating system (OS) and an application program for executing the processing in this embodiment are stored in the HDD 2505, and are read from the HDD 2505 to the memory 2501 when executed by the CPU 2503. The CPU 2503 controls the display control unit 2507, the communication control unit 2517, and the drive device 2513 according to the processing content of the application program, and performs a predetermined operation. Further, data in the middle of processing is mainly stored in the memory 2501, but may be stored in the HDD 2505. In the embodiment of the present invention, an application program for performing the above-described processing is stored in a computer-readable removable disk 2511 and distributed, and installed in the HDD 2505 from the drive device 2513. In some cases, the HDD 2505 may be installed via a network such as the Internet and the communication control unit 2517. Such a computer apparatus realizes various functions as described above by organically cooperating hardware such as the CPU 2503 and the memory 2501 described above and programs such as the OS and application programs. .

以上述べた本発明の実施の形態をまとめると、以下のようになる。   The embodiment of the present invention described above is summarized as follows.

本実施の形態に係る中継装置は、複数段のセッションにより通信元装置と通信先装置との通信を中継する中継装置であって、(A)通信先装置とのセッションが切断されたか否かを判定する判定部と、(B)通信先装置とのセッションが切断されたと判定した場合に、通信元装置とのセッションを切断する切断部とを有する。   The relay device according to the present embodiment is a relay device that relays communication between a communication source device and a communication destination device through a multi-stage session, and (A) whether or not the session with the communication destination device is disconnected. A determination unit for determining; and (B) a disconnection unit that disconnects the session with the communication source device when it is determined that the session with the communication destination device is disconnected.

このようにすれば、中継装置と通信先装置とのセッションが切断された場合に、中継装置における無用な動作を減らすことができる。尚、上述した操作元装置101は、通信元装置の例である。また、上述した操作先装置105は、通信先装置の例である。   In this way, unnecessary operations in the relay device can be reduced when the session between the relay device and the communication destination device is disconnected. The operation source device 101 described above is an example of a communication source device. Further, the operation destination device 105 described above is an example of a communication destination device.

更に、上記中継装置は、通信元装置との通信データから、通信元装置とのセッションに関する第1識別データを抽出する第1抽出部を有するようにしてもよい。また、上記切断部は、第1識別データに基づいて、通信元装置とのセッションを特定するようにしてもよい。   Furthermore, the relay device may include a first extraction unit that extracts first identification data related to a session with the communication source device from communication data with the communication source device. The cutting unit may specify a session with the communication source device based on the first identification data.

このようにすれば、通信元装置とのセッションを特定し易くなる。   In this way, it becomes easy to specify a session with the communication source device.

更に、上記中継装置は、通信元装置から送られた接続要求のパケットから、送信元IP(Internet Protocol)アドレス及び第1の送信元ポート番号を抽出する第1抽出部を有するようにしてもよい。また、上記切断部は、送信元IPアドレス及び第1の送信元ポート番号に基づいて、通信元装置とのセッションを特定するようにしてもよい。   Furthermore, the relay device may include a first extraction unit that extracts a source IP (Internet Protocol) address and a first source port number from a connection request packet sent from a communication source device. . The disconnection unit may specify a session with the communication source device based on the transmission source IP address and the first transmission source port number.

このようにすれば、例えば通信元装置で通信元となるモジュールが複数ある場合に、通信元装置とのセッションを特定し易くなる。   In this way, for example, when there are a plurality of communication source modules in the communication source device, it is easy to specify a session with the communication source device.

上記判定部は、通信先装置から応答パケットを受信しない期間が基準を超えた場合に、通信先装置の動作確認を行うようにしてもよい。   The determination unit may check the operation of the communication destination device when a period during which no response packet is received from the communication destination device exceeds a reference.

このようにすれば、通信先装置の動作確認を、より効率的に行うことができる。   In this way, the operation check of the communication destination device can be performed more efficiently.

更に、上記中継装置は、通信先装置との通信データから、通信先装置とのセッションに関する第2識別データを抽出する第2抽出部を有するようにしてもよい。また、上記判定部は、第2識別データに基づいて、応答パケットを特定するようにしてもよい。   Furthermore, the relay device may include a second extraction unit that extracts second identification data related to a session with the communication destination device from communication data with the communication destination device. The determination unit may specify a response packet based on the second identification data.

このようにすれば、通信先装置からの応答パケットを特定し易くなる。   In this way, it becomes easy to specify the response packet from the communication destination device.

更に、上記中継装置は、通信元装置で入力されたコードを転送するパケットから、通信先装置との接続を要求するコマンドに含まれる通信先装置のIPアドレスを抽出する第2抽出部と、通信先装置へ送られる接続要求のパケットから、第2の送信元ポート番号を抽出する第3抽出部とを有するようにしてもよい。また、上記判定部は、通信先装置のIPアドレス及び第2の送信元ポート番号に基づいて、応答パケットを特定するようにしてもよい。   The relay device further includes: a second extraction unit that extracts an IP address of a communication destination device included in a command requesting connection with the communication destination device from a packet for transferring a code input by the communication source device; You may make it have a 3rd extraction part which extracts a 2nd transmission origin port number from the packet of the connection request | requirement sent to a destination apparatus. Further, the determination unit may specify a response packet based on the IP address of the communication destination device and the second transmission source port number.

このようにすれば、例えば中継装置で転送を行うモジュールが複数ある場合に、通信先装置からの応答パケットを特定し易くなる。   In this way, for example, when there are a plurality of modules that perform transfer by the relay device, it becomes easy to specify the response packet from the communication destination device.

なお、上で述べた中継装置による処理をコンピュータに行わせるためのプログラムを作成することができ、当該プログラムは、例えばフレキシブルディスク、CD−ROM、光磁気ディスク、半導体メモリ、ハードディスク等のコンピュータ読み取り可能な記憶媒体又は記憶装置に格納されるようにしてもよい。尚、中間的な処理結果は、一般的にメインメモリ等の記憶装置に一時保管される。   In addition, a program for causing a computer to perform the processing by the relay device described above can be created. The program can be read by a computer such as a flexible disk, a CD-ROM, a magneto-optical disk, a semiconductor memory, and a hard disk. It may be stored in a simple storage medium or storage device. Note that intermediate processing results are generally temporarily stored in a storage device such as a main memory.

以上の実施例を含む実施形態に関し、さらに以下の付記を開示する。   The following supplementary notes are further disclosed with respect to the embodiments including the above examples.

(付記1)
複数段のセッションにより通信元装置と通信先装置との通信を中継する中継装置であって、
前記通信先装置とのセッションが切断されたか否かを判定する判定部と、
前記通信先装置との前記セッションが切断されたと判定した場合に、前記通信元装置とのセッションを切断する切断部と
を有する中継装置。
(Appendix 1)
A relay device that relays communication between a communication source device and a communication destination device through a multi-stage session,
A determination unit that determines whether or not a session with the communication destination device is disconnected;
And a disconnecting unit that disconnects the session with the communication source device when it is determined that the session with the communication destination device is disconnected.

(付記2)
更に、
前記通信元装置との通信データから、前記通信元装置との前記セッションに関する第1識別データを抽出する第1抽出部
を有し、
前記切断部は、前記第1識別データに基づいて、前記通信元装置との前記セッションを特定する
付記1記載の中継装置。
(Appendix 2)
Furthermore,
A first extraction unit that extracts first identification data related to the session with the communication source device from communication data with the communication source device;
The relay device according to claim 1, wherein the disconnecting unit specifies the session with the communication source device based on the first identification data.

(付記3)
更に、
前記通信元装置から送られた接続要求のパケットから、送信元IP(Internet Protocol)アドレス及び第1の送信元ポート番号を抽出する第1抽出部
を有し、
前記切断部は、前記送信元IPアドレス及び前記第1の送信元ポート番号に基づいて、前記通信元装置との前記セッションを特定する
付記1記載の中継装置。
(Appendix 3)
Furthermore,
A first extraction unit for extracting a source IP (Internet Protocol) address and a first source port number from a connection request packet sent from the communication source device;
The relay device according to claim 1, wherein the disconnecting unit specifies the session with the communication source device based on the source IP address and the first source port number.

(付記4)
前記判定部は、前記通信先装置から応答パケットを受信しない期間が基準を超えた場合に、前記通信先装置の動作確認を行う
付記1乃至3のいずれか1つ記載の中継装置。
(Appendix 4)
The relay device according to any one of appendices 1 to 3, wherein the determination unit performs an operation check of the communication destination device when a period during which a response packet is not received from the communication destination device exceeds a reference.

(付記5)
更に、
前記通信先装置との通信データから、前記通信先装置との前記セッションに関する第2識別データを抽出する第2抽出部
を有し、
前記判定部は、前記第2識別データに基づいて、前記応答パケットを特定する
付記4記載の中継装置。
(Appendix 5)
Furthermore,
A second extraction unit for extracting second identification data related to the session with the communication destination device from communication data with the communication destination device;
The relay device according to attachment 4, wherein the determination unit specifies the response packet based on the second identification data.

(付記6)
更に、
前記通信元装置で入力されたコードを転送するパケットから、前記通信先装置との接続を要求するコマンドに含まれる前記通信先装置のIPアドレスを抽出する第2抽出部と、
前記通信先装置へ送られる接続要求のパケットから、第2の送信元ポート番号を抽出する第3抽出部と
を有し、
前記判定部は、前記通信先装置のIPアドレス及び前記第2の送信元ポート番号に基づいて、前記応答パケットを特定する
付記4記載の中継装置。
(Appendix 6)
Furthermore,
A second extraction unit that extracts an IP address of the communication destination device included in a command for requesting connection with the communication destination device from a packet for transferring a code input by the communication source device;
A third extraction unit for extracting a second transmission source port number from a connection request packet sent to the communication destination device;
The relay device according to claim 4, wherein the determination unit identifies the response packet based on an IP address of the communication destination device and the second transmission source port number.

(付記7)
複数段のセッションにより通信元装置と通信先装置との通信を中継するコンピュータにより実行される制御方法であって、
前記通信先装置とのセッションが切断されたか否かを判定し、
前記通信先装置との前記セッションが切断されたと判定した場合に、前記通信元装置とのセッションを切断する
処理を含む制御方法。
(Appendix 7)
A control method executed by a computer that relays communication between a communication source device and a communication destination device through a multi-stage session,
Determine whether the session with the communication destination device is disconnected,
A control method including a process of disconnecting a session with the communication source device when it is determined that the session with the communication destination device is disconnected.

(付記8)
複数段のセッションにより通信元装置と通信先装置との通信を中継するコンピュータに、
前記通信先装置とのセッションが切断されたか否かを判定し、
前記通信先装置との前記セッションが切断されたと判定した場合に、前記通信元装置とのセッションを切断する
処理を実行させるプログラム。
(Appendix 8)
To a computer that relays communication between the communication source device and the communication destination device through a multi-stage session,
Determine whether the session with the communication destination device is disconnected,
A program for executing processing for disconnecting a session with the communication source device when it is determined that the session with the communication destination device is disconnected.

(付記9)
通信元装置と、
通信先装置と、
前記通信元装置からの要求に応じて前記通信元装置との間に第1セッションを設け、更に前記通信元装置からの要求に応じて前記通信先装置との間に第2セッションを設ける中継装置とを含み、
前記中継装置は、
前記第2セッションが切断されたか否かを判定する判定部と、
前記第2セッションが切断されたと判定した場合に、前記第1セッションを切断する切断部と
を有するシステム。
(Appendix 9)
A communication source device;
A communication destination device;
A relay device that provides a first session with the communication source device in response to a request from the communication source device, and further provides a second session with the communication destination device in response to a request from the communication source device Including
The relay device is
A determination unit for determining whether or not the second session is disconnected;
And a disconnecting unit configured to disconnect the first session when it is determined that the second session is disconnected.

101 操作元装置
103 中継装置
105 操作先装置
211 コマンドプログラム
213 一次telnetクライアント
215 ツール
221 インターフェース制御部
223 通信インターフェース装置
231 一次telnetサーバ
233 ネットワーク仮想端末
235 コマンドプログラム
237 二次telnetクライアント
239 中継管理部
241 インターフェース制御部
243 通信インターフェース装置
251 二次telnetサーバ
253 ネットワーク仮想端末
255 コマンドプログラム
261 インターフェース制御部
263 通信インターフェース装置
1201 第1取得部
1203 第1抽出部
1205 第2抽出部
1207 第2取得部
1209 第3抽出部
1211 判定部
1213 切断部
1221 中継テーブル記憶部
1223 バッファ
DESCRIPTION OF SYMBOLS 101 Operation origin apparatus 103 Relay apparatus 105 Operation destination apparatus 211 Command program 213 Primary telnet client 215 Tool 221 Interface control part 223 Communication interface apparatus 231 Primary telnet server 233 Network virtual terminal 235 Command program 237 Secondary telnet client 239 Relay management part 241 Interface Control unit 243 Communication interface device 251 Secondary telnet server 253 Network virtual terminal 255 Command program 261 Interface control unit 263 Communication interface device 1201 First acquisition unit 1203 First extraction unit 1205 Second extraction unit 1207 Second acquisition unit 1209 Third extraction Part 1211 judgment part 1213 cutting part 1221 relay tape Bull storage unit 1223 buffer

Claims (9)

複数段のセッションにより通信元装置と通信先装置との通信を中継する中継装置であって、
前記通信先装置とのセッションが切断されたか否かを判定する判定部と、
前記通信先装置との前記セッションが切断されたと判定した場合に、前記通信元装置とのセッションを切断する切断部と
を有する中継装置。
A relay device that relays communication between a communication source device and a communication destination device through a multi-stage session,
A determination unit that determines whether or not a session with the communication destination device is disconnected;
And a disconnecting unit that disconnects the session with the communication source device when it is determined that the session with the communication destination device is disconnected.
更に、
前記通信元装置との通信データから、前記通信元装置との前記セッションに関する第1識別データを抽出する第1抽出部
を有し、
前記切断部は、前記第1識別データに基づいて、前記通信元装置との前記セッションを特定する
請求項1記載の中継装置。
Furthermore,
A first extraction unit that extracts first identification data related to the session with the communication source device from communication data with the communication source device;
The relay device according to claim 1, wherein the disconnection unit specifies the session with the communication source device based on the first identification data.
更に、
前記通信元装置から送られた接続要求のパケットから、送信元IP(Internet Protocol)アドレス及び第1の送信元ポート番号を抽出する第1抽出部
を有し、
前記切断部は、前記送信元IPアドレス及び前記第1の送信元ポート番号に基づいて、前記通信元装置との前記セッションを特定する
請求項1記載の中継装置。
Furthermore,
A first extraction unit for extracting a source IP (Internet Protocol) address and a first source port number from a connection request packet sent from the communication source device;
The relay device according to claim 1, wherein the disconnecting unit specifies the session with the communication source device based on the transmission source IP address and the first transmission source port number.
前記判定部は、前記通信先装置から応答パケットを受信しない期間が基準を超えた場合に、前記通信先装置の動作確認を行う
請求項1乃至3のいずれか1つ記載の中継装置。
The relay device according to any one of claims 1 to 3, wherein the determination unit performs an operation check of the communication destination device when a period during which a response packet is not received from the communication destination device exceeds a reference.
更に、
前記通信先装置との通信データから、前記通信先装置との前記セッションに関する第2識別データを抽出する第2抽出部
を有し、
前記判定部は、前記第2識別データに基づいて、前記応答パケットを特定する
請求項4記載の中継装置。
Furthermore,
A second extraction unit for extracting second identification data related to the session with the communication destination device from communication data with the communication destination device;
The relay device according to claim 4, wherein the determination unit specifies the response packet based on the second identification data.
更に、
前記通信元装置で入力されたコードを転送するパケットから、前記通信先装置との接続を要求するコマンドに含まれる前記通信先装置のIPアドレスを抽出する第2抽出部と、
前記通信先装置へ送られる接続要求のパケットから、第2の送信元ポート番号を抽出する第3抽出部と
を有し、
前記判定部は、前記通信先装置のIPアドレス及び前記第2の送信元ポート番号に基づいて、前記応答パケットを特定する
請求項4記載の中継装置。
Furthermore,
A second extraction unit that extracts an IP address of the communication destination device included in a command for requesting connection with the communication destination device from a packet for transferring a code input by the communication source device;
A third extraction unit for extracting a second transmission source port number from a connection request packet sent to the communication destination device;
The relay device according to claim 4, wherein the determination unit identifies the response packet based on an IP address of the communication destination device and the second transmission source port number.
複数段のセッションにより通信元装置と通信先装置との通信を中継するコンピュータにより実行される制御方法であって、
前記通信先装置とのセッションが切断されたか否かを判定し、
前記通信先装置との前記セッションが切断されたと判定した場合に、前記通信元装置とのセッションを切断する
処理を含む制御方法。
A control method executed by a computer that relays communication between a communication source device and a communication destination device through a multi-stage session,
Determine whether the session with the communication destination device is disconnected,
A control method including a process of disconnecting a session with the communication source device when it is determined that the session with the communication destination device is disconnected.
複数段のセッションにより通信元装置と通信先装置との通信を中継するコンピュータに、
前記通信先装置とのセッションが切断されたか否かを判定し、
前記通信先装置との前記セッションが切断されたと判定した場合に、前記通信元装置とのセッションを切断する
処理を実行させるプログラム。
To a computer that relays communication between the communication source device and the communication destination device through a multi-stage session,
Determine whether the session with the communication destination device is disconnected,
A program for executing processing for disconnecting a session with the communication source device when it is determined that the session with the communication destination device is disconnected.
通信元装置と、
通信先装置と、
前記通信元装置からの要求に応じて前記通信元装置との間に第1セッションを設け、更に前記通信元装置からの要求に応じて前記通信先装置との間に第2セッションを設ける中継装置とを含み、
前記中継装置は、
前記第2セッションが切断されたか否かを判定する判定部と、
前記第2セッションが切断されたと判定した場合に、前記第1セッションを切断する切断部と
を有するシステム。
A communication source device;
A communication destination device;
A relay device that provides a first session with the communication source device in response to a request from the communication source device, and further provides a second session with the communication destination device in response to a request from the communication source device Including
The relay device is
A determination unit for determining whether or not the second session is disconnected;
And a disconnecting unit configured to disconnect the first session when it is determined that the second session is disconnected.
JP2017135337A 2017-07-11 2017-07-11 Repeating device, control method, program and system Pending JP2019016995A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017135337A JP2019016995A (en) 2017-07-11 2017-07-11 Repeating device, control method, program and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017135337A JP2019016995A (en) 2017-07-11 2017-07-11 Repeating device, control method, program and system

Publications (1)

Publication Number Publication Date
JP2019016995A true JP2019016995A (en) 2019-01-31

Family

ID=65358115

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017135337A Pending JP2019016995A (en) 2017-07-11 2017-07-11 Repeating device, control method, program and system

Country Status (1)

Country Link
JP (1) JP2019016995A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7400313B2 (en) 2019-10-02 2023-12-19 株式会社リコー Information processing devices, information processing systems, and printer drivers

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7400313B2 (en) 2019-10-02 2023-12-19 株式会社リコー Information processing devices, information processing systems, and printer drivers

Similar Documents

Publication Publication Date Title
JP6352451B2 (en) Control method, control device, control device, program, and recording medium for current interruption
EP2851800B1 (en) Remote support apparatus, electronic apparatus, remote support method, and storage medium
EP3144839A1 (en) Detection device, detection method and detection program
JP2017054458A (en) Communication system, control method thereof, image formation apparatus, control method thereof and program
WO2015109443A1 (en) Method for processing network service faults, service management system and system management module
CN103310612B (en) Main station system and the station remote control thereof of end system and system
CN106452921B (en) Stacking system splitting detection method and device
CN105652851A (en) Redundant automation system and method for operation thereof
CN109272285A (en) A kind of intelligent repair method based on telecommunication
US20160285673A1 (en) Client side host machine backup system and its implementing method
JP2019016995A (en) Repeating device, control method, program and system
JP2006261827A (en) Network apparatus, management apparatus thereof, network connection method, and network connection management method thereof
JP2016181795A (en) Network system and network setting method
US8266253B2 (en) Server system and event message transmission method therefor, client terminal and connection method and program therefor, and recording medium
JP2019531610A (en) SIP information analysis method, apparatus, server, and medium
CN110248156B (en) Video analysis method, platform equipment, intelligent camera and intelligent monitoring system
WO2018119643A1 (en) Device monitoring method, apparatus and system
JP6384271B2 (en) Device management relay device, method, and program
WO2016070617A1 (en) Method and device for updating flow table
JP2016128251A (en) Coordinated remote maintenance of printer
US9548989B2 (en) Network monitoring apparatus and method
US20130136130A1 (en) Relay server and relay communication system
JP4550857B2 (en) Information processing apparatus allocation method, management server and terminal for executing the method
JP2001251346A (en) Data transmission system
US20140280724A1 (en) Relay Server System