Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5458957B2 - Communication apparatus, traffic amount control method, and program - Google Patents
[go: Go Back, main page]

JP5458957B2 - Communication apparatus, traffic amount control method, and program - Google Patents

Communication apparatus, traffic amount control method, and program Download PDF

Info

Publication number
JP5458957B2
JP5458957B2 JP2010044338A JP2010044338A JP5458957B2 JP 5458957 B2 JP5458957 B2 JP 5458957B2 JP 2010044338 A JP2010044338 A JP 2010044338A JP 2010044338 A JP2010044338 A JP 2010044338A JP 5458957 B2 JP5458957 B2 JP 5458957B2
Authority
JP
Japan
Prior art keywords
token
bucket
management table
amount
tokens
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2010044338A
Other languages
Japanese (ja)
Other versions
JP2011182186A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2010044338A priority Critical patent/JP5458957B2/en
Publication of JP2011182186A publication Critical patent/JP2011182186A/en
Application granted granted Critical
Publication of JP5458957B2 publication Critical patent/JP5458957B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Description

本明細書で議論される実施態様は、通信パケットの交換により行われるデータ通信におけるトラヒック量の制御技術に関する。   Embodiments discussed herein relate to a traffic volume control technique in data communication performed by exchanging communication packets.

通信ネットワーク間でのデータ通信を中継する中継装置において、受信した通信トラヒックを送信する際にそのトラヒック量をコントロールする技術のひとつとして、トークンバケット(Token Bucket)方式が知られている。このトークンバケット方式の原理について、図18を参照しながら説明する。   In a relay device that relays data communication between communication networks, a token bucket method is known as one of techniques for controlling the traffic volume when transmitting received communication traffic. The principle of this token bucket method will be described with reference to FIG.

図18において、バケット100には、一定の時間間隔でトークン101が補充される。このバケット100は、貯蔵最大量(トークン101を貯蔵可能な最大量)が予め定められており、貯蔵最大量を超えたトークン101は捨てられる。   In FIG. 18, the bucket 100 is replenished with tokens 101 at regular time intervals. In this bucket 100, the maximum storage amount (maximum amount that can store the token 101) is predetermined, and the token 101 exceeding the maximum storage amount is discarded.

トークン101にはデータ送信量が予め定められている。中継装置は、上流装置から受信した通信データパケット(以下、単に「パケット111」と記す)を下流装置へ送信する際に、パケット制御点110において、バケット100に貯蔵されているトークン101を、パケット111のサイズに応じた数nだけ消費する。但し、送信対象のパケット111のサイズに応じたトークン101の数がバケット100で不足している場合には、そのパケット111については送信対象とせずに廃棄(policing)する。   The token 101 has a predetermined data transmission amount. When the relay device transmits a communication data packet (hereinafter simply referred to as “packet 111”) received from the upstream device to the downstream device, the packet control point 110 uses the token 101 stored in the bucket 100 as a packet. A number n corresponding to the size of 111 is consumed. However, when the number of tokens 101 corresponding to the size of the packet 111 to be transmitted is insufficient in the bucket 100, the packet 111 is discarded without being targeted for transmission (policing).

以上のように、このトークンバケット方式では、必要な数のトークン101が貯蔵されていたことでパケット制御点110において廃棄されずに通過した送信対象のパケット111は、送信待ちの状態となる。このため、他のトラヒックの増大等の要因により送信対象のパケット111の送信が滞ると、その送信対象のパケット111は中継装置内に大量に滞留することとなる。また、その後にトラヒックの状況が回復すると、滞留していた送信対象のパケット111を今度は一気に吐き出すために当該パケット111が大量に送信されることになる。すると、下流の通信ネットワークでは、大量に送信されたパケット111が、しばらくの間輻輳を生じさせることがあった。   As described above, in this token bucket method, the packet 111 to be transmitted that has passed without being discarded at the packet control point 110 because the necessary number of tokens 101 are stored is in a transmission waiting state. For this reason, if transmission of the transmission target packet 111 is delayed due to other factors such as an increase in traffic, the transmission target packet 111 stays in a large amount in the relay apparatus. Further, when the traffic situation is recovered thereafter, a large amount of packets 111 are transmitted in order to discharge the staying transmission target packets 111 at once. Then, in the downstream communication network, the packet 111 transmitted in large quantities may cause congestion for a while.

このトークンバケット方式を採用した場合における下流の輻輳を抑制する技術に関して幾つかの技術が知られている。そのうちの第一の技術は、トークンが保持されるトークンバッファでトークンが減少している状態(減少状態)における通信データのスループットに基づいて、トークンバッファへのトークンの出力頻度の更新後の値を決定するというものである。この技術では、トークンバッファ内のトークンの減少が続いてやがて空の状態(枯渇状態)となった場合におけるトークンバッファへのトークンの出力頻度を、当該決定した値にする。更に、この技術では、この枯渇状態が所定時間継続した場合には、所定量のトークンをトークンバッファへ一気に追加して、トークンバッファを減少状態に遷移させる。   Several techniques are known regarding techniques for suppressing downstream congestion when this token bucket method is employed. The first of these is the updated value of the token output frequency to the token buffer based on the communication data throughput in the token buffer where tokens are held (decreasing state). It is to decide. In this technique, the token output frequency to the token buffer when the token in the token buffer continues to decrease and eventually becomes empty (depleted state) is set to the determined value. Furthermore, in this technique, when this depletion state continues for a predetermined time, a predetermined amount of tokens are added to the token buffer at a stretch, and the token buffer is shifted to a decrease state.

また、そのうちの第二の技術は、ネットワークとの接続に使用するリンクに対して設定可能な通信速度と、ネットワークに接続するリンクの混雑度を示すリンク輻輳情報とに基づいて、トークンバッファへのトークンの出力頻度を更新するというものである。   In addition, the second of these technologies uses a communication speed that can be set for a link used for connection to a network, and link congestion information that indicates a degree of congestion of the link connected to the network, to the token buffer. The token output frequency is updated.

特開2007−221529号公報JP 2007-221529 A 特開2008−5096号公報JP 2008-5096 A

前述した第一の技術においては、他のトラヒックの増大等の要因により通信データのスループットが低下すると、通信データの過大な滞留を回避するために、トークンバッファへのトークンの出力頻度を低下させる必要があると思われる。この結果、トークンバッファは減少状態となり、更には枯渇状態へと遷移する。その後、トークンバッファが枯渇状態に遷移してから所定時間後に所定量のトークンをトークンバッファへ追加して減少状態に遷移させる動作が行われる。ところが、このようにしてトークンをトークンバッファへ追加すれば、結局は、下流の通信ネットワークでしばらくの間輻輳を生じさせることになってしまう。ここで、トークンのトークンバッファへの追加量をゼロとしてしまうと、前述した要因が解消しても、トークンバッファが枯渇状態から抜け出せなくなってしまうため、通信データのスループットを元の状態に回復させることができなくなってしまうと考えられる。   In the first technique described above, when the communication data throughput decreases due to factors such as an increase in other traffic, it is necessary to reduce the frequency of token output to the token buffer in order to avoid excessive retention of communication data. There seems to be. As a result, the token buffer is reduced and further transitions to a depleted state. After that, a predetermined amount of tokens are added to the token buffer after a predetermined time after the token buffer transitions to a depletion state, and an operation of transitioning to a decrease state is performed. However, if tokens are added to the token buffer in this way, eventually, congestion will occur for a while in the downstream communication network. Here, if the amount of tokens added to the token buffer is set to zero, the token buffer will not be able to escape from the depleted state even if the above-mentioned factors are eliminated, so the communication data throughput will be restored to the original state. It is thought that will be impossible.

本発明は上述した問題に鑑みてなされたものであり、その解決しようとする課題は、通信パケットの滞留を少なくすると共に、通信データパケットの滞留の解消に起因する下流の通信ネットワークでの輻輳を減少させることである。   The present invention has been made in view of the above-described problems, and the problem to be solved is to reduce congestion of communication packets and reduce congestion in a downstream communication network due to elimination of retention of communication data packets. It is to reduce.

本明細書で後述する通信装置のひとつには、トークン量管理テーブルと、受信手段と、トークン量減少手段と、送信手段と、トークン量増加手段と、トークン量更新手段とを有するというものがある。このうち、トークン量管理テーブルは、総数が予め定められているトークンについての、該トークンを保持する第一バケット及び第二バケットの各々での保持個数を管理するテーブルである。受信手段は、通信データパケットを受信するものである。トークン量減少手段は、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を、該受信手段が受信した通信データパケットのサイズに応じた個数分減少させるものである。送信手段は、該受信手段が受信した通信データパケットを送信するものである。トークン量増加手段は、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を、該送信手段が送信した通信データパケットのサイズに応じた個数分増加させるものである。そして、トークン量更新手段は、該トークン量管理テーブルを更新するものである。なお、この更新は、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を所定の頻度で所定数ずつ減少させると共に該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を当該減少分だけ増加させるというものである。但し、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数が、該受信手段が受信した通信データパケットのサイズに応じた個数に満たない場合がある。この場合には、トークン量減少手段は、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を維持すると共に、該通信データパケットを該送信手段に送信させることなく廃棄するようにする。 One of the communication devices described later in this specification includes a token amount management table, a reception unit, a token amount decrease unit, a transmission unit, a token amount increase unit, and a token amount update unit. . Among these, the token amount management table is a table that manages the number of tokens held in each of the first bucket and the second bucket that hold the tokens for which the total number is predetermined. The receiving means is for receiving a communication data packet. The token amount reducing means decreases the number of tokens held in the first bucket in the token quantity management table by the number corresponding to the size of the communication data packet received by the receiving means. The transmitting means transmits the communication data packet received by the receiving means. The token amount increasing means increases the number of tokens held in the second bucket in the token amount management table by the number corresponding to the size of the communication data packet transmitted by the transmitting means. The token amount update means updates the token amount management table. This update decreases the number of tokens held in the second bucket in the token amount management table by a predetermined number at a predetermined frequency and reduces the number of tokens held in the first bucket in the token amount management table. The amount is increased by the decrease. However, there are cases where the number of tokens held in the first bucket in the token amount management table is less than the number corresponding to the size of the communication data packet received by the receiving means. In this case, the amount of token reducing means is configured to maintain the retention number of tokens in said first bucket in the token management table, the communication data packet to discard without transmitting to said transmission means To do.

また、本明細書で後述するトラヒック量の制御方法のひとつには、通信データパケットを受信する受信手段と該通信データパケットを送信する送信手段とを有する通信装置を用いて行うというものがある。この制御方法は、トークン量減少ステップと、トークン量増加ステップと、トークン量更新ステップとを有している。このうち、トークン量減少ステップは、管理するトークン量管理テーブルにおける、第一バケットでのトークンの保持個数を、該受信手段が受信した通信データパケットのサイズに応じた個数分減少させるというものである。なお、トークン量管理テーブルは、総数が予め定められているトークンについての、該トークンを保持する第一バケット及び第二バケットの各々での保持個数を管理するテーブルである。また、トークン量増加ステップは、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を、該送信手段が送信した通信データパケットのサイズに応じた個数分増加させるというものである。そして、トークン量更新ステップは、該トークン量管理テーブルを更新するというものである。なお、この更新は、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を所定の頻度で所定数減少させると共に該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を当該減少分だけ増加させるというものである。但し、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数が、該受信手段が受信した通信データパケットのサイズに応じた個数に満たない場合がある。この場合には、該トークン量減少ステップでは、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を維持すると共に、該通信データパケットを該送信手段に送信させることなく廃棄するようにする。   In addition, as one of the traffic volume control methods described later in this specification, there is a method of performing using a communication apparatus having a reception unit that receives a communication data packet and a transmission unit that transmits the communication data packet. This control method includes a token amount decrease step, a token amount increase step, and a token amount update step. Among these, the token amount reduction step is to reduce the number of tokens held in the first bucket in the token amount management table to be managed by the number corresponding to the size of the communication data packet received by the receiving means. . The token amount management table is a table that manages the number of tokens held in each of the first bucket and the second bucket that hold the tokens for tokens whose total number is predetermined. In the token amount increasing step, the number of tokens held in the second bucket in the token amount management table is increased by the number corresponding to the size of the communication data packet transmitted by the transmitting unit. In the token amount update step, the token amount management table is updated. This update decreases the number of tokens held in the second bucket in the token amount management table by a predetermined number at a predetermined frequency and sets the number of tokens held in the first bucket in the token amount management table to It is to increase by the decrease. However, there are cases where the number of tokens held in the first bucket in the token amount management table is less than the number corresponding to the size of the communication data packet received by the receiving means. In this case, in the token amount reduction step, the number of tokens held in the first bucket in the token amount management table is maintained, and the communication data packet is discarded without being transmitted to the transmission means. To do.

