JP5664320B2 - Relay device, packet relay method, and communication system - Google Patents
Relay device, packet relay method, and communication system Download PDFInfo
- 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
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).
このような通信システムで呼制御ネットワークの帯域を有効活用するには、通信需要に応じて呼を切断したり再確立したりするのが望ましい。しかしながら、呼すなわちセッションの切断要求や確立要求を発するのはゲートウェイ装置であるのに対し、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.
本発明を実施するための実施の形態1におけるゲートウェイ装置1を図1ないし図8を用いて説明する。
図1はゲートウェイ装置1すなわち中継装置が使用される通信システム100の構成を示す図である。通信システム100は、呼制御・呼管理の機能を持たないユーザネットワーク4A、4Bと、2つ以上のユーザネットワーク4A、4B間に設けられた呼制御・呼管理の機能を備えた呼制御ネットワーク5と、を備えたものである。
A
FIG. 1 is a diagram showing a configuration of a
ユーザネットワーク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
Here, an example is shown in which one
図2はゲートウェイ装置1のハードウェア構成を示す図である。
ゲートウェイ装置1は、データを処理するためのCPU12と、データ処理に必要なプログラムや情報を記憶するメモリ13と、ユーザネットワーク4および呼制御ネットワーク5とのEthernet(登録商標)インタフェース11とを備えている。
FIG. 2 is a diagram illustrating a hardware configuration of the
The
また、図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
セッション情報テーブル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
フロー情報の領域には、セッション情報テーブル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
図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
セッション管理部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
ここで、動作について説明する。
まず、通信システム全体の動作を、図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
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
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
The
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
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
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
一旦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
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
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
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
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
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
次に、ゲートウェイ装置1内の動作について図3及び図6を用いて説明する。
まず、ユーザネットワーク4から呼制御ネットワーク5へIPパケットを中継する場合について説明する。
ユーザネットワーク4AからのIPパケットがインタフェース部11Aに入力されると、このIPパケットはパケット検出部14Aで検出され、パケット保留部15とセッション制御部16に転送される。パケット保留部15はこのIPパケットをセッション制御部16から転送指示がくるまで保留し、転送指示がくるとインタフェース部11Bを介して呼制御ネットワーク5に向けて送出する。
Next, the operation in the
First, a case where an IP packet is relayed from the
When an IP packet from the
セッション制御部16はパケット検出部14AからIPパケットを受取ると、DA/SA抽出部160にてIPアドレス情報を抽出し、セッション情報取得部162に抽出した情報を伝達すると共にIPパケットをパケット識別部161に転送する。パケット識別部161は受取ったIPパケットがユーザデータなのかセッション制御用のパケットなのかTCPコネクションに関するパケットなのかを識別し、ユーザデータであればセッション情報取得部162に、セッション制御用のパケットであればセッション管理部163に、TCPコネクションに関するパケットであればTCP管理部164にその旨を伝える。
なお、ユーザネットワーク4Aは通常セッション制御に非対応であることを前提としているため、パケット識別部161で受取るデータはユーザデータ、あるいはTCPコネクションに関するパケットのいずれかである。
When the
Since it is assumed that the
検出された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受付部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
セッション情報取得部162がTCP受付部1641からTCP-SYN/ACKパケットまたはTCP-ACKパケットであるとの情報を受取った場合、セッション情報取得部162は記憶部17に記憶されたセッション状態テーブル171を更新し、パケット保留部15に転送指示を送り一時保留していたTCP-SYN/ACKパケットまたはTCP-ACKパケットを呼制御ネットワーク5に送出させる。
When the session
ところで、検出された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
検出された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
セッション再確立後、TCP管理部164はTCP-SYNパケットを生成して対向するゲートウェイ装置1に送信し、TCP-SYN/ACKを受取るとTCP-ACKを返してTCPコネクションを確立する。TCPコネクションの確立後、セッション情報取得部162はパケット保留部15に転送指示を送り、一時保留していたユーザデータのTCPパケットを呼制御ネットワーク5に送出させる。
なお、このセッションを使用するパケットを送出する際には、ユーザデータか制御用データかの種別によらず、このセッションに対応するタイマのリセット信号を無通信監視部18に送信するものとする。
After re-establishing the session, the
When transmitting a packet using this session, a timer reset signal corresponding to this session is transmitted to the no-
ゲートウェイ装置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
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
When an IP packet is input from the
セッション制御部16は、パケット検出部14BからIPパケットを受取ると、先ほどと同様にDA/SA抽出部160にてIPアドレス情報を抽出してセッション情報取得部162に伝達し、IPパケットをパケット識別部161に転送する。IPパケット識別部161は受取ったIPパケットがユーザデータなのかセッション制御用のパケットなのかTCPコネクションに関するパケットなのかを識別し、ユーザデータであればセッション情報取得部162に、セッション制御用のパケットであればセッション管理部163に、TCPコネクションに関するTCPパケットであればTCP管理部164にその旨を伝える。
When the
検出された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
セッション管理部163がINVITEメッセージを受付けた場合、セッション情報取得部162はセッション管理部163にセッション情報テーブル170の情報に基づいて100 Tryingを送信するよう指示し、セッション確立の準備が整った時点で同じくセッション情報テーブル170の情報に基づいて200 OKを送信するよう指示する。
なお、メッセージの送信指示をするごとにセッション状態テーブル171の更新も行うものとする。
When the
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
When the session
ところで、検出されたIPパケットがユーザデータの場合、セッション情報取得部162はDA/SA抽出部160から受取ったIPアドレスの情報に基づいてセッション状態テーブル171を更新し、無通信監視部18に対応するセッションのタイマリセット信号を送りパケット保留部15には転送指示を送信する。このとき、TCPパケットであるかその他のIPパケットであるかを区別する必要は無い。
When the detected IP packet is user data, the session
一方、検出された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
対向するゲートウェイ装置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
一方、セッション情報取得部162がIP端末3の生成したTCPパケットであると判断した場合、ユーザデータを受信した場合と同様に、セッション状態テーブル171を更新して無通信監視部18に対応するセッションのタイマリセット信号を送信し、パケット保留部15には転送指示を出力する。
なお、図3では呼制御ネットワーク5から入力されたパケットもパケット保留部15で一時保留する構成としているが、パケット検出部14Bにパケットの種類を分別し、ユーザデータもしくはIP端末3A宛のIPパケットであれば転送し、それ以外であれば廃棄する機能を設け、パケット保留部15を迂回するようにしても良い。
On the other hand, when the session
In FIG. 3, the packet input from the
ここで、ゲートウェイ装置1がセッション確立後に一定期間、このセッションを使用するIPパケットを検出しない場合の動作について説明する。
上記のとおり、無通信監視部18はセッションごとにタイマ180を備えている。各タイマはセッション確立時にスタートし、このセッションを使用するIPパケットを検出するとリセットされ、BYEパケットを受信するとリセットされて停止する。また、タイマ180は満了によっても停止する。
Here, an operation when the
As described above, the no-
タイマ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-
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
セッションを切断する際、セッション情報取得部162はタイマ満了によりセッションを切断する場合であってもBYEパケットを受信してセッションを切断する場合であっても、セッション状態テーブル171のフロー情報のひとつとしてセッション状態を「BYE」に更新する。これにより、ゲートウェイ装置1はセッションを確立する際に以前に対応するセッションがあったか否かを判断することができる。すなわち、IP端末3からTCPコネクションを確立するためのメッセージが送信されるのか、ゲートウェイ装置1自らTCP-SYNやTCP-ACKを生成しなければならないのかを判断できる。
When disconnecting a session, the session
図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
ところで、ゲートウェイ装置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
When the
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
Note that “voluntary” is not a session establishment request of the
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
When the TCP connection is established in S8 or S9, if there is user data of the TCP packet held in the
なお、ここではセッション制御プロトコルとして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
また、ゲートウェイ装置1は、中継するIPパケットのIPアドレスやポート番号、プロトコルといったフロー条件と、呼接続情報である宛先SIP−URI、帯域といったセッション制御パラメータとを関連付けたセッション情報テーブル170、及び実際に行われた通信の情報とセッションの状態を示すフロー情報とから構成されたセッション状態テーブル171とを備え、さらにTCPコネクションの確立に必要なメッセージの生成や受付といった管理を行うTCP管理機能を備えたことにより、ゲートウェイ装置1が自らセッションを切断した場合であっても、セッション切断後に受信したこのセッションを使用するTCPパケットの宛先SIP−URIに基づいて再度セッションを確立し、セッション再確立時に取得した宛先アドレス・宛先ポート番号、及びTCPパケットのTCPヘッダに格納された送信元IPアドレス・送信元ポート番号に基づいてTCPコネクションも自ら確立することができる。
In addition, the
また、通信システムにおいて、このような機能を有するゲートウェイ装置1を設けることにより、データの伝送需要に応じてゲートウェイ装置1がセッションを切断したり再確立したりできるため、セッションの接続時間ではなく伝送路の使用時間に応じた柔軟な課金管理も可能となる。
In addition, by providing the
実施の形態2.
実施の形態1では、セッション切断後に再度セッションを確立してTCPパケットを中継する場合について説明した。実施の形態2では、セッション切断前後においてTCPの連続性が要求される場合について説明する。
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
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
順序情報管理部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
ここで、通信システム全体のシーケンスを図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
セッション制御部16Aは受信したIPパケットからIPアドレス、プロトコルの種類、ポート番号、等の情報を抽出し、この情報に基づいてセッション情報テーブル170から対応するセッション制御パラメータを、セッション状態テーブル171からこのIPパケットに対応するセッションは一定期間使用されていないためゲートウェイ装置1Aまたはゲートウェイ装置1Bにより切断されたものか否かの情報を読み取る。
The
ところで、ゲートウェイ装置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
一旦切断されたセッションが再確立された場合、ゲートウェイ装置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
なお、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を利用して順序情報の連続性を保つ場合について説明する。
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
図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
順序情報管理部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
The order
ここで、通信システム全体のシーケンスを図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
Note that the sequence number “X” of
セッション制御部16Bは受信したIPパケットからIPアドレス、プロトコルの種類、ポート番号、等の情報を抽出し、この情報に基づいてセッション情報テーブル170から対応するセッション制御パラメータを、セッション状態テーブル171からこのIPパケットに対応するセッションは一定期間使用されていないためゲートウェイ装置1Aまたはゲートウェイ装置1Bにより切断されたものか否かの情報を読み取る。
The
ゲートウェイ装置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
ここで、図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
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
ゲートウェイ装置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
一旦切断されたセッションが再確立された場合、ゲートウェイ装置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
ゲートウェイ装置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 /
ゲートウェイ装置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
このユーザデータ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
これ以降、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
このように、ゲートウェイ装置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
本実施の形態によれば、セッションを再確立する際の制御プロトコルと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
実施の形態4.
実施の形態3では、セッション切断前後でTCPの連続性を保つために、セッション再確立時の制御プロトコル及びTCPの3way handshakeを利用してゲートウェイ装置にシーケンス番号及びACK番号を設定した。実施の形態4では、セッション切断前後のセッション確立用の制御プロトコルを利用してTCPの連続性を維持する場合について説明する。
In
本実施の形態に係るゲートウェイ装置1が使用される通信システム100の構成、及びゲートウェイ装置1のハードウェア構成は実施の形態1と同じであるため説明を省略する。ゲートウェイ装置1の機能及び動作について図14ないし図18を用いて説明する。
図14に示すように、セッション制御部16Cの構成は実施の形態1とほぼ同じで、セッション情報取得部162Cの機能が一部異なる。セッション情報取得部162Cには通信フローごとにフロー識別子を生成し管理する識別子管理部1620が設けられ、このフロー識別子は、図15に示すように、セッション情報テーブル170Cにセッション制御パラメータとあわせて記憶されている。
Since the configuration of the
As shown in FIG. 14, the configuration of
ここで、図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
ゲートウェイ装置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
ここで、ゲートウェイ装置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
図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
ゲートウェイ装置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
ゲートウェイ装置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
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
The
When the TCP three-way handshake is completed in this way, a TCP connection is established between the
ゲートウェイ装置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
対向するゲートウェイ装置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
ゲートウェイ装置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
一旦切断されたセッションを再確立するものであると判断した場合、ゲートウェイ装置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コネクションが確立すると、ゲートウェイ装置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
Thereafter, the TCP packet transmitted between the
本実施の形態によれば、セッションごとに固有のフロー識別子を設け、セッション確立の際に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を組合せた場合について説明する。
In
本実施の形態に係るゲートウェイ装置1が使用される通信システム100の構成、及びゲートウェイ装置1のハードウェア構成は実施の形態1と同じであるため説明を省略する。ゲートウェイ装置1の機能及び動作について図19ないし図21を用いて説明する。
図19はセッション制御部16Dの機能ブロック図で、セッション情報取得部162Dにフロー識別子を生成したり管理したりする識別子管理部1620Dを備えると共に、実施の形態3に記載したのと同じ機能を有する順序情報管理部165Dを備えたものである。
Since the configuration of the
FIG. 19 is a functional block diagram of the session control unit 16D. The session
ここで、図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
ゲートウェイ装置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
ゲートウェイ装置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
ゲートウェイ装置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
ゲートウェイ装置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
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
The
When the TCP three-way handshake is completed in this way, a TCP connection is established between the
ゲートウェイ装置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
セッションが切断された状態の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
セッション制御部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
ゲートウェイ装置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
ここで、ゲートウェイ装置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
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
ゲートウェイ装置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-
また、ゲートウェイ装置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
対向するゲートウェイ装置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 /
ゲートウェイ装置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
このユーザデータ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
これ以降、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
このように、ゲートウェイ装置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
本実施の形態によれば、実施の形態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
なお、ここでは実施の形態3と実施の形態4を組合せた場合について説明したが、実施の形態2と実施の形態4を組合せることもできる。この場合は実施の形態2に記載の効果と実施の形態4に記載の効果を得ることができる。
また、実施の形態2ないし実施の形態5においても実施の形態1と同様に、SIPの代わりにセッション制御プロトコルとしてH.323、MEGACO等を用いることができる。
In addition, although the case where
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
Claims (8)
前記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 .
前記セッションを使用するパケットを所定期間受信しない場合に前記セッションを切断する第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アドレスの情報を有する確立要求メッセージを生成し、
前記インターフェース部は、生成された前記確立要求メッセージを前記他の中継装置との間に接続され前記ユーザデータを中継する呼制御ネットワークに転送した後、前記パケット保留部に保留された前記ユーザデータを前記呼制御ネットワークを介して前記他の中継装置に転送することを特徴とする通信システム。 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 .
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)
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)
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 |
-
2011
- 2011-02-18 JP JP2011033202A patent/JP5664320B2/en not_active Expired - Fee Related
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 |