JP5664320B2 - Relay device, packet relay method, and communication system - Google Patents

Relay device, packet relay method, and communication system Download PDF

Info

Publication number
JP5664320B2
JP5664320B2 JP2011033202A JP2011033202A JP5664320B2 JP 5664320 B2 JP5664320 B2 JP 5664320B2 JP 2011033202 A JP2011033202 A JP 2011033202A JP 2011033202 A JP2011033202 A JP 2011033202A JP 5664320 B2 JP5664320 B2 JP 5664320B2
Authority
JP
Japan
Prior art keywords
session
packet
tcp
terminal
gateway device
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.)
Expired - Fee Related
Application number
JP2011033202A
Other languages
Japanese (ja)
Other versions
JP2012175249A (en
Inventor
基文 田辺
基文 田辺
信吾 杣
信吾 杣
佐藤 浩司
浩司 佐藤
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2011033202A priority Critical patent/JP5664320B2/en
Publication of JP2012175249A publication Critical patent/JP2012175249A/en
Application granted granted Critical
Publication of JP5664320B2 publication Critical patent/JP5664320B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)

Description

本発明は、IP(インターネットプロトコル)ネットワークと呼制御ネットワークを接続するゲートウェイ装置に関するものである。 The present invention relates to a gateway device that connects an IP (Internet Protocol) network and a call control network.

IP端末を収容する複数のユーザネットワークと、複数のユーザネットワーク間にあって呼制御・呼管理を行う呼制御ネットワークとを備えた通信システムにおいて、ユーザネットワークと呼制御ネットワークの間に設けられ、ユーザネットワーク内で発行される通信要求または最初のデータを解析することにより呼制御ネットワーク内に所要の呼を確立し、通信要求またはデータをIP(Internet Protocol)パケットとして呼制御ネットワーク内に中継するゲートウェイ装置がある。(例えば、特許文献1参照)。 In a communication system including a plurality of user networks that accommodate IP terminals and a call control network that performs call control and call management between a plurality of user networks, the communication system is provided between the user networks and the call control network. There is a gateway device that establishes a required call in the call control network by analyzing a communication request or initial data issued by the Internet, and relays the communication request or data as an IP (Internet Protocol) packet in the call control network . (For example, refer to Patent Document 1).

WO2006/051594WO2006 / 051594

このような通信システムで呼制御ネットワークの帯域を有効活用するには、通信需要に応じて呼を切断したり再確立したりするのが望ましい。しかしながら、呼すなわちセッションの切断要求や確立要求を発するのはゲートウェイ装置であるのに対し、TCP(Transmission Control Protocol)コネクションの切断要求や確立要求をするのはIP端末であるため、ゲートウェイ装置がセッションを再確立してもTCP通信を再開できないという問題があった。すなわち、セッションが切断されるとTCPコネクションも切断されてしまうが、ゲートウェイ装置がセッションを切断した場合はIP端末にセッションの切断を知らせる手段が無いため、IP端末がTCPコネクションの再確立を要求することは無く、TCP通信を再開できないという問題があった。 In order to effectively use the bandwidth of the call control network in such a communication system, it is desirable to disconnect or re-establish the call according to the communication demand. However, the gateway device issues a call or session disconnection request or establishment request, whereas the gateway device issues a session request or establishment request for a TCP (Transmission Control Protocol) connection. There was a problem that TCP communication could not be resumed even if it was re-established. That is, when the session is disconnected, the TCP connection is also disconnected. However, when the gateway device disconnects the session, there is no means for notifying the IP terminal of the session disconnection, so the IP terminal requests re-establishment of the TCP connection. The problem was that TCP communication could not be resumed.

本発明はこのような問題を解決するためになされたもので、IP端末からの要求とは別にセッションを切断した場合であってセッションを再確立する際に、TCP通信も再開できる中継装置、パケットの中継方法、及び通信システムを得ることを目的とする。 The present invention has been made in order to solve such a problem. When a session is disconnected separately from a request from an IP terminal and when the session is reestablished, a relay apparatus and a packet that can resume TCP communication It is an object to obtain a relay method and a communication system.

本発明に係る中継装置は、IP端末と他のIP端末との間に接続され、他の中継装置にパケットを転送するためのセッションを該他の中継装置との間に確立し、該セッションを使用して前記IP端末から送信されたパケットを前記他のIP端末に中継する中継装置において、前記IP端末から送信されたパケットの受信を検出するパケット検出部と、前記IP端末から受信したパケットを一時保留するパケット保留部と、前記パケット検出部により前記セッションを使用するパケットが所定期間検出されない場合に該セッションを切断するセッション制御部と、前記IP端末から送信されたパケットを転送するインターフェース部と、を有し、前記セッションの切断後に、該セッションを使用するユーザデータを前記IP端末から受信した場合に、前記パケット保留部は、前記ユーザデータを一時保留し、前記セッション制御部は、前記セッションを再確立するとともに、宛先ポート番号、宛先IPアドレス、送信元ポート番号、及び送信元IPアドレスの情報を有する確立要求メッセージを生成し、前記インターフェース部は、生成された前記確立要求メッセージを前記他の中継装置との間に接続され前記ユーザデータを中継する呼制御ネットワークに転送した後、前記パケット保留部に保留された前記ユーザデータ前記呼制御ネットワークを介して前記他の中継装置に転送することを特徴とするものである。
The relay device according to the present invention is connected between an IP terminal and another IP terminal , establishes a session for transferring a packet to the other relay device with the other relay device, and establishes the session. In a relay device that uses the relay device that relays a packet transmitted from the IP terminal to the other IP terminal , a packet detection unit that detects reception of the packet transmitted from the IP terminal, and a packet received from the IP terminal. A packet holding unit for temporarily holding; a session control unit for cutting off the session when a packet using the session is not detected by the packet detecting unit for a predetermined period; and an interface unit for transferring a packet transmitted from the IP terminal; has, after cutting of the session, the field which has received the user data using the session from the IP terminal To the packet holding unit, the user data temporarily hold, the session control unit is configured to re-establish the session, the destination port number, destination IP address, source port number, and the information of the source IP address The interface unit transfers the generated establishment request message to a call control network connected to the other relay device and relays the user data, and then holds the packet hold. The user data held in the communication unit is transferred to the other relay device via the call control network .

本発明に係るパケット中継方法は、IP端末と他のIP端末との間に接続され、他の中継装置にパケットを転送するためのセッションを該他の中継装置との間に確立し、該セッションを使用して前記IP端末から送信されたパケットを前記他のIP端末に中継する中継装置パケット中継方法において記セッションを使用するパケットを所定期間受信しない場合に前記セッションを切断する第1のステップと、前記セッション切断後に、該セッションを使用するユーザデータを前記IP端末から受信する第2のステップと、信した前記ユーザデータを一時保留する第3のステップと、前記ユーザデータを受信した後、前記セッションを再確立するとともに、宛先ポート番号、宛先IPアドレス、送信元ポート番号、及び送信元IPアドレスの情報を有する確立要求メッセージを生成する第4のステップと、生成した前記確立要求メッセージを前記他の中継装置との間に接続され前記ユーザデータを中継する呼制御ネットワークに転送する第5のステップと、前記確立要求メッセージの転送後に、一時保留された前記ユーザデータを前記呼制御ネットワークを介して前記他の中継装置に転送する第6のステップと、を有することを特徴とするものである。
The packet relay method according to the present invention is connected between an IP terminal and another IP terminal, and establishes a session for transferring a packet to the other relay device with the other relay device. the packet relay method of a relay apparatus for relaying a packet transmitted from the IP terminal to the other IP terminal using a first cutting the session packets using pre Symbol session if it does not receive a predetermined period 1 a step of, after the session disconnection, receiving a second step of receiving the user data using the session from the IP terminal, a third step of temporarily holding the user data it receives, the user data after, as well as re-establish the session, the destination port number, destination IP address, source port number, and source IP address A fourth step of generating the establishment request message having information of the scan, are connected generated the establishment request message between the other relay device of the fifth to be transferred to the call control network for relaying the user data And a sixth step of transferring the temporarily held user data to the other relay device via the call control network after transferring the establishment request message. .

本発明に係る通信システムは、IP端末と、前記IP端末とは異なる他のIP端末と、前記IP端末と前記他のIP端末との間に接続され、他の中継装置にパケットを転送するためのセッションを該他の中継装置との間に確立し、該セッションを使用して前記IP端末から送信されたパケットを前記他のIP端末に中継する中継装置と、を備える通信システムにおいて、前記中継装置は、前記IP端末から送信されたパケットの受信を検出するパケット検出部と、前記IP端末から受信したパケットを一時保留するパケット保留部と、前記パケット検出部により前記セッションを使用するパケットが所定期間検出されない場合に該セッションを切断するセッション制御部と、前記IP端末から送信されたパケットを転送するインターフェース部と、を有し、前記セッションの切断後に、該セッションを使用するユーザデータを前記IP端末から受信した場合に、前記パケット保留部は、前記ユーザデータを一時保留し、前記セッション制御部は、前記セッションを再確立するとともに、宛先ポート番号、宛先IPアドレス、送信元ポート番号、及び送信元IPアドレスの情報を有する確立要求メッセージを生成し、前記インターフェース部は、生成された前記確立要求メッセージを前記他の中継装置との間に接続され前記ユーザデータを中継する呼制御ネットワークに転送した後、前記パケット保留部に保留された前記ユーザデータ前記呼制御ネットワークを介して前記他の中継装置に転送することを特徴とするものである。 The communication system according to the present invention is connected between an IP terminal, another IP terminal different from the IP terminal, the IP terminal and the other IP terminal, and transfers a packet to another relay device. A relay device that establishes a session with the other relay device and relays a packet transmitted from the IP terminal to the other IP terminal using the session. An apparatus includes: a packet detection unit that detects reception of a packet transmitted from the IP terminal; a packet holding unit that temporarily holds a packet received from the IP terminal; and a packet that uses the session is predetermined by the packet detection unit. interface to transfer the session control unit to disconnect the session if not period detection, the packet transmitted from the IP terminal If has, after cutting of the session, when receiving the user data using the session from the IP terminal, the packet holding unit temporarily retains the user data, the session control unit, the While re-establishing a session, the interface unit generates an establishment request message including information of a destination port number, a destination IP address, a source port number, and a source IP address, and the interface unit transmits the generated establishment request message to the after transferring the call control network for relaying connected the user data between the other relay apparatus transfers the user data held in the packet hold section to the another relay device via the call control network It is characterized by doing.

本発明によれば、中継装置、パケット中継方法、通信システムは、セッションを使用するパケットが所定期間検出されない場合に中継装置がこのセッションを切断し、セッション切断後に中継装置がIP端末からこのセッションを使用するTCPパケットを受信するとTCPパケットを一時保留してセッションを再確立し、セッション再確立後、サーバを介して接続された他の中継装置との間にTCPコネクションを確立し、TCPコネクションの確立後に一時保留したTCPパケットをサーバに向けて転送させることにより、中継装置がIP端末からの要求とは別にセッションを切断した場合であっても、セッション切断後にTCP通信を再開できる。 According to the present invention, in the relay device, the packet relay method, and the communication system, the relay device disconnects the session when a packet using the session is not detected for a predetermined period, and the relay device disconnects the session from the IP terminal after the session is disconnected. When the TCP packet to be used is received, the TCP packet is temporarily held and the session is re-established. After the session is re-established, a TCP connection is established with another relay device connected via the server, and the TCP connection is established. By transferring the temporarily suspended TCP packet to the server later, TCP communication can be resumed after the session is disconnected even when the relay device disconnects the session separately from the request from the IP terminal.

本発明の実施の形態1に係る通信システムの構成を示す図である。It is a figure which shows the structure of the communication system which concerns on Embodiment 1 of this invention. 図1に示すゲートウェイ装置のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of the gateway apparatus shown in FIG. 図1に示すゲートウェイ装置の機能ブロックを示す図である。It is a figure which shows the functional block of the gateway apparatus shown in FIG. 図3の記憶部に記憶されたセッション情報テーブルの一例を示すである。It is an example of the session information table memorize | stored in the memory | storage part of FIG. 図3の記憶部に記憶されたセッション状態テーブルの一例を示すである。It is an example of the session state table memorize | stored in the memory | storage part of FIG. 図3に示すセッション制御部の詳細を示すである。It is a detail of the session control unit shown in FIG. 本発明の実施の形態1に係る通信システムのシーケンスを示す図である。It is a figure which shows the sequence of the communication system which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係るゲートウェイ装置のフローチャートである。It is a flowchart of the gateway apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態2に係るゲートウェイ装置のセッション制御部の詳細を示す図である。It is a figure which shows the detail of the session control part of the gateway apparatus which concerns on Embodiment 2 of this invention. 本発明の実施の形態2に係る通信システムのシーケンスを示す図である。It is a figure which shows the sequence of the communication system which concerns on Embodiment 2 of this invention. 本発明の実施の形態3に係るゲートウェイ装置のセッション制御部の詳細を示す図である。It is a figure which shows the detail of the session control part of the gateway apparatus which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係る通信システムのシーケンスを示す図である。It is a figure which shows the sequence of the communication system which concerns on Embodiment 3 of this invention. 本発明の実施の形態3に係るゲートウェイ装置が送信するINVITEメッセージの一例を示すである。It is an example of the INVITE message which the gateway apparatus which concerns on Embodiment 3 of this invention transmits. 本発明の実施の形態4に係るゲートウェイ装置のセッション制御部の詳細を示す図である。It is a figure which shows the detail of the session control part of the gateway apparatus which concerns on Embodiment 4 of this invention. 本発明の実施の形態4に係るセッション情報テーブルの一例を示すである。It is an example of the session information table which concerns on Embodiment 4 of this invention. 本発明の実施の形態4に係る通信システムのシーケンスを示す図である。It is a figure which shows the sequence of the communication system which concerns on Embodiment 4 of this invention. 本発明の実施の形態4に係るゲートウェイ装置が送信するINVITEメッセージの一例を示すである。It is an example of the INVITE message which the gateway apparatus which concerns on Embodiment 4 of this invention transmits. 本発明の実施の形態4に係るセッション状態テーブルの一例を示すである。It is an example of the session state table which concerns on Embodiment 4 of this invention. 本発明の実施の形態5に係るゲートウェイ装置のセッション制御部の詳細を示す図である。It is a figure which shows the detail of the session control part of the gateway apparatus which concerns on Embodiment 5 of this invention. 本発明の実施の形態5に係る通信システムのシーケンスを示す図である。It is a figure which shows the sequence of the communication system which concerns on Embodiment 5 of this invention. 本発明の実施の形態5に係るゲートウェイ装置が送信するINVITEメッセージの一例を示すである。It is an example of the INVITE message which the gateway apparatus which concerns on Embodiment 5 of this invention transmits.

実施の形態1.
本発明を実施するための実施の形態1におけるゲートウェイ装置1を図1ないし図8を用いて説明する。
図1はゲートウェイ装置1すなわち中継装置が使用される通信システム100の構成を示す図である。通信システム100は、呼制御・呼管理の機能を持たないユーザネットワーク4A、4Bと、2つ以上のユーザネットワーク4A、4B間に設けられた呼制御・呼管理の機能を備えた呼制御ネットワーク5と、を備えたものである。
Embodiment 1 FIG.
A gateway device 1 according to Embodiment 1 for carrying out the present invention will be described with reference to FIGS.
FIG. 1 is a diagram showing a configuration of a communication system 100 in which a gateway device 1, that is, a relay device is used. The communication system 100 includes user networks 4A and 4B having no call control / call management function, and a call control network 5 having a call control / call management function provided between two or more user networks 4A and 4B. And.

ユーザネットワーク4AはIP端末3Aとゲートウェイ装置1A、ユーザネットワーク4BはIP端末3Bとゲートウェイ装置1B、呼制御ネットワーク5はSIP(Session Initiation Protocol)サーバ2を収容しており、ユーザネットワーク4Aと呼制御ネットワーク5はゲートウェイ装置1Aにより、ユーザネットワーク4Bと呼制御ネットワーク5はゲートウェイ装置1Bによりそれぞれ接続されている。
なお、ここではユーザネットワーク4A、4BにIP端末3とゲートウェイ装置1がそれぞれ1台ずつ設けられた例を示しているが、各ユーザネットワークに収容されるIP端末は複数台であっても良い。また、説明を簡潔にするため、図1ではゲートウェイ装置1とIP端末3を直接接続しているが、ルーター(図示しない)を介しマルチホップ接続としても良い。
The user network 4A accommodates the IP terminal 3A and the gateway device 1A, the user network 4B accommodates the IP terminal 3B and the gateway device 1B, and the call control network 5 accommodates the SIP (Session Initiation Protocol) server 2, and the user network 4A and the call control network 5 is connected to the gateway device 1A, and the user network 4B and the call control network 5 are connected to each other by the gateway device 1B.
Here, an example is shown in which one IP terminal 3 and one gateway device 1 are provided in each of the user networks 4A and 4B, but a plurality of IP terminals may be accommodated in each user network. For simplicity, the gateway device 1 and the IP terminal 3 are directly connected in FIG. 1, but a multi-hop connection may be used via a router (not shown).

図2はゲートウェイ装置1のハードウェア構成を示す図である。
ゲートウェイ装置1は、データを処理するためのCPU12と、データ処理に必要なプログラムや情報を記憶するメモリ13と、ユーザネットワーク4および呼制御ネットワーク5とのEthernet(登録商標)インタフェース11とを備えている。
FIG. 2 is a diagram illustrating a hardware configuration of the gateway device 1.
The gateway device 1 includes a CPU 12 for processing data, a memory 13 for storing programs and information necessary for data processing, and an Ethernet (registered trademark) interface 11 for the user network 4 and the call control network 5. Yes.

また、図3はゲートウェイ装置の機能ブロックを示している。
ユーザネットワーク4とのインタフェース部11A、呼制御ネットワーク5とのインタフェース部11B、インタフェース部11Aから入力されたIPパケットを検出するパケット検出部14A、インタフェース部11Bから入力されたIPパケットを検出するパケット検出部14B、パケット検出部14A、14Bで検出したデータを一時的に保留するパケット保留部15、IPパケットデータの通信路に対応した呼接続すなわちセッションの制御をするセッション制御部16、フロー条件とセッション制御用のパラメータとを対応付けたセッション情報テーブル170やセッションの使用状態を示すセッション状態テーブル171を記憶した記憶部17、セッションごとに通信路の使用有無を監視する無通信監視部18を備えている。無通信監視部18にはセッションごとにタイマ180が設けられ、未使用状態の時間を計測している。
FIG. 3 shows functional blocks of the gateway device.
An interface unit 11A with the user network 4, an interface unit 11B with the call control network 5, a packet detection unit 14A that detects an IP packet input from the interface unit 11A, and a packet detection that detects an IP packet input from the interface unit 11B Unit 14B, packet holding unit 15 that temporarily holds data detected by packet detection units 14A and 14B, session control unit 16 that controls call connection corresponding to the communication path of IP packet data, that is, session control, flow condition and session A session information table 170 in which control parameters are associated with each other, a storage unit 17 that stores a session state table 171 that indicates a use state of a session, and a non-communication monitoring unit 18 that monitors whether a communication path is used for each session Yes. The no-communication monitoring unit 18 is provided with a timer 180 for each session, and measures the unused time.

セッション情報テーブル170は、図4に示すように、セッションを接続するためのフロー条件とセッションを接続する際に使用するセッション制御パラメータとから構成されている。フロー条件には、中継するIPパケットのDAやSAといったIPアドレス、使用されるプロトコル、送信元及び宛先のポート番号があり、セッション制御パラメータには、例えば、宛先SIP−URI(Uniform Resource Identifier)、使用帯域、等がある。なお、図中の米印の領域は任意の値とすることができる。 As shown in FIG. 4, the session information table 170 includes flow conditions for connecting a session and session control parameters used when connecting the session. The flow condition includes an IP address such as DA or SA of an IP packet to be relayed, a protocol to be used, a port number of a transmission source and a destination, and session control parameters include, for example, a destination SIP-URI (Uniform Resource Identifier), Use bandwidth, etc. In addition, the area | region of the rice mark in a figure can be made into arbitrary values.

一方、セッション状態テーブル171は、図5に示すように、セッション識別子であるCall-ID、対向するゲートウェイ装置1のSIP−URI、このフローをどのように使用したかを示す発信/着信の状態、通信時間、フロー情報により構成され、セッション情報テーブル170の条件に従って確定したセッションの情報が時系列的に順に記載されている。 On the other hand, as shown in FIG. 5, the session state table 171 includes a call identifier that is a session identifier, a SIP-URI of the opposite gateway device 1, an outgoing / incoming state that indicates how this flow is used, It is composed of communication time and flow information, and session information determined according to the conditions of the session information table 170 is described in time series.

フロー情報の領域には、セッション情報テーブル170のフロー条件に基づいて実際に使用したフロー情報が格納されている。すなわち、セッション情報テーブル170のフロー条件として任意領域とされているものであっても、実際に使用された値がセッションごとに格納される。図5において、「自側」とは自装置、「対向」とは対向するゲートウェイ装置1又はその先に接続されたIP端末3を示している。フロー情報には、中継するIPパケットのDAやSAといったIPアドレス、使用するプロトコル、送信元及び宛先のポート番号、セッション及びTCPコネクションの状態の欄、及びタイマ満了により切断したセッションか否かを示す欄すなわち切断情報の欄があり、セッションやTCPコネクションの確立途中の状態も把握できる。なお、TCPコネクション状態の欄の括弧書きはゲートウェイ装置2自身が生成したメッセージではなく、IP端末3により生成されたメッセージを中継したことを示すものである。また、タイマの欄はTCPコネクションが確立されるとリセットされるものとする。 In the flow information area, flow information actually used based on the flow conditions of the session information table 170 is stored. That is, even if the flow condition of the session information table 170 is an arbitrary area, the value actually used is stored for each session. In FIG. 5, “own side” indicates the own device, and “opposite” indicates the facing gateway device 1 or the IP terminal 3 connected thereto. The flow information indicates the IP address such as DA or SA of the IP packet to be relayed, the protocol to be used, the source and destination port numbers, the session and TCP connection status fields, and whether or not the session is disconnected due to the expiration of the timer. Column, that is, a disconnection information column, it is possible to grasp a session or a state in the middle of establishing a TCP connection. The parentheses in the TCP connection status column indicate that the message generated by the IP terminal 3 is relayed, not the message generated by the gateway device 2 itself. The timer column is reset when a TCP connection is established.

図6はセッション制御部16の詳細を示す図である。IPパケットからIPアドレスを抽出するDA/SA抽出部160、IPパケットの種類を識別するパケット識別部161、呼すなわちセッションの確立や切断に必要なメッセージを管理するセッション管理部163、TCPコネクションの確立に必要なメッセージを管理するTCP管理部164、セッション管理部163やTCP管理部164等と連携して記憶部17に記憶されたセッション情報テーブル170やセッション状態テーブル171の情報を取得したり更新したりするセッション情報取得部162を備えている。 FIG. 6 is a diagram showing details of the session control unit 16. DA / SA extraction unit 160 that extracts an IP address from an IP packet, a packet identification unit 161 that identifies the type of IP packet, a session management unit 163 that manages a call, that is, a message necessary for session establishment and disconnection, and a TCP connection establishment The information in the session information table 170 and the session state table 171 stored in the storage unit 17 is acquired or updated in cooperation with the TCP management unit 164, the session management unit 163, the TCP management unit 164, etc. A session information acquisition unit 162 is provided.

セッション管理部16にはセッションの確立や切断に必要なメッセージをパケットとして生成するメッセージ生成部1630と呼の確立や切断に必要なメッセージをパケットとして受付けるメッセージ受付部1631が設けられ、TCP管理部164にはTCPコネクションに必要なメッセージをTCPパケットとして生成するTCP生成部1640とTCPコネクションに必要なメッセージをTCPパケットとして受付けるTCP受付部1641が設けられている。図6では、セッション管理に必要なメッセージとして、本実施の形態と特に関係の深いINVITE、200 OK、BYEの生成部と受付部をそれぞれ明記しているが、メッセージ生成部1630はその他セッション管理に必要なメッセージも生成し、メッセージ受付部1631はこれらのメッセージを受付けることはいうまでもない。なお、TCPパケットとは、TCPプロトコルを用いて通信に使用されるパケットであって、上記TCPコネクションに必要なTCPコネクション確立用のパケット以外にデータ用パケットも含まれる。以下、TCPパケットに限定する必要の無いものはIPパケットと称する。 The session management unit 16 is provided with a message generation unit 1630 that generates a message necessary for establishing or disconnecting a session as a packet, and a message reception unit 1631 that receives a message necessary for establishing or disconnecting a call as a packet. The TCP management unit 164 Are provided with a TCP generation unit 1640 that generates a message necessary for a TCP connection as a TCP packet, and a TCP reception unit 1641 that receives a message necessary for a TCP connection as a TCP packet. In FIG. 6, the INVITE, 200 OK, and BYE generation units and reception units that are particularly related to the present embodiment are specified as messages necessary for session management, but the message generation unit 1630 is used for other session management. Needless to say, a necessary message is also generated, and the message receiving unit 1631 receives these messages. The TCP packet is a packet used for communication using the TCP protocol, and includes a data packet in addition to a TCP connection establishment packet necessary for the TCP connection. Hereinafter, what is not necessary to be limited to the TCP packet is referred to as an IP packet.

ここで、動作について説明する。
まず、通信システム全体の動作を、図7を用いて説明する。ユーザネットワーク4Aに設けられたIP端末3Aとユーザネットワーク4Bに設けられたIP端末3B間でTCP通信を行う場合、IP端末3Aはまず、TCPコネクションの確立要求メッセージであるTCP-SYNパケットをIP端末3B宛に送信する(S101)。TCP-SYNパケットがゲートウェイ装置1Aに到着すると、ゲートウェイ装置1Aは呼制御ネットワーク5にセッションがあるか否かを確認し、セッションが無い場合はSDP(Session Description Protocol)のオファーを含むセッション確立要求メッセージであるINVITEメッセージを生成しSIPサーバ2に向けて送信する(S102)。このとき、INVITEメッセージはセッション情報テーブル170に基づいて所望の宛先SIP−URI宛にセッション制御パラメータに従って送信される。
ここで、INVITEメッセージにSDPを使用するのは、セッション制御のデータ送受信ホスト・ポートの制御にSDPを使用するのが一般的だからである。
Here, the operation will be described.
First, the operation of the entire communication system will be described with reference to FIG. When performing TCP communication between the IP terminal 3A provided in the user network 4A and the IP terminal 3B provided in the user network 4B, the IP terminal 3A first sends a TCP-SYN packet, which is a TCP connection establishment request message, to the IP terminal. Transmit to 3B (S101). When the TCP-SYN packet arrives at the gateway device 1A, the gateway device 1A checks whether or not there is a session in the call control network 5, and if there is no session, a session establishment request message including an SDP (Session Description Protocol) offer. The INVITE message is generated and transmitted to the SIP server 2 (S102). At this time, the INVITE message is transmitted to a desired destination SIP-URI based on the session information table 170 according to the session control parameter.
Here, the reason why the SDP is used for the INVITE message is that the SDP is generally used for controlling the data transmission / reception host port for session control.

SIPサーバ2はINVITEメッセージを受信するとゲートウェイ装置1Aに応答メッセージである100 Tryingパケットで応答し(S103)、ゲートウェイ装置1BにINVITEメッセージを転送する(S104)。ゲートウェイ装置1BはINVITEメッセージを受信すると100 Tryingパケットで応答し(S105)、セッション確立の準備が整うとSDPのアンサーを含むセッション確立応答メッセージである200 OKレスポンスを送信する(S106)。200 OKレスポンスを受信したSIPサーバ2はゲートウェイ装置1Aに200 OKレスポンスを転送し、ゲートウェイ装置1Aがこの200 OKレスポンスを受取ると2つのゲートウェイ装置1A、1B間のセッションが確立する。そして、ゲートウェイ装置1AがACKメッセージを送信し、SIPサーバ2がこれをゲートウェイ装置1Bに転送し、SIPシグナリングが完了する(S107)。 When the SIP server 2 receives the INVITE message, the SIP server 2 responds to the gateway device 1A with a 100 Trying packet that is a response message (S103), and transfers the INVITE message to the gateway device 1B (S104). When the gateway device 1B receives the INVITE message, it responds with a 100 Trying packet (S105), and when it is ready to establish a session, it transmits a 200 OK response, which is a session establishment response message including an SDP answer (S106). The SIP server 2 that has received the 200 OK response transfers the 200 OK response to the gateway device 1A. When the gateway device 1A receives the 200 OK response, a session is established between the two gateway devices 1A and 1B. Then, the gateway device 1A transmits an ACK message, and the SIP server 2 transfers it to the gateway device 1B, and SIP signaling is completed (S107).

S102〜S107によりセッションが確立すると、ゲートウェイ装置1AはS101にてIP端末3Aから受信して保留していたTCP-SYNパケットをゲートウェイ装置1B宛に転送し、ゲートウェイ装置1BはTCP-SYNパケットを受信すると、これを中継してIP端末3Bに転送する(S108)。
TCP-SYNパケットを受信したIP端末3Bは、TCP-SYNへの応答メッセージであるTCP-ACKと共に、逆方向のTCP-SYNを1つのパケットとしてIP端末3A宛に送信する。このTCP-SYN/ACKパケットは、先ほどと逆の順序でゲートウェイ装置1B、SIPサーバ2、ゲートウェイ装置1Aと中継され、IP端末3Aに届けられる(S109)。
なお、TCPで送信されるユーザデータは必ずしもSIPシグナリングと同じ経路を通るとは限らないため、TCP-SYN/ACKパケットはSIPサーバ2を経由しなくてもよい。
また、TCPパケットの種類はヘッダの制御ビットによって規定され、TCP-SYNパケットはSYNフラグ、TCP-ACKパケットはACKフラグ、TCP-SYN/ACKパケットはSYNフラグとACKフラグの両方が1に設定される。
When the session is established through S102 to S107, the gateway device 1A transfers the TCP-SYN packet received from the IP terminal 3A and held in S101 to the gateway device 1B, and the gateway device 1B receives the TCP-SYN packet. Then, this is relayed and transferred to the IP terminal 3B (S108).
The IP terminal 3B that has received the TCP-SYN packet transmits the reverse TCP-SYN as a single packet to the IP terminal 3A together with the TCP-ACK that is a response message to the TCP-SYN. This TCP-SYN / ACK packet is relayed to the gateway device 1B, the SIP server 2, and the gateway device 1A in the reverse order, and is delivered to the IP terminal 3A (S109).
Note that user data transmitted by TCP does not necessarily pass through the same route as SIP signaling, so the TCP-SYN / ACK packet does not have to go through the SIP server 2.
The type of TCP packet is defined by the header control bits. The TCP-SYN packet has the SYN flag, the TCP-ACK packet has the ACK flag, and the TCP-SYN / ACK packet has both the SYN flag and ACK flag set to 1. The

IP端末3AがTCP-SYN/ACKパケットを受取ると、TCP-SYNに対する応答としてTCP-ACKパケットをIP端末3B宛に送信する。このTCP-ACKパケットもゲートウェイ装置1A、SIPサーバ2、ゲートウェイ装置1Bの順に中継され、IP端末3Bに届けられる(S110)。なお、上記と同様に、TCP-SYN/ACKパケットはSIPサーバ2を経由しなくてもよい。
このようにTCP-SYNとTCP-ACKを双方向にやり取りしてTCPコネクションを張ることを3way handshakeといい、3way handshakeが完了するとIP端末3AとIP端末3Bの間にTCPコネクションが確立される。
When IP terminal 3A receives the TCP-SYN / ACK packet, it transmits a TCP-ACK packet to IP terminal 3B as a response to TCP-SYN. This TCP-ACK packet is also relayed in the order of the gateway device 1A, the SIP server 2, and the gateway device 1B, and delivered to the IP terminal 3B (S110). As described above, the TCP-SYN / ACK packet does not have to go through the SIP server 2.
This way of establishing a TCP connection by bidirectionally exchanging TCP-SYN and TCP-ACK is called a 3-way handshake. When the 3-way handshake is completed, a TCP connection is established between the IP terminal 3A and the IP terminal 3B.

一旦TCPコネクションが確立すると、TCPコネクションの切断またはセッションの切断がなされるまで2つのIP端末3A、3B間では双方向にデータのTCP通信が可能となる(S111)。なお、ここではIP端末3Aが最初にTCP-SYNパケットを送信する場合を示したが、IP端末3BがTCP通信の開始を要求する場合はIP端末3BからTCP-SYNが送信される。 Once a TCP connection is established, bidirectional TCP communication of data is possible between the two IP terminals 3A and 3B until the TCP connection is disconnected or the session is disconnected (S111). Here, the case where the IP terminal 3A first transmits a TCP-SYN packet is shown, but when the IP terminal 3B requests the start of TCP communication, the IP terminal 3B transmits TCP-SYN.

TCPコネクションが確立された状態において、このTCPコネクションで使用されるセッションが一定期間使用されない状態が続くと、ゲートウェイ装置1Aはセッションの切断要求メッセージであるBYEパケットを生成してSIPサーバ2に送信し、SIPサーバ2がゲートウェイ装置1Bに転送する(S112)。ゲートウェイ装置1BがBYEパケットへの応答メッセージである200 OKレスポンスを送信しゲートウェイ装置1Aに到達すると、2つのゲートウェイ装置1A、1B間のセッションは切断される(S113)。
ここではゲートウェイ装置1AがBYEパケットを送信する例を示したが、ゲートウェイ装置1BからBYEパケットを送信してセッションを切断しても良い。セッションが切断されると、このセッションを利用するTCPコネクション用に確保されたリソースが解放される。
If the session used in this TCP connection is not used for a certain period in a state where the TCP connection is established, the gateway device 1A generates a BYE packet that is a session disconnection request message and transmits it to the SIP server 2. The SIP server 2 transfers to the gateway device 1B (S112). When the gateway device 1B transmits a 200 OK response that is a response message to the BYE packet and reaches the gateway device 1A, the session between the two gateway devices 1A and 1B is disconnected (S113).
Here, an example is shown in which the gateway device 1A transmits a BYE packet, but the gateway device 1B may transmit a BYE packet to disconnect the session. When the session is disconnected, resources reserved for the TCP connection that uses the session are released.

セッションが切断された状態において、IP端末3Aが再びIP端末3B宛のユーザデータData#2をTCPにて送信すると(S114)、ゲートウェイ装置1AはこのTCPパケットを自装置内に一時的に保留し、先ほどと同様の手順でゲートウェイ装置1Bとの間にセッションを確立する(S115〜S120)。
セッションが確立されると、今度はゲートウェイ装置1A自身がTCP-SYNパケットを生成し(S119)、セッション確立時に取得した宛先IPアドレスと宛先ポート番号、及びIP端末3Aより受信したIPパケットのTCPヘッダの情報、すなわち送信元IPアドレスと送信元ポート番号に基づいてゲートウェイ装置1Bとの間で3way handshakeを行い2つのゲートウェイ装置1A、1B間のTCPコネクションを確立する(S121〜S123)。
When the session is disconnected and the IP terminal 3A transmits again the user data Data # 2 addressed to the IP terminal 3B by TCP (S114), the gateway apparatus 1A temporarily holds the TCP packet in its own apparatus. A session is established with the gateway apparatus 1B in the same procedure as before (S115 to S120).
When the session is established, the gateway apparatus 1A itself generates a TCP-SYN packet (S119), the destination IP address and destination port number acquired at the time of session establishment, and the TCP header of the IP packet received from the IP terminal 3A Based on the above information, that is, based on the transmission source IP address and the transmission source port number, a three-way handshake is performed with the gateway device 1B to establish a TCP connection between the two gateway devices 1A and 1B (S121 to S123).

TCPコネクションが確立されると、ゲートウェイ装置1AはS114により受信し保留していたTCPパケットを転送し(S124)、このTCPパケットはゲートウェイ装置1Bを介してIP端末3Bに届けられる。
なお、ここではゲートウェイ装置1Aがセッション及びTCPコネクションの確立要求を発する場合について説明したが、確立要求を発するゲートウェイ装置はセッションを切断したゲートウェイ装置と同じである必要はない。望ましくは、セッション切断後に最初にTCP通信を再開するゲートウェイ装置1がセッションの再確立要求及びTCPコネクションの確立要求を発すると良い。
When the TCP connection is established, the gateway device 1A transfers the TCP packet received and held in S114 (S124), and this TCP packet is delivered to the IP terminal 3B via the gateway device 1B.
Although the case where the gateway device 1A issues a session and TCP connection establishment request has been described here, the gateway device that issues the establishment request does not have to be the same as the gateway device that disconnected the session. Desirably, the gateway device 1 that resumes TCP communication first after disconnecting the session may issue a session re-establishment request and a TCP connection establishment request.

次に、ゲートウェイ装置1内の動作について図3及び図6を用いて説明する。
まず、ユーザネットワーク4から呼制御ネットワーク5へIPパケットを中継する場合について説明する。
ユーザネットワーク4AからのIPパケットがインタフェース部11Aに入力されると、このIPパケットはパケット検出部14Aで検出され、パケット保留部15とセッション制御部16に転送される。パケット保留部15はこのIPパケットをセッション制御部16から転送指示がくるまで保留し、転送指示がくるとインタフェース部11Bを介して呼制御ネットワーク5に向けて送出する。
Next, the operation in the gateway device 1 will be described with reference to FIGS.
First, a case where an IP packet is relayed from the user network 4 to the call control network 5 will be described.
When an IP packet from the user network 4A is input to the interface unit 11A, the IP packet is detected by the packet detection unit 14A and transferred to the packet holding unit 15 and the session control unit 16. The packet holding unit 15 holds the IP packet until a transfer instruction is received from the session control unit 16, and when the transfer instruction is received, the packet is sent to the call control network 5 via the interface unit 11B.

セッション制御部16はパケット検出部14AからIPパケットを受取ると、DA/SA抽出部160にてIPアドレス情報を抽出し、セッション情報取得部162に抽出した情報を伝達すると共にIPパケットをパケット識別部161に転送する。パケット識別部161は受取ったIPパケットがユーザデータなのかセッション制御用のパケットなのかTCPコネクションに関するパケットなのかを識別し、ユーザデータであればセッション情報取得部162に、セッション制御用のパケットであればセッション管理部163に、TCPコネクションに関するパケットであればTCP管理部164にその旨を伝える。
なお、ユーザネットワーク4Aは通常セッション制御に非対応であることを前提としているため、パケット識別部161で受取るデータはユーザデータ、あるいはTCPコネクションに関するパケットのいずれかである。
When the session control unit 16 receives the IP packet from the packet detection unit 14A, the DA / SA extraction unit 160 extracts the IP address information, transmits the extracted information to the session information acquisition unit 162, and transmits the IP packet to the packet identification unit. 161. The packet identification unit 161 identifies whether the received IP packet is user data, a session control packet, or a packet related to a TCP connection, and if it is user data, the session information acquisition unit 162 determines whether the packet is a session control packet. For example, if the packet is related to the TCP connection, the session management unit 163 is notified of the fact to the TCP management unit 164.
Since it is assumed that the user network 4A does not support normal session control, the data received by the packet identification unit 161 is either user data or a packet related to a TCP connection.

検出されたIPパケットがTCPコネクションに関するパケットの場合、すなわちTCPパケットの場合、TCP管理部164はTCP受付部1641にてTCP-SYNパケットなのか、TCP-ACKパケットなのか、TCP-SYN/ACKパケットなのかを識別し、セッション情報取得部162に伝達する。セッション情報取得部162は、TCP管理部164からの情報とDA/SA抽出部160から受取ったIPアドレス等の情報に基づいて、セッション状態テーブル171のデータを更新する。 If the detected IP packet is a TCP connection packet, that is, a TCP packet, the TCP management unit 164 determines whether the TCP reception unit 1641 is a TCP-SYN packet, a TCP-ACK packet, or a TCP-SYN / ACK packet. Is transmitted to the session information acquisition unit 162. The session information acquisition unit 162 updates the data in the session state table 171 based on information from the TCP management unit 164 and information such as an IP address received from the DA / SA extraction unit 160.