また、本明細書で後述するプログラムのひとつには、通信データパケットを受信する受信手段と該通信データパケットを送信する送信手段とを有する通信装置を用いて行うトラヒック量の制御を演算処理装置に行わせるためのものがある。このプログラムは、トークン量減少処理と、トークン量増加処理と、トークン量更新処理とを該演算処理装置に行わせる。このうち、トークン量減少処理は、トークン量管理テーブルにおける第一バケットでのトークンの保持個数を、該受信手段が受信した通信データパケットのサイズに応じた個数分減少させるというものである。なお、トークン量管理テーブルは、総数が予め定められているトークンについての、該トークンを保持する第一バケット及び第二バケットの各々での保持個数を管理するテーブルである。また、トークン量増加処理は、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を、該送信手段が送信した通信データパケットのサイズに応じた個数分増加させるというものである。そして、トークン量更新処理は、該トークン量管理テーブルを更新するものである。なお、この更新は、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を所定の頻度で所定数減少させると共に該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を当該減少分だけ増加させるというものである。但し、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数が、該受信手段が受信した通信データパケットのサイズに応じた個数に満たない場合がある。この場合には、該トークン量減処理では、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を維持すると共に、該通信データパケットを該送信手段に送信させることなく廃棄するようにする。 In addition, one of the programs described later in this specification includes an arithmetic processing unit that controls the amount of traffic performed using a communication apparatus having a reception unit that receives a communication data packet and a transmission unit that transmits the communication data packet. There is something to do. This program causes the arithmetic processing unit to perform token amount decrease processing, token amount increase processing, and token amount update processing. Among these, the token amount reduction process is to reduce the number of tokens held in the first bucket in the token amount management table by the number corresponding to the size of the communication data packet received by the receiving means. The token amount management table is a table that manages the number of tokens held in each of the first bucket and the second bucket that hold the tokens for tokens whose total number is predetermined. The token amount increasing process is to increase the number of tokens held in the second bucket in the token amount management table by the number corresponding to the size of the communication data packet transmitted by the transmitting unit. Then, the token amount update process updates the token amount management table. This update decreases the number of tokens held in the second bucket in the token amount management table by a predetermined number at a predetermined frequency and sets the number of tokens held in the first bucket in the token amount management table to It is to increase by the decrease. However, there are cases where the number of tokens held in the first bucket in the token amount management table is less than the number corresponding to the size of the communication data packet received by the receiving means. In this case, in the amount of token down increase process, while maintaining the holding number of tokens in said first bucket in the token management table, so that the communication data packet discards without sent to the transmission means To.

また、本明細書で後述する通信装置のひとつには、予め定められた個数のトークンと、第一バケット及び第二バケットと、受信手段と、トークン付与手段と、送信手段と、第一トークン格納手段と、第二トークン格納手段とを有するというものがある。このうち、第一バケット及び第二バケットは、該トークンを保持するものである。また、受信手段は、通信データパケットを受信するものである。トークン付与手段は、該受信手段が受信した通信データパケットのサイズに応じた個数のトークンを該第一バケットから取り出して該通信データパケットに付与するものである。送信手段は、該トークン付与手段により該トークンが付与された該通信データパケットを送信するものである。第一トークン格納手段は、該送信手段が送信した通信データパケットに付与されていたトークンを該第二バケットに格納して保持させるものである。そして、第二トークン格納手段は、所定の頻度で、該第二バケットに保持されているトークンを取り出して該第一バケットに格納して保持させるものである。但し、該第一バケットで保持されているトークンの個数が、該受信手段が受信した通信データパケットのサイズに応じた個数に足りない場合がある。この場合には、該トークン付与手段は、該通信データパケットを廃棄するようにする。   Also, one of the communication devices described later in this specification includes a predetermined number of tokens, a first bucket and a second bucket, a receiving unit, a token granting unit, a transmitting unit, and a first token storage. And a second token storage means. Among these, the first bucket and the second bucket hold the token. The receiving means receives a communication data packet. The token giving means takes out a number of tokens corresponding to the size of the communication data packet received by the receiving means from the first bucket and gives the token to the communication data packet. The transmission means transmits the communication data packet to which the token is given by the token grant means. The first token storage means stores and holds the token attached to the communication data packet transmitted by the transmission means in the second bucket. The second token storage means takes out the token held in the second bucket at a predetermined frequency, stores it in the first bucket, and holds it. However, the number of tokens held in the first bucket may not be enough according to the size of the communication data packet received by the receiving means. In this case, the token granting unit discards the communication data packet.

本明細書で後述する通信装置は、通信パケットの滞留を少なくすると共に、通信データパケットの滞留の解消に起因する下流の通信ネットワークでの輻輳を減少させる。   The communication device described later in this specification reduces the congestion of communication packets in the downstream communication network due to the reduction of communication packet retention and the elimination of communication data packet retention.

パケット通信ネットワークの構成の一例である。It is an example of a structure of a packet communication network. ホストシステムが有している機能を図解した機能ブロック図である。It is a functional block diagram illustrating the function which a host system has. ルータが有している機能を図解した機能ブロック図である。It is a functional block diagram illustrating the function which a router has. コンピュータの標準的なハードウェア構成の一例である。It is an example of a standard hardware configuration of a computer. ルータにより行われるトラヒック量の制御を説明する図である。It is a figure explaining control of the traffic amount performed by a router. トークン量管理テーブルのデータ構造例である。It is an example of a data structure of a token amount management table. トークンが付与されているパケットのデータ構造例である。It is an example of the data structure of the packet to which the token is given. トークン付与管理テーブルのデータ構造例である。It is an example of a data structure of a token grant management table. トークン付与処理の第一の例の処理内容を図解したフローチャートである。It is the flowchart which illustrated the processing content of the 1st example of a token provision process. トークン解放処理の第一の例の処理内容を図解したフローチャートである。It is the flowchart which illustrated the processing content of the 1st example of a token release process. パケット受信量及びパケット送信可能量の時間変化の一例である。It is an example of the time change of the packet reception amount and the packet transmittable amount. 従来技術を採用してトラヒック量の制御を行った場合におけるパケットの滞留及び送信の様子(その1)である。This is a state (Part 1) of packet retention and transmission when the traffic volume is controlled using the conventional technology. 従来技術を採用してトラヒック量の制御を行った場合におけるパケットの滞留及び送信の様子(その2)である。This is a state (part 2) of packet retention and transmission when the traffic volume is controlled using the conventional technology. 従来技術を採用してトラヒック量の制御を行った場合におけるパケットの滞留及び送信の様子(その3)である。This is a state (part 3) of packet retention and transmission when the traffic volume is controlled using the conventional technology. 図3の構成を有するルータによりトラヒック量の制御を行った場合におけるパケットの滞留及び送信の様子である。FIG. 4 shows packet retention and transmission when the traffic volume is controlled by the router having the configuration of FIG. トークン解放処理の第二の例の処理内容を図解したフローチャートである。It is the flowchart which illustrated the processing content of the 2nd example of a token release process. トークン付与処理の第二の例の処理内容を図解したフローチャートである。It is the flowchart which illustrated the processing content of the 2nd example of a token provision process. トークン付与処理の第三の例の処理内容を図解したフローチャートである。It is the flowchart which illustrated the processing content of the 3rd example of a token provision process. トークン汲み上げ処理の処理内容を図解したフローチャートである。It is the flowchart which illustrated the processing content of the token pumping-up process. トークンバケット方式の原理を説明する図である。It is a figure explaining the principle of a token bucket system.

まず図1について説明する。図1は、パケットデータ通信ネットワークの構成の一例が図解されている。この通信ネットワークは、通信端末である4台のホストシステム1、2、3、及び4と、通信装置である2台のルータ(中継装置)5及び6とを備えて構成されている。ここで、ホストシステム1(Host#A)及びホストシステム2(Host#B)は、ルータ5(#A)に直接接続されており、ホストシステム3(Host#B)及びホストシステム4(Host#D)は、ルータ6(#B)に直接接続されている。また、ルータ5とルータ6とが接続されている。従って、ホストシステム1若しくは2がホストシステム3若しくは4と通信を行う場合には、ルータ5及び6の両方を経由する必要がある。   First, FIG. 1 will be described. FIG. 1 illustrates an example of the configuration of a packet data communication network. This communication network includes four host systems 1, 2, 3, and 4 that are communication terminals, and two routers (relay devices) 5 and 6 that are communication devices. Here, the host system 1 (Host # A) and the host system 2 (Host # B) are directly connected to the router 5 (#A), and the host system 3 (Host # B) and the host system 4 (Host # D) is directly connected to the router 6 (#B). Further, the router 5 and the router 6 are connected. Therefore, when the host system 1 or 2 communicates with the host system 3 or 4, it is necessary to go through both the routers 5 and 6.

以下の説明では、この図1の通信ネットワークにおいて、ホストシステム1から送信されてホストシステム3で受信される通信データパケット(以下、単に「パケット」と記す)の流量(トラヒック量)を、ルータ5が制御する場合を想定する。   In the following description, in the communication network of FIG. 1, the flow rate (traffic amount) of communication data packets (hereinafter simply referred to as “packets”) transmitted from the host system 1 and received by the host system 3 Suppose that is controlled.

次に図2について説明する。図2は、図1のホストシステム1が有している機能を図解した機能ブロック図である。なお、図1における他のホストシステム2、3、及び4の各々も、ホストシステム1と同一の機能を有しているものでよい。   Next, FIG. 2 will be described. FIG. 2 is a functional block diagram illustrating the functions of the host system 1 of FIG. Each of the other host systems 2, 3 and 4 in FIG. 1 may have the same function as the host system 1.

図2から分かるように、ホストシステム1は、制御部11、記憶部12、入出力制御部13、及び通信制御部14を、機能ブロックとして備えている。
制御部11は、ホストシステム1全体の動作の制御を行う機能を有する。
As can be seen from FIG. 2, the host system 1 includes a control unit 11, a storage unit 12, an input / output control unit 13, and a communication control unit 14 as functional blocks.
The control unit 11 has a function of controlling the operation of the entire host system 1.

記憶部12は、制御部11による管理の下で各種のデータを記憶し保持しておく機能を有する。
入出力制御部13は、入力装置である例えばキーボード装置やマウス装置と、出力装置である例えば表示装置との動作を、制御部11による管理の下で制御する機能を有する。ホストシステム1の使用者等による入力装置への操作が検出されると、入出力制御部13は、その操作内容に対応付けられている各種情報の入力を取得し、取得した入力情報を制御部11に送付する。また、入出力制御部13は、出力データを制御部11から受け取ると、出力装置を制御して、その出力データで表現されている各種のテキストや画像を出力する。
The storage unit 12 has a function of storing and holding various data under management by the control unit 11.
The input / output control unit 13 has a function of controlling the operation of an input device such as a keyboard device or mouse device and an output device such as a display device under management by the control unit 11. When an operation on the input device by a user or the like of the host system 1 is detected, the input / output control unit 13 acquires input of various information associated with the operation content, and the acquired input information is transmitted to the control unit. 11 to send. When the input / output control unit 13 receives the output data from the control unit 11, the input / output control unit 13 controls the output device and outputs various texts and images expressed by the output data.

通信制御部14は、パケットの送信及び受信を行う通信装置を、制御部11による管理の下で制御し、ホストシステム1と物理的に接続されているルータ5との間でパケットの授受を行う機能を有する。   The communication control unit 14 controls a communication device that transmits and receives packets under the management of the control unit 11, and exchanges packets with the router 5 that is physically connected to the host system 1. It has a function.

次に図3について説明する。図3は、図1のルータ5が有している機能を図解した機能ブロック図である。なお、図1におけるルータ6も、ルータ5と同一の機能を有しているものでよい。   Next, FIG. 3 will be described. FIG. 3 is a functional block diagram illustrating the functions of the router 5 of FIG. Note that the router 6 in FIG. 1 may have the same function as the router 5.

図3から分かるように、ルータ5は、制御部21、記憶部22、入出力制御部23、通信制御部24、及び時計制御部25を、機能ブロックとして備えている。
制御部21は、ルータ5全体の動作の制御を行う機能を有する。
As can be seen from FIG. 3, the router 5 includes a control unit 21, a storage unit 22, an input / output control unit 23, a communication control unit 24, and a clock control unit 25 as functional blocks.
The control unit 21 has a function of controlling the operation of the entire router 5.

記憶部22は、制御部21による管理の下で各種のデータを記憶し保持しておく機能を有している。なお、図3では、記憶部22がトークン量管理テーブル22−1、トークン付与テーブル22−2、及びパケットバッファ22−3の記憶を行うための記憶領域を特に備えていることを図解しているが、これらの詳細については後で説明する。   The storage unit 22 has a function of storing and holding various data under management by the control unit 21. FIG. 3 illustrates that the storage unit 22 particularly includes a storage area for storing the token amount management table 22-1, the token granting table 22-2, and the packet buffer 22-3. However, these details will be described later.

入出力制御部23は、入力装置である例えばキーボード装置やマウス装置と、出力装置である例えば表示装置との動作を、制御部21による管理の下で制御する機能を有する。図1の通信ネットワークの管理者等による入力装置への操作が検出されると、入出力制御部23は、その操作内容に対応付けられている各種情報の入力を取得し、取得した入力情報を制御部21に送付する。また、入出力制御部23は、出力データを制御部21から受け取ると、出力装置を制御して、その出力データで表現されている各種のテキストや画像を出力する。   The input / output control unit 23 has a function of controlling the operation of an input device such as a keyboard device or a mouse device and an output device such as a display device under management by the control unit 21. When an operation on the input device by the administrator of the communication network in FIG. 1 is detected, the input / output control unit 23 acquires input of various information associated with the operation content, and the acquired input information is displayed. It is sent to the control unit 21. When the input / output control unit 23 receives the output data from the control unit 21, the input / output control unit 23 controls the output device to output various texts and images expressed by the output data.

通信制御部24は、パケットの送信及び受信を行うインタフェース装置を、制御部21による管理の下で制御し、ホストシステム1と物理的に接続されている、ホストシステム1若しくは2又はルータ6との間でパケットの授受を行う機能を有する。   The communication control unit 24 controls an interface device that transmits and receives packets under the management of the control unit 21, and communicates with the host system 1 or 2 or the router 6 that is physically connected to the host system 1. It has a function to exchange packets between them.

時計制御部25は、現在の日時の計時を行う時計の機能を有する。
なお、図4に例示するような、標準的なハードウェア構成のコンピュータを、ルータ5若しくは6として機能させることも可能である。次に、この図4について説明する。
The clock control unit 25 has a clock function for measuring the current date and time.
Note that a computer having a standard hardware configuration as illustrated in FIG. 4 can also function as the router 5 or 6. Next, FIG. 4 will be described.

このコンピュータ30は、MPU31、ROM32、RAM33、ハードディスク装置34、入力装置35、表示装置36、インタフェース装置37、及び記録媒体駆動装置38を備えている。なお、これらの構成要素はバス39を介して接続されており、MPU31の管理の下で各種のデータを相互に授受することができる。   The computer 30 includes an MPU 31, ROM 32, RAM 33, hard disk device 34, input device 35, display device 36, interface device 37, and recording medium drive device 38. These components are connected via a bus 39, and various data can be exchanged under the management of the MPU 31.

MPU(Micro Processing Unit)31は、このコンピュータ30全体の動作を制御する演算処理装置である。
ROM(Read Only Memory)32は、所定の基本制御プログラムが予め記録されている読み出し専用半導体メモリである。MPU31は、この基本制御プログラムをコンピュータ30の起動時に読み出して実行することにより、このコンピュータ30の各構成要素の動作制御が可能になる。
An MPU (Micro Processing Unit) 31 is an arithmetic processing unit that controls the operation of the entire computer 30.
A ROM (Read Only Memory) 32 is a read-only semiconductor memory in which a predetermined basic control program is recorded in advance. The MPU 31 reads out and executes this basic control program when the computer 30 is activated, thereby enabling operation control of each component of the computer 30.

RAM(Random Access Memory)33は、MPU31が各種の制御プログラムを実行する際に、必要に応じて作業用記憶領域として使用する、随時書き込み読み出し可能な半導体メモリである。   A RAM (Random Access Memory) 33 is a semiconductor memory that can be written and read at any time and used as a working storage area as necessary when the MPU 31 executes various control programs.

ハードディスク装置34は、MPU31によって実行される各種の制御プログラムや各種のデータを記憶しておく記憶装置である。MPU31は、ハードディスク装置34に記憶されている所定の制御プログラムを読み出して実行することにより、後述する各種の制御処理を行えるようになる。   The hard disk device 34 is a storage device that stores various control programs executed by the MPU 31 and various data. The MPU 31 can perform various control processes described later by reading and executing a predetermined control program stored in the hard disk device 34.

入力装置35は、例えばキーボード装置やマウス装置であり、コンピュータ30の使用者により操作されると、その操作内容に対応付けられている使用者からの各種情報の入力を取得し、取得した入力情報をMPU31に送付する。   The input device 35 is, for example, a keyboard device or a mouse device. When operated by a user of the computer 30, the input device 35 acquires input of various information from the user associated with the operation content, and acquires the acquired input information. Is sent to the MPU 31.

表示装置36は例えば液晶ディスプレイであり、MPU31から送付される表示データに応じて各種のテキストや画像を表示する。
インタフェース装置37は、このコンピュータ30に接続される各種機器との間での各種データの授受を行う。従って、インタフェース装置37は、ホストシステム1から送られてくるパケットを受信する受信装置として機能し、また、当該パケットを、当該パケットの宛先であるホストシステム3へ宛てて所定の処理後に送信する送信装置としても機能する。
The display device 36 is a liquid crystal display, for example, and displays various texts and images according to display data sent from the MPU 31.
The interface device 37 exchanges various data with various devices connected to the computer 30. Accordingly, the interface device 37 functions as a receiving device that receives a packet sent from the host system 1 and transmits the packet to the host system 3 that is the destination of the packet after a predetermined process. It also functions as a device.

記録媒体駆動装置38は、可搬型記録媒体40に記録されている各種の制御プログラムやデータの読み出しを行う装置である。MPU31は、可搬型記録媒体40に記録されている所定の制御プログラムを、記録媒体駆動装置38を介して読み出して実行することによって、後述する各種の制御処理を行うようにすることもできる。なお、可搬型記録媒体40としては、例えばCD−ROM(Compact Disc Read Only Memory)やDVD−ROM(Digital Versatile Disc Read Only Memory)などがある。   The recording medium driving device 38 is a device that reads various control programs and data recorded on the portable recording medium 40. The MPU 31 can read out and execute a predetermined control program recorded in the portable recording medium 40 via the recording medium driving device 38 to perform various control processes described later. Examples of the portable recording medium 40 include a CD-ROM (Compact Disc Read Only Memory) and a DVD-ROM (Digital Versatile Disc Read Only Memory).

このようなコンピュータ30をルータ5若しくは6として動作させるには、まず、後述する制御処理の処理内容をMPU31に行わせるための制御プログラムを作成する。作成された制御プログラムはハードディスク装置34若しくは可搬型記録媒体40に予め格納しておく。そして、MPU31に所定の指示を与えてこの制御プログラムを読み出させて実行させる。こうすることで、MPU31が、制御部21、入出力制御部23、通信制御部24、及び時計制御部25として機能すると共に、ハードディスク装置34を記憶部22として機能させることが可能となり、コンピュータ30がルータ5若しくは6として動作する。   In order to operate such a computer 30 as the router 5 or 6, first, a control program for causing the MPU 31 to perform the processing contents of the control processing described later is created. The created control program is stored in advance in the hard disk device 34 or the portable recording medium 40. Then, a predetermined instruction is given to the MPU 31 to read and execute the control program. In this way, the MPU 31 can function as the control unit 21, the input / output control unit 23, the communication control unit 24, and the clock control unit 25, and the hard disk device 34 can function as the storage unit 22. Operates as the router 5 or 6.

次に、ルータ5が行うトラヒック量の制御について、図5を参照しながら説明する。
このトラヒック量の制御を行うルータ5は、トークン50と、バケット51と、解放トークンバケット52と、受信部53と、トークン付与部54と、送信部55と、解放トークン格納部56と、トークン補充部57と、送信待ちバッファ58とを備えている。
Next, the traffic volume control performed by the router 5 will be described with reference to FIG.
The router 5 that controls the traffic volume includes a token 50, a bucket 51, a release token bucket 52, a reception unit 53, a token granting unit 54, a transmission unit 55, a release token storage unit 56, and a token replenishment. Unit 57 and a transmission waiting buffer 58.

トークン50の実体は、例えば、予め定められている特定のデータである。前述したように、トークン50には、予め定められているデータ送信量が対応付けられている。なお、本実施形態においては、ルータ5内におけるトークン50の総個数は、予め定められている。   The entity of the token 50 is, for example, predetermined specific data. As described above, the token 50 is associated with a predetermined data transmission amount. In the present embodiment, the total number of tokens 50 in the router 5 is determined in advance.

バケット51(第一バケット)及び解放トークンバケット52(第二バケット)は、どちらも、トークン50を保持するものであり、例えば、トークン50であるデータを格納するデータバッファである。なお、図3においては、バケット51及び解放トークンバケット52は、記憶部22の所定の記憶領域として構成される。   The bucket 51 (first bucket) and the release token bucket 52 (second bucket) both hold the token 50, and are data buffers that store data that is the token 50, for example. In FIG. 3, the bucket 51 and the release token bucket 52 are configured as predetermined storage areas of the storage unit 22.

受信部53は、ここではホストシステム1から送信されて送られてくるパケットを受信する。なお、受信部53は、図3における通信制御部24により制御されるインタフェース装置である。   Here, the receiving unit 53 receives a packet transmitted from the host system 1. The receiving unit 53 is an interface device controlled by the communication control unit 24 in FIG.

トークン付与部54は、受信部53が受信したパケットのサイズに応じた個数のトークン50をバケット51から取り出して当該パケットに付与する。但し、トークン付与部54は、バケット51で保持されているトークン50の個数が、受信部53が受信したパケットのサイズに応じた個数に足りない場合には、該パケットを廃棄する。なお、トークン付与部54としての機能は、図3における制御部21が提供する。   The token granting unit 54 takes out the number of tokens 50 corresponding to the size of the packet received by the receiving unit 53 from the bucket 51 and gives it to the packet. However, when the number of tokens 50 held in the bucket 51 is not enough according to the size of the packet received by the receiving unit 53, the token granting unit 54 discards the packet. The function as the token granting unit 54 is provided by the control unit 21 in FIG.

送信部55は、トークン付与部54によりトークン50が付与されたパケットを、当該パケットの宛先であるホストシステム3へ宛てて送信する。但し、送信部55によるパケットの送信レートは、ホストシステム1とホストシステム3との通信において、その送信時に許容されているデータ通信レートとする。なお、送信部55は、パケットに付与されていたトークン50は送信しない。なお、送信部55は、図3における通信制御部24により制御されるインタフェース装置である。   The transmission unit 55 transmits the packet provided with the token 50 by the token granting unit 54 to the host system 3 that is the destination of the packet. However, the transmission rate of the packet by the transmission unit 55 is a data communication rate allowed at the time of transmission in the communication between the host system 1 and the host system 3. Note that the transmission unit 55 does not transmit the token 50 attached to the packet. The transmission unit 55 is an interface device controlled by the communication control unit 24 in FIG.

解放トークン格納部56(第一トークン格納部)は、送信部55が送信したパケットに付与されていたトークン50を当該パケットから解放して解放トークンバケット52に格納して保持させる。なお、解放トークン格納部56としての機能は、図3における制御部21が提供する。   The release token storage unit 56 (first token storage unit) releases the token 50 attached to the packet transmitted by the transmission unit 55 from the packet, stores it in the release token bucket 52, and holds it. The function as the release token storage unit 56 is provided by the control unit 21 in FIG.

トークン補充部57(第二トークン格納部)は、所定の頻度で、解放トークンバケット52に保持されているトークン50を所定数取り出してバケット51に格納して保持させる。但し、解放トークン格納部56によるトークン50の解放トークンバケット52への格納が間に合わなくなると、解放トークンバケット52が空(トークン50が保持されていない状態)となり、トークン補充部57によるトークン50の取り出しができなくなる。この場合には、トークン補充部57は、解放トークン格納部56が解放トークンバケット52にトークン50を新たに格納するまで、解放トークンバケット52からのトークン50の取り出し及びバケット51への格納を中断する。
なお、トークン補充部57としての機能も、図3における制御部21が提供する。
The token replenishment unit 57 (second token storage unit) takes out a predetermined number of tokens 50 held in the release token bucket 52 at a predetermined frequency, stores them in the bucket 51, and holds them. However, if the release token storage unit 56 cannot store the token 50 in the release token bucket 52 in time, the release token bucket 52 becomes empty (the token 50 is not held), and the token replenishment unit 57 extracts the token 50. Can not be. In this case, the token replenishment unit 57 suspends the retrieval of the token 50 from the release token bucket 52 and the storage in the bucket 51 until the release token storage unit 56 newly stores the token 50 in the release token bucket 52. .
The function as the token replenishing unit 57 is also provided by the control unit 21 in FIG.

送信待ちバッファ58は、トークン付与部54によりトークン50が付与されているパケットを送信部55が送信しきれない場合に、一時的に格納しておくバッファメモリである。この送信待ちバッファ58は、図3における記憶部22のパケットバッファ22−3に相当するものである。   The transmission waiting buffer 58 is a buffer memory for temporarily storing a packet to which the token 50 is given by the token granting unit 54 when the transmission unit 55 cannot transmit the packet. The transmission waiting buffer 58 corresponds to the packet buffer 22-3 of the storage unit 22 in FIG.

ルータ5は、以上のように構成されており、この構成によりパケットの流量を制御する。この構成では、ルータ5内におけるトークン50の総個数が予め定められているため、トークン50の総個数に相当するデータ送信量以上のパケットがルータ5内に滞留することがない。従って、送信部55に許容されているパケットの送信レートの制限が緩和されたときには、ルータ5内に滞留していたパケットが速やかに解消する。
なお、このトラヒック量の制御を、ルータ5の代わりにルータ6が行うことも可能である。
The router 5 is configured as described above, and controls the flow rate of packets by this configuration. In this configuration, since the total number of tokens 50 in the router 5 is determined in advance, packets exceeding the data transmission amount corresponding to the total number of tokens 50 do not stay in the router 5. Accordingly, when the restriction on the transmission rate of packets allowed by the transmission unit 55 is relaxed, the packets staying in the router 5 are quickly resolved.
The traffic amount can be controlled by the router 6 instead of the router 5.

ところで、図5を参照して説明したルータ5によるトラヒック量の制御では、ルータ5内にデータとして実在させたトークン50を用いて行っていた。この代わりに、トークン付与がされているパケットを管理すると共に、バケット51内と解放トークンバケット52内とのトークン量を管理することによって、ルータ5内にトークン50を実在させることなくトラヒック量の制御を行うことも可能である。次に、このようにして行うトラヒック量の制御の詳細を説明する。   By the way, the traffic amount control by the router 5 described with reference to FIG. 5 is performed using the token 50 that is actually present in the router 5 as data. Instead, by managing the packets to which tokens are given and managing the token amounts in the bucket 51 and the release token bucket 52, the traffic amount can be controlled without causing the token 50 to actually exist in the router 5. It is also possible to perform. Next, details of the traffic amount control performed in this way will be described.

まず図6について説明する。図6には、図3の記憶部22で保持される、トークン量管理テーブル22−1のデータ構造例が図解されている。
トークン量管理テーブル22−1は、総数が予め定められているトークン50についての、バケット51と解放トークンバケット52との各々での保持個数を管理するテーブルである。
First, FIG. 6 will be described. FIG. 6 illustrates a data structure example of the token amount management table 22-1 held in the storage unit 22 of FIG.
The token amount management table 22-1 is a table for managing the number of tokens held in the bucket 51 and the release token bucket 52 for the tokens 50 whose total number is predetermined.

トークン量管理テーブル22−1には、「最終算出日時」、「最終算出時バケット内トークン量」、「最終算出時待機トークン量」、及び「トークン生成率」の各項目が用意されている。   The token amount management table 22-1 includes items of “final calculation date and time”, “token amount in bucket at final calculation”, “waiting token amount at final calculation”, and “token generation rate”.

「最終算出日時」には、トークン量管理テーブル22−1の各項目の更新を行った最直近の日時が格納される。
「最終算出時バケット内トークン量」には、「最終算出日時」におけるバケット51内のトークン量の算出結果が格納される。
The “last calculated date” stores the latest date and time when each item of the token amount management table 22-1 is updated.
In the “final calculation token amount in bucket”, the calculation result of the token amount in the bucket 51 at “final calculation date” is stored.

「最終算出時待機トークン量」には、「最終算出日時」における解放トークンバケット52のトークン量の算出結果が格納される。
「トークン生成率」には、トークン50が解放トークンバケット52からバケット51に移送される際の、解放トークンバケット52からバケット51へのトークン50の移送速度が格納される。なお、この移送速度の値は、ルータ5を管理する、図1の通信ネットワークの管理者により予め設定される。
In the “final calculation standby token amount”, the calculation result of the token amount of the release token bucket 52 at the “final calculation date and time” is stored.
The “token generation rate” stores the transfer speed of the token 50 from the release token bucket 52 to the bucket 51 when the token 50 is transferred from the release token bucket 52 to the bucket 51. The value of the transfer speed is set in advance by the administrator of the communication network in FIG.

次に図7について説明する。図7には、トークン50が付与されているパケットのデータ構造例が図解されている。図3の記憶部22に用意されているパケットバッファ22−3内では、各パケットが、図7のデータ構造を有した状態で格納される。   Next, FIG. 7 will be described. FIG. 7 illustrates an example of the data structure of a packet to which a token 50 is attached. In the packet buffer 22-3 prepared in the storage unit 22 of FIG. 3, each packet is stored in a state having the data structure of FIG.

トークン50が付与されているパケットの実体は、図3における「パケット内容」の格納領域に格納されている。また、「パケットサイズ」の格納領域には、この「パケット内容」のデータサイズが格納される。更に、「パケットID」の格納領域には、このパケットを個別に識別するための識別情報であるパケットIDが格納される。なお、「パケットサイズ」及び「パケットID」は、トークン付与部54がパケットにトークン50を付与した際に、当該パケットに付される情報である。   The entity of the packet to which the token 50 is assigned is stored in the “packet content” storage area in FIG. The data size of the “packet contents” is stored in the “packet size” storage area. Further, a packet ID which is identification information for individually identifying each packet is stored in the storage area of “packet ID”. The “packet size” and “packet ID” are information attached to the packet when the token granting unit 54 grants the token 50 to the packet.

次に図8について説明する。図8には、図3の記憶部22で保持される、トークン付与管理テーブル22−2のデータ構造例が図解されている。
トークン付与管理テーブル22−2には、「パケットID」が格納される。トークン付与部54は、パケットにトークン50を付与した際に、当該パケットに付与したパケットIDを、このトークン付与管理テーブル22−2に格納する。
Next, FIG. 8 will be described. FIG. 8 illustrates a data structure example of the token grant management table 22-2 held in the storage unit 22 of FIG.
A “packet ID” is stored in the token grant management table 22-2. When the token granting unit 54 grants a token 50 to a packet, the token granting unit 54 stores the packet ID given to the packet in the token granting management table 22-2.

次にルータ5内にトークン50を実在させることなくトラヒック量の制御を行う場合に制御部21が行う制御処理について説明する。
制御部21は、これより説明するトークン付与処理とトークン解放処理とを行うことで、図5におけるトークン付与部54、解放トークン格納部56、及びトークン補充部57の各々が提供するものに相当する機能を提供する。なお、図4に構成を図解したコンピュータ30をルータ5として機能させる場合には、これより説明する制御処理を、前述したようにしてMPU31に行わせる。
Next, a control process performed by the control unit 21 when the traffic amount is controlled without causing the token 50 to actually exist in the router 5 will be described.
The control unit 21 corresponds to what is provided by each of the token granting unit 54, the released token storage unit 56, and the token supplementing unit 57 in FIG. 5 by performing the token granting process and the token releasing process described below. Provide functionality. In the case where the computer 30 whose configuration is illustrated in FIG. 4 is to function as the router 5, the control process described below is performed by the MPU 31 as described above.

まず図9について説明する。図9は、トークン付与処理の第一の例の処理内容を図解したフローチャートである。この処理は、ホストシステム1から送られてくる新たなパケットの受信を、通信制御部24を介して制御部21が検知する度に開始される。   First, FIG. 9 will be described. FIG. 9 is a flowchart illustrating the processing contents of the first example of the token grant processing. This process is started each time the control unit 21 detects the reception of a new packet sent from the host system 1 via the communication control unit 24.

図9において、まず、S101では、受信したパケットのサイズを求め、得られたサイズに基づき、この受信パケットを送信する際のデータ送信量に相当するトークン50の個数(必要トークン量)を算出する処理が行われる。   In FIG. 9, first, in S101, the size of the received packet is obtained, and based on the obtained size, the number of tokens 50 (required token amount) corresponding to the data transmission amount when transmitting this received packet is calculated. Processing is performed.

次に、S102では、この時点でのバケット51内のトークン量を算出する処理が行われる。
この処理では、まず、この時点での日時の計時結果を時計制御部25から取得する。次に、この時点でのトークン量管理テーブル22−1のデータ内容を参照し、まず、当該テーブルにおける「最終算出日時」から、時計制御部25より取得した日時までの経過時間を算出する。そして次に、当該テーブルにおける「トークン生成率」にこの経過時間を乗算して、解放トークンバケット52からバケット51へのトークン50の移送量を算出する。但し、この算出結果に対し、当該テーブルにおける「最終算出時待機トークン量」が不足している場合には、この「最終算出時待機トークン量」を、解放トークンバケット52からバケット51へのトークン50の移送量とする。当該移送量をこのようにして求めることで、トークン50が解放トークンバケット52に新たに格納されるまで、解放トークンバケット52からのトークン50の取り出し及びバケット51への格納を中断する制御が行われる。
Next, in S102, a process for calculating the token amount in the bucket 51 at this time is performed.
In this process, first, the clocking result of the date and time at this time is acquired from the clock control unit 25. Next, referring to the data content of the token amount management table 22-1 at this time, first, the elapsed time from the “last calculated date” in the table to the date acquired from the clock control unit 25 is calculated. Then, the transfer amount of the token 50 from the release token bucket 52 to the bucket 51 is calculated by multiplying the “token generation rate” in the table by this elapsed time. However, when the “waiting token amount at the time of final calculation” in the table is insufficient with respect to the calculation result, this “waiting token amount at the time of final calculation” is used as the token 50 from the release token bucket 52 to the bucket 51. The amount of transfer. By determining the transfer amount in this way, control is performed to interrupt the removal of the token 50 from the release token bucket 52 and the storage in the bucket 51 until the token 50 is newly stored in the release token bucket 52. .

以上のようにして得られる、「トークン生成率」と当該経過時間との乗算結果と、「最終算出時待機トークン量」とのうちの小さいほうの値を、解放トークンバケット52からの汲み上げトークン量と称することとする。   The smaller value of the multiplication result of the “token generation rate” and the elapsed time and the “waiting token amount at the time of final calculation” obtained as described above is used as the amount of tokens pumped from the release token bucket 52. It shall be called.

その後、この汲み上げトークン量と、当該テーブルにおける「最終算出時バケット内トークン量」とを加算することで、この時点でのバケット51内のトークン量が算出される。   Thereafter, the token amount in the bucket 51 at this time is calculated by adding the pumped token amount and the “final token amount in bucket at the time of final calculation” in the table.

次に、S103では、受信パケットに付与すべきトークン50の個数が足りているか否かを判定する処理が行われる。すなわち、S101の処理で算出された必要トークン量が、S102の処理で算出されたバケット51内のトークン量以下であるか否かを判定する処理が行われる。ここで、必要トークン量がバケット51内のトークン量以下であると判定されたとき(判定結果が「Yes」のとき)にはS104に処理を進める。一方、必要トークン量がバケット51内のトークン量を超えていると判定されたとき(判定結果が「No」のとき)にはS108に処理を進める。   Next, in S103, processing for determining whether or not the number of tokens 50 to be given to the received packet is sufficient is performed. That is, it is determined whether or not the required token amount calculated in the process of S101 is equal to or less than the token amount in the bucket 51 calculated in the process of S102. Here, when it is determined that the required token amount is equal to or less than the token amount in the bucket 51 (when the determination result is “Yes”), the process proceeds to S104. On the other hand, when it is determined that the required token amount exceeds the token amount in the bucket 51 (when the determination result is “No”), the process proceeds to S108.

次に、S104では、受信パケットに、前述した「パケットID」と「パケットサイズ」(すなわちS101の処理で求めた受信したパケット)とを付加して、図7に図解したデータ構造とする処理が行われる。そして、続くS105において、S104の処理後のパケットを、記憶部22に用意されているパケットバッファ22−3に格納する処理が行われる。   Next, in S104, the process of adding the above-described “packet ID” and “packet size” (that is, the received packet obtained in the process of S101) to the received packet to obtain the data structure illustrated in FIG. Done. Then, in the subsequent S105, a process of storing the packet after the process of S104 in the packet buffer 22-3 prepared in the storage unit 22 is performed.

次に、S106では、S105の処理でパケットバッファ22−3に格納したパケットについての「パケットID」を、記憶部22に用意されているトークン付与管理テーブル22−2に追加して格納する処理が行われる。   Next, in S106, a process of adding the “packet ID” for the packet stored in the packet buffer 22-3 in the process of S105 to the token granting management table 22-2 prepared in the storage unit 22 and storing it. Done.

次に、S107では、トークン量管理テーブル22−1の更新処理が行われる。このS107の処理では、まず、当該テーブルにおける「最終算出日時」のデータを、S102の処理で時計制御部25から取得した日時の計時結果に更新する。次に、S102の処理で算出したバケット51内のトークン量から、S101の処理で算出された必要トークン量を減算し、その減算結果の値を、当該テーブルにおける「最終算出時バケット内トークン量」の更新後のデータとする。そして次に、当該テーブルにおける「最終算出時待機トークン量」のデータから、前述した汲み上げトークン量を減算し、その減算結果の値を、この「最終算出時待機トークン量」の更新後の値とする。従って、前述したS102の処理において、汲み上げトークン量を「最終算出時待機トークン量」としていた場合には、「最終算出時待機トークン量」の更新後の値はゼロとなる。   Next, in S107, the token amount management table 22-1 is updated. In the process of S107, first, the data of “final calculation date” in the table is updated to the time measurement result of the date acquired from the clock control unit 25 in the process of S102. Next, the necessary token amount calculated in the processing of S101 is subtracted from the token amount in the bucket 51 calculated in the processing of S102, and the value of the subtraction result is “the token amount in the bucket at the time of final calculation” in the table. The data after the update. Then, the above-mentioned pumping token amount is subtracted from the “final calculation standby token amount” data in the table, and the value of the subtraction result is set to the updated value of the “final calculation standby token amount”. To do. Therefore, in the processing of S102 described above, when the pumped token amount is the “waiting token amount at the time of final calculation”, the updated value of the “waiting token amount at the time of final calculation” is zero.

このS107の処理により、トークン量管理テーブル22−1におけるバケット51でのトークン50の保持個数を、受信パケットのサイズに応じた個数分減少させる制御が行われる。また、このS107の処理により、トークン量管理テーブル22−1における解放トークンバケット52でのトークン50の保持個数を所定の頻度で所定数減少させる制御が行われる。更に、前述したS102の処理を加味したS107の処理により、トークン量管理テーブル22−1におけるバケット51内でのトークンの保持個数を、解放トークンバケット52でのトークン50の減少分だけ増加させる制御が行われる。
以上のS107の処理を終えた後には、この図9の処理が終了する。
By the processing in S107, control is performed to reduce the number of tokens 50 held in the bucket 51 in the token amount management table 22-1 by the number corresponding to the size of the received packet. Further, by the processing of S107, control is performed to decrease the number of tokens 50 held in the release token bucket 52 in the token amount management table 22-1 by a predetermined number at a predetermined frequency. Further, by the process of S107 taking into account the process of S102 described above, the control for increasing the number of tokens held in the bucket 51 in the token amount management table 22-1 by the decrease of the token 50 in the release token bucket 52 is performed. Done.
After the process of S107 is completed, the process of FIG. 9 ends.

一方、図9におけるS108では、このトークン付与処理を開始する切っ掛けとなった受信パケットを廃棄する処理が行われる。従って、前述したS103の処理とこのS108の処理とにより、バケット51で保持されているトークン50の個数が、受信パケットのサイズに応じた個数に足りない場合に、当該受信パケットを廃棄する制御が行われる。   On the other hand, in S108 in FIG. 9, a process of discarding the received packet that is the start of the token granting process is performed. Therefore, when the number of tokens 50 held in the bucket 51 is less than the number corresponding to the size of the received packet by the processing in S103 and the processing in S108, the received packet is controlled to be discarded. Done.

次に、S109では、トークン量管理テーブル22−1の更新処理が行われる。このS109の処理では、まず、当該テーブルにおける「最終算出日時」のデータを、S102の処理で時計制御部25から取得した日時の計時結果に更新する。次に、ここでは、S102の処理で算出したバケット51内のトークン量を、(必要トークン量の減算を行わずに)当該テーブルにおける「最終算出時バケット内トークン量」の更新後のデータとする。そして次に、当該テーブルにおける「最終算出時待機トークン量」のデータから、前述した汲み上げトークン量を減算し、その減算結果の値を、この「最終算出時待機トークン量」の更新後の値とする。
以上のS107の処理を終えた後には、この図9の処理が終了する。
Next, in S109, the token amount management table 22-1 is updated. In the process of S109, first, the data of “last calculated date” in the table is updated to the time measurement result of the date acquired from the clock control unit 25 in the process of S102. Next, here, the token amount in the bucket 51 calculated in the processing of S102 is used as data after updating the “token amount in bucket at the time of final calculation” in the table (without subtracting the required token amount). . Then, the above-mentioned pumping token amount is subtracted from the “final calculation standby token amount” data in the table, and the value of the subtraction result is set to the updated value of the “final calculation standby token amount”. To do.
After the process of S107 is completed, the process of FIG. 9 ends.

次に図10について説明する。図10は、トークン解放処理の第一の例の処理内容を図解したフローチャートである。この処理は、通信制御部24がインタフェース装置を制御して、前述したトークン付与処理によりパケットバッファ22−3に格納したパケットの読み出し及び送信を行わせる度に開始される。   Next, FIG. 10 will be described. FIG. 10 is a flowchart illustrating the processing contents of the first example of the token release processing. This process is started each time the communication control unit 24 controls the interface device to read and transmit the packet stored in the packet buffer 22-3 by the token grant process described above.

図10において、まず、S201では、パケットバッファ22−3において、送信されたパケットに付与されていた「パケットID」が、トークン付与管理テーブル22−2に格納されているか否かを判定する処理が行われる。ここで、当該「パケットID」が、トークン付与管理テーブル22−2に格納されていると判定されたとき(判定結果が「Yes」のとき)にはS202に処理を進める。一方、当該「パケットID」が、トークン付与管理テーブル22−2に格納されていないと判定されたとき(判定結果が「No」のとき)には、このままこのトークン解放処理を終了する。   In FIG. 10, first, in S201, the packet buffer 22-3 determines whether or not the “packet ID” assigned to the transmitted packet is stored in the token grant management table 22-2. Done. If it is determined that the “packet ID” is stored in the token granting management table 22-2 (when the determination result is “Yes”), the process proceeds to S202. On the other hand, when it is determined that the “packet ID” is not stored in the token grant management table 22-2 (when the determination result is “No”), the token release processing is terminated as it is.

次に、S202では、パケットバッファ22−3において、送信されたパケットに付与されていた「パケットサイズ」のデータを取得し、このデータで示されている値に相当するトークン50の個数を算出する処理が行われる。この処理により算出される個数を、解放トークン量と称することとする。   Next, in S202, the packet buffer 22-3 acquires "packet size" data attached to the transmitted packet, and calculates the number of tokens 50 corresponding to the value indicated by this data. Processing is performed. The number calculated by this processing will be referred to as the release token amount.

次に、S203では、S201の処理によりトークン付与管理テーブル22−2から発見された「パケットID」を当該トークン付与管理テーブル22−2から削除する処理が行われる。   Next, in S203, a process of deleting the “packet ID” discovered from the token grant management table 22-2 by the process of S201 from the token grant management table 22-2 is performed.

次に、S204では、この時点でのバケット51内のトークン量を算出する処理が行われる。
このS204の処理は、図9のS102の処理と同様の処理内容である。すなわち、まず、この時点での日時の計時結果を時計制御部25から取得する。次に、この時点でのトークン量管理テーブル22−1のデータ内容を参照し、まず、当該テーブルにおける「最終算出日時」から、時計制御部25より取得した日時までの経過時間を算出する。そして次に、当該テーブルにおける「トークン生成率」にこの経過時間を乗算して、解放トークンバケット52からバケット51へのトークン50の移送量を算出する。但し、この算出結果に対し、当該テーブルにおける「最終算出時待機トークン量」が不足している場合には、この「最終算出時待機トークン量」を、解放トークンバケット52からバケット51へのトークン50の移送量とする。このようにして解放トークンバケット52からの汲み上げトークン量を求める。そして、この汲み上げトークン量と、当該テーブルにおける「最終算出時バケット内トークン量」とを加算することで、この時点でのバケット51内のトークン量が算出される。
Next, in S204, a process for calculating the token amount in the bucket 51 at this time is performed.
The processing in S204 has the same processing contents as the processing in S102 of FIG. That is, first, the time measurement result of the date and time at this time is acquired from the clock control unit 25. Next, referring to the data content of the token amount management table 22-1 at this time, first, the elapsed time from the “last calculated date” in the table to the date acquired from the clock control unit 25 is calculated. Then, the transfer amount of the token 50 from the release token bucket 52 to the bucket 51 is calculated by multiplying the “token generation rate” in the table by this elapsed time. However, when the “waiting token amount at the time of final calculation” in the table is insufficient with respect to the calculation result, this “waiting token amount at the time of final calculation” is used as the token 50 from the release token bucket 52 to the bucket 51. The amount of transfer. In this way, the amount of tokens pumped from the release token bucket 52 is obtained. Then, the token amount in the bucket 51 at this time is calculated by adding the pumped token amount and the “final token amount in bucket at the time of final calculation” in the table.

次に、S205では、トークン量管理テーブル22−1の更新処理が行われる。このS205の処理では、まず、当該テーブルにおける「最終算出日時」のデータを、S204の処理で時計制御部25から取得した日時の計時結果に更新する。次に、S204の処理で算出したバケット51内のトークン量を、当該テーブルにおける「最終算出時バケット内トークン量」の更新後のデータとする。そして次に、当該テーブルにおける「最終算出時待機トークン量」のデータに、前述した汲み上げトークン量を減算し、その減算結果に対し、更に、ここでは、前述した解放トークン量を加算する。そして、このようにして算出された値を、この「最終算出時待機トークン量」の更新後の値とする。このS205の処理により、トークン量管理テーブル22−1における解放トークンバケット52でのトークン50の保持個数を、送信パケットのサイズに応じたトークン50の個数分増加させる制御が行われる。
以上のS205の処理を終えた後には、この図10の処理が終了する。
Next, in S205, the token amount management table 22-1 is updated. In the process of S205, first, the data of “final calculation date” in the table is updated to the time measurement result of the date acquired from the clock control unit 25 in the process of S204. Next, the token amount in the bucket 51 calculated in the process of S204 is used as the data after updating the “token amount in bucket at the time of final calculation” in the table. Then, the above-mentioned pumped-up token amount is subtracted from the “waiting token amount at the time of final calculation” data in the table, and the above-mentioned released token amount is further added to the subtraction result. Then, the value calculated in this way is set as the updated value of the “final token amount at the time of final calculation”. By the processing of S205, control is performed to increase the number of tokens 50 held in the release token bucket 52 in the token amount management table 22-1 by the number of tokens 50 according to the size of the transmission packet.
After finishing the process of S205, the process of FIG.

以上のトークン付与処理とトークン解放処理とを制御部21が行うことで、ルータ5内にトークン50を実在させることなく、図5を参照して説明したものと同様のトラヒック量の制御を行うことができる。   By performing the token granting process and the token releasing process, the control unit 21 controls the traffic amount similar to that described with reference to FIG. 5 without causing the token 50 to actually exist in the router 5. Can do.

以上のトラヒック量の制御を行うことによる効果について説明する。
まず図11について説明する。図11は、ルータ5による、ホストシステム1からのパケット受信量及びホストシステム3へのパケット送信可能量の時間変化の一例を図解したものである。
The effect of performing the above traffic amount control will be described.
First, FIG. 11 will be described. FIG. 11 illustrates an example of a temporal change in the amount of packets received from the host system 1 and the amount of packets that can be transmitted to the host system 3 by the router 5.

この例では、パケット受信量は量率x[/秒]で一定であるのに対し、パケット送信量は、時刻T#0まではz[/秒]、その後時刻T#1までは0、更にその後時刻T#2まではy[/秒]と変動し、T#2においてz[/秒]に回復する場合を想定する。なお、z>x>y>0とする。   In this example, the amount of received packets is constant at a quantity rate x [/ second], whereas the amount of packet transmission is z [/ seconds] until time T # 0, then 0 until time T # 1, Thereafter, it is assumed that the time fluctuates with y [/ second] until time T # 2, and recovers to z [/ second] at T # 2. Note that z> x> y> 0.

これより説明する図12A、図12B、図12C、及び図13では、パケット受信量及びパケット送信可能量が、図11に図解したように時間変化する場合を想定している。
まず図12Aについて説明する。図12Aは、ルータ5が、図18に図解したトークンバケット方式の原理に従ってトラヒック量の制御を行った場合における、パケットのルータ5内での滞留及び送信の様子を図解したものである。
In FIG. 12A, FIG. 12B, FIG. 12C, and FIG. 13 to be described below, it is assumed that the packet reception amount and the packet transmittable amount change with time as illustrated in FIG.
First, FIG. 12A will be described. FIG. 12A illustrates the state of packet retention and transmission in the router 5 when the router 5 controls the traffic volume according to the principle of the token bucket scheme illustrated in FIG.

この場合、T#0においてパケット送信可能量がゼロとなってもトークン101のバケット100への補充は継続されるため、パケット111は廃棄されない。このため、パケット111のルータ5内での滞留量は時間の経過と共に増加していく。その後、T#1においてパケット送信可能量がyまで回復しても、その回復はパケット受信量xに満たないため、パケット111のルータ5内での滞留は更に増加する。従って、その後の時刻T#2においてパケット送信可能量が当初のzまで回復すると、それまでに滞留したパケット111が一気に吐き出され、大量のパケット111の送信(パケット受信量xを上回るような大量送信)が長時間に渡って継続することになる。このとき、ルータ6では、大量のパケット111によって輻輳が生じる場合もある。   In this case, since the replenishment of the token 101 to the bucket 100 is continued even when the packet transmittable amount becomes zero at T # 0, the packet 111 is not discarded. For this reason, the staying amount of the packet 111 in the router 5 increases as time passes. After that, even if the packet transmittable amount recovers to y at T # 1, the recovery is less than the packet reception amount x, and the retention of the packet 111 in the router 5 further increases. Therefore, when the packet transmittable amount recovers to the original z at the subsequent time T # 2, the packet 111 that has stayed so far is discharged at a stretch, and a large amount of packets 111 are transmitted (a large amount of transmission exceeding the packet reception amount x). ) Will continue for a long time. At this time, the router 6 may be congested by a large number of packets 111.

次に、図12B及び図12Cについて説明する。図12B及び図12Cは、どちらも、前述した第一の技術を採用してトラヒック量の制御を行った場合におけるパケットの滞留及び送信の様子を図解したものである。   Next, FIGS. 12B and 12C will be described. FIG. 12B and FIG. 12C both illustrate packet retention and transmission when the traffic volume is controlled using the first technique described above.

まず図12Bに注目する。前述した第一の技術では、T#1において通信データのスループットが低下すると、通信データの過大な滞留を回避するために、トークンバッファへのトークンの出力頻度を低下させる。従って、パケット111のルータ5内での滞留は一時的には抑制される。しかしながら、前述した第一の技術では、その後、トークンバッファが枯渇状態に遷移してから所定時間後には、通信データのスループットが回復しなくても、所定量のトークンをトークンバッファへ追加して減少状態に遷移させる動作が行われる。このため、パケット111のルータ5内での滞留量は時間の経過と共に結局は増加していく。従って、時刻T#2においてパケット送信可能量が当初のzまで回復すれば、図12の場合の同様、それまでに滞留したパケット111が一気に吐き出されて大量の送信(パケット受信量xを上回るような大量送信)が長時間に渡って継続することになる。このとき、ルータ6では、大量のパケット111によって輻輳が生じる場合もある。   Attention is first directed to FIG. 12B. In the first technique described above, when the communication data throughput decreases at T # 1, in order to avoid excessive retention of communication data, the frequency of token output to the token buffer is decreased. Therefore, the stay of the packet 111 in the router 5 is temporarily suppressed. However, in the first technique described above, a predetermined amount of tokens are added to the token buffer and reduced after a predetermined time after the token buffer transitions to a depleted state, even if the communication data throughput does not recover. An operation for transitioning to a state is performed. For this reason, the retention amount of the packet 111 in the router 5 eventually increases with time. Therefore, if the packet transmittable amount recovers to the initial z at time T # 2, the packet 111 that has stayed until then is discharged at a stretch, as in the case of FIG. Large-volume transmission) will continue for a long time. At this time, the router 6 may be congested by a large number of packets 111.

ここで、トークンバッファを枯渇状態から減少状態に遷移させるためのトークンバッファへのトークンの追加を中止した場合が図12Cの場合である。このようにすると、パケット111のルータ5内での滞留量は所定量に制限される。しかしながら、その後、ルータ5内で滞留していたパケット111の、スループットyによる送信が時刻T#1以降において完了してしまう場合がある。この場合には、その後に他のトラヒックの増大等の要因が解消してパケット送信可能量がzまで回復しても、通信データのスループットは、パケット受信量と同一のxまでは回復しないことになってしまう。   Here, the case where the addition of the token to the token buffer for transitioning the token buffer from the depleted state to the decreasing state is stopped is the case of FIG. 12C. In this way, the staying amount of the packet 111 in the router 5 is limited to a predetermined amount. However, after that, transmission of the packet 111 staying in the router 5 with the throughput y may be completed after time T # 1. In this case, the communication data throughput does not recover up to x, which is the same as the received packet amount, even if other factors such as increase in traffic are eliminated and the packet transmittable amount recovers to z. turn into.

これに対し、図13は、図3の構成を有するルータ5によりトラヒック量の制御を行った場合におけるパケットの滞留及び送信の様子を図解している。この場合では、ルータ5内で滞留するパケットの総量は、予め設定したトークン50の総個数により定まる量を超えることはない。従って、ルータ5内で滞留している、パケットバッファ22−3に格納されているパケットの大量送信は短時間で完了する。更に、その後に他のトラヒックの増大等の要因が解消してパケット送信可能量が元のzまで回復すれば、通信データのスループットも、パケット受信量であるxまで速やかに回復する。   On the other hand, FIG. 13 illustrates the state of packet retention and transmission when the traffic amount is controlled by the router 5 having the configuration of FIG. In this case, the total amount of packets staying in the router 5 does not exceed the amount determined by the total number of tokens 50 set in advance. Accordingly, the mass transmission of the packets stored in the packet buffer 22-3, which is retained in the router 5, is completed in a short time. Further, if other factors such as an increase in traffic are solved thereafter and the packet transmittable amount is restored to the original z, the communication data throughput is also promptly restored to x which is the packet reception amount.

次に、前述した図9のトークン付与処理及び図10のトークン解放処理の変形例について幾つか説明する。
まず、図14について説明する。図14は、トークン解放処理の第二の例の処理内容を図解したフローチャートである。
Next, some modified examples of the token grant process of FIG. 9 and the token release process of FIG. 10 described above will be described.
First, FIG. 14 will be described. FIG. 14 is a flowchart illustrating the processing contents of the second example of the token release processing.

制御部21が、図10のトークン解放処理に代えて、この図14のトークン解放処理を、図9のトークン付与処理と共に行うようにしても、図5を参照して説明したものと同様のトラヒック量の制御を行うことができる。   Even if the control unit 21 performs the token release process of FIG. 14 together with the token grant process of FIG. 9 instead of the token release process of FIG. 10, the same traffic as described with reference to FIG. The amount can be controlled.

図14の処理は、通信制御部24がインタフェース装置を制御して、前述したトークン付与処理によりパケットバッファ22−3に格納したパケットの読み出し及び送信を行わせる度に開始される。   The process of FIG. 14 is started each time the communication control unit 24 controls the interface device to read and transmit the packet stored in the packet buffer 22-3 by the token grant process described above.

この図14のフローチャートは、図10のフローチャートにおけるS204及びS205の処理を、S211の処理に置き換えたものである。そこで、ここでは、S211の処理のみについて説明する。   The flowchart of FIG. 14 is obtained by replacing the processing of S204 and S205 in the flowchart of FIG. 10 with the processing of S211. Therefore, only the processing of S211 will be described here.

S203に続くS211では、トークン量管理テーブル22−1における「最終算出時待機トークン量」の値に、S202の処理で算出した解放トークン量を加算してその値を更新する処理が行われ、その後はこの図14の処理が終了する。   In S211 following S203, a process is performed in which the released token quantity calculated in the process of S202 is added to the value of “waiting token quantity at the time of final calculation” in the token quantity management table 22-1, and the value is updated. The process of FIG. 14 ends.

このように、上述したS211の処理では、トークン量管理テーブル22−1における解放トークンバケット52でのトークン50の保持個数を、送信されたパケットのサイズに応じたトークン50の個数分増加させる処理のみが行われる。つまり、解放トークンバケット52からのトークン50の汲み上げ及びバケット51への移送に相当するトークン量管理テーブル22−1の更新については、パケットを受信した際にトークン付与処理で行うようにし、パケット送信時には行わないようにする。このようにすることで、トークン量管理テーブル22−1の更新のための処理量が削減されるので、制御部21の処理負担が軽減される。   As described above, in the process of S211 described above, only the process of increasing the number of tokens 50 held in the release token bucket 52 in the token amount management table 22-1 by the number of tokens 50 according to the size of the transmitted packet. Is done. In other words, the token amount management table 22-1 corresponding to the pumping of the token 50 from the release token bucket 52 and the transfer to the bucket 51 is performed by the token granting process when the packet is received. Do not do it. By doing so, the processing amount for updating the token amount management table 22-1 is reduced, so that the processing load on the control unit 21 is reduced.

次に図15について説明する。図15は、トークン付与処理の第二の例の処理内容を図解したフローチャートである。
制御部21が、図9のトークン付与処理に代えて、この図15のトークン付与処理を、図14のトークン解放処理と共に行うようにしても、図5を参照して説明したものと同様のトラヒック量の制御を行うことができる。
Next, FIG. 15 will be described. FIG. 15 is a flowchart illustrating the processing contents of the second example of the token grant processing.
Even if the control unit 21 performs the token grant process of FIG. 15 together with the token release process of FIG. 14 instead of the token grant process of FIG. 9, the same traffic as described with reference to FIG. The amount can be controlled.

図15の処理は、ホストシステム1から送られてくる新たなパケットの受信を、通信制御部24を介して制御部21が検知する度に開始される。
この図15のフローチャートは、図9のフローチャートにおけるS109の処理が削除されて、S108の処理後にトークン付与処理を終了するようにしたものである。つまり、解放トークンバケット52からのトークン50の汲み上げ及びバケット51への移送に相当するトークン量管理テーブル22−1の更新については、パケットを受信した際にトークン付与処理で行う。但し、この更新の処理は、S103の判定結果がYesである場合にのみS107で行うようにし、S103の判定結果がNoである場合には行わない。これはすなわち、トークン量管理テーブル22−1におけるバケット51でのトークン50の保持個数が、受信パケットのサイズに応じた個数以上であった場合にのみ上記のトークン量管理テーブル22−1の更新を行うようにするものである。このようにすることで、トークン量管理テーブル22−1の更新のための処理量が更に削減されるので、制御部21の処理負担が更に軽減される。
The process of FIG. 15 is started each time the control unit 21 detects the reception of a new packet sent from the host system 1 via the communication control unit 24.
In the flowchart of FIG. 15, the process of S109 in the flowchart of FIG. 9 is deleted, and the token granting process is terminated after the process of S108. That is, the token amount management table 22-1 corresponding to the pumping of the token 50 from the release token bucket 52 and the transfer to the bucket 51 is performed by a token grant process when a packet is received. However, this update process is performed in S107 only when the determination result in S103 is Yes, and is not performed when the determination result in S103 is No. In other words, the token amount management table 22-1 is updated only when the number of tokens 50 held in the bucket 51 in the token amount management table 22-1 is equal to or greater than the number according to the size of the received packet. Is what you want to do. In this way, the processing amount for updating the token amount management table 22-1 is further reduced, so that the processing load on the control unit 21 is further reduced.

なお、上述したトークン量管理テーブル22−1の更新を、パケット受信の際やパケット送信の際に行う代わりに、所定の周期で、パケットの送受信のタイミングとは無関係に行うようにしてもよい。このようにするには、制御部21が、これより説明する図16のトークン付与処理の第三の例を図14のトークン解放処理と共に行うようにし、これと並行して、後述する図17のトークン汲み上げ処理を制御部21が行うようにすればよい。   Note that the token amount management table 22-1 described above may be updated at a predetermined cycle regardless of the packet transmission / reception timing instead of being performed at the time of packet reception or packet transmission. In order to do this, the control unit 21 performs a third example of the token granting process of FIG. 16 to be described below together with the token release process of FIG. 14, and in parallel with this, FIG. The control unit 21 may perform the token pumping process.

図16について説明する。図16は、トークン付与処理の第三の例の処理内容を図解したフローチャートである。
図16の処理は、ホストシステム1から送られてくる新たなパケットの受信を、通信制御部24を介して制御部21が検知する度に開始される。
FIG. 16 will be described. FIG. 16 is a flowchart illustrating the processing contents of the third example of the token grant processing.
The process of FIG. 16 is started each time the control unit 21 detects the reception of a new packet sent from the host system 1 via the communication control unit 24.

この図16のフローチャートは、図15のフローチャートにおけるS102及びS107の処理を、それぞれS111及びS112の処理に置き換えたものである。そこで、ここでは、このS111及びS112の処理のみについて説明する。   The flowchart of FIG. 16 is obtained by replacing the processes of S102 and S107 in the flowchart of FIG. 15 with processes of S111 and S112, respectively. Therefore, only the processes of S111 and S112 will be described here.

S101に続くS111では、この時点でのトークン量管理テーブル22−1のデータ内容を参照して「最終算出時バケット内トークン量」の値を取得する処理が行われる。なお、この処理に続くS103の判定処理では、この処理で取得した値を、バケット51内のトークン量とする。   In S111 following S101, processing for obtaining the value of “the token amount in the bucket at the time of final calculation” is performed with reference to the data content of the token amount management table 22-1 at this time. In the determination process of S103 following this process, the value acquired in this process is used as the token amount in the bucket 51.

その一方、S106に続くS112では、トークン量管理テーブル22−1のうちの「最終算出時バケット内トークン量」のデータのみを更新する処理が行われる。すなわち、上述したS111の処理で取得したバケット51内のトークン量から、S101の処理で取得した必要トークン量を減算し、この減算結果の値を、トークン量管理テーブル22−1の「最終算出時バケット内トークン量」とする処理が行われる。そして、この処理を終えた後には、この図16の処理が終了する。   On the other hand, in S112 following S106, a process of updating only the data of “the token amount in the bucket at the time of final calculation” in the token amount management table 22-1 is performed. That is, the required token amount acquired in the processing of S101 is subtracted from the token amount in the bucket 51 acquired in the above-described processing of S111, and the value of this subtraction result is “at the time of final calculation” in the token amount management table 22-1. The processing of “the amount of tokens in the bucket” is performed. And after finishing this process, the process of this FIG. 16 is complete | finished.

従って、このS112の処理では、トークン量管理テーブル22−1におけるバケット51でのトークン50の保持個数を、受信パケットのサイズに応じた個数分減少させる処理のみが行われる。つまり、解放トークンバケット52からのトークン50の汲み上げ及びバケット51への移送に相当するトークン量管理テーブル22−1の更新については、このトークン付与処理では行われず、また、図14のトークン解放処理でも行われない。   Accordingly, in the process of S112, only the process of reducing the number of tokens 50 held in the bucket 51 in the token amount management table 22-1 by the number corresponding to the size of the received packet is performed. That is, the token amount management table 22-1 corresponding to the pumping of the token 50 from the release token bucket 52 and the transfer to the bucket 51 is not performed in this token granting process, and also in the token releasing process of FIG. Not done.

次に図17について説明する。図17は、トークン汲み上げ処理の処理内容を図解したフローチャートである。
この図17の処理は、所定の周期、より具体的には、時計制御部25が所定時間の経過を計時する度に、その計時結果を制御部21が受け取ることで開始される。
Next, FIG. 17 will be described. FIG. 17 is a flowchart illustrating the processing contents of the token pumping processing.
The process of FIG. 17 is started when the control unit 21 receives the time measurement result every time the clock control unit 25 measures the elapse of the predetermined time, more specifically, the predetermined time.

図17において、まず、S301では、前述した汲み上げトークン量の算出処理が行われる。すなわち、まず、この時点での日時の計時結果を時計制御部25から取得する。次に、この時点でのトークン量管理テーブル22−1のデータ内容を参照し、まず、当該テーブルにおける「最終算出日時」から、時計制御部25より取得した日時までの経過時間を算出する。そして次に、当該テーブルにおける「トークン生成率」にこの経過時間を乗算して、解放トークンバケット52からバケット51へのトークン50の移送量を算出する。但し、この算出結果に対し、当該テーブルにおける「最終算出時待機トークン量」が不足している場合には、この「最終算出時待機トークン量」を、解放トークンバケット52からバケット51へのトークン50の移送量とする。以上のようにして得られた解放トークンバケット52からバケット51へのトークン50の移送量を、解放トークンバケット52からの汲み上げトークン量とする。   In FIG. 17, first, in S301, the above-described pumping token amount calculation process is performed. That is, first, the time measurement result of the date and time at this time is acquired from the clock control unit 25. Next, referring to the data content of the token amount management table 22-1 at this time, first, the elapsed time from the “last calculated date” in the table to the date acquired from the clock control unit 25 is calculated. Then, the transfer amount of the token 50 from the release token bucket 52 to the bucket 51 is calculated by multiplying the “token generation rate” in the table by this elapsed time. However, when the “waiting token amount at the time of final calculation” in the table is insufficient with respect to the calculation result, this “waiting token amount at the time of final calculation” is used as the token 50 from the release token bucket 52 to the bucket 51. The amount of transfer. The transfer amount of the token 50 from the release token bucket 52 to the bucket 51 obtained as described above is set as a pumping token amount from the release token bucket 52.

次に、S302では、トークン量管理テーブル22−1の更新処理が行われる。このS302の処理では、まず、当該テーブルにおける「最終算出日時」のデータを、S301の処理で時計制御部25から取得した日時の計時結果に更新する。次に、当該テーブルにおける「最終算出時バケット内トークン量」のデータに、前述した汲み上げトークン量を加算し、その加算結果の値を、この「最終算出時バケット内トークン量」の更新後の値とする。そして次に、当該テーブルにおける「最終算出時待機トークン量」のデータから、前述した汲み上げトークン量を減算し、その減算結果の値を、この「最終算出時待機トークン量」の更新後の値とする。
以上のS302の処理を終えた後には、この図17の処理が終了する。
Next, in S302, the token amount management table 22-1 is updated. In the process of S302, first, the data of “last calculated date” in the table is updated to the time measurement result of the date acquired from the clock control unit 25 in the process of S301. Next, the above-mentioned pumping token amount is added to the data of “the token amount in the bucket at the time of final calculation” in the table, and the value of the addition result is the updated value of the “amount of token in the bucket at the time of final calculation”. And Then, the above-mentioned pumping token amount is subtracted from the “final calculation standby token amount” data in the table, and the value of the subtraction result is set to the updated value of the “final calculation standby token amount”. To do.
After finishing the process of S302, the process of FIG.

以上の図16のトークン付与処理と、図14のトークン解放処理と、図17のトークン汲み上げ処理とを制御部21が並行して行うようにしても、図5を参照して説明したものと同様のトラヒック量の制御を行うことができる。   Even if the control unit 21 performs the token granting process of FIG. 16, the token releasing process of FIG. 14, and the token pumping process of FIG. 17 in parallel, the same as described with reference to FIG. 5. The amount of traffic can be controlled.

なお、以上までに説明した実施形態に関し、更に以下の付記を開示する。
(付記1)
総数が予め定められているトークンについての、該トークンを保持する第一バケット及び第二バケットの各々での保持個数を管理するトークン量管理テーブルと、
通信データパケットを受信する受信手段と、
該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を、該受信手段が受信した通信データパケットのサイズに応じた個数分減少させるトークン量減少手段と、
該受信手段が受信した通信データパケットを送信する送信手段と、
該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を、該送信手段が送信した通信データパケットのサイズに応じた個数分増加させるトークン量増加手段と、
該トークン量管理テーブルを更新して、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を所定の頻度で所定数ずつ減少させると共に該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を当該減少分だけ増加させるトークン量更新手段と、
を有し、
該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数が、該受信手段が受信した通信データパケットのサイズに応じた個数に満たない場合には、トークン量減算手段は、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を維持すると共に、該通信データパケットを該送信手段に送信させることなく廃棄する、
ことを特徴とする通信装置。
(付記2)
該トークン量更新手段は、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数が該所定数に対して不足している場合には、該第二バケットでのトークンの保持個数だけ、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を増加させると共に、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数をゼロとし、以降、該トークン量増加手段が該保持個数を増加させるまで、該トークン量管理テーブルにおける該第二バケット及び該第一バケットでのトークンの保持個数の更新を中断する、ことを特徴とする付記1に記載の通信装置。
(付記3)
該トークン量変更手段は、該受信手段が通信データパケットを受信した際に、該トークン量管理テーブルの更新を行うことを特徴とする付記1または2に記載の通信装置。
(付記4)
該トークン量変更手段は、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数が、該受信手段が受信した通信データパケットのサイズに応じた個数以下であった場合に、該トークン量管理テーブルの更新を行うことを特徴とする付記3に記載の通信装置。
(付記5)
該トークン量変更手段は、所定の周期で該トークン量管理テーブルの更新を行うことを特徴とする付記1または2に記載の通信装置。
(付記6)
通信データパケットを受信する受信手段と該通信データパケットを送信する送信手段とを有する通信装置を用いて行うトラヒック量の制御方法であって、
総数が予め定められているトークンについての、該トークンを保持する第一バケット及び第二バケットの各々での保持個数を管理するトークン量管理テーブルにおける、該第一バケットでのトークンの保持個数を、該受信手段が受信した通信データパケットのサイズに応じた個数分減少させるトークン量減少ステップと、
該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を、該送信手段が送信した通信データパケットのサイズに応じた個数分増加させるトークン量増加ステップと、
該トークン量管理テーブルを更新して、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を所定の頻度で所定数減少させると共に該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を当該減少分だけ増加させるトークン量更新ステップと、
を有しており、
該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数が、該受信手段が受信した通信データパケットのサイズに応じた個数に満たない場合には、該トークン量減少ステップでは、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を維持すると共に、該通信データパケットを該送信手段に送信させることなく廃棄するようにする、
ことを特徴とするトラヒック量の制御方法。
(付記7)
該トークン量更新ステップでは、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数がゼロである場合には、該トークン量増加ステップにより該保持個数を増加させるまで、該トークン量管理テーブルにおける該第二バケット及び該第一バケットでのトークンの保持個数の更新を中断する、ことを特徴とする付記6に記載のトラヒック量の制御方法。
(付記8)
通信データパケットを受信する受信手段と該通信データパケットを送信する送信手段とを有する通信装置を用いて行うトラヒック量の制御を演算処理装置に行わせるためのプログラムであって、
総数が予め定められているトークンについての、該トークンを保持する第一バケット及び第二バケットの各々での保持個数を管理するトークン量管理テーブルにおける、該第一バケットでのトークンの保持個数を、該受信手段が受信した通信データパケットのサイズに応じた個数分減少させるトークン量減少処理と、
該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を、該送信手段が送信した通信データパケットのサイズに応じた個数分増加させるトークン量増加処理と、
該トークン量管理テーブルを更新して、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を所定の頻度で所定数減少させると共に該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を当該減少分だけ増加させるトークン量更新処理と、
を該演算処理装置に行わせ、
該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数が、該受信手段が受信した通信データパケットのサイズに応じた個数に満たない場合には、該トークン量減処理では、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を維持すると共に、該通信データパケットを該送信手段に送信させることなく廃棄するようにする、
ことを特徴とするプログラム。
(付記9)
該トークン量更新処理では、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数がゼロである場合には、該トークン量増加処理により該保持個数を増加させるまで、該トークン量管理テーブルにおける該第二バケット及び該第一バケットでのトークンの保持個数の更新を中断する、ことを特徴とする付記8に記載のプログラム。
(付記10)
予め定められた個数のトークンと、
該トークンを保持する第一バケット及び第二バケットと、
通信データパケットを受信する受信手段と、
該受信手段が受信した通信データパケットのサイズに応じた個数のトークンを該第一バケットから取り出して該通信データパケットに付与するトークン付与手段と、
該トークン付与手段により該トークンが付与された該通信データパケットを送信する送信手段と、
該送信手段が送信した通信データパケットに付与されていたトークンを該第二バケットに格納して保持させる第一トークン格納手段と、
所定の頻度で、該第二バケットに保持されているトークンを取り出して該第一バケットに格納して保持させる第二トークン格納手段と、
を有し、
該トークン付与手段は、該第一バケットで保持されているトークンの個数が、該受信手段が受信した通信データパケットのサイズに応じた個数に足りない場合には、該通信データパケットを廃棄する、
ことを特徴とする通信装置。
(付記11)
該第二トークン格納手段は、該第二バケットにトークンが保持されていない場合には、該第一トークン格納手段が該第二バケットにトークンを新たに格納するまで、該第二バケットからのトークンの取り出し及び該第一バケットへの格納を中断する、ことを特徴とする付記10に記載の通信装置。
In addition, the following additional remarks are disclosed regarding the embodiment described above.
(Appendix 1)
A token amount management table that manages the number of tokens held in each of the first bucket and the second bucket that hold the tokens with a predetermined total number;
Receiving means for receiving communication data packets;
Token amount reducing means for reducing the number of tokens held in the first bucket in the token quantity management table by the number corresponding to the size of the communication data packet received by the receiving means;
Transmitting means for transmitting the communication data packet received by the receiving means;
Token amount increasing means for increasing the number of tokens held in the second bucket in the token amount management table by the number corresponding to the size of the communication data packet transmitted by the transmitting means;
The token amount management table is updated to reduce the number of tokens held in the second bucket in the token amount management table by a predetermined number at a predetermined frequency, and the tokens in the first bucket in the token amount management table A token amount updating means for increasing the number of stored tokens by the decrease,
Have
When the number of tokens held in the first bucket in the token amount management table is less than the number according to the size of the communication data packet received by the receiving unit, the token amount subtracting unit Maintaining the number of tokens held in the first bucket in the table, and discarding the communication data packet without causing the transmission means to transmit.
A communication device.
(Appendix 2)
When the number of tokens held in the second bucket in the token amount management table is insufficient with respect to the predetermined number, the token amount update unit is equal to the number of tokens held in the second bucket, The number of tokens held in the first bucket in the token amount management table is increased, and the number of tokens held in the second bucket in the token amount management table is set to zero. Thereafter, the token amount increasing means The communication apparatus according to appendix 1, wherein updating of the number of tokens held in the second bucket and the first bucket in the token amount management table is interrupted until the number of held tokens is increased.
(Appendix 3)
The communication apparatus according to appendix 1 or 2, wherein the token amount changing unit updates the token amount management table when the receiving unit receives a communication data packet.
(Appendix 4)
The token amount changing means, when the number of tokens held in the first bucket in the token amount management table is not more than the number according to the size of the communication data packet received by the receiving means, The communication apparatus according to appendix 3, wherein the management table is updated.
(Appendix 5)
The communication apparatus according to appendix 1 or 2, wherein the token amount changing unit updates the token amount management table at a predetermined cycle.
(Appendix 6)
A traffic amount control method performed using a communication device having a receiving means for receiving a communication data packet and a transmitting means for transmitting the communication data packet,
The number of tokens held in the first bucket in the token amount management table for managing the number held in each of the first bucket and the second bucket for the tokens whose total number is predetermined, A token amount reduction step for reducing the number of communication data packets received by the receiving means by the number of the communication data packets;
A token amount increasing step for increasing the number of tokens held in the second bucket in the token amount management table by the number corresponding to the size of the communication data packet transmitted by the transmitting unit;
The token amount management table is updated, and the number of tokens held in the second bucket in the token amount management table is decreased by a predetermined number at a predetermined frequency, and the number of tokens in the first bucket in the token amount management table is decreased. A token amount update step for increasing the number of held items by the decrease, and
Have
If the number of tokens held in the first bucket in the token amount management table is less than the number according to the size of the communication data packet received by the receiving means, the token amount reducing step Maintaining the number of tokens held in the first bucket in the management table and discarding the communication data packet without causing the transmission means to transmit
A traffic amount control method characterized by the above.
(Appendix 7)
In the token quantity update step, when the number of tokens held in the second bucket in the token quantity management table is zero, the token quantity management table until the number of held tokens is increased by the token quantity increase step. The traffic amount control method according to appendix 6, wherein updating of the second bucket and the number of tokens held in the first bucket is interrupted.
(Appendix 8)
A program for causing an arithmetic processing unit to control the amount of traffic performed using a communication apparatus having a receiving means for receiving a communication data packet and a transmitting means for transmitting the communication data packet,
The number of tokens held in the first bucket in the token amount management table for managing the number held in each of the first bucket and the second bucket for the tokens whose total number is predetermined, Token amount reduction processing for reducing the number according to the number of communication data packets received by the receiving means;
Token amount increase processing for increasing the number of tokens held in the second bucket in the token amount management table by the number corresponding to the size of the communication data packet transmitted by the transmission means;
The token amount management table is updated, and the number of tokens held in the second bucket in the token amount management table is decreased by a predetermined number at a predetermined frequency, and the number of tokens in the first bucket in the token amount management table is decreased. Token amount update processing to increase the number of holdings by the decrease,
To the arithmetic processing unit,
When the number of tokens held in the first bucket in the token amount management table is less than the number according to the size of the communication data packet received by the receiving unit, Maintaining the number of tokens held in the first bucket in the management table and discarding the communication data packet without causing the transmission means to transmit
A program characterized by that.
(Appendix 9)
In the token amount update processing, when the number of tokens held in the second bucket in the token amount management table is zero, the token amount management table until the number of held tokens is increased by the token amount increase processing. 9. The program according to appendix 8, wherein the updating of the second bucket and the number of tokens held in the first bucket is interrupted.
(Appendix 10)
A predetermined number of tokens;
A first bucket and a second bucket holding the token;
Receiving means for receiving communication data packets;
Token giving means for taking out the number of tokens corresponding to the size of the communication data packet received by the receiving means from the first bucket and giving the token to the communication data packet;
Transmitting means for transmitting the communication data packet to which the token is attached by the token attaching means;
First token storage means for storing and holding the token attached to the communication data packet transmitted by the transmission means in the second bucket;
Second token storage means for taking out the token held in the second bucket at a predetermined frequency, storing it in the first bucket, and holding it;
Have
The token granting unit discards the communication data packet when the number of tokens held in the first bucket is less than the number corresponding to the size of the communication data packet received by the receiving unit.
A communication device.
(Appendix 11)
If the second token storage means does not hold a token in the second bucket, the second token storage means stores the token from the second bucket until the first token storage means newly stores a token in the second bucket. The communication device according to appendix 10, wherein the take-out and storage in the first bucket are interrupted.

1、2、3、4 ホストシステム
5、6 ルータ
11、21 制御部
12、22 記憶部
13、23 入出力制御部
14、24 通信制御部
22−1 トークン量管理テーブル
22−2 トークン付与テーブル
22−3 パケットバッファ
25 時計制御部
30 コンピュータ
31 MPU
32 ROM
33 RAM
34 ハードディスク装置
35 入力装置
36 表示装置
37 インタフェース装置
38 記録媒体駆動装置
39 バス
40 可搬型記録媒体
50、101 トークン
51、100 バケット
52 解放トークンバケット
53 受信部
54 トークン付与部
55 送信部
56 解放トークン格納部
57 トークン補充部
58 送信待ちバッファ
110 パケット制御点
111 パケット
1, 2, 3, 4 Host system 5, 6 Router 11, 21 Control unit 12, 22 Storage unit 13, 23 Input / output control unit 14, 24 Communication control unit 22-1 Token amount management table 22-2 Token grant table 22 -3 Packet buffer 25 Clock control unit 30 Computer 31 MPU
32 ROM
33 RAM
34 Hard Disk Device 35 Input Device 36 Display Device 37 Interface Device 38 Recording Medium Drive Device 39 Bus 40 Portable Recording Medium 50, 101 Token 51, 100 Bucket 52 Release Token Bucket 53 Receiving Unit 54 Token Granting Unit 55 Transmitting Unit 56 Free Token Storage Part 57 token replenishment part 58 transmission waiting buffer 110 packet control point 111 packet

Claims (8)

総数が予め定められているトークンについての、該トークンを保持する第一バケット及び第二バケットの各々での保持個数を管理するトークン量管理テーブルと、
通信データパケットを受信する受信手段と、
該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を、該受信手段が受信した通信データパケットのサイズに応じた個数分減少させるトークン量減少手段と、
該受信手段が受信した通信データパケットを送信する送信手段と、
該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を、該送信手段が送信した通信データパケットのサイズに応じた個数分増加させるトークン量増加手段と、
該トークン量管理テーブルを更新して、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を所定の頻度で所定数ずつ減少させると共に該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を当該減少分だけ増加させるトークン量更新手段と、
を有し、
該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数が、該受信手段が受信した通信データパケットのサイズに応じた個数に満たない場合には、トークン量減少手段は、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を維持すると共に、該通信データパケットを該送信手段に送信させることなく廃棄する、
ことを特徴とする通信装置。
A token amount management table that manages the number of tokens held in each of the first bucket and the second bucket that hold the tokens with a predetermined total number;
Receiving means for receiving communication data packets;
Token amount reducing means for reducing the number of tokens held in the first bucket in the token quantity management table by the number corresponding to the size of the communication data packet received by the receiving means;
Transmitting means for transmitting the communication data packet received by the receiving means;
Token amount increasing means for increasing the number of tokens held in the second bucket in the token amount management table by the number corresponding to the size of the communication data packet transmitted by the transmitting means;
The token amount management table is updated to reduce the number of tokens held in the second bucket in the token amount management table by a predetermined number at a predetermined frequency, and the tokens in the first bucket in the token amount management table A token amount updating means for increasing the number of stored tokens by the decrease,
Have
Holding the number of tokens in said first bucket in the amount of token management table, if less than the number of said receiving means corresponding to the size of the communication data packet received, said token amount reducing means, said amount of token Maintaining the number of tokens held in the first bucket in the management table, and discarding the communication data packet without causing the transmission means to transmit.
A communication device.
該トークン量更新手段は、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数が該所定数に対して不足している場合には、該第二バケットでのトークンの保持個数だけ、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を増加させると共に、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数をゼロとし、以降、該トークン量増加手段が該保持個数を増加させるまで、該トークン量管理テーブルにおける該第二バケット及び該第一バケットでのトークンの保持個数の更新を中断する、ことを特徴とする請求項1に記載の通信装置。   When the number of tokens held in the second bucket in the token amount management table is insufficient with respect to the predetermined number, the token amount update unit is equal to the number of tokens held in the second bucket, The number of tokens held in the first bucket in the token amount management table is increased, and the number of tokens held in the second bucket in the token amount management table is set to zero. Thereafter, the token amount increasing means The communication apparatus according to claim 1, wherein updating of the number of tokens held in the second bucket and the first bucket in the token amount management table is interrupted until the number of held tokens is increased. 該トークン量更新手段は、該受信手段が通信データパケットを受信した際に、該トークン量管理テーブルの更新を行うことを特徴とする請求項1または2に記載の通信装置。 3. The communication apparatus according to claim 1, wherein the token amount updating unit updates the token amount management table when the receiving unit receives a communication data packet. 該トークン量更新手段は、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数が、該受信手段が受信した通信データパケットのサイズに応じた個数以上であった場合にのみ、該トークン量管理テーブルの更新を行うことを特徴とする請求項3に記載の通信装置。 The amount of token updating means, holding the number of tokens in said first bucket in the token management table is only the case of equal to or more than the number of said receiving means corresponding to the size of the communication data packet received, the token The communication apparatus according to claim 3, wherein the amount management table is updated. 該トークン量更新手段は、所定の周期で該トークン量管理テーブルの更新を行うことを特徴とする請求項1または2に記載の通信装置。 The communication apparatus according to claim 1, wherein the token amount update unit updates the token amount management table at a predetermined cycle. 通信データパケットを受信する受信手段と該通信データパケットを送信する送信手段とを有する通信装置を用いて行うトラヒック量の制御方法であって、
総数が予め定められているトークンについての、該トークンを保持する第一バケット及び第二バケットの各々での保持個数を管理するトークン量管理テーブルにおける、該第一バケットでのトークンの保持個数を、該受信手段が受信した通信データパケットのサイズに応じた個数分減少させるトークン量減少ステップと、
該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を、該送信手段が送信した通信データパケットのサイズに応じた個数分増加させるトークン量増加ステップと、
該トークン量管理テーブルを更新して、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を所定の頻度で所定数減少させると共に該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を当該減少分だけ増加させるトークン量更新ステップと、
を有しており、
該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数が、該受信手段が受信した通信データパケットのサイズに応じた個数に満たない場合には、該トークン量減少ステップでは、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を維持すると共に、該通信データパケットを該送信手段に送信させることなく廃棄するようにする、
ことを特徴とするトラヒック量の制御方法。
A traffic amount control method performed using a communication device having a receiving means for receiving a communication data packet and a transmitting means for transmitting the communication data packet,
The number of tokens held in the first bucket in the token amount management table for managing the number held in each of the first bucket and the second bucket for the tokens whose total number is predetermined, A token amount reduction step for reducing the number of communication data packets received by the receiving means by the number of the communication data packets;
A token amount increasing step for increasing the number of tokens held in the second bucket in the token amount management table by the number corresponding to the size of the communication data packet transmitted by the transmitting unit;
The token amount management table is updated, and the number of tokens held in the second bucket in the token amount management table is decreased by a predetermined number at a predetermined frequency, and the number of tokens in the first bucket in the token amount management table is decreased. A token amount update step for increasing the number of held items by the decrease, and
Have
If the number of tokens held in the first bucket in the token amount management table is less than the number according to the size of the communication data packet received by the receiving means, the token amount reducing step Maintaining the number of tokens held in the first bucket in the management table and discarding the communication data packet without causing the transmission means to transmit
A traffic amount control method characterized by the above.
通信データパケットを受信する受信手段と該通信データパケットを送信する送信手段とを有する通信装置を用いて行うトラヒック量の制御を演算処理装置に行わせるためのプログラムであって、
総数が予め定められているトークンについての、該トークンを保持する第一バケット及び第二バケットの各々での保持個数を管理するトークン量管理テーブルにおける、該第一バケットでのトークンの保持個数を、該受信手段が受信した通信データパケットのサイズに応じた個数分減少させるトークン量減少処理と、
該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を、該送信手段が送信した通信データパケットのサイズに応じた個数分増加させるトークン量増加処理と、
該トークン量管理テーブルを更新して、該トークン量管理テーブルにおける該第二バケットでのトークンの保持個数を所定の頻度で所定数減少させると共に該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を当該減少分だけ増加させるトークン量更新処理と、
を該演算処理装置に行わせ、
該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数が、該受信手段が受信した通信データパケットのサイズに応じた個数に満たない場合には、該トークン量減処理では、該トークン量管理テーブルにおける該第一バケットでのトークンの保持個数を維持すると共に、該通信データパケットを該送信手段に送信させることなく廃棄するようにする、
ことを特徴とするプログラム。
A program for causing an arithmetic processing unit to control the amount of traffic performed using a communication apparatus having a receiving means for receiving a communication data packet and a transmitting means for transmitting the communication data packet,
The number of tokens held in the first bucket in the token amount management table for managing the number held in each of the first bucket and the second bucket for the tokens whose total number is predetermined, Token amount reduction processing for reducing the number according to the number of communication data packets received by the receiving means;
Token amount increase processing for increasing the number of tokens held in the second bucket in the token amount management table by the number corresponding to the size of the communication data packet transmitted by the transmission means;
The token amount management table is updated, and the number of tokens held in the second bucket in the token amount management table is decreased by a predetermined number at a predetermined frequency, and the number of tokens in the first bucket in the token amount management table is decreased. Token amount update processing to increase the number of holdings by the decrease,
To the arithmetic processing unit,
Holding the number of tokens in said first bucket in the amount of token management table, if less than the number of said receiving means corresponding to the size of the communication data packet received is in the amount of token down increase process, the token Maintaining the number of tokens held in the first bucket in the amount management table and discarding the communication data packet without causing the transmission means to transmit
A program characterized by that.
予め定められた個数のトークンと、
該トークンを保持する第一バケット及び第二バケットと、
通信データパケットを受信する受信手段と、
該受信手段が受信した通信データパケットのサイズに応じた個数のトークンを該第一バケットから取り出して該通信データパケットに付与するトークン付与手段と、
該トークン付与手段により該トークンが付与された該通信データパケットを送信する送信手段と、
該送信手段が送信した通信データパケットに付与されていたトークンを該第二バケットに格納して保持させる第一トークン格納手段と、
所定の頻度で、該第二バケットに保持されているトークンを取り出して該第一バケットに格納して保持させる第二トークン格納手段と、
を有し、
該トークン付与手段は、該第一バケットで保持されているトークンの個数が、該受信手段が受信した通信データパケットのサイズに応じた個数に足りない場合には、該通信データパケットを廃棄する、
ことを特徴とする通信装置。
A predetermined number of tokens;
A first bucket and a second bucket holding the token;
Receiving means for receiving communication data packets;
Token giving means for taking out the number of tokens corresponding to the size of the communication data packet received by the receiving means from the first bucket and giving the token to the communication data packet;
Transmitting means for transmitting the communication data packet to which the token is attached by the token attaching means;
First token storage means for storing and holding the token attached to the communication data packet transmitted by the transmission means in the second bucket;
Second token storage means for taking out the token held in the second bucket at a predetermined frequency, storing it in the first bucket, and holding it;
Have
The token granting unit discards the communication data packet when the number of tokens held in the first bucket is less than the number corresponding to the size of the communication data packet received by the receiving unit.
A communication device.
JP2010044338A 2010-03-01 2010-03-01 Communication apparatus, traffic amount control method, and program Expired - Fee Related JP5458957B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010044338A JP5458957B2 (en) 2010-03-01 2010-03-01 Communication apparatus, traffic amount control method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010044338A JP5458957B2 (en) 2010-03-01 2010-03-01 Communication apparatus, traffic amount control method, and program

Publications (2)

Publication Number Publication Date
JP2011182186A JP2011182186A (en) 2011-09-15
JP5458957B2 true JP5458957B2 (en) 2014-04-02

Family

ID=44693234

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010044338A Expired - Fee Related JP5458957B2 (en) 2010-03-01 2010-03-01 Communication apparatus, traffic amount control method, and program

Country Status (1)

Country Link
JP (1) JP5458957B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9524261B2 (en) 2012-12-21 2016-12-20 Apple Inc. Credit lookahead mechanism

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4704147B2 (en) * 2005-08-12 2011-06-15 Kddi株式会社 Traffic control device, traffic control method, and computer program
JP4717768B2 (en) * 2006-09-20 2011-07-06 富士通テレコムネットワークス株式会社 Token bucket method and router using the same
JP4612713B2 (en) * 2008-08-12 2011-01-12 株式会社日立製作所 Packet transfer apparatus and network system

Also Published As

Publication number Publication date
JP2011182186A (en) 2011-09-15

Similar Documents

Publication Publication Date Title
CN102035732B (en) Service scheduling method and device
CN111512602B (en) Method, equipment and system for sending message
EP3996301A1 (en) Message transmission method, apparatus and system
CN103326953A (en) Flow limiting method and device based on token buckets
CN103841046A (en) System and method for credit-based link level flow control
US10044632B2 (en) Systems and methods for adaptive credit-based flow
US8953625B2 (en) Applying backpressure to a subset of nodes in a deficit weighted round robin scheduler
US7616566B2 (en) Data flow control apparatus and method of mobile terminal for reverse communication from high speed communication device to wireless network
CN102291309A (en) Token ring based network flow control method and system and node
JP5458957B2 (en) Communication apparatus, traffic amount control method, and program
CN101828177A (en) Multi-Priority Communication in Differential Serial Communication Links
WO2016197822A1 (en) Packet sending method and device
CN103026671B (en) A kind of method and apparatus of traffic shaping
CN114070798B (en) Message transmission method, device and equipment
JP4195221B2 (en) Method and system for controlling packet transmission in a computer network
JP6363357B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM
CN119728602B (en) RDMA (remote direct memory Access) on-network transmission control method, device and medium
CN115460152A (en) Method, system, storage medium and electronic device for controlling multicast message
JP5094727B2 (en) Data transfer device and mobile phone
CN112335266B (en) System and method for managing notification requests in a communication network
CN111131066B (en) Traffic shaping method and device
US7855954B2 (en) Speculative credit data flow control
US20150121107A1 (en) Cooperative Reduced Power Mode Suspension For High Input/Output ('I/O') Workloads
CN119071250A (en) Data transmission method, device and system
CN103259738B (en) A kind of data transmission method for uplink, data producer and active flow control system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130108

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130924

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131029

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131125

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131230

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees