JP2009015392A - Communication device and communication method - Google Patents

Communication device and communication method Download PDF

Info

Publication number
JP2009015392A
JP2009015392A JP2007173377A JP2007173377A JP2009015392A JP 2009015392 A JP2009015392 A JP 2009015392A JP 2007173377 A JP2007173377 A JP 2007173377A JP 2007173377 A JP2007173377 A JP 2007173377A JP 2009015392 A JP2009015392 A JP 2009015392A
Authority
JP
Japan
Prior art keywords
packet
tcp
sequence number
processing unit
alg
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007173377A
Other languages
Japanese (ja)
Inventor
Masahide Nishikawa
雅英 西川
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 JP2007173377A priority Critical patent/JP2009015392A/en
Publication of JP2009015392A publication Critical patent/JP2009015392A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a communication device preventing reduction of throughput of TCP (Transmission Control Protocol). <P>SOLUTION: This communication device having an ALG (Application Level Gateway) processing function has: a TCP sequence number change processing part 24 deciding whether or not a received packet is a subsequent packet transmitted in succession to a missing packet based on a TCP sequence number of the received packet; and a subsequent packet reception processing part 18 generating a proxy ACK (ACKnowledgement) packet destined to a destination of the missing packet having TCP data length of 0, and having no TCP data portion when it is decided that the received packet is the subsequent packet. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、ALG(Application Level Gateway)機能を備えた通信装置および通信方法に関する。   The present invention relates to a communication apparatus and a communication method having an ALG (Application Level Gateway) function.

従来のALG(Application Level Gateway)は、通信装置がパケットのアドレスを変換するNAT(Network Address Translation)またはアドレスとポートの両方を変換するNAPT(Network Address Port Translation)を実行する時に、TCP(Transmission Control Protocol)データ部を読み取り、TCPデータ部分に書き込まれている情報の必要な部分(たとえばNAPTで仕様するアドレス,ポート番号など)を更新する補助的な処理を実行する。   A conventional ALG (Application Level Gateway) performs TCP (Transmission Control) when a communication device executes NAT (Network Address Translation) for translating a packet address or NAPT (Network Address Port Translation) for translating both an address and a port. Protocol) The data part is read, and an auxiliary process for updating a necessary part of information written in the TCP data part (for example, an address and port number specified by NAPT) is executed.

これによって、中継する通信装置がNAT/NAPTを用いて通信する環境でも、通信端末と相手端末は、中継する通信装置のNAT/NAPTの存在を意識することなく通信セッションを確立することができる(たとえば、非特許文献1参照)。   Thus, even in an environment where the relaying communication device communicates using NAT / NAPT, the communication terminal and the partner terminal can establish a communication session without being aware of the presence of the NAT / NAPT of the relaying communication device ( For example, refer nonpatent literature 1).

また、ALGは、TCPデータ部分に書き込まれているポート番号などの情報を更新するとき、メッセージ内容と共にメッセージ長も変化する場合があるため、TCPの送信シーケンス番号,ACKシーケンス番号,IP(Internet Protocol)チェックサム,TCPチェックサムも変更する必要がある。   In addition, since the ALG updates the information such as the port number written in the TCP data portion, the message length may change together with the message content. Therefore, the TCP transmission sequence number, ACK sequence number, IP (Internet Protocol) It is also necessary to change the checksum and TCP checksum.

このようなALGの実行の際の情報の変更を効率よく行うために、TCP/IPのチェックサムを全て再計算する代わりに、特定の変更部分だけを対象としてチェックサムを更新する手法が提案されている(たとえば、下記非特許文献2)。また、中継する通信装置のALG処理部が、NAT/NAPT前後のTCPシーケンス番号の差分リストを持ち、自動的にTCPシーケンス番号を増減する手法が提案されている(たとえば、下記非特許文献3)。   In order to efficiently change the information during the execution of ALG, a method has been proposed in which the checksum is updated only for a specific changed portion instead of recalculating the entire TCP / IP checksum. (For example, Non-Patent Document 2 below). Also, a method has been proposed in which the ALG processing unit of the relaying communication apparatus has a TCP sequence number difference list before and after NAT / NAPT and automatically increases or decreases the TCP sequence number (for example, Non-Patent Document 3 below). .

一方、音声や映像信号などのストリーミング配信を制御するプロトコルとして、RTSP(Real Time Streaming Protocol)が近年用いられている(下記非特許文献4参照)。RTSPの制御メッセージは一般的にTCP上で配信され、ストリーミングデータについては、次の2種類の配信方式が規定されている。   On the other hand, RTSP (Real Time Streaming Protocol) has recently been used as a protocol for controlling streaming distribution of audio and video signals (see Non-Patent Document 4 below). RTSP control messages are generally distributed over TCP, and the following two types of distribution methods are defined for streaming data.

1つめの配信方式は、RTSP制御メッセージ用のTCPセッションとは別に、RTP(Real-time Transport Protocol)/RTCP(RTP Control Protocol)データ用のUDP(User Datagram Protocol)セッションを使用する通常の配信方式(以下、UDP配信という)である。UDP配信で使用するポート番号は、TCP上で配信されるRTSPの“SETUP”/“200 OK”メッセージに含まれるclient_port,server_portにRTP/RTCP用ポート番号が記述される。このためRTSPをNAT/NAPT環境下で使用するためには、上記ALGの一種であるRTSP−ALGが必要となる。RTSP−ALGは、制御用TCPセッションから“SETUP”/“200 OK”メッセージに含まれるclient_port、server_port情報を読み取り、静的UDP−NAPTを開閉する。   The first delivery method is a normal delivery method using a UDP (User Datagram Protocol) session for RTP (Real-time Transport Protocol) / RTCP (RTP Control Protocol) data separately from a TCP session for RTSP control messages. (Hereinafter referred to as UDP distribution). As for the port number used in UDP distribution, RTP / RTCP port numbers are described in client_port and server_port included in RTSP “SETUP” / “200 OK” messages distributed over TCP. Therefore, in order to use RTSP in a NAT / NAPT environment, RTSP-ALG, which is a kind of the above ALG, is required. The RTSP-ALG reads the client_port and server_port information included in the “SETUP” / “200 OK” message from the control TCP session, and opens / closes the static UDP-NAPT.

もうひとつの配信方式は、RTSP制御メッセージ用のTCPセッション上に、さらにRTP/RTCPデータを重畳して配信するオプションの配信方式(以下、IL(Interleave)配信という)である。RTSP制御メッセージと重畳されたRTP/RTCPデータは、RTSPメッセージの先頭が“$”であるか否かで判定されて分離することができる。また、RTP/RTCPデータの直後にはデータ長が記述される。RTSP−ALGは、多重化されたデータから、制御メッセージのみを解釈するために、RTP/RTCPデータを読み飛ばす制御を行う。   Another distribution method is an optional distribution method (hereinafter referred to as IL (Interleave) distribution) in which RTP / RTCP data is further superimposed on a TCP session for RTSP control messages. The RTP / RTCP data superimposed on the RTSP control message can be separated by determining whether or not the head of the RTSP message is “$”. The data length is described immediately after the RTP / RTCP data. The RTSP-ALG performs control to skip RTP / RTCP data in order to interpret only the control message from the multiplexed data.

上記2つのどちらの配信方式になるかは、RTSPクライアントが送信する“SETUP”メッセージで決定される。このため、RTSP−ALGは、両方の配信方式に対応しておく必要がある。   Which of the above two distribution methods is used is determined by a “SETUP” message transmitted by the RTSP client. Therefore, RTSP-ALG needs to be compatible with both distribution methods.

IETF(Internet Engineering Task Force) RFC2663,“IP Network Address Translator (NAT) Terminology and Considerations”,1999Internet Engineering Task Force (IETF) RFC2663, “IP Network Address Translator (NAT) Terminology and Considerations”, 1999 IETF RFC1631,“The IP Network Address Translator (NAT)”,1994IETF RFC1631, “The IP Network Address Translator (NAT)”, 1994 IETF RFC2766,“Network Address Translation - Protocol Translation (NAT-PT)”,2000IETF RFC2766, “Network Address Translation-Protocol Translation (NAT-PT)”, 2000 IETF RFC2326,“Real Time Streaming Protocol (RTSP)”,1998IETF RFC2326, “Real Time Streaming Protocol (RTSP)”, 1998

しかしながら、上記従来の技術によればTCPレイヤで欠落パケットが1つでも発生すると、中継する通信装置のALG処理部が、その欠落TCPパケットの再送パケットを受信するまで、欠落TCPパケット以降の後続TCPパケットを一切相手側に送信しない。このため、TCPレベルでのスループットが極端に低下する可能性がある、という問題があった。   However, according to the conventional technique, when even one missing packet occurs in the TCP layer, the subsequent TCP after the missing TCP packet is received until the ALG processing unit of the relaying communication apparatus receives a retransmission packet of the missing TCP packet. Do not send any packets to the other side. For this reason, there was a problem that the throughput at the TCP level may be extremely reduced.

欠落TCPパケット以降の後続TCPパケットを送信しない理由は、欠落TCPパケットのTCPデータ部にALGにより更新されるべき部分が含まれていた場合、ALG処理前と処理後で全体のTCPデータ長が変化する可能性があるためである。ALGによりTCPデータ部が更新され、結果としてTCPデータ長が変化した場合、TCPデータ長の変化が後続のTCPパケットのシーケンス番号に波及することになる。すなわち、後から欠落TCPパケットの再送パケットを受信すると、その再送パケットのTCPデータ部にTCPデータ長変化を伴うTCPデータ編集処理が必要となる可能性があり、先に送信した後続TCPパケットと後で受信した再送パケットとの間でTCPシーケンス番号の一貫性が保てなくなり、TCPセッションが破綻する可能性がある。   The reason for not transmitting subsequent TCP packets after the missing TCP packet is that if the TCP data part of the missing TCP packet contains a part that should be updated by ALG, the total TCP data length changes before and after ALG processing. This is because there is a possibility. When the TCP data part is updated by ALG and the TCP data length changes as a result, the change in the TCP data length will affect the sequence number of the subsequent TCP packet. That is, when a retransmission packet of a missing TCP packet is received later, a TCP data editing process involving a change in TCP data length may be necessary in the TCP data portion of the retransmission packet. The TCP sequence number cannot be consistent with the retransmitted packet received in step 1, and the TCP session may fail.

一方、欠落TCPパケットを送信した通信端末は、TCPパケットが欠落しても、TCPレイヤのウィンドウ送信制御に基づいて、相手端末からの“ACK(ACKnowledgement)”を待たずに一定量の後続TCPパケットを送信する。このため、中継する通信装置のALG処理部は、欠落TCPパケットが発生した後も欠落TCPパケット以降の後続TCPパケットを受信することになる。   On the other hand, even if the TCP packet is lost, the communication terminal that has transmitted the missing TCP packet does not wait for an “ACK (ACKnowledgement)” from the other terminal and waits for a certain amount of subsequent TCP packets based on TCP layer window transmission control. Send. For this reason, the ALG processing unit of the relay communication apparatus receives subsequent TCP packets after the missing TCP packet even after the missing TCP packet occurs.

したがって、一般的に、前述のとおり、中継する通信装置のALG処理では、欠落TCPパケットを検出した場合、欠落TCPパケットが再送されるまで後続TCPパケットを廃棄する。この後続TCPパケットを廃棄する処理は、中継する通信装置のALG処理部が通信端末から送信される欠落TCPパケットの再送パケットを受信するまでの間実行するため、その間ALG処理部は、欠落TCPパケット以降の後続TCPパケットを相手端末に送信できなくなる。   Therefore, generally, as described above, in the ALG process of the relay communication apparatus, when a missing TCP packet is detected, subsequent TCP packets are discarded until the missing TCP packet is retransmitted. The process of discarding the subsequent TCP packet is executed until the ALG processing unit of the relaying communication apparatus receives a retransmission packet of the missing TCP packet transmitted from the communication terminal. Subsequent subsequent TCP packets cannot be transmitted to the partner terminal.

言い換えると、中継する通信装置のALGが実行する後続TCPパケットの廃棄処理は、欠落TCPパケット以降の後続TCPパケットの廃棄を相手端末が検出し、選択的“ACK”または重複“ACK”により欠落パケット送信元の通信端末に通知し、その通信端末から欠落TCPパケットが再送されるまでの間、すなわち、1パケット往復時間(RTT:Round-Trip Time)以上続く。   In other words, in the discarding process of the subsequent TCP packet executed by the ALG of the relay communication apparatus, the other terminal detects the discarding of the subsequent TCP packet after the missing TCP packet, and the missing packet is detected by selective “ACK” or duplicate “ACK”. It continues until the transmission terminal is notified and the missing TCP packet is retransmitted from the communication terminal, that is, one packet round-trip time (RTT).

1RTTが長くなると、中継する通信装置のALG処理部で複数の後続TCPパケットが連続して送信できなくなる状態となるが、前述のとおり送信元の通信端末のTCPは、中継する通信装置のALG処理部で後続TCPパケットが廃棄されていることを検出できない。したがって、送信元の通信端末は相手端末から選択的“ACK”または重複“ACK”を受信することにより、欠落パケットおよび複数の後続TCPパケットの廃棄が網内で発生したと検出し、廃棄が発生した理由は網内で重輻輳が発生したためと判断することになる。その結果、通信端末間のTCPレベルの輻輳制御が動作し、前述のとおりTCPレベルでのスループットが極端に低下するという問題が生じる。   If 1 RTT becomes longer, the ALG processing unit of the communication device that relays becomes unable to continuously transmit a plurality of subsequent TCP packets. As described above, the TCP of the communication terminal that is the source of transmission is the ALG process of the relay communication device. Cannot detect that the subsequent TCP packet is discarded. Therefore, when the source communication terminal receives selective “ACK” or duplicate “ACK” from the other terminal, it detects that the dropped packet and a plurality of subsequent TCP packets are discarded in the network, and the discard occurs. The reason is that heavy congestion has occurred in the network. As a result, the TCP level congestion control between the communication terminals operates, and there arises a problem that the throughput at the TCP level is extremely lowered as described above.

ここで、たとえばUDP配信の場合のRTSP−ALGでは、ストリーミング配信用RTP/RTCPパケットがUDP上で送受信されるため、RTSP制御メッセージ用TCPのスループットが低下しても、制御のレスポンスが若干悪化する程度で、大きな問題は発生しない。   Here, for example, in RTSP-ALG in the case of UDP distribution, RTP / RTCP packets for streaming distribution are transmitted / received on UDP, so even if the throughput of the RTSP control message TCP decreases, the control response slightly deteriorates. However, no major problems occur.

しかし、IL配信の場合のRTSP−ALGでは、RTSP制御メッセージ用TCP上にRTP/RTCPデータを重畳して配信されるので、TCPの送信レートが低下すると、ストリーミング用データ配信の送信レート低下につながり、高ビットレートのストリーミング配信ができなくなる、という大きな問題があった。   However, in RTSP-ALG in the case of IL distribution, RTP / RTCP data is distributed on the RTSP control message TCP, so that if the TCP transmission rate decreases, the transmission rate of streaming data distribution will decrease. There was a big problem that streaming at a high bit rate could not be performed.

本発明は、上記に鑑みてなされたものであって、TCPのスループットの低下を防止する通信装置および通信方法を得ることを目的とする。   The present invention has been made in view of the above, and an object of the present invention is to obtain a communication device and a communication method that prevent a decrease in TCP throughput.

上述した課題を解決し、目的を達成するために、本発明は、TCPデータの更新を行うALG処理機能を備えた通信装置であって、受信したパケットのTCPシーケンス番号に基づいて、欠落パケットの後に続いて送信されるパケットである後続パケットか否かを判定するTCPシーケンス番号判定処理手段と、前記TCPシーケンス番号判定処理手段で後続パケットと判定された場合に、TCPデータ部分が無くTCPデータ長を0とした欠落パケットの宛先を宛先とする代理ACKパケットを生成する後続パケット生成処理手段と、を備えることを特徴とする。   In order to solve the above-described problems and achieve the object, the present invention is a communication apparatus having an ALG processing function for updating TCP data, and based on the TCP sequence number of a received packet, TCP sequence number determination processing means for determining whether the packet is a subsequent packet that is subsequently transmitted, and when the TCP sequence number determination processing means determines that the packet is a subsequent packet, there is no TCP data portion and the TCP data length And subsequent packet generation processing means for generating a proxy ACK packet with the destination of the missing packet set to 0 as a destination.

この発明によれば、パケットを中継する通信装置のALG処理が欠落パケットの後に続いて送信される後続パケットを受信した場合に、後続パケットを廃棄せず、TCPデータ長を0とした代理ACKパケットを欠落パケットの送信先端末に送信するようにしたので、TCPのスループットの低下を防止することができるという効果を奏する。   According to the present invention, when the ALG processing of the communication device that relays a packet receives a subsequent packet transmitted subsequent to the missing packet, the proxy ACK packet with the TCP data length set to 0 without discarding the subsequent packet Is transmitted to the transmission destination terminal of the lost packet, and it is possible to prevent a decrease in TCP throughput.

以下に、本発明にかかる通信装置の実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。   Embodiments of a communication apparatus according to the present invention will be described below in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.

実施の形態1.
図1は、本発明にかかる通信装置の実施の形態1の機能構成例を示す図である。図1に示すように本実施の形態の通信装置は、プロトコルごとの個別のALG処理を行う個別ALG処理部1と、プロトコルに依存しない共通的なALG処理を行うALG共通処理部2と、NAT/NAPT処理を行うNAT/NAPT共通処理部3と、で構成される。
Embodiment 1 FIG.
FIG. 1 is a diagram illustrating a functional configuration example of a communication device according to a first embodiment of the present invention. As shown in FIG. 1, the communication apparatus according to the present embodiment includes an individual ALG processing unit 1 that performs individual ALG processing for each protocol, an ALG common processing unit 2 that performs common ALG processing independent of protocols, and NAT. A NAT / NAPT common processing unit 3 for performing / NAPT processing.

個別ALG処理部1は、TCPメッセージの解析を行うメッセージ解析処理部11と、メッセージの解析結果に基づいて状態遷移の処理を行うALG状態遷移処理部12と、TCPデータを編集するためのTCPデータ編集情報を生成するTCPデータ編集情報生成処理部14と、で構成される。また、ALG状態遷移処理部は、状態遷移を管理する情報を格納するための記憶部である状態管理部13を備えている。   The individual ALG processing unit 1 includes a message analysis processing unit 11 that analyzes a TCP message, an ALG state transition processing unit 12 that performs state transition processing based on the analysis result of the message, and TCP data for editing TCP data. And a TCP data editing information generation processing unit 14 for generating editing information. The ALG state transition processing unit includes a state management unit 13 that is a storage unit for storing information for managing state transitions.

ALG共通処理部2は、TCPシーケンス番号に基づいてパケットを分類するTCPシーケンス番号判定処理部15と、新規パケットの受信処理を行う新規パケット受信処理部17と、欠落パケットに続いて送信されるパケットである後続パケットの受信処理を行う後続パケット受信処理部18と、再送パケットの受信処理を行う再送パケット受信処理部20と、後述の代理ACKパケットを生成する代理ACK生成処理部21と、TCPデータ編集情報に基づいてTCPデータを編集するTCPデータ編集処理部22と、TCPシーケンス番号の変更処理を行うTCPシーケンス番号変更処理部24と、で構成される。   The ALG common processing unit 2 includes a TCP sequence number determination processing unit 15 that classifies packets based on a TCP sequence number, a new packet reception processing unit 17 that performs reception processing of a new packet, and a packet that is transmitted following the missing packet. A subsequent packet reception processing unit 18 that performs subsequent packet reception processing, a retransmission packet reception processing unit 20 that performs retransmission packet reception processing, a proxy ACK generation processing unit 21 that generates a later-described proxy ACK packet, and TCP data A TCP data editing processing unit 22 that edits TCP data based on editing information, and a TCP sequence number change processing unit 24 that performs a TCP sequence number changing process.

TCPシーケンス番号判定処理部15は、TCP受信シーケンス番号を格納するためのTCP受信シーケンス番号管理部16を備えている。後続パケット受信処理部18は、後続パケットを格納するための後続パケット管理部19を備えている。TCPデータ編集処理部22は、TCPデータ編集情報を格納するためのTCPデータ編集情報管理部23を備えている。また、TCPシーケンス番号変更処理部24は、ACKシーケンス番号を変更するACKシーケンス番号変更処理部25と、TCPシーケンス番号の差分情報を格納するためのTCPシーケンス番号差分管理部26と、送信データのシーケンス番号を変更する送信シーケンス番号変更処理部27と、で構成される。   The TCP sequence number determination processing unit 15 includes a TCP reception sequence number management unit 16 for storing a TCP reception sequence number. The subsequent packet reception processing unit 18 includes a subsequent packet management unit 19 for storing subsequent packets. The TCP data editing processing unit 22 includes a TCP data editing information management unit 23 for storing TCP data editing information. The TCP sequence number change processing unit 24 also includes an ACK sequence number change processing unit 25 that changes the ACK sequence number, a TCP sequence number difference management unit 26 for storing TCP sequence number difference information, and a sequence of transmission data. And a transmission sequence number change processing unit 27 for changing the number.

NAT/NAPT共通処理部3は、受信パケットのNAT/NAPT変換処理を行う受信側NAPT変換処理部28と、NAT/NAPTの変換情報を格納するためのNAT/NAPT変換情報管理部29と、送信パケットのNAT/NAPT変換処理を行う送信側NAPT変換処理部30と、で構成される。   The NAT / NAPT common processing unit 3 includes a reception-side NAPT conversion processing unit 28 that performs NAT / NAPT conversion processing of received packets, a NAT / NAPT conversion information management unit 29 that stores NAT / NAPT conversion information, and a transmission. A transmission side NAPT conversion processing unit 30 that performs NAT / NAPT conversion processing of the packet.

本実施の形態の通信装置は、通信端末に対してNAT/NAPT変換処理とALG処理を行い、通信端末の通信相手の端末との中継を行う。以下の説明では、本実施の形態の通信装置がNAT/NAPT変換処理によりアドレスやポートの番号を変更する通信端末を単に通信端末とよび、通信端末の通信先の通信端末を相手端末とよぶこととする。また、通信端末から相手端末に向かう通信方向を順方向とよび、相手端末から通信端末に向かう通信方向を逆方向とよぶこととする。   The communication apparatus according to the present embodiment performs NAT / NAPT conversion processing and ALG processing on the communication terminal, and relays to the communication partner terminal of the communication terminal. In the following description, a communication terminal in which the communication device of the present embodiment changes an address or a port number by NAT / NAPT conversion processing is simply referred to as a communication terminal, and a communication terminal that is a communication destination of the communication terminal is referred to as a partner terminal. And In addition, a communication direction from the communication terminal to the partner terminal is referred to as a forward direction, and a communication direction from the partner terminal to the communication terminal is referred to as a reverse direction.

本実施の形態では、NAT/NAPT変換情報が、NAT/NAPT変換情報管理部29に格納されている。図2は、本実施の形態のNAT/NAPT変換情報の一例を示す図である。図2に示すように、本実施の形態のNAT/NAPT変換情報は、発アドレス,発ポート番号,着アドレス,着ポート番号,プロトコル(プロトコルの種類),ALG(ALGの種類、ALG対象でない場合には“なし”と記載),変換アドレス,変換ポート番号を含んでいる。なお、このNAT/NAPT変換情報は、順方向の通信の際にそれぞれのエントリ101〜105が生成されるため、発アドレス,発ポート番号は、順方向の場合の送信元の通信端末の値となる。変換アドレス,変換ポート番号は、NAT/NAPT変換後のそれぞれアドレスとポート番号であり、順方向の通信の際には、発アドレス,発ポート番号が、それぞれ変換アドレス,変換ポート番号に変換されることになる。なお、ここではNAPTを仮定してポート番号についても変換することとしたが、NATの場合は、変換ポート番号は用いずに変換アドレスのみを用いるようにすればよい。   In the present embodiment, NAT / NAPT conversion information is stored in the NAT / NAPT conversion information management unit 29. FIG. 2 is a diagram illustrating an example of NAT / NAPT conversion information according to the present embodiment. As shown in FIG. 2, the NAT / NAPT conversion information of this embodiment includes the source address, source port number, destination address, destination port number, protocol (protocol type), ALG (ALG type, not ALG target) Contains "translation address" and translation port number. Since this NAT / NAPT conversion information has respective entries 101 to 105 generated in the forward communication, the calling address and the calling port number are the same as the value of the transmission source communication terminal in the forward direction. Become. The translated address and translated port number are the address and port number after NAT / NAPT conversion, respectively, and the outgoing address and outgoing port number are converted into the translated address and translated port number, respectively, during forward communication. It will be. In this case, the port number is also converted by assuming NAPT. However, in the case of NAT, it is sufficient to use only the translation address without using the translation port number.

相手端末は、逆方向の通信の際には、順方向のパケットの送信元アドレスと送信元ポート番号、すなわち、変換アドレスと変換ポート番号宛にパケットを送信するので、本実施の形態の通信装置は、通信端末に送信するために、変換アドレスと変換ポート番号を通信端末のアドレスとポート番号、すなわち、NAT/NAPT変換情報の発アドレスと発ポート番号に変換して送信する。このように、逆方向の通信では、順方向のNAPT変換情報を用いて、逆変換を行うことになる。   Since the counterpart terminal transmits the packet to the source address and source port number of the forward packet, that is, the translation address and the translation port number, in the case of communication in the reverse direction, the communication apparatus of the present embodiment In order to transmit to the communication terminal, the converted address and the converted port number are converted into the address and port number of the communication terminal, that is, the source address and the source port number of the NAT / NAPT conversion information, and then transmitted. Thus, in reverse communication, reverse conversion is performed using forward NAPT conversion information.

つづいて、本実施の形態の動作について説明する。まず、通常のパケット受信処理について説明する。受信側NAPT変換処理部28は、本実施の形態の通信装置の図示しないパケット受信I/F処理部経由で、受信I/F(Interface)情報(どの種類のI/Fで受信したかの情報)とともに、受信TCPパケットを受け取る。パケット受信I/F処理部は、I/Fの種類ごとに処理を行うものとし、I/Fの種類には、NAPT実行I/F(NAPTを用いるI/F処理)を含むこととする。受信側NAPT変換処理部28は、受信I/F情報がNAPT実行I/Fでない場合には、変換処理は実施しない。   Next, the operation of the present embodiment will be described. First, normal packet reception processing will be described. The reception-side NAPT conversion processing unit 28 receives reception I / F (Interface) information (information on which type of I / F is received) via a packet reception I / F processing unit (not shown) of the communication apparatus according to the present embodiment. ) And a received TCP packet. The packet reception I / F processing unit performs processing for each type of I / F, and the I / F type includes a NAPT execution I / F (I / F processing using NAPT). The reception-side NAPT conversion processing unit 28 does not perform conversion processing when the received I / F information is not a NAPT execution I / F.