TCP受付部1641からTCP-SYNパケットであるとの情報を受取った場合、セッション情報取得部162はセッション管理部163にセッションを確立するよう指示する。指示を受けたセッション管理部163はセッション情報取得部162が取得したセッション情報テーブル170のセッション制御パラメータに基づいてINVITEメッセージを生成し、対向するゲートウェイ装置1宛に送出する。その後、対向するゲートウェイ装置1から200 OKレスポンスを受取ってセッションが確立すると、セッション情報取得部162はパケット保留部15に転送指示を送り、一時保留していたTCP-SYNパケットを呼制御ネットワーク5に送出させ、無通信監視部18にはこのセッションに対応するタイマ180のスタート指示を送る。 When information indicating that the packet is a TCP-SYN packet is received from the TCP reception unit 1641, the session information acquisition unit 162 instructs the session management unit 163 to establish a session. Upon receiving the instruction, the session management unit 163 generates an INVITE message based on the session control parameter of the session information table 170 acquired by the session information acquisition unit 162 and sends it to the opposite gateway device 1. Thereafter, when a 200 OK response is received from the opposite gateway device 1 and a session is established, the session information acquisition unit 162 sends a transfer instruction to the packet holding unit 15 and sends the temporarily held TCP-SYN packet to the call control network 5. The no-communication monitoring unit 18 is sent a start instruction for the timer 180 corresponding to this session.

セッション情報取得部162がTCP受付部1641からTCP-SYN/ACKパケットまたはTCP-ACKパケットであるとの情報を受取った場合、セッション情報取得部162は記憶部17に記憶されたセッション状態テーブル171を更新し、パケット保留部15に転送指示を送り一時保留していたTCP-SYN/ACKパケットまたはTCP-ACKパケットを呼制御ネットワーク5に送出させる。 When the session information acquisition unit 162 receives information from the TCP reception unit 1641 that it is a TCP-SYN / ACK packet or a TCP-ACK packet, the session information acquisition unit 162 stores the session state table 171 stored in the storage unit 17. The packet is updated, a transfer instruction is sent to the packet holding unit 15, and the TCP-SYN / ACK packet or TCP-ACK packet temporarily held is sent to the call control network 5.

ところで、検出されたIPパケットがTCPパケットのユーザデータの場合、セッション情報取得部162はDA/SA抽出部160から受取ったIPアドレスの情報に基づいて、記憶部17に記憶されたセッション状態テーブル171からIPパケットの通信路に対応するセッション及びTCPコネクションの情報を取得する。セッション情報取得部162は、セッション及びTCPコネクションが確立されている場合、すなわち図5においてセッション状態の欄が「200 OK」でTCPコネクション状態の欄が「TCP-ACK」または「(TCP-ACK)」の場合にはパケット保留部15に転送指示を送り、無通信監視部18にこのセッションに対応するタイマをリセットさせるリセット信号を送る。 By the way, when the detected IP packet is user data of a TCP packet, the session information acquisition unit 162 stores the session state table 171 stored in the storage unit 17 based on the IP address information received from the DA / SA extraction unit 160. To acquire the session and TCP connection information corresponding to the communication path of the IP packet. When the session and the TCP connection are established, the session information acquisition unit 162, that is, the session status column in FIG. 5 is “200 OK” and the TCP connection status column is “TCP-ACK” or “(TCP-ACK)”. ", A transfer instruction is sent to the packet holding unit 15, and a reset signal is sent to the non-communication monitoring unit 18 to reset the timer corresponding to this session.

検出されたIPパケットがTCPパケットのユーザデータであって対応するセッションが未確立の場合、すなわち図5においてセッション状態の欄が「BYE」の場合は、セッション情報取得部162はセッション状態テーブル171を参照してゲートウェイ装置1により切断されたセッションか否か、すなわち図5においてタイマの欄が「満了」であるか否かを判断する。ゲートウェイ装置1(対向するゲートウェイ装置1も含む)により切断されたセッションの場合、セッション状態テーブル171のセッション状態の欄は「BYE」、TCPコネクション状態の欄は「TCP-ACK」または「(TCP-ACK)」、タイマの欄は「満了」が記入されている。このとき、セッション情報取得部162はセッション管理部163に指示を出し、上記と同様の手順により対向するゲートウェイ装置1との間にセッションを再確立させ、無通信監視部18にこのセッションに対応するタイマのスタート指示を送る。 When the detected IP packet is user data of a TCP packet and the corresponding session is not established, that is, when the session status column is “BYE” in FIG. 5, the session information acquisition unit 162 stores the session status table 171. Referring to FIG. 5, it is determined whether or not the session is disconnected by the gateway device 1, that is, whether or not the timer field in FIG. 5 is “expired”. In the case of a session disconnected by the gateway device 1 (including the opposite gateway device 1), the session status column of the session status table 171 is “BYE”, and the TCP connection status column is “TCP-ACK” or “(TCP- ACK) ”and“ expiration ”are entered in the timer column. At this time, the session information acquisition unit 162 instructs the session management unit 163 to re-establish a session with the facing gateway device 1 by the same procedure as described above, and the non-communication monitoring unit 18 responds to this session. Send a timer start instruction.

セッション再確立後、TCP管理部164はTCP-SYNパケットを生成して対向するゲートウェイ装置1に送信し、TCP-SYN/ACKを受取るとTCP-ACKを返してTCPコネクションを確立する。TCPコネクションの確立後、セッション情報取得部162はパケット保留部15に転送指示を送り、一時保留していたユーザデータのTCPパケットを呼制御ネットワーク5に送出させる。
なお、このセッションを使用するパケットを送出する際には、ユーザデータか制御用データかの種別によらず、このセッションに対応するタイマのリセット信号を無通信監視部18に送信するものとする。
After re-establishing the session, the TCP management unit 164 generates a TCP-SYN packet and transmits it to the opposing gateway device 1. When TCP-SYN / ACK is received, it returns TCP-ACK and establishes a TCP connection. After establishing the TCP connection, the session information acquisition unit 162 sends a transfer instruction to the packet holding unit 15 to send the TCP packet of the user data temporarily held to the call control network 5.
When transmitting a packet using this session, a timer reset signal corresponding to this session is transmitted to the no-communication monitoring unit 18 regardless of the type of user data or control data.

ゲートウェイ装置1がセッションを切断した場合以外であって、セッション未確立の状態でユーザデータを検出することは通常ありえない。TCP通信を行うには、まずIP端末3がTCP-SYNパケットを送信し、3way handshakeによりTCPコネクションを確立するからである。したがって、セッション状態テーブル171に過去のセッション情報が記憶されていない場合、検出されたユーザデータのIPパケットは異常パケットと判断し、セッション情報取得部162はパケット保留部15にパケット廃棄を指示する。
なお、この機能はオプショナルとして設けるものであって、ゲートウェイ装置1Aでそのまま転送するようにしても良い。異常パケットはIP端末でも廃棄できるからである。
It is usually impossible to detect user data in a state where the session is not established except when the gateway device 1 disconnects the session. This is because, in order to perform TCP communication, the IP terminal 3 first transmits a TCP-SYN packet and establishes a TCP connection by 3-way handshake. Therefore, when past session information is not stored in the session state table 171, the detected IP packet of user data is determined to be an abnormal packet, and the session information acquisition unit 162 instructs the packet holding unit 15 to discard the packet.
This function is provided as an option, and may be transferred as it is by the gateway device 1A. This is because an abnormal packet can be discarded even by an IP terminal.

ここまでが、ユーザネットワーク4Aから呼制御ネットワーク5へTCPパケットを中継する場合の動作である。次に、呼制御ネットワーク5からユーザネットワーク4へIPパケットを中継する場合について説明する。
IPパケットが呼制御ネットワーク5からインタフェース部11Bに入力されるとパケット検出部14Bで検出され、パケット保留部15とセッション制御部16に転送される。パケット保留部15はこのIPパケットをセッション制御部16から転送指示がくるまで保留し、転送指示がくるとインタフェース部11Aを介してユーザネットワーク4に向けて送出する。
Up to this point, the operation when the TCP packet is relayed from the user network 4A to the call control network 5 is described. Next, a case where an IP packet is relayed from the call control network 5 to the user network 4 will be described.
When an IP packet is input from the call control network 5 to the interface unit 11B, it is detected by the packet detection unit 14B and transferred to the packet holding unit 15 and the session control unit 16. The packet holding unit 15 holds the IP packet until a transfer instruction is received from the session control unit 16, and sends the IP packet to the user network 4 via the interface unit 11A.

セッション制御部16は、パケット検出部14BからIPパケットを受取ると、先ほどと同様にDA/SA抽出部160にてIPアドレス情報を抽出してセッション情報取得部162に伝達し、IPパケットをパケット識別部161に転送する。IPパケット識別部161は受取ったIPパケットがユーザデータなのかセッション制御用のパケットなのかTCPコネクションに関するパケットなのかを識別し、ユーザデータであればセッション情報取得部162に、セッション制御用のパケットであればセッション管理部163に、TCPコネクションに関するTCPパケットであればTCP管理部164にその旨を伝える。 When the session control unit 16 receives the IP packet from the packet detection unit 14B, the DA / SA extraction unit 160 extracts the IP address information and transmits it to the session information acquisition unit 162 in the same manner as described above, and identifies the IP packet as a packet identifier. Forward to the unit 161. The IP packet identification unit 161 identifies whether the received IP packet is user data, a session control packet, or a packet related to a TCP connection, and if it is user data, the session information acquisition unit 162 uses the session control packet. If there is a TCP packet related to the TCP connection, the session management unit 163 is notified of that fact.

検出されたIPパケットがセッション制御用のパケットの場合、セッション管理部163はINVITE、100 Trying、200 OK、BYEのいずれなのかをセッション情報取得部162に通知し、セッション情報取得部162はこの情報とDA/SA抽出部160からの情報に基づいて情報セッション状態テーブル171のデータを更新する。また、セッション制御用のパケットはゲートウェイ装置1宛てなのでIP端末3に転送する必要が無いことから、パケット保留部15にパケット廃棄の指示を出力する。 When the detected IP packet is a session control packet, the session management unit 163 notifies the session information acquisition unit 162 of INVITE, 100 Trying, 200 OK, or BYE, and the session information acquisition unit 162 Based on the information from the DA / SA extraction unit 160, the data in the information session state table 171 is updated. Since the session control packet is addressed to the gateway device 1 and need not be transferred to the IP terminal 3, a packet discard instruction is output to the packet holding unit 15.

セッション管理部163がINVITEメッセージを受付けた場合、セッション情報取得部162はセッション管理部163にセッション情報テーブル170の情報に基づいて100 Tryingを送信するよう指示し、セッション確立の準備が整った時点で同じくセッション情報テーブル170の情報に基づいて200 OKを送信するよう指示する。
なお、メッセージの送信指示をするごとにセッション状態テーブル171の更新も行うものとする。
When the session management unit 163 receives the INVITE message, the session information acquisition unit 162 instructs the session management unit 163 to transmit 100 Trying based on the information in the session information table 170, and when the preparation for session establishment is complete. Similarly, it is instructed to transmit 200 OK based on the information in the session information table 170.
Note that the session state table 171 is also updated whenever a message transmission instruction is issued.

セッション管理部163が200 OKレスポンスを受付けた時は無通信監視部18に対応するセッションのタイマスタート指示を出力し、BYEパケットを受付けた時は無通信監視部18にこのセッションのタイマ180をリセットして停止するよう指示を出力する。
また、セッション情報取得部162がセッション管理部163から100 Tryingパケットを受付けたとの情報を得た場合はセッション状態テーブル171のデータを更新し、タイマ180のスタート指示やリセットは行わない。
When the session management unit 163 accepts a 200 OK response, it outputs a timer start instruction for the session corresponding to the no-communication monitoring unit 18, and when accepting a BYE packet, resets the timer 180 of this session to the no-communication monitoring unit 18. And output an instruction to stop.
When the session information acquisition unit 162 obtains information that the 100 Trying packet has been received from the session management unit 163, the data of the session state table 171 is updated, and the start instruction or reset of the timer 180 is not performed.

ところで、検出されたIPパケットがユーザデータの場合、セッション情報取得部162はDA/SA抽出部160から受取ったIPアドレスの情報に基づいてセッション状態テーブル171を更新し、無通信監視部18に対応するセッションのタイマリセット信号を送りパケット保留部15には転送指示を送信する。このとき、TCPパケットであるかその他のIPパケットであるかを区別する必要は無い。 When the detected IP packet is user data, the session information acquisition unit 162 updates the session state table 171 based on the IP address information received from the DA / SA extraction unit 160 and corresponds to the no-communication monitoring unit 18. A timer reset signal of the session to be transmitted is sent, and a transfer instruction is transmitted to the packet holding unit 15. At this time, it is not necessary to distinguish whether the packet is a TCP packet or another IP packet.

一方、検出されたIPパケットがTCPコネクションに関するTCPパケットの場合、TCP管理部164はTCP受付部1641にてTCP-SYNパケットなのか、TCP-ACKパケットなのか、TCP-SYN/ACKパケットなのかを識別し、セッション情報取得部162に伝達する。セッション情報取得部162は、TCP管理部164からの情報とDA/SA抽出部160から受取ったIPアドレス等の情報に基づいて、セッション状態テーブル171のデータを更新すると共に、図5におけるTCPコネクション状態を参照し、IP端末3から正規の切断シーケンス(例えば、TCPのコネクション解放メッセージであるFINパケットやコネクションリセット要求メッセージであるRSTパケットの送信による切断シーケンス)が行われたTCPコネクションであるか否かによって、対向するゲートウェイ装置1が生成したTCPパケットなのか、IP端末3が生成したTCPパケットなのかを判別する。 On the other hand, when the detected IP packet is a TCP packet related to a TCP connection, the TCP management unit 164 determines whether the TCP reception unit 1641 is a TCP-SYN packet, a TCP-ACK packet, or a TCP-SYN / ACK packet. Identify and transmit to the session information acquisition unit 162. The session information acquisition unit 162 updates the data in the session state table 171 based on the information from the TCP management unit 164 and the information such as the IP address received from the DA / SA extraction unit 160, and the TCP connection state in FIG. , Whether or not the TCP connection has been subjected to a normal disconnection sequence (for example, a disconnection sequence by sending a FIN packet that is a TCP connection release message or an RST packet that is a connection reset request message) from the IP terminal 3. Thus, it is determined whether the packet is a TCP packet generated by the opposing gateway device 1 or a TCP packet generated by the IP terminal 3.

対向するゲートウェイ装置1が生成したTCPパケットであると判断した場合、TCP管理部164は受付けたTCPパケットがTCP-SYNまたはTCP-SYN/ACKであればセッション状態テーブル171に基づいてTCP-ACKを生成し、対向するゲートウェイ装置1に送信する。また、対向するゲートウェイ装置1が生成したTCPパケットであると判断した場合であって、TCP管理部164が受付けたパケットがTCP-ACKの時はセッション状態テーブル171を更新する。なお、これらのTCPパケットはゲートウェイ装置1宛てに送信されたものであるから、パケット保留部15にはパケット廃棄の指示を出力する。 If it is determined that the TCP packet is generated by the opposite gateway device 1, the TCP management unit 164 sends a TCP-ACK based on the session state table 171 if the received TCP packet is TCP-SYN or TCP-SYN / ACK. Generated and transmitted to the facing gateway device 1. In addition, when it is determined that the packet is a TCP packet generated by the opposite gateway device 1 and the packet received by the TCP management unit 164 is TCP-ACK, the session state table 171 is updated. Since these TCP packets are transmitted to the gateway device 1, a packet discard instruction is output to the packet holding unit 15.

一方、セッション情報取得部162がIP端末3の生成したTCPパケットであると判断した場合、ユーザデータを受信した場合と同様に、セッション状態テーブル171を更新して無通信監視部18に対応するセッションのタイマリセット信号を送信し、パケット保留部15には転送指示を出力する。
なお、図3では呼制御ネットワーク5から入力されたパケットもパケット保留部15で一時保留する構成としているが、パケット検出部14Bにパケットの種類を分別し、ユーザデータもしくはIP端末3A宛のIPパケットであれば転送し、それ以外であれば廃棄する機能を設け、パケット保留部15を迂回するようにしても良い。
On the other hand, when the session information acquisition unit 162 determines that the TCP packet is generated by the IP terminal 3, the session corresponding to the no-communication monitoring unit 18 is updated by updating the session state table 171 as in the case of receiving user data. The timer reset signal is transmitted, and a transfer instruction is output to the packet holding unit 15.
In FIG. 3, the packet input from the call control network 5 is also temporarily held by the packet holding unit 15, but the packet type is classified by the packet detection unit 14B and the user data or the IP packet addressed to the IP terminal 3A is sorted. If this is the case, a transfer function may be provided, and if not, a packet discarding unit 15 may be bypassed.

ここで、ゲートウェイ装置1がセッション確立後に一定期間、このセッションを使用するIPパケットを検出しない場合の動作について説明する。
上記のとおり、無通信監視部18はセッションごとにタイマ180を備えている。各タイマはセッション確立時にスタートし、このセッションを使用するIPパケットを検出するとリセットされ、BYEパケットを受信するとリセットされて停止する。また、タイマ180は満了によっても停止する。
Here, an operation when the gateway device 1 does not detect an IP packet using this session for a certain period after the session is established will be described.
As described above, the no-communication monitoring unit 18 includes the timer 180 for each session. Each timer starts when a session is established, and is reset when an IP packet using this session is detected, and is reset and stops when a BYE packet is received. The timer 180 also stops when it expires.

タイマ180には満了時間が予め設定されており、タイマ180がスタートしてから一定時間内にこのタイマと対応付けられたセッションを使用するIPパケットが検出されなければ満了する。タイマ180が満了すると、無通信監視部18はセッション情報取得部162にセッション切断要求を送信する。セッション情報取得部162は無通信監視部18からのセッション切断要求に基づいてセッション状態テーブル171を更新し、セッション管理部163にBYEパケットの生成及び送信を指示する。対向するゲートウェイ装置1からこのBYEパケットへの応答である200 OKレスポンスを受信すると、セッション情報管理部163はこのセッションを切断し、セッション情報取得部162はセッション状態テーブル171を更新する。
なお、タイマの満了時間はシステムの運用方針等によって決まる値であり、ゲートウェイ装置1に外部インタフェースを備えることで、保守の際に変更することもできる。
The timer 180 has an expiration time set in advance, and expires if an IP packet that uses a session associated with this timer is not detected within a certain time after the timer 180 starts. When the timer 180 expires, the no-communication monitoring unit 18 transmits a session disconnection request to the session information acquisition unit 162. The session information acquisition unit 162 updates the session state table 171 based on the session disconnection request from the non-communication monitoring unit 18, and instructs the session management unit 163 to generate and transmit a BYE packet. When a 200 OK response that is a response to this BYE packet is received from the opposite gateway device 1, the session information management unit 163 disconnects this session, and the session information acquisition unit 162 updates the session state table 171.
Note that the expiration time of the timer is a value determined by a system operation policy or the like, and can be changed during maintenance by providing the gateway device 1 with an external interface.

セッションを切断する際、セッション情報取得部162はタイマ満了によりセッションを切断する場合であってもBYEパケットを受信してセッションを切断する場合であっても、セッション状態テーブル171のフロー情報のひとつとしてセッション状態を「BYE」に更新する。これにより、ゲートウェイ装置1はセッションを確立する際に以前に対応するセッションがあったか否かを判断することができる。すなわち、IP端末3からTCPコネクションを確立するためのメッセージが送信されるのか、ゲートウェイ装置1自らTCP-SYNやTCP-ACKを生成しなければならないのかを判断できる。 When disconnecting a session, the session information acquisition unit 162 is one of the flow information of the session state table 171 regardless of whether the session is disconnected due to the expiration of the timer or the BYE packet is received and the session is disconnected. Update the session state to "BYE". Thereby, the gateway device 1 can determine whether or not there is a corresponding session before establishing the session. That is, it can be determined whether a message for establishing a TCP connection is transmitted from the IP terminal 3 or whether the gateway apparatus 1 itself has to generate a TCP-SYN or TCP-ACK.

