JP4348227B2 - Hierarchical packet processing system, relay device, server, method thereof, and program thereof - Google Patents

Hierarchical packet processing system, relay device, server, method thereof, and program thereof Download PDF

Info

Publication number
JP4348227B2
JP4348227B2 JP2004108239A JP2004108239A JP4348227B2 JP 4348227 B2 JP4348227 B2 JP 4348227B2 JP 2004108239 A JP2004108239 A JP 2004108239A JP 2004108239 A JP2004108239 A JP 2004108239A JP 4348227 B2 JP4348227 B2 JP 4348227B2
Authority
JP
Japan
Prior art keywords
unit
service processing
packet
server
received packet
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
JP2004108239A
Other languages
Japanese (ja)
Other versions
JP2005295268A (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 JP2004108239A priority Critical patent/JP4348227B2/en
Priority to US10/981,102 priority patent/US7613825B2/en
Publication of JP2005295268A publication Critical patent/JP2005295268A/en
Application granted granted Critical
Publication of JP4348227B2 publication Critical patent/JP4348227B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/19Flow control; Congestion control at layers above the network layer

Description

本発明は、パケットを中継する際にフィルタ処理するパケット中継技術に関する。   The present invention relates to a packet relay technique for performing a filtering process when relaying a packet.

近年、パケット中継装置は不用意な通信をシャットアウトするため高度なフィルタ処理を備える。
なかでもステートフルインスペクションと呼ばれる技術は、IP層よりも上位の通信セッションの状態を監視することで、パケットの通過許可/不許可をよりきめ細かく制御することができる。
In recent years, packet relay apparatuses are equipped with advanced filter processing to shut out inadvertent communication.
In particular, a technique called stateful inspection can finely control whether or not a packet is allowed to pass by monitoring the state of a communication session higher than the IP layer.

ステートフルインスペクションは、パケット受信の度に、コネクションを認識し、各コネクションの状態を更新し、フィルタ条件とつき合わせてパケットの通過可否を判断する。上記処理はほぼ全てのパケットに対し処理が必要になる反面、パケットの上位レイヤヘッダやペイロード部分の監視、状態管理、パケットのデフラグメント/リフラグメント等、単純なパケット処理に留まらない。このため、ハードウエア化すると装置規模が大きくなってしまう。   In the stateful inspection, each time a packet is received, the connection is recognized, the state of each connection is updated, and whether or not the packet is allowed to pass is determined according to the filter condition. While the above processing is necessary for almost all packets, it is not limited to simple packet processing such as monitoring of the upper layer header and payload portion of the packet, state management, and packet defragmentation / refragmentation. For this reason, if hardware is used, the scale of the apparatus becomes large.

そこで、ネットワークプロセッサを用いるという方法も考えられる。しかし、この方法では十分な性能がでない、プログラム可能なメモリにも制限があるなど、事実上の実装が困難であることが証明されている。   Therefore, a method using a network processor is also conceivable. However, this method has proven to be difficult to implement in practice, such as not having sufficient performance, and limited programmable memory.

一方、サーバとネットワーク接続装置からなる系で、ネットワーク接続装置の中継処理においてパケットの詳細解析を行なう場合、そのパケットをサーバへ振り分けて詳細解析させる技術がある。この技術では先ず始めに、振分先であるサーバを予めポリシーテーブルに認識させておく必要がある。サービス処理部に対してパケットを振り分ける処理振分部は、パケットを受信すると上記ポリシーテーブルに基づき、当該パケットをサービス処理部または所定のサーバへ転送する。この転送により、処理が外部に分散され、ネットワーク接続装置での処理の負担を軽減できる(特許文献1参照)。
特開2002−359637号公報
On the other hand, when a detailed analysis of a packet is performed in a relay process of a network connection device in a system composed of a server and a network connection device, there is a technique for distributing the packet to the server and performing detailed analysis. In this technique, first, it is necessary to make the policy table recognize the server that is the distribution destination. When receiving the packet, the processing distribution unit that distributes the packet to the service processing unit transfers the packet to the service processing unit or a predetermined server based on the policy table. By this transfer, processing is distributed to the outside, and the processing burden on the network connection device can be reduced (see Patent Document 1).
JP 2002-359637 A

上述したように上記パケットをサーバへ振り分ける技術では、その振分先をポリシーテーブルに指定する。これにより上記処理振分部は、各サービス処理部或いは外部のサーバへ処理を振り分けることが可能になる。   As described above, in the technique of distributing the packet to the server, the distribution destination is designated in the policy table. As a result, the processing distribution unit can distribute the processing to each service processing unit or an external server.

しかし、振り分け先であるサーバが頻繁に移動されたり、該サーバによって提供されるサービスが変えられるなどすると、上記ポリシーテーブルに指定した振り分け先のサーバを指定し直さなければならない。   However, if the server that is the distribution destination is frequently moved or the service provided by the server is changed, the server of the distribution destination specified in the policy table must be specified again.

このため、サーバの追加や変更等に基づく中継装置の調整に多大な手間を生じ、問題であった。
そこで本発明は、サービス処理を行なうサーバの追加・変更等において好適で且つ高速中継処理を実現する階層型パケット処理技術を提供することを目的とする。
For this reason, the adjustment of the relay device based on the addition or change of the server has caused a great deal of trouble, which is a problem.
Accordingly, an object of the present invention is to provide a hierarchical packet processing technique that is suitable for addition / change of a server that performs service processing and that realizes high-speed relay processing.

本発明は上記課題を解決するために以下のように構成する。
本発明の階層型パケット処理システムの態様一つは、受信パケットを対象にサービス処理を行なって上記受信パケットを中継処理する、中継部とサーバからなることを前提とし、上記中継部は、上記受信パケットを対象にサービス処理を行なう所定のサービス処理部を呼び出す呼出部と、上記呼出部の呼び出しにより、上記受信パケットにサービス処理を行なう第一のサービス処理部と、上記呼出部の呼び出しにより、上記受信パケットに仮想的にサービス処理を行なう第二のサービス処理部と、を有し、上記サーバは、上記第二のサービス処理部が上記呼出部から呼び出されると、上記第二のサービス処理部の代わりに上記受信パケットに対して任意のサービス処理を行なう外部サービス処理部を、有するように構成する。
In order to solve the above problems, the present invention is configured as follows.
One aspect of the hierarchical packet processing system of the present invention is based on the premise that the relay unit includes a relay unit and a server that perform service processing on the received packet and relays the received packet. A calling unit that calls a predetermined service processing unit that performs service processing on a packet, a first service processing unit that performs service processing on the received packet by calling the calling unit, and a calling of the calling unit A second service processing unit that virtually performs a service process on the received packet, and when the second service processing unit is called from the calling unit, the server includes: Instead, an external service processing unit that performs arbitrary service processing on the received packet is provided.

なお、上記呼出部の呼び出しにより上記第二のサービス処理部が呼び出されると、上記受信パケットは処理依頼キューに一時的にキューイングされ、続く受信パケットに対するサービス処理が上記呼出部によって続いて呼び出されたサービス処理部によって行なわれる、ように構成してもよい。   When the second service processing unit is called by calling the calling unit, the received packet is temporarily queued in the processing request queue, and service processing for subsequent received packets is subsequently called by the calling unit. Alternatively, the service processing unit may be configured.

また、上記外部サービス処理部は、中継部における受信パケットの中継処理で使用されてるCPUが空いた時間を利用して上記サービス処理を行なう、ように構成してもよい。
また、受信パケットに対するコネクション状態を管理するコネクション状態管理部を更に有し、上記外部サービス処理部は、上記受信パケットの上位レイヤの状態を検出し、該上位レイヤの状態の検出結果を基に、上記コネクション状態管理部に管理される上記受信パケットの上記コネクション状態を更新し、上記中継部で受信された同一のコネクションパケットは、上記外部サービス処理部によって更新された上記コネクション状態管理部の上記コネクション状態に基づいてフィルタ処理される、ように構成することが望ましい。
In addition, the external service processing unit may be configured to perform the service processing by using a free time of a CPU used in the relay process of the received packet in the relay unit.
The external service processing unit further detects a state of an upper layer of the received packet based on a detection result of the state of the upper layer. The connection state of the received packet managed by the connection state management unit is updated, and the same connection packet received by the relay unit is updated by the connection of the connection state management unit updated by the external service processing unit. Desirably, the filter processing is performed based on the state.

また、上記仮想サービス処理部は、上記受信パケットに対するサービス処理を上記サーバへ振り分けるため、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報とをパケットの種類に応じて管理するサービスリスト管理部を有し、上記サーバは、上記サービスリスト管理部に対し、自己サーバの情報及び該自己サーバが提供するサービス処理の識別子とを転送する転送部を有する、ように構成することが望ましい。   The virtual service processing unit manages information on a server that performs service processing and service processing identification information provided by the server according to the type of packet in order to distribute service processing on the received packet to the server. The service list management unit may be configured such that the server includes a transfer unit that transfers information of the self server and an identifier of a service process provided by the self server to the service list management unit. desirable.

本発明の中継装置の態様一つは、受信パケットを対象にサービス処理を行なって上記受信パケットを中継処理することを前提とし、上記受信パケットを対象にサービス処理を行なう所定のサービス処理部を呼び出す呼出部と、上記呼出部の呼び出しにより、上記受信パケットにサービス処理を行なう第一のサービス処理部と、上記呼出部の呼び出しにより、上記受信パケットに仮想的にサービス処理を行なう第二のサービス処理部と、上記受信パケットの上位レイヤの状態の検出に基づく情報を管理するコネクション状態管理部と、上記第二のサービス処理部が上記呼出部から呼び出されると、受信パケットの内の所定の情報を所定のサーバへ送信する送信部と、上記サーバから送信された情報を受信する受信部と、上記受信した結果を上記受信パケットまたは上記コネクション状態管理部で管理される上記情報に反映する反映部と、同一のコネクションパケットに対し、上記コネクション状態管理部で管理される上記反映後の情報に基づいてフィルタ処理するフィルタ処理部と、を有するように構成する。   One aspect of the relay apparatus of the present invention is based on the premise that the received packet is subjected to service processing and the received packet is relayed, and a predetermined service processing unit that performs service processing on the received packet is called. A calling unit; a first service processing unit that performs service processing on the received packet by calling the calling unit; and a second service processing that virtually performs service processing on the received packet by calling the calling unit. A connection state management unit that manages information based on detection of a state of an upper layer of the received packet, and when the second service processing unit is called from the calling unit, predetermined information in the received packet is A transmitting unit for transmitting to a predetermined server, a receiving unit for receiving information transmitted from the server, and the received result as described above. A filtering process for performing filtering on the same connection packet with respect to the reflection packet or the reflection unit reflected in the information managed by the connection state management unit based on the post-reflection information managed by the connection state management unit And a portion.

なお、上記呼出部の呼び出しにより上記第二のサービス処理部が呼び出されると、上記受信パケットは処理依頼キューに一時的にキューイングされ、続く受信パケットに対するサービス処理が上記呼出部によって続いて呼び出されたサービス処理部によって行なわれる、ように構成してもよい。   When the second service processing unit is called by calling the calling unit, the received packet is temporarily queued in the processing request queue, and service processing for subsequent received packets is subsequently called by the calling unit. Alternatively, the service processing unit may be configured.

また、上記第二のサービス処理部は、上記受信パケットに対するサービス処理を上記サーバへ振り分けるため、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報とをパケットの種類に応じて管理するサービスリスト管理部を有する、ことが望ましい。   In addition, the second service processing unit distributes service processing for the received packet to the server, so that information on the server that performs the service processing and identification information of the service processing provided by the server are determined according to the type of packet. It is desirable to have a service list management unit to manage.

本発明のサーバの態様一つは、中継装置で受信されたパケットの内の所定の情報を上記中継装置から受信することを前提とし、コネクションの状態を管理するコネクション状態管理部と、上記パケットの上位レイヤの状態を検出してサービス処理する上位レイヤ検出部と、上記上位レイヤ検出部によって検出された上記パケットの上位レイヤの状態を基に、上記コネクション状態管理部によって管理される上記パケットのコネクション状態を更新するコネクション状態更新部と、上記サービス処理の結果及び上記コネクション状態の更新情報を上記中継装置に送信する送信部と、を有するように構成する。   One aspect of the server according to the present invention is based on the premise that predetermined information in a packet received by a relay device is received from the relay device, and a connection state management unit that manages a connection state, An upper layer detection unit that detects a higher layer state and performs service processing, and the connection of the packet managed by the connection state management unit based on the upper layer state of the packet detected by the upper layer detection unit A connection state updating unit that updates the state; and a transmission unit that transmits the result of the service processing and the update information of the connection state to the relay device.

なお、上記サーバは、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報とをパケットの種類に応じて管理する上記中継装置のサービスリスト管理部に対し、自己サーバの情報及び該自己サーバが提供するサービス処理の識別子とを転送する転送部を有する、ように構成することが望ましい。   Note that the server provides information on its own server to the service list management unit of the relay apparatus that manages information on a server that performs service processing and identification information on service processing provided by the server according to the type of packet. It is desirable to have a transfer unit that transfers the service processing identifier provided by the self-server.

本発明の方法の態様一つは、受信パケットを対象にサービス処理を行なって上記受信パケットを中継処理する、中継部とサーバからなる階層型パケット処理システムで行なわれることを前提とし、上記中継部は、上記受信パケットを対象にサービス処理を行なう第一または第二のサービス処理部を呼び出し、上記呼び出しにより第一のサービス処理部が呼び出された場合は、上記受信パケットにサービス処理を行ない、上記呼び出しにより第二のサービス処理部が呼び出された場合は、上記受信パケットに仮想的にサービス処理を行ない、上記サーバは、上記第二のサービス処理部が上記呼び出されると、上記第二のサービス処理部の代わりに上記受信パケットに対して実際にサービス処理を行なう、ようにする。   One aspect of the method of the present invention is based on the premise that the method is performed in a hierarchical packet processing system including a relay unit and a server that performs service processing on a received packet and relays the received packet. Calls the first or second service processing unit that performs service processing on the received packet, and when the first service processing unit is called by the call, performs service processing on the received packet, When the second service processing unit is called by the call, the service processing is virtually performed on the received packet, and when the second service processing unit is called, the server performs the second service processing. Service processing is actually performed on the received packet instead of the unit.

なお、受信パケットに対するコネクション状態をコネクション状態管理部で管理し、上記サーバは、上記受信パケットの上位レイヤの状態を検出し、該上位レイヤの状態の検出結果を基に、上記コネクション状態管理部に管理される上記受信パケットの上記コネクション状態を更新し、上記中継部は、同一のコネクション受信パケットを、上記更新された上記コネクション状態管理部の上記コネクション状態に基づいてフィルタ処理する、ことが望ましい。   The connection state for the received packet is managed by the connection state management unit, and the server detects the state of the upper layer of the received packet, and based on the detection result of the state of the upper layer, Preferably, the connection state of the received packet to be managed is updated, and the relay unit filters the same connection received packet based on the connection state of the updated connection state management unit.

本発明のプログラムの態様一つは、受信パケットを対象にサービス処理を行なって上記受信パケットを中継処理する、中継部とサーバで実行可能なプログラムであって、上記中継部において、上記受信パケットを対象にサービス処理を行なう第一または第二のサービス処理部を呼び出す機能と、上記呼び出しにより第一のサービス処理部が呼び出された場合は、上記受信パケットにサービス処理を行なう機能と、上記呼び出しにより第二のサービス処理部が呼び出された場合は、上記受信パケットに仮想的にサービス処理を行なう機能と、を実現し、上記サーバにおいて、上記第二のサービス処理部が上記呼び出されると、上記第二のサービス処理部の代わりに上記受信パケットに対して実際にサービス処理を行なう機能と、を実現する。   One aspect of the program of the present invention is a program that can be executed by a relay unit and a server that performs a service process on a received packet and relays the received packet. A function for calling a first or second service processing unit for performing service processing on a target, a function for performing service processing on the received packet when the first service processing unit is called by the call, and a function for calling When the second service processing unit is called, a function of virtually processing the received packet is realized. When the second service processing unit is called in the server, the second service processing unit And a function of actually performing service processing on the received packet instead of the second service processing unit.

なお、受信パケットに対するコネクション状態をコネクション状態管理部で管理する機能と、上記サーバにおいて、上記受信パケットの上位レイヤの状態を検出する機能と、該上位レイヤの状態の検出結果を基に、上記コネクション状態管理部に管理される上記受信パケットの上記コネクション状態を更新する機能と、上記中継部において、同一のコネクション受信パケットを、上記更新された上記コネクション状態管理部の上記コネクション状態に基づいてフィルタ処理する機能と、を実現することが望ましい。   The connection state management unit manages the connection state for the received packet, the function for detecting the upper layer state of the received packet in the server, and the connection result based on the detection result of the upper layer state. The function of updating the connection state of the received packet managed by the state management unit, and the relay unit filtering the same connection received packet based on the updated connection state of the connection state management unit It is desirable to realize the function to perform.

本発明では、呼出部の呼び出しに応じて、サービス処理をサーバの外部サービス処理部で行なわせる。そしてこの際に、呼出部に対し、中継部で処理を行なっているように見せかけて、実際に処理を行なっているサーバ及びサービス処理の存在を隠蔽する。   In the present invention, service processing is performed by the external service processing unit of the server in response to the calling of the calling unit. At this time, the calling unit is made to appear to be performing processing in the relay unit, and the existence of the server and service processing that are actually performing processing is concealed.

このため、上記呼出部からは、上記第二のサービス処理部が何れのサーバで何れのサービス処理を行なわせているか認識できない。よって、仮にサーバや外部サービス処理部のサービス処理に追加・変更等があったとしても、該追加・変更等に基づく呼出部の設定変更は不要となる。   For this reason, the calling unit cannot recognize which service processing is being performed on which server by the second service processing unit. Therefore, even if there is an addition / change in the service processing of the server or the external service processing unit, it is not necessary to change the setting of the calling unit based on the addition / change.

また本発明では、サーバでサービス処理を行なわせる場合、受信パケットを処理依頼キューに一時的に保管し、この間、同一のコネクションの受信パケットを処理するようにしている。   Further, in the present invention, when service processing is performed by the server, received packets are temporarily stored in a processing request queue, and during this time, received packets of the same connection are processed.

このため、例えば複雑な処理をサーバに行なわせた場合であっても、上記複雑な処理が終わるまで同一のコネクション受信パケットの処理を止める必要がなくなり、同一のコネクション受信パケットを次々と処理できる。   For this reason, for example, even when complicated processing is performed by the server, it is not necessary to stop processing of the same connection reception packet until the complicated processing is completed, and the same connection reception packet can be processed one after another.

また、サーバで行なわれるサービス処理を、中継部における受信パケットの中継処理で使用されてるCPUが空いた時間を利用して行なうようにする。
このため、サーバで行なうサービス処理よりも中継部で行なう中継処理を優先することが可能になる。
In addition, the service processing performed by the server is performed using the time available for the CPU used in the relay processing of the received packet in the relay unit.
For this reason, it becomes possible to give priority to the relay process performed by the relay unit over the service process performed by the server.

また、本発明では、サーバで行なうサービス処理において、上記受信パケットの上位レイヤの状態を検出し、該上位レイヤの状態の検出結果を基にコネクション状態管理部に管理される上記受信パケットのコネクション状態を更新する。そして、上記中継部で受信された同一のコネクション受信パケットを、上記更新後のコネクション状態に基づいてフィルタ処理させる。   Also, in the present invention, in the service processing performed by the server, the state of the upper layer of the received packet is detected, and the connection state of the received packet managed by the connection state management unit based on the detection result of the state of the upper layer Update. Then, the same connection reception packet received by the relay unit is filtered based on the updated connection state.

このため、上位レイヤの状態検出に基づくコネクション状態の更新をサーバで行なわせることが可能になり、中継部では単に、上記更新後のコネクション状態を参照するだけでフィルタ処理が行なえる。   For this reason, it is possible to cause the server to update the connection state based on the state detection of the upper layer, and the relay unit can perform the filtering process simply by referring to the updated connection state.

また、本発明では、上記受信パケットに対するサービス処理を中継部からサーバへ振り分けるための、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報とをサーバからサービスリストに登録させる。   In the present invention, the server processing information and the service processing identification information provided by the server for registering the service processing for the received packet from the relay unit to the server are registered in the service list.

このため、サーバから、自己サーバの情報及び該自己サーバが提供するサービス処理の識別子とを中継部のサービスリストへ転送することで、中継部によるパケットの振り分け先のサーバを変更できる。   For this reason, by transferring the server information and the service processing identifier provided by the server to the service list of the relay unit from the server, the server to which the relay unit distributes the packet can be changed.

以上より本発明においては、サービス処理を行なうサーバの追加・変更等を行なう場合であってもその変更を容易に行なうことが可能になる。また、中継処理を高速に行なわせることが可能になる。   As described above, according to the present invention, even when a server that performs service processing is added or changed, the change can be easily performed. In addition, the relay process can be performed at high speed.

以下、本発明を実施するための最良の形態を、図面を参照しながら詳細に説明する。
図1は、本発明に適用される階層型パケット処理技術の原理を説明するための図である。本階層型パケット処理技術は、異種または同種のネットワーク間に接続される中継システムにおいて好適に適用される技術であり、受信パケットに対するパケットサービス処理を中継部とサーバとに振り分けて行なわせることによりパケットの高速中継処理を実現させる。
Hereinafter, the best mode for carrying out the present invention will be described in detail with reference to the drawings.
FIG. 1 is a diagram for explaining the principle of a hierarchical packet processing technique applied to the present invention. This hierarchical packet processing technique is a technique that is preferably applied in a relay system connected between different or similar networks, and packet processing is performed by distributing the packet service processing for received packets between the relay unit and the server. High-speed relay processing is realized.

同図は、上記中継部及び上記サーバの、上記パケットサービス処理を行なう処理系の論理ブロック図である。
同図の中継部1には、呼出部1−1、サービス処理部1−2、及び仮想サービス処理部1−3が構成される。また同図のサーバ2には、仮想呼出部2−1、外部サービス処理部2−2が構成される。
This figure is a logical block diagram of a processing system for performing the packet service processing of the relay unit and the server.
The relay unit 1 shown in FIG. 1 includes a calling unit 1-1, a service processing unit 1-2, and a virtual service processing unit 1-3. The server 2 shown in FIG. 2 includes a virtual call unit 2-1 and an external service processing unit 2-2.

上記中継部1の呼出部1−1は、受信パケットに応じてサービス処理部1−2または仮想サービス処理部1−3を呼び出し、サービス処理部1−2または仮想サービス処理部1−3に対し、当該受信パケットに対する各自のサービス処理を互いに独立して実行させる。   The calling unit 1-1 of the relay unit 1 calls the service processing unit 1-2 or the virtual service processing unit 1-3 according to the received packet, and calls the service processing unit 1-2 or the virtual service processing unit 1-3. The service processing for the received packet is executed independently of each other.

上記サービス処理部1−2は、例えばタイマー更新処理やパケット通過/廃棄処理などのパケットbyパケット処理を、受信パケットに該当のコネクション状態を管理する後述のコネクション状態管理部を参照しながら当該受信パケットに実行する。   The service processing unit 1-2 performs packet by packet processing such as timer update processing and packet passing / discarding processing, for example, while referring to a connection state management unit described later that manages a connection state corresponding to the received packet. To run.

また上記仮想サービス処理部1−3は、当該受信パケットに対するサービス処理の実行を上記サーバ2の仮想呼出部2−1に委託し、更に該仮想呼出部2−1から当該サービス処理の実行結果を受け取ることにより、上記サーバ2で実行されたサービス処理(以下、外部サービス処理と呼ぶ)を、当該仮想サービス処理部2−1であたかも実行したかのうように上記呼出部1−1に見せかける。上記外部サービス処理の好適な例としては、受信パケットの上位レイヤを分析して上記コネクション状態管理部の対応コネクションの状態を更新するステートフル処理が挙げられる。   The virtual service processing unit 1-3 entrusts the execution of the service process to the received packet to the virtual call unit 2-1 of the server 2, and further receives the execution result of the service process from the virtual call unit 2-1. By receiving it, the calling unit 1-1 is made to appear as if the virtual service processing unit 2-1 executes the service processing (hereinafter referred to as external service processing) executed by the server 2. As a suitable example of the external service process, there is a stateful process in which the upper layer of the received packet is analyzed to update the state of the corresponding connection of the connection state management unit.

一方、上記サーバ2の外部サービス処理部2−2は、上記仮想呼出部2−1によって仮想的に呼び出され、上記中継部1の仮想サービス処理部1−3から上記仮想呼出部2−1に委託された外部サービス処理を実際に実行し、その実行結果を仮想呼出部2−1に与える。そして仮想呼出部2−1は、上記中継部1の仮想サービス処理部1−3に対してその実行結果を返す。このとき、上記外部サービス処理として上記ステートフル処理が適用される場合は、上記コネクション状態管理部をサーバ2から更新可能なように構成し、上記コネクション状態管理部の対応個所の更新も行なう。   On the other hand, the external service processing unit 2-2 of the server 2 is virtually called by the virtual calling unit 2-1, and is transferred from the virtual service processing unit 1-3 of the relay unit 1 to the virtual calling unit 2-1. The commissioned external service process is actually executed, and the execution result is given to the virtual call unit 2-1. Then, the virtual call unit 2-1 returns the execution result to the virtual service processing unit 1-3 of the relay unit 1. At this time, when the stateful process is applied as the external service process, the connection state management unit is configured to be updateable from the server 2, and the corresponding part of the connection state management unit is also updated.

なお、中継部1から如何なる種類のサービス処理をサーバ2に委託するか、当該サービス処理を如何なるサーバ2へ振り分けるかについての情報登録や登録情報の変更は、サーバ2及び仮想サービス処理部1−3が行なう。   It should be noted that information registration and change of registered information regarding what kind of service processing is entrusted to the server 2 from the relay unit 1 and to which server 2 the service processing is distributed are the server 2 and the virtual service processing unit 1-3. Will do.

このように本階層型パケット処理の技術によれば、受信パケットに対するサービス処理を中継部1だけでなく、サーバ2に実行させることができる。この場合、特に、中継部1においてパケットbyパケット処理を行なわせ、サーバ2においてコネクション状態管理部を更新する複雑で重たい処理(ステートフル処理)を行なわせれば、中継部1でコネクション状態管理部を更新するための上記複雑で重たい処理を行なう必要はなくなる。このため中継部1では、上記コネクション状態管理部を参照して受信パケットの通過/廃棄を決定する、或いはタイマーを更新するなど、単純で軽い処理を行なわせることが可能になる。そして更に、中継部1とサーバ2のサービス処理を互いに独立して行なわせるため、処理時間のかかるサーバ2のサービス処理が終わるのを待つことなく中継部1のサービス処理を次々に受信パケットに対して行なえ、パケット中継が高速になる。また、如何なるサーバ2で如何なる外部サービス処理が実行されようとも、中継部1の呼出部1−1からはある所定のサービス処理に見える仮想サービス処理を呼び出すだけなので、各種サービス処理を呼び出す呼出部1−1の呼び出し設定やパケットbyパケット処理を行なう各部や設定を変更することなく、受信パケットに対して実行させる外部サービス処理の種類や当該外部サービス処理を行なうサーバの転送先を変更できる。また、中継部1の呼出部1−1による外部サービスの呼び出しが、あたかもサーバ2の仮想呼出部2−1から行なわれているかのように仮想化させているため、サーバ2の外部サービス処理部2−2も、相対する中継部1の設定変更を意識する必要がない。   Thus, according to the present hierarchical packet processing technique, not only the relay unit 1 but also the server 2 can execute service processing for received packets. In this case, in particular, if the relay unit 1 performs packet by packet processing and the server 2 performs complicated and heavy processing (stateful processing) for updating the connection state management unit, the relay unit 1 updates the connection state management unit. Therefore, it is not necessary to perform the complicated and heavy processing. For this reason, the relay unit 1 can perform simple and light processing such as determining the passage / discard of the received packet with reference to the connection state management unit or updating the timer. Further, since the service processing of the relay unit 1 and the server 2 is performed independently of each other, the service processing of the relay unit 1 is sequentially performed on the received packets without waiting for the service processing of the server 2 that takes a long processing time to end. Packet relay is faster. In addition, no matter what external service processing is executed on any server 2, the calling unit 1-1 of the relay unit 1 only calls a virtual service process that looks like a predetermined service process. It is possible to change the type of external service processing to be executed on a received packet and the transfer destination of a server that performs the external service processing without changing each unit or setting for performing -1 call setting or packet by packet processing. Further, since the calling of the external service by the calling unit 1-1 of the relay unit 1 is virtualized as if it is performed from the virtual calling unit 2-1 of the server 2, the external service processing unit of the server 2 2-2 does not need to be aware of the setting change of the opposite relay unit 1.

そして、特に、上記仮想サービス処理部1−3及びサーバ2の各部の機能をソフトウエアで実現し、パケットbyパケット処理を行なう各部をハードウエアで実現することで、パケット中継処理の高速化と、外部サービス処理の設定変更に対する柔軟性とを享受できる。   In particular, the functions of the virtual service processing unit 1-3 and the server 2 are realized by software, and the parts that perform packet by packet processing are realized by hardware. You can enjoy the flexibility to change the setting of external service processing.

続いて、上記論理ブロックの実装例を示す。
なお本例では、Linux(登録商標)において本メカニズムを実装した場合の例を示すこととする。
Subsequently, an implementation example of the logic block will be described.
In this example, an example in which this mechanism is implemented in Linux (registered trademark) is shown.

図2(a)は、図1の中継部1の実装例である。
同図によると、上記中継部1は、「NF_HOOK」10−1、パケットbyパケット処理カーネル関数を提供するサービス処理部10−2、及び仮想ボトムハーフ処理部10−3によって構成することができる。
FIG. 2A is an implementation example of the relay unit 1 of FIG.
According to the figure, the relay unit 1 can be configured by “NF_HOOK” 10-1, a service processing unit 10-2 that provides a packet by packet processing kernel function, and a virtual bottom half processing unit 10-3.

同図の「NF_FOOK」10−1はカーネル内の機能である。当該「NF_FOOK」10−1は、受信パケットのヘッダ情報或いは、当該受信パケットに対するコネクションの状態が記述された不図示のコネクション状態管理テーブルを参照し、当該受信パケットは、上記サービス処理部10−2が提供するサービス処理を実行させるものであるか、または上記仮想ボトムハーフ処理部10−3が提供するサービス処理を実行させるものであるか判定する。   “NF_FOOK” 10-1 in the figure is a function in the kernel. The “NF_FOOK” 10-1 refers to the header information of the received packet or a connection state management table (not shown) in which the state of the connection to the received packet is described. It is determined whether or not the service processing provided by the virtual bottom half processing unit 10-3 is executed.

当該判定により、上記サービス処理部10−2が提供するサービス処理を当該パケットに対して実行させるものである場合は、該当するパケットbyパケット処理カーネル関数によって提供される処理を実行させ、その処理結果を得る。また、上記判定結果が、上記仮想ボトムハーフ処理部10−3が提供するサービス処理(すなわち外部サービス処理)を当該パケットに対して実行させるものである場合は、当該パケットを仮想ボトムハーフ処理部10−3に渡し、該仮想ボトムハーフ処理部10−3からサービス処理後のパケットを得る。   If it is determined that the service processing provided by the service processing unit 10-2 is to be executed on the packet, the processing provided by the corresponding packet by packet processing kernel function is executed, and the processing result Get. Further, when the determination result is to cause the packet processing to be performed by the virtual bottom half processing unit 10-3 (that is, external service processing), the virtual bottom half processing unit 10 -3 to obtain a packet after service processing from the virtual bottom half processing unit 10-3.

サービス処理部10−2は、パケットbyパケット処理カーネル関数が呼び出されると、受信パケットに対し、カーネルに実装された対応処理(例えばタイマー更新やコネクション状態管理テーブルの参照に基づくフィルタリング処理など)を実行する。   When the packet by packet processing kernel function is called, the service processing unit 10-2 executes corresponding processing implemented in the kernel (for example, filtering processing based on timer update or connection state management table reference) for the received packet. To do.

仮想ボトムハーフ処理部10−3は、上記「NF_FOOK」10−1に対し該「NF_FOOK」10−1から渡されたパケットを自身で処理しているかのように見せかけ、その実際の処理をサーバ2に行なわせる。本例では、当該仮想ボトムハーフ処理部10−3はユーザプロセスとして記述する。従って、仮想ボトムハーフ処理部10−3には、カーネル内の機能である上記「NF_FOOK」10−1と上記ユーザプロセス間で処理の交換ができるように、カーネルから提供される処理依頼キュー(ip queue)10−3−1が使用される。また、当該仮想ボトムハーフ処理部10−3には、更に、上記処理依頼キュー10−3−1との間で処理を交換するための処理取り出し/書き込み機能10−3−2と、当該処理(パケットに対する外部サービス処理)の処理依頼を図1のサーバ2に転送するための転送機能10−3−3とをプロキシスレッドFPの形態で備える。 The virtual bottom half processing unit 10-3 makes it appear to the “NF_FOOK” 10-1 that it is processing the packet passed from the “NF_FOOK” 10-1, and performs the actual processing on the server 2 Let me do it. In this example, the virtual bottom half processing unit 10-3 is described as a user process. Accordingly, the virtual bottom half processing unit 10-3 includes a processing request queue (ip provided from the kernel so that the processing can be exchanged between the “NF_FOOK” 10-1 which is a function in the kernel and the user process. queue) 10-3-1 is used. The virtual bottom half processing unit 10-3 further includes a process fetch / write function 10-3-2 for exchanging processes with the process request queue 10-3-1, A transfer function 10-3-3 for transferring a processing request for external service processing for a packet to the server 2 in FIG.

転送機能10−3−3は、受信パケットに対して実行する外部サービス処理の識別情報や当該外部サービス処理を実行させるサーバ2の情報を書き替え自在に記録したサービスリストを備え、当該サービスリストに基づいて、受信パケットに対する所定の外部サービス処理を所定のサーバ2へ委託する。また、サーバ2から送信された情報(例えばサービスリストの更新情報、外部サービス処理の結果情報など)を受信する。   The transfer function 10-3-3 includes a service list in which identification information of an external service process to be executed on a received packet and information of the server 2 that executes the external service process are recorded in a rewritable manner. Based on this, a predetermined external service process for the received packet is entrusted to a predetermined server 2. Also, information transmitted from the server 2 (for example, service list update information, external service processing result information, etc.) is received.

上記処理取り出し/書き込み機能10−3−2は、上記処理依頼キュー10−3−1から処理情報を取り出し、サーバ2で外部サービス処理ができるように処理情報を編集したり、サーバ2から送信された結果情報をこれに対応するパケットに反映させ、反映パケットを上記処理依頼キュー10−3−1に書き込んだりする。   The process fetch / write function 10-3-2 retrieves process information from the process request queue 10-3-1, edits the process information so that the server 2 can perform external service processing, and transmits the process information from the server 2. The result information is reflected in the corresponding packet, and the reflected packet is written in the processing request queue 10-3-1.

図2(b)は、図1のサーバ2の実装例である。
同図によると、上記サーバ2は、仮想「NF_FOOK」20−1、「フックボトムハーフ実行カーネル関数」20−2によって構成することができる。
FIG. 2B is an implementation example of the server 2 of FIG.
According to the figure, the server 2 can be configured by a virtual “NF_FOOK” 20-1 and a “hook bottom half execution kernel function” 20-2.

同図の仮想「NF_FOOK」20−1は、中継部1に対して処理応答(例えば外部サービス処理の処理結果など)を返すための転送機能20−1−1と、「フックボトムハーフ実行カーネル関数」20−2によって提供されるサーバ2のカーネル内の処理を呼び出す処理呼出機能PとをプロキシスレッドSPの態様で備える。そして更に、当該仮想「NF_FOOK」20−1では、上記処理呼出機能Pの一部(すなわち同図の処理呼出機能K)をカーネル内に配置させる。なお、本例では「フックボトムハーフ実行カーネル関数」20−2においてフックボトムハーフ機能が適用されているが、これは、優先して行なわなければならない処理を優先的にCPU(中央処理装置)に実行させる機能であり、当該「フックボトムハーフ実行カーネル関数」として登録されている処理は、上記優先処理の終わったタイミング(例えばCPUの空き時間等)に実行される。   The virtual “NF_FOOK” 20-1 in FIG. 10 includes a transfer function 20-1-1 for returning a processing response (for example, processing result of external service processing) to the relay unit 1, and a “hook bottom half execution kernel function”. The processing call function P for calling the processing in the kernel of the server 2 provided by 20-2 is provided in the form of the proxy thread SP. Further, in the virtual “NF_FOOK” 20-1, a part of the process call function P (that is, the process call function K in the figure) is arranged in the kernel. In this example, the hook bottom half function is applied to the “hook bottom half execution kernel function” 20-2. However, this processing gives priority to the CPU (central processing unit) processing that must be performed with priority. A process that is a function to be executed and is registered as the “hook bottom half execution kernel function” is executed at the timing when the above priority process ends (for example, the CPU idle time).

上記転送機能20−1−1は、中継部1から送信された処理依頼を受け付けたり、該処理依頼に対して実行した外部サービス処理の結果を該当する中継部1へ転送する。また、中継部1の転送機能10−3−3に備えられるサービスリストの更新(外部サービスの種類の追加・削除・変更や当該外部サービスを提供するサーバ情報の追加・削除・変更など)を行なう。   The transfer function 20-1-1 receives a processing request transmitted from the relay unit 1, and transfers a result of an external service process executed for the processing request to the corresponding relay unit 1. Also, the service list provided in the transfer function 10-3-3 of the relay unit 1 is updated (addition / deletion / change of the type of external service, addition / deletion / change of server information providing the external service, etc.). .

上記処理呼び出し機能Pは、システムコールにより、カーネル内の処理呼び出し機能Kを介して上記「フックボトムハーフ実行カーネル関数」20−2を呼び出し、転送機能20−1−1によって受信した処理依頼に基づく処理を実行させる。そして、その実行結果を受け取ると転送機能20−1−1に渡す。   The process call function P calls the “hook bottom half execution kernel function” 20-2 via the process call function K in the kernel by a system call, and is based on the process request received by the transfer function 20-1-1. Execute the process. When the execution result is received, it is transferred to the transfer function 20-1-1.

なお、上記処理では、適宜、不図示のコネクション状態管理テーブルが更新される。仮に、上記コネクション状態管理テーブルがサーバ2と中継部1にそれぞれ装備されているとすると、上記サーバ2のコネクション状態管理テーブルの更新を基に、サーバ2の転送機能20−1−1及び中継部1の転送機能10−3−3を介して中継部1のコネクション状態管理テーブルの同期をとることができる。このように中継部1及びサーバ2のそれぞれにコネクション状態管理テーブルを装備すれば、サーバ2のコネクション状態管理テーブルを状態の書き替え対象とし、中継部1のコネクション管理テーブルを参照やタイマーの更新を対象とする使い分けができる。   In the above process, a connection state management table (not shown) is updated as appropriate. If the server 2 and the relay unit 1 are equipped with the connection state management table, the transfer function 20-1-1 and the relay unit of the server 2 are updated based on the update of the connection state management table of the server 2. The connection state management table of the relay unit 1 can be synchronized via the transfer function 10-3-3. If each of the relay unit 1 and the server 2 is equipped with a connection state management table in this way, the connection state management table of the server 2 is set as a state rewriting target, and the connection management table of the relay unit 1 is referred to or a timer is updated. Can be used properly.

また、「フックボトムハーフ実行カーネル関数」20−2側には、自己のカーネル内の「NF_FOOK」から呼ばれたように見せかけることができる。
言うまでもないことだが、上記中継部1及びサーバ2は、それらの独立した処理を共通のCPUで実行させる中継システム(以下、階層型パケット処理システムと呼ぶ)、並びに、異なるCPUで実行させる階層型パケット処理システムに実装できる。特に共通のCPUを持つ階層型パケット処理システムに実装した場合は、上記フックボトムハーフ機能により、中継部1のパケットbyパケット処理を優先的にCPUで実行させ、サーバ1の外部サービス処理は上記CPUの空き時間などを利用して行なわせることができる。
Further, it can appear to the “hook bottom half execution kernel function” 20-2 side as if called from “NF_FOOK” in its own kernel.
Needless to say, the relay unit 1 and the server 2 have a relay system (hereinafter referred to as a hierarchical packet processing system) that executes their independent processing by a common CPU, and a hierarchical packet that is executed by different CPUs. Can be implemented in a processing system. In particular, when implemented in a hierarchical packet processing system having a common CPU, the above-mentioned hook bottom half function causes the CPU to preferentially execute the packet by packet processing of the relay unit 1, and the external service processing of the server 1 You can make use of the free time of the.

図3は、通信ケーブルを介して接続される異なる装置(中継装置及びサーバ)に上記中継部1とサーバ2を別々に実装した場合の上記階層型パケット処理システムの機能ブロック図である。   FIG. 3 is a functional block diagram of the hierarchical packet processing system when the relay unit 1 and the server 2 are separately mounted on different devices (relay devices and servers) connected via a communication cable.

本例の継装置300とサーバ350によって構成され、互いに通信ケーブルを介して接続されている。
同図に示される階層型パケット処理システム30の機能ブロック図では、上記中継装置300とサーバ350が備えている機能を装置300、350毎に分けて示している。同図に示されるように、上記中継装置300にはカーネル部301と同図に破線で囲まれる常駐型プログラム(以下、デーモンと呼ぶこととする)302が備えられ、上記サーバ350にはカーネル部351と同図に破線で囲まれるデーモン352が備えられている。
The relay device 300 and the server 350 of the present example are connected to each other via a communication cable.
In the functional block diagram of the hierarchical packet processing system 30 shown in the figure, the functions of the relay device 300 and the server 350 are shown separately for each of the devices 300 and 350. As shown in the figure, the relay device 300 includes a kernel unit 301 and a resident program (hereinafter referred to as a daemon) 302 surrounded by a broken line in the figure, and the server 350 includes a kernel unit. A daemon 352 surrounded by a broken line in FIG.

上記デーモン302は、同図に示されるように、マウントスレッド303、シグナリングスレッド304、プロキシスレッド305、及び、後述する例えば受信表、振分表、テーブルIDなどのサービスリストを備えている。また、上記デーモン352も同様な機能を有するスレッド(マウントスレッド353、シグナリングスレッド354、及びプロキシスレッド355)及び、後述の例えば送信表、受信表、テーブルIDなどの転送情報(上記サービスリストに対応する情報を含む)を備えている。   The daemon 302 includes a mount thread 303, a signaling thread 304, a proxy thread 305, and a service list such as a reception table, a distribution table, and a table ID, which will be described later, as shown in FIG. The daemon 352 also has threads (mount thread 353, signaling thread 354, and proxy thread 355) having similar functions, and transfer information such as a transmission table, a reception table, and a table ID described later (corresponding to the service list). Information).