受信側NAT/NAPT変換処理部28は、受信I/F情報がNAPT実行I/Fである場合には、NAT/NAPT変換情報に基づいてNAPT変換処理を行う。ただし、受信TCPパケットが逆方向パケットである場合、前述のとおり逆変換を行うことになるため、受け取った受信TCPパケットの発アドレス,発ポート番号,着アドレス,着ポート番号,プロトコルと、それぞれ、着アドレス,着ポート,変換アドレス,変換ポート番号,プロトコルが同一となるNAPT変換情報のエントリを検索する。   If the received I / F information is a NAPT execution I / F, the receiving side NAT / NAPT conversion processing unit 28 performs a NAPT conversion process based on the NAT / NAPT conversion information. However, when the received TCP packet is a backward packet, the reverse conversion is performed as described above, so the source address, source port number, destination address, destination port number, protocol of the received received TCP packet, respectively, Searches for an entry of NAPT conversion information having the same destination address, destination port, translation address, translation port number, and protocol.

検索の結果、対応するNAPT変換情報のエントリがある場合には、受信側NAT/NAPT変換処理部28は、その情報に基づき受信TCPパケットの着アドレス,着ポート番号を、それぞれそのエントリの発アドレス,発ポート番号に変換し、また、アドレスとポート番号の変更を反映して、IPヘッダ・TCPヘッダのチェックサムを修正する。また、検索の結果、対応するNAPT変換情報が存在しなければ、受信側NAT/NAPT変換処理部28は、受け取った受信TCPパケットを廃棄する。   If there is a corresponding NAPT conversion information entry as a result of the search, the receiving side NAT / NAPT conversion processing unit 28 determines the incoming address and the incoming port number of the received TCP packet based on the information, and the originating address of the entry. ., And the checksum of the IP header / TCP header is corrected to reflect the change of the address and port number. If the corresponding NAPT conversion information does not exist as a result of the search, the receiving side NAT / NAPT conversion processing unit 28 discards the received TCP packet.

つぎに、受信側NAT/NAPT変換処理部28は、対応するNAPT変換情報のエントリがある場合、そのエントリのALGの項目を参照し、ALG対象パケットであるか否かを判定する。ALG対象パケットでない場合には、受信TCPパケットはシーケンス番号およびTCPデータを編集する必要が無いので、受信側NAT/NAPT変換処理部28は、そのパケットを非ALG対象TCPパケットとしてそのまま送信側NAPT変換処理部30に送信する。そして、送信側NAPT変換処理は、図示しない送信I/F処理部に、非ALG対象TCPパケットを送出するとともにそのパケットの送信を要求する。   Next, when there is a corresponding NAPT conversion information entry, the receiving side NAT / NAPT conversion processing unit 28 refers to the ALG item of the entry and determines whether the packet is an ALG target packet. If the packet is not an ALG target packet, it is not necessary to edit the sequence number and TCP data of the received TCP packet. Therefore, the reception side NAT / NAPT conversion processing unit 28 converts the packet as a non-ALG target TCP packet as it is and performs the transmission side NAPT conversion. The data is transmitted to the processing unit 30. Then, the transmission side NAPT conversion process sends a non-ALG target TCP packet to a transmission I / F processing unit (not shown) and requests transmission of the packet.

また、パケット送信の際には、送信側NAPT変換処理部30は、パケットの着アドレスに基づいてそのパケットの送信I/Fの種類(NAPT実行I/Fであるかなど)を判定する。送信側NAPT変換処理部30は、非ALG対象TCPパケットについて判定したI/FがNAPT実行I/Fであれば、非ALG対象TCPパケットの発アドレス,発ポート番号を変換アドレス,変換ポート番号にそれぞれ変更する。また、アドレスとポート番号の変更を反映して、非ALG対象パケットのIPヘッダ・TCPヘッダのチェックサムを更新する。そして、送信側NAPT変換処理は、送信I/F処理部に、非ALG対象TCPパケットを送出するとともにそのパケットの送信を要求する。   When transmitting a packet, the transmission-side NAPT conversion processing unit 30 determines the type of transmission I / F of the packet (for example, whether it is a NAPT execution I / F) based on the destination address of the packet. If the I / F determined for the non-ALG target TCP packet is the NAPT execution I / F, the transmission side NAPT conversion processing unit 30 sets the source address and source port number of the non-ALG target TCP packet as the conversion address and conversion port number. Change each one. In addition, the checksum of the IP header / TCP header of the non-ALG target packet is updated to reflect the change of the address and port number. Then, the transmission side NAPT conversion process sends a non-ALG target TCP packet to the transmission I / F processing unit and requests transmission of the packet.

以上、非ALGパケットの処理について説明したが、つぎに、ALG対象パケットの処理について説明する。受信側NAPT変換処理部28は、前述のALG対象パケットであるか否かの判定の際に、ALG対象パケットであると判定した場合には、受信TCPパケットをALG対象パケットとしてACKシーケンス番号変更処理部25に送信する。   The processing of non-ALG packets has been described above. Next, processing of ALG target packets will be described. When determining that the packet is an ALG target packet when determining whether the packet is an ALG target packet, the reception-side NAPT conversion processing unit 28 sets the received TCP packet as an ALG target packet to change the ACK sequence number. To the unit 25.

ACKシーケンス番号変更処理部25は、TCPシーケンス番号差分情報に基づいて、ALG対象TCPパケットのACKシーケンス番号の変換を以下の手順で実行する。図3は、TCPシーケンス番号差分管理部に格納されるTCPシーケンス番号差分リストと変換前後のパケットの一例を示す図である。変換前パケット201〜207は通信端末から送信され通信装置で受信されたパケットを示し、変換後パケット211〜217は、TCPシーケンス番号変更処理部24が変換前パケット201〜207のシーケンス番号(ACKシーケンス番号および送信シーケンス番号)を変更したパケットを示している。また、変換後パケット231〜237は相手端末から送信されたパケットを示しており、変換前パケット221〜227はパケット231〜237を通信装置に送信するためにTCPシーケンス番号変更処理部24がシーケンス番号の逆変換を行った後のパケットを示している。   Based on the TCP sequence number difference information, the ACK sequence number change processing unit 25 performs conversion of the ACK sequence number of the ALG target TCP packet according to the following procedure. FIG. 3 is a diagram illustrating an example of a TCP sequence number difference list and a packet before and after conversion stored in the TCP sequence number difference management unit. The pre-conversion packets 201 to 207 indicate packets transmitted from the communication terminal and received by the communication device. The post-conversion packets 211 to 217 are the sequence numbers (ACK sequence) of the pre-conversion packets 201 to 207 by the TCP sequence number change processing unit 24. Number and transmission sequence number) are changed. In addition, post-conversion packets 231 to 237 indicate packets transmitted from the counterpart terminal, and pre-conversion packets 221 to 227 are transmitted by the TCP sequence number change processing unit 24 in order to transmit the packets 231 to 237 to the communication device. The packet after performing the inverse transformation of is shown.

図3の変換前パケット201〜207,221〜227と変換後パケット211〜217,231〜237を示す図形のなかには、各々のパケットの送信シーケンス番号(Seq),TCPデータ長(len),ACKシーケンス番号(Ack)が示されている。   In the figure showing the pre-conversion packets 201 to 207 and 221 to 227 and the post-conversion packets 211 to 217 and 231 to 237 in FIG. 3, the transmission sequence number (Seq), TCP data length (len), and ACK sequence of each packet are shown. A number (Ack) is shown.

図3に示すように、TCPシーケンス番号差分情報は、順方向と逆方向について、それぞれ変換前シーケンス番号と変換後シーケンス番号を含む。これらの情報が、TCPのセッションごとにTCPシーケンス番号差分管理部29に格納されている。   As shown in FIG. 3, the TCP sequence number difference information includes a pre-conversion sequence number and a post-conversion sequence number for the forward direction and the reverse direction, respectively. These pieces of information are stored in the TCP sequence number difference management unit 29 for each TCP session.

TCPシーケンス番号差分情報は、シーケンス番号の変更を管理するために保持されているものであり、後述のようにTCPデータ編集処理部22によって格納される。図2の例で、変換前パケット205は、TCPデータ編集処理部22によりTCPデータ長が1000バイトから1002バイトに変更され、変換後パケット215のようになったとする。すると、そのつぎの変換前パケット204に対応する変換後パケット214についても、変換後パケット215のTCP長が変更になった分だけ送信シーケンス番号をずらし、送信シーケンス番号を13000から13002に変更する必要がある。   The TCP sequence number difference information is held for managing the change of the sequence number, and is stored by the TCP data editing processing unit 22 as will be described later. In the example of FIG. 2, it is assumed that the pre-conversion packet 205 is changed to a post-conversion packet 215 by changing the TCP data length from 1000 bytes to 1002 bytes by the TCP data editing processing unit 22. Then, also for the post-conversion packet 214 corresponding to the next pre-conversion packet 204, it is necessary to shift the transmission sequence number by an amount corresponding to the change in the TCP length of the post-conversion packet 215 and change the transmission sequence number from 13000 to 13002. There is.

ここで、ACKシーケンス番号変更処理部25の動作の説明に戻る。ACKシーケンス番号変更処理部25は、受信したALG対象パケットの発着アドレス,発着ポート,プロトコルから一意に決定されるセッションに対応するTCPシーケンス番号差分情報を、TCPシーケンス番号差分管理部を検索して取得する。   Here, the description returns to the operation of the ACK sequence number change processing unit 25. The ACK sequence number change processing unit 25 searches the TCP sequence number difference management unit to acquire TCP sequence number difference information corresponding to a session that is uniquely determined from the incoming / outgoing address, outgoing / incoming port, and protocol of the received ALG target packet. To do.

ACKシーケンス番号変更処理部25は、受信TCPパケットのACKシーケンス番号と一致するシーケンス番号を、取得したTCPシーケンス差分情報の順方向および逆方向の変換後シーケンス番号のなかから検索する。そして、ACKシーケンス番号変更処理部25は、受信TCPパケットのACKシーケンス番号を、検索結果(ACKシーケンス番号を一致する変換後シーケンス番号)に対応する変換前シーケンス番号に変更する。たとえば、たとえば、変換前パケット201〜207の送信シーケンス番号を変換後パケット211〜217のように変換する。また、シーケンス番号変換と同時にTCPパケットのチェックサムも更新する。   The ACK sequence number change processing unit 25 searches for a sequence number that matches the ACK sequence number of the received TCP packet from the converted sequence numbers in the forward and reverse directions of the acquired TCP sequence difference information. Then, the ACK sequence number change processing unit 25 changes the ACK sequence number of the received TCP packet to the pre-conversion sequence number corresponding to the search result (the post-conversion sequence number that matches the ACK sequence number). For example, the transmission sequence numbers of the pre-conversion packets 201 to 207 are converted into post-conversion packets 211 to 217, for example. Also, the checksum of the TCP packet is updated simultaneously with the sequence number conversion.

たとえば、順方向の変換前パケット205では“Ack=42005”であり、TCPシーケンス番号差分情報の逆方向の変換後シーケンス番号に一致する番号“42005”がある。図3のTCPシーケンス番号差分情報で変換後シーケンス番号“42005”に対応する変換前シーケンス番号は“42000”であるため、変換前パケット205については“Ack=42000”に変換する。また逆方向の変換後パケット234では“Ack=13002”であり、TCPシーケンス番号差分リストの順方向の変換後シーケンス番号に一致する番号“13002”がある。図3のTCPシーケンス番号差分情報で“13002”に対応する変換前シーケンス番号は“13000”であるため、変換後パケット234については“Ack=13000”に変換する。   For example, in the pre-conversion packet 205 in the forward direction, “Ack = 42005”, and there is a number “42005” that matches the post-conversion sequence number in the reverse direction of the TCP sequence number difference information. Since the pre-conversion sequence number corresponding to the post-conversion sequence number “42005” in the TCP sequence number difference information of FIG. 3 is “42000”, the pre-conversion packet 205 is converted to “Ack = 42000”. Further, “Ack = 13002” in the post-conversion packet 234 in the reverse direction, there is a number “13002” that matches the post-conversion sequence number in the forward direction of the TCP sequence number difference list. Since the pre-conversion sequence number corresponding to “13002” in the TCP sequence number difference information of FIG. 3 is “13000”, the post-conversion packet 234 is converted to “Ack = 13000”.

ACKシーケンス番号変更処理部25は、このように受信TCPパケットのACKシーケンス番号を変更し、変更した受信TCPパケットをACKシーケンス番号修正済みパケットとしてTCPシーケンス番号判定処理部15に送信する。   The ACK sequence number change processing unit 25 changes the ACK sequence number of the received TCP packet in this way, and transmits the changed received TCP packet to the TCP sequence number determination processing unit 15 as an ACK sequence number corrected packet.

つぎに、TCPシーケンス番号判定処理部15は、ACKシーケンス番号修正済みパケットが再送パケット(すでに受信した送信シーケンス番号の最大値よりも小さい送信シーケンス番号を持ったパケット),新規パケット(次に受信を期待する送信シーケンス番号を持ったパケット),後続パケット(新規パケットが欠落の後に送られるパケットで、次に受信を期待する送信シーケンス番号より大きい送信シーケンス番号を持ったパケット),以上パケットのいずれかであるかを判定する。図4は、TCPシーケンス番号判定処理部15の判定処理手順の一例を示すフローチャートである。   Next, the TCP sequence number determination processing unit 15 determines that the ACK sequence number corrected packet is a retransmission packet (a packet having a transmission sequence number smaller than the maximum value of the transmission sequence number already received), a new packet (next reception is received). Packet with expected transmission sequence number), subsequent packet (packet sent after missing new packet, packet with transmission sequence number higher than expected transmission sequence number), or above packet It is determined whether it is. FIG. 4 is a flowchart illustrating an example of the determination processing procedure of the TCP sequence number determination processing unit 15.