図5の例では、セッション状態テーブル171にセッション状態の欄とTCPコネクション状態の欄を設け、以前にセッションがあったか否かを判別できるようにしている。別の方法として、フロー情報に「現在のフロー情報」と「過去のフロー情報」の欄を設け、セッションが切断されると「現在のフロー情報」を「過去のフロー情報」に変換し、現在のフロー情報をリセットするようにしても良い。このようなセッション状態テーブルを設けることにより、セッション切断後にこのセッションを再確立する場合、セッション制御部16は以前にセッションがあったか否かを判断するために「過去のフロー情報」の欄を確認すればよいことになる。 In the example of FIG. 5, the session status table 171 includes a session status column and a TCP connection status column so that it can be determined whether or not a session has occurred before. As another method, the fields of “current flow information” and “past flow information” are provided in the flow information, and when the session is disconnected, “current flow information” is converted to “past flow information” The flow information may be reset. By providing such a session state table, when reestablishing this session after disconnecting the session, the session control unit 16 checks the “Past flow information” column in order to determine whether or not there has been a session before. It will be good.

ところで、ゲートウェイ装置1はパケット処理やセッション管理をソフトウェアで行うこともある。ソフトウェアで処理する場合も上記と同様の動作をするが、プログラムの処理を図8のフローチャートを用いて説明する。
ゲートウェイ装置1はIPパケットが到着したことを検出すると(S1)、メモリ13に一時保留する(S2)。次に、IPパケットのIPアドレスに基づいてメモリ13に記憶されたセッション制御パラメータを呼び出し(S3)、対応するセッションが有るか無いかを判断する(S4)。対応するセッションがある場合、セッションに対応して設けられたタイマ180を停止してリセットし(S5)、メモリ13に一時保留されたIPパケットを転送する(S10)。また、IPパケットの転送をトリガーとしてタイマ180をスタートする(S11)。なお、タイマ180が満了すると、ゲートウェイ装置1は対応するセッションを切断する。
By the way, the gateway device 1 may perform packet processing and session management by software. When processing by software, the same operation as described above is performed, but the processing of the program will be described with reference to the flowchart of FIG.
When the gateway device 1 detects that an IP packet has arrived (S1), it temporarily holds it in the memory 13 (S2). Next, the session control parameter stored in the memory 13 is called based on the IP address of the IP packet (S3), and it is determined whether there is a corresponding session (S4). If there is a corresponding session, the timer 180 provided corresponding to the session is stopped and reset (S5), and the temporarily suspended IP packet is transferred to the memory 13 (S10). Further, the timer 180 is started with the transfer of the IP packet as a trigger (S11). When the timer 180 expires, the gateway device 1 disconnects the corresponding session.

S4において対応するセッションが無いと判断した場合はセッションを確立し(S6)、呼び出したセッション制御パラメータに基づいてIP端末3の要求によるセッションの確立なのか、自発的なセッションの確立なのかを判断する(S7)。
なお、「自発的」とはIP端末3のセッション確立要求ではなく、ユーザデータを転送するためにゲートウェイ装置1が一旦切断したセッションを自ら再確立することをいう。
If it is determined in S4 that there is no corresponding session (S6), a session is established (S6), and it is determined whether a session is established by a request from the IP terminal 3 or a spontaneous session is established based on the called session control parameter (S7).
Note that “voluntary” is not a session establishment request of the IP terminal 3, but means that the gateway device 1 reestablishes a session once disconnected in order to transfer user data.

IP端末3の要求によるセッション確立の場合、すなわち、セッション状態テーブル171のセッション状態の欄に「200 OK」が記入され、TCPコネクション状態の欄に「(TCP-SYN)」、「(TCP-SYN/ACK)」、「(TCP-ACK)」のいずれも記入されず、タイマの欄が空欄の場合、IP端末3からの要求によりセッションを再確立したもののTCPコネクションは確立されていない場合、ゲートウェイ装置1はTCPの3way handshakeに必要なTCPパケットがIP端末3から送信されるのを待ってこれを中継する(S8)。一方、自発的なセッション再確立の場合、すなわち、セッション状態テーブル171のセッション状態の欄に「200 OK」が記入され、かつ、タイマの欄に「満了」が記入されている場合、このセッションはゲートウェイ装置1により以前に切断されたセッションを再確立するものであり、IP端末3はTCPの3way handshakeに必要なTCPパケットを送信しないので、ゲートウェイ装置1自身がパケットを生成し、TCPコネクションを確立する(S9)。
S8又はS9によりTCPコネクションが確立すると、メモリ13に保留しているTCPパケットのユーザデータがあればこれを呼制御ネットワークに転送し(S10)、対応するセッションのタイマ180をスタートさせる(S11)。
When a session is established by a request from the IP terminal 3, that is, “200 OK” is entered in the session status column of the session status table 171, and “(TCP-SYN)” and “(TCP-SYN) are entered in the TCP connection status column. / ACK) "and" (TCP-ACK) "are not entered, the timer field is blank, the session is reestablished by a request from the IP terminal 3, but the TCP connection is not established, the gateway The device 1 waits for a TCP packet necessary for TCP 3-way handshake to be transmitted from the IP terminal 3 and relays it (S8). On the other hand, in the case of spontaneous session re-establishment, that is, when “200 OK” is entered in the session status column of the session status table 171 and “expiration” is entered in the timer column, this session is Reestablish a session that was previously disconnected by the gateway device 1, and the IP terminal 3 does not transmit a TCP packet necessary for the TCP three-way handshake. Therefore, the gateway device 1 itself generates a packet and establishes a TCP connection. (S9).
When the TCP connection is established in S8 or S9, if there is user data of the TCP packet held in the memory 13 is transferred to the call control network (S10), the timer 180 of the corresponding session is started (S11).

なお、ここではセッション制御プロトコルとしてSIPを用いる場合について説明したが、H.323、MEGACO(Media Gateway Control Protocol)のようにIPネットワーク上でセッション制御やセッション管理ができるプロトコルであれば他のプロトコルを用いても良い。 Although the case where SIP is used as the session control protocol has been described here, other protocols can be used as long as they are protocols capable of session control and session management on an IP network such as H.323 and MEGACO (Media Gateway Control Protocol). It may be used.

本実施の形態によれば、ゲートウェイ装置1は中継するIPパケットを検出するIPパケット検出部14A、14Bと、IPパケットを一時的に保留するパケット保留部15と、IPパケットのセッション制御を行うセッション制御部16と、セッション制御に必要なセッション制御パラメータやセッションの状態を記憶する記憶部17と、セッションごとのタイマ180と、を備えたことにより、一定期間セッションを使用するIPパケットが検出されない場合にこのセッションを切断することができるため、呼制御ネットワークの通信路を有効に活用できる。 According to the present embodiment, the gateway device 1 includes IP packet detection units 14A and 14B that detect IP packets to be relayed, a packet holding unit 15 that temporarily holds IP packets, and a session that performs session control of IP packets. When the control unit 16, the storage unit 17 that stores session control parameters and session state necessary for session control, and the timer 180 for each session, an IP packet that uses a session for a certain period is not detected. Since this session can be disconnected, the communication path of the call control network can be used effectively.

また、ゲートウェイ装置1は、中継するIPパケットのIPアドレスやポート番号、プロトコルといったフロー条件と、呼接続情報である宛先SIP−URI、帯域といったセッション制御パラメータとを関連付けたセッション情報テーブル170、及び実際に行われた通信の情報とセッションの状態を示すフロー情報とから構成されたセッション状態テーブル171とを備え、さらにTCPコネクションの確立に必要なメッセージの生成や受付といった管理を行うTCP管理機能を備えたことにより、ゲートウェイ装置1が自らセッションを切断した場合であっても、セッション切断後に受信したこのセッションを使用するTCPパケットの宛先SIP−URIに基づいて再度セッションを確立し、セッション再確立時に取得した宛先アドレス・宛先ポート番号、及びTCPパケットのTCPヘッダに格納された送信元IPアドレス・送信元ポート番号に基づいてTCPコネクションも自ら確立することができる。 In addition, the gateway device 1 includes a session information table 170 in which flow conditions such as an IP address, a port number, and a protocol of an IP packet to be relayed are associated with session control parameters such as a destination SIP-URI that is call connection information and a bandwidth, And a session status table 171 composed of information on the communication performed and flow information indicating the status of the session, and further includes a TCP management function for performing management such as generation and reception of a message necessary for establishing a TCP connection. Thus, even when the gateway device 1 disconnects itself, the session is reestablished based on the destination SIP-URI of the TCP packet that uses this session received after the session disconnection, and is acquired when the session is reestablished. Destination address Scan-destination port number, and the TCP connection based on the source IP address and transmission source port number stored in the TCP header of the TCP packet can also establish themselves.

また、通信システムにおいて、このような機能を有するゲートウェイ装置1を設けることにより、データの伝送需要に応じてゲートウェイ装置1がセッションを切断したり再確立したりできるため、セッションの接続時間ではなく伝送路の使用時間に応じた柔軟な課金管理も可能となる。 In addition, by providing the gateway device 1 having such a function in the communication system, the gateway device 1 can disconnect or re-establish the session according to the data transmission demand. Flexible billing management according to road usage time is also possible.

実施の形態2.
実施の形態1では、セッション切断後に再度セッションを確立してTCPパケットを中継する場合について説明した。実施の形態2では、セッション切断前後においてTCPの連続性が要求される場合について説明する。
Embodiment 2. FIG.
In the first embodiment, the case where the session is established again after the session is disconnected and the TCP packet is relayed has been described. In the second embodiment, a case where TCP continuity is required before and after session disconnection will be described.

本実施の形態に係るゲートウェイ装置1が使用される通信システム100の構成、及びゲートウェイ装置1のハードウェア構成は実施の形態1と同じであるため説明を省略する。ゲートウェイ装置1の機能及び動作について図9及び図10を用いて説明する。
図9は実施の形態1に記載の図6の構成に順序情報管理部165を追加したもので、その他の構成は図6と同じである。順序情報管理部165は、TCPコネクションを使用する呼制御ネットワーク5において、シーケンス番号やACK番号に連続性が要求される場合に、自身で生成するTCPパケットに順序情報を付与したり、受信したTCPパケットから順序情報を抽出したりする。
Since the configuration of the communication system 100 in which the gateway device 1 according to the present embodiment is used and the hardware configuration of the gateway device 1 are the same as those in the first embodiment, description thereof will be omitted. Functions and operations of the gateway device 1 will be described with reference to FIGS. 9 and 10.
FIG. 9 is obtained by adding an order information management unit 165 to the configuration of FIG. 6 described in the first embodiment, and other configurations are the same as those of FIG. In the call control network 5 that uses a TCP connection, the order information management unit 165 attaches order information to a TCP packet generated by itself when a continuity is required for a sequence number or an ACK number. Extract sequence information from packets.

順序情報管理部165で抽出されたシーケンス番号等の順序情報はセッション情報取得部162に伝達され、セッション状態テーブル171に保存される。また、順序情報を付与する場合には、セッション情報取得部162がセッション状態テーブル171から順序情報を取り出して順序情報管理部165に伝達する。順序情報管理部165は、セッション情報取得部162から受取った順序情報に基づいて新たな順序情報を生成し、TCP生成部164に通知する。TCP生成部164は、生成するTCPコネクション制御用のTCPパケットのTCPヘッダに、生成した順序情報であるシーケンス番号やACK番号を付けて出力する。 Order information such as a sequence number extracted by the order information management unit 165 is transmitted to the session information acquisition unit 162 and stored in the session state table 171. When order information is added, the session information acquisition unit 162 extracts the order information from the session state table 171 and transmits it to the order information management unit 165. The order information management unit 165 generates new order information based on the order information received from the session information acquisition unit 162 and notifies the TCP generation unit 164 of the new order information. The TCP generation unit 164 adds a sequence number or an ACK number, which is the generated order information, to the TCP header of the TCP packet for TCP connection control to be generated and outputs the TCP header.

ここで、通信システム全体のシーケンスを図10に示す。なお、同一動作は同一番号を付して説明する。
セッションが切断されるまでの動作(S101〜S113)は実施の形態1と同じであるため説明を省略する。
セッションが切断された状態のS214にて、IP端末3Aからシーケンス番号が「X」、ACK番号が「Y」のユーザデータData#2のTCPパケットが送信されると、ゲートウェイ装置1AはこのTCPパケットをパケット保留部15に一時的に保留し、受信したTCPパケットの情報をセッション制御部16Aに通知する。
Here, FIG. 10 shows a sequence of the entire communication system. The same operations will be described with the same numbers.
Since the operation until the session is disconnected (S101 to S113) is the same as that in the first embodiment, the description thereof is omitted.
When the TCP packet of the user data Data # 2 having the sequence number “X” and the ACK number “Y” is transmitted from the IP terminal 3A in S214 in a state where the session is disconnected, the gateway device 1A transmits the TCP packet Is temporarily held in the packet holding unit 15, and information on the received TCP packet is notified to the session control unit 16A.

セッション制御部16Aは受信したIPパケットからIPアドレス、プロトコルの種類、ポート番号、等の情報を抽出し、この情報に基づいてセッション情報テーブル170から対応するセッション制御パラメータを、セッション状態テーブル171からこのIPパケットに対応するセッションは一定期間使用されていないためゲートウェイ装置1Aまたはゲートウェイ装置1Bにより切断されたものか否かの情報を読み取る。 The session control unit 16A extracts information such as an IP address, a protocol type, and a port number from the received IP packet. Based on this information, the session control unit 16A extracts the corresponding session control parameter from the session information table 170 from the session state table 171. Since the session corresponding to the IP packet has not been used for a certain period of time, information indicating whether or not the session has been disconnected by the gateway device 1A or the gateway device 1B is read.

ところで、ゲートウェイ装置1Aが保留したTCPパケットのデータを転送するには、呼制御ネットワーク5のセッション及びTCPコネクションを再確立する必要がある。セッション制御部16Aが記憶部17のセッション状態テーブル171を参照し、中継するIPパケットの通信路に対応するセッションが切断されていると判断した場合、ゲートウェイ装置1Aはセッション管理部163に指示を出し、INVITEメッセージを生成してSIPサーバ2に向けて送信させる(S115)。SIPサーバ2はINVITEメッセージを受取るとこのゲートウェイ装置1Aに100 Tryingパケットを返信する(S116)と共に、対向するゲートウェイ装置1BにINVITEメッセージを転送する(S117)。対向するゲートウェイ装置1BはINVITEメッセージを受取るとSIPサーバ2に100 Tryingパケットの応答を返し(S118)、セッション確立の準備が整うとSIPサーバ2に200 OKレスポンスを送信する(S119)。SIPサーバ2は200 OKレスポンスを受信するとINVITEメッセージを送信したゲートウェイ装置1Aに転送し、このゲートウェイ装置1Aがこの200 OKレスポンスを受信し、ACKを返信する(S120)とセッションの確立が完了する。 By the way, in order to transfer the data of the TCP packet held by the gateway apparatus 1A, it is necessary to reestablish the session and TCP connection of the call control network 5. When the session control unit 16A refers to the session state table 171 in the storage unit 17 and determines that the session corresponding to the communication path of the IP packet to be relayed is disconnected, the gateway device 1A issues an instruction to the session management unit 163. Then, an INVITE message is generated and transmitted to the SIP server 2 (S115). When the SIP server 2 receives the INVITE message, it returns a 100 Trying packet to the gateway device 1A (S116) and transfers the INVITE message to the opposite gateway device 1B (S117). When the opposite gateway apparatus 1B receives the INVITE message, it returns a 100 Trying packet response to the SIP server 2 (S118), and transmits a 200 OK response to the SIP server 2 when preparation for session establishment is completed (S119). When the SIP server 2 receives the 200 OK response, the SIP server 2 transfers the INVITE message to the gateway apparatus 1A that has transmitted the INVITE message. The gateway apparatus 1A receives the 200 OK response and returns an ACK (S120), thereby completing the session establishment.

一旦切断されたセッションが再確立された場合、ゲートウェイ装置1AはTCP-SYNパケットを生成して対向するゲートウェイ装置1Bとの間で3way handshakeを行う(S221〜S223)。このとき、TCPヘッダのシーケンスフィールドにはIP端末3Aから受信したIPパケットのシーケンス番号「X」すなわち第1の順序情報より1つ小さい「X−1」すなわち第2の順序情報をゲートウェイ装置1Aのシーケンス番号初期値として記入する。また、TCP-SYNパケットではTCPヘッダのACKフィールドは通常使用しないため、この領域を利用してゲートウェイ装置1Bに応答の際にシーケンス番号として使用して欲しい値「Y−1」を記入する。 When the session once disconnected is re-established, the gateway device 1A generates a TCP-SYN packet and performs a three-way handshake with the opposite gateway device 1B (S221 to S223). At this time, the sequence number “X” of the IP packet received from the IP terminal 3A, that is, “X-1” that is one smaller than the first order information, that is, the second order information, is stored in the sequence field of the TCP header. Enter as the initial sequence number. In addition, since the ACK field of the TCP header is not normally used in the TCP-SYN packet, a value “Y−1” that is desired to be used as a sequence number is written in the gateway device 1B using this area.

なお、TCP-SYNパケットのACKフィールドは3way handshakeをする装置であっても通常は参照しない領域である。TCP-SYNパケットのACKフィールドに拡張機能を持たせる場合は、上記のようにゲートウェイ装置1A、1Bに対応する機能を予め備えておくものとする。 Note that the ACK field of the TCP-SYN packet is an area that is not usually referred to even by a device that performs 3-way handshaking. When an extended function is added to the ACK field of the TCP-SYN packet, the functions corresponding to the gateway devices 1A and 1B are provided in advance as described above.

ゲートウェイ装置1Aがシーケンスフィールドに「X−1」、ACKフィールドに「Y−1」を記入したTCP-SYNパケットを生成してゲートウェイ装置1Bに送信すると(S221)、ゲートウェイ装置1Bは自身のシーケンス番号初期値を「Y−1」に設定し、TCP-SYN/ACKパケットのシーケンスフィールドに「Y−1」を記入する。また、ゲートウェイ装置1BはTCP-SYNパケットの順序情報を正常に受信したことを伝えるため、ACKフィールドにTCP-SYNパケットのシーケンス番号に「+1」の計算を行った「X」を記入し、ゲートウェイ装置1Aに返信する(S222)。 When the gateway device 1A generates a TCP-SYN packet with “X-1” in the sequence field and “Y-1” in the ACK field and transmits it to the gateway device 1B (S221), the gateway device 1B has its own sequence number. The initial value is set to “Y−1”, and “Y−1” is entered in the sequence field of the TCP-SYN / ACK packet. Further, in order to notify that the TCP-SYN packet order information has been normally received, the gateway device 1B enters “X” obtained by calculating “+1” in the sequence number of the TCP-SYN packet in the ACK field. It returns to the device 1A (S222).

ゲートウェイ装置1Bからシーケンスフィールドが「Y−1」、ACKフィールドが「X」のTCP-SYN/ACKパケットを受取ったゲートウェイ装置1Aは、ACKフィールドに記載されたACK番号により自身が送信したTCP-SYNパケットが正常に受信されたことを確認できる。TCP-SYN/ACKパケットを正常に受信したゲートウェイ装置1AはTCP-ACKパケットを返信する(S223)。このとき、シーケンスフィールドには先ほど送信したTCP-SYNパケットの次に送信するパケットであることを示すため、TCP-SYNのシーケンス番号である「X−1」に「+1」した「X」を記入し、ACKフィールドには「Y−1」に「+1」の計算をした「Y」を記入して送信する。 The gateway device 1A that has received the TCP-SYN / ACK packet with the sequence field “Y-1” and the ACK field “X” from the gateway device 1B transmits the TCP-SYN transmitted by the ACK number described in the ACK field. It can be confirmed that the packet was received normally. The gateway apparatus 1A that has received the TCP-SYN / ACK packet normally returns a TCP-ACK packet (S223). At this time, in order to indicate that it is a packet to be transmitted next to the previously transmitted TCP-SYN packet, the sequence field is filled with “X” obtained by adding “+1” to the sequence number “X−1” of the TCP-SYN. In the ACK field, “Y” obtained by calculating “+1” is entered in “Y−1” and transmitted.

このようにTCPパケットに順序情報を付与することにより、3way handshakeが完了した時点でゲートウェイ装置1Aには所望のシーケンス番号である「X」と所望のACK番号である「Y」を設定することができる。これらの値はゲートウェイ装置1Aに保留しているユーザデータとそれぞれ同じ値であることから(S224)、セッション切断前後においてTCPの順序情報の連続性を保つことができる。 By assigning the order information to the TCP packet in this manner, the desired sequence number “X” and the desired ACK number “Y” can be set in the gateway device 1A when the three-way handshake is completed. it can. Since these values are the same values as the user data held in the gateway device 1A (S224), the continuity of the TCP order information can be maintained before and after session disconnection.

本実施の形態によれば、実施の形態1に記載の効果に加えて、ユーザデータの順序情報を抽出し、この値に基づいてTCPの3way handshakeの際にゲートウェイ装置の順序情報初期値を設定することにより、セッション切断前後においてTCPの順序情報に連続性が要求される場合であってもTCP通信を再開できる。 According to the present embodiment, in addition to the effects described in the first embodiment, the order information of the user data is extracted, and based on this value, the initial value of the order information of the gateway device is set at the time of TCP three-way handshake. By doing so, TCP communication can be resumed even when continuity is required for TCP order information before and after session disconnection.

実施の形態3.
実施の形態2では、セッション切断前後でTCPの順序情報の連続性を保つために、2つのゲートウェイ装置間で行うTCPの3way handshakeを用いてゲートウェイ装置のシーケンス番号初期値及びACK番号初期値を設定した。実施の形態3では、セッション再確立時の制御プロトコル及びTCPの3way handshakeを利用して順序情報の連続性を保つ場合について説明する。
Embodiment 3 FIG.
In the second embodiment, in order to maintain the continuity of TCP sequence information before and after session disconnection, the sequence number initial value and the ACK number initial value of the gateway device are set using the TCP three-way handshake performed between the two gateway devices. did. In the third embodiment, a case will be described in which continuity of order information is maintained by using a control protocol at the time of session re-establishment and TCP 3-way handshake.

本実施の形態に係るゲートウェイ装置1が使用される通信システム100の構成、及びゲートウェイ装置1のハードウェア構成は実施の形態1と同じであるため説明を省略する。ゲートウェイ装置1の機能及び動作について図11ないし図13を用いて説明する。 Since the configuration of the communication system 100 in which the gateway device 1 according to the present embodiment is used and the hardware configuration of the gateway device 1 are the same as those in the first embodiment, description thereof will be omitted. The function and operation of the gateway device 1 will be described with reference to FIGS.

図11は実施の形態2に記載の図9の構成とほぼ同じで、順序情報管理部165Bの機能が一部異なる。TCPの連続性が要求される呼制御ネットワーク5において、順序情報として0以上の整数しか許容されない場合がある。順序情報管理部165Bは中継するIPパケットから順序情報を抽出し、新たな順序情報を生成してセッション制御用のパケットやTCPコネクション用のパケットに付与する。また、ユーザデータの順序情報は新たに生成した順序情報に変換する。 11 is substantially the same as the configuration of FIG. 9 described in the second embodiment, and a part of the function of the order information management unit 165B is different. In the call control network 5 that requires TCP continuity, only an integer of 0 or more may be allowed as order information. The order information management unit 165B extracts the order information from the relayed IP packet, generates new order information, and assigns it to the session control packet and the TCP connection packet. Further, the order information of user data is converted into newly generated order information.

順序情報管理部165Bはセッション情報取得部162と双方向に信号のやり取りができるように接続されており、順序情報管理部165BがIPパケットから抽出したシーケンス番号やACK番号といった順序情報はセッション情報取得部162に伝えられ、セッション状態テーブル171に記憶される。また、順序情報管理部165Bが新たな順序情報を生成する際には、セッション情報取得部162がセッション状態テーブル171から順序情報を取り出して順序情報管理部165Bに伝える。
順序情報管理部165Bは生成した新たな順序情報をTCP管理部164のTCP生成部1640に伝え、TCP生成部1640はこの順序情報をTCP-SYNパケットやTCP-ACKパケットのTCPヘッダにシーケンス番号やACK番号として記入して出力する。
The order information management unit 165B is connected to the session information acquisition unit 162 so that signals can be exchanged in both directions, and the order information such as the sequence number and the ACK number extracted from the IP packet by the order information management unit 165B is the session information acquisition. Is transmitted to the unit 162 and stored in the session state table 171. Further, when the order information management unit 165B generates new order information, the session information acquisition unit 162 extracts the order information from the session state table 171 and transmits it to the order information management unit 165B.
The order information management unit 165B transmits the generated new order information to the TCP generation unit 1640 of the TCP management unit 164. The TCP generation unit 1640 transmits this order information to the TCP header of the TCP-SYN packet or TCP-ACK packet. Enter and output as an ACK number.

ここで、通信システム全体のシーケンスを図12に示す。
セッションが切断されるまでの動作(S101〜S113)は実施の形態1と同じであるため説明を省略する。
セッションが切断された状態のS214にて、IP端末3Aからシーケンス番号が「X」、ACK番号が「Y」のユーザデータData#2のTCPパケットが送信されると、ゲートウェイ装置1AはこのTCPパケットをパケット保留部15に一時的に保留し、受信したTCPパケットの情報をセッション制御部16Bに通知する。
なお、IP端末3Aから送信されたData#2のシーケンス番号「X」はTCPの順序情報の連続性を示すものであり、第1の順序情報に相当する。
Here, FIG. 12 shows a sequence of the entire communication system.
Since the operation until the session is disconnected (S101 to S113) is the same as that in the first embodiment, the description thereof is omitted.
When the TCP packet of the user data Data # 2 having the sequence number “X” and the ACK number “Y” is transmitted from the IP terminal 3A in S214 in a state where the session is disconnected, the gateway device 1A transmits the TCP packet Is temporarily held in the packet holding unit 15, and information on the received TCP packet is notified to the session control unit 16B.
Note that the sequence number “X” of Data # 2 transmitted from the IP terminal 3A indicates the continuity of the TCP order information, and corresponds to the first order information.

セッション制御部16Bは受信したIPパケットからIPアドレス、プロトコルの種類、ポート番号、等の情報を抽出し、この情報に基づいてセッション情報テーブル170から対応するセッション制御パラメータを、セッション状態テーブル171からこのIPパケットに対応するセッションは一定期間使用されていないためゲートウェイ装置1Aまたはゲートウェイ装置1Bにより切断されたものか否かの情報を読み取る。 The session control unit 16B extracts information such as an IP address, a protocol type, and a port number from the received IP packet. Based on this information, a session control parameter corresponding to the session information table 170 is extracted from the session state table 171. Since the session corresponding to the IP packet has not been used for a certain period of time, information indicating whether or not the session has been disconnected by the gateway device 1A or the gateway device 1B is read.

ゲートウェイ装置1Aが保留したデータを転送するには、呼制御ネットワーク5のセッション及びTCPコネクションを再確立する必要がある。セッション制御部16Bが記憶部17のセッション状態テーブル171を参照し、対応するセッションは切断されていると判断した場合、ゲートウェイ装置1Aはセッション管理部163に指示を出し、順序情報管理部165Bにて抽出したユーザデータData#2のシーケンス番号及びACK番号を含むINVITEメッセージを生成して送信させる(S315)。 In order to transfer the data held by the gateway device 1A, it is necessary to reestablish the session and TCP connection of the call control network 5. When the session control unit 16B refers to the session state table 171 in the storage unit 17 and determines that the corresponding session is disconnected, the gateway device 1A issues an instruction to the session management unit 163, and the order information management unit 165B An INVITE message including the sequence number and ACK number of the extracted user data Data # 2 is generated and transmitted (S315).

ここで、図12のS315にてゲートウェイ装置1Aが送信するINVITEメッセージのメッセージフォーマットの例を図13に示す。このメッセージはテキスト形式で記載され、リクエストの種類等が格納されたリクエスト行と、パケット概要を示す情報が格納されたヘッダ領域と、空白行と、セッション確立後の通話に関する情報が格納されたボディ領域とで構成されている。リクエスト行の内容、必須のヘッダ、及びボディ領域の具体的なパラメータについて説明する。 Here, FIG. 13 shows an example of the message format of the INVITE message transmitted by the gateway apparatus 1A in S315 of FIG. This message is written in text format, a request line that stores the request type, etc., a header area that stores information indicating the packet outline, a blank line, and a body that stores information related to the call after the session is established. It is composed of areas. The contents of the request line, essential headers, and specific parameters of the body area will be described.

(リクエスト行)
リクエスト行は3つの情報、すなわちリクエストの種類、リクエストの宛先を示すためのURI、SIPのバージョンにより構成されている。図13の例では、リクエストの種類が「INVITE」、宛先のURIが「sip:85011bf9a84ecf6f@121.0.50.50」、SIPのバージョンが「SIP/2.0」となっている。
(Request line)
The request line includes three types of information, that is, a request type, a URI for indicating a request destination, and a SIP version. In the example of FIG. 13, the request type is “INVITE”, the destination URI is “sip: 85011bf9a84ecf6f@121.0.50.50”, and the SIP version is “SIP / 2.0”.

(ヘッダ領域のパラメータ)
ヘッダにはリクエストの概要を示すための情報が「ヘッダ名:値」という形式で複数格納されている。
Via:SIPのバージョン、データ伝送に使用するプロトコル、このリクエストに対するレスポンスを送る相手を示す。図13の例ではSIPのバージョンをSIP/2.0、データ伝送プロトコルをUDP、レスポンスを送る相手は1.1.1.1のbranch=z9hG4bK29ffa9907d949bd9に設定されている。
Max-Forwards:リクエストの最大中継回数を示す。この値は1回中継されるごとに1ずつ減らされ、0になるとエラーを示すレスポンスが返される。「70」という値はSIPで推奨されている一般的な値である。
From:リクエストの送信者を示す。なお、tagは送信者を識別するための値である。図13の例では送信者をsip:foo@example.com、tagをaaaaaとしている。
To:リクエストの受信者を示す。図13の例ではsip:bar@example.com、tagをbbbbbとしている。
Call-ID:一連の通話(セッション)で発生するSIPリクエストやSIPレスポンスを他の通話(セッション)のものと識別するための識別子を示す。この識別子はINVITEによるセッションの確立要求からBYEによるセッション切断要求まで同じものが使用される。また、他のセッションとは異なるユニークな識別子を設定する必要がある。ここではccccc@1.1.1.1が設定されている。
CSeq:リクエストの順序を示す。図13の例では1が設定されている。
Contact:これ以降のリクエストの送信先をURIで示す。図13の例ではsip:foo@1.1.1.1が設定されている。
Content-Type:この後に続くボディ領域の種類を示す。図13の例ではボディがSDPなのでapplication/sdpが設定されている。
Content-Lencgth:ボディ領域のサイズを示す。図13の例ではボディが182バイトに設定されていることを示している。
(Header area parameters)
The header stores a plurality of pieces of information for indicating an outline of the request in the form of “header name: value”.
Via: Indicates the SIP version, the protocol used for data transmission, and the partner to which a response to this request is sent. In the example of FIG. 13, the SIP version is set to SIP / 2.0, the data transmission protocol is set to UDP, and the party to which the response is sent is set to 1.1.1.1 branch = z9hG4bK29ffa9907d949bd9.
Max-Forwards: Indicates the maximum number of relayed requests. This value is decremented by 1 every time it is relayed, and when it becomes 0, a response indicating an error is returned. The value “70” is a general value recommended by SIP.
From: Indicates the sender of the request. Tag is a value for identifying the sender. In the example of FIG. 13, the sender is sip: foo@example.com and the tag is aaaaa.
To: Indicates the recipient of the request. In the example of FIG. 13, sip: bar@example.com and tag are bbbbb.
Call-ID: An identifier for identifying a SIP request or SIP response generated in a series of calls (sessions) from those of other calls (sessions). The same identifier is used from the session establishment request by INVITE to the session disconnection request by BYE. Also, it is necessary to set a unique identifier different from other sessions. Here, ccccc@1.1.1.1 is set.
CSeq: Indicates the order of requests. In the example of FIG. 13, 1 is set.
Contact: Indicates the destination of subsequent requests by URI. In the example of FIG. 13, sip: foo@1.1.1.1 is set.
Content-Type: Indicates the type of body area that follows. In the example of FIG. 13, since the body is SDP, application / sdp is set.
Content-Lencgth: Indicates the size of the body area. The example of FIG. 13 shows that the body is set to 182 bytes.

(ボディ領域のパラメータ)
v:プロトコルのバージョンを示す。SDPのバージョン0を使用するため、図13の例ではv=0が設定されている。
o:セッションを識別するための情報を示す。ユーザ名、セッションID、セッションバージョン、ネットワークタイプ、アドレスタイプ、セッションを開始した装置のアドレスが左から順に記入されている。図13の例ではユーザ名が省略されている。また、ネットワークタイプのINはインターネットを使うことを示している。
s:セッション名を示す。図13では省略されている。
c:コネクション情報を示す。ネットワークタイプ、アドレスタイプ、送信元のホスト名又はIPアドレスが左から順に記入されている。
t:セッションの開始時刻、終了時刻を示す。セッションの開始や終了はSIPが制御するため、SDPでは指定することができず、ここではt=0 0がセットされている。
m:メディアについての情報を示す。メディアタイプ、ポート番号、プロトコル、フォーマットが左から順に記入されている。
a:様々な属性を示す。ひとつのaフィールドは属性と値からなり、複数のaフィールドを規定することもできる。図12のS213に記載されているTCPのシーケンス番号「X」とAck番号「Y」は、図13では、図中破線で囲んだように、シーケンス番号が属性「X-TCP-seq」、値「10000」として設定され、ACK番号が属性「X-TCP-ack」、値「20000」として設定されている。
(Body area parameters)
v: Indicates the protocol version. Since SDP version 0 is used, v = 0 is set in the example of FIG.
o: Indicates information for identifying a session. A user name, a session ID, a session version, a network type, an address type, and an address of a device that starts the session are entered in order from the left. In the example of FIG. 13, the user name is omitted. The network type IN indicates that the Internet is used.
s: Indicates a session name. It is omitted in FIG.
c: Indicates connection information. The network type, address type, source host name or IP address are entered in order from the left.
t: Indicates the start time and end time of the session. Since the start and end of the session is controlled by SIP, it cannot be specified in SDP, and t = 0 is set here.
m: Indicates information about the media. The media type, port number, protocol, and format are entered in order from the left.
a: Indicates various attributes. One a field consists of an attribute and a value, and a plurality of a fields can be defined. The TCP sequence number “X” and the Ack number “Y” described in S213 in FIG. 12 are the same as the sequence number “X-TCP-seq” and the value as shown in FIG. It is set as “10000”, the ACK number is set as the attribute “X-TCP-ack”, and the value “20000”.

SIPサーバ2はシーケンス番号及びACK番号を含むINVITEメッセージを受取るとゲートウェイ装置1Aに100 Tryingパケットを送信して応答し(S316)、このINVITEメッセージをゲートウェイ装置1Bに転送する(S317)。ゲートウェイ装置1BはINVITEメッセージを受取ると、このセッションで次にTCPを使用して伝送されてくるユーザデータのシーケンス番号が「X」、ACK番号が「Y」であるとの情報をセッション情報テーブル170に記憶する。 When the SIP server 2 receives the INVITE message including the sequence number and the ACK number, the SIP server 2 responds by transmitting a 100 Trying packet to the gateway device 1A (S316), and transfers this INVITE message to the gateway device 1B (S317). When the gateway apparatus 1B receives the INVITE message, the session information table 170 indicates that the sequence number of user data transmitted next using TCP in this session is “X” and the ACK number is “Y”. To remember.

ゲートウェイ装置1BはINVITEメッセージへの応答としてSIPサーバ2に100 Tryingパケットを送信し(S318)、セッション確立の準備が整うとゲートウェイ装置1Aに向けて200 OKレスポンスを送信する(S319)。ゲートウェイ装置1Aがこの200 OKレスポンスを受信し、ACKを返信する(S320)とセッションの確立が完了する。 The gateway apparatus 1B transmits a 100 Trying packet to the SIP server 2 as a response to the INVITE message (S318), and transmits a 200 OK response to the gateway apparatus 1A when preparation for session establishment is completed (S319). When the gateway device 1A receives this 200 OK response and returns an ACK (S320), the establishment of the session is completed.

一旦切断されたセッションが再確立された場合、ゲートウェイ装置1Aは実施の形態2と同様に、TCP-SYNパケットを生成して対向するゲートウェイ装置1Bとの間で3way handshakeを行う(S321〜S323)。このとき、順序情報付与・変換部165Bはゲートウェイ装置1Aで初期値として使用したいシーケンス番号すなわち第2の順序情報を決定し、TCPヘッダのシーケンスフィールドに記入する。図12の例ではシーケンス番号は「A」となっている(S321)。なお、ACK番号の初期値は通常0が用いられる。 When the session once disconnected is re-established, the gateway device 1A generates a TCP-SYN packet and performs a three-way handshake with the opposite gateway device 1B (S321 to S323) as in the second embodiment. . At this time, the order information assigning / converting unit 165B determines a sequence number to be used as an initial value in the gateway apparatus 1A, that is, second order information, and writes it in the sequence field of the TCP header. In the example of FIG. 12, the sequence number is “A” (S321). The initial value of the ACK number is usually 0.

ゲートウェイ装置1BにTCP-SYNパケットが到達すると、ゲートウェイ装置1Bも自身の順序情報付与・変換部165Bにて初期値として使用したいシーケンス番号を決定する。例えば図12の例では、ゲートウェイ装置1Bのシーケンス初期値を「B」としており、TCP-SYN/ACKパケットのシーケンスフィールドに「B」を記入し、ACKフィールドにはTCP-SYNパケットのシーケンス番号「A」を正常に受信したことを示すためにTCP-SYNのシーケンス番号に「+1」を演算した「A+1」を記入してゲートウェイ装置1Aに返信する(S322)。 When the TCP-SYN packet arrives at the gateway device 1B, the gateway device 1B also determines a sequence number to be used as an initial value in its own sequence information addition / conversion unit 165B. For example, in the example of FIG. 12, the sequence initial value of the gateway device 1B is “B”, “B” is entered in the sequence field of the TCP-SYN / ACK packet, and the sequence number “ In order to indicate that “A” has been normally received, “A + 1” obtained by calculating “+1” is written in the sequence number of TCP-SYN and returned to gateway apparatus 1A (S322).

ゲートウェイ装置1Bからシーケンスフィールドが「B」、ACKフィールドが「A+1」のTCP-SYN/ACKパケットを受取ったゲートウェイ装置1Aは、ACKフィールドに記載されたACK番号により自身が送信したTCP-SYNパケットが正常に受信されたことを確認できる。TCP-SYN/ACKパケットを正常に受信したゲートウェイ装置1Aは、TCP-ACKパケットを返信する(S323)。このとき、シーケンスフィールドには先ほど送信したTCP-SYNパケットの次に送信するTCPパケットであることを示すため、TCP-SYNのシーケンス番号である「A」に「+1」を演算した「A+1」を記入し、ACKフィールドにはTCP-SYN/ACKパケットのシーケンス番号を正常に受信したことを示すために「B」に「+1」を演算した「B+1」を記入してゲートウェイ装置1Bに返信する。 The gateway apparatus 1A that has received the TCP-SYN / ACK packet with the sequence field “B” and the ACK field “A + 1” from the gateway apparatus 1B receives the TCP-SYN packet transmitted by itself with the ACK number described in the ACK field. You can confirm that it was received normally. The gateway device 1A that has received the TCP-SYN / ACK packet normally returns a TCP-ACK packet (S323). At this time, in order to indicate that it is a TCP packet to be transmitted next to the previously transmitted TCP-SYN packet in the sequence field, “A + 1” obtained by calculating “+1” to “A” which is the sequence number of TCP-SYN. In the ACK field, in order to indicate that the sequence number of the TCP-SYN / ACK packet has been normally received, “B + 1” obtained by calculating “+1” is entered in “B” and returned to the gateway apparatus 1B.

このようにTCPパケットに順序情報を付与することにより、2つのゲートウェイ装置1A、1B間での3way handshakeが完了してTCPコネクションが確立すると、ゲートウェイ装置1Aにはシーケンス番号「A+1」とACK番号「B+1」は設定され、ゲートウェイ装置1Bにはシーケンス番号「B」とACK番号「A+1」が設定される。 By assigning order information to the TCP packet in this way, when the three-way handshake between the two gateway devices 1A and 1B is completed and a TCP connection is established, the gateway device 1A has a sequence number “A + 1” and an ACK number “ “B + 1” is set, and the sequence number “B” and the ACK number “A + 1” are set in the gateway apparatus 1B.

S214においてゲートウェイ装置1Aのパケット保留部15に一時保留されたTCPパケットは、TCPコネクションが確立するとセッション情報取得部162からの指令によりIPパケットを呼制御ネットワーク5に転送する(S324)。このとき、ゲートウェイ装置1Aのシーケンス番号は「A+1」、ACK番号は「B+1」に設定されているため、順序情報管理部165Bは転送するユーザデータ#2のシーケンスフィールドの値を「A+1」、ACKフィールドの値を「B+1」に変換する。 The TCP packet temporarily held in the packet holding unit 15 of the gateway device 1A in S214 transfers the IP packet to the call control network 5 according to a command from the session information acquisition unit 162 when the TCP connection is established (S324). At this time, since the sequence number of the gateway device 1A is set to “A + 1” and the ACK number is set to “B + 1”, the order information management unit 165B sets the value of the sequence field of the user data # 2 to be transferred to “A + 1”, ACK The field value is converted to “B + 1”.

このユーザデータData#2のTCPパケットがゲートウェイ装置1Bに到達すると、セッション制御部16BはこのTCPパケットからIPアドレスを抽出し、このIPアドレスに基づいてセッションを再確立する際にセッション情報テーブル170に記憶したシーケンス番号「X」及びACK番号「Y」を呼び出す。その後、順序情報管理部165Bにより、ユーザデータData#2のシーケンスフィールドの値を「A+1」から「X」に、ACKフィールドの値を「B+1」から「Y」に変換してIP端末3Bに転送する(S325)。 When the TCP packet of the user data Data # 2 arrives at the gateway device 1B, the session control unit 16B extracts the IP address from the TCP packet and stores it in the session information table 170 when reestablishing the session based on the IP address. Recall the stored sequence number “X” and ACK number “Y”. After that, the sequence information management unit 165B converts the sequence field value of the user data Data # 2 from “A + 1” to “X” and the ACK field value from “B + 1” to “Y”, and transfers them to the IP terminal 3B. (S325).

これ以降、IP端末3AからIP端末3BへTCPにて送信されるIPパケット、すなわちTCPパケットのシーケンス番号は1ずつインクリメントされる。例えばIP端末3AがTCPヘッダにシーケンス番号「X+n」、ACK番号「Y+m」を格納したデータData#nをTCPにてゲートウェイ装置1Aに送信した場合(S326)、ゲートウェイ装置1Aはシーケンス番号を「A+n+1」、ACK番号を「B+m+1」に変換し(S327)、ゲートウェイ装置1Bが再びシーケンス番号を「X+n」、ACK番号を「Y+m」に変換してIP端末3Bに転送する(S328)。 Thereafter, the IP packet transmitted from the IP terminal 3A to the IP terminal 3B by TCP, that is, the sequence number of the TCP packet is incremented by one. For example, when the IP terminal 3A transmits data Data # n in which the sequence number “X + n” and the ACK number “Y + m” are stored in the TCP header to the gateway apparatus 1A via TCP (S326), the gateway apparatus 1A sets the sequence number to “A + n + 1”. , The ACK number is converted to “B + m + 1” (S327), and the gateway apparatus 1B converts the sequence number to “X + n” and the ACK number to “Y + m” again and forwards them to the IP terminal 3B (S328).

このように、ゲートウェイ装置1Aがセッションを再確立する際に対向するゲートウェイ装置1BにTCPのシーケンス番号初期値及びACK番号初期値を通知しておくことで、呼制御ネットワーク5においてゲートウェイ装置1A、1BがTCPのシーケンス番号やACK番号として任意の値を用いる場合であっても、対向するゲートウェイ装置1Bが中継するユーザデータData#2のシーケンス番号及びACK番号をゲートウェイ装置1Aで変換される前の値に再変換することができる。   Thus, when the gateway device 1A reestablishes a session, the gateway device 1B is notified of the TCP sequence number initial value and the ACK number initial value to the opposing gateway device 1B. Is a value before the gateway device 1A converts the sequence number and ACK number of the user data Data # 2 relayed by the opposite gateway device 1B, even if an arbitrary value is used as the TCP sequence number or ACK number. Can be reconverted.

本実施の形態によれば、セッションを再確立する際の制御プロトコルとTCPの3way handshakeを利用して、TCPで通信されるユーザデータのシーケンス番号及びACK番号、ゲートウェイ装置1Aが呼制御ネットワーク5上で使用するシーケンス番号及びACK番号をゲートウェイ装置1Bに通知できるようにしたため、ACK番号は32bitの符号なし整数で表される値であるが、ゲートウェイ装置1A、1Bに設定されるACK番号が0より小さな値とならず、ユーザデータに含まれるTCPの順序情報の連続性を維持した状態でデータを中継することができる。 According to the present embodiment, the sequence number and ACK number of user data communicated by TCP and the gateway device 1A are connected to the call control network 5 using the control protocol for re-establishing the session and the 3-way handshake of TCP. Since the gateway apparatus 1B can be notified of the sequence number and the ACK number used in the above, the ACK number is a value represented by a 32-bit unsigned integer, but the ACK number set in the gateway apparatus 1A, 1B is 0 or more. The data can be relayed while maintaining the continuity of the TCP order information included in the user data, not a small value.

実施の形態4.
実施の形態3では、セッション切断前後でTCPの連続性を保つために、セッション再確立時の制御プロトコル及びTCPの3way handshakeを利用してゲートウェイ装置にシーケンス番号及びACK番号を設定した。実施の形態4では、セッション切断前後のセッション確立用の制御プロトコルを利用してTCPの連続性を維持する場合について説明する。
Embodiment 4 FIG.
In Embodiment 3, in order to maintain TCP continuity before and after session disconnection, a sequence number and an ACK number are set in the gateway device using a control protocol at the time of session re-establishment and TCP 3-way handshake. In the fourth embodiment, a case where TCP continuity is maintained using a control protocol for session establishment before and after session disconnection will be described.

本実施の形態に係るゲートウェイ装置1が使用される通信システム100の構成、及びゲートウェイ装置1のハードウェア構成は実施の形態1と同じであるため説明を省略する。ゲートウェイ装置1の機能及び動作について図14ないし図18を用いて説明する。
図14に示すように、セッション制御部16Cの構成は実施の形態1とほぼ同じで、セッション情報取得部162Cの機能が一部異なる。セッション情報取得部162Cには通信フローごとにフロー識別子を生成し管理する識別子管理部1620が設けられ、このフロー識別子は、図15に示すように、セッション情報テーブル170Cにセッション制御パラメータとあわせて記憶されている。
Since the configuration of the communication system 100 in which the gateway device 1 according to the present embodiment is used and the hardware configuration of the gateway device 1 are the same as those in the first embodiment, description thereof will be omitted. The function and operation of the gateway device 1 will be described with reference to FIGS.
As shown in FIG. 14, the configuration of session control unit 16C is substantially the same as in the first embodiment, and the function of session information acquisition unit 162C is partially different. The session information acquisition unit 162C is provided with an identifier management unit 1620 that generates and manages a flow identifier for each communication flow. As shown in FIG. 15, this flow identifier is stored in the session information table 170C together with the session control parameter. Has been.

ここで、図16のシーケンス図を用いて通信システム全体の動作について説明する。
IP端末3AからTCPコネクションの接続要求であるTCP-SYNパケットが送信され(S101)、ゲートウェイ装置1Aがこれを検出すると、ゲートウェイ装置1Aはセッション制御部16Cにて送信元IPアドレス、宛先IPアドレス、プロトコル、送信元ポート番号、宛先ポート番号等を抽出し、記憶部17のセッション情報テーブル170Cからセッション制御パラメータを取得する。
Here, the operation of the entire communication system will be described using the sequence diagram of FIG.
When a TCP-SYN packet, which is a connection request for a TCP connection, is transmitted from the IP terminal 3A (S101) and the gateway device 1A detects this, the gateway device 1A uses the session control unit 16C to send the source IP address, destination IP address, A protocol, a transmission source port number, a destination port number, and the like are extracted, and a session control parameter is acquired from the session information table 170C of the storage unit 17.

ゲートウェイ装置1Aは取得したセッション制御パラメータに基づいて、セッション制御部16Cの識別子管理部1620にて通信フローに対応するセッションごとに固有のフロー識別子を生成し、セッション管理部163にてこのフロー識別子を含むINVITEメッセージを生成する。なお、生成されたフロー識別子は、セッション制御パラメータとあわせてセッション情報テーブル170Cに記憶される。 Based on the acquired session control parameter, the gateway device 1A generates a unique flow identifier for each session corresponding to the communication flow in the identifier management unit 1620 of the session control unit 16C, and the session management unit 163 generates the flow identifier. Generate an INVITE message containing it. The generated flow identifier is stored in the session information table 170C together with the session control parameter.

ここで、ゲートウェイ装置1AがS402にて送信するINVITEメッセージの一例を図17に示す。INVITEメッセージのメッセージフォーマットは実施の形態3とほぼ同じで、属性を規定するaフィールドが異なる。図17の例では、図中破線で囲んだように、フロー識別子Zとして属性「X-peer-flowID」、値「30000」が設定されている。 Here, FIG. 17 shows an example of the INVITE message transmitted by the gateway apparatus 1A in S402. The message format of the INVITE message is almost the same as in the third embodiment, and the a field that defines the attribute is different. In the example of FIG. 17, the attribute “X-peer-flowID” and the value “30000” are set as the flow identifier Z as surrounded by a broken line in the figure.

ゲートウェイ装置1Aからを呼制御ネットワーク5にメッセージを送信する際、アドレス情報を秘匿するためにIPアドレスとポート番号を書き換えるNAPT(Network Address Port Transfer)変換という技術を用いることがある。NAPT変換前後の送信元IPアドレス及び送信元ポート番号は、NAPT変換テーブルとして、例えば図15に示すように、セッション情報テーブル170Cの一部として記憶されている。 When a message is transmitted from the gateway apparatus 1A to the call control network 5, a technique called NAPT (Network Address Port Transfer) conversion that rewrites an IP address and a port number may be used to keep address information confidential. The source IP address and source port number before and after the NAPT conversion are stored as a NAPT conversion table, for example, as a part of the session information table 170C as shown in FIG.

図16のシーケンスにおいて、ゲートウェイ装置1A、1BがNAPT変換を行う場合を黒丸で示す。ゲートウェイ装置1Aはフロー識別子Zを含むINVITEメッセージを生成して送信し(S402)、SIPサーバ2はこのINVITEメッセージに対し100 Tryingで応答し(S403)、ゲートウェイ装置1Bに転送する(S404)。対向するゲートウェイ装置1BはこのINVITEメッセージを受信すると、ゲートウェイ装置1Aが設定したIPアドレス、ポート番号、フロー識別子Zを自身のセッション情報テーブル170Cに記憶し、100 Tryingパケット及び200 OKレスポンスの応答を送信し(S405、S406)、ゲートウェイ装置1AはACKを返信する(S407)。 In the sequence of FIG. 16, the case where the gateway devices 1A and 1B perform NAPT conversion is indicated by black circles. The gateway device 1A generates and transmits an INVITE message including the flow identifier Z (S402), and the SIP server 2 responds to the INVITE message with 100 Trying (S403) and transfers it to the gateway device 1B (S404). Upon receiving this INVITE message, the opposing gateway device 1B stores the IP address, port number, and flow identifier Z set by the gateway device 1A in its own session information table 170C, and transmits a 100 Trying packet and a 200 OK response response. Then, the gateway device 1A returns an ACK (S407).

ゲートウェイ装置1Aは200 OKレスポンスを受信すると、先ほどフロー識別子Zと対応付けて記憶したセッション情報テーブル170Cと、200 OKレスポンスに記載されたゲートウェイ装置1BのIPアドレス及びポート番号に基づいて、図18に示すようなセッション状態テーブル171Cを生成する。 When gateway apparatus 1A receives the 200 OK response, based on session information table 170C stored in association with flow identifier Z and the IP address and port number of gateway apparatus 1B described in the 200 OK response, FIG. A session state table 171C as shown is generated.

呼制御ネットワーク5上にセッションが確立されると、ゲートウェイ装置1Aは保留していたS101にて受信したTCP-SYNパケットをゲートウェイ装置1Bに向けて送出する(S408)。このとき、TCP-SYNパケットの宛先IPアドレス及び宛先ポート番号はNAPT変換により200 OKレスポンスのSDPで通知された値に書き換えられ、送信元IPアドレス及び送信元ポート番号は自身のセッション情報テーブル170Cで規定された値にNAPT変換により書き換えられる。 When a session is established on the call control network 5, the gateway device 1A sends the TCP-SYN packet received in S101 that has been held to the gateway device 1B (S408). At this time, the destination IP address and the destination port number of the TCP-SYN packet are rewritten to the values notified in the SDP of the 200 OK response by NAPT conversion, and the source IP address and the source port number are stored in its own session information table 170C. It is rewritten to a specified value by NAPT conversion.

ゲートウェイ装置1BはこのTCP-SYNパケットを受信すると、セッション状態テーブル171Cに記憶したNAPT変換の情報に基づいてIPアドレスとポート番号を変換し、IP端末3Bに転送する。TCP-SYNパケットを受信したIP端末3BはTCP-SYN/ACKパケットを生成し、S409にて対向するIP端末3Aに向けて送信する。ゲートウェイ装置1BはTCP-SYN/ACKパケットを受信すると、セッション状態テーブル171Cに基づいて、送信元IPアドレスと送信元ポート番号を先ほど200 OKレスポンスを送信した際のIPアドレスとポート番号に変換し、宛先IPアドレスと宛先ポート番号をゲートウェイ装置1AからTCP-SYNを受信した際の送信元アドレス及び送信元ポート番号に変換し、ゲートウェイ装置1Aに向けて転送する。 When the gateway apparatus 1B receives this TCP-SYN packet, it converts the IP address and port number based on the NAPT conversion information stored in the session state table 171C, and transfers it to the IP terminal 3B. The IP terminal 3B that has received the TCP-SYN packet generates a TCP-SYN / ACK packet and transmits it to the facing IP terminal 3A in S409. Upon receiving the TCP-SYN / ACK packet, the gateway device 1B converts the transmission source IP address and the transmission source port number into the IP address and port number when the 200 OK response was transmitted, based on the session state table 171C. The destination IP address and the destination port number are converted into a source address and a source port number when TCP-SYN is received from the gateway device 1A, and transferred to the gateway device 1A.

TCP-SYN/ACKパケットを受信したゲートウェイ装置1Aはセッション状態テーブル171Cに記憶したNAPT変換の情報に基づいて、IPアドレスとポート番号をTCP-SYNパケットを送信した際の送信元IPアドレスと送信元ポート番号、すなわちIP端末3AのIPアドレスとポート番号に変換してIP端末3Aに転送する。
TCP-SYN/ACKパケットを受信したIP端末3AはTCP-ACKパケットを生成し、S410にて対向するIP端末3Bに向けて送信する。このTCP-ACKパケットも、TCP-SYNパケットと同様にゲートウェイ装置1A、1BにてNAPT変換されてIP端末3Bに到達する。
このようにしてTCPの3way handshakeが完了すると、IP端末3A、3B間にTCPコネクションが確立し、双方向のTCP通信が可能となる(S411)。
The gateway apparatus 1A that has received the TCP-SYN / ACK packet, based on the NAPT conversion information stored in the session state table 171C, sends the IP address and port number to the transmission source IP address and transmission source when the TCP-SYN packet is transmitted. The port number is converted into the IP address and port number of the IP terminal 3A and transferred to the IP terminal 3A.
The IP terminal 3A that has received the TCP-SYN / ACK packet generates a TCP-ACK packet and transmits it to the opposing IP terminal 3B in S410. This TCP-ACK packet is also subjected to NAPT conversion at the gateway devices 1A and 1B in the same manner as the TCP-SYN packet, and reaches the IP terminal 3B.
When the TCP three-way handshake is completed in this way, a TCP connection is established between the IP terminals 3A and 3B, and bidirectional TCP communication becomes possible (S411).

ゲートウェイ装置1Aは、実施の形態1と同様に、このセッションを使用するIPパケットを一定期間検出しない状態が続くと、BYEパケットを生成して対向するゲートウェイ装置1Bに送信する(S112)。 As in the first embodiment, the gateway device 1A generates a BYE packet and transmits it to the opposite gateway device 1B when an IP packet that uses this session is not detected for a certain period of time (S112).

ゲートウェイ装置1Bから200 OKレスポンスの応答を受信すると、ゲートウェイ装置1Aはこのセッションを切断し、このセッションに対応するタイマ180を停止してリセットすると共に、セッション状態テーブル171Cを更新する(S113)。
ここではゲートウェイ装置1Aがセッション切断を要求するBYEパケットを生成する場合を示したが、ゲートウェイ装置1BがBYEパケットを生成してもよい。どちらがトリガーとなるかは、先にタイマ180が満了したものとしても良いし、予め二者間で決めておいても良い。
When receiving the response of the 200 OK response from the gateway device 1B, the gateway device 1A disconnects this session, stops and resets the timer 180 corresponding to this session, and updates the session state table 171C (S113).
Although the case where the gateway device 1A generates a BYE packet for requesting session disconnection is shown here, the gateway device 1B may generate a BYE packet. Which is the trigger may be determined by the timer 180 having expired first, or may be determined in advance between the two parties.

セッションが切断された後、再びIP端末3AがS113にてIP端末3B宛てにユーザデータData#2のTCPパケットを送信すると(S114)、ゲートウェイ装置1AはこのユーザデータData#2を自装置内のパケット保留部15に一時保留し、セッションを再確立するために再びINVITEメッセージを生成してSIPサーバ2に送信する(S415)。このとき、INVITEメッセージのaフィールドには先ほどと同様にフロー識別子Zが設定される。 After the session is disconnected, when the IP terminal 3A transmits the TCP packet of the user data Data # 2 to the IP terminal 3B again in S113 (S114), the gateway device 1A transmits the user data Data # 2 in its own device. The packet is temporarily held in the packet holding unit 15, and an INVITE message is generated again to re-establish the session and transmitted to the SIP server 2 (S415). At this time, the flow identifier Z is set in the a field of the INVITE message as before.

対向するゲートウェイ装置1BはS417によりINVITEメッセージを受信すると100 TryingをSIPサーバ2に返信し(S418)、セッション確立の準備が整ったところでゲートウェイ装置1Aに向けて200 OKレスポンスを送信する(S419)。このとき、200 OKレスポンスの宛先IPアドレスには、INVITEメッセージの送信元IPアドレスがセットされ、200 OKレスポンスの宛先ポート番号には、INVITEメッセージの送信元ポート番号がセットされる。
ゲートウェイ装置1Aがこの200 OKレスポンスを受信しACKを返信すると(S420)、呼制御ネットワーク5にセッションが再確立される。
When the opposite gateway apparatus 1B receives the INVITE message in S417, it returns 100 Trying to the SIP server 2 (S418), and transmits a 200 OK response to the gateway apparatus 1A when preparation for session establishment is completed (S419). At this time, the source IP address of the INVITE message is set to the destination IP address of the 200 OK response, and the source port number of the INVITE message is set to the destination port number of the 200 OK response.
When the gateway device 1A receives this 200 OK response and returns an ACK (S420), a session is re-established in the call control network 5.

ゲートウェイ装置1Aは、INVITEメッセージを生成する際にセッション状態テーブル171Cを参照し、このセッション確立要求は一旦切断されたセッションを再確立するものなのか、IP端末3AからのTCP-SYNパケット送信の要求に応じてセッションを確立するものなのかを判断する。 The gateway device 1A refers to the session state table 171C when generating the INVITE message, and whether this session establishment request re-establishes a session that has been disconnected once, or a request for TCP-SYN packet transmission from the IP terminal 3A To determine whether to establish a session.

一旦切断されたセッションを再確立するものであると判断した場合、ゲートウェイ装置1Aはセッションを再確立した後、TCP管理部164にてTCP-SYNパケットを生成し、対向するゲートウェイ装置1B宛に送信する(S421)。ゲートウェイ装置1BはTCP-SYN/ACKパケットを生成してこれに応答し(S422)、ゲートウェイ装置1AがTCP-ACKパケットで応答する(S423)ことにより3way handshakeが成立し、2つのゲートウェイ装置1A、1B間にTCPコネクションが確立される。 If it is determined that the session once disconnected is to be reestablished, the gateway device 1A reestablishes the session, then generates a TCP-SYN packet in the TCP management unit 164 and transmits it to the opposite gateway device 1B. (S421). The gateway device 1B generates and responds to a TCP-SYN / ACK packet (S422), and the gateway device 1A responds with a TCP-ACK packet (S423), whereby a 3-way handshake is established and the two gateway devices 1A, A TCP connection is established between 1B.

TCPコネクションが確立すると、ゲートウェイ装置1AはS114にて受信し保留していたユーザデータData#2のTCPパケットを、セッション状態テーブル171Cに基づいてNAPT変換し、対向するゲートウェイ装置1BにTCPにて転送する(S424)。ゲートウェイ装置1BはこのユーザデータData#2のTCPパケットを受信すると、自装置のセッション状態テーブル171Cの情報に基づいてNAPT変換し、IP端末3Bに転送する(S425)。
以後、IP端末3A、3B間を伝送するTCPパケットはゲートウェイ装置1A、1Bで中継される際にNAPT変換され(S426〜S428)、呼制御ネットワークとユーザネットワークとでは異なるIPアドレス及びポート番号を持つことになる。
When the TCP connection is established, the gateway device 1A performs the NAPT conversion on the TCP packet of the user data Data # 2 received and held in S114 based on the session state table 171C, and forwards it to the opposing gateway device 1B by TCP. (S424). When the gateway device 1B receives the TCP packet of the user data Data # 2, the gateway device 1B performs NAPT conversion based on the information of the session state table 171C of the own device, and transfers it to the IP terminal 3B (S425).
Thereafter, the TCP packet transmitted between the IP terminals 3A and 3B is subjected to NAPT conversion (S426 to S428) when being relayed by the gateway devices 1A and 1B, and has different IP addresses and port numbers in the call control network and the user network. It will be.

本実施の形態によれば、セッションごとに固有のフロー識別子を設け、セッション確立の際に2つのゲートウェイ装置間でフロー識別子を共有することにより、ゲートウェイ装置1A、1BがNAPT変換する場合であっても、セッション切断前のフローを特定することができ、同じセッションでTCPコネクションを確立することができる。 According to the present embodiment, a unique flow identifier is provided for each session, and the gateway device 1A, 1B performs NAPT conversion by sharing the flow identifier between the two gateway devices at the time of session establishment. In addition, the flow before session disconnection can be specified, and a TCP connection can be established in the same session.

実施の形態5.
実施の形態3では、セッション切断前後でTCPの順序情報の連続性を保つために、制御プロトコルや3way handshakeを利用してゲートウェイ装置にシーケンス番号及びACK番号を設定した。また、実施の形態4では、セッションごとに固有のフロー識別子を設けることにより、セッション切断前のフローを特定してTCPコネクションを確立できるようにした。実施の形態5では、実施の形態3と実施の形態4を組合せた場合について説明する。
Embodiment 5 FIG.
In Embodiment 3, in order to maintain the continuity of TCP order information before and after session disconnection, a sequence number and an ACK number are set in the gateway device using a control protocol and 3-way handshake. In the fourth embodiment, a unique flow identifier is provided for each session, so that a TCP connection can be established by specifying a flow before session disconnection. In the fifth embodiment, a case where the third embodiment and the fourth embodiment are combined will be described.

本実施の形態に係るゲートウェイ装置1が使用される通信システム100の構成、及びゲートウェイ装置1のハードウェア構成は実施の形態1と同じであるため説明を省略する。ゲートウェイ装置1の機能及び動作について図19ないし図21を用いて説明する。
図19はセッション制御部16Dの機能ブロック図で、セッション情報取得部162Dにフロー識別子を生成したり管理したりする識別子管理部1620Dを備えると共に、実施の形態3に記載したのと同じ機能を有する順序情報管理部165Dを備えたものである。
Since the configuration of the communication system 100 in which the gateway device 1 according to the present embodiment is used and the hardware configuration of the gateway device 1 are the same as those in the first embodiment, description thereof will be omitted. The function and operation of the gateway device 1 will be described with reference to FIGS.
FIG. 19 is a functional block diagram of the session control unit 16D. The session information acquisition unit 162D includes an identifier management unit 1620D that generates and manages a flow identifier, and has the same function as described in the third embodiment. An order information management unit 165D is provided.

ここで、図20のシーケンス図を用いて通信システム全体の動作について説明する。
IP端末3AからTCPコネクションの接続要求であるTCP-SYNパケットが送信され(S101)、ゲートウェイ装置1Aがこれを検出すると、ゲートウェイ装置1Aはセッション制御部16Dにて送信元IPアドレス、宛先IPアドレス、プロトコル、送信元ポート番号、宛先ポート番号等を抽出し、記憶部17のセッション情報テーブル170Dからセッション制御パラメータを取得する。
Here, the operation of the entire communication system will be described with reference to the sequence diagram of FIG.
When a TCP-SYN packet, which is a connection request for a TCP connection, is transmitted from the IP terminal 3A (S101) and the gateway device 1A detects this, the gateway device 1A uses the session control unit 16D to send the source IP address, destination IP address, A protocol, a transmission source port number, a destination port number, and the like are extracted, and a session control parameter is acquired from the session information table 170D of the storage unit 17.

ゲートウェイ装置1Aは取得したセッション制御パラメータに基づいて、セッション制御部16Dの識別子管理部1620Dにて通信フローに対応するフロー識別子Zを生成し、セッション管理部163にてこのフロー識別子を含むINVITEメッセージを生成する。なお、生成されたフロー識別子Zは、セッション制御パラメータとあわせてセッション情報テーブル170Dに記憶される。 Based on the acquired session control parameter, the gateway device 1A generates a flow identifier Z corresponding to the communication flow in the identifier management unit 1620D of the session control unit 16D, and the session management unit 163 generates an INVITE message including this flow identifier. Generate. The generated flow identifier Z is stored in the session information table 170D together with the session control parameter.

ゲートウェイ装置1Aは、呼制御ネットワーク5にIPパケットを転送する際にIPアドレスやポート番号を秘匿するためにNAPT変換を行う。図20のシーケンスにおいて、ゲートウェイ装置1A、1BがNAPT変換を行う場合を黒丸で示す。 The gateway device 1A performs NAPT conversion to conceal the IP address and port number when transferring the IP packet to the call control network 5. In the sequence of FIG. 20, a case where the gateway devices 1A and 1B perform NAPT conversion is indicated by black circles.

ゲートウェイ装置1Aはフロー識別子Zを含むINVITEメッセージを生成すると、セッション情報テーブル170Dに基づいて送信する(S402)。対向するゲートウェイ装置1BはこのINVITEメッセージを受信すると、ゲートウェイ装置1Aが設定したIPアドレス、ポート番号、フロー識別子Zを自身のセッション情報テーブル170Dに記憶し、100 Tryingパケット及び200 OKレスポンスを返信する(S405、S406)。 When the gateway device 1A generates an INVITE message including the flow identifier Z, the gateway device 1A transmits it based on the session information table 170D (S402). Upon receiving this INVITE message, the opposing gateway device 1B stores the IP address, port number, and flow identifier Z set by the gateway device 1A in its own session information table 170D, and returns a 100 Trying packet and a 200 OK response ( S405, S406).

ゲートウェイ装置1Aは200 OKレスポンスを受信すると(S406)、先ほどフロー識別子Zと対応付けて記憶したセッション情報テーブル170Dと、200 OKレスポンスに記載されたゲートウェイ装置1BのIPアドレス及びポート番号に基づいて、セッション状態テーブル171Dを生成し、ACKを返信する(S407)。 When the gateway device 1A receives the 200 OK response (S406), based on the session information table 170D stored in association with the flow identifier Z and the IP address and port number of the gateway device 1B described in the 200 OK response, A session state table 171D is generated and an ACK is returned (S407).

呼制御ネットワーク5上にセッションが確立されると、ゲートウェイ装置1AはS101にて受信し保留していたTCP-SYNパケットをゲートウェイ装置1Bに向けて送出する(S408)。このとき、TCP-SYNパケットの宛先IPアドレス及び宛先ポート番号はNAPT変換により200 OKレスポンスのSDPで通知された値に書き換えられ、送信元IPアドレス及び送信元ポート番号は自身のセッション情報テーブル170DのNAPT変換情報に基づいて書き換えられる。 When the session is established on the call control network 5, the gateway device 1A sends the TCP-SYN packet received and held in S101 to the gateway device 1B (S408). At this time, the destination IP address and the destination port number of the TCP-SYN packet are rewritten to the values notified by the SDP of the 200 OK response by the NAPT conversion, and the source IP address and the source port number are stored in the session information table 170D of its own. It is rewritten based on the NAPT conversion information.

ゲートウェイ装置1BはこのTCP-SYNパケットを受信すると、セッション状態テーブル171Dに記憶したNAPT変換の情報に基づいてIPアドレスとポート番号を変換し、IP端末3Bに転送する。TCP-SYNパケットを受信したIP端末3BはTCP-SYN/ACKパケットを生成し、対向するIP端末3Aに向けて送信する(S409)。ゲートウェイ装置1BはTCP-SYN/ACKパケットを受信すると、セッション状態テーブル171Dに基づいて、送信元IPアドレスと送信元ポート番号を先ほど200 OKレスポンスを送信した際のIPアドレスとポート番号に変換し、宛先IPアドレスと宛先ポート番号をゲートウェイ装置1AからTCP-SYNを受信した際の送信元アドレス及び送信元ポート番号に変換し、ゲートウェイ装置1Aに向けて転送する。 When the gateway apparatus 1B receives this TCP-SYN packet, it converts the IP address and port number based on the NAPT conversion information stored in the session state table 171D, and transfers it to the IP terminal 3B. The IP terminal 3B that has received the TCP-SYN packet generates a TCP-SYN / ACK packet and transmits it to the opposite IP terminal 3A (S409). Upon receiving the TCP-SYN / ACK packet, the gateway device 1B converts the transmission source IP address and the transmission source port number into the IP address and port number when the 200 OK response was transmitted, based on the session state table 171D. The destination IP address and the destination port number are converted into a source address and a source port number when TCP-SYN is received from the gateway device 1A, and transferred to the gateway device 1A.

TCP-SYN/ACKパケットを受信したゲートウェイ装置1Aはセッション状態テーブル171Dに記憶したNAPT変換の情報に基づいて、IPアドレスとポート番号をTCP-SYNパケットを送信した際の送信元IPアドレスと送信元ポート番号に変換してIP端末3Aに転送する(S409)。
TCP-SYN/ACKパケットを受信したIP端末3AはTCP-ACKパケットを生成し、対向するIP端末3Bに向けて送信する。このTCP-ACKパケットも、TCP-SYNパケットと同様にゲートウェイ装置1A、1BにてNAPT変換されてIP端末3Bまで送られる(S410)。
このようにしてTCPの3way handshakeが完了すると、IP端末3A、3B間にTCPコネクションが確立し、双方向のTCP通信が可能となる(S411)。
The gateway device 1A that has received the TCP-SYN / ACK packet, based on the NAPT conversion information stored in the session state table 171D, sends the IP address and port number to the transmission source IP address and transmission source. The port number is converted and transferred to the IP terminal 3A (S409).
The IP terminal 3A that has received the TCP-SYN / ACK packet generates a TCP-ACK packet and transmits it to the opposite IP terminal 3B. This TCP-ACK packet is also NAPT-converted by the gateway devices 1A and 1B and sent to the IP terminal 3B in the same manner as the TCP-SYN packet (S410).
When the TCP three-way handshake is completed in this way, a TCP connection is established between the IP terminals 3A and 3B, and bidirectional TCP communication becomes possible (S411).

ゲートウェイ装置1Aは、このセッションを使用するIPパケットを一定期間検出しない状態が続くと、BYEパケットを生成して対向するゲートウェイ装置1Bに送信する(S112)。対向するゲートウェイ装置1Bから200 OKレスポンスの応答を受信すると、ゲートウェイ装置1Aはこのセッションを切断し、対応するタイマ180を停止してリセットし、セッション状態テーブル171Dを更新する(S113)。
ここで、セッション切断前に最後にIP端末3AからIP端末3BにTCPで送信されたデータのシーケンス番号は「X−1」、ACK番号は「Y−1」であるとする。
When the state in which the IP packet using this session is not detected for a certain period continues, the gateway device 1A generates a BYE packet and transmits it to the opposing gateway device 1B (S112). When receiving the response of the 200 OK response from the facing gateway apparatus 1B, the gateway apparatus 1A disconnects this session, stops and resets the corresponding timer 180, and updates the session state table 171D (S113).
Here, it is assumed that the sequence number of data last transmitted by TCP from IP terminal 3A to IP terminal 3B before session disconnection is “X−1” and the ACK number is “Y−1”.

セッションが切断された状態のS214において、IP端末3Aからシーケンス番号が「X」、ACK番号が「Y」のユーザデータData#2のTCPパケットが送信されると、ゲートウェイ装置1AはこのTCPパケットをパケット保留部15に一時的に保留し、受信したTCPパケットの情報をセッション制御部16Dに通知する。 In S214 in a state where the session is disconnected, when the TCP packet of the user data Data # 2 having the sequence number “X” and the ACK number “Y” is transmitted from the IP terminal 3A, the gateway device 1A transmits the TCP packet. The packet is temporarily held in the packet holding unit 15, and the received TCP packet information is notified to the session control unit 16D.

セッション制御部16Dは受信したTCPパケットからIPアドレス、プロトコルの種類、ポート番号、等の情報を抽出し、この情報に基づいてセッション情報テーブル170Dから対応する帯域等のセッション制御パラメータを読み取り、セッション状態テーブル171Dからこのセッションはゲートウェイ装置1A、1Bにより切断されたものかIP端末3A、3Bからの要求により切断されたものかの情報を読み取る。 The session control unit 16D extracts information such as an IP address, a protocol type, and a port number from the received TCP packet, reads a session control parameter such as a corresponding bandwidth from the session information table 170D based on this information, and determines the session state. The table 171D reads information on whether this session is disconnected by the gateway devices 1A and 1B or whether the session is disconnected by a request from the IP terminals 3A and 3B.

ゲートウェイ装置1Aが保留したデータを転送するには、呼制御ネットワーク5のセッション及びTCPコネクションを再確立しなければならないので、セッション制御部16Dはセッション管理部163にINVITEメッセージを生成させ、セッション情報テーブル170Dのセッション制御パラメータに基づいて呼制御ネットワーク5に送出する(S415)。 In order to transfer the data held by the gateway apparatus 1A, the session and TCP connection of the call control network 5 must be re-established. Therefore, the session control unit 16D causes the session management unit 163 to generate an INVITE message, and the session information table Based on the session control parameter of 170D, the message is sent to the call control network 5 (S415).

ここで、ゲートウェイ装置1AがS415にて送信するINVITEメッセージの一例を図21に示す。INVITEメッセージのメッセージフォーマットは実施の形態3とほぼ同じで、属性を規定するaフィールドが異なる。図21の例では、図中破線で囲んだように、フロー識別子Zが属性「X-peer-flowID」、値「30000」として、TCPのシーケンス番号Aが属性「A-TCP-seq」、値「10000」として、ACK番号0が属性「A-TCP-ack」、値「0」として、それぞれ設定されている。 Here, FIG. 21 shows an example of the INVITE message that the gateway apparatus 1A transmits in S415. The message format of the INVITE message is almost the same as in the third embodiment, and the a field that defines the attribute is different. In the example of FIG. 21, the flow identifier Z is the attribute “X-peer-flowID” and the value “30000”, the TCP sequence number A is the attribute “A-TCP-seq”, and the value As “10000”, the ACK number 0 is set as the attribute “A-TCP-ack” and the value “0”.

SIPサーバ2はS415にてINVITEメッセージを受取るとこのゲートウェイ装置1Aに100 Tryingパケットを返信し(S416)、対向するゲートウェイ装置1BにこのINVITEメッセージを転送する(S417)。ゲートウェイ装置1BはINVITEメッセージを受信すると、ゲートウェイ装置1Aが設定したIPアドレス、ポート番号、フロー識別子Zを自身のセッション情報テーブル170Dに記憶し、100 Tryingパケット及び200 OKレスポンスを返信する(S418、S419)。 When the SIP server 2 receives the INVITE message in S415, the SIP server 2 returns a 100 Trying packet to the gateway device 1A (S416), and transfers the INVITE message to the opposing gateway device 1B (S417). Upon receiving the INVITE message, the gateway device 1B stores the IP address, port number, and flow identifier Z set by the gateway device 1A in its own session information table 170D, and returns a 100 Trying packet and a 200 OK response (S418, S419). ).

ゲートウェイ装置1Aが200 OKレスポンスを受信しACKを返信するとセッションの再確立が完了する(S420)。ゲートウェイ装置1Aは200 OKレスポンスに格納されたフロー情報及びセッション情報テーブル170Dの情報に基づいてセッション状態テーブル171Dを更新し、無通信監視部18にこのセッションと対応するタイマ180のスタート指示を送る。 When the gateway device 1A receives the 200 OK response and returns an ACK, the re-establishment of the session is completed (S420). The gateway device 1A updates the session state table 171D based on the flow information stored in the 200 OK response and the information in the session information table 170D, and sends a start instruction for the timer 180 corresponding to this session to the no-communication monitoring unit 18.

また、ゲートウェイ装置1Aは、INVITEメッセージを生成する際にセッション状態テーブル171Dを参照し、このセッション確立要求は一旦切断されたセッションを再確立するものなのか、IP端末3AからのTCP-SYNパケット送信の要求に応じてセッションを確立するものなのかを判断している。一旦切断されたセッションを再確立するものであると判断した場合、ゲートウェイ装置1AはTCP管理部164にてTCP-SYNパケットを生成し、対向するゲートウェイ装置1B宛に送信する(S521)。このとき、TCPヘッダのシーケンスフィールドには先ほどシーケンス番号初期値として設定した「A」を記入し、ACKフィールドには先ほどACK番号初期値として設定した「0」を記入する。 Further, the gateway device 1A refers to the session state table 171D when generating the INVITE message, and whether this session establishment request reestablishes a session that has been disconnected once, TCP-SYN packet transmission from the IP terminal 3A It is determined whether to establish a session in response to the request. If it is determined that the session once disconnected is re-established, the gateway device 1A generates a TCP-SYN packet in the TCP management unit 164 and transmits it to the opposite gateway device 1B (S521). At this time, “A” set as the initial value of the sequence number is written in the sequence field of the TCP header, and “0” set as the initial value of the ACK number is written in the ACK field.

対向するゲートウェイ装置1BにTCP-SYNパケットが到達すると、ゲートウェイ装置1Bも自身の順序情報付与・変換部165Bにて初期値として使用したいシーケンス番号を決定する。図20では、ゲートウェイ装置1Bはシーケンス初期値を「B」とし、TCP-SYNパケットへの応答としてシーケンスフィールドに「B」、ACKフィールドにTCP-SYNパケットのシーケンス番号に「+1」の演算をした「A+1」を記入し、ゲートウェイ装置1Aに返信する(S522)。 When the TCP-SYN packet arrives at the opposite gateway apparatus 1B, the gateway apparatus 1B also determines the sequence number that it wants to use as an initial value in its own order information addition / conversion unit 165B. In FIG. 20, the gateway device 1B sets the sequence initial value to “B”, performs a calculation of “B” in the sequence field and “+1” in the sequence number of the TCP-SYN packet in the ACK field as a response to the TCP-SYN packet. “A + 1” is entered and returned to the gateway device 1A (S522).

ゲートウェイ装置1Bからシーケンスフィールドが「B」、ACKフィールドが「A+1」のTCP-SYN/ACKパケットを受取ったゲートウェイ装置1Aは、ACKフィールドに記載されたACK番号により自身が送信したTCP-SYNパケットが正常に受信されたことを確認できる。TCP-SYN/ACKパケットを正常に受信したゲートウェイ装置1Aは、TCP-ACKパケットを生成し、シーケンスフィールドに先ほど送信したTCP-SYNパケットの次に送信するパケットであることを示すため、TCP-SYNのシーケンス番号である「A」に「+1」を演算した「A+1」を記入し、ACKフィールドにはTCP-SYN/ACKパケットのシーケンス番号を正常に受信したことを示すために「B」に「+1」を演算した「B+1」を記入してゲートウェイ装置1Bに応答する(S523)。 The gateway apparatus 1A that has received the TCP-SYN / ACK packet with the sequence field “B” and the ACK field “A + 1” from the gateway apparatus 1B receives the TCP-SYN packet transmitted by itself with the ACK number described in the ACK field. You can confirm that it was received normally. The gateway apparatus 1A that has successfully received the TCP-SYN / ACK packet generates a TCP-ACK packet and indicates that the packet is to be transmitted next to the previously transmitted TCP-SYN packet in the sequence field. “A + 1” obtained by calculating “+1” is entered in “A”, which is the sequence number of “B”, and “B” is indicated by “B” in order to indicate that the sequence number of the TCP-SYN / ACK packet is normally received in the ACK field. “B + 1” obtained by calculating “+1” is entered to respond to the gateway device 1B (S523).

このようにTCPパケットに順序情報を付与することにより、2つのゲートウェイ装置1A、1B間にTCPコネクションが確立した時点で、ゲートウェイ装置1Aにはシーケンス番号「A+1」、ACK番号「B+1」が設定され、ゲートウェイ装置1Bにはシーケンス番号「B」、ACK番号「A+1」が設定される。 By assigning the order information to the TCP packet in this way, the sequence number “A + 1” and the ACK number “B + 1” are set in the gateway device 1A when the TCP connection is established between the two gateway devices 1A and 1B. The gateway apparatus 1B is set with a sequence number “B” and an ACK number “A + 1”.

ゲートウェイ装置1Aは、TCPコネクションが確立するとS214にて受信しパケット保留部15に一時保留したTCPパケットを、セッション情報取得部162Dからの指令に従ってTCPにて呼制御ネットワーク5に転送する(S524)。このとき、ゲートウェイ装置1Aのシーケンス番号は「A+1」、ACK番号は「B+1」に設定されているため、順序情報管理部165Dは転送するユーザデータ#2のシーケンスフィールドの値を「A+1」、ACKフィールドの値を「B+1」に変換する。 When the TCP connection is established, the gateway device 1A transfers the TCP packet received in S214 and temporarily held in the packet holding unit 15 to the call control network 5 by TCP according to a command from the session information acquisition unit 162D (S524). At this time, since the sequence number of the gateway device 1A is set to “A + 1” and the ACK number is set to “B + 1”, the order information management unit 165D sets the value of the sequence field of the user data # 2 to be transferred to “A + 1”, ACK The field value is converted to “B + 1”.

このユーザデータData#2のTCPパケットがゲートウェイ装置1Bに到達すると、セッション制御部16DはこのTCPパケットからIPアドレスを抽出し、抽出したIPアドレスに基づいてセッション情報テーブル170Dに記憶されたシーケンス番号「X」及びACK番号「Y」を呼び出す。その後、順序情報管理部165Dにより、ユーザデータData#2のシーケンスフィールドの値を「A+1」から「X」に、ACKフィールドの値を「B+1」から「Y」に変換してIP端末3Bに転送する(S525)。 When the TCP packet of the user data Data # 2 reaches the gateway apparatus 1B, the session control unit 16D extracts an IP address from the TCP packet, and the sequence number “stored in the session information table 170D based on the extracted IP address”. Call "X" and ACK number "Y". Thereafter, the sequence information management unit 165D converts the value of the sequence field of the user data Data # 2 from “A + 1” to “X”, converts the value of the ACK field from “B + 1” to “Y”, and transfers it to the IP terminal 3B. (S525).

これ以降、IP端末3AからIP端末3BへTCPにて送信されるTCPパケットのシーケンス番号は1ずつインクリメントされる。例えばIP端末3AがTCPヘッダにシーケンス番号「X+n」、ACK番号「Y+m」を格納したユーザデータData#nをTCPにて送信する場合(S526)、ゲートウェイ装置1Aはシーケンス番号を「A+n+1」、ACK番号を「B+m+1」に変換し、ゲートウェイ装置1Bが再びシーケンス番号を「X+n」、ACK番号を「Y+m」に変換してIP端末3Bに転送する(S527)。 Thereafter, the sequence number of the TCP packet transmitted by TCP from the IP terminal 3A to the IP terminal 3B is incremented by one. For example, when the IP terminal 3A transmits user data Data # n storing the sequence number “X + n” and the ACK number “Y + m” in the TCP header by TCP (S526), the gateway device 1A sets the sequence number “A + n + 1”, ACK The number is converted into “B + m + 1”, and the gateway device 1B converts the sequence number into “X + n” and the ACK number into “Y + m” again and transfers them to the IP terminal 3B (S527).

このように、ゲートウェイ装置1Aがセッションを再確立する際に対向するゲートウェイ装置1Bにフロー識別子とTCPのシーケンス番号初期値及びACK番号初期値を通知することで、ゲートウェイ装置1A、1BがNAPT変換する場合や呼制御ネットワーク5上で任意のシーケンス番号及びACK番号を用いる場合であっても、対向するゲートウェイ装置1Bが中継するユーザデータの宛先や順序情報をゲートウェイ装置1Aで変換される前の値に再変換することができる(S528)。   As described above, when the gateway device 1A reestablishes a session, the gateway device 1A and 1B perform NAPT conversion by notifying the opposing gateway device 1B of the flow identifier, the initial value of the TCP sequence number, and the initial value of the ACK number. In some cases, even when arbitrary sequence numbers and ACK numbers are used on the call control network 5, the destination and order information of user data relayed by the opposing gateway device 1B are converted to values before being converted by the gateway device 1A. It can be reconverted (S528).

本実施の形態によれば、実施の形態1の構成にフロー識別子を管理する識別子管理部1620Dとシーケンス番号やACK番号といった順序情報を管理する順序情報管理部165Dとを備えたことにより、ゲートウェイ装置1がNAPT変換する場合やTCPの順序情報に連続性が要求される場合であっても、ゲートウェイ装置1が切断したセッションを再確立した後にTCPコネクションを確立することができる。これにより、IP端末3が再度TCPの3way handshakeを実行せずともゲートウェイ装置1A、1B間においてTCP通信を再開できる。 According to the present embodiment, the configuration of the first embodiment includes the identifier management unit 1620D that manages the flow identifier and the order information management unit 165D that manages the order information such as the sequence number and the ACK number. Even when 1 is subjected to NAPT conversion or when continuity is required for TCP order information, the TCP connection can be established after the gateway device 1 reestablishes the disconnected session. As a result, the TCP communication can be resumed between the gateway devices 1A and 1B without the IP terminal 3 performing the TCP three-way handshake again.

なお、ここでは実施の形態3と実施の形態4を組合せた場合について説明したが、実施の形態2と実施の形態4を組合せることもできる。この場合は実施の形態2に記載の効果と実施の形態4に記載の効果を得ることができる。
また、実施の形態2ないし実施の形態5においても実施の形態1と同様に、SIPの代わりにセッション制御プロトコルとしてH.323、MEGACO等を用いることができる。
In addition, although the case where Embodiment 3 and Embodiment 4 were combined was demonstrated here, Embodiment 2 and Embodiment 4 can also be combined. In this case, the effects described in the second embodiment and the effects described in the fourth embodiment can be obtained.
In the second to fifth embodiments, as in the first embodiment, H.323, MEGACO, etc. can be used as a session control protocol instead of SIP.

1、1A、1B ゲートウェイ装置
2 SIPサーバ
3、3A、3B IP端末
4、4A、4B ユーザネットワーク
5 呼制御ネットワーク
14A、14B パケット検出部
15 パケット保留部
16、16A〜16D セッション制御部
160 DA/SA抽出部
161 パケット識別部
162、162C、162D セッション情報取得部
163 セッション管理部
164 TCP管理部
165、165B、165D 順序情報管理部
17 記憶部
170、170D セッション情報テーブル
171、171D セッション状態テーブル
18 無通信監視部
180 タイマ
DESCRIPTION OF SYMBOLS 1, 1A, 1B Gateway apparatus 2 SIP server 3, 3A, 3B IP terminal 4, 4A, 4B User network 5 Call control network 14A, 14B Packet detection part 15 Packet holding part 16, 16A-16D Session control part 160 DA / SA Extraction unit 161 Packet identification unit 162, 162C, 162D Session information acquisition unit 163 Session management unit 164 TCP management unit 165, 165B, 165D Order information management unit 17 Storage unit 170, 170D Session information table 171, 171D Session status table 18 No communication Monitoring unit 180 timer

Claims (8)

IP端末と他のIP端末との間に接続され、他の中継装置にパケットを転送するためのセッションを該他の中継装置との間に確立し、該セッションを使用して前記IP端末から送信されたパケットを前記他のIP端末に中継する中継装置において、
前記IP端末から送信されたパケットの受信を検出するパケット検出部と、
前記IP端末から受信したパケットを一時保留するパケット保留部と、
前記パケット検出部により前記セッションを使用するパケットが所定期間検出されない場合に該セッションを切断するセッション制御部と、
前記IP端末から送信されたパケットを転送するインターフェース部と、
を有し、
前記セッションの切断後に、該セッションを使用するユーザデータを前記IP端末から受信した場合に、
前記パケット保留部は、前記ユーザデータを一時保留し、
前記セッション制御部は、前記セッションを再確立するとともに、宛先ポート番号、宛先IPアドレス、送信元ポート番号、及び送信元IPアドレスの情報を有する確立要求メッセージを生成し、
前記インターフェース部は、生成された前記確立要求メッセージを前記他の中継装置との間に接続され前記ユーザデータを中継する呼制御ネットワークに転送した後、前記パケット保留部に保留された前記ユーザデータ前記呼制御ネットワークを介して前記他の中継装置に転送することを特徴とする中継装置。
Connected between an IP terminal and another IP terminal , establishes a session for transferring a packet to another relay apparatus with the other relay apparatus, and transmits from the IP terminal using the session In a relay device that relays the received packet to the other IP terminal ,
A packet detection unit for detecting reception of a packet transmitted from the IP terminal;
A packet holding unit for temporarily holding a packet received from the IP terminal;
A session control unit that disconnects the session when a packet that uses the session is not detected by the packet detection unit for a predetermined period;
An interface unit for transferring a packet transmitted from the IP terminal;
Have
When user data using the session is received from the IP terminal after disconnecting the session,
The packet holding unit temporarily retains the user data,
The session control unit is configured to re-establish the session, generates an establishment request message having the destination port number, destination IP address, source port number, and the information of the source IP address,
The interface unit, after the generated said establishment request message has been transferred to the call control network for relaying connected the user data between the other relay device, the user data held in the packet hold section A relay apparatus that transfers the data to the other relay apparatus via the call control network .
前記セッション制御部は、前記呼制御ネットワークを介して前記他の中継装置に前記確立要求メッセージを送信するTCP管理部を備えたことを特徴とする請求項1に記載の中継装置。 The session control unit, a relay apparatus according to claim 1, further comprising a TCP management unit transmitting the establishment request message to the another relay device via the call control network. 前記セッション制御部は、前記IP端末から受信した前記ユーザデータに連続性を有する第1の順序情報が含まれる場合に該第1の順序情報に基づいて連続性を有する第2の順序情報を生成し、前記確立要求メッセージに前記第2の順序情報を含めることを特徴とする請求項2に記載の中継装置。 The session control unit generates second order information having continuity based on the first order information when the user data received from the IP terminal includes the first order information having continuity. and relay apparatus according to claim 2, characterized in that inclusion of the second sequence information previously Ki確 standing request message. 前記第2の順序情報は、前記第1の順序情報から1減算した値であることを特徴とする請求項3に記載の中継装置。   The relay apparatus according to claim 3, wherein the second order information is a value obtained by subtracting 1 from the first order information. 前記第2の順序情報は、ゼロ以上の整数であることを特徴とする請求項3に記載の中継装置。   The relay apparatus according to claim 3, wherein the second order information is an integer greater than or equal to zero. 前記セッション制御部は、前記セッションに固有のフロー識別子を生成し、前記セッションを確立するためのセッション確立用メッセージに前記フロー識別子を含めることを特徴とする請求項1から請求項3のいずれかに記載の中継装置。 The session control unit generates a unique flow identifier to the session, any crab of claims 1 to 3, characterized in that inclusion of the flow identifier in the session establishment for the message to establish the session The relay device described. IP端末と他のIP端末との間に接続され、他の中継装置にパケットを転送するためのセッションを該他の中継装置との間に確立し、該セッションを使用して前記IP端末から送信されたパケットを前記他のIP端末に中継する中継装置パケット中継方法において
記セッションを使用するパケットを所定期間受信しない場合に前記セッションを切断する第1のステップと、
前記セッション切断後に、該セッションを使用するユーザデータを前記IP端末から受信する第2のステップと、
信した前記ユーザデータを一時保留する第3のステップと、
前記ユーザデータを受信した後、前記セッションを再確立するとともに、宛先ポート番号、宛先IPアドレス、送信元ポート番号、及び送信元IPアドレスの情報を有する確立要求メッセージを生成する第4のステップと、
生成した前記確立要求メッセージを前記他の中継装置との間に接続され前記ユーザデータを中継する呼制御ネットワークに転送する第5のステップと、
前記確立要求メッセージの転送後に、一時保留された前記ユーザデータを前記呼制御ネットワークを介して前記他の中継装置に転送する第6のステップと、
を有することを特徴とするパケット中継方法。
Connected between an IP terminal and another IP terminal , establishes a session for transferring a packet to another relay apparatus with the other relay apparatus, and transmits from the IP terminal using the session In the packet relay method of the relay device that relays the received packet to the other IP terminal ,
A first step of cutting the session packets using pre Symbol session if it does not receive a predetermined period,
A second step of receiving user data using the session from the IP terminal after the session is disconnected;
A third step of temporarily holding the user data it receives,
A fourth step of re-establishing the session after receiving the user data and generating an establishment request message having information of a destination port number, a destination IP address, a source port number, and a source IP address ;
A fifth step of transferring the generated establishment request message to a call control network connected to the other relay device and relaying the user data ;
A sixth step of transferring the temporarily suspended user data to the other relay device via the call control network after transferring the establishment request message;
Packet relay method characterized in that it comprises a.
IP端末と、前記IP端末とは異なる他のIP端末と、
前記IP端末と前記他のIP端末との間に接続され、他の中継装置にパケットを転送するためのセッションを該他の中継装置との間に確立し、該セッションを使用して前記IP端末から送信されたパケットを前記他のIP端末に中継する中継装置と、を備える通信システムにおいて、
前記中継装置は、
前記IP端末から送信されたパケットの受信を検出するパケット検出部と、
前記IP端末から受信したパケットを一時保留するパケット保留部と、
前記パケット検出部により前記セッションを使用するパケットが所定期間検出されない場合に該セッションを切断するセッション制御部と、
前記IP端末から送信されたパケットを転送するインターフェース部と、
を有し、
前記セッションの切断後に、該セッションを使用するユーザデータを前記IP端末から受信した場合に、
前記パケット保留部は、前記ユーザデータを一時保留し、
前記セッション制御部は、前記セッションを再確立するとともに、宛先ポート番号、宛先IPアドレス、送信元ポート番号、及び送信元IPアドレスの情報を有する確立要求メッセージを生成し、
前記インターフェース部は、生成された前記確立要求メッセージを前記他の中継装置との間に接続され前記ユーザデータを中継する呼制御ネットワークに転送した後、前記パケット保留部に保留された前記ユーザデータ前記呼制御ネットワークを介して前記他の中継装置に転送することを特徴とする通信システム。
An IP terminal and another IP terminal different from the IP terminal;
The IP terminal is connected between the IP terminal and the other IP terminal , establishes a session for transferring a packet to another relay apparatus with the other relay apparatus, and uses the session to establish the IP terminal In a communication system comprising: a relay device that relays a packet transmitted from the other IP terminal ;
The relay device is
A packet detection unit for detecting reception of a packet transmitted from the IP terminal;
A packet holding unit for temporarily holding a packet received from the IP terminal;
A session control unit that disconnects the session when a packet that uses the session is not detected by the packet detection unit for a predetermined period;
An interface unit for transferring a packet transmitted from the IP terminal;
Have
When user data using the session is received from the IP terminal after disconnecting the session,
The packet holding unit temporarily retains the user data,
The session control unit is configured to re-establish the session, generates an establishment request message having the destination port number, destination IP address, source port number, and the information of the source IP address,
The interface unit, after the generated said establishment request message has been transferred to the call control network for relaying connected the user data between the other relay device, the user data held in the packet hold section A communication system that transfers to the other relay device via the call control network .
JP2011033202A 2011-02-18 2011-02-18 Relay device, packet relay method, and communication system Expired - Fee Related JP5664320B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011033202A JP5664320B2 (en) 2011-02-18 2011-02-18 Relay device, packet relay method, and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011033202A JP5664320B2 (en) 2011-02-18 2011-02-18 Relay device, packet relay method, and communication system

Publications (2)

Publication Number Publication Date
JP2012175249A JP2012175249A (en) 2012-09-10
JP5664320B2 true JP5664320B2 (en) 2015-02-04

Family

ID=46977756

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011033202A Expired - Fee Related JP5664320B2 (en) 2011-02-18 2011-02-18 Relay device, packet relay method, and communication system

Country Status (1)

Country Link
JP (1) JP5664320B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5400209B1 (en) * 2012-09-24 2014-01-29 株式会社Nttドコモ Core network device, relay device, communication system including them, core network device communication method, and core network device communication program
WO2014068818A1 (en) * 2012-10-31 2014-05-08 日本電気株式会社 Mpls network and traffic control method utilized therefor
JP2016076808A (en) * 2014-10-06 2016-05-12 富士通株式会社 Repeating device, and session open control method
JP6554851B2 (en) * 2015-03-24 2019-08-07 日本電気株式会社 IP phone encryption apparatus and encryption method
WO2019142303A1 (en) * 2018-01-19 2019-07-25 三菱電機株式会社 Relay device, completion determining method, and completion determining program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4021A (en) * 1845-05-01 Isaac l
JP4748086B2 (en) * 2007-03-22 2011-08-17 日本電気株式会社 COMMUNICATION RELAY DEVICE, RESOURCE RELEASE METHOD, AND COMMUNICATION RELAY DEVICE PROGRAM
JP5127729B2 (en) * 2009-01-13 2013-01-23 三菱電機株式会社 Packet relay method and gateway device

Also Published As

Publication number Publication date
JP2012175249A (en) 2012-09-10

Similar Documents

Publication Publication Date Title
US6907037B2 (en) Multicast routing method and an apparatus for routing a multicast packet
TWI408936B (en) Network traversal method and network communication system
EP2449749B1 (en) Method and apparatus for relaying packets
US20040246991A1 (en) IP address translator and packet transfer apparatus
JP5664320B2 (en) Relay device, packet relay method, and communication system
CN102932461B (en) Network acceleration transmission method and device
WO2013170177A1 (en) System and method for reducing a call establishment time
JP2008028996A (en) Communication system, communication method, and program
CN102546407B (en) File transmitting method and device
CN109088878A (en) A kind of message processing method for resisting exhausted cloud guard system
JP6222367B2 (en) COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND COMMUNICATION METHOD
JP5385269B2 (en) IPv6-IPv4 conversion method and apparatus for improving control server performance
US20120072513A1 (en) Method and system for obtaining host identity tag
JP2009055418A (en) Communicating system, relay device, terminal, relay processing method, and its program
CN107454178B (en) Data transmission method and device
CN113542395B (en) Message processing method and message processing system
JP4591338B2 (en) Communications system
CN106210164B (en) A kind of IP address conflict processing method and processing device
WO2012018190A2 (en) Traffic-based communication system and method
KR101328028B1 (en) System and method for message transmission based on session
TWI260880B (en) Peer-to-Peer communication method capable of penetrating fire wall
JPH10336228A (en) Router and network management equipment
EP3133770B1 (en) Home gateway ds-lite multicast method and device
JP3861885B2 (en) Mobile terminal and packet transmission method
JP5121789B2 (en) Data transmission system and computer

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130930

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20140326

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140529

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140610

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140806

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141124

LAPS Cancellation because of no payment of annual fees