上記各マウントスレッド303、353は、中継装置300に設定されているパケット取り込み用のネットワークインタフェース(同図のIF1及びIF2)と、サーバ350に仮想的に設定させるネットワークインタフェース(同図の仮想IF1及び仮想IF2)とのマッピング情報を両装置300、350上に作成するプロセス(マウントプロセス)である。   Each of the mount threads 303 and 353 includes a packet capturing network interface (IF1 and IF2 in the figure) set in the relay device 300 and a network interface (virtual IF1 and IF2 in the figure) that is virtually set in the server 350. This is a process (mounting process) for creating mapping information with the virtual IF 2) on both devices 300 and 350.

管理者がサーバ350においてマウントコマンド356を実行することにより、サーバ350のマウント情報357の中からIFが指定され、そのIFに対するマウント要求が中継装置300に送信される。中継装置300では管理者が予め中継装置300においてマウント許可リスト設定コマンド306を実行しており、マウント許可リスト307にマウントを許可するIFを設定している。このため、サーバ350から送信されたマウント要求は、上記マウント許可リスト307の設定内容(当該IFに対してマウントを許可する、または、許可しないの設定)に基づき、上記マウント要求のあったIFに対するマウント許可の応答をサーバ350に返信する。このマウントプロセスにより、IFトンネル対応情報が中継装置300の受信表308及びサーバ350の送信表358に設定され、サーバ350上に中継装置300の実IFが仮想的に作成される。   When the administrator executes the mount command 356 in the server 350, an IF is specified from the mount information 357 of the server 350, and a mount request for the IF is transmitted to the relay apparatus 300. In the relay device 300, the administrator previously executes the mount permission list setting command 306 in the relay device 300, and sets an IF that permits mounting in the mount permission list 307. Therefore, the mount request transmitted from the server 350 is based on the setting contents of the mount permission list 307 (setting that allows or disallows the IF to be mounted) for the IF that made the mount request. A mount permission response is returned to the server 350. By this mounting process, the IF tunnel correspondence information is set in the reception table 308 of the relay device 300 and the transmission table 358 of the server 350, and the real IF of the relay device 300 is virtually created on the server 350.