この判定は、ACKシーケンス番号修正済みパケットの送信シーケンス番号を次に受信を期待するパケットの送信シーケンス番号と比較することにより行う。このために、TCP受信シーケンス番号管理部16は、TCP受信シーケンス番号管理部16にTCP受信シーケンス番号情報を格納している。図5にTCP受信シーケンス番号情報の一例を示す。TCP受信シーケンス番号情報には、TCPセッション識別し(発アドレス,発ポート番号,着アドレス,着ポート番号)ごとに、順方向と逆方向について、それぞれ受信済み最大シーケンス番号と次に受信を期待するシーケンス番号(次受信期待シーケンス番号)が含まれている。TCP受信シーケンス番号情報は、4種類のパケットの判定後に、新規パケットであった場合に後述のように更新される。   This determination is performed by comparing the transmission sequence number of the packet whose ACK sequence number has been corrected with the transmission sequence number of the packet expected to be received next. For this purpose, the TCP reception sequence number management unit 16 stores TCP reception sequence number information in the TCP reception sequence number management unit 16. FIG. 5 shows an example of TCP reception sequence number information. In the TCP reception sequence number information, for each TCP session identification (source address, source port number, destination address, destination port number), the maximum received sequence number and the next reception are expected in the forward direction and the reverse direction, respectively. The sequence number (next reception expected sequence number) is included. If the TCP reception sequence number information is a new packet after the determination of the four types of packets, it is updated as described later.

TCPシーケンス番号判定処理部15は、ACKシーケンス番号修正済みパケットを受信する(ステップS11)と、ACKシーケンス番号修正済みパケットのTCPセッション識別子に対応するTCP受信シーケンス情報を取得し、ACKシーケンス番号修正済みパケットの送信シーケンス番号が、取得したTCP受信シーケンス情報の順方向または逆方向の受信済み最大送信シーケンス番号以下であるかを判定する(ステップS12)。なお、ここで、ACKシーケンス番号修正済みパケットが順方向であるときには、TCP受信シーケンス情報の順方向の受信済み最大送信シーケンス番号と比較し、逆方向であるときにはTCP受信シーケンス情報の逆方向の受信済み最大送信シーケンス番号と比較する。そして、ACKシーケンス番号修正済みパケットの方が小さい場合(ステップS12 YES)には、そのパケットは再送パケットであると判定する(ステップS18)。   When receiving the ACK sequence number corrected packet (step S11), the TCP sequence number determination processing unit 15 acquires TCP reception sequence information corresponding to the TCP session identifier of the ACK sequence number corrected packet, and the ACK sequence number has been corrected. It is determined whether the transmission sequence number of the packet is equal to or smaller than the received maximum transmission sequence number in the forward direction or the reverse direction of the acquired TCP reception sequence information (step S12). Here, when the ACK sequence number corrected packet is in the forward direction, it is compared with the received maximum transmission sequence number in the forward direction of the TCP reception sequence information, and when it is in the reverse direction, the reception of the TCP reception sequence information in the reverse direction is performed. Compared with the maximum transmitted sequence number. If the ACK sequence number corrected packet is smaller (YES in step S12), it is determined that the packet is a retransmission packet (step S18).

一方、ACKシーケンス番号修正済みパケットの送信シーケンス番号が取得したTCP受信シーケンス情報の順方向または逆方向の送信シーケンス番号より大きい場合(ステップS12 NO)には、TCPシーケンス番号判定処理部15は、さらに、ACKシーケンス番号修正済みパケットの送信シーケンス番号を、取得したTCP受信シーケンス情報の順方向または逆方向の次受信期待シーケンス番号より大きいか否かを判定する(ステップS13)。   On the other hand, when the transmission sequence number of the packet with the corrected ACK sequence number is larger than the transmission sequence number in the forward direction or the reverse direction of the acquired TCP reception sequence information (NO in step S12), the TCP sequence number determination processing unit 15 further Then, it is determined whether or not the transmission sequence number of the packet whose ACK sequence number has been corrected is larger than the next reception expected sequence number in the forward direction or the reverse direction of the acquired TCP reception sequence information (step S13).

ACKシーケンス番号修正済みパケットの送信シーケンス番号が取得したTCP受信シーケンス情報の順方向または逆方向の次受信期待シーケンス番号より大きいと判定した場合(ステップS13 YES)には、そのパケットを後続パケットと判定する(ステップS19)。   If it is determined that the transmission sequence number of the ACK sequence number corrected packet is greater than the next reception expected sequence number in the forward or reverse direction of the acquired TCP reception sequence information (YES in step S13), the packet is determined as a subsequent packet. (Step S19).

ACKシーケンス番号修正済みパケットの送信シーケンス番号が取得したTCP受信シーケンス情報の順方向または逆方向の次受信期待シーケンス番号以下であると判定した場合(ステップS13 NO)には、TCPシーケンス番号判定処理部15は、さらに、ACKシーケンス番号修正済みパケットの送信シーケンス番号が次受信期待シーケンス番号より小さいか否かを判定する(ステップS14)。ACKシーケンス番号修正済みパケットの送信シーケンス番号が次受信期待シーケンス番号より小さいと判定した場合(ステップS14 Yes)は、そのパケットを異常パケットと判定する。   When it is determined that the transmission sequence number of the ACK sequence number modified packet is equal to or less than the next reception expected sequence number in the forward or reverse direction of the acquired TCP reception sequence information (NO in step S13), the TCP sequence number determination processing unit 15 further determines whether or not the transmission sequence number of the packet with the corrected ACK sequence number is smaller than the next expected reception sequence number (step S14). If it is determined that the transmission sequence number of the packet with the ACK sequence number corrected is smaller than the expected next reception sequence number (Yes in step S14), the packet is determined to be an abnormal packet.

ACKシーケンス番号修正済みパケットの送信シーケンス番号が次受信期待シーケンス番号より小さくない(ACKシーケンス番号修正済みパケットの送信シーケンス番号が次受信期待シーケンス番号と等しい)と判定した場合(ステップS14 NO)は、TCPシーケンス番号判定処理部15はTCPシーケンス番号情報を更新する。具体的には、TCPシーケンス番号情報の順方向または逆方向の受信済み最大送信シーケンス番号を、そのACKシーケンス番号修正済みパケットの送信シーケンス番号に更新し(ステップS15)、次受信期待シーケンス番号を、「ACKシーケンス番号修正済みパケットの送信シーケンス番号+ACKシーケンス番号修正済みパケットのTCPデータ長」に更新する。そして、TCPシーケンス番号判定処理部16は、そのパケットを新規パケットと判定する(ステップS17)。   When it is determined that the transmission sequence number of the ACK sequence number modified packet is not smaller than the next reception expected sequence number (the transmission sequence number of the ACK sequence number modified packet is equal to the next reception expected sequence number) (NO in step S14), The TCP sequence number determination processing unit 15 updates the TCP sequence number information. Specifically, the received maximum transmission sequence number in the forward or reverse direction of the TCP sequence number information is updated to the transmission sequence number of the packet whose ACK sequence number has been corrected (step S15), and the next reception expected sequence number is Update to “transmission sequence number of ACK sequence number corrected packet + TCP data length of ACK sequence number corrected packet”. Then, the TCP sequence number determination processing unit 16 determines that the packet is a new packet (step S17).

そして、TCPシーケンス番号判定処理部16は、以上のパケット種類の判定処理の後に、新規パケットと判定した場合には新規パケット受信処理部17へACKシーケンス番号修正済みパケットを送信する。また、TCPシーケンス番号判定処理部16は、後続パケットと判定した場合には後続パケット受信処理部18へ、再送パケットと判定した場合には再送パケット受信処理部20へ、それぞれACKシーケンス番号修正済みパケットを送信する。異常パケットと判定した場合には、そのパケットを破棄する、あるいはALGでは処理不能としてTCPセッションを切断するなどの異常処理を行う。   When the TCP sequence number determination processing unit 16 determines that the packet is a new packet after the above packet type determination processing, the TCP sequence number determination processing unit 16 transmits the ACK sequence number corrected packet to the new packet reception processing unit 17. Further, the TCP sequence number determination processing unit 16 sends the ACK sequence number corrected packet to the subsequent packet reception processing unit 18 when it is determined as a subsequent packet, and to the retransmission packet reception processing unit 20 when it is determined as a retransmission packet. Send. If it is determined that the packet is abnormal, abnormal processing such as discarding the packet or disconnecting the TCP session because ALG cannot process the packet is performed.

つぎに、新規パケットと判定されたACKシーケンス番号修正済みパケット(以下、新規パケットという)の処理について説明する。新規パケット受信処理部18は、新規パケットの送信シーケンス番号,TCPデータ部,TCPデータ長を、プロトコル固有の個別ALG処理部1に新規TCPデータとして送信する。また、新規パケットをTCPデータ編集処理部22に送信する。   Next, processing of an ACK sequence number corrected packet determined as a new packet (hereinafter referred to as a new packet) will be described. The new packet reception processing unit 18 transmits the transmission sequence number, TCP data part, and TCP data length of the new packet as new TCP data to the protocol-specific individual ALG processing unit 1. Also, the new packet is transmitted to the TCP data editing processing unit 22.

個別ALG処理部1の構成は、実装に依存するが、一般的には、図1で説明したような構成となる。まず、個別ALG処理部1のメッセージ解析処理部11は、連続したバイト列のストリームとして送信されたTCPデータを、そのデータに対応するALG対象プロトコルの固有のメッセージ単位に区切り、また区切ったメッセージの内容を解析する。個別ALG処理部1は、この解析結果をALG状態遷移処理部12とTCPデータ編集情報生成処理部14に出力する。   The configuration of the individual ALG processing unit 1 depends on the implementation, but generally has the configuration described with reference to FIG. First, the message analysis processing unit 11 of the individual ALG processing unit 1 delimits the TCP data transmitted as a continuous stream of byte strings into unique message units of the ALG target protocol corresponding to the data, and Analyze the contents. The individual ALG processing unit 1 outputs the analysis result to the ALG state transition processing unit 12 and the TCP data editing information generation processing unit 14.

ALG対象プロトコルは、発着端末間で管理される複数の状態を持つことがある。ALG状態遷移処理部12は、ALG情報管理部13に現在の状態を示すALG状態情報を格納しており、メッセージ解析処理部11の解析結果に基づいて状態遷移を行う必要が生じた場合に、ALG状態情報を書き換えるとともにALG状態情報をTCPデータ編集情報生成処理部14に通知する。   The ALG target protocol may have multiple states managed between the arrival and departure terminals. The ALG state transition processing unit 12 stores ALG state information indicating the current state in the ALG information management unit 13, and when it is necessary to perform state transition based on the analysis result of the message analysis processing unit 11, The ALG state information is rewritten and the ALG state information is notified to the TCP data editing information generation processing unit 14.

TCPデータ編集情報生成処理部14は、メッセージ解析処理部11の解析結果とALG状態情報に基づいて新規パケットのTCPデータをどのように変更するかを決定し、TCPデータ編集処理部22にTCPデータ編集情報として通知する。図6は、TCPデータ編集情報の一例を示す図である。図6に示すように、TCPデータ編集情報は、TCPセッション識別子,方向(順方向または逆方向),送信シーケンス番号,TCPデータ長,変更位置オフセット,変更データ長(変更対象部分のデータ長),更新データ,更新データ長を含み、ALGの種類に依存しない形式で表現されている。変更位置オフセットは、対応する送信シーケンス番号のデータの先頭位置から、変更するデータの先頭位置までのオフセット量を示している。   The TCP data editing information generation processing unit 14 determines how to change the TCP data of the new packet based on the analysis result of the message analysis processing unit 11 and the ALG state information, and sends the TCP data editing processing unit 22 the TCP data. Notify as editing information. FIG. 6 is a diagram illustrating an example of TCP data editing information. As shown in FIG. 6, the TCP data editing information includes a TCP session identifier, a direction (forward direction or reverse direction), a transmission sequence number, a TCP data length, a change position offset, a change data length (data length of a change target part), It includes update data and update data length, and is expressed in a format independent of the type of ALG. The change position offset indicates an offset amount from the start position of the data of the corresponding transmission sequence number to the start position of the data to be changed.

また、TCPデータ編集情報は、変更箇所ごとに1組生成される。たとえば、ある新規パケットのTCPデータの”address=192.168.0.1,port=8000”を”address=133.9.3.1,port=10000”に変更する場合を仮定する。addressの位置のオフセットを8,portの位置のオフセットを25とすると、TCPデータ編集情報は「変更位置オフセット=8,変更データ長=11,更新データ=”133.9.3.1”,更新データ長=9」と「変更位置オフセット=25,変更データ長=4,更新データ=”10000”,更新データ長=5」の2組となる。   Further, one set of TCP data editing information is generated for each changed portion. For example, it is assumed that “address = 192.168.0.1, port = 8000” of TCP data of a new packet is changed to “address = 133.9.3.1, port = 10000”. Assuming that the address position offset is 8 and the port position offset is 25, the TCP data editing information is “change position offset = 8, change data length = 11, update data =“ 133.9.3.1 ”, update data length = 9. And “change position offset = 25, change data length = 4, update data =“ 10000 ”, update data length = 5”.

TCPデータ編集処理部22は、通知されたTCPデータ編集情報を図6に示すような形式でTCPデータ編集情報管理部23に格納する。TCPデータ編集処理部22は、セッション識別子をキーとして、新規パケット受信処理部17から受け取った新規パケットに対応する情報をTCPデータ編集情報のなかから検索する。セッション識別子の一致する情報が得られた場合には、TCPデータ編集処理部22は、その情報に基づいて新規パケットを編集する。   The TCP data editing processing unit 22 stores the notified TCP data editing information in the TCP data editing information management unit 23 in a format as shown in FIG. The TCP data editing processing unit 22 searches the TCP data editing information for information corresponding to the new packet received from the new packet reception processing unit 17 using the session identifier as a key. When the information with the matching session identifier is obtained, the TCP data editing processing unit 22 edits the new packet based on the information.

このときの編集の方法について図7を用いて説明する。図7は、編集方法を説明するための図である。その新規パケットに対応する1組目のTCPデータ編集情報に対応する変更オフセット,変更データ長,変更箇所をそれぞれ変更オフセット#1,変更データ長#1,変更箇所#1とする。また、同様に2組目、3組目のTCPデータ編集情報に対応する変更オフセット,変更データ長,変更箇所にそれぞれ#2,#3の番号を付すこととする。ここで、これらのTCPデータ編集情報は変更位置オフセットが小さい順に#1,#2,…としている。TCPデータ編集情報を格納する時点でこのように変更位置オフセットの小さい順に並べるようにしておいてもよいし、検索後に読み出したTCPデータ編集情報を変更位置オフセットの小さい順に並び替えるようにしてもよい。また、図7の矢印の上の段に編集前の新規パケットを示し、矢印の下の段に編集後のパケットを示している。   The editing method at this time will be described with reference to FIG. FIG. 7 is a diagram for explaining the editing method. The change offset, change data length, and change location corresponding to the first set of TCP data editing information corresponding to the new packet are assumed to be change offset # 1, change data length # 1, and change location # 1, respectively. Similarly, the numbers # 2 and # 3 are assigned to the change offset, the change data length, and the change location corresponding to the second and third sets of TCP data editing information, respectively. Here, these TCP data editing information is set to # 1, # 2,... In ascending order of change position offset. At the time of storing the TCP data editing information, the TCP data editing information may be arranged in ascending order of the change position offset in this way, or the TCP data editing information read after the search may be arranged in ascending order of the changing position offset. . Further, the new packet before editing is shown in the upper part of the arrow in FIG. 7, and the edited packet is shown in the lower part of the arrow.

まず、編集前の新規パケットのうち、1組目の変更位置オフセットまでのデータは変更の必要がない。TCPデータ編集処理部22は、先頭位置から変更オフセット#1までの変更の無い部分のデータを保持する。つぎの変更のない部分は、“変更オフセット#1+変更データ長#1”の位置からつぎの変更の先頭(“変更オフセット#2”)までであり、この部分を保持する。このように、TCPデータ編集処理部22は、先頭または“変更オフセット+変更データ長#N(Nは自然数)”から“変更オフセット#(N+1)”まで切り出し箇所#Nとして保持する。そして、TCPデータ編集処理部22は、保持した切り出し箇所#1のつぎに更新箇所#1として1組目の更新データをコピーする。同様に、切り出し箇所と更新データを交互にコピーすることにより、図7の矢印の下の段のような編集後パケットを生成する。TCPデータ編集処理部22は、生成した編集後パケットを送信シーケンス番号変更処理部27に送信する。   First, it is not necessary to change the data up to the first set change position offset in the new packet before editing. The TCP data editing processing unit 22 holds the data of the part that is not changed from the head position to the change offset # 1. The part without the next change is from the position of “change offset # 1 + change data length # 1” to the beginning of the next change (“change offset # 2”), and this part is held. In this way, the TCP data editing processing unit 22 holds the cut portion #N from the top or “change offset + change data length #N (N is a natural number)” to “change offset # (N + 1)”. Then, the TCP data editing processing unit 22 copies the first set of update data as the update location # 1 next to the stored cut location # 1. Similarly, the post-edit packet as shown in the lower part of the arrow in FIG. 7 is generated by alternately copying the cutout portion and the update data. The TCP data editing processing unit 22 transmits the generated edited packet to the transmission sequence number change processing unit 27.

また、編集の結果、編集前の新規パケットと編集後パケットでTCPデータ長が異なる場合、編集したパケット以降のTCPパケットの送信シーケンス番号,ACKシーケンス番号を変更する必要がある。このため、TCPデータ編集処理部22は、TCPシーケンス番号変更処理部24のTCPシーケンス番号差分管理部26にシーケンス番号差分情報を登録する。登録するシーケンス番号差分情報は、変換前シーケンス番号については“受信TCPパケットのシーケンス番号+TCPデータ長”として算出し、変換後シーケンス番号については“受信TCPパケットのシーケンス番号+TCPデータ長+変更前後のTCPデータ長の差分”として算出する。このとき、すでに、同じ変換前シーケンス番号についてシーケンス番号差分情報が登録されている場合には、“それらの変換前シーケンス番号に対応する変換後シーケンス番号+変更前後のTCPデータ長の差分”として変換後シーケンス番号を更新する。   If the TCP data length is different between the new packet before editing and the edited packet as a result of editing, it is necessary to change the transmission sequence number and ACK sequence number of TCP packets after the edited packet. Therefore, the TCP data editing processing unit 22 registers the sequence number difference information in the TCP sequence number difference management unit 26 of the TCP sequence number change processing unit 24. The sequence number difference information to be registered is calculated as “sequence number of received TCP packet + TCP data length” for the sequence number before conversion, and “sequence number of received TCP packet + TCP data length + TCP before and after change” for the sequence number after conversion. Calculated as “data length difference”. At this time, if the sequence number difference information is already registered for the same sequence number before conversion, the conversion is performed as “the sequence number after conversion corresponding to those sequence numbers before conversion + the difference between the TCP data lengths before and after the change”. Update the sequence number later.

つぎに、送信シーケンス番号変更処理部27は、TCPシーケンス番号差分情報に基づいて、編集後パケットの送信シーケンス番号を変更する。具体的には、新規パケットの送信シーケンス番号と一致するTCPシーケンス番号差分情報の変換前シーケンス番号を検索し、一致するものがあった場合には、対応する変換後シーケンス番号に変更する。それ以前にTCPデータの編集が行われていない場合には、編集後パケットより後に到着するパケットについてはシーケンス番号を変更する必要があるが、編集後パケット自体については送信シーケンス番号を変更する必要はない。しかし、それ以前にTCPデータ長の変更が発生していた場合には、TCPシーケンス番号差分情報に基づいて変更することになる。   Next, the transmission sequence number change processing unit 27 changes the transmission sequence number of the edited packet based on the TCP sequence number difference information. Specifically, the pre-conversion sequence number of the TCP sequence number difference information that matches the transmission sequence number of the new packet is searched, and if there is a match, it is changed to the corresponding post-conversion sequence number. If the TCP data has not been edited before that, it is necessary to change the sequence number for packets that arrive after the edited packet, but it is necessary to change the transmission sequence number for the edited packet itself. Absent. However, if the TCP data length has changed before that, it is changed based on the TCP sequence number difference information.

たとえば図3の変換前パケット205は、送信シーケンス番号変更処理部27による処理の後に変換パケット215になるが、送信シーケンス番号は12000のままで変更されていない。その次の変換前パケット204と対応する変換後パケット214では、送信シーケンス番号が13000から13002に変更されている。このように新規パケット編集の処理を行った場合には、それ以降パケットに対して送信シーケンス番号を変更する必要がある。   For example, the pre-conversion packet 205 in FIG. 3 becomes the conversion packet 215 after the processing by the transmission sequence number change processing unit 27, but the transmission sequence number remains 12000 and has not been changed. In the post-conversion packet 214 corresponding to the next pre-conversion packet 204, the transmission sequence number is changed from 13000 to 13002. When new packet editing processing is performed in this way, it is necessary to change the transmission sequence number for the packets thereafter.

送信シーケンス番号変更処理部27は、送信シーケンス番号の変更を行った後に、チェックサムについてもその変更を反映して更新する。そして、送信シーケンス番号変更処理部27は、送信シーケンス番号が変更された新規パケットを送信側NAPT変換処理部30に送信する。送信側NAPT変換処理部30は、NAT/NAPT変換情報のなかから、そのパケットの発アドレス,発ポート番号、着アドレス,着ポート番号,プロトコルの一致するエントリを取得し、発アドレス,発ポート番号を該当するエントリの変換アドレス,変換ポート番号に変更する。また、発アドレス,発ポート番号の変更に対応してそのパケットのチェックサムも更新する。   After changing the transmission sequence number, the transmission sequence number change processing unit 27 also updates the checksum to reflect the change. Then, the transmission sequence number change processing unit 27 transmits the new packet with the changed transmission sequence number to the transmission side NAPT conversion processing unit 30. The transmission side NAPT conversion processing unit 30 obtains an entry in which the packet's source address, source port number, destination address, destination port number and protocol match from the NAT / NAPT conversion information, and the source address and source port number. Is changed to the translation address and translation port number of the corresponding entry. Also, the checksum of the packet is updated in response to the change of the source address and the source port number.

このように、発着アドレス・ポート番号変更と,送信・ACKシーケンス番号変更,TCPデータ編集を実行することで、たとえば図3の順方向の変換前パケット201〜207は変換後パケット211〜217に変換され、逆方向では変換後パケット231〜237が変換前パケット221〜227に逆変換される。   In this way, by executing the change of the arrival / departure address / port number, transmission / ACK sequence number, and TCP data editing, for example, the pre-conversion packets 201 to 207 in the forward direction in FIG. 3 are converted into the converted packets 211 to 217, for example. In the reverse direction, the converted packets 231 to 237 are reversely converted to the pre-conversion packets 221 to 227.

つづいて、後続パケットの処理について説明する。TCPシーケンス番号判定処理部15は、後続パケットと判定したパケット(以下後続パケットという)を後続パケット受信処理部18に送信する。後続パケット受信処理部18は、後続パケット管理部19に受信した後続パケットをシーケンス番号順に格納している。送信された後続パケットも、後続パケット管理部にシーケンス番号順に格納する。また、後続パケット受信処理部18は、後続パケットを、本発明の特徴である代理ACK生成処理部21に送信する。   Next, processing of subsequent packets will be described. The TCP sequence number determination processing unit 15 transmits a packet determined to be a subsequent packet (hereinafter referred to as a subsequent packet) to the subsequent packet reception processing unit 18. The subsequent packet reception processing unit 18 stores the subsequent packets received by the subsequent packet management unit 19 in the order of sequence numbers. The transmitted subsequent packets are also stored in the subsequent packet management unit in the order of sequence numbers. Further, the subsequent packet reception processing unit 18 transmits the subsequent packet to the proxy ACK generation processing unit 21 that is a feature of the present invention.

代理ACK生成処理部21は、後続パケットからIPヘッダとTCPヘッダをコピーし、そのIPヘッダとTCPヘッダを有しTCPデータ長を“0”とした代理ACKパケットを生成する。ただし代理ACKパケットの送信シーケンス番号は、TCP受信シーケンス番号管理部16に格納されているTCP受信シーケンス番号情報の次受信期待シーケンス番号とする。そして、代理ACK生成処理部21は、代理ACKパケットのチェックサムを計算しチェックサムを設定し、代理ACKパケットを送信シーケンス番号変更処理部27に送信する。なお、ここでは、代理ACKパケットの送信シーケンス番号を次受信期待シーケンス番号としたが、これに限らず、たとえば、次受信期待シーケンス番号以上の値など他の数値に設定するようにしてもよい。   The proxy ACK generation processing unit 21 copies the IP header and the TCP header from the subsequent packet, and generates a proxy ACK packet having the IP header and the TCP header and having a TCP data length of “0”. However, the transmission sequence number of the proxy ACK packet is the next reception expected sequence number of the TCP reception sequence number information stored in the TCP reception sequence number management unit 16. Then, the proxy ACK generation processing unit 21 calculates the checksum of the proxy ACK packet, sets the checksum, and transmits the proxy ACK packet to the transmission sequence number change processing unit 27. Here, the transmission sequence number of the proxy ACK packet is set to the next reception expected sequence number, but is not limited thereto, and may be set to another numerical value such as a value equal to or higher than the next reception expected sequence number.

送信シーケンス番号変更処理部27は、新規パケットの場合と同様に代理ACKパケット以前に受信したTCPパケットでTCPデータ長に変更が発生した場合は、代理ACKパケットについても送信シーケンス番号を変更する必要がある。したがって、送信シーケンス番号変更処理部27は、代理ACKパケットの送信シーケンス番号をキーに、一致する変換前シーケンス差分番号を持つシーケンス番号差分情報を取得し、取得した情報に基づき代理ACKパケットの送信シーケンス番号を対応する変換後シーケンス差分番号に変更する。また送信シーケンス番号変更に合わせてチェックサムも更新する。   Similarly to the case of a new packet, the transmission sequence number change processing unit 27 needs to change the transmission sequence number for a proxy ACK packet when the TCP data length is changed in a TCP packet received before the proxy ACK packet. is there. Therefore, the transmission sequence number change processing unit 27 acquires sequence number difference information having a matching pre-conversion sequence difference number with the transmission sequence number of the proxy ACK packet as a key, and transmits the transmission sequence of the proxy ACK packet based on the acquired information. Change the number to the corresponding converted sequence difference number. The checksum is also updated when the transmission sequence number is changed.

そして、送信シーケンス番号変更処理部27は、代理ACKパケットを送信側NAPT変換処理部30に送信する。送信側NAPT変換処理部30は、新規パケットに対する処理と同様にアドレス,ポート番号の変換処理を行い、代理ACKパケットのチェックサムも更新する。   Then, the transmission sequence number change processing unit 27 transmits the proxy ACK packet to the transmission side NAPT conversion processing unit 30. The transmission side NAPT conversion processing unit 30 performs address and port number conversion processing in the same manner as the processing for a new packet, and also updates the checksum of the proxy ACK packet.

このような代理ACKパケットが送信されると、相手端末では、この代理ACKパケットを受信する。相手端末では、シーケンス番号に矛盾のない代理ACKパケットを受信することにより、輻輳制御などを行わずにすみ、TCPスループットの低下を防ぐことができる。   When such a proxy ACK packet is transmitted, the partner terminal receives the proxy ACK packet. By receiving a proxy ACK packet with no contradiction in sequence numbers, the counterpart terminal can avoid congestion control and prevent a decrease in TCP throughput.

つぎに、後続パケットの後に、欠落パケットの再送が行われると、その再送された欠落パケットは再送パケットして処理され、それ以降、再び新規パケットの処理が開始される。このとき、本実施の形態では、再送された欠落パケットの後に送信される新規パケットの前に後続パケットの内容を持つパケットを再開パケットとして送信する。この再開パケットの処理について、つぎに説明する。   Next, when the lost packet is retransmitted after the subsequent packet, the retransmitted lost packet is processed as a retransmitted packet, and thereafter, the processing of a new packet is started again. At this time, in this embodiment, a packet having the contents of the subsequent packet is transmitted as a resume packet before the new packet transmitted after the retransmitted missing packet. Next, processing of the restart packet will be described.

新規パケット受信処理部17は、再送された欠落パケットを新規パケットとして受信すると、後続パケット管理部19に格納されている後続パケットを再開パケットとして取得する。再開パケットの処理手順は通常の新規パケットと同様であるが、ACKシーケンス番号だけは、通常と異なり再送された欠落パケットのACKシーケンス番号とする。それ以降の処理は、新規パケットと同様に、個別ALG処理部1の処理、TCPデータ編集処理部22の処理、送信シーケンス番号変更処理部27の処理、送信側NAPT変換処理部30の処理が行われる。   When the new packet reception processing unit 17 receives the retransmitted missing packet as a new packet, the new packet reception processing unit 17 acquires the subsequent packet stored in the subsequent packet management unit 19 as a resume packet. The processing procedure of the resume packet is the same as that of a normal new packet, but only the ACK sequence number is set as the ACK sequence number of the lost packet retransmitted unlike the normal case. Subsequent processing is performed by the processing of the individual ALG processing unit 1, the processing of the TCP data editing processing unit 22, the processing of the transmission sequence number change processing unit 27, and the processing of the transmission side NAPT conversion processing unit 30, as with the new packet. Is called.

図8は、後続パケットを含む場合のパケットの変換を説明するための図である。変換前パケット301〜307は通信端末から送信され通信装置で受信されたパケットを示し、変換後パケット311〜319は、変換前パケット301〜307が本実施の形態の通信装置により変換されたパケットを示している。また、変換後パケット331〜337は相手端末から送信されたパケットを示しており、変換前パケット321〜327は変換後パケット331〜337を通信装置に送信するためにTCPシーケンス番号変更処理部24がシーケンス番号の逆変換を行った後のパケットを示している。図8では、変換前パケット305が欠落し、その後に後続パケットとして変換前パケット304,303が送信され、変換前パケット302が欠落パケット305の再送パケットとして送信された例である。   FIG. 8 is a diagram for explaining packet conversion when a subsequent packet is included. The pre-conversion packets 301 to 307 are packets transmitted from the communication terminal and received by the communication device, and the post-conversion packets 311 to 319 are packets obtained by converting the pre-conversion packets 301 to 307 by the communication device of this embodiment. Show. The post-conversion packets 331 to 337 indicate the packets transmitted from the counterpart terminal. The pre-conversion packets 321 to 327 are transmitted by the TCP sequence number change processing unit 24 in order to transmit the post-conversion packets 331 to 337 to the communication device. A packet after reverse conversion of the sequence number is shown. FIG. 8 shows an example in which the pre-conversion packet 305 is lost, the pre-conversion packets 304 and 303 are transmitted as subsequent packets, and the pre-conversion packet 302 is transmitted as a retransmission packet of the missing packet 305.

図8に示すように、後続パケットである変換前パケット303,304は、代理ACKパケットに変換され変換後パケット315,316として送信される。そして、再送パケットである変換前パケット302は新規パケットとして処理され、変換後パケット314として送信される。変換後パケット314の後に、図8では変換前の後続パケット304,305に対応する、変換後の再開パケット312,313が送信されている。   As shown in FIG. 8, the pre-conversion packets 303 and 304, which are subsequent packets, are converted into proxy ACK packets and transmitted as post-conversion packets 315 and 316. Then, the pre-conversion packet 302 that is a retransmission packet is processed as a new packet and transmitted as a post-conversion packet 314. After the converted packet 314, the restart packets 312 and 313 after conversion corresponding to the subsequent packets 304 and 305 before conversion are transmitted in FIG.

つづいて、再送パケットの処理について説明する。TCPシーケンス番号判定処理部15は、再送パケットと判定したパケット(以下再送パケットという)を再送パケット受信処理部20に送信する。再送パケット受信処理部20は、再送パケットをTCPデータ編集処理部22に送信する。   Next, the retransmission packet process will be described. The TCP sequence number determination processing unit 15 transmits a packet determined as a retransmission packet (hereinafter referred to as a retransmission packet) to the retransmission packet reception processing unit 20. The retransmission packet reception processing unit 20 transmits the retransmission packet to the TCP data editing processing unit 22.

TCPデータ編集処理部22は、TCPデータ編集情報管理部23に格納されているTCPデータ編集情報を再送パケットの送信シーケンス番号をキーとして検索し、一致した検索TCP編集情報に従って、新規TCPパケットと同様にTCPデータ部を編集する。なお、再送パケットに対しては、編集の結果全体としてTCPデータ長に変更が発生しても、シーケンス番号差分情報は登録しない。そして、TCPデータ編集処理部22は、編集後の再送パケットを送信シーケンス番号変更処理部27に送信する。   The TCP data editing processing unit 22 searches the TCP data editing information stored in the TCP data editing information management unit 23 using the transmission sequence number of the retransmission packet as a key, and is similar to a new TCP packet according to the matched search TCP editing information. Edit the TCP data part. For retransmission packets, sequence number difference information is not registered even if the TCP data length changes as a result of editing. Then, the TCP data editing processing unit 22 transmits the edited retransmission packet to the transmission sequence number change processing unit 27.

その再送パケットの受信以前のTCPパケットでTCPデータ長に変更が発生していた場合は、再送パケットの送信シーケンス番号も変更する必要がある。このため、送信シーケンス番号変更処理部27は、再送パケットの送信シーケンス番号をキーに、TCPシーケンス番号差分情報のなかかから一致する変換前シーケンス番号を検索し、再送パケットの送信シーケンス番号を検索した変換前シーケンス番号に対応する変換後シーケンス番号に変更する。また同時にチェックサムも更新する。   If the TCP data length has changed in the TCP packet before receiving the retransmission packet, it is necessary to change the transmission sequence number of the retransmission packet. For this reason, the transmission sequence number change processing unit 27 searches the TCP sequence number difference information for a matching pre-conversion sequence number using the retransmission packet transmission sequence number as a key, and searches for the retransmission packet transmission sequence number. Change to the post-conversion sequence number corresponding to the pre-conversion sequence number. At the same time, the checksum is updated.

そして、送信シーケンス番号変更処理部27は、再送パケットを送信側NAPT変換処理部に送信し、送信側NAPT変換処理部で他のパケットと同様にアドレス,ポート番号の変換処理が行われる。また、変更に合わせて再送パケットのIPヘッダ、TCPヘッダのチェックサムも更新する。   Then, the transmission sequence number change processing unit 27 transmits the retransmission packet to the transmission side NAPT conversion processing unit, and the transmission side NAPT conversion processing unit performs the address and port number conversion processing in the same manner as other packets. In addition, the checksum of the IP header and TCP header of the retransmission packet is updated in accordance with the change.

図9は、再送パケットの変換前後の様子を示す図である。パケット401〜407は通信端末から送信され通信装置で受信されたパケットを示し、変換後パケット411〜417は、変換前パケット401〜407が本実施の形態の通信装置により変換されたパケットを示している。また、変換後パケット431〜437は相手端末から送信されたパケットを示しており、変換前パケット421〜427はパケット431〜437を通信装置に送信するためにTCPシーケンス番号変更処理部24がシーケンス番号の逆変換を行った後のパケットを示している。なお、ここでは再送パケットについて説明をするための図であるため、再開パケットについては省略している。変換前パケット405の再送パケットが変換前パケット402であるとき、変換前パケット402は変換後パケット412に変換されて送信される。   FIG. 9 is a diagram illustrating a state before and after conversion of a retransmission packet. Packets 401 to 407 indicate packets transmitted from the communication terminal and received by the communication apparatus, and post-conversion packets 411 to 417 indicate packets obtained by converting the pre-conversion packets 401 to 407 by the communication apparatus according to the present embodiment. Yes. In addition, the post-conversion packets 431 to 437 indicate packets transmitted from the counterpart terminal, and the pre-conversion packets 421 to 427 are transmitted by the TCP sequence number change processing unit 24 in order to transmit the packets 431 to 437 to the communication device. The packet after performing the inverse transformation of is shown. In addition, since it is a figure for demonstrating a retransmission packet here, it abbreviate | omits about the restart packet. When the retransmission packet of the pre-conversion packet 405 is the pre-conversion packet 402, the pre-conversion packet 402 is converted into a post-conversion packet 412 and transmitted.

なお、本実施の形態では、ALG処理とNAPTの処理を組み合わせるようにしたが、NATの処理と組み合わせるようにしてもよく、さらに、Ipv4−Ipv6トランスレータ処理と組み合わせるようにしてもよい。   In this embodiment, the ALG process and the NAPT process are combined. However, the ALG process and the NAPT process may be combined, or may be combined with the NAT process, and may be combined with the Ipv4-Ipv6 translator process.

また本実施の形態では、チェックサム再計算の負荷を軽減するためチェックサムの再計算を行わず、ALGによるTCPパケットの編集が発生する毎に、編集差分に合わせてIPヘッダ、TCPヘッダのチェックサムを調整するようにしたが、チェックサムの調整を行わず最後にまとめてチェックサムを再計算して付与するようにしても良い。   In this embodiment, the checksum is not recalculated in order to reduce the checksum recalculation load. Every time the TCP packet is edited by ALG, the IP header and the TCP header are checked according to the edit difference. The sum is adjusted, but the checksum may not be adjusted, and the checksum may be recalculated and added at the end.

このように、本実施の形態では、欠落パケットが生じた後、後続パケットを受信した場合に欠落パケットが再送されるまで相手端末に全くパケットを送信しないのではなく、欠落パケットの送信シーケンス番号を有しTCPデータ長=“0”の代理ACKパケットを相手端末に送信するようにしていた。このため、相手端末が再送タイムアウトを検出してTCP送信可能レートを低下させるのを防止することができる。   As described above, in this embodiment, after a lost packet occurs, when a subsequent packet is received, the packet is not transmitted to the partner terminal until the lost packet is retransmitted. The proxy ACK packet with TCP data length = “0” is transmitted to the partner terminal. For this reason, it is possible to prevent the counterpart terminal from detecting a retransmission timeout and lowering the TCP transmittable rate.

また、代理ACKパケットの送信シーケンス番号は、それ以前に受信した最大の送信シーケンス番号を持つ新規パケットの送信シーケンス番号とTCPデータ長から欠落パケットの送信シーケンス番号を算出して代理ACKパケットに付与するようにした。このため、欠落パケット自体が再送されるのを待たずに相手端末に欠落パケットの送信シーケンス番号を通知することができる。   Also, the transmission sequence number of the proxy ACK packet is calculated by adding the transmission sequence number of the missing packet from the transmission sequence number of the new packet having the largest transmission sequence number received before that and the TCP data length and assigning it to the proxy ACK packet. I did it. Therefore, the transmission sequence number of the missing packet can be notified to the partner terminal without waiting for the missing packet itself to be retransmitted.

また、再送された欠落パケットを受信する前に、さらに後続パケットを受信した場合、後続パケットの受信に応じてさらに代理ACKパケットを送信するようにした。このため、再送される欠落パケットを長時間受信できない場合でも、相手端末が再送タイムアウトを検出しない。したがって、再送タイムアウトを検出することによって生じるTCP送信可能レートの低下を防止することができる。   Further, when a subsequent packet is further received before receiving the retransmitted missing packet, a proxy ACK packet is further transmitted in response to the reception of the subsequent packet. For this reason, even when a lost packet to be retransmitted cannot be received for a long time, the counterpart terminal does not detect a retransmission timeout. Therefore, it is possible to prevent a decrease in the TCP transmittable rate caused by detecting a retransmission timeout.

また、再送された欠落パケットを受信する前に、後続パケットをさらに受信した場合、送信する代理ACKパケットのACKシーケンス番号は受信する後続パケットのACKシーケンス番号に応じて増加させるようにし、同一ACKシーケンス番号を持つ代理ACKパケットを送信しないようにした。このため、相手端末で複製ACK(同一ACKシーケンス番号のパケット)受信することがなく、複製ACKを検出することにより相手端末がTCP送信可能レートを低下させるのを防止することができる。   In addition, when a subsequent packet is further received before receiving the retransmitted missing packet, the ACK sequence number of the proxy ACK packet to be transmitted is increased according to the ACK sequence number of the subsequent packet to be received, and the same ACK sequence The proxy ACK packet with the number was not sent. For this reason, it is possible to prevent the counterpart terminal from decreasing the TCP transmittable rate by detecting the duplicate ACK without receiving the duplicate ACK (packet of the same ACK sequence number) at the counterpart terminal.

また、後続パケットを受信した時は、後続パケットを内部に保持し、端末から再送された欠落パケットを受信後、内部に保持していた後続パケットを再開パケットとして送信するようにした。このため、通信端末が後続パケットを再送するのを待たずにALG処理を再開することができる。   Also, when the subsequent packet is received, the subsequent packet is held inside, and after receiving the lost packet retransmitted from the terminal, the subsequent packet held inside is transmitted as a resume packet. For this reason, ALG processing can be resumed without waiting for the communication terminal to retransmit the subsequent packet.

実施の形態2.
図10は、本発明にかかる通信装置の実施の形態2の機能構成例を示す図である。図10に示すように、本実施の形態の通信装置は、実施の形態1の通信装置の個別ALG処理部1をRTSP−ALG処理部34に替え、後続パケット受信処理部18を後続パケット受信処理部18aに替え、ALG共通処理部2をALG共通処理部2aに替える以外は、実施の形態1の通信装置と同様である。実施の形態1と同様の機能を有する構成要素は同一の符号を付して説明を省略する。
Embodiment 2. FIG.
FIG. 10 is a diagram illustrating an example of a functional configuration of the communication apparatus according to the second embodiment of the present invention. As shown in FIG. 10, the communication apparatus according to the present embodiment replaces the individual ALG processing unit 1 of the communication apparatus according to the first embodiment with an RTSP-ALG processing unit 34, and causes the subsequent packet reception processing unit 18 to perform subsequent packet reception processing. The communication device of the first embodiment is the same as that of the first embodiment except that the ALG common processing unit 2 is replaced with the ALG common processing unit 2a instead of the unit 18a. Components having the same functions as those in the first embodiment are denoted by the same reference numerals, and description thereof is omitted.

本実施の形態のRTSP−ALG処理部34は、個別ALG処理部1の一種と考えることができる。本実施の形態のRTSP−ALG処理部は、RTSPメッセージ解析処理部35と、RTSP状態遷移処理部36と、TCPデータ編集情報生成処理部38で構成される。RTSP状態遷移処理部23は、状態管理部37を備えている。RTSPメッセージ解析処理部35,RTSP−ALG処理部,TCPデータ編集情報生成処理部38は、それぞれ実施の形態1のメッセージ解析処理部11,ALG状態遷移処理部12,TCPデータ編集情報生成処理部14と同様の機能を有する。   The RTSP-ALG processing unit 34 according to the present embodiment can be considered as a kind of the individual ALG processing unit 1. The RTSP-ALG processing unit of the present embodiment includes an RTSP message analysis processing unit 35, an RTSP state transition processing unit 36, and a TCP data editing information generation processing unit 38. The RTSP state transition processing unit 23 includes a state management unit 37. The RTSP message analysis processing unit 35, the RTSP-ALG processing unit, and the TCP data editing information generation processing unit 38 are respectively the message analysis processing unit 11, the ALG state transition processing unit 12, and the TCP data editing information generation processing unit 14 of the first embodiment. Has the same function.

実施の形態1では、欠落パケットを編集することができる一般的なALG処理を想定したものであるが、本実施の形態ではALG処理で欠落パケットを編集する可能性が無い場合(ALG処理によって変更される項目は決まっているため、たとえば、変更される項目を含まないパケットとわかる場合には編集する可能性が無い)に後続パケットをそのまま送信するようにしている。   In the first embodiment, a general ALG process capable of editing a missing packet is assumed. However, in this embodiment, there is no possibility of editing a missing packet in the ALG process (changed by the ALG process). Since the item to be processed is determined, for example, if it is known that the packet does not include the item to be changed, there is no possibility of editing), and the subsequent packet is transmitted as it is.

ALG対象のプロトコルまたはALGの状態によっては、一定の条件で欠落したTCPパケットのシーケンス番号から、そのTCPパケットのデータが編集される可能性が無い(データの編集可能性が無い)か否かが判定可能な場合がある。たとえば、ALGで使用されるプロトコルでは、可変長のALGメッセージをALG種別,ALGメッセージ長,ALG値で示すTLV(Type Length Value)フォーマットで記載することにより、各ALGメッセージの境界を示すプロトコルが多く存在する。このようなTLVフォーマットを使用するプロトコルでは、ALGメッセージ種別によりALG処理で編集を行う必要があるかを区別できるため、編集可能性を判定することができる。   Depending on the ALG target protocol or ALG status, whether or not there is a possibility that the data of the TCP packet will not be edited from the sequence number of the TCP packet that is missing under certain conditions (there is no possibility of editing the data). Judgment may be possible. For example, in the protocol used in ALG, there are many protocols that indicate the boundary of each ALG message by describing the variable length ALG message in the TLV (Type Length Value) format that indicates the ALG type, ALG message length, and ALG value. Exists. In such a protocol that uses the TLV format, it is possible to determine whether editing is required in the ALG processing based on the ALG message type, and thus the editability can be determined.

さらに、ALGメッセージ境界まで中身を解釈せずに読み飛ばすことができる場合がある。またRTSP−ALGでは、メッセージ境界を“\r\n\r\n”で示すので一般にはあてはまらないが、例えばRTSPヘッダ部にContent-Length長が示され、欠落したTCPパケットのシーケンス番号から、欠落したTCPパケットのデータがRTSP−ALGで編集を行う必要がないContent-Data部のみを含むと確実に判定できる場合、編集可能性なしと判定することができる。   Furthermore, it may be possible to skip to the ALG message boundary without interpreting the contents. In RTSP-ALG, the message boundary is indicated by “\ r \ n \ r \ n”, which is not generally applicable. For example, the Content-Length length is indicated in the RTSP header part, and from the sequence number of the missing TCP packet, When it is possible to reliably determine that the data of the missing TCP packet includes only the Content-Data portion that does not need to be edited by RTSP-ALG, it can be determined that there is no editability.

また同様にRTSP−ALGでも、IL配信データ(LLデータ)を含む場合、通常のALG処理で、IL配信データについては中身を解釈せずに読み飛ばすことができる。すなわちALG処理が読み飛ばすことができる部分については編集を行うことはないので、欠落パケットがIL配信データである場合には、TCPデータ編集の可能性は無いと判定できる。   Similarly, in RTSP-ALG, when IL distribution data (LL data) is included, the IL distribution data can be skipped without interpreting the contents by normal ALG processing. That is, since the portion that can be skipped by the ALG process is not edited, it can be determined that there is no possibility of TCP data editing when the missing packet is IL distribution data.

図11は、ILデータを含むTCPパケットの一例を示す図である。図11で、TCPパケット501〜506は、IL配信データを含むTCPパケットを示し、データ511〜516は、TCPパケットのデータ部分を示している。たとえば、TCPパケット502が欠落した場合、TCPパケット502はILデータのパケットであるため、TCPデータ編集の可能性は無いと判定することができる。   FIG. 11 is a diagram illustrating an example of a TCP packet including IL data. In FIG. 11, TCP packets 501 to 506 indicate TCP packets including IL distribution data, and data 511 to 516 indicate data portions of the TCP packets. For example, if the TCP packet 502 is missing, it can be determined that there is no possibility of TCP data editing because the TCP packet 502 is an IL data packet.

このように一般的に先頭部分に次のALGメッセージ境界へのメッセージ長が示される場合、ALG処理部は欠落したTCPパケットについて編集可能性を比較的容易に判定することができる場合がある。   As described above, when the message length to the next ALG message boundary is generally indicated at the head part, the ALG processing unit may be able to determine the editability of the missing TCP packet relatively easily.

つづいて、本実施の形態の動作について説明する。受信TCPパケットがTCPシーケンス番号判定処理部15に送信されるまでの処理は実施の形態1と同様である。TCPシーケンス番号判定処理部15が後続パケットと判定したパケットを後続パケット受信処理部18aに送信する。後続パケット受信処理部18aは、次受信期待送信シーケンス番号と、後続パケットの送信シーケンス番号と一緒に、RTSP状態遷移処理部36に欠落パケットのTCPデータの編集可能性の問い合わせを行う。   Next, the operation of the present embodiment will be described. Processing until the received TCP packet is transmitted to the TCP sequence number determination processing unit 15 is the same as in the first embodiment. The TCP sequence number determination processing unit 15 transmits the packet determined as the subsequent packet to the subsequent packet reception processing unit 18a. The subsequent packet reception processing unit 18a inquires the RTSP state transition processing unit 36 about the editability of the TCP data of the missing packet together with the next reception expected transmission sequence number and the transmission sequence number of the subsequent packet.

RTSP−ALGでは、ALG処理で編集する必要がある部分は、SETUPメッセージ中のアドレスまたはポート番号記述部分と、SETUPメッセージに対する“200 OK”応答メッセージ中のアドレスまたはポート番号記述部分だけである。このため、RTSP状態遷移処理部36はALG処理の状態を追跡し、クライアントからサーバ方向にSETUPメッセージが送信されサーバからの応答待ちの状態でなければ、サーバからクライアント方向については、TCPデータの編集可能性は無いと判定できる。   In RTSP-ALG, only the address or port number description part in the SETUP message and the address or port number description part in the “200 OK” response message to the SETUP message are necessary to be edited in the ALG process. Therefore, the RTSP state transition processing unit 36 tracks the state of the ALG process, and if the SETUP message is transmitted from the client to the server and is not waiting for a response from the server, the TCP data editing for the server to the client is performed. It can be determined that there is no possibility.

つぎに、後続パケット受信処理部18aは、RTSP状態遷移処理部36からTCPデータの編集可能性は無いという応答を受けた場合、TCPシーケンス番号差分管理部26にシーケンス番号差分情報を登録する。このとき登録する差分情報は、変換前シーケンスについては、受信したTCPシーケンス番号とし、変換後シーケンス番号については、受信した“TCPシーケンス番号+一つ前のシーケンス番号との差分値”、とする。   Next, when the subsequent packet reception processing unit 18 a receives a response from the RTSP state transition processing unit 36 that there is no possibility of editing the TCP data, it registers the sequence number difference information in the TCP sequence number difference management unit 26. The difference information to be registered at this time is the received TCP sequence number for the pre-conversion sequence, and the received “TCP sequence number + the difference value from the previous sequence number” for the post-conversion sequence number.

つぎに、後続パケット受信処理部18aは、送信シーケンス番号変更処理部27に後続パケットを送信する。送信シーケンス番号変更処理部27,送信側NAPT変換処理部30の処理は、実施の形態1の新規パケットに関する処理と同様である。   Next, the subsequent packet reception processing unit 18 a transmits the subsequent packet to the transmission sequence number change processing unit 27. The processing of the transmission sequence number change processing unit 27 and the transmission side NAPT conversion processing unit 30 is the same as the processing related to the new packet in the first embodiment.

図12は、編集可能性の無いパケットが欠落した場合のパケットの変換前後の様子を示す図である。図12では、変換前パケット601〜607は通信端末から送信され通信装置で受信されたパケットを示し、変換後パケット611〜617は、変換前パケット601〜607が本実施の形態の通信装置により変換されたパケットを示している。また、変換後パケット631〜637は相手端末から送信されたパケットを示しており、変換前パケット621〜627は変換後パケット631〜637を通信装置に送信するためにTCPシーケンス番号変更処理部24がシーケンス番号の逆変換を行った後のパケットを示している。   FIG. 12 is a diagram illustrating a state before and after conversion of a packet when a packet having no editability is lost. In FIG. 12, pre-conversion packets 601 to 607 indicate packets transmitted from the communication terminal and received by the communication device, and post-conversion packets 611 to 617 are converted from the pre-conversion packets 601 to 607 by the communication device of the present embodiment. Shows the received packet. In addition, post-conversion packets 631 to 637 indicate packets transmitted from the counterpart terminal, and before-conversion packets 621 to 627 are transmitted by the TCP sequence number change processing unit 24 in order to transmit the post-conversion packets 631 to 637 to the communication device. A packet after reverse conversion of the sequence number is shown.

図12の例では、変換後パケット634が欠落した場合を示しており、欠落パケットの後の後続パケットである変換後パケット635が、変換前パケット624としてシーケンス番号の逆変換の後に送信されている。   The example of FIG. 12 shows a case where the post-conversion packet 634 is lost, and a post-conversion packet 635 that is a subsequent packet after the missing packet is transmitted as a pre-conversion packet 624 after reverse conversion of the sequence number. .

なお、本実施の形態では、個別ALG処理部としてATSP−ALG処理部を備える場合について説明したが、パケットの編集可能性を判定できる個別ALG処理部であればこれに限らず、他のALG処理部を用いてもよい。   In this embodiment, the case where the ATSP-ALG processing unit is provided as the individual ALG processing unit has been described. However, the present invention is not limited to this, and any other ALG processing can be used as long as the individual ALG processing unit can determine the editability of the packet. May be used.

このように、本実施の形態では、後続パケット受信処理部18aが、欠落パケットの後に後続パケットを受信した場合、RTSP状態遷移処理部に欠落パケットのTCPデータ長の変更可能性を問い合わせ、RTSP状態遷移処理部からTCPデータ長の変更可能性が無いという応答があった場合には、後続パケット受信処理部18aは、後続パケットを待機させずに送信するようにした。このため、実施の形態1に比べ、速やかに後続パケットを送信することができる。   As described above, in this embodiment, when the subsequent packet reception processing unit 18a receives a subsequent packet after the missing packet, the RTSP state transition processing unit is inquired about the possibility of changing the TCP data length of the missing packet, and the RTSP state. When there is a response from the transition processing unit that there is no possibility of changing the TCP data length, the subsequent packet reception processing unit 18a transmits the subsequent packet without waiting. For this reason, it is possible to transmit subsequent packets more quickly than in the first embodiment.

以上のように、本発明にかかる通信装置および通信方法は、ALG(Application Level Gateway)処理を行う通信システムに有用であり、特に、ALGを適用しつつ高TCPスループットを維持する必要のある通信システムに適している。   As described above, the communication device and the communication method according to the present invention are useful for a communication system that performs ALG (Application Level Gateway) processing, and in particular, a communication system that needs to maintain high TCP throughput while applying ALG. Suitable for

本発明にかかる通信装置の実施の形態1の機能構成例を示す図である。It is a figure which shows the function structural example of Embodiment 1 of the communication apparatus concerning this invention. NAT/NAPT変換情報の一例を示す図である。It is a figure which shows an example of NAT / NAPT conversion information. TCPシーケンス番号差分管理部に格納されるTCPシーケンス番号差分リストと変換前後のパケットの一例を示す図である。It is a figure which shows an example of the packet before and behind a TCP sequence number difference list stored in a TCP sequence number difference management part. TCPシーケンス番号判定処理部の判定処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the determination process procedure of a TCP sequence number determination process part. TCP受信シーケンス番号情報の一例を示す図である。It is a figure which shows an example of TCP reception sequence number information. TCPデータ編集情報の一例を示す図である。It is a figure which shows an example of TCP data edit information. 編集方法を説明するための図である。It is a figure for demonstrating the editing method. 後続パケットを含む場合のパケットの変換を説明するための図である。It is a figure for demonstrating conversion of the packet in case a subsequent packet is included. 再送パケットの変換前後の様子を示す図である。It is a figure which shows the mode before and behind conversion of a resending packet. 本発明にかかる通信装置の実施の形態2の機能構成例を示す図である。It is a figure which shows the function structural example of Embodiment 2 of the communication apparatus concerning this invention. ILデータを含むTCPパケットの一例を示す図である。It is a figure which shows an example of the TCP packet containing IL data. 編集可能性の無いパケットが欠落した場合のパケットの変換前後の様子を示す図である。It is a figure which shows the mode before and after conversion of the packet when the packet without editability is missing.

符号の説明Explanation of symbols

1 個別ALG処理部
2,2a ALG共通処理部
3 NAT/NAPT共通処理部
11 メッセージ解析処理部
12 ALG状態遷移処理部
13 状態管理部
14 TCPデータ編集情報生成処理部
15 TCPシーケンス番号判定処理部
16 TCP受信シーケンス番号管理部
17 新規パケット受信処理部
18,18a 後続パケット受信処理部
19 後続パケット管理部
20 再送パケット受信処理部
21 代理ACK生成処理部
22 TCPデータ編集処理部
23 TCPデータ編集情報管理部
24 TCPシーケンス番号変更処理部
25 ACKシーケンス番号変更処理部
26 TCPシーケンス番号差分管理部
27 送信シーケンス番号変更処理部
28 受信側NAPT変換処理部
29 NAT/NAPT変換情報管理部
30 送信側NAPT変換処理部
34 RTSP−ALG処理部
35 RTSPメッセージ解析処理部
36 RTSP状態遷移処理部
37 状態管理部
38 TCPデータ編集情報生成処理部
101〜105 エントリ
201〜207,221〜227,301〜307,321〜327,401〜407,421〜427,601〜607,621〜627 変換前パケット
211〜217,231〜237,311〜319,331〜337,411〜417,431〜437,611〜617,631〜637 変換後パケット
501〜506 TCPパケット
511〜516 データ
DESCRIPTION OF SYMBOLS 1 Individual ALG process part 2, 2a ALG common process part 3 NAT / NAPT common process part 11 Message analysis process part 12 ALG state transition process part 13 State management part 14 TCP data edit information generation process part 15 TCP sequence number determination process part 16 TCP reception sequence number management unit 17 New packet reception processing unit 18, 18a Subsequent packet reception processing unit 19 Subsequent packet management unit 20 Retransmission packet reception processing unit 21 Proxy ACK generation processing unit 22 TCP data editing processing unit 23 TCP data editing information management unit 24 TCP sequence number change processing unit 25 ACK sequence number change processing unit 26 TCP sequence number difference management unit 27 Transmission sequence number change processing unit 28 Reception side NAPT conversion processing unit 29 NAT / NAPT conversion information management unit 30 Transmission side NAPT Conversion processing unit 34 RTSP-ALG processing unit 35 RTSP message analysis processing unit 36 RTSP state transition processing unit 37 State management unit 38 TCP data editing information generation processing unit 101-105 entries 201-207, 221-227, 301-307, 321 -327, 401-407, 421-427, 601-607, 621-627 Pre-conversion packet 211-217, 231-237, 311-319, 331-337, 411-417, 431-437, 611-617, 631 ~ 637 packet after conversion 501 ~ 506 TCP packet 511 ~ 516 data

Claims (7)

TCPデータの更新を行うALG処理機能を備えた通信装置であって、
受信したパケットのTCPシーケンス番号に基づいて、欠落パケットの後に続いて送信されるパケットである後続パケットか否かを判定するTCPシーケンス番号判定処理手段と、
前記TCPシーケンス番号判定処理手段で後続パケットと判定された場合に、TCPデータ部分が無くTCPデータ長を0とした欠落パケットの宛先を宛先とする代理ACKパケットを生成する後続パケット生成処理手段と、
を備えることを特徴とする通信装置。
A communication device having an ALG processing function for updating TCP data,
TCP sequence number determination processing means for determining whether or not the packet is a subsequent packet that is subsequently transmitted after the missing packet, based on the TCP sequence number of the received packet;
When the TCP sequence number determination processing unit determines that the packet is a subsequent packet, the subsequent packet generation processing unit generates a proxy ACK packet destined for the destination of the missing packet with no TCP data portion and a TCP data length of 0,
A communication apparatus comprising:
前記代理ACKパケットの送信シーケンス番号を、それ以前に受信した最大の送信シーケンス番号に、その最大のシーケンス番号を有するパケットのTCPデータ長を加算した値とすることを特徴とする請求項1に記載の通信装置。   The transmission sequence number of the proxy ACK packet is a value obtained by adding the TCP data length of a packet having the maximum sequence number to the maximum transmission sequence number received before that time. Communication equipment. 前記後続パケット生成処理手段は、前記代理ACKパケットのACKシーケンス番号を、受信した後続パケットのACKシーケンスに基づいて付与することを特徴とする請求項1または2に記載の通信装置。   The communication apparatus according to claim 1, wherein the subsequent packet generation processing unit assigns an ACK sequence number of the proxy ACK packet based on an ACK sequence of the received subsequent packet. 前記後続パケット生成処理手段は、欠落パケットの再送パケットを受信する前にさらに後続パケットを受信した場合、さらに、別の代理ACKパケットを生成することを特徴とする請求項1、2または3に記載の通信装置。   4. The subsequent packet generation processing means further generates another proxy ACK packet when a subsequent packet is further received before receiving a retransmission packet of a missing packet. Communication equipment. 前記後続パケット生成処理手段は、
後続パケットを保持し、
前記欠落パケットの再送パケットを受信すると、保持していた後続パケットを再開パケットとして送信することを特徴とする請求項1〜4のいずれか1つに記載の通信装置。
The subsequent packet generation processing means includes:
Keep subsequent packets,
The communication apparatus according to claim 1, wherein when the retransmission packet of the missing packet is received, the subsequent packet held is transmitted as a resume packet.
受信パケットのALGメッセージの内容に基づいてALG状態を管理し、ALG状態に基づいて受信パケットごとにTCPデータの変更の可能性の有無を判定するALG状態遷移処理手段、
をさらに備え、
前記後続パケット生成処理手段は、後続パケットを受信した場合、前記判定結果をALG状態遷移処理手段から取得し、前記判定結果が変更の可能性が無いことを示す場合には、後続パケットをそのまま通過させることを特徴とする請求項1〜5のいずれか1つに記載の通信装置。
ALG state transition processing means for managing the ALG state based on the content of the ALG message of the received packet and determining whether or not there is a possibility of changing TCP data for each received packet based on the ALG state;
Further comprising
The subsequent packet generation processing unit acquires the determination result from the ALG state transition processing unit when the subsequent packet is received, and passes the subsequent packet as it is when the determination result indicates that there is no possibility of change. The communication device according to claim 1, wherein
TCPデータの更新を行うALG処理機能を備えた通信装置の通信方法であって、
受信したパケットのTCPシーケンス番号に基づいて、欠落パケットの後に続いて送信されるパケットである後続パケットか否かを判定するTCPシーケンス番号判定ステップと、
前記TCPシーケンス番号判定ステップで後続パケットと判定された場合に、TCPデータ部分が無くTCPデータ長を0とした欠落パケットの宛先を宛先とする代理ACKパケットを生成する後続パケット生成ステップと、
を含むことを特徴とする通信方法。
A communication method of a communication apparatus having an ALG processing function for updating TCP data,
A TCP sequence number determination step for determining whether or not the packet is a subsequent packet that is transmitted after the missing packet based on the TCP sequence number of the received packet;
A subsequent packet generation step of generating a proxy ACK packet destined for the destination of a missing packet with no TCP data portion and having a TCP data length of 0 when it is determined as a subsequent packet in the TCP sequence number determination step;
A communication method comprising:
JP2007173377A 2007-06-29 2007-06-29 Communication device and communication method Pending JP2009015392A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007173377A JP2009015392A (en) 2007-06-29 2007-06-29 Communication device and communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007173377A JP2009015392A (en) 2007-06-29 2007-06-29 Communication device and communication method

Publications (1)

Publication Number Publication Date
JP2009015392A true JP2009015392A (en) 2009-01-22

Family

ID=40356257

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007173377A Pending JP2009015392A (en) 2007-06-29 2007-06-29 Communication device and communication method

Country Status (1)

Country Link
JP (1) JP2009015392A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011103566A (en) * 2009-11-11 2011-05-26 Hitachi Ltd Gateway device, and method of assigning port number
JP2012221327A (en) * 2011-04-11 2012-11-12 Ntt Data Corp Ic card processing system, ic card processing method, and program
JP2012244224A (en) * 2011-05-16 2012-12-10 Mitsubishi Electric Engineering Co Ltd Terminal device and method for controlling terminal device
JP2014216991A (en) * 2013-04-30 2014-11-17 株式会社日立製作所 Analysis server and analysis method
US8976814B2 (en) 2011-12-09 2015-03-10 General Electric Company Method of transporting data from sending node to destination node

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011103566A (en) * 2009-11-11 2011-05-26 Hitachi Ltd Gateway device, and method of assigning port number
US8462800B2 (en) 2009-11-11 2013-06-11 Hitachi, Ltd. Gateway device and port number assignment method
JP2012221327A (en) * 2011-04-11 2012-11-12 Ntt Data Corp Ic card processing system, ic card processing method, and program
JP2012244224A (en) * 2011-05-16 2012-12-10 Mitsubishi Electric Engineering Co Ltd Terminal device and method for controlling terminal device
US8976814B2 (en) 2011-12-09 2015-03-10 General Electric Company Method of transporting data from sending node to destination node
JP2014216991A (en) * 2013-04-30 2014-11-17 株式会社日立製作所 Analysis server and analysis method

Similar Documents

Publication Publication Date Title
JP5969689B2 (en) Redundancy for real-time communication
US7936750B2 (en) Packet transfer device and communication system
US7907525B2 (en) Method of communicating packet multimedia to restricted endpoints
US7788408B2 (en) Address translator, message processing method and equipment
US7127496B2 (en) Communications relay device, communications relay method, communications terminal apparatus and program storage medium
US20040246991A1 (en) IP address translator and packet transfer apparatus
US8462800B2 (en) Gateway device and port number assignment method
US20090161680A1 (en) Gateway apparatus, packet forwarding method, and program
US20040153858A1 (en) Direct peer-to-peer transmission protocol between two virtual networks
US20060015647A1 (en) System and method for communication between heterogeneous networks
WO2008067738A1 (en) A method of transferring fragmentation message, a system of communication and a tunnel device
JP2005530367A (en) System and method for delivering a data stream of multiple data types at different priority levels
US9106444B2 (en) Method for transmitting of a multi-channel data stream on a multi-transport tunnel, corresponding computer-readable storage means and tunnel end-points
JP2009015392A (en) Communication device and communication method
WO2009124477A1 (en) Method, system and device for packet transmission
JP3999785B2 (en) Communication method
EP2211507A1 (en) Method, device and system for processing real time streaming protocol
JP5311460B2 (en) Connection control device
US10594500B2 (en) Method and device for managing packets in a multi-stream and multi-protocol connection
JP3928664B2 (en) Address translation apparatus, message processing method and apparatus
JP2006013911A (en) Stream data transfer method, apparatus and program, and recording medium
WO2013056999A1 (en) Method and system for enabling nat traversal for multi-homing protocols
JP3928663B2 (en) Address translation apparatus, message processing method and apparatus
JP3928662B2 (en) Address translation apparatus, message processing method and apparatus
Fu et al. General Internet Signaling Transport (GIST) over Stream Control Transmission Protocol (SCTP) and Datagram Transport Layer Security (DTLS)