JP6478816B2 - Communication device, control method, and program - Google Patents

Communication device, control method, and program Download PDF

Info

Publication number
JP6478816B2
JP6478816B2 JP2015110794A JP2015110794A JP6478816B2 JP 6478816 B2 JP6478816 B2 JP 6478816B2 JP 2015110794 A JP2015110794 A JP 2015110794A JP 2015110794 A JP2015110794 A JP 2015110794A JP 6478816 B2 JP6478816 B2 JP 6478816B2
Authority
JP
Japan
Prior art keywords
data amount
tcp
communication
update
time
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.)
Active
Application number
JP2015110794A
Other languages
Japanese (ja)
Other versions
JP2016225847A (en
JP2016225847A5 (en
Inventor
英司 今尾
英司 今尾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2015110794A priority Critical patent/JP6478816B2/en
Publication of JP2016225847A publication Critical patent/JP2016225847A/en
Publication of JP2016225847A5 publication Critical patent/JP2016225847A5/ja
Application granted granted Critical
Publication of JP6478816B2 publication Critical patent/JP6478816B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Description

本発明は、通信における送信データ単位の制御技術に関する。   The present invention relates to a transmission data unit control technique in communication.

Internet Protocol(IP)通信において、送信ホストから受信ホストまでの通信経路において一度に送信可能なデータ量の単位は、パスMTU(Path Maximum Transmission Unit)と呼ばれる。なお、以下では、パスMTUのことを、PMTUと呼ぶ。ここで、MTUは、通信経路に含まれるリンクのそれぞれにおいて一度に送信可能なデータ量に対応し、PMTUは、通信経路に含まれるリンクのそれぞれに関するMTUのうち最小の値となる。一般に、IP通信において、送信ホストが送信したパケットは、そのサイズがPMTU以下である場合、経路上のルータによって分割や破棄されることなく受信ホストへ到達することが想定されている。   In Internet Protocol (IP) communication, a unit of data amount that can be transmitted at a time on a communication path from a transmission host to a reception host is called a path maximum transmission unit (MTU). Hereinafter, the path MTU is referred to as PMTU. Here, the MTU corresponds to the amount of data that can be transmitted at once in each of the links included in the communication path, and the PMTU is the smallest value among the MTUs related to each of the links included in the communication path. In general, in IP communication, when the size of a packet transmitted by a transmission host is equal to or smaller than PMTU, it is assumed that the packet reaches the reception host without being divided or discarded by a router on the route.

送信ホストが受信ホストまでのPMTUを推定すること、またはその方法は、パスMTU探索(Path MTU Discovery)と呼ばれる。なお、以下では、パスMTU探索のことをPMTUDと呼ぶ。PMTUDの基本的なメカニズムは、IETF(インターネット技術タスクフォース)のRFC(Request For Comments)1191(IPv4)及びRFC1981(IPv6)に提示されている。また、具体的なPMTUDの様々な方法が提案されている(特許文献1、IETFのRFC4821参照)。IETFのRFC4821では、プロトコルスタックのパケット化階層におけるPMTUDの方法が提案されており、その中の1つとして、TCP再送機能で送信するパケットのサイズを減らしながら通信の相手装置へのPMTUを推定する方法が示されている。   The method in which the sending host estimates the PMTU up to the receiving host, or the method thereof, is called Path MTU Discovery. Hereinafter, the path MTU search is referred to as PMTUD. The basic mechanism of PMTUD is presented in RFCs (Request For Comments) 1191 (IPv4) and RFC 1981 (IPv6) of the IETF (Internet Technology Task Force). Various specific methods of PMTUD have been proposed (see Patent Document 1, RFC 4821 of IETF). IETF RFC4821 proposes a PMTUD method in the packetization layer of the protocol stack, and one of them is to estimate the PMTU to a communication partner device while reducing the size of a packet to be transmitted by the TCP retransmission function. The method is shown.

IPの上位層プロトコルのTCP(Transmission Control Protocol)の多くの実装では、送信IPパケットサイズがPMTU以下になるように、TCP送信セグメントサイズが適応的に決定される。これにより、通信経路でのパケット消失を回避することが可能となる。この実装によれば、通信中にTCP通信の相手装置までの間の通信経路に関するPMTUが小さくなったとしても、送信可能な最大セグメントサイズを調整して送信データの到達性を確保することができる。   In many implementations of TCP (Transmission Control Protocol), which is an upper layer protocol of IP, the TCP transmission segment size is adaptively determined so that the transmission IP packet size is equal to or smaller than the PMTU. As a result, packet loss on the communication path can be avoided. According to this implementation, the reachability of transmission data can be ensured by adjusting the maximum segment size that can be transmitted even if the PMTU related to the communication path to the counterpart device of TCP communication becomes smaller during communication. .

一般的な実装では、TCP/IPプロトコルスタックでは、受信ホストまでの経路情報に関連付けて推定されたPMTUが保持される。一方で、受信ホストまでの通信経路が変更されたなどの理由により、PMTUは動的に変更され得るため、多くの実装では、保持されるPMTUには有効期限が付され、有効期限の経過時に対応するPMTUが無効化される。例えば、上述のIETFのRFC1191やRFC1981には、10分というPMTUの有効期限の参考値が記載されている。受信ホストへのPMTUは、無効化されると、送信ホストから最初の中継先までのMTUにリセットされ、その後、PMTUDによって、受信ホストへのPMTUが推定される。   In a typical implementation, the TCP / IP protocol stack holds a PMTU estimated in association with route information to the receiving host. On the other hand, because the PMTU can be dynamically changed, for example, because the communication path to the receiving host is changed, in many implementations, the held PMTU is given an expiration date, and when the expiration date has passed, The corresponding PMTU is invalidated. For example, the above-mentioned IETF RFC 1191 and RFC 1981 describe a reference value for the expiration date of the PMTU of 10 minutes. When the PMTU to the receiving host is invalidated, it is reset to the MTU from the sending host to the first relay destination, and then the PMTU to the receiving host is estimated by the PMTUD.

特許第3511969号公報Japanese Patent No. 3511969

TCPでは、通信の相手装置への通信経路に関するPMTUが小さいとき、調整したTCP送信セグメントサイズが小さくなり、十分な伝送効率を得ることができない場合がある。一方で、そのPMTUが有効期限に達してリセットされ、PMTUDによってPMTUを再取得すると、結果として、その再取得後のPMTUが以前の値より大きくなりうる。PMTUが大きくなる場合、TCP送信セグメントサイズを大きくできるため、結果的に送信効率を改善することができる。しかしながら、通信の相手装置までの通信経路に関するPMTUが大きくなることを期待してTCP送信セグメントサイズを大きくすると、実際にはPMTUがリセット以前と変化しない場合、サイズが大きくなったパケットが経路上のルータで破棄されてしまう。この結果、TCPの再送が発生することになる。   In TCP, when the PMTU related to a communication path to a communication partner apparatus is small, the adjusted TCP transmission segment size may be small, and sufficient transmission efficiency may not be obtained. On the other hand, if the PMTU reaches the expiration date and is reset, and the PMTU is reacquired by the PMTUD, the PMTU after the reacquisition may be larger than the previous value. When the PMTU increases, the TCP transmission segment size can be increased, and as a result, the transmission efficiency can be improved. However, if the TCP transmission segment size is increased in anticipation of an increase in the PMTU related to the communication path to the communication partner device, if the PMTU actually does not change from before the reset, the packet with the increased size will be It is destroyed at the router. As a result, TCP retransmission occurs.

ここで、TCP通信が短時間で終了する場合、通信中にPMTUが変化することは稀である。また、TCP通信が長時間におよぶ場合であっても、再び推定されたPMTUがリセット以前と変化していないことは多い。このため、データ送信を連続実行している最中に、PMTUの有効期限切れが発生すると、TCPの再送を引き起こし、TCP送信スループットが一時的に低下してしまうという課題があった。   Here, when the TCP communication is completed in a short time, the PMTU rarely changes during the communication. Even if TCP communication takes a long time, the re-estimated PMTU is often unchanged from that before the reset. For this reason, when the expiration of the PMTU occurs during continuous execution of data transmission, there is a problem that TCP retransmission is caused and TCP transmission throughput is temporarily reduced.

本発明は上記課題に鑑みなされたものであり、他の装置との通信において一度に送信可能なデータ量の更新に関して、スループットの低下を防ぐ技術を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a technique for preventing a decrease in throughput with respect to updating the amount of data that can be transmitted at one time in communication with another apparatus.

上記目的を達成するため、本発明の通信装置は、他の装置までの通信経路に応じて特定された当該通信経路において一度に送信可能な第1のデータ量に基づいて定まる、前記他の装置との接続において一度に送信可能なデータ量に関する第2のデータ量更新処理を行う更新手段と、前記第1のデータ量の有効期限が切れていても、前記接続において信号の送信と受信とが行われていない時間が所定時間以上となるまでは、1)前記第2のデータ量を小さくする場合には前記更新手段による当該第2のデータ量の更新処理を行い、2)前記第2のデータ量を大きくする場合には前記更新手段による当該第2のデータ量の更新を行わない、ように前記更新手段を制御する制御手段と、を有する。
In order to achieve the above object, the communication device of the present invention is determined based on a first data amount that can be transmitted at once in the communication path specified according to the communication path to the other device. receiving an update means for updating processing of the second data quantity regarding transmittable data amount at a time, even if broken the first data amount of the expiration date, before Symbol connection signal transmission and in connection with 1) When the second data amount is reduced, update processing of the second data amount is performed by the updating means until the second data amount is reduced. in the case of increasing the second data amount to have a, and control means for controlling the updating means so as not to update of the second data amount by the updating means.

本発明によれば、他の装置との通信において一度に送信可能なデータ量の更新に関して、スループットの低下を防ぐことができる。   According to the present invention, it is possible to prevent a decrease in throughput with respect to updating the amount of data that can be transmitted at one time in communication with another apparatus.

通信装置の構成例を示すブロック図。The block diagram which shows the structural example of a communication apparatus. 第1更新部107における処理例を示すフローチャート。7 is a flowchart showing an example of processing in the first update unit 107. TCPキープアライブタイマ109における処理例を示すフローチャート。10 is a flowchart showing a processing example in a TCP keep alive timer 109. 第2更新部108における処理例を示すフローチャート。10 is a flowchart showing a processing example in the second update unit. 第2更新部108における処理例を示すフローチャート。10 is a flowchart showing a processing example in the second update unit. 送信シーケンス番号列と相手装置の受信ウィンドウとの関係を示す図。The figure which shows the relationship between a transmission sequence number row | line | column and the receiving window of the other party apparatus. 第2更新部108における別の処理例を示すフローチャート。10 is a flowchart showing another processing example in the second update unit.

以下、添付図面を参照して本発明の実施の形態を詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

<<実施形態1>>
本実施形態では、通常のIP通信のようにして、通信装置から通信の相手装置までの通信経路に関して、その通信経路で一度に送信可能な最大のデータ量としてPMTUが特定される。そして、そのデータ量に基づいて定まる、TPC接続において一度に送信可能な最大のデータ量は、セグメントサイズとして特定される。ここで、本実施形態では、通信装置は、ある通信経路の情報を、PMTU及びそのPMTUの有効期限と共に保持しておき、また、その通信経路と、送信元及び宛先が一致するTCP接続に関してそのセグメントサイズを保持する。
<< Embodiment 1 >>
In the present embodiment, the PMTU is specified as the maximum amount of data that can be transmitted at once on the communication path from the communication apparatus to the communication partner apparatus, as in normal IP communication. Then, the maximum data amount that can be transmitted at one time in the TPC connection determined based on the data amount is specified as the segment size. Here, in the present embodiment, the communication apparatus holds information on a certain communication path together with the PMTU and the expiration date of the PMTU, and the communication path is associated with a TCP connection whose transmission source and destination match. Holds segment size.

ここで、上述の課題を解決するために、通信装置は、通信の相手装置への通信経路に関するPMTUの有効期限が切れたとしても、送信セグメントサイズを大きくしないことができる。これによれば、通信装置が再送を行うことがなくなるため、再送による一時的な送信スループットの低下を防止することができる。しかしながら、有効期限が切れたPMTUの値が小さい場合で、かつ、更新することによってそのPMTUの値が大きくなる状況においては、PMTUを更新して、送信セグメントサイズを大きくすれば、TCP接続の通信効率を改善させることができる。すなわち、通信装置は、PMTUの有効期限が切れた場合に、送信セグメントサイズを大きくしないことで再送を防止できるが、通信効率の改善の機会を失うこととなり得る。   Here, in order to solve the above-described problem, the communication apparatus can not increase the transmission segment size even if the expiration date of the PMTU related to the communication path to the communication partner apparatus expires. According to this, since the communication apparatus does not perform retransmission, it is possible to prevent a temporary decrease in transmission throughput due to retransmission. However, in the case where the value of the PMTU that has expired is small and the value of the PMTU becomes large by updating, if the PMTU is updated and the transmission segment size is increased, the communication of the TCP connection Efficiency can be improved. That is, when the expiration date of the PMTU expires, the communication apparatus can prevent retransmission by not increasing the transmission segment size, but may lose the opportunity to improve communication efficiency.

このため、本実施形態に係る通信装置は、まず、再送発生の防止の観点から、PMTUの有効期限が切れたとしても、直ちに送信セグメントサイズを更新しない。一方で、通信装置は、送信及び受信が行われていない時間が所定時間以上に達した場合に、送信セグメントサイズを更新するようにする。すなわち、通信装置は、送信及び受信が行われていない時間が所定時間以上に達した場合には、送信セグメントサイズをしないようにする。なお、通信装置は、送信及び受信が行われていない時間が所定時間以上となっていない場合は、送信セグメントサイズが小さくなる更新を行うが、送信セグメントサイズが大きくなる更新は行わないようにしてもよい。送信セグメントサイズが小さくなる更新であれば、再送が発生する確率が小さいからである。すなわち、通信装置は、PMTUの有効期限が切れていても、送信及び受信が行われていない時間が所定時間以上となるまでは、送信セグメントサイズの更新を制限する。これにより、TCP接続に係る通信が行われていない期間に送信セグメントの更新を行うため、その通信のスループットへの影響を抑えることができる。したがって、このような構成によって、送信セグメントサイズの更新に伴う、再送の発生の防止及びスループットの劣化の防止を達成することができる。   For this reason, the communication apparatus according to the present embodiment does not immediately update the transmission segment size from the viewpoint of preventing the occurrence of retransmission even if the PMTU expires. On the other hand, the communication device updates the transmission segment size when the time during which transmission and reception are not performed reaches a predetermined time or more. That is, the communication device does not set the transmission segment size when the time during which transmission and reception are not performed reaches a predetermined time or more. Note that if the time during which transmission and reception are not performed is not equal to or longer than the predetermined time, the communication device performs an update to reduce the transmission segment size, but does not perform an update to increase the transmission segment size. Also good. This is because an update with a smaller transmission segment size is less likely to cause retransmission. That is, the communication device limits the update of the transmission segment size until the time during which transmission and reception are not performed reaches a predetermined time or more even when the PMTU has expired. Thereby, since the transmission segment is updated during a period in which communication related to the TCP connection is not performed, it is possible to suppress the influence on the throughput of the communication. Therefore, with such a configuration, it is possible to prevent the occurrence of retransmission and the deterioration of throughput due to the update of the transmission segment size.

以下では、通信装置の構成及び処理の流れについて詳細に説明する。なお、以下に説明する通信装置の構成は一例に過ぎず、本実施形態に係る各処理を実行することができる構成であれば、他の構成が用いられてもよい。また、以下に説明する各処理も一例に過ぎず、上述のように、通信装置における送信セグメントサイズの更新を制限するものであれば、どのような処理が行われてもよい。なお、以下では、PMTUなどの用語が用いられるが、これらの用語は説明のために用いたものであり、同様の概念の他の用語が用いられてもよいことは明らかである。例えば、PMTUは、通信経路に含まれるリンクに基づいて特定される、その通信経路において一度に送信可能なデータ量を示すため、用語PMTUは、そのようなデータ量を特定する概念の全てを含むものとして説明される。また、以下では、送信及び受信される信号がパケットの形式を有する場合について説明するが、他の形式の信号が用いられてもよい。   Hereinafter, the configuration of the communication apparatus and the flow of processing will be described in detail. Note that the configuration of the communication apparatus described below is merely an example, and other configurations may be used as long as each configuration according to the present embodiment can be executed. Each process described below is only an example, and as described above, any process may be performed as long as the update of the transmission segment size in the communication apparatus is limited. In the following, terms such as PMTU are used, but these terms are used for explanation, and it is obvious that other terms of the same concept may be used. For example, the term PMTU includes all of the concepts that identify such an amount of data, as PMTU indicates the amount of data that can be transmitted at one time on that communication path, specified based on the links included in the communication path. It is explained as a thing. In the following description, a case where a signal to be transmitted and received has a packet format will be described, but a signal of another format may be used.

(通信装置)
図1は、本実施形態に係る通信装置の構成例を示す図である。通信装置は、例えば、システムバス101、CPU102、ROM103、RAM104、通信制御部105及びプロトコル処理部106を含んで構成される。システムバス101には、CPU102、ROM103、RAM104、通信制御部105及びプロトコル処理部106が接続され、システムバス101は、これらのブロック間のデータの転送を行う。CPU102は中央演算処理装置であり、通信装置全体の制御及び通信装置の通信及びそれ以外の処理を行う。なお、CPU102は、いわゆる中央演算処理装置でない他の1つ以上のプロセッサであってもよい。ROM103は、例えばシステムプログラムを格納する記憶装置であり、RAM104は、例えばシステムプログラム実行時に使用される一時記憶装置である。通信装置においては、一例として、ROM103からRAM104にシステムプログラムが読み込まれ、CPU102がそのシステムプログラムを実行する。通信制御部105は、ネットワーク110に接続してフレームの送受信を行うための制御/処理機能を有し、プロトコル処理部106は、TCP/IP通信処理を実行するための制御/処理機能を有する。
(Communication device)
FIG. 1 is a diagram illustrating a configuration example of a communication apparatus according to the present embodiment. The communication device includes, for example, a system bus 101, a CPU 102, a ROM 103, a RAM 104, a communication control unit 105, and a protocol processing unit 106. The CPU 102, ROM 103, RAM 104, communication control unit 105, and protocol processing unit 106 are connected to the system bus 101, and the system bus 101 transfers data between these blocks. The CPU 102 is a central processing unit, and performs control of the entire communication device, communication of the communication device, and other processing. The CPU 102 may be one or more other processors that are not so-called central processing units. The ROM 103 is a storage device that stores a system program, for example, and the RAM 104 is a temporary storage device that is used when the system program is executed, for example. In the communication apparatus, as an example, a system program is read from the ROM 103 into the RAM 104, and the CPU 102 executes the system program. The communication control unit 105 has a control / processing function for transmitting and receiving frames connected to the network 110, and the protocol processing unit 106 has a control / processing function for executing TCP / IP communication processing.

通信装置は、通信制御部105を介してネットワーク110に接続することができる。通信制御部105は、ネットワーク110に対して伝送フレームの送受信を行うネットワークインタフェースである。通信制御部105は、例えばイーサネット(登録商標)規格に従った有線通信インタフェース、又は例えばIEEE802.11の無線LAN通信規格に従った無線通信インタフェースを含む。例えばネットワーク110がイーサネット(登録商標)による有線ネットワークの場合、通信制御部105は、イーサネット(登録商標)のMAC処理(伝送メディア制御処理)、伝送フレームの送受信等の処理を行う。なお、図1は、通信装置が1つのネットワーク110に接続する場合の例を示しているが、通信装置は、複数のネットワーク110に接続してもよい。この場合、通信装置は、複数の通信制御部105を有してもよいし、複数のネットワークに接続可能な1つの通信制御部を有してもよい。   The communication device can be connected to the network 110 via the communication control unit 105. The communication control unit 105 is a network interface that transmits and receives transmission frames to and from the network 110. The communication control unit 105 includes, for example, a wired communication interface according to the Ethernet (registered trademark) standard, or a wireless communication interface according to the wireless LAN communication standard of IEEE802.11. For example, when the network 110 is a wired network based on Ethernet (registered trademark), the communication control unit 105 performs processes such as Ethernet (registered trademark) MAC processing (transmission media control processing) and transmission frame transmission / reception. Although FIG. 1 shows an example in which a communication device is connected to one network 110, the communication device may be connected to a plurality of networks 110. In this case, the communication device may include a plurality of communication control units 105 or a single communication control unit that can be connected to a plurality of networks.

プロトコル処理部106は、例えば通信プロトコル処理用のハードウェア回路装置、又は通信プロトコル処理用に設計されたマイクロプロセッサを含んで構成され、汎用的なTCP/IPプロトコルの通信処理を行う。例えば、プロトコル処理部106は、IPv4(IPバージョン4)、IPv6(IPバージョン6)、ICMP、UDP、並びにTCPの少なくともいずれかに関する通信プロトコル処理、送信フロー制御並びに輻輳制御、及び、通信エラー制御等を行う。なお、本実施形態では、プロトコル処理部106には、第1更新部107、第2更新部108、及びTCPキープアライブタイマ109が、例えばプロトコル処理部106で実行されるソフトウェアとして、実装される。   The protocol processing unit 106 includes, for example, a hardware circuit device for communication protocol processing or a microprocessor designed for communication protocol processing, and performs communication processing of a general-purpose TCP / IP protocol. For example, the protocol processing unit 106 performs communication protocol processing, transmission flow control, congestion control, communication error control, etc. regarding at least one of IPv4 (IP version 4), IPv6 (IP version 6), ICMP, UDP, and TCP. I do. In the present embodiment, the protocol processing unit 106 includes a first update unit 107, a second update unit 108, and a TCP keep alive timer 109, for example, as software executed by the protocol processing unit 106.

プロトコル処理部106は、PMTUの管理も行う。ここで、本実施形態におけるプロトコル処理部106によるPMTU管理方法について説明する。プロトコル処理部106は、一般的なIPプロトコルスタックと同様に、ルーティングを実行する。ルーティング処理では、送信パケットの宛先IPアドレスなどの情報に基づいて送信インタフェースや最初の送信先ノードが決定される。この処理のために、プロトコル処理部106は、ルーティングの決定規則であるルーティングテーブルを管理する。さらに、プロトコル処理部106は、送信パケットのルーティング処理結果を、パケットの送信元IPアドレスと宛先IPアドレスとの組み合わせを含むと共に有効期限を付した情報として、キャッシュして管理する。これにより、プロトコル処理部106は、ルーティング処理を効率化することができる。なお、ここでは、このキャッシュ先をルーティングキャッシュと呼ぶ。   The protocol processing unit 106 also manages PMTU. Here, a PMTU management method by the protocol processing unit 106 in the present embodiment will be described. The protocol processing unit 106 performs routing similarly to a general IP protocol stack. In the routing process, the transmission interface and the first transmission destination node are determined based on information such as the destination IP address of the transmission packet. For this processing, the protocol processing unit 106 manages a routing table that is a routing determination rule. Further, the protocol processing unit 106 caches and manages the routing processing result of the transmission packet as information including a combination of the transmission source IP address and the destination IP address of the packet and with an expiration date. Thereby, the protocol processing unit 106 can make the routing process more efficient. Here, this cache destination is called a routing cache.

ルーティングキャッシュの情報は、送信元IPアドレスから宛先IPアドレスへの経路情報でありうる。このため、本実施形態では、プロトコル処理部106は、送信元から宛先へのPMTUを、このルーティングキャッシュ情報に関連付けて保持する。なお、プロトコル処理部106は、ルーティングキャッシュ情報を破棄するとき、関連付けられたPMTUも削除する。ルーティングキャッシュ情報と関連付けられて保持されるPMTUの初期値は、ルーティング処理結果に含まれる送信インタフェースのMTU、又はそのインタフェースが接続するネットワークリンクのMTUのいずれかの小さい値でありうる。そして、プロトコル処理部106は、PMTUDにより実際のPMTUが推定されると、保持しているPMTUの値を更新する。また、本実施形態では、プロトコル処理部106は、保持するPMTUに有効期限を設定し、その有効期限が経過したとき、PMTUの値をリセットして初期値に戻す。なお、ルーティングキャッシュは、ルーティング処理結果を有効期限を付して一時的に保持する仕組みであるため、そのルーティングキャッシュに係る経路情報にも有効期限が設定されていることとなる。このため、PMTUの有効期限は、関連付けられたルーティングキャッシュ情報の有効期限と同一とされてもよい。   The information in the routing cache can be route information from the source IP address to the destination IP address. For this reason, in this embodiment, the protocol processing unit 106 holds the PMTU from the transmission source to the destination in association with the routing cache information. The protocol processing unit 106 also deletes the associated PMTU when discarding the routing cache information. The initial value of the PMTU held in association with the routing cache information may be a small value of either the MTU of the transmission interface included in the routing processing result or the MTU of the network link to which the interface is connected. Then, when the actual PMTU is estimated by the PMTUD, the protocol processing unit 106 updates the held PMTU value. In this embodiment, the protocol processing unit 106 sets an expiration date for the held PMTU, and when the expiration date has passed, resets the value of the PMTU to return it to the initial value. Since the routing cache is a mechanism for temporarily holding the routing processing result with an expiration date, the expiration date is also set in the route information related to the routing cache. For this reason, the expiration date of the PMTU may be the same as the expiration date of the associated routing cache information.

(第1更新部107の処理)
次に、プロトコル処理部106における、第1更新部107の処理の流れについて、図2を用いて説明する。第1更新部107は、ルーティングキャッシュ情報に保持するPMTU(以下、RCPMTUと呼ぶ。)の更新に伴い、TCP接続ごとに保持されるPMTU(以下、TCPMTUと呼ぶ。)を更新する処理を実行する。なお、TCPMTUの値は、TCP接続で用いられる最大セグメントサイズに関し、各TCP接続では、データがそのTCPMTUの大きさを超えない範囲のサイズで伝送されるように、分割される。なお、TCPMTUの値は、最大セグメントサイズそのものであってもよいし、最大セグメントサイズを特定するための何らかのインデックス又はインジケータ等であってもよい。
(Processing of the first update unit 107)
Next, the processing flow of the first updating unit 107 in the protocol processing unit 106 will be described with reference to FIG. The first update unit 107 executes a process of updating the PMTU (hereinafter referred to as TCP MTU) held for each TCP connection in association with the update of the PMTU (hereinafter referred to as RCPMTU) held in the routing cache information. . Note that the value of the TCP MTU is divided with respect to the maximum segment size used in the TCP connection so that the data is transmitted in a size that does not exceed the size of the TCP MTU in each TCP connection. Note that the value of TCPMTU may be the maximum segment size itself, or some index or indicator for specifying the maximum segment size.

第1更新部107は、まず、ルータから送信された「Packet−Too−Big」メッセージのICMPv6パケットを受信する(S201)。このメッセージは、例えば、ICMPv6フォーマットのタイプフィールドの値が2であるパケットの形式を有し得る。また、このメッセージには、MTUフィールドに、ルータが通知するPMTU(以下、TBPMTUと呼ぶ。)の値が含まれている。さらに、このメッセージには、そのルータが転送できず破棄したIPv6パケットの一部または全体が付加される。なお、IPv4の場合は、S201において、IPフラグメント不可のため転送パケットが破棄されたことを示すコードを有する「Destination Unreachable」メッセージのICMPパケットが受信される。このメッセージは、ICMPフォーマットのタイプフィールドの値が3で、コードフィールドの値が4のパケットである。   First, the first updating unit 107 first receives an ICMPv6 packet of a “Packet-Too-Big” message transmitted from the router (S201). This message may have, for example, a packet format in which the value of the type field of the ICMPv6 format is 2. Also, in this message, the value of PMTU (hereinafter referred to as TBPMTU) notified by the router is included in the MTU field. Further, a part or the whole of the IPv6 packet discarded because the router cannot transfer is added to this message. In the case of IPv4, an ICMP packet of a “Destination Unreachable” message having a code indicating that the transfer packet has been discarded because IP fragmentation is not possible is received in S201. This message is a packet with a type field value of 3 and a code field value of 4 in the ICMP format.

続いて、第1更新部107は、受信した「Packet−Too−Big」メッセージに付されたパケットの送信元IPアドレスと宛先IPアドレスに基づいて、ルーティングキャッシュ情報を検索し、対応するRCPMTUを取得する(S202)。そして、第1更新部107は、ルーティングキャッシュ情報の検索に失敗してRCPMTUを取得できなかった場合、又は受信したメッセージで通知されたTBPMTUが取得したRCPMTUの値以上である場合(S202でNO)、処理を終了する。   Subsequently, the first updating unit 107 searches the routing cache information based on the source IP address and the destination IP address of the packet attached to the received “Packet-Too-Big” message, and acquires the corresponding RCPMTU. (S202). Then, the first update unit 107 fails to retrieve the RCPMTU due to a failure to retrieve the routing cache information, or when the TBPMTU notified by the received message is equal to or greater than the acquired RCPMTU value (NO in S202). The process is terminated.

一方、第1更新部107は、取得したRCPMTUの値が、受信したメッセージによって通知されたTBPMTUの値より小さかった場合(S202でYES)は、そのRCPMTUを、TBPMTUの値となるように情報を更新する(S203)。そして、第1更新部107は、RCPMTUを更新したルーティングキャッシュ情報の送信元IPアドレスと宛先IPアドレスが、それぞれ自局のIPアドレスと通信の相手装置のIPアドレスに一致するTCP接続があるかを調べる(S204)。そのようなTCP接続がない場合(S204でNO)、第1更新部107は、処理を終了する。一方、第1更新部107は、そのようなTCP接続がある場合(S204でYES)、更新したRCPMTUの値が、そのTCP接続についてのTCPMTUの値よりも小さいかを調べる(S205)。そして、第1更新部107は、更新したRCPMTUの値が、S204で発見されたTCP接続のTCPMTUの値より小さい場合(S205でYES)、そのTCPMTUの値を、更新後のRCPMTUの値となるように更新する(S206)。一方、第1更新部107は、更新したRCPMTUの値が、S204で発見されたTCP接続のTCPMTUの値以上である場合(S205でNO)は、TCPMTUの更新を行わない。その後、第1更新部107は、S204で発見されたTCP接続の全てについてS205の判定と、必要に応じてS206の更新処理とが行われたかを判定し(S207)、全TCP接続について処理が完了した場合(S207でYES)に、処理を終了する。一方、第1更新部107は、全TCP接続についての処理が完了していない場合(S207でNO)は、処理をS205に戻す。   On the other hand, if the obtained RCPMTU value is smaller than the TBPMTU value notified by the received message (YES in S202), the first updating unit 107 sets the information so that the RCPMTU becomes the TBPMTU value. Update (S203). Then, the first updating unit 107 determines whether there is a TCP connection in which the source IP address and the destination IP address of the routing cache information whose RCPMTU has been updated match the IP address of the local station and the IP address of the communication partner device, respectively. Check (S204). If there is no such TCP connection (NO in S204), the first updating unit 107 ends the process. On the other hand, if there is such a TCP connection (YES in S204), the first updating unit 107 checks whether the updated RCPMTU value is smaller than the TCPMTU value for the TCP connection (S205). Then, when the updated RCPMTU value is smaller than the TCPMTU value of the TCP connection found in S204 (YES in S205), the first updating unit 107 sets the TCPMTU value to the updated RCPMTU value. (S206). On the other hand, if the updated RCPMTU value is greater than or equal to the TCP connection TCPMTU value found in S204 (NO in S205), the first update unit 107 does not update the TCPMTU. Thereafter, the first update unit 107 determines whether the determination in S205 has been performed for all the TCP connections discovered in S204 and the update process in S206 as necessary (S207). If completed (YES in S207), the process ends. On the other hand, the first updating unit 107 returns the process to S205 when the processes for all TCP connections are not completed (NO in S207).

このように、第1更新部107は、「Packet−Too−Big」メッセージを受信して、ルーティングキャッシュ情報に関連付けられたRCPMTUを更新する。また、第1更新部107は、そのRCPMTUに関するルーティングキャッシュ情報の送信元と宛先のIPアドレスが一致するTCP接続に関するTCPMTUをも、必要に応じて更新する。ただし、TCPMTUの値は、その大きさが小さくなる場合にのみ更新され、第1更新部107は、TCPMTUの値を大きくする更新を行うことはない。   In this way, the first update unit 107 receives the “Packet-Too-Big” message and updates the RCPMTU associated with the routing cache information. The first updating unit 107 also updates the TCP MTU related to the TCP connection in which the source and destination IP addresses of the routing cache information related to the RCPMTU match, as necessary. However, the value of the TCPMTU is updated only when the size is reduced, and the first update unit 107 does not perform an update to increase the value of the TCPMTU.

(TCPキープアライブタイマ109の処理)
次に、プロトコル処理部106における、TCPキープアライブタイマ109の処理の流れについて、図3を用いて説明する。TCPでは、アイドル状態(接続中であるが送受信のない状態)でも、その接続が維持される。その一方で、TCPでは、アイドル状態が長時間に及ぶ場合、通信の相手装置とのコネクションが正常に維持されているかを検出するため、TCPキープアライブと呼ばれる機能が実装される。TCPキープアライブについては、IETFのRFC1122に記載されている。TCPキープアライブ機能では、アイドル状態になったときにタイマが起動され、タイマのタイムアウト時に、検査パケットが送信されて、通信の相手装置の生存が確認される。
(Processing of TCP keep-alive timer 109)
Next, a processing flow of the TCP keep alive timer 109 in the protocol processing unit 106 will be described with reference to FIG. In TCP, the connection is maintained even in an idle state (a state of being connected but not being transmitted / received). On the other hand, in TCP, when an idle state lasts for a long time, a function called TCP keep alive is implemented in order to detect whether the connection with the communication partner apparatus is normally maintained. TCP keep-alive is described in RFC1122 of IETF. In the TCP keep alive function, a timer is started when an idle state is entered, and when the timer times out, an inspection packet is transmitted to confirm the existence of a communication partner device.

図3の処理は、通信中であるTCPコネクションに対して実行され、また、プロトコル処理部106における周期的なタイマ処理として実装される。一般に、TCPキープアライブタイマのタイムアウト時間は秒単位で定められ、時間計測の精度は重要でない。このため、本実施形態では、図3の処理は、TCP接続ごとに約1秒に1回、周期的に実行されるものとする。   The process of FIG. 3 is executed for a TCP connection that is in communication, and is implemented as a periodic timer process in the protocol processing unit 106. In general, the timeout period of the TCP keep alive timer is determined in seconds, and the accuracy of time measurement is not important. For this reason, in this embodiment, the process of FIG. 3 shall be periodically performed about once per second for every TCP connection.

図3の処理において、TCPキープアライブタイマ109は、まず、前回の本処理実行後、送信または受信処理を実行したかを確認する(S301)。この結果、送信または受信処理を実行していた場合(S301でYES)、TCPキープアライブタイマ109は、アイドル状態の計時時間をリセットしてゼロとして(S303)、処理を終了する。一方、送信または受信処理を実行していなかった場合(S301でNO)、アイドル状態の計時時間を加算する(S302)。その後、TCPキープアライブタイマ109は、現在の計時時間が、タイムアウトとなる所定時間以上であるかを判定する(S304)。TCPキープアライブタイマ109は、現在の計時時間が所定時間以上でない場合(S304でNO)は、そのまま処理を終了する。一方、TCPキープアライブタイマ109は、現在の計時時間が所定時間以上の場合(S304でYES)、タイムアウトが発生したと判定し、計時を停止する(S305)。具体的には、TCPキープアライブタイマ109は、対象のTCP接続について、次回の図3の処理が実行されないようにする。その後、TCPキープアライブタイマ109は、タイムアウト処理を起動して(S306)、処理を終了する。このタイムアウト処理については後述する。   In the process of FIG. 3, the TCP keep alive timer 109 first confirms whether the transmission or reception process has been executed after the previous execution of this process (S301). As a result, when the transmission or reception process is being executed (YES in S301), the TCP keep alive timer 109 resets the time count in the idle state to zero (S303) and ends the process. On the other hand, if transmission or reception processing has not been executed (NO in S301), the idle time count is added (S302). Thereafter, the TCP keep alive timer 109 determines whether or not the current timing is equal to or longer than a predetermined time for timeout (S304). The TCP keep alive timer 109 ends the process as it is when the current time is not longer than the predetermined time (NO in S304). On the other hand, if the current timekeeping time is equal to or longer than the predetermined time (YES in S304), the TCP keep alive timer 109 determines that a timeout has occurred and stops timekeeping (S305). Specifically, the TCP keep alive timer 109 prevents the next process of FIG. 3 from being executed for the target TCP connection. Thereafter, the TCP keep alive timer 109 activates a timeout process (S306) and ends the process. This timeout process will be described later.

(第2更新部108の処理)
次に、プロトコル処理部106における、第2更新部108の処理の流れについて、図4、図5、及び図6を用いて説明する。図4は、図3のS306でTCPキープアライブタイマ109がタイムアウト処理を行うことにより開始される、第2更新部108が実行する処理の流れの例を示している。
(Processing of the second update unit 108)
Next, the processing flow of the second update unit 108 in the protocol processing unit 106 will be described with reference to FIGS. 4, 5, and 6. FIG. 4 shows an example of the flow of processing executed by the second update unit 108, which is started when the TCP keep alive timer 109 performs time-out processing in S306 of FIG.

第2更新部108は、処理が始まると、まず、TCP接続の自局のIPアドレスを送信元IPアドレスとし、通信の相手装置のIPアドレスを宛先IPアドレスとして、ルーティングキャッシュ情報がキャッシュされているかを判定する(S401)。ここで、ルーティングキャッシュ情報がキャッシュされていない場合(S401でNO)は、自局内に相手装置へのRCPMTUが保持されていないこととなる。このため、第2更新部108は、送信インタフェースのMTU(以下、IFMTUと呼ぶ。)と、そのインタフェースが接続するローカルネットワークリンクのMTU(以下、LLMTUと呼ぶ。)のいずれかの小さい値となるように、TCPMTUの値を更新する(S404)。   When the process starts, the second update unit 108 first caches the routing cache information with the IP address of the local station of the TCP connection as the source IP address and the IP address of the communication partner device as the destination IP address. Is determined (S401). Here, when the routing cache information is not cached (NO in S401), the RCPMTU for the partner apparatus is not held in the own station. For this reason, the second update unit 108 has a smaller value of either the MTU of the transmission interface (hereinafter referred to as IFMTU) or the MTU of the local network link to which the interface is connected (hereinafter referred to as LLMTU). Thus, the value of TCPMTU is updated (S404).

一方、第2更新部108は、ルーティングキャッシュ情報をキャッシュしている場合(S401でYES)、そのルーティングキャッシュ情報に対応するRCPMTUの値が、IFMTU及びLLMTUの小さい方の値よりも小さいかを判定する(S402)。RCPMTUの値がIFMTU及びLLMTUの小さい方の値よりも小さい場合(S402でYES)、第2更新部108は、TCPMTUの値を、RCPMTUの値となるように更新する(S403)。一方、RCPMTUの値がIFMTU及びLLMTUの小さい方の値以上である場合(S402でNO)、IFMTU及びLLMTUの小さい方の値となるように、TCPMTUの値を更新する(S404)。なお、第2更新部108による更新では、TCPMTUの値は更新前により大きくなってもよい。最後に、第2更新部108は、TCPキープアライブ機能としての通信の相手装置の生存を確認するとともに、その相手装置のPMTUを推定するためのPMTUD処理を実行し(S405)、処理を終了する。   On the other hand, when the routing cache information is cached (YES in S401), the second update unit 108 determines whether the value of RCPMTU corresponding to the routing cache information is smaller than the smaller value of IFMTU and LLMTU. (S402). When the value of RCPMTU is smaller than the smaller value of IFMTU and LLMTU (YES in S402), the second update unit 108 updates the value of TCPMTU to be the value of RCPMTU (S403). On the other hand, when the value of RCPMTU is equal to or larger than the smaller value of IFMTU and LLMTU (NO in S402), the value of TCPMTU is updated so as to be the smaller value of IFMTU and LLMTU (S404). In the update by the second update unit 108, the value of the TCP MTU may be larger before the update. Finally, the second update unit 108 confirms the existence of the partner device for communication as the TCP keep alive function, executes the PMTUD process for estimating the PMTU of the partner device (S405), and ends the process. .

次に、S405の処理の詳細について、図5を用いて説明する。図5は、PMTUDに対応したTCPキープアライブ検査処理の流れを示している。まず、第2更新部108は、処理が開始されると、キープアライブ検査パケットの送信回数をゼロにクリアする(S501)。続いて、第2更新部108は、キープアライブ検査パケットの送信回数が既定数以下であるかを判定する(S502)。なお、初期的には、キープアライブ検査パケットの送信回数は0であるため、第2更新部108は、処理をS503へ進める。なお、第2更新部108は、キープアライブ検査パケットの送信回数が既定数を超えており、規定回数の検査パケットの送信に対して相手装置からの応答がなかったと判定すると(S502でNO)、そのTCP接続をクローズする(S510)。その後、第2更新部108は、処理を終了する。   Next, details of the processing of S405 will be described with reference to FIG. FIG. 5 shows a flow of a TCP keep alive inspection process corresponding to PMTUD. First, when the processing is started, the second updating unit 108 clears the number of keep-alive inspection packet transmissions to zero (S501). Subsequently, the second update unit 108 determines whether the number of transmissions of the keep alive inspection packet is equal to or less than a predetermined number (S502). Initially, since the number of transmissions of the keep-alive inspection packet is 0, the second update unit 108 advances the process to S503. If the second updating unit 108 determines that the number of keep-alive inspection packet transmissions exceeds the predetermined number and there is no response from the partner device for transmission of the specified number of inspection packets (NO in S502), The TCP connection is closed (S510). Thereafter, the second update unit 108 ends the process.

一方、第2更新部108は、S503においてキープアライブ検査パケットを送信し、続いて、その検査パケットに対して、Packet−Too−Bigが受信されたかを判定する(S504)。そして、第2更新部108は、Packet−Too−Bigが受信されたと判定すると(S504でYES)、Packet−Too−Bigによって通知されたTBPMTUとなるように、そのTCP通信のTCPMTUを更新する(S505)。なお、このS505の処理は、第1更新部107が実行してもよく、第1更新部107は、この時に、併せて、RCPMTUを更新してもよい。また、TCPMTUの更新は、Packet−Too−Bigが受信されたときに、その経路情報と送信元・宛先アドレスが一致する全てのTCP接続について実行されてもよいし、図3でタイムアウトが発生したTCP接続についてのみ実行されてもよい。なお、キープアライブ検査パケットが相手装置に到着していない場合に、S505の処理が実行される。したがって、第2更新部108は、処理をS505からS503へ戻し、続いて、更新されたTCPMTUで検査パケットを作成して送信する。すなわち、S503〜S505の処理が繰り返され、これにより相手装置へのPMTUDが実現される。   On the other hand, the second updating unit 108 transmits a keep-alive inspection packet in S503, and then determines whether a Packet-Too-Big is received for the inspection packet (S504). If the second updating unit 108 determines that the Packet-Too-Big has been received (YES in S504), the second updating unit 108 updates the TCP MTU of the TCP communication so that the TBPMTU notified by the Packet-Too-Big is obtained ( S505). Note that the process of S505 may be executed by the first updating unit 107, and the first updating unit 107 may update the RCPMTU at this time. Also, when the TCP-MTU is updated, when the Packet-Too-Big is received, it may be executed for all TCP connections in which the route information matches the source / destination address, or a timeout has occurred in FIG. It may be performed only for TCP connections. If the keep alive inspection packet has not arrived at the counterpart device, the process of S505 is executed. Therefore, the second updating unit 108 returns the process from S505 to S503, and subsequently creates and transmits an inspection packet with the updated TCP MTU. That is, the processing of S503 to S505 is repeated, thereby realizing PMTUD to the counterpart device.

ここで、S503において送信されるキープアライブ検査パケットの作成方法について、図6を参照して説明する。図6は、TCP接続ごとに管理される送信シーケンス番号列と通信の相手装置の受信ウィンドウとの関係を表している。図6では、送信シーケンス番号601がそれぞれの四角形で表される送信データに付されており、右から左へ番号が大きくなるように一列に並んでいる状態を示している。602の位置のシーケンス番号までが、送信及び受信済みのデータ603である。すなわち、602は、現在の送信済みのデータのうち、最大のシーケンス番号のものを示している。そして右隣の604のデータは、相手装置が次に受信すべきデータである。606の太破線の枠線は、相手装置の受信ウィンドウを示す。つまり、通信の相手装置は、現在、604から605までの範囲の送信シーケンス番号のデータを受信することができることを示している。この受信ウィンドウの範囲長は、例えば、相手装置の受信ウィンドウサイズ607と一致する。   Here, a method of creating a keep-alive inspection packet transmitted in S503 will be described with reference to FIG. FIG. 6 shows the relationship between the transmission sequence number sequence managed for each TCP connection and the reception window of the communication partner apparatus. In FIG. 6, a transmission sequence number 601 is attached to transmission data represented by each square, and shows a state in which the numbers are arranged in a line so that the numbers increase from right to left. Up to the sequence number at the position 602 is transmitted and received data 603. That is, reference numeral 602 indicates the data with the maximum sequence number among the currently transmitted data. The data 604 on the right is data that the partner apparatus should receive next. A thick broken line 606 indicates a reception window of the partner apparatus. That is, it is shown that the communication partner apparatus can currently receive data of transmission sequence numbers in the range of 604 to 605. The range length of the reception window matches, for example, the reception window size 607 of the partner apparatus.

本実施形態では、キープアライブ検査パケットとして、ペイロードデータを有するTCPパケットが作成される。ここで、キープアライブ検査パケットを作成して送信するのは、図3のS306でタイムアウトが発生した時であり、TCP接続においてデータの送信と受信とが行われていないアイドル状態である。したがって、このペイロードデータは、受信装置において破棄されてもよいデータでありうる。このため、第2更新部108は、送信するキープアライブ検査パケットにおいて、それまでに受信が完了しているデータに関するシーケンス番号を進めないようにシーケンス番号を設定して、相手装置にデータを破棄させた上でACKを送信させる。具体的には、第2更新部108は、ペイロードの最後尾の1オクテットデータの送信シーケンス番号が602のデータのものと同じとなるように、キープアライブ検査パケットを作成する。さらに、検査パケットのIPパケットでは、その全長が(例えば図4のS403又はS404で更新された)TCPMTUに一致するように、ペイロードサイズが決定される。ここで、609は決定したペイロードサイズを示しており、608のデータに対応するシーケンス番号が、検査パケットのTCPヘッダに格納される。これにより、検査パケットが相手装置まで到達しても、そのペイロードデータの全てが相手装置の受信ウィンドウ606から外れているため、相手装置はそのペイロードデータを受信しない(破棄する)。また、相手装置は、次に受信すべき604のデータに関するシーケンス番号をACK番号とする受信応答を返信することになる。このため、キープアライブ検査パケットの機能を果たすことができる。一方、キープアライブ検査パケットのIPパケット長はTCPMTUとなっている。このため、現在のTCPMTUよりも、相手装置までの通信経路に関するPMTUが小さい場合、経路途中のルータからPacket−Too−Bigメッセージが返信され、通信装置には、TBPMTUが通知されることになる。この場合、第2更新部108は、図5のS504においてPacket−Too−Bigメッセージを受信することとなり、S505において、TCPMTUがTBPMTUに更新される。これにより、次にS503でキープアライブ検査パケットが再送信されるときには、検査パケットのペイロードサイズは、更新されたTCPMTUの値に一致するように設定されることにより、小さくなる。   In this embodiment, a TCP packet having payload data is created as the keep alive inspection packet. Here, the keep-alive inspection packet is created and transmitted when the time-out occurs in S306 of FIG. 3, and is in an idle state in which data transmission and reception are not performed in the TCP connection. Therefore, this payload data may be data that may be discarded at the receiving device. For this reason, the second updating unit 108 sets the sequence number in the keep-alive inspection packet to be transmitted so as not to advance the sequence number related to the data that has been received so far, and causes the partner device to discard the data. Then send ACK. Specifically, the second update unit 108 creates a keep-alive check packet so that the transmission sequence number of the last one octet data of the payload is the same as that of the data 602. Further, in the IP packet of the inspection packet, the payload size is determined so that the total length thereof matches the TCP MTU (updated in S403 or S404 in FIG. 4 for example). Here, 609 indicates the determined payload size, and the sequence number corresponding to the data 608 is stored in the TCP header of the inspection packet. As a result, even if the inspection packet reaches the counterpart device, all of the payload data is out of the reception window 606 of the counterpart device, so that the counterpart device does not receive (discard) the payload data. In addition, the partner apparatus returns a reception response with the sequence number related to the data 604 to be received next as the ACK number. Therefore, the function of the keep alive inspection packet can be achieved. On the other hand, the IP packet length of the keep alive inspection packet is TCPMTU. For this reason, when the PMTU related to the communication path to the partner apparatus is smaller than the current TCP MTU, a Packet-Too-Big message is returned from the router in the middle of the path, and the TBPMTU is notified to the communication apparatus. In this case, the second update unit 108 receives the Packet-Too-Big message in S504 of FIG. 5, and the TCP MTU is updated to TBPMTU in S505. As a result, when the keep-alive inspection packet is retransmitted in S503 next time, the payload size of the inspection packet is set to be equal to the updated value of the TCP MTU, thereby decreasing.

図5に戻り、S504においてPacket−Too−Bigメッセージを受信していない場合(S504でNO)、第2更新部108は、続いて、キープアライブ検査パケットに対するACK(受信確認応答)を受信したかを確認する(S506)。そして、第2更新部108は、ACKを受信した場合(S506でYES)、相手装置が生存していることを確認できたため、TCPキープアライブタイマをリセットし(S509)、処理を終了する。   Returning to FIG. 5, if the Packet-Too-Big message has not been received in S504 (NO in S504), has the second update unit 108 subsequently received an ACK (reception confirmation response) for the keep-alive inspection packet? Is confirmed (S506). When receiving the ACK (YES in S506), the second updating unit 108 has confirmed that the counterpart device is alive, resets the TCP keep alive timer (S509), and ends the process.

一方、第2更新部108は、ACKを受信しなかった場合(S506でNO)、続いて、送信したキープアライブ検査パケットへの応答待ちの経過時間がタイムアウトしたかを確認する(S507)。なお、ここでの応答待ちのタイムアウト時間は、一定の時間でもよいし、キープアライブ検査パケットの送信回数の増加に従って増加させてもよい。第2更新部108は、応答待ちがタイムアウトした場合(S507でYES)、検査パケット送信回数を1だけ増加させ(S508)、処理をS502へ戻す。ここで、検査パケット送信回数が規定数を超えると(S502でNO)、TCP接続がクローズされることとなる。一方、第2更新部108は、応答待ちがタイムアウトしていない場合(S507でNO)、タイムアウトするまで、Packet−Too−Bigメッセージの受信と、相手装置からのACKの受信とのいずれかを待ち受ける。   On the other hand, if the second update unit 108 has not received an ACK (NO in S506), the second updating unit 108 subsequently checks whether an elapsed time for waiting for a response to the transmitted keep-alive inspection packet has timed out (S507). Here, the timeout time for waiting for a response may be a fixed time, or may be increased as the number of keep-alive inspection packet transmissions increases. If the waiting for response times out (YES in S507), the second update unit 108 increases the number of inspection packet transmissions by 1 (S508), and returns the process to S502. Here, when the number of inspection packet transmissions exceeds the specified number (NO in S502), the TCP connection is closed. On the other hand, when the response waiting has not timed out (NO in S507), the second updating unit 108 waits for either the reception of a Packet-Too-Big message or the reception of an ACK from the counterpart device until the time-out occurs. .

以上のように、本実施形態では、各TCP接続のTCPMTUは、第1更新部107と第2更新部108の何れかによって更新されうる。このとき、本実施形態では、RCPMTUの有効期限が経過してその値がリセットされても、そのRCPMTUに基づいて定められる、TCP接続のTCPMTUについては、直ちに更新されない。すなわち、通信装置は、TCP接続について、その送信と受信とが行われていない時間が所定時間以上となるまでは、TCPMTUの更新を制限する。ここでの制限は、例えば、TCPMTUの更新を行わないこと、又は、TCPMTUの値を小さくする更新のみを認めること、などを含む。一方、通信装置は、送信と受信とが行われていない時間が所定時間以上となった場合には、TCPMTUの更新の制限を解除する。すなわち、通信装置は、送信と受信とが行われていない時間が所定時間以上となった場合に、TCPMTUを更新し、又は、TCPMTUの値を大きくする更新をも認める。これにより、TCP接続に係る通信が行われていない期間に送信セグメントの更新を行うため、その通信のスループットへの影響を抑えることができる。したがって、このような構成によって、送信セグメントサイズの更新に伴う、再送の発生の防止及びスループットの劣化の防止を達成することができる。   As described above, in this embodiment, the TCP MTU of each TCP connection can be updated by either the first update unit 107 or the second update unit 108. At this time, in this embodiment, even if the expiration date of the RCPMTU elapses and the value is reset, the TCPMTU of the TCP connection determined based on the RCPMTU is not immediately updated. That is, the communication apparatus limits the update of the TCP MTU until the time during which the transmission and reception of the TCP connection is not performed exceeds a predetermined time. The restriction here includes, for example, not updating the TCP MTU, or allowing only an update that decreases the value of the TCP MTU. On the other hand, when the time during which transmission and reception are not performed becomes equal to or longer than a predetermined time, the communication device releases the restriction on updating the TCP MTU. That is, the communication device also updates the TCP MTU or increases the value of the TCP MTU when the time during which transmission and reception are not performed becomes a predetermined time or more. Thereby, since the transmission segment is updated during a period in which communication related to the TCP connection is not performed, it is possible to suppress the influence on the throughput of the communication. Therefore, with such a configuration, it is possible to prevent the occurrence of retransmission and the deterioration of throughput due to the update of the transmission segment size.

<<実施形態2>>
本実施形態では、個々のTCP接続の接続継続時間が計時され、TCPキープアライブタイマのタイムアウト発生時に、キープアライブタイムアウト処理の中でTCPMTUを更新するか否かが、その継続時間に基づいて決定される処理について説明する。図7に、本実施形態において、第2更新部108が実行するTCPキープアライブタイマのタイムアウト処理の流れの例を示す。なお、図7において、図4の処理と同様の処理については、同じ参照符号を付して、その説明を省略する。
<< Embodiment 2 >>
In this embodiment, the connection continuation time of each TCP connection is timed, and when a TCP keep alive timer timeout occurs, whether to update the TCP MTU in the keep alive timeout process is determined based on the duration. The processing will be described. FIG. 7 shows an example of a flow of timeout processing of the TCP keep alive timer executed by the second update unit 108 in the present embodiment. In FIG. 7, the same processes as those in FIG. 4 are denoted by the same reference numerals, and the description thereof is omitted.

第2更新部108は、実施形態1の図4の処理と同様に、図3のS307においてTCPキープアライブタイマのタイムアウト処理が起動されると、図7の処理を開始する。本処理では、第2更新部108は、TCP接続の継続時間が、所定時間より大きいかどうかを調べ(S701)、この所定時間よりも継続時間が大きい場合にのみ、キープアライブタイマのタイムアウト処理において、TCPMTUを更新する。具体的には、第2更新部108は、TCP接続の継続時間が所定時間より大きい場合(S701でYES)、図4のS401〜S405と同様にして、TCPMTUの値を更新して、TCPMTU更新対応のTCPキープアライブ検査処理を実行する。なお、TCPキープアライブ検査処理については、実施形態1と同様に、図5の処理が実行される。その後、第2更新部108は、TCP接続の継続時間をリセットして、計時を再開し(S702)、処理を終了する。一方、第2更新部108は、TCP接続の継続時間が所定時間以下である場合(S701でNO)、TCPMTUの更新を伴わない、通常のTCPキープアライブ検査処理を実行する(S703)。S703では、TCP通信の相手装置が生存しているか否かの検査のみが実行される。その後、第2更新部108は処理を終了する。   Similar to the process of FIG. 4 of the first embodiment, the second update unit 108 starts the process of FIG. 7 when the timeout process of the TCP keep-alive timer is activated in S307 of FIG. In this process, the second update unit 108 checks whether the duration of the TCP connection is longer than a predetermined time (S701), and only in the time-out process of the keep alive timer when the duration is longer than the predetermined time. , TCPMTU is updated. Specifically, when the duration of the TCP connection is longer than the predetermined time (YES in S701), the second update unit 108 updates the TCPMTU value and updates the TCPMTU in the same manner as in S401 to S405 of FIG. A corresponding TCP keep-alive inspection process is executed. As for the TCP keep alive inspection process, the process of FIG. 5 is executed as in the first embodiment. Thereafter, the second update unit 108 resets the duration of the TCP connection, restarts timing (S702), and ends the process. On the other hand, if the duration of the TCP connection is equal to or shorter than the predetermined time (NO in S701), the second update unit 108 executes a normal TCP keep alive inspection process that does not involve updating the TCP MTU (S703). In S703, only a check is performed to determine whether the TCP communication partner device is alive. Thereafter, the second update unit 108 ends the process.

このように、本実施形態では、TCP接続の経過時間によって、TCPキープアライブタイマのタイムアウト処理において、TCPMTUを更新するかが決定される。一般的に、TCPキープアライブタイマのタイムアウト時間は設定可能なパラメータとして実装され、例えば、短い時間間隔でタイムアウトが発生しうる。そして、この場合に、タイムアウトが発生する度にTCPMTUを更新すると、結果としてスループットが劣化し得る。これに対して、本実施形態によれば、TCPキープアライブタイマのタイムアウト時間が小さく設定された場合であっても、TCP接続の継続時間に基づいて、十分な時間が経過した場合にのみTCPMTUが更新されるようにすることが可能となる。なお、本実施形態では、他の構成については実施形態1と同様であるため、実施形態1と同様の効果を得ることも可能である。   Thus, in this embodiment, whether to update the TCP MTU in the timeout process of the TCP keep alive timer is determined according to the elapsed time of the TCP connection. Generally, the timeout period of the TCP keep alive timer is implemented as a configurable parameter, and for example, a timeout may occur at a short time interval. In this case, if the TCP MTU is updated every time a timeout occurs, the throughput may deteriorate as a result. On the other hand, according to the present embodiment, even when the timeout time of the TCP keep alive timer is set to be small, the TCP MTU is only displayed when a sufficient time has elapsed based on the duration of the TCP connection. It becomes possible to be updated. In addition, in this embodiment, since it is the same as that of Embodiment 1 about another structure, it is also possible to acquire the effect similar to Embodiment 1. FIG.

なお、実施形態1及び2は、ともに、第2更新部108がキープアライブ検査パケットを利用したPMTUDを実行すると説明した。しかしながら、他のPMTUDの方法が、PMTUを推定するのに用いられてもよい。例えば、第2更新部108は、ICMPエコーリクエストパケットを使用して、PMTUDを実行してもよい。また、通信装置が、さらに他のPMTUDの処理機能を有し、第2更新部108がそのPMTUD処理を起動するようにしてもよい。また、実施形態1及び2は、ともに、データ通信のプロトコルとしてTCPが用いられる例について説明したが、データ通信がアイドル状態を検出可能な他のプロトコルが用いられてもよい。   In addition, both Embodiment 1 and 2 demonstrated that the 2nd update part 108 performed PMTUD using the keep alive test | inspection packet. However, other PMTUD methods may be used to estimate the PMTU. For example, the second update unit 108 may execute PMTUD using an ICMP echo request packet. Further, the communication apparatus may further have another PMTUD processing function, and the second update unit 108 may activate the PMTUD process. Moreover, although both Embodiment 1 and 2 demonstrated the example which uses TCP as a protocol of data communication, the other protocol which can detect an idle state in data communication may be used.

<<その他の実施形態>>
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
<< Other Embodiments >>
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

106:プロトコル制御部、107:第1更新部、108:第2更新部、109:TCPキープアライブタイマ   106: Protocol control unit 107: First update unit 108: Second update unit 109: TCP keep-alive timer

Claims (7)

他の装置までの通信経路に応じて特定された当該通信経路において一度に送信可能な第1のデータ量に基づいて定まる、前記他の装置との接続において一度に送信可能なデータ量に関する第2のデータ量更新処理を行う更新手段と、
前記第1のデータ量の有効期限が切れていても、前記接続において信号の送信と受信とが行われていない時間が所定時間以上となるまでは、
1)前記第2のデータ量を小さくする場合には前記更新手段による当該第2のデータ量の更新処理を行い、
2)前記第2のデータ量を大きくする場合には前記更新手段による当該第2のデータ量の更新を行わない、
ように前記更新手段を制御する制御手段と、
を有することを特徴とする通信装置。
A second data amount that is determined based on a first data amount that can be transmitted at one time on the communication path specified according to the communication path to the other device, and that can be transmitted at a time in connection with the other device. and updating means for performing the data amount of the update processing,
Even if the expiration date of the first data amount has expired , until the time when signal transmission and reception are not performed in the connection becomes a predetermined time or more,
1) When the second data amount is to be reduced, the updating means updates the second data amount,
2) When the second data amount is increased, the updating unit does not update the second data amount.
And control means for controlling the updating means so that,
A communication apparatus comprising:
前記更新手段は、前記時間が所定時間以上となった場合に、前記第2のデータ量の更新処理を行うことを特徴とする請求項に記載の通信装置。 It said updating means, the communication apparatus according to claim 1, wherein the time when it becomes a predetermined time or more, and performs update processing of the second data volume. 前記更新手段は、更新した後の前記第2のデータ量のデータを有する信号を前記他の装置へ宛てて送信して、当該信号が前記他の装置に届かなかった場合、前記第2のデータ量を小さくするように、さらなる当該第2のデータ量の更新処理を行うことを特徴とする請求項に記載の通信装置。 The update means transmits the signal having the second data amount after the update to the other device, and when the signal does not reach the other device, the second data The communication apparatus according to claim 2 , wherein further updating processing of the second data amount is performed so as to reduce the amount. 前記信号は、前記接続が生存しているかを確認するためのパケットであることを特徴とする請求項に記載の通信装置。 The communication apparatus according to claim 3 , wherein the signal is a packet for confirming whether the connection is alive. 前記更新手段は、さらに、前記時間が所定時間以上となった場合であって、前記第1のデータ量の有効期限が切れている場合、前記第1のデータ量を更新することを特徴とする請求項1からのいずれか1項に記載の通信装置。 The updating means further updates the first data amount when the time has reached a predetermined time or more and the expiration date of the first data amount has expired. The communication apparatus according to any one of claims 1 to 4 . 他の装置までの通信経路に応じて特定された当該通信経路において一度に送信可能な第1のデータ量に基づいて定まる、前記他の装置との接続において一度に送信可能なデータ量に関する第2のデータ量更新処理を行う更新手段を有する通信装置の制御方法であって、
前記第1のデータ量の有効期限が切れていても、前記接続において信号の送信と受信とが行われていない時間が所定時間以上となるまでは、
1)前記第2のデータ量を小さくする場合には前記更新手段による当該第2のデータ量の更新処理を行い、
2)前記第2のデータ量を大きくする場合には前記更新手段による当該第2のデータ量の更新を行わない、
ように前記更新手段を制御する工程を有することを特徴とする制御方法。
A second data amount that is determined based on a first data amount that can be transmitted at one time on the communication path specified according to the communication path to the other device, and that can be transmitted at a time in connection with the other device. A communication device control method having an update means for performing update processing of the data amount of
Even if the expiration date of the first data amount has expired , until the time when signal transmission and reception are not performed in the connection becomes a predetermined time or more,
1) When the second data amount is to be reduced, the updating means updates the second data amount,
2) When the second data amount is increased, the updating unit does not update the second data amount.
Control method characterized by comprising the step of controlling the updating means so.
他の装置までの通信経路に応じて特定された当該通信経路において一度に送信可能な第1のデータ量に基づいて定まる、前記他の装置との接続において一度に送信可能なデータ量に関する第2のデータ量更新処理を行う更新手段を有する通信装置に備えられたコンピュータに、
前記第1のデータ量の有効期限が切れていても、前記接続において信号の送信と受信とが行われていない時間が所定時間以上となるまでは、
1)前記第2のデータ量を小さくする場合には前記更新手段による当該第2のデータ量の更新処理を行い、
2)前記第2のデータ量を大きくする場合には前記更新手段による当該第2のデータ量の更新を行わない、
ように前記更新手段を制御する工程を実行させるためのプログラム。
A second data amount that is determined based on a first data amount that can be transmitted at one time on the communication path specified according to the communication path to the other device, and that can be transmitted at a time in connection with the other device. In a computer provided in a communication apparatus having an update means for performing update processing of the data amount of
Even if the expiration date of the first data amount has expired , until the time when signal transmission and reception are not performed in the connection becomes a predetermined time or more,
1) When the second data amount is to be reduced, the updating means updates the second data amount,
2) When the second data amount is increased, the updating unit does not update the second data amount.
Program for executing a process of controlling the updating means so.
JP2015110794A 2015-05-29 2015-05-29 Communication device, control method, and program Active JP6478816B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015110794A JP6478816B2 (en) 2015-05-29 2015-05-29 Communication device, control method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015110794A JP6478816B2 (en) 2015-05-29 2015-05-29 Communication device, control method, and program

Publications (3)

Publication Number Publication Date
JP2016225847A JP2016225847A (en) 2016-12-28
JP2016225847A5 JP2016225847A5 (en) 2018-02-08
JP6478816B2 true JP6478816B2 (en) 2019-03-06

Family

ID=57748638

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015110794A Active JP6478816B2 (en) 2015-05-29 2015-05-29 Communication device, control method, and program

Country Status (1)

Country Link
JP (1) JP6478816B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101922980B1 (en) * 2017-02-02 2018-11-28 주식회사 시큐아이 Network device and packet transmission method of the network device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5892753A (en) * 1996-12-02 1999-04-06 International Business Machines Corporation System and method for dynamically refining PMTU estimates in a multimedia datastream internet system
JP2003018216A (en) * 2001-07-04 2003-01-17 Toyo Commun Equip Co Ltd Ip packet transmission procedure

Also Published As

Publication number Publication date
JP2016225847A (en) 2016-12-28

Similar Documents

Publication Publication Date Title
US8121135B2 (en) Discovering path maximum transmission unit size
EP3520267B1 (en) Router with bilateral tcp session monitoring
JP4248550B2 (en) TCP congestion control system and method using multi-TCP acknowledgment
US7483376B2 (en) Method and apparatus for discovering path maximum transmission unit (PMTU)
US8751669B2 (en) Method and arrangement to maintain a TCP connection
US8085669B2 (en) Session relay device and session relay method
JP5867188B2 (en) Information processing apparatus, congestion control method, and congestion control program
US20080101382A1 (en) Efficient method for discovering path mtu for tcp connections
CN104025525A (en) Notification by network element of packet drops
US11677675B2 (en) Method and system for determining a path maximum transmission unit (MTU) between endpoints of a generic routing encapsulation (GRE) tunnel
US9503362B2 (en) Reverse path maximum transmission unit (PMTU) discovery
JP7054737B2 (en) How to determine passive round-trip time (RTT) delay in a communication system
US7304959B1 (en) Utility based filtering mechanism for PMTU probing
Gomez et al. Tcp usage guidance in the internet of things (iot)
JP5832335B2 (en) Communication apparatus and communication system
CN108432287A (en) A kind of data transmission method and network side equipment
JP2008118281A (en) Communication device
JP6478816B2 (en) Communication device, control method, and program
EP1460804A2 (en) System and method for handling out-of-order frames (fka reception of out-of-order tcp data with zero copy service)
US9525629B2 (en) Method and apparatus for transmitting data packets
Liu et al. A unified tcp enhancement for wireless mesh networks
WO2020173384A1 (en) Communication method, device, and system
US20140369189A1 (en) Method of controlling packet transmission in network system and network system transmitting packet using pseudo-tcp agent
JP2009231986A (en) Communication device
Gomez et al. RFC 9006: TCP Usage Guidance in the Internet of Things (IoT)

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171220

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181011

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181022

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181214

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190107

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190205

R151 Written notification of patent or utility model registration

Ref document number: 6478816

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151