なお、管理者により上記マウント許可リスト設定コマンド306が実行されると、例えば、中継装置300上のネットワークインタフェースの中で、サーバ350の外部サービス処理対象に指定するネットワークインタフェース(同図におけるIF1、IF2)を後述するフックハンドラに登録しておくことができる。   When the mount permission list setting command 306 is executed by the administrator, for example, among the network interfaces on the relay device 300, the network interfaces designated as external service processing targets of the server 350 (IF1, IF2 in the figure). ) Can be registered in the hook handler described later.

また、サーバ350が複数存在する場合には上記サービスの提供対象とする上記中継装置300上のネットワークインタフェースを複数のサーバ350上の仮想IFへ対応づける必要があるため、上記マウントプロセスでは、上記中継装置300のネットワークフェースと複数のサーバ350の仮想IFとのマッピング情報を、プロセスの持つポート番号を用いて上記中継装置300の受信表308及びサーバ350の送信表358に設定する。   Further, when there are a plurality of servers 350, the network interface on the relay device 300 to be provided of the service needs to be associated with the virtual IF on the plurality of servers 350. The mapping information between the network interface of the device 300 and the virtual IFs of the plurality of servers 350 is set in the reception table 308 of the relay device 300 and the transmission table 358 of the server 350 using the port number of the process.

上記各シグナリングスレッド304、354は、サーバ350で提供する外部サービス処理を中継装置300から利用できるように設定するためのプロセス(シグナリングプロセス)である。当該シグナリングプロセスでは、中継装置300上で外部サービス処理が呼び出された時にその処理依頼メッセージを中継装置300から所定のサーバ350へ転送できるようにするために、両装置300、350間にその転送表を設定する。このシグナリングプロセスでは、例えば、管理者が同図のサーバ350上でサービス起動コマンド359を実行して、サーバ350が備える所定のサービスモジュールを中継装置300から呼びだしできるように起動し、中継装置300と該中継装置が呼び出すサーバ350のサービスモジュールとの対応表を中継装置300の振分表309及びサーバ350の受信表359に設定する。なお、この処理については後に詳しく説明することにする。   Each of the signaling threads 304 and 354 is a process (signaling process) for setting so that the external service processing provided by the server 350 can be used from the relay apparatus 300. In the signaling process, when an external service process is called on the relay device 300, the transfer request message is transferred between the devices 300 and 350 so that the processing request message can be transferred from the relay device 300 to the predetermined server 350. Set. In this signaling process, for example, the administrator executes a service activation command 359 on the server 350 shown in FIG. 3 to activate a predetermined service module included in the server 350 so that it can be called from the relay device 300. The correspondence table with the service module of the server 350 called by the relay device is set in the distribution table 309 of the relay device 300 and the reception table 359 of the server 350. This process will be described in detail later.

また、デーモン302及びデーモン352は、それぞれ、テーブルID310及びテーブルID360を備える。これらには、中継装置300のカーネル部301及びサーバ350のカーネル部351に共に備えられている後述のステートテーブル(上記コネクション状態管理テーブルに一部が対応)の場所が指定されている。   The daemon 302 and the daemon 352 include a table ID 310 and a table ID 360, respectively. In these, the location of a later-described state table (partly corresponding to the connection state management table) provided in both the kernel unit 301 of the relay device 300 and the kernel unit 351 of the server 350 is designated.

上記プロキシスレッド305、355は、中継装置300において後述のコネクショントラッキング処理により検出された特定のパケットをサーバ350で処理させたり、中継装置300及びサーバ350の各カーネル部301、351に実装された後述のステートテーブルを同期させるためのプロセス(プロキシプロセス)である。   The proxy threads 305 and 355 cause the server 350 to process a specific packet detected by the connection tracking process described later in the relay apparatus 300, or to be described later implemented in the kernel units 301 and 351 of the relay apparatus 300 and the server 350. This is a process (proxy process) for synchronizing the state table.

上記プロキシスレッド305は、カーネル部301から上記特定のパケットを受信し、パケットの全てまたは該パケットの内で外部サービス処理に必要な情報(以下、必要情報とする)のみ抽出し、上記マウントプロセス及びシグナリングプロセスにより設定された送信表308及び振分表309に従って該当サーバ350のプロキシスレッド355に上記パケットまたは上記必要情報を含む処理依頼メッセージを送信する。一方、上記プロキシスレッド355は上記処理依頼メッセージを受け取るとカーネル部351にその処理を渡して該当のサービス処理を実行させ、該カーネル部351からその処理結果を受け取る。プロキシスレッド355は、上記マウントプロセス及びシグナリングプロセスにより設定された送信表358及び受信表359に従って、その処理結果(例えば、変更情報や、パケットの通過や廃棄を知らせる情報など)を処理応答メッセージとして上記プロキシスレッド305に送信する。そして、プロキシスレッド305は、カーネル部301にその処理結果を返す。また更に、プロキシスレッド355は、カーネル部351に実装されたステートテーブルの更新を検出すると、上記テーブルIDに指定されたプロキシスレッド305に対し、テーブル同期メッセージとしてその更新情報を送信し、プロキシスレッド305はカーネル301内に実装されたステートテーブルの更新を行なう。   The proxy thread 305 receives the specific packet from the kernel unit 301, extracts all of the packet or only information necessary for external service processing (hereinafter referred to as necessary information) from the packet, The processing request message including the packet or the necessary information is transmitted to the proxy thread 355 of the corresponding server 350 according to the transmission table 308 and the distribution table 309 set by the signaling process. On the other hand, when the proxy thread 355 receives the processing request message, the proxy thread 355 passes the processing to the kernel unit 351 to execute the corresponding service processing, and receives the processing result from the kernel unit 351. In accordance with the transmission table 358 and the reception table 359 set by the mount process and the signaling process, the proxy thread 355 uses the processing result (for example, change information, information notifying that the packet is passed or discarded) as a processing response message. Send to proxy thread 305. Then, the proxy thread 305 returns the processing result to the kernel unit 301. Furthermore, when the proxy thread 355 detects the update of the state table implemented in the kernel unit 351, the proxy thread 355 transmits the update information as a table synchronization message to the proxy thread 305 specified by the table ID, and the proxy thread 305 Updates the state table implemented in the kernel 301.

次にカーネル部について説明する。
中継装置300のカーネル部301には、パケットの処理経路が太い矢印で示されている。本例の処理経路には5つのフック処理部311〜315と二つのルーティング処理部316(316−1、316−2)とが実装されている。また更に、フック情報テーブル317、フックハンドラ318、ステートテーブル319、及びフィルタルール320が実装されている。
Next, the kernel part will be described.
In the kernel unit 301 of the relay apparatus 300, the packet processing path is indicated by a thick arrow. In the processing path of this example, five hook processing units 311 to 315 and two routing processing units 316 (316-1, 316-2) are mounted. Furthermore, a hook information table 317, a hook handler 318, a state table 319, and a filter rule 320 are implemented.

上記フック情報テーブル317は、例えばタイマー更新処理やパケットの通過・パケットの廃棄を行なうフィルタ処理など、簡易処理を行なうパケットbyパケット処理、或いは複雑な処理をサーバに委託するコネクショントラッキング(またはコントラック)処理(以下では、一部にパケットbyパケット処理を含んでいる場合もコネクショントラッキング処理と呼ぶこととする)など、複数の処理を登録することができるテーブルである。同図には、上記処理経路のパケットの取り込み口(同図のIF1)に最も近い位置に示されるフック処理部311のフック情報テーブル317のみが示されているが、その他の各フック処理部312〜315に対してもそれぞれフック情報テーブルが備えられている。各フック処理部311〜315は、各フック処理部311〜315に対応するフック情報テーブルに登録された処理を受信パケットに対して順じ実行する。   The hook information table 317 is a connection tracking (or contrack) that entrusts a server to packet by packet processing for performing simple processing, such as timer update processing, filter processing for packet passing / packet discarding, or complicated processing. It is a table that can register a plurality of processes such as processes (hereinafter, also referred to as connection tracking processes when some packet by packet processes are included). Although only the hook information table 317 of the hook processing unit 311 shown at the position closest to the packet intake port (IF1 in the same figure) of the processing path is shown in FIG. ˜315 are also provided with hook information tables. Each hook processing unit 311 to 315 sequentially executes the processing registered in the hook information table corresponding to each hook processing unit 311 to 315 with respect to the received packet.

本例では、フック処理部311及びフック処理部314においてコネクショントラッキング処理を実行するようにフック情報テーブルが設定され、その他のフック処理部312、313、315ではフィルタ処理(同図のルール設定部321によって書き替え自由にフィルタリングのポリシーが定義づけされる上記フィルタルール320や、セッション状態を管理する後述のステートテーブル319を参照し、受信パケットの通過・廃棄を判断する処理)を実行するようにフック情報テーブルが設定されている。   In this example, the hook information table is set so that the hook processing unit 311 and the hook processing unit 314 execute the connection tracking process, and the other hook processing units 312, 313, and 315 perform the filter process (the rule setting unit 321 in the figure). Referring to the filter rule 320 in which the filtering policy can be freely rewritten and the state table 319 (to be described later) for managing the session state, the hook is performed so as to execute the process of determining whether the received packet is passed or discarded. An information table is set.

上記フックハンドラ318は、上記フック情報テーブル317に設定されているコネクショントラッキング処理の際に呼び出される機能であり、当該フックハンドラ318に基づいて受信パケットに対するコネクショントラッキング処理を行なう。このコネクショントラッキング処理が実行されると、適宜、上記ステートテーブル319が参照される。   The hook handler 318 is a function called during connection tracking processing set in the hook information table 317, and performs connection tracking processing on received packets based on the hook handler 318. When this connection tracking process is executed, the state table 319 is referred to as appropriate.

なお、特に示されていないが、フック情報テーブルにコネクショントラッキング処理が設定されているフック処理部314においても、上記フック処理部311と同様な構成をとっている。   Although not particularly shown, the hook processing unit 314 in which connection tracking processing is set in the hook information table also has the same configuration as the hook processing unit 311.

また、フック情報テーブルにフィルタ処理が設定されているその他のフック処理部からも、上記ステートテーブル319及びフィルタルール320を参照できるように構成されている。   Further, the state table 319 and the filter rule 320 can be referred to from other hook processing units for which filter processing is set in the hook information table.

上記フック処理部311(同様にフック処理部314)において上記コネクショントラッキング処理が実行されると、例えば上記パケットbyパケット処理が行なわれる場合はタイマ更新を行なったら直ちに先の処理部に当該パケットを渡し、外部委託処理が行なわれる場合は、同図に示される処理依頼キュー(ip queue)322に当該パケットをキューイングして処理をサーバ350に委託して、当該フック処理部311(同様にフック処理部314)で次のパケットを受信する。この処理依頼キュー311は、カーネル部301の機能であり、カーネル部301からパケットを借りてきて当該パケットをユーザ空間で取り扱えるようになる仕組みを提供する。 When the connection tracking processing is executed in the hook processing unit 311 (similarly, the hook processing unit 314), for example, when the packet by packet processing is performed, the packet is transferred to the previous processing unit as soon as the timer is updated. When outsourcing processing is performed, the processing request queue (ip queue) 322 queues the packet, entrusts the processing to the server 350, and the hook processing unit 311 (similarly, the hook processing unit 314) receives the next packet. The processing request queue 311 is a function of the kernel unit 301 and provides a mechanism that allows a packet to be borrowed from the kernel unit 301 and handled in the user space.

なお、カーネル部301の処理依頼キュー322とデーモン302との通信は、同図のカーネルソケット(NETLINK)323を介して行なわせる。
また上記にも述べたが、上記ステートテーブル319と対になるステートテーブルがサーバ350のカーネル部351に実装されている。本例では、互いのステートテーブルの同期を実現する仕組みとして、中継装置300のカーネル部301及びサーバ350のカーネル部351に示されるソケット(CT−NETLINK)324によって提供している。
Communication between the processing request queue 322 of the kernel unit 301 and the daemon 302 is performed via a kernel socket (NETLINK) 323 shown in FIG.
As described above, a state table that is paired with the state table 319 is mounted on the kernel unit 351 of the server 350. In this example, as a mechanism for realizing the synchronization of the state tables of each other, a socket (CT-NETLINK) 324 shown in the kernel unit 301 of the relay device 300 and the kernel unit 351 of the server 350 is provided.

一方、サーバ350のカーネル部351には、フックボトムハーフ361、サービス呼出モジュール362、及び、中継装置300のカーネル部351に実装されているステートテーブル319と対となるステートテーブル363が実装されている。   On the other hand, in the kernel unit 351 of the server 350, the hook bottom half 361, the service call module 362, and the state table 363 that is paired with the state table 319 mounted in the kernel unit 351 of the relay apparatus 300 are mounted. .

上記フックボトムハーフ361は、ボトムハーフハンドラ(カーネル内で待ち行列に登録されたルーチンを処理する仕組み)を備え、上記サービス呼出モジュール362の呼びだしに応じて、該当するサービスモジュールをCPUの空き時間に実行し、その処理結果をサービスモジュールに返す。   The hook bottom half 361 includes a bottom half handler (mechanism for processing a routine registered in a queue in the kernel), and in response to a call from the service call module 362, sets the corresponding service module to a free time of the CPU. Execute and return the processing result to the service module.

また、該実行結果に応じて上記ステートテーブル363を更新する。
上記サービス呼出モジュール362は、デーモン351との通信を同図に示されるカーネルソケット364を介して行なう。
Further, the state table 363 is updated according to the execution result.
The service call module 362 communicates with the daemon 351 through a kernel socket 364 shown in the figure.

なお、同図に示されるソケット(CT−NETLINK)365は、先程も説明したが、サーバ350のカーネル351に実装されるステートテーブル363と中継装置300のカーネル部301に実装されるステートテーブル319との同期をとるための仕組みである。   As described above, the socket (CT-NETLINK) 365 shown in the figure includes a state table 363 mounted on the kernel 351 of the server 350 and a state table 319 mounted on the kernel unit 301 of the relay device 300. It is a mechanism for synchronizing.

上記ステートテーブル363は、現在認識されているコネクションの状態を管理するテーブルであり、本例においては、今後コネクション作成が期待されるコネクションの情報を管理する不図示のexpectテーブルと共に用いる。なお、ステートテーブル319は単独で用いる。   The state table 363 is a table for managing the state of the currently recognized connection. In this example, the state table 363 is used together with an expect table (not shown) for managing information on a connection expected to be created in the future. Note that the state table 319 is used alone.

図4は、上記ステートテーブル319、363及び、該ステートテーブル363と共に用いる図3に不図示の上記expectテーブルのテーブル例である。
図4(a)は、上記ステートテーブル363(または319)の一例である。
FIG. 4 is a table example of the state table 319, 363 and the expect table (not shown in FIG. 3) used together with the state table 363.
FIG. 4A is an example of the state table 363 (or 319).

同図に示されるステートテーブル400には、コネクションを識別するための「上りtuple」欄401に現在認識されているコネクションの識別記号「T1」が登録され、当該「T1」のコネクションの属性情報が、「SRC IP」欄402、「SRC PORT」欄403、「DST IP」欄404、「DST PORT」欄405、「プロトコル種別」欄406、「L3status」欄407、「L4status」欄408、「helper」欄409、「expecting」欄410、「master」欄411、及び「timeout」欄412に設定されている。   In the state table 400 shown in the figure, the identification symbol “T1” of the currently recognized connection is registered in the “upstream tuple” column 401 for identifying the connection, and the attribute information of the connection of “T1” is stored. , “SRC IP” field 402, “SRC PORT” field 403, “DST IP” field 404, “DST PORT” field 405, “protocol type” field 406, “L3status” field 407, “L4status” field 408, “helper” ”Column 409,“ expecting ”column 410,“ master ”column 411, and“ timeout ”column 412.

図4(b)は、上記expectテーブルの一例である。
同図に示されるexpectテーブル450には、当該コネクションを期待した対象が「expecting」欄451に登録され、該期待したコネクションの情報が「SRC IP」欄452、「SRC PORT」欄453、「DST IP」欄454、「DST PORT」欄455、及び「プロトコル種別」欄456に設定される。
FIG. 4B is an example of the expect table.
In the expect table 450 shown in the figure, the target that expected the connection is registered in the “expecting” column 451, and information on the expected connection is stored in the “SRC IP” column 452, the “SRC PORT” column 453, and the “DST”. “IP” column 454, “DST PORT” column 455, and “protocol type” column 456 are set.

このexpectテーブル450に設定された期待コネクションは、ステートテーブル400に新たに設定される候補として利用される。
続いて、上記構成の下で行なわれる各処理の流れを図3を参照しながら以下に説明する。
The expected connection set in the expect table 450 is used as a candidate newly set in the state table 400.
Next, the flow of each process performed under the above configuration will be described below with reference to FIG.

図5は、図3の中継装置300のカーネル部301に示されるパケットの処理経路の処理フローである。以下の説明において図3と対応する個所には、図3の符号を用いて説明する。   FIG. 5 is a processing flow of the packet processing path shown in the kernel unit 301 of the relay apparatus 300 of FIG. In the following description, portions corresponding to those in FIG. 3 will be described using the reference numerals in FIG.

IF1からパケットを受信すると、先ず最初にフック処理部311が当該パケットに対し、フック情報テーブル317に登録してある処理を順じ実行する(S500)。本例ではフック情報テーブル#1(図3のフック情報テーブル317)」にコネクショントラッキング処理が登録されているので、フック処理部311は、不図示のフックハンドラ(図3のフックハンドラ318)によりコネクショントラッキング処理を実行する。   When a packet is received from IF1, first, the hook processing unit 311 sequentially executes the processes registered in the hook information table 317 for the packet (S500). In this example, since the connection tracking process is registered in the hook information table # 1 (hook information table 317 in FIG. 3), the hook processing unit 311 connects with a hook handler (not shown) (hook handler 318 in FIG. 3). Execute tracking processing.

このコネクショントラッキング処理では、例えば受信パケットの状態や、その受信パケットに対応するセッションの状態に応じて、パケットbyパケット処理や外部委託処理が行なわれる。そして、上記パケットbyパケット処理や外部委託処理が終了すると続く処理部に送られ、次の受信パケットに対して上記コネクショントラッキング処理を行なう。特に上記外部委託処理が実行された場合は、当該パケットを一時的に処理依頼キュー322に渡し、サーバ350にその処理を依頼できるので、その間、当該フック処理部311は次のパケットを受信して処理を実行できる。よって、続くパケットが外部委託処理を要するものであれば、当該パケットを上記処理依頼キュー322に更に保持させることができるので、続く受信パケットの中継処理を円滑に行なえる。なお、外部委託処理が反映されたパケットは、当該外部委託処理の結果が廃棄でなければ当該フック処理部311において、フック情報テーブル#1に登録された残りの処理が実行される。   In this connection tracking process, for example, a packet by packet process or an outsourcing process is performed according to the state of the received packet or the state of the session corresponding to the received packet. When the packet by packet processing and the outsourcing processing are completed, the packet is sent to the subsequent processing unit, and the connection tracking processing is performed on the next received packet. In particular, when the above-mentioned outsourcing process is executed, the packet can be temporarily transferred to the processing request queue 322 and the server 350 can be requested to process the packet. During this time, the hook processing unit 311 receives the next packet. Processing can be executed. Therefore, if the subsequent packet requires outsourcing processing, the packet can be further held in the processing request queue 322, so that the relay processing of the subsequent received packet can be performed smoothly. Note that if the result of the outsourcing processing is not discarded, the hook processing unit 311 executes the remaining processing registered in the hook information table # 1 for the packet reflecting the outsourcing processing.

続いて当該パケットに対する処理はルーティング処理部316−1に引き継がれ、該ルーティング処理部316−1はルーティングテーブルを検索し(S502)、当該パケットが自局宛てのパケットであるか否かを判定する(S504)。   Subsequently, the processing for the packet is taken over by the routing processing unit 316-1. The routing processing unit 316-1 searches the routing table (S502), and determines whether the packet is a packet addressed to the own station. (S504).

当該パケットが自局宛てであった場合、当該パケットに対する処理はフック処理部312に引き継がれ、該フック処理部312は当該パケットに対し、フック情報テーブル317に登録してある処理を順じ実行する(S506)。本例では、該フック処理部312は、フック情報テーブル#2に登録されているフィルタ処理を順じ実行する。そして最終的に、許諾されたパケットのみをアプリケーションで受信する(S508)。   If the packet is addressed to the own station, the processing for the packet is taken over by the hook processing unit 312, and the hook processing unit 312 sequentially executes the processing registered in the hook information table 317 for the packet. (S506). In this example, the hook processing unit 312 sequentially executes the filter processing registered in the hook information table # 2. Finally, only the permitted packet is received by the application (S508).

一方、ステップS504で当該パケットが自局宛てでないと判定された場合、当該パケットに対する処理はフック処理部313に引き継がれ、該フック処理部313は当該パケットに対し、フック情報テーブル317に登録してある処理を順じ実行する(S510)。本例では、該フック処理部313は、フック情報テーブル#5に登録されているフィルタ処理を順じ実行する。そして更に、当該パケットに対する処理はフック処理部315に引き継がれ、該フック処理部315は当該パケットに対し、フック情報テーブル317に登録してある処理を順じ実行する(S512)。本例では、該フック処理部315は、フック情報テーブル#4に登録されているフィルタ処理を順じ実行する。そして最終的に、許諾されたパケットのみをIF2へ送信する(S514)。   On the other hand, if it is determined in step S504 that the packet is not addressed to the local station, the processing for the packet is taken over by the hook processing unit 313, and the hook processing unit 313 registers the packet in the hook information table 317. A certain process is executed in order (S510). In this example, the hook processing unit 313 sequentially executes the filter processing registered in the hook information table # 5. Further, the processing for the packet is taken over by the hook processing unit 315, and the hook processing unit 315 sequentially executes the processing registered in the hook information table 317 for the packet (S512). In this example, the hook processing unit 315 sequentially executes the filter processing registered in the hook information table # 4. Finally, only the permitted packet is transmitted to IF2 (S514).

また、アプリケーションからパケットが送信されると、先ず最初にフック処理部314が、当該パケットに対し、フック情報テーブルに登録してある処理を順じ実行する。本例では、フック処理部314は、フック情報テーブル#3に登録されているコネクショントラッキング処理を順じ実行する(S516)。なお、当該コネクショントラッキング処理についてはフック処理部311と同等の処理を行なうものであるため、ここでの詳しい説明は省略する。   When a packet is transmitted from the application, first, the hook processing unit 314 first executes the processes registered in the hook information table in order for the packet. In this example, the hook processing unit 314 sequentially executes the connection tracking process registered in the hook information table # 3 (S516). Note that the connection tracking process is the same as that of the hook processing unit 311, and thus detailed description thereof is omitted here.

続いてルーティング処理部316−2においてルーティング処理が実行され(S518)、更に、当該パケットに対する処理はフック処理部315に引き継がれ、該フック処理部315は当該パケットに対し、フック情報テーブル317に登録してある処理を順じ実行する(S512)。本例では、該フック処理部315は、フック情報テーブル#4に登録されているフィルタ処理を順じ実行する。そして最終的に、許諾されたパケットのみをIF2へ送信する(S514)。   Subsequently, routing processing is executed in the routing processing unit 316-2 (S518). Further, processing for the packet is taken over by the hook processing unit 315, and the hook processing unit 315 registers the packet in the hook information table 317. The processes are sequentially executed (S512). In this example, the hook processing unit 315 sequentially executes the filter processing registered in the hook information table # 4. Finally, only the permitted packet is transmitted to IF2 (S514).

図6は、シグナリングシーケンスの一例である。
当該シグナリングシーケンスは、サーバ350で提供しているサービス処理を中継装置300側から利用可能なように設定する処理である。
FIG. 6 is an example of a signaling sequence.
The signaling sequence is a process of setting the service process provided by the server 350 so that it can be used from the relay apparatus 300 side.

先ず、サーバ350でサービス起動コマンド359の受付処理を行なう(SS600)。
続いて、上記受付処理に基づいてカーネル351のサービス呼出モジュール362を起動する(SS602)。
First, the server 350 accepts the service activation command 359 (SS600).
Subsequently, the service call module 362 of the kernel 351 is activated based on the reception process (SS602).

更に続いて、カーネル351のフックボトムハーフ361で提供するサービスモジュールを起動する(SS604)。この処理では、外部サービス処理用としてサービスモジュールをカーネル部351に組み込む。   Subsequently, the service module provided by the hook bottom half 361 of the kernel 351 is activated (SS604). In this processing, a service module is incorporated in the kernel unit 351 for external service processing.

そして、サービスとトンネル番号とを対応付けてから、払い出しを行ない(SS606)、当該サービスの開始を通知するサービス開始通知を中継装置300に送信する(SS608)。   Then, after associating the service with the tunnel number, payout is performed (SS606), and a service start notification for notifying the start of the service is transmitted to the relay apparatus 300 (SS608).

中継装置300では、サーバ350から上記サービス開始通知を受信すると当該外部サービス処理に対するサービス情報(例えば、外部サービス処理の識別子/当該外部サービス処理が適用されるパケットの種類(例えは送信元アドレスや送信先アドレスなど)/当該外部サービス処理を中継装置300から委託するサーバ350のIPアドレスやトンネル番号など)を振分表309に登録する(SF600)。   When receiving the service start notification from the server 350, the relay apparatus 300 receives service information for the external service process (for example, the identifier of the external service process / the type of packet to which the external service process is applied (for example, the source address or the transmission (IP address, tunnel number, etc. of the server 350 that entrusts the external service processing from the relay device 300) to the distribution table 309 (SF600).

更に、例えば外部委託処理の実行の有無を上記フックハンドラ318で切り替え設定できるようにしている場合には、該当のパケットを処理依頼キュー322に転送するように上記フックハンドラ318を設定する(SF602)。   Furthermore, for example, when the hook handler 318 can be set to switch whether or not to execute outsourcing processing, the hook handler 318 is set so as to transfer the corresponding packet to the processing request queue 322 (SF602). .

そして、中継装置350は、上記サービス開始通知の受け付けをした旨をサービス開始応答としてサーバ350に返信する(SF604)。
サーバ350では、中継装置300から上記サービス開始応答を受信すると、当該外部サービス処理の登録結果をコマンドラインに表示する(SS610)。
Then, the relay device 350 returns a service start response to the server 350 indicating that the service start notification has been accepted (SF604).
Upon receiving the service start response from the relay device 300, the server 350 displays the registration result of the external service process on the command line (SS610).

図7は、上記シグナリングシーケンスにおいてサーバ350と中継装置300間で取り交わされるメッセージの例である。
図7(a)はメッセージフォーマットであり、図7(b)は上記サービス開始通知のメッセージ内容の例であり、図7(c)は上記サービス開始応答のメッセージ内容の例である。
FIG. 7 is an example of messages exchanged between the server 350 and the relay device 300 in the signaling sequence.
FIG. 7A shows a message format, FIG. 7B shows an example of the message content of the service start notification, and FIG. 7C shows an example of the message content of the service start response.

図7(a)のメッセージフォーマット700は、「共通ヘッダ」701に、各メッセージの送信元機器のIPアドレスを格納する「送信元IPアドレス」の欄702と、各メッセージの送信先機器のIPアドレスを格納する「送信先IPアドレス」の欄703と、各メッセージの種別を格納する「種別」の欄704と、メッセージ長を格納する「メッセージ長」の欄705が構成されている。また、「メッセージ固有部」の欄706に、サービスの開始や停止を示す情報を格納する「詳細コード」707と、サーバ350から中継装置300に提供する外部サービスの識別情報を格納する「サービスID」の欄708と、サーバ350から提供される外部サービスに対する中継装置300の受け入れ結果を示す情報を格納する「処理結果」709の欄が構成されている。   The message format 700 of FIG. 7A includes a “source IP address” column 702 for storing the IP address of the transmission source device of each message in the “common header” 701 and the IP address of the transmission destination device of each message. A “destination IP address” column 703 for storing the message, a “type” column 704 for storing the type of each message, and a “message length” column 705 for storing the message length. In the “message specific part” field 706, a “detail code” 707 for storing information indicating start and stop of the service and an identification information of the external service provided from the server 350 to the relay apparatus 300 are stored. ”Column 708, and a“ processing result ”709 column for storing information indicating an acceptance result of the relay apparatus 300 for the external service provided from the server 350.

図7(b)に示されるように、サービス開始通知のメッセージ710には、上記メッセージフォーマット700に従って以下の内容を格納する。
上記「送信元IPアドレス」の欄702に、当該サービス開始通知メッセージ710の送信元機器である「サーバ350のIPアドレス」を格納し、上記「送信先IPアドレス」の欄703に、当該サービス開始通知メッセージ710の送信先機器である「中継装置300のIPアドレス」を格納し、上記「種別」の欄704に、サービス開始通知を知らせる情報を格納し、上記「メッセージ長」の欄705にメッセージ長を格納する。また更に、上記「詳細コード」707の欄に、サービスの開始や停止を示す情報を格納し、上記「サービスID」の欄708に、サーバ350から中継装置300に提供する外部サービスの識別情報(外部サービスの識別子や当該外部サービスを適用するパケットの種類)を格納する。なお、上記「処理結果」709の欄はサービス開始通知においては未使用である。
As shown in FIG. 7B, the service start notification message 710 stores the following contents according to the message format 700.
The “source IP address” column 702 stores “the IP address of the server 350”, which is the transmission source device of the service start notification message 710, and the “destination IP address” column 703 stores the service start. The “IP address of the relay device 300”, which is the destination device of the notification message 710, is stored, the information indicating the service start notification is stored in the “type” column 704, and the message is stored in the “message length” column 705. Stores the length. Furthermore, information indicating the start or stop of the service is stored in the “detail code” 707 column, and the identification information (external service identification information (from the server 350 to the relay device 300) provided in the “service ID” column 708 ( The external service identifier and the packet type to which the external service is applied) are stored. Note that the column “processing result” 709 is not used in the service start notification.

図7(c)に示されるように、サービス開始応答のメッセージ720には、上記メッセージフォーマット700に従って以下の内容を格納する。
上記「送信元IPアドレス」の欄702に、当該サービス応答通知メッセージ720を送信する送信元機器である「中継装置300のIPアドレス」を格納し、上記「送信先IPアドレス」の欄703に、当該サービス開始通知メッセージ710の送信先機器である「サーバ350のIPアドレス」を格納し、上記「種別」の欄704に、サービス開始の応答を示す情報を格納し、上記「メッセージ長」の欄705にメッセージ長を格納する。また更に、上記「詳細コード」707の欄に、サービスの開始や停止を示す情報を格納し、上記「サービスID」の欄708に、中継装置300で利用するサーバ350の外部サービスの識別情報を格納し、上記「処理結果」709の欄に正常に処理されたかどうかを示す情報を格納する。
As shown in FIG. 7C, the service start response message 720 stores the following contents according to the message format 700 described above.
The “source IP address” column 702 stores “IP address of the relay device 300”, which is the source device that transmits the service response notification message 720, and the “destination IP address” column 703 stores The “server 350 IP address” that is the destination device of the service start notification message 710 is stored, information indicating a service start response is stored in the “type” column 704, and the “message length” column is stored. In 705, the message length is stored. Furthermore, information indicating the start or stop of the service is stored in the “detail code” 707 column, and the identification information of the external service of the server 350 used in the relay device 300 is stored in the “service ID” column 708. The information indicating whether or not the processing has been normally performed is stored in the “processing result” field 709.

図8は、中継装置300のフック処理部311(またはフック処理部314)におけるコネクショントラッキング処理の実行時に外部委託処理を行なった場合の、中継装置300とサーバ350におけるパケット処理シーケンスである。   FIG. 8 is a packet processing sequence in the relay apparatus 300 and the server 350 when the outsourcing process is performed when the connection tracking process is executed in the hook processing unit 311 (or the hook processing unit 314) of the relay apparatus 300.

先ず、中継装置300のフック処理部311(またはフック処理部314)でパケットを受信する(S800)。
続いて、上記フック処理部311(またはフック処理部314)でのコネクショントラッキング処理の実行により、当該パケットが外部委託処理を行なうべきパケットであるか否かチェックし(S802)、更に、サービス対象IFから受信したパケットであるか否かチェックする(S804)。
First, the hook processing unit 311 (or hook processing unit 314) of the relay device 300 receives a packet (S800).
Subsequently, by executing the connection tracking process in the hook processing unit 311 (or hook processing unit 314), it is checked whether or not the packet is a packet to be subjected to the outsourcing process (S802), and further, the service target IF It is checked whether or not the packet is received from (S804).

何れもYESである場合、当該パケットを処理依頼キュー322に渡し、処理依頼キュー322からプロキシスレッド305に当該パケットが引き渡される。プロキシスレッド305では当該パケットにおいて外部サービス処理に必要な情報(部分パケット情報)を抽出し、当該部分パケット情報及び、受信表308及び振分表309に登録された情報を基に、処理依頼メッセージを作成する(S806)。この際、送信先となるサーバ350のIPアドレスが共に同じである場合は、複数の処理依頼をまとめて一つの処理依頼メッセージに格納することもできる。   If both are YES, the packet is transferred to the processing request queue 322, and the packet is transferred from the processing request queue 322 to the proxy thread 305. The proxy thread 305 extracts information (partial packet information) necessary for external service processing in the packet, and sends a processing request message based on the partial packet information and information registered in the reception table 308 and the distribution table 309. Create (S806). At this time, if the IP address of the server 350 as the transmission destination is the same, a plurality of processing requests can be collectively stored in one processing request message.

そして、上記処理依頼メッセージをサーバ350へ送信する(S808)。
サーバ350では、中継装置300から送信された上記処理依頼メッセージをプロキシスレッド355で受け取ると、当該処理依頼メッセージによって指定されている処理に該当するサービスモジュールをサービス呼出モジュール362を介してフックボトムハーフ361から呼び出し、例えばCPUの空き時間などを利用して処理を実行させる(S810)。このフックボトムハーフ361における処理は、他の処理を優先的に実行させて、それらの処理の空き時間などにフックボトムハーフに登録されるサービスモジュールを実行させる。
Then, the processing request message is transmitted to the server 350 (S808).
When the server 350 receives the processing request message transmitted from the relay apparatus 300 by the proxy thread 355, the service bottom module 361 receives the service module corresponding to the processing specified by the processing request message via the service call module 362. And the process is executed using, for example, CPU idle time (S810). In the processing in the hook bottom half 361, other processing is preferentially executed, and a service module registered in the hook bottom half is executed in the idle time of the processing.

続いて、フックボトムハーフ361における当該サービスモジュールの処理結果を上記サービス呼出モジュール362を介してプロキシスレッド355に渡し、その処理結果がステートテーブルを更新するものであればステートテーブル363を更新する(S812)。   Subsequently, the processing result of the service module in the hook bottom half 361 is passed to the proxy thread 355 via the service call module 362, and if the processing result is to update the state table, the state table 363 is updated (S812). ).

そして、プロキシスレッド355では、当該処理結果及び、送信表358及び受信表359に登録された情報を基に、処理応答メッセージを作成し、該処理応答メッセージの処理依頼を行なった中継装置300へ送信する(S814)。この送信により、中継装置300の処理依頼キュー322では、当該処理結果に応じて当該パケットが破棄されたり、当該処理結果が当該パケットに反映されて、元のフック処理部311(またはフック処理部314)に当該反映後のパケットが返されたりする。   Then, the proxy thread 355 creates a processing response message based on the processing result and information registered in the transmission table 358 and the reception table 359, and transmits the processing response message to the relay apparatus 300 that has requested the processing of the processing response message. (S814). By this transmission, in the processing request queue 322 of the relay device 300, the packet is discarded according to the processing result, or the processing result is reflected in the packet, and the original hook processing unit 311 (or the hook processing unit 314). ) Or the packet after the reflection is returned.

更に、ステートテーブル363の更新が行なわれた場合は、当該更新情報を含むテーブル同期メッセージがサーバ350で作成され(S816)、該テーブル同期メッセージが中継装置300へ送信される(818)。   Further, when the state table 363 is updated, a table synchronization message including the update information is created by the server 350 (S816), and the table synchronization message is transmitted to the relay device 300 (818).

中継装置300は、上記テーブル同期メッセージをサーバ350から受け取ると、中継装置300のステートテーブル319に当該更新情報を反映し(S820)、テーブル同期応答メッセージをサーバ350に返す(S822)。こうして、互いのステートテーブルの同期をとることができる。   When receiving the table synchronization message from the server 350, the relay device 300 reflects the update information in the state table 319 of the relay device 300 (S820), and returns a table synchronization response message to the server 350 (S822). Thus, the state tables can be synchronized with each other.

そして、中継装置300は、パケット中継処理を行なう(S824)。
図9及び図10に、上記各種のメッセージの例を示す。
図9(a)は、上記処理依頼メッセージの例である。
Then, the relay device 300 performs packet relay processing (S824).
9 and 10 show examples of the various messages.
FIG. 9A shows an example of the processing request message.

図6のメッセージフォーマットと比較すると、本処理依頼メッセージ900は、「種別」901の欄に処理依頼メッセージを示す情報が格納され、「シーケンス番号」の欄902に本処理依頼のシーケンス番号が格納され、「MARK値」の欄903にサービス呼出元識別子が格納される。そして、一つの処理依頼メッセージに対し処理依頼を複数まとめて格納させることができる。   Compared with the message format of FIG. 6, in the processing request message 900, information indicating the processing request message is stored in the “type” 901 column, and the sequence number of the processing request is stored in the “sequence number” column 902. The service caller identifier is stored in the “MARK value” column 903. A plurality of processing requests can be stored together for one processing request message.

図9(b)は、上記処理応答メッセージの例である。
図6のメッセージフォーマットと比較すると、本処理応答メッセージ950は、「種別」951の欄に処理応答メッセージを示す情報が格納され、「シーケンス番号」の欄952に本処理依頼のシーケンス番号が格納され、「MARK値」の欄953にサービス呼出元識別子が格納される。そして、これまた一つの処理応答メッセージに対し処理応答を複数まとめて格納させることができる。
FIG. 9B is an example of the processing response message.
Compared with the message format of FIG. 6, the processing response message 950 stores information indicating the processing response message in the “type” 951 column and stores the sequence number of the processing request in the “sequence number” column 952. The service caller identifier is stored in the “MARK value” field 953. A plurality of processing responses can be stored together for one processing response message.

図10(a)は、上記テーブル同期メッセージの例である。
本テーブル同期メッセージ1000は、「種別」の欄1001にテーブル同期メッセージを示す情報が格納され、「サービスID」の欄1002に、同期するテーブルを認識するために使用する対象サービスの識別子が格納され、「メッセージタイプ」の欄1003に更新や削除等のメッセージタイプが格納される。そして、実際の更新情報が「オプション属性」の欄1004に格納される。
FIG. 10A shows an example of the table synchronization message.
In the table synchronization message 1000, information indicating the table synchronization message is stored in the “type” column 1001, and the identifier of the target service used to recognize the table to be synchronized is stored in the “service ID” column 1002. In the “message type” column 1003, message types such as update and deletion are stored. The actual update information is stored in the “option attribute” column 1004.

図10(b)は、上記テーブル同期応答メッセージの例である。
本テーブル同期メッセージ1050は、「種別」の欄1051にテーブル同期応答メッセージを示す情報が格納され、「サービスID」の欄1052に、同期するテーブルを認識するために使用する対象サービスの識別子が格納され、「処理結果」の欄1053に更新の結果(正常や異常など)が格納される。
FIG. 10B is an example of the table synchronization response message.
In this table synchronization message 1050, information indicating a table synchronization response message is stored in the “type” column 1051, and the identifier of the target service used for recognizing the table to be synchronized is stored in the “service ID” column 1052. Then, the update result (normality, abnormality, etc.) is stored in the “processing result” column 1053.

図11は、中継装置350のフックハンドラ318によって実行されるコネクショントラッキング処理の一例である。
フック処理部311(またはフック処理部314)でパケットを受信し、フック情報テーブル317に指定されたコネクショントラッキング処理が呼び出されると、フックハンドラ318により以下の処理が実行される。
FIG. 11 is an example of a connection tracking process executed by the hook handler 318 of the relay device 350.
When the hook processing unit 311 (or the hook processing unit 314) receives a packet and the connection tracking process specified in the hook information table 317 is called, the hook handler 318 executes the following processing.

先ず、当該パケットがフラグメントパケットであるか否かパケットヘッダから判定される(S1100)。
当該パケットがフラグメントパケットであると判定された場合、仮想サービス処理部が呼び出され、該仮想サービス処理部に当該パケットに対する処理が引き継がれる(S1102)。上記仮想サービス処理部に対する当該パケット処理の引き継ぎは、当該パケットが処理依頼キュー322に渡される事によって行なわれる。
First, it is determined from the packet header whether or not the packet is a fragment packet (S1100).
When it is determined that the packet is a fragment packet, the virtual service processing unit is called, and the processing for the packet is taken over by the virtual service processing unit (S1102). The packet processing is taken over by the virtual service processing unit by passing the packet to the processing request queue 322.

ステップS1100において、当該パケットがフラグメントパケットでないと判定された場合、続いて当該パケットの状態を見るために、先ず、パケットヘッダの「送信元IPアドレス(SRC IP)」、「送信元ポート番号(SRC PORT)」、「送信先IPアドレス(DST IP)」、及び「送信先ポート番号(DST PORT)」をキーにステートテーブル319が検索される(S1104)。  If it is determined in step S1100 that the packet is not a fragment packet, first, in order to see the state of the packet, first, “source IP address (SRC IP)” and “source port number (SRC) in the packet header are checked. STATE) ”,“ Destination IP address (DST IP) ”, and“ Destination port number (DST PORT) ”are searched for the state table 319 (S1104).

そして、当該パケットが中継装置300内で処理できるパケットであるか否かが、当該パケット及び上記ステートテーブル319の検索によりヒットした属性情報を基に判定される(S1106)。   Then, whether or not the packet is a packet that can be processed in the relay apparatus 300 is determined based on the attribute information hit by the search of the packet and the state table 319 (S1106).

本例では、L3コネクションの状態が「IPS_ASSURED」であり、L4コネクションの状態が「eES」であり、且つTCP(Transmission Control Protocol)フラグがSYN/FIN/RSTの何れかでない場合を、中継装置内で処理可能なパケットとする判定基準にしている。よって、これからコネクションを確立しようとするパケット(TCPフラグがSYNであるパケット)やコネクションを切るパケット(TCPフラグがFINであるパケット)などは上記判定基準を満たさないので、このような場合は、仮想サービス処理部が呼び出され、該仮想サービス処理部に当該パケットに対する処理が引き継がれる(S1108)。   In this example, when the state of the L3 connection is “IPS_ASSURED”, the state of the L4 connection is “eES”, and the TCP (Transmission Control Protocol) flag is not one of SYN / FIN / RST, Is used as a criterion for making the packet processable. Therefore, a packet (TCP packet whose SYN flag is SYN) or a packet which disconnects a connection (packet whose TCP flag is FIN) or the like to establish a connection from now on does not satisfy the above determination criteria. The service processing unit is called, and the processing for the packet is taken over by the virtual service processing unit (S1108).

一方、上記判定基準を満たすパケットであった場合は、ステートテーブル319のセッションをタイマリフレッシュ(タイムアウト値の更新)する(S1110)。
そして当該コネクショントラッキング処理の呼出元へ処理が戻され(S1112)、フック情報テーブルに続く処理があれば当該パケットに対してその処理が実行される。
On the other hand, if the packet satisfies the determination criterion, the session of the state table 319 is refreshed by timer (time-out value is updated) (S1110).
Then, the process is returned to the caller of the connection tracking process (S1112), and if there is a process following the hook information table, the process is executed on the packet.

なお、上記仮想サービス処理部に対して処理が引き継がれた場合は、次のパケットがステップS1100から実行される。
図12は、上記コネクショントラッキング処理において処理を引き継いだサーバ350の、上記コネクショントラキング処理の引継ぎ処理例である。
When the process is taken over by the virtual service processing unit, the next packet is executed from step S1100.
FIG. 12 is an example of the takeover process of the connection tracking process of the server 350 that has taken over the process in the connection tracking process.

中継装置300から処理依頼メッセージを受信すると、先ず、デフラグメント処理の依頼であるか否かを判定する(S1200)。
デフラグメント処理であると判定した場合は、上記処理依頼メッセージに格納されている必要情報(フラグメントパケットの全体とすることも可能であるが、本例ではパケット全体またはフラグメントパケットから取り出した必要情報が処理依頼メッセージに格納されているものとする)に対してデフラグメント処理を実行する(S1202)。
When the processing request message is received from the relay device 300, first, it is determined whether or not it is a request for defragment processing (S1200).
If it is determined that the process is a defragmentation process, the necessary information stored in the processing request message (the whole fragment packet can be used, but in this example, the necessary information extracted from the entire packet or the fragment packet is Defragmentation processing is executed on the processing request message (assumed to be stored in the processing request message) (S1202).

そして、当該必要情報に対するデフラグメント処理を終えると、当該必要情報に関する全ての情報のデフラグメント処理が完了したか否か判定し(S1204)、完了していないと判定した場合は、当該必要情報をサーバ350で保持し、当該必要情報をサーバ350で保持している旨を中継装置300に対して送信する(S1206)。この処理により、サーバ350に保持されている上記必要情報に関連するフラグメントパケットが中継装置300で受信されると、中継装置350から当該サーバ350に対してその受信パケットの必要情報が送信され、当該サーバ350ではこれらの必要情報に対してデフラグメント処理を繰り返し実行する。そして、例えば予め決めた所定時間内に当該デフラグメント処理対象の全ての必要情報が当該サーバ350で受信されることにより、デフラグメント処理が完了する。   When the defragment processing for the necessary information is completed, it is determined whether or not the defragment processing for all the information related to the necessary information has been completed (S1204). The server 350 holds that the necessary information is held by the server 350 and transmits it to the relay device 300 (S1206). With this process, when a fragment packet related to the necessary information held in the server 350 is received by the relay device 300, the necessary information of the received packet is transmitted from the relay device 350 to the server 350, The server 350 repeatedly executes the defragmentation process for these necessary information. Then, for example, the server 350 receives all necessary information to be defragmented within a predetermined time, and the defragmentation process is completed.

そして、ステップS1200においてデフラグメント処理ではないと判定した場合、またはステップS1204においてデフラグメントが完了したと判定した場合、当該必要情報の属するコネクションを、ステートテーブル363から検索する(S1208)。この検索は、当該必要情報に付加された「送信元IPアドレス(SRC IP)」、「送信元ポート番号(SRC PORT)」、「送信先IPアドレス(DST IP)」、及び「送信先ポート番号(DST PORT)」をキーに検索できる。   If it is determined in step S1200 that the defragment processing is not performed, or if it is determined in step S1204 that the defragmentation is completed, the state table 363 is searched for a connection to which the necessary information belongs (S1208). This search is performed by adding “source IP address (SRC IP)”, “source port number (SRC PORT)”, “destination IP address (DST IP)”, and “destination port number” added to the necessary information. (DST PORT) "as a key.

ここでステートテーブル363に当該コネクションが登録されているか否かを判定し(S1210)、ない場合は、当該必要情報に含まれているコネクションの属性情報をステートテーブル363に新規登録する(S1212)。   Here, it is determined whether or not the connection is registered in the state table 363 (S1210). If not, the attribute information of the connection included in the necessary information is newly registered in the state table 363 (S1212).

ステップS1210において登録があると判定された場合、或いはステップS1212においてステートテーブル363に新規登録されると、図4(a)のステートテーブル400の「L3status」欄407の設定情報を参考に、当該必要情報のパケットのセッションにおけるイベント特性を決定する(S1214)。例えば、「当該パケットがオリジナル方向であるか」、「当該パケットがリプライ方向であるか」、「パケットが両方向に流れたか」、「期待しているコネクションであるか」、または「速くエクスパイアしてしまわないようにセットしたか」などの設定情報に応じてイベント特性を決め、当該イベント特性をテーブルに設定する。   If it is determined in step S1210 that there is a registration, or if it is newly registered in the state table 363 in step S1212, the necessary information is obtained with reference to the setting information in the “L3status” column 407 of the state table 400 in FIG. Event characteristics in the information packet session are determined (S1214). For example, “Is the packet in the original direction”, “Is the packet in the reply direction”, “Is the packet flowed in both directions”, “Is it an expected connection”, or “ Event characteristics are determined according to the setting information such as “Is it set so as not to stutter”, and the event characteristics are set in the table.

そして、ICMP(Internet Control Message Protocol)の場合、上記イベント特性が「パケットがリプライ方向の場合に設定される(IP_CT_DIR_REPLY)」であれば当該パケットのコネクションの登録情報をステートテーブル363から削除し、それ以外のイベント特性の場合はステートテーブル363の当該コネクションのタイマを更新する(S1216)。   In the case of ICMP (Internet Control Message Protocol), if the event characteristic is “set when the packet is in the reply direction (IP_CT_DIR_REPLY)”, the connection registration information of the packet is deleted from the state table 363, and In the case of event characteristics other than, the timer of the connection in the state table 363 is updated (S1216).

また、UDP(User Datagram Protocol)の場合、上記「L3status」欄407の設定情報が「パケットが両方向に流れた状態(IPS_SEEN_REPLY)」であれば「IPS_ASSURED」を上記「L3status」欄407に設定し、更に当該コネクションのタイマをリフレッシュする。それ以外の場合はステートテーブル363の当該コネクションのタイマをリフレッシュする(S1218)。   Further, in the case of UDP (User Datagram Protocol), if the setting information in the “L3status” column 407 is “the packet has flowed in both directions (IPS_SEEN_REPLY)”, “IPS_ASSURED” is set in the “L3status” column 407, Further, the timer of the connection is refreshed. In other cases, the timer of the connection in the state table 363 is refreshed (S1218).

また、TCPの場合、TCPプロトコルの状態遷移表を基に「L4status」の状態を更新する。
図13は、「L4status」の状態変化を示す図である。
In the case of TCP, the state of “L4status” is updated based on the TCP protocol state transition table.
FIG. 13 is a diagram illustrating a state change of “L4status”.

図13(a)は、上記イベント特性がオリジナル方向の場合であり、図13(b)は、上記イベント特性がリプライ方向の場合である。
なお、図13(c)は、TCPプロトコルの状態と上図に用いられている略号の対応表である。
FIG. 13A shows a case where the event characteristic is in the original direction, and FIG. 13B shows a case where the event characteristic is in the reply direction.
FIG. 13C is a correspondence table between the state of the TCP protocol and the abbreviations used in the above figure.

図13(a)、図13(b)は、横軸に「L4status」の状態変化を示し、縦軸に受信パケットのTCPヘッダのフラグの種類を示している。但し、noneは何れのフラグもセットされていない場合である。   In FIG. 13A and FIG. 13B, the horizontal axis indicates the state change of “L4status”, and the vertical axis indicates the type of the TCP header flag of the received packet. However, none is when no flag is set.

例えば本受信パケットイベント特性がオリジナルであり且つフラグがsynである場合の「L4status」の以前の状態が「ssS」であったならば、「sES」に更新される。
また、正しい手順の場合はIPS_ASSUREDを設定し、それ以外はタイマをリフレッシュする(S1220)。
For example, when the received packet event characteristic is original and the flag is “syn”, if the previous state of “L4status” is “ssS”, it is updated to “sES”.
If the procedure is correct, IPS_ASSURED is set, otherwise the timer is refreshed (S1220).

続いて、ステートテーブル400の「helper」欄409に上位アプリケーションを更新する処理方法が定義してあるか否か判定する(S1222)。
Yesの場合、上位アプリケーションの状態を更新する(S1224)。図4(a)のステートテーブル400の例では、「helper」欄409に「ftp conntrack」が設定されている。この処理は、FTPパケットのデータ部分を参照してFTPのデータセッションを検出し、このデータセッションの情報をexpectテーブル450に登録する。
Subsequently, it is determined whether or not a processing method for updating the upper application is defined in the “helper” column 409 of the state table 400 (S1222).
In the case of Yes, the state of the upper application is updated (S1224). In the example of the state table 400 in FIG. 4A, “ftp” is displayed in the “helper” column 409. conntrack "is set. In this process, an FTP data session is detected with reference to the data portion of the FTP packet, and information on this data session is registered in the expect table 450.

ステップS1222の判定結果がNoの場合、またはステップS1224の処理を終えると、パケットが「reply」の場合はステートテーブル400の「L3status」の欄407に「パケットが両方向に流れた状態(IPS_SEEN_REPLY)」を示すフラグを追加する(S1226)。   When the determination result of step S1222 is No or when the processing of step S1224 is completed, if the packet is “reply”, “the packet has flowed in both directions (IPS_SEEN_REPLY)” in the “L3status” column 407 of the state table 400. Is added (S1226).

そして、ステートテーブル400を修正したか否か判定し(S1228)、修正していると判定された場合、当該修正個所の情報を含むテーブル同期メッセージを中継装置へ送信する(S1230)。また修正されていないと判定された場合、処理応答を中継装置へ送信する(S1232)。   Then, it is determined whether or not the state table 400 has been corrected (S1228). If it is determined that the state table 400 has been corrected, a table synchronization message including information on the correction location is transmitted to the relay device (S1230). If it is determined that the correction has not been made, a processing response is transmitted to the relay device (S1232).

以上説明してきた各処理はプログラムの形態で配布することもできる。
その場合、フロッピー(登録商標)ディスク、CD−ROM、DVDなどの記録媒体に上記プログラムやファイルを記録させて配布したり、或いは、公衆網等で用いられる伝送媒体を介して、そのプログラムやファイルの一部、若しくは全部を配信するようにしたりすることができる。この場合、それを受け取ったユーザは、CD−ROM装置などの読み取り装置(入出力部の一部)を利用してフロッピー(登録商標)ディスクやCD−ROMやDVDなどの可搬型記録媒体から上記プログラムやファイルを外部記録部にコピーしたり、コンピュータの通信部を介してインターネットから上記プログラムやファイルを外部記録部にコピーしたりすることができる。そして、CPUで実行することにより、ユーザのコンピュータ上でも上述した機能を実現できる。
Each process described above can be distributed in the form of a program.
In that case, the program or file may be distributed by recording the program or file on a recording medium such as a floppy (registered trademark) disk, CD-ROM, or DVD, or via a transmission medium used in a public network or the like. It is possible to distribute a part or all of the information. In this case, the user who has received the information from the portable recording medium such as a floppy (registered trademark) disk, CD-ROM, or DVD uses a reading device (a part of the input / output unit) such as a CD-ROM device. The program or file can be copied to an external recording unit, or the program or file can be copied from the Internet to the external recording unit via a computer communication unit. Then, the above-described functions can be realized on the user's computer by being executed by the CPU.

以上より、本発明の実施形態においては、サービス処理を行なうサーバの追加・変更等を行なう場合であってもその変更を容易に行なうことが可能になる。また、中継処理を高速に行なわせることが可能になる。   As described above, in the embodiment of the present invention, even when adding or changing a server that performs service processing, the change can be easily performed. In addition, the relay process can be performed at high speed.

(付記1) 受信パケットを対象にサービス処理を行なって上記受信パケットを中継処理する、中継部とサーバからなる階層型パケット処理システムであって、上記中継部は、上記受信パケットを対象にサービス処理を行なう所定のサービス処理部を呼び出す呼出部と、上記呼出部の呼び出しにより、上記受信パケットにサービス処理を行なう第一のサービス処理部と、上記呼出部の呼び出しにより、上記受信パケットに仮想的にサービス処理を行なう第二のサービス処理部と、を有し、上記サーバは、上記第二のサービス処理部が上記呼出部から呼び出されると、上記第二のサービス処理部の代わりに上記受信パケットに対して任意のサービス処理を行なう外部サービス処理部を、有する、ことを特徴とする階層型パケット処理システム。   (Supplementary Note 1) A hierarchical packet processing system including a relay unit and a server that performs a service process on a received packet and relays the received packet. The relay unit performs a service process on the received packet. A calling unit that calls a predetermined service processing unit, a first service processing unit that performs service processing on the received packet by calling the calling unit, and a virtual call on the received packet by calling the calling unit. A second service processing unit that performs service processing, and when the second service processing unit is called from the calling unit, the server converts the received packet into the received packet instead of the second service processing unit. A hierarchical packet processing system, comprising: an external service processing unit that performs arbitrary service processing.

(付記2) 上記呼出部の呼び出しにより上記第二のサービス処理部が呼び出されると、上記受信パケットは処理依頼キューに一時的にキューイングされ、続く受信パケットに対するサービス処理が上記呼出部によって続いて呼び出されたサービス処理部によって行なわれる、ことを特徴とする付記1に記載の階層型パケット処理システム。   (Supplementary note 2) When the second service processing unit is called by calling the calling unit, the received packet is temporarily queued in the processing request queue, and service processing for the subsequent received packet is continued by the calling unit. The hierarchical packet processing system according to appendix 1, wherein the hierarchical packet processing system is performed by a called service processing unit.

(付記3) 上記外部サービス処理部は、中継部における受信パケットの中継処理で使用されてるCPUが空いた時間を利用して上記サービス処理を行なう、ことを特徴とする付記1または2に記載の階層型パケット処理システム。   (Additional remark 3) The said external service processing part performs the said service process using the time which CPU used by the relay process of the received packet in a relay part vacant, The additional description 1 or 2 characterized by the above-mentioned Hierarchical packet processing system.

(付記4) 受信パケットに対するコネクション状態を管理するコネクション状態管理部を更に有し、上記外部サービス処理部は、上記受信パケットの上位レイヤの状態を検出し、該上位レイヤの状態の検出結果を基に、上記コネクション状態管理部に管理される上記受信パケットの上記コネクション状態を更新し、上記中継部で受信された同一のコネクション受信パケットは、上記外部サービス処理部によって更新された上記コネクション状態管理部の上記コネクション状態に基づいてフィルタ処理される、ことを特徴とする付記1乃至3の何れか一つに記載の階層型パケット処理システム。   (Additional remark 4) It further has a connection state management part which manages the connection state with respect to a received packet, The said external service process part detects the state of the upper layer of the said received packet, and based on the detection result of the state of this upper layer The connection state management unit updates the connection state of the received packet managed by the connection state management unit, and the same connection reception packet received by the relay unit is updated by the external service processing unit. The hierarchical packet processing system according to any one of appendices 1 to 3, wherein the filtering process is performed based on the connection state.

(付記5) 上記第一のサービス処理部で行なうサービス処理をパケットbyパケット処理に限定してハードウエアで構成し、上記外部サービス処理部で行なうサービス処理をソフトウエアで構成する、ことを特徴とする付記1乃至4の何れか一つに記載の階層型パケット処理システム。   (Supplementary Note 5) The service processing performed by the first service processing unit is limited to packet by packet processing and configured by hardware, and the service processing performed by the external service processing unit is configured by software. The hierarchical packet processing system according to any one of supplementary notes 1 to 4.

(付記6) 上記仮想サービス処理部は、上記受信パケットに対するサービス処理を上記サーバへ振り分けるため、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報とをパケットの種類に応じて管理するサービスリスト管理部を有し、上記サーバは、上記サービスリスト管理部に対し、自己サーバの情報及び該自己サーバが提供するサービス処理の識別子とを転送する転送部を有する、ことを特徴とする付記1乃至5の何れか一つに記載の階層型パケット処理システム。   (Supplementary Note 6) The virtual service processing unit distributes service processing for the received packet to the server, so that information on the server that performs the service processing and identification information of the service processing provided by the server are determined according to the type of packet. A service list management unit for managing, wherein the server includes a transfer unit that transfers information of the self server and an identifier of a service process provided by the self server to the service list management unit. The hierarchical packet processing system according to any one of supplementary notes 1 to 5.

(付記7) 上記中継部及び上記サーバはそれぞれ、受信パケットに対するコネクション状態を管理するコネクション状態管理部と、上記相互のコネクション状態管理部によって管理される上記コネクション状態を同期する同期部と、を有し、上記サーバは、上記外部サービス処理部に上記受信パケットの上位レイヤの状態を検出させ、該上位レイヤの状態の検出結果を基に、上記コネクション状態管理部に管理される上記受信パケットの上記コネクション状態を更新し、上記中継部で受信された同一のコネクション受信パケットは、上記サーバのコネクション状態管理部の更新後の上記コネクション状態を基に上記同期部によって同期されてなる、上記中継部のコネクション状態管理部の更新後の上記コネクション状態に基づいてフィルタ処理される、ことを特徴とする付記1乃至6の何れか一つに記載の階層型パケット処理システム。   (Supplementary Note 7) Each of the relay unit and the server has a connection state management unit that manages a connection state for a received packet, and a synchronization unit that synchronizes the connection state managed by the mutual connection state management unit. Then, the server causes the external service processing unit to detect the state of the upper layer of the received packet, and based on the detection result of the state of the upper layer, the server of the received packet managed by the connection state management unit The same connection reception packet that is updated in the connection state and received by the relay unit is synchronized by the synchronization unit based on the connection state after the update of the connection state management unit of the server. Filter based on the above connection status after updating the connection status manager Management is the hierarchical packet processing system according to any one of Appendices 1 to 6, characterized in that.

(付記8) 上記中継部は外部サービス処理部で必要な情報のみを受信パケットから取り出して上記サーバへ送信する、ことを特徴とする付記1乃至7の何れか一つに記載の階層型パケット処理システム。   (Supplementary note 8) The hierarchical packet processing according to any one of supplementary notes 1 to 7, wherein the relay unit extracts only necessary information from an external service processing unit from a received packet and transmits it to the server. system.

(付記9) 上記中継部は上記サーバへ受信パケットを送信する際に、送信先が同一のサーバである受信パケットを複数まとめて一度に送信する、ことを特徴とする付記1乃至8の何れか一つに記載の階層型パケット処理システム。   (Supplementary note 9) Any one of Supplementary notes 1 to 8, wherein when the relay unit transmits a reception packet to the server, the relay unit transmits a plurality of reception packets having the same destination to the server at a time. The hierarchical packet processing system according to one.

(付記10) 受信パケットを対象にサービス処理を行なって上記受信パケットを中継処理する中継装置であって、上記受信パケットを対象にサービス処理を行なう所定のサービス処理部を呼び出す呼出部と、上記呼出部の呼び出しにより、上記受信パケットにサービス処理を行なう第一のサービス処理部と、上記呼出部の呼び出しにより、上記受信パケットに仮想的にサービス処理を行なう第二のサービス処理部と、上記受信パケットの上位レイヤの状態の検出に基づく情報を管理するコネクション状態管理部と、上記第二のサービス処理部が上記呼出部から呼び出されると、受信パケットの内の所定の情報を所定のサーバへ送信する送信部と、上記サーバから送信された情報を受信する受信部と、上記受信した結果を上記受信パケットまたは上記コネクション状態管理部で管理される上記情報に反映する反映部と、同一のコネクションパケットに対し、上記コネクション状態管理部で管理される上記反映後の情報に基づいてフィルタ処理するフィルタ処理部と、を有することを特徴とする中継装置。   (Supplementary Note 10) A relay device that performs service processing on a received packet and relays the received packet, a call unit that calls a predetermined service processing unit that performs service processing on the received packet, and the call A first service processing unit that performs service processing on the received packet by calling a unit, a second service processing unit that virtually performs service processing on the received packet by calling the calling unit, and the received packet When the second service processing unit is called from the calling unit, the predetermined information in the received packet is transmitted to a predetermined server when the second service processing unit is called from the calling unit. A transmitter, a receiver for receiving the information transmitted from the server, and the received result as the received packet. Is a reflection unit that is reflected in the information managed by the connection state management unit, and a filter processing unit that performs filtering on the same connection packet based on the post-reflection information managed by the connection state management unit; The relay apparatus characterized by having.

(付記11) 上記呼出部の呼び出しにより上記第二のサービス処理部が呼び出されると、上記受信パケットは処理依頼キューに一時的にキューイングされ、続く受信パケットに対するサービス処理が上記呼出部によって続いて呼び出されたサービス処理部によって行なわれる、ことを特徴とする付記10に記載の中継装置。   (Supplementary Note 11) When the second service processing unit is called by calling the calling unit, the received packet is temporarily queued in the processing request queue, and service processing for the subsequent received packet is continued by the calling unit. The relay apparatus according to appendix 10, wherein the relay apparatus is performed by a called service processing unit.

(付記12) 上記仮想サービス処理部は、上記受信パケットに対するサービス処理を上記サーバへ振り分けるため、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報とをパケットの種類に応じて管理するサービスリスト管理部を有する、
ことを特徴とする付記10または11に記載の中継装置。
(Supplementary Note 12) The virtual service processing unit distributes service processing for the received packet to the server, so that information on the server that performs the service processing and identification information on the service processing provided by the server are determined according to the type of packet. Having a service list management unit to manage,
The relay device according to appendix 10 or 11, characterized in that.

(付記13) 中継装置で受信されたパケットの内の所定の情報を上記中継装置から受信するサーバであって、コネクションの状態を管理するコネクション状態管理部と、上記パケットの上位レイヤの状態を検出してサービス処理する上位レイヤ検出部と、上記上位レイヤ検出部によって検出された上記パケットの上位レイヤの状態を基に、上記コネクション状態管理部によって管理される上記パケットのコネクション状態を更新するコネクション状態更新部と、上記サービス処理の結果及び上記コネクション状態の更新情報を上記中継装置に送信する送信部と、を有することを特徴とするサーバ。   (Additional remark 13) It is a server which receives the predetermined information of the packet received by the relay apparatus from the said relay apparatus, Comprising: The connection state management part which manages the state of a connection, and the state of the upper layer of the said packet are detected And a connection state for updating the connection state of the packet managed by the connection state management unit based on the state of the upper layer of the packet detected by the upper layer detection unit A server comprising: an update unit; and a transmission unit configured to transmit update results of the service processing result and the connection state to the relay device.

(付記14) 上記サーバは、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報とをパケットの種類に応じて管理する上記中継装置のサービスリスト管理部に対し、自己サーバの情報及び該自己サーバが提供するサービス処理の識別子とを転送する転送部を有する、ことを特徴とする付記13に記載のサーバ。   (Supplementary Note 14) The server sends its own server information to the service list management unit of the relay device that manages the information of the server that performs service processing and the identification information of the service processing provided by the server according to the type of packet. 14. The server according to appendix 13, wherein the server includes a transfer unit that transfers information and an identifier of a service process provided by the self server.

(付記15) 受信パケットを対象にサービス処理を行なって上記受信パケットを中継処理する、中継部とサーバからなる階層型パケット処理システムで行なわれる方法であって、上記中継部は、上記受信パケットを対象にサービス処理を行なう第一または第二のサービス処理部を呼び出し、上記呼び出しにより第一のサービス処理部が呼び出された場合は、上記受信パケットにサービス処理を行ない、上記呼び出しにより第二のサービス処理部が呼び出された場合は、上記受信パケットに仮想的にサービス処理を行ない、上記サーバは、上記第二のサービス処理部が上記呼び出されると、上記第二のサービス処理部の代わりに上記受信パケットに対して実際にサービス処理を行なう、ことを特徴とする方法。   (Supplementary Note 15) A method performed in a hierarchical packet processing system including a relay unit and a server, which performs a service process on a received packet and relays the received packet, wherein the relay unit transmits the received packet When the first or second service processing unit that performs service processing on the target is called, and the first service processing unit is called by the call, the service processing is performed on the received packet, and the second service is executed by the call When the processing unit is called, the server virtually performs service processing on the received packet, and when the second service processing unit is called, the server receives the reception instead of the second service processing unit. A method of actually performing service processing on a packet.

(付記16) 上記呼び出しにより上記第二のサービス処理部が呼び出されると、上記受信パケットは処理依頼キューに一時的にキューイングされ、続く受信パケットに対するサービス処理が、続いて呼び出されたサービス処理部によって行なわれる、ことを特徴とする付記15に記載の方法。   (Supplementary Note 16) When the second service processing unit is called by the call, the received packet is temporarily queued in the processing request queue, and the service processing for the subsequent received packet is subsequently called. The method according to claim 15, wherein the method is performed by:

(付記17) 上記サーバは、上記中継部における受信パケットの中継処理で使用されてるCPUが空いた時間を利用して上記サービス処理を行なう、ことを特徴とする付記15または16に記載の方法。   (Supplementary note 17) The method according to supplementary note 15 or 16, wherein the server performs the service process by using a free time of a CPU used in the relay process of the received packet in the relay unit.

(付記18) 受信パケットに対するコネクション状態をコネクション状態管理部で管理し、上記サーバは、上記受信パケットの上位レイヤの状態を検出し、該上位レイヤの状態の検出結果を基に、上記コネクション状態管理部に管理される上記受信パケットの上記コネクション状態を更新し、上記中継部は、同一のコネクション受信パケットを、上記更新された上記コネクション状態管理部の上記コネクション状態に基づいてフィルタ処理する、ことを特徴とする付記15乃至17の何れか一つに記載の方法。   (Supplementary Note 18) The connection state management unit manages the connection state for the received packet, and the server detects the state of the upper layer of the received packet, and based on the detection result of the state of the upper layer, the connection state management Updating the connection state of the received packet managed by the relay unit, and the relay unit filtering the same connection received packet based on the updated connection state of the connection state management unit. 18. The method according to any one of appendices 15 to 17, which is characterized.

(付記19) 上記中継部は、上記受信パケットに対するサービス処理を上記サーバへ振り分けるため、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報とをパケットの種類に応じてサービスリスト管理部で管理し、上記サーバは、上記サービスリスト管理部に対し、自己サーバの情報及び該自己サーバが提供するサービス処理の識別子とを転送する、ことを特徴とする付記15乃至18の何れか一つに記載の方法。   (Supplementary Note 19) The relay unit distributes service processing for the received packet to the server, so that information on the server that performs the service processing and identification information of the service processing that the server provides are provided in a service list according to the type of packet. Any one of appendices 15 to 18 managed by the management unit, wherein the server forwards the information of the self server and the identifier of the service processing provided by the self server to the service list management unit. The method according to one.

(付記20) 受信パケットを対象にサービス処理を行なって上記受信パケットを中継処理する、中継部とサーバで実行可能なプログラムであって、上記中継部において、上記受信パケットを対象にサービス処理を行なう第一または第二のサービス処理部を呼び出す機能と、上記呼び出しにより第一のサービス処理部が呼び出された場合は、上記受信パケットにサービス処理を行なう機能と、上記呼び出しにより第二のサービス処理部が呼び出された場合は、上記受信パケットに仮想的にサービス処理を行なう機能と、を実現し、上記サーバにおいて、上記第二のサービス処理部が上記呼び出されると、上記第二のサービス処理部の代わりに上記受信パケットに対して実際にサービス処理を行なう機能と、を実現するプログラム。   (Supplementary Note 20) A program that can be executed by a relay unit and a server that performs a service process on a received packet and relays the received packet, and performs the service process on the received packet in the relay unit A function for calling the first or second service processing unit, a function for performing service processing on the received packet when the first service processing unit is called by the call, and a second service processing unit by the call When the second service processing unit is called in the server, the function of virtually processing the received packet is realized. When the second service processing unit is called in the server, the second service processing unit Instead, a program that realizes a function of actually performing service processing on the received packet.

(付記21) 上記中継部において、上記呼び出しにより上記第二のサービス処理部が呼び出されると上記受信パケットを処理依頼キューに一時的にキューイングする機能と、同一のコネクション受信パケットに対するサービス処理を上記サービス処理部で行なう機能と、を実現する付記20に記載のプログラム。   (Supplementary note 21) In the relay unit, when the second service processing unit is called by the call, the function of temporarily queuing the received packet in the processing request queue and the service processing for the same connection received packet are performed. The program according to appendix 20, which realizes a function performed by a service processing unit.

(付記22) 上記サーバにおいて、上記中継部における受信パケットの中継処理で使用されてるCPUが空いた時間を利用して上記サービス処理を行なう機能を実現する付記20または21に記載のプログラム。   (Additional remark 22) The program of Additional remark 20 or 21 which implement | achieves the function which performs the said service process using the time which CPU currently used by the relay process of the received packet in the said relay part has vacant in the said server.

(付記23) 受信パケットに対するコネクション状態をコネクション状態管理部で管理する機能と、上記サーバにおいて、上記受信パケットの上位レイヤの状態を検出する機能と、該上位レイヤの状態の検出結果を基に、上記コネクション状態管理部に管理される上記受信パケットの上記コネクション状態を更新する機能と、上記中継部において、同一のコネクション受信パケットを、上記更新された上記コネクション状態管理部の上記コネクション状態に基づいてフィルタ処理する機能と、を実現する付記20乃至22の何れか一つに記載のプログラム。   (Supplementary Note 23) Based on the function of managing the connection state for the received packet by the connection state management unit, the function of detecting the state of the upper layer of the received packet in the server, and the detection result of the state of the upper layer, The function of updating the connection state of the received packet managed by the connection state management unit, and the relay unit based on the updated connection state of the connection state management unit based on the updated connection state of the connection state management unit The program according to any one of appendices 20 to 22, which realizes a function of filtering.

(付記24) 上記中継部において、上記受信パケットに対するサービス処理を上記サーバへ振り分けるため、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報とをパケットの種類に応じてサービスリスト管理部で管理する機能と、上記サーバにおいて、上記サービスリスト管理部に対し、自己サーバの情報及び該自己サーバが提供するサービス処理の識別子とを転送する機能と、を実現する付記20乃至23の何れか一つに記載のプログラム。   (Supplementary Note 24) In the relay unit, in order to distribute the service processing for the received packet to the server, information on the server that performs the service processing and identification information of the service processing provided by the server according to the type of packet Supplementary notes 20 to 23 for realizing the function managed by the management unit and the function of transferring the information of the self server and the identifier of the service processing provided by the self server to the service list management unit in the server The program as described in any one.

(付記25) 上記第一のサービス処理部はパケットbyパケットの処理を行ない、
上記外部サービス処理部は、ステートフル処理を行なう、
ことを特徴とする付記1乃至9の何れか一つに記載の階層型パケット処理システム。
(Supplementary Note 25) The first service processing unit processes a packet by packet,
The external service processing unit performs stateful processing.
10. The hierarchical packet processing system according to any one of appendices 1 to 9, wherein

(付記26) 上記第一のサービス処理部はパケットbyパケットの処理を行なう、ことを特徴とする付記10乃至12の何れか一つに記載の中継装置。
(付記27)上記サーバが上記第二のサービス処理部の代わりに上記受信パケットに対して実際に行なうサービス処理はステートフル処理である、ことを特徴とする付記15乃至19の何れか一つに記載の方法。
(Supplementary note 26) The relay device according to any one of supplementary notes 10 to 12, wherein the first service processing unit processes a packet by packet.
(Supplementary note 27) Any one of Supplementary notes 15 to 19, wherein the service process that the server actually performs on the received packet instead of the second service processing unit is a stateful process. the method of.

(付記28)上記サーバが上記第二のサービス処理部の代わりに上記受信パケットに対して実際に行なうサービス処理はステートフル処理である、ことを特徴とする付記20乃至24の何れか一つに記載のプログラム。   (Additional remark 28) The service process which the said server actually performs with respect to the said received packet instead of said 2nd service processing part is a stateful process, The additional description 20 thru | or 24 characterized by the above-mentioned Program.

本発明に適用される階層型パケット処理技術の原理を説明するための図である。It is a figure for demonstrating the principle of the hierarchical packet processing technique applied to this invention. 本発明に適用される階層型パケット処理技術の実装例である。It is an example of implementation of the hierarchical packet processing technique applied to this invention. 階層型パケット処理システムの機能ブロック図である。It is a functional block diagram of a hierarchical packet processing system. ステートテーブル319、363及び、expectテーブルのテーブル例である。It is a table example of state table 319,363 and expect table. 中継装置300のカーネル部301に示されるパケット処理経路の処理フローである。4 is a processing flow of a packet processing path shown in the kernel unit 301 of the relay apparatus 300. シグナリングシーケンスの一例である。It is an example of a signaling sequence. メッセージの例である。It is an example of a message. 中継装置300とサーバ350におけるパケット処理シーケンスである。4 is a packet processing sequence in the relay apparatus 300 and the server 350. メッセージの例を示す。Here is an example message: メッセージの例を示す。Here is an example message: 中継装置350のフックハンドラ318によって実行されるコネクショントラッキング処理の一例である。6 is an example of a connection tracking process executed by a hook handler 318 of the relay device 350. 上記コネクショントラッキング処理において処理を引き継いだサーバ350の、上記コネクショントラキング処理の引継ぎ処理例である。It is an example of a takeover process of the connection tracking process of the server 350 that has taken over the process in the connection tracking process. 「L4status」の状態変化を示す図である。It is a figure which shows the state change of "L4status".

符号の説明Explanation of symbols

1 中継部
1−1 呼出部
1−2 サービス処理部
1−3 仮想サービス処理部
2 サーバ
2−1 仮想呼出部
2−2 外部サービス処理部
DESCRIPTION OF SYMBOLS 1 Relay part 1-1 Calling part 1-2 Service processing part 1-3 Virtual service processing part 2 Server 2-1 Virtual calling part 2-2 External service processing part

Claims (13)

受信パケットを対象にサービス処理を行なって前記受信パケットを中継処理する、中継部と複数のサーバを備えた階層型パケット処理システムであって、
前記中継部は、
前記受信パケットを対象にサービス処理を行なう所定のサービス処理部を呼び出す呼出部と、
前記呼出部の呼び出しにより、前記受信パケットにサービス処理を行なう第一のサービス処理部と、
前記呼出部の呼び出しにより、前記受信パケットに仮想的にサービス処理を行なう第二のサービス処理部と、
を有し、
前記第二のサービス処理部は、前記受信パケットに対するサービス処理を前記複数のサーバの何れかへ振り分けるため、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報をパケットの種類に応じて管理するサービスリスト管理部を有し、
前記サーバは、
前記サービスリスト管理部に対し、自己サーバの情報及び該自己サーバが提供するサービス処理の識別情報を転送する転送部と、
前記第二のサービス処理部が前記呼出部から呼び出されると、前記第二のサービス処理部の代わりに前記受信パケットに対して任意のサービス処理を行なう外部サービス処理部を、
有する、
ことを特徴とする階層型パケット処理システム。
A hierarchical packet processing system including a relay unit and a plurality of servers , which performs a service process on a received packet and relays the received packet,
The relay unit is
A calling unit that calls a predetermined service processing unit that performs service processing on the received packet;
A first service processing unit that performs service processing on the received packet by calling the calling unit;
A second service processing unit that virtually performs service processing on the received packet by calling the calling unit;
Have
The second service processing unit distributes service processing for the received packet to any of the plurality of servers, so that information on a server performing the service processing and identification information on the service processing provided by the server are used as a packet type. It has a service list management unit to manage accordingly,
The server
A transfer unit that transfers information of the self server and identification information of service processing provided by the self server to the service list management unit;
When the second service processing unit is called from the calling unit, an external service processing unit that performs arbitrary service processing on the received packet instead of the second service processing unit,
Have
A hierarchical packet processing system.
前記呼出部の呼び出しにより前記第二のサービス処理部が呼び出されると、前記受信パケットは処理依頼キューに一時的にキューイングされ、続く受信パケットに対するサービス処理が前記呼出部によって続いて呼び出されたサービス処理部によって行なわれる、ことを特徴とする請求項1に記載の階層型パケット処理システム。   When the second service processing unit is called by calling the calling unit, the received packet is temporarily queued in the processing request queue, and service processing for the subsequent received packet is subsequently called by the calling unit. The hierarchical packet processing system according to claim 1, wherein the hierarchical packet processing system is performed by a processing unit. 前記外部サービス処理部は、中継部における受信パケットの中継処理で使用されているCPUが空いた時間を利用して前記サービス処理を行なう、ことを特徴とする請求項1または2に記載の階層型パケット処理システム。   3. The hierarchical type according to claim 1, wherein the external service processing unit performs the service processing using a time when a CPU used in the relay processing of the received packet in the relay unit is idle. Packet processing system. 受信パケットに対するコネクション状態を管理するコネクション状態管理部を更に有し、
前記外部サービス処理部は、前記受信パケットの上位レイヤの状態を検出し、該上位レイヤの状態の検出結果を基に、前記コネクション状態管理部に管理される前記受信パケットの前記コネクション状態を更新し、
前記中継部で受信された同一のコネクションパケットは、前記外部サービス処理部によって更新された前記コネクション状態管理部の前記コネクション状態に基づいてフィルタ処理される、
ことを特徴とする請求項1乃至3の何れか一つに記載の階層型パケット処理システム。
A connection state management unit for managing a connection state for the received packet;
The external service processing unit detects an upper layer state of the received packet, and updates the connection state of the received packet managed by the connection state management unit based on a detection result of the upper layer state. ,
The same connection packet received by the relay unit is filtered based on the connection state of the connection state management unit updated by the external service processing unit,
The hierarchical packet processing system according to any one of claims 1 to 3.
受信パケットを対象にサービス処理を行なって前記受信パケットを中継処理する中継装置であって、
前記中継装置は、
前記受信パケットを対象にサービス処理を行なう所定のサービス処理部を呼び出す呼出部と、
前記呼出部の呼び出しにより、前記受信パケットにサービス処理を行なう第一のサービス処理部と、
前記呼出部の呼び出しにより、前記受信パケットに仮想的にサービス処理を行なう第二のサービス処理部とを有し、
前記第二のサービス処理部は、前記受信パケットに対するサービス処理を複数のサーバの何れかへ振り分けるため、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報をパケットの種類に応じて管理するサービスリスト管理部を有し、該サーバから転送される自己サーバの情報及び該自己サーバが提供するサービス処理の識別情報を受信し、前記第二のサービス処理部が前記呼出部から呼び出されると、該第二のサービス処理部の代わりに該サーバにより該受信パケットに対して任意のサービス処理が行なわれることを特徴とする中継装置。
A relay device that performs a service process on a received packet and relays the received packet,
The relay device is
A calling unit that calls a predetermined service processing unit that performs service processing on the received packet;
A first service processing unit that performs service processing on the received packet by calling the calling unit;
A second service processing unit that virtually performs service processing on the received packet by calling the calling unit ;
The second service processing unit distributes the service processing for the received packet to any of a plurality of servers, so that the information on the server that performs the service processing and the identification information of the service processing provided by the server according to the type of the packet A service list management unit managed by the server, receiving information on the own server transferred from the server and identification information of service processing provided by the server, and calling the second service processing unit from the calling unit. The relay apparatus is characterized in that, when the received packet is received, an arbitrary service process is performed by the server instead of the second service processing unit.
前記受信パケットの上位レイヤの状態の検出に基づく情報を管理するコネクション状態管理部と、
前記第二のサービス処理部が前記呼出部から呼び出されると、受信パケットの内の所定の情報を所定のサーバへ送信する送信部と、
前記サーバから送信された情報を受信する受信部と、
前記受信した結果を前記受信パケットまたは前記コネクション状態管理部で管理される前記情報に反映する反映部と、
同一のコネクションパケットに対し、前記コネクション状態管理部で管理される前記反映後の情報に基づいてフィルタ処理するフィルタ処理部と、
さらに有することを特徴とする請求項5に記載の中継装置。
A connection state management unit for managing information based on detection of a state of an upper layer of the received packet;
When the second service processing unit is called from the calling unit, a transmitting unit that transmits predetermined information in the received packet to a predetermined server;
A receiving unit for receiving information transmitted from the server;
A reflection unit that reflects the received result on the received packet or the information managed by the connection state management unit;
A filter processing unit that performs filtering on the same connection packet based on the information after reflection managed by the connection state management unit;
The relay apparatus according to claim 5, further comprising :
前記呼出部の呼び出しにより前記第二のサービス処理部が呼び出されると、前記受信パケットは処理依頼キューに一時的にキューイングされ、続く受信パケットに対するサービス処理が前記呼出部によって続いて呼び出されたサービス処理部によって行なわれる、ことを特徴とする請求項5または6に記載の中継装置。 When the second service processing unit is called by calling the calling unit, the received packet is temporarily queued in the processing request queue, and service processing for the subsequent received packet is subsequently called by the calling unit. The relay apparatus according to claim 5 , wherein the relay apparatus is performed by a processing unit. 中継装置で受信されたパケットの内の所定の情報を前記中継装置から受信するサーバであって、
受信パケットに対するサービス処理を複数のサーバの何れかへ振り分けるため、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報をパケットの種類に応じて管理する前記中継装置のサービスリスト管理部に対して、自己サーバの情報及び該自己サーバが提供するサービス処理の識別情報を転送する転送部と、
前記中継装置において前記受信パケットに仮想的にサービス処理を行なうサービス処理部が呼び出されると、該サービス処理部の代わりに該受信パケットに対して任意のサービス処理を行なう外部サービス処理部と、
を有することを特徴とするサーバ。
A server that receives predetermined information from packets received by the relay device from the relay device,
Service list management of the relay apparatus that manages information on a server that performs service processing and identification information on service processing provided by the server according to the type of packet in order to distribute service processing for received packets to any of a plurality of servers A transfer unit that transfers information of the self server and identification information of a service process provided by the self server to the unit;
When a service processing unit that virtually performs service processing on the received packet is called in the relay device, an external service processing unit that performs arbitrary service processing on the received packet instead of the service processing unit;
The server characterized by having.
コネクションの状態を管理するコネクション状態管理部と、
前記パケットの上位レイヤの状態を検出してサービス処理する上位レイヤ検出部と、
前記上位レイヤ検出部によって検出された前記パケットの上位レイヤの状態を基に、前記コネクション状態管理部によって管理される前記パケットのコネクション状態を更新するコネクション状態更新部と、
前記サービス処理の結果及び前記コネクション状態の更新情報を前記中継装置に送信する送信部と、
さらに有することを特徴とする請求項8に記載のサーバ。
A connection status management unit for managing the connection status;
An upper layer detection unit for detecting a state of an upper layer of the packet and performing service processing;
A connection state update unit that updates the connection state of the packet managed by the connection state management unit based on the state of the upper layer of the packet detected by the upper layer detection unit;
A transmission unit for transmitting the result of the service processing and the update information of the connection state to the relay device;
The server according to claim 8, further comprising :
受信パケットを対象にサービス処理を行なって前記受信パケットを中継処理する、中継部と複数のサーバを備えた階層型パケット処理システムで行なわれる方法であって、
前記中継部は、
前記受信パケットに対するサービス処理を前記複数のサーバの何れかへ振り分けるため、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報をパケットの種類に応じて管理し、
前記受信パケットを対象にサービス処理を行なう第一または第二のサービス処理部を呼び出し、
前記呼び出しにより第一のサービス処理部が呼び出された場合は、前記受信パケットにサービス処理を行ない、
前記呼び出しにより第二のサービス処理部が呼び出された場合は、前記受信パケットに仮想的にサービス処理を行ない、
前記サーバは、
前記中継部に対し、自己サーバの情報及び該自己サーバが提供するサービス処理の識別情報を転送し、
前記第二のサービス処理部が前記呼び出されると、前記第二のサービス処理部の代わりに前記受信パケットに対して実際にサービス処理を行なう、
ことを特徴とする方法。
A method performed in a hierarchical packet processing system including a relay unit and a plurality of servers , which performs a service process on a received packet and relays the received packet,
The relay unit is
In order to distribute service processing for the received packet to any of the plurality of servers, information on the server that performs the service processing and identification information on the service processing provided by the server are managed according to the type of the packet,
Call a first or second service processing unit that performs service processing on the received packet,
When the first service processing unit is called by the call, service processing is performed on the received packet,
When the second service processing unit is called by the call, virtually performs service processing on the received packet,
The server
To the relay unit, the information of the self server and the service processing identification information provided by the self server are transferred,
When the second service processing unit is called, the service processing is actually performed on the received packet instead of the second service processing unit.
A method characterized by that.
受信パケットに対するコネクション状態をコネクション状態管理部で管理し、
前記サーバは、
前記受信パケットの上位レイヤの状態を検出し、
該上位レイヤの状態の検出結果を基に、前記コネクション状態管理部に管理される前記受信パケットの前記コネクション状態を更新し、
前記中継部は、
同一のコネクション受信パケットを、前記更新された前記コネクション状態管理部の前記コネクション状態に基づいてフィルタ処理する、
ことを特徴とする請求項10に記載の方法。
The connection status management unit manages the connection status for received packets.
The server
Detecting an upper layer state of the received packet;
Based on the detection result of the upper layer state, update the connection state of the received packet managed by the connection state management unit,
The relay unit is
Filtering the same connection reception packet based on the connection state of the updated connection state management unit,
The method according to claim 10 .
受信パケットを対象にサービス処理を行なって前記受信パケットを中継処理する、中継部とサーバで実行可能なプログラムであって、
前記中継部において、
前記受信パケットに対するサービス処理を複数のサーバの何れかへ振り分けるため、サービス処理を行なうサーバの情報及び該サーバが提供するサービス処理の識別情報をパケットの種類に応じて管理する機能と、
前記受信パケットを対象にサービス処理を行なう第一または第二のサービス処理部を呼び出す機能と、
前記呼び出しにより第一のサービス処理部が呼び出された場合は、前記受信パケットにサービス処理を行なう機能と、
前記呼び出しにより第二のサービス処理部が呼び出された場合は、前記受信パケットに仮想的にサービス処理を行なう機能と、
を実現し、
前記サーバにおいて、
前記中継部に対し、自己サーバの情報及び該自己サーバが提供するサービス処理の識別情報を転送する機能と、
前記第二のサービス処理部が前記呼び出されると、前記第二のサービス処理部の代わりに前記受信パケットに対して実際にサービス処理を行なう機能と、
を実現するプログラム。
A program executable by a relay unit and a server for performing a service process on a received packet and relaying the received packet,
In the relay unit,
A function of managing information on a server that performs service processing and service processing identification information provided by the server according to the type of packet in order to distribute service processing for the received packet to any of a plurality of servers;
A function of calling a first or second service processing unit that performs service processing on the received packet;
When the first service processing unit is called by the call, a function of performing service processing on the received packet;
When the second service processing unit is called by the call, a function for virtually processing the received packet;
Realized,
In the server,
A function of transferring information of the self server and identification information of service processing provided by the self server to the relay unit;
When the second service processing unit is called, a function of actually performing service processing on the received packet instead of the second service processing unit;
A program that realizes
受信パケットに対するコネクション状態をコネクション状態管理部で管理する機能と、
前記サーバにおいて、
前記受信パケットの上位レイヤの状態を検出する機能と、
該上位レイヤの状態の検出結果を基に、前記コネクション状態管理部に管理される前記受信パケットの前記コネクション状態を更新する機能と、
前記中継部において、
同一のコネクション受信パケットを、前記更新された前記コネクション状態管理部の前記コネクション状態に基づいてフィルタ処理する機能と、
を実現する請求項12に記載のプログラム。
A function for managing the connection state for the received packet by the connection state management unit;
In the server,
A function of detecting a state of an upper layer of the received packet;
A function of updating the connection state of the received packet managed by the connection state management unit based on the detection result of the state of the upper layer;
In the relay unit,
A function of filtering the same connection reception packet based on the connection state of the updated connection state management unit;
The program according to claim 12 , which realizes
JP2004108239A 2004-03-31 2004-03-31 Hierarchical packet processing system, relay device, server, method thereof, and program thereof Expired - Fee Related JP4348227B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2004108239A JP4348227B2 (en) 2004-03-31 2004-03-31 Hierarchical packet processing system, relay device, server, method thereof, and program thereof
US10/981,102 US7613825B2 (en) 2004-03-31 2004-11-04 Hierarchical packet processing system and method, relay device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004108239A JP4348227B2 (en) 2004-03-31 2004-03-31 Hierarchical packet processing system, relay device, server, method thereof, and program thereof

Publications (2)

Publication Number Publication Date
JP2005295268A JP2005295268A (en) 2005-10-20
JP4348227B2 true JP4348227B2 (en) 2009-10-21

Family

ID=35054196

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004108239A Expired - Fee Related JP4348227B2 (en) 2004-03-31 2004-03-31 Hierarchical packet processing system, relay device, server, method thereof, and program thereof

Country Status (2)

Country Link
US (1) US7613825B2 (en)
JP (1) JP4348227B2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4648182B2 (en) * 2005-12-19 2011-03-09 富士通株式会社 Packet relay system
US8874789B1 (en) * 2007-09-28 2014-10-28 Trend Micro Incorporated Application based routing arrangements and method thereof
WO2011096307A1 (en) 2010-02-03 2011-08-11 日本電気株式会社 Proxy device and operation method thereof
US11533255B2 (en) 2014-11-14 2022-12-20 Nicira, Inc. Stateful services on stateless clustered edge
US10951584B2 (en) 2017-07-31 2021-03-16 Nicira, Inc. Methods for active-active stateful network service cluster
US11296984B2 (en) 2017-07-31 2022-04-05 Nicira, Inc. Use of hypervisor for active-active stateful network service cluster
US11570092B2 (en) * 2017-07-31 2023-01-31 Nicira, Inc. Methods for active-active stateful network service cluster
US11153122B2 (en) 2018-02-19 2021-10-19 Nicira, Inc. Providing stateful services deployed in redundant gateways connected to asymmetric network
US11799761B2 (en) 2022-01-07 2023-10-24 Vmware, Inc. Scaling edge services with minimal disruption

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6157955A (en) * 1998-06-15 2000-12-05 Intel Corporation Packet processing system including a policy engine having a classification unit
JP3963690B2 (en) 2001-03-27 2007-08-22 富士通株式会社 Packet relay processor
US7305492B2 (en) * 2001-07-06 2007-12-04 Juniper Networks, Inc. Content service aggregation system
US7200144B2 (en) * 2001-10-18 2007-04-03 Qlogic, Corp. Router and methods using network addresses for virtualization
US20050060365A1 (en) * 2002-01-24 2005-03-17 Robinson Scott L. Context-based information processing
US7340535B1 (en) * 2002-06-04 2008-03-04 Fortinet, Inc. System and method for controlling routing in a virtual router system

Also Published As

Publication number Publication date
JP2005295268A (en) 2005-10-20
US20050220098A1 (en) 2005-10-06
US7613825B2 (en) 2009-11-03

Similar Documents

Publication Publication Date Title
US7487284B2 (en) Transaction flow and ordering for a packet processing engine, located within an input-output hub
US9311230B2 (en) Local direct storage class memory access
AU2016382952B2 (en) Networking technologies
US6917987B2 (en) Methodology and mechanism for remote key validation for NGIO/InfiniBand™ applications
US7661112B2 (en) Methods and apparatus for managing a buffer of events in the background
US20070041383A1 (en) Third party node initiated remote direct memory access
US7596634B2 (en) Networked application request servicing offloaded from host
US7760741B2 (en) Network acceleration architecture
CN110149388A (en) Connection method, device and the equipment of HTTPDNS server
US8976789B2 (en) Communication transport protocol for distributed information technology architectures
US7181541B1 (en) Host-fabric adapter having hardware assist architecture and method of connecting a host system to a channel-based switched fabric in a data network
US9160791B2 (en) Managing connection failover in a load balancer
US7536468B2 (en) Interface method, system, and program product for facilitating layering of a data communications protocol over an active message layer protocol
JP4348227B2 (en) Hierarchical packet processing system, relay device, server, method thereof, and program thereof
US20210029052A1 (en) Methods and apparatuses for packet scheduling for software- defined networking in edge computing environment
EP1589424A2 (en) Vertical perimeter framework for providing application services in multi-CPU environments
CN110351233A (en) A kind of two-way transparent transmission technology based on safety isolation network gate
US8566833B1 (en) Combined network and application processing in a multiprocessing environment
US11032398B1 (en) Kernel multiplexing system of communications
US20220210086A1 (en) Managing network state for high flow availability within distributed network platform
EP1988473B1 (en) A server with a core using a virtual file system and a method for securely redirecting a persistent storage device operation to a middleware infrastructure
US8527664B2 (en) Direct memory access with minimal host interruption
KR20050112912A (en) System and method for relaying data by use of socket applicaton program
US9135090B2 (en) Messaging bus residing on a mobile device
JP4641794B2 (en) Packet filter synchronization method and packet relay system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070216

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090213

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090224

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090421

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090717

R150 Certificate of patent or registration of utility model

Ref document number: 4348227

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120724

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120724

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130724

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees