JP2004153343A - Transfer apparatus and transfer method - Google Patents
Transfer apparatus and transfer method Download PDFInfo
- Publication number
- JP2004153343A JP2004153343A JP2002313417A JP2002313417A JP2004153343A JP 2004153343 A JP2004153343 A JP 2004153343A JP 2002313417 A JP2002313417 A JP 2002313417A JP 2002313417 A JP2002313417 A JP 2002313417A JP 2004153343 A JP2004153343 A JP 2004153343A
- Authority
- JP
- Japan
- Prior art keywords
- packet
- transfer
- communication
- state
- addressed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、転送装置及び転送方法に関する。特に本発明は、通信パケットを転送する転送装置に関する。
【0002】
【従来の技術】
従来、例えば、通信を許可するIPアドレス等を指定することにより、許可されたIPアドレス以外からのパケットの転送を制限する転送装置が知られている。このような転送装置において、通信を許可するIPアドレスは、転送装置の使用者によって、予め設定される。また、従来、セッションの開設時に開設条件に適合するか否かを判定する転送装置が知られている(例えば、特許文献1参照。)。
【0003】
【特許文献1】
特開2000―349851号公報(第3〜12頁、第1〜12図)
【0004】
【発明が解決しようとする課題】
しかし、従来の転送装置においては、例えば第三者がIPアドレスを偽装することにより、不正なパケットが転送される場合があった。また、セッションが適切に開設された後に、不正なアクセスが生じる場合もあった。そのため、従来、パケットの転送を適切に行うのは困難であった。
【0005】
そこで本発明は、上記の課題を解決することのできる転送装置及び転送方法を提供することを目的とする。この目的は特許請求の範囲における独立項に記載の特徴の組み合わせにより達成される。また従属項は本発明の更なる有利な具体例を規定する。
【0006】
【課題を解決するための手段】
即ち、本発明の第1の形態によると、予め定められたネットワーク内に設けられた内部通信装置と、ネットワークの外部に設けられた外部通信装置との間の通信における通信パケットを転送する転送装置であって、内部通信装置における通信の状態を示す通信状態を格納する状態格納部と、内部通信装置が外部通信装置に対して送信する通信パケットである外部宛パケットのヘッダに基づき、通信状態を更新する状態更新部と、外部通信装置が内部通信装置に対して送信する通信パケットである内部宛パケットの転送を許可するか否かを、通信状態に基づいて判定する転送判定部と、転送判定部が内部宛パケットの転送を許可すると判定した場合に、内部宛パケットを内部通信装置に転送する転送処理部とを備える。
【0007】
また、内部通信装置と、外部通信装置との間におけるセッションを特定するセッション管理情報を格納するセッション管理情報格納部を更に備え、状態格納部は、セッション管理情報に対応する通信状態を格納し、転送判定部は、セッション管理情報を管理し、かつ、セッション管理情報に基づき、内部宛パケットに対応するセッションを識別するセッション管理部と、セッション管理部が識別したセッションに対応する通信状態に基づき、内部宛パケットの転送を許可するか否かを判定する判定処理部とを有してよい。
【0008】
また、セッション管理情報格納部は、セッションに対応する通信状態へのポインタを、セッション管理情報の少なくとも一部として記憶する連想記憶装置であり、セッション管理部は、連想記憶装置に、内部宛パケットのヘッダ情報に基づき、内部通信装置のIPアドレス及びポート番号と、外部通信装置のIPアドレス及びポート番号とを少なくとも一部として含む検索キーを与えることにより、通信状態へのポインタを取得し、判定処理部は、セッション管理部から受け取るポインタに基づき、状態格納部から、内部宛パケットに対応する通信状態を取得してよい。
【0009】
また、外部宛パケットに対応するセッション管理情報がセッション管理情報格納部に格納されておらず、かつ、当該外部宛パケットが、外部通信装置との間のセッションの確立を求めるパケットである場合、セッション管理部は、当該外部宛パケットに対応するセッション管理情報を、セッション管理情報格納部に新たに格納させてよい。また、内部宛パケットに対応するセッション管理情報がセッション管理情報格納部に格納されていない場合、判定処理部は、前当該内部宛パケットの転送を許可しなくてよい。
【0010】
また、転送処理部は、外部宛パケットを更に外部通信装置に転送し、セッション管理情報に対応する外部宛パケット又は内部宛パケットを、転送処理部が予め定められた期間転送しない場合、セッション管理部は、当該セッション管理情報を消去してよい。また、セッション管理情報格納部は、セッション管理情報の消去の可否を示す消去フラグ情報を、セッション管理情報の少なくとも一部として格納し、セッション管理情報に対応する外部宛パケット又は内部宛パケットを、転送処理部が予め定められた期間転送しない場合において、当該セッション管理情報に対応する消去フラグ情報が、消去が可能であることを示す場合、セッション管理部は、当該セッション管理情報を消去してよい。
【0011】
また、外部宛パケット又は内部宛パケットを処理するパケット処理部を更に備え、状態格納部は、通信状態の少なくとも一部として、外部宛パケット又は内部宛パケットに対してパケット処理部が行うべき処理を示す処理情報を格納し、パケット処理部が処理情報に従って外部宛パケット又は内部宛パケットを処理した結果に基づき、転送判定部は、内部宛パケットの転送を許可するか否かを判定してよい。
【0012】
また、転送装置は、内部宛パケット及び外部宛パケットとして、TCP(Transport Control Protocol)に基づくTCPパケットを転送し、状態格納部は、内部通信装置におけるTCPセッションの状態を示すTCP状態を、通信状態の少なくとも一部として格納し、状態更新部は、外部宛パケットのヘッダにおけるTCPフラグに基づき、TCP状態を更新し、転送判定部は、内部宛パケットのヘッダにおけるTCPフラグ、及びTCP状態に基づき、内部宛パケットの転送を許可するか否かを判定してよい。
【0013】
また、状態格納部は、外部宛パケットのヘッダにおける確認応答番号フィールドの値を示す確認応答番号情報を、通信状態の少なくとも一部として格納し、転送判定部は、内部宛パケットのヘッダにおけるシーケンス番号フィールドの値、及び確認応答番号情報に基づき、内部宛パケットの転送を許可するか否かを判定してよい。また、状態格納部は、外部宛パケットのヘッダにおけるウィンドウフィールドの値を示すウィンドウ情報を、通信状態の少なくとも一部として更に格納し、転送判定部は、内部宛パケットのヘッダにおけるシーケンス番号フィールドの値、確認応答番号情報、及びウィンドウ情報に基づき、内部宛パケットの転送を許可するか否かを判定してよい。
【0014】
また、状態格納部は、内部宛パケットのヘッダに基づく情報を、通信状態の少なくとも一部として格納し、状態更新部は、内部宛パケットのヘッダに基づき、更に、通信状態を更新し、転送判定部は、通信状態に基づき、内部宛パケットの転送を許可するか否かを判定してよい。また、状態格納部は、TCP状態として、外部通信装置におけるTCPセッションの状態を更に示す情報を格納し、状態更新部は、内部宛パケットのヘッダにおけるTCPフラグに基づき、更に、TCP状態を更新し、転送判定部は、TCP状態に基づき、内部宛パケットの転送を許可するか否かを判定してよい。
【0015】
また、状態格納部は、内部宛パケットのヘッダにおけるシーケンス番号フィールドの値を示すシーケンス番号情報を、通信状態の少なくとも一部として格納し、内部宛パケットの転送が許可された場合、状態更新部は、シーケンス番号情報を、当該内部宛パケットのヘッダにおけるシーケンス番号フィールドの値を示す情報に更新し、転送判定部は、シーケンス番号情報に基づき、内部宛パケットの転送を許可するか否かを判定してよい。また、シーケンス番号情報の示す値とシーケンス番号フィールドの値が同一である内部宛パケットを転送装置が転送した回数を示す同一シーケンス番号回数情報を、状態格納部は、通信状態の少なくとも一部として更に格納し、同一シーケンス番号回数情報が示す回数が予め定められた回数に達した後において、内部宛パケットにおけるシーケンス番号フィールドの値が、シーケンス番号情報の示す値と等しい場合、転送判定部は、当該内部宛パケットの転送を許可しなくてよい。
【0016】
本発明の第1の形態によると、予め定められたネットワーク内に設けられた内部通信装置と、ネットワークの外部に設けられた外部通信装置との間の通信における通信パケットを転送する転送方法であって、内部通信装置における通信の状態を示す通信状態を格納する状態格納段階と、内部通信装置が外部通信装置に対して送信する通信パケットである外部宛パケットのヘッダに基づき、通信状態を更新する状態更新段階と、外部通信装置が内部通信装置に対して送信する通信パケットである内部宛パケットの転送を許可するか否かを、通信状態に基づいて判定する転送判定段階と、転送判定段階において、内部宛パケットの転送を許可すると判定された場合に、内部宛パケットを内部通信装置に転送する転送処理段階とを備える。
【0017】
なお上記の発明の概要は、本発明の必要な特徴の全てを列挙したものではなく、これらの特徴群のサブコンビネーションも又発明となりうる。
【0018】
【発明の実施の形態】
以下、発明の実施形態を通じて本発明を説明するが、実施形態は特許請求の範囲にかかる発明を限定するものではなく、また実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。
【0019】
図1は、本実施形態に係る通信システム100を示す。通信システム100は、サーバ120a〜b、外部ネットワーク140、及びISP中継装置130を有する広域ネットワーク(WAN)と、中継装置150及び端末160a〜bを有するローカルネットワーク(LAN)とを備える。中継装置150は、本発明に係る情報処理装置の一例であり、例えば企業や家庭等のLAN内の端末160a〜b等を、セキュリティを確保しつつWANに接続する、ゲートウェイ機能及びルータ機能を提供することを目的とする。
【0020】
サーバ120a〜bは、例えばHTTPサービスやFTPサービス等のサービスを提供する通信機器である。ISP中継装置130は、ISP(Internet Service Provider)によって提供され、中継装置150と外部ネットワーク140の間の通信を中継する。外部ネットワーク140は、サーバ120a〜b及びISP中継装置130を接続する。ここで、外部ネットワーク140は、無線通信網又は有線通信網を含んでよく、少なくとも一部の経路に中継装置150及び端末160a〜bによるLAN以外のLANを含んでもよい。
【0021】
中継装置150は、例えば通信ポート0から通信ポート3の複数の通信ポートを備え、LAN内の端末160a〜bとISP中継装置130とを接続する。本実施形態において、中継装置150は、通信ポート0を介してISP中継装置130に、通信ポート1を介して端末160aに、通信ポート3を介して端末160bにそれぞれ接続される。
【0022】
中継装置150は、サーバ120a〜b等の送信元通信機器が送信した通信パケットを、当該通信パケットの宛先である端末160a〜b等の宛先通信機器に対応する一の通信ポートに接続されたネットワークに転送することにより、当該通信パケットを宛先通信機器に対して転送する。同様に、中継装置150は、端末160a〜b等の送信元通信機器が送信した通信パケットを、当該通信パケットの宛先であるサーバ120a〜b等の宛先通信機器に対応する、ISP中継装置130に接続されたネットワークに転送することにより、当該通信パケットを宛先通信機器に対して転送する。
【0023】
ここで、中継装置150は、受信した通信パケットが、予め定められた条件を満たす正当な通信パケットであるかどうかを判断し、正当な通信パケットのみを転送する。これにより、中継装置150は、サーバ120a〜bと端末160a〜bとの間の通信のセキュリティを確保することができる。
【0024】
端末160a〜bは、例えばパーソナルコンピュータ、PDA、IP(Internet Protocol)電話、又はネットワーク接続可能な家電製品等の通信機器である。ここで、端末160a〜bは、中継装置150とは異なるハブ、スイッチ、ルータ等の中継機器を介して中継装置150に接続されてもよい。
【0025】
尚、本実施形態において、端末160a〜bは、LAN内に設けられた内部通信装置の一例である。サーバ120a〜bは、当該LANの外部であるWAN側に設けられた外部通信装置の一例である。中継装置150は、内部通信装置である端末160と、外部通信装置であるサーバ120との間の通信における通信パケットを転送する。
【0026】
図2は、本実施形態に係る中継装置150の構成を示す。中継装置150は、CPUバス280により相互に接続されるCPU200、ROM210、RAM220、通信処理デバイス230、ハードディスクドライブ240、フレキシブルディスクドライブ250、CD−ROMドライブ260、及びブリッジ270と、通信処理デバイス230に接続される物理層インターフェイス232a〜d、連想記憶メモリ234、及びセッション状態メモリ236と、I/Oバス282を介してブリッジ270に接続される無線LANインターフェイス272、シリアルインターフェイス274、及びパラレルインターフェイス276とを備える。
【0027】
CPU200は、ROM210及びRAM220に格納されたプログラムに基づいて動作し、各部の制御を行う。ROM210は、中継装置150の起動時にCPU200が実行するブートプログラムや、中継装置150のハードウェアに依存するプログラム等を格納する。RAM220は、中継装置150が通信パケットを中継するために実行する中継プログラムや、中継プログラムの実行に用いられるデータ等を格納する。ハードディスクドライブ240は、中継装置150が使用するプログラム及びデータを格納する。フレキシブルディスクドライブ250及びCD−ROMドライブ260は、それぞれ対応するフレキシブルディスク290及びCD−ROM295からプログラム又はデータを読み取り、CPUバス280を介してRAM220、ハードディスクドライブ240、及び/又は通信処理デバイス230に提供する。
【0028】
中継装置150又は通信処理デバイス230に提供される中継プログラム等のプログラムは、フレキシブルディスク290、CD−ROM295、又はICカード等の記録媒体に格納されて利用者によって提供される。
【0029】
通信処理デバイス230は、送信元通信機器が送信した通信パケットを通信ポート0〜3から受信し、宛先通信機器に対応する通信ポートに接続されたネットワークへ転送することにより、当該通信パケットを宛先通信機器に対して転送する。ここで、中継装置150は、受信した通信パケットが予め定められた条件を満たす正当な通信パケットであるかどうかを判断し、正当な通信パケットのみを転送する。
【0030】
以上に示した通信処理において、通信処理デバイス230は、通信処理デバイス230単体で通信パケットを処理できない場合や、IPsecパケット等の暗号化された通信パケットを受信した場合等に、CPU200に通信処理の一部を行わせてもよい。
【0031】
物理層インターフェイス232a〜dは、通信ポート0〜3にそれぞれ対応し、物理層インターフェイス232a〜dに接続されるネットワークの伝送媒体と、通信処理デバイス230の通信ポートとの間において、信号レベルの変換や、光通信メディア及び電気信号間の変換等の、物理層における変換を行う。
【0032】
連想記憶メモリ234は、受信した通信パケットの中継の許可又は禁止を選択するために通信処理デバイス230により用いられるセッション管理情報と、宛先通信機器に対応付けられた通信ポートを選択するために通信処理デバイス230により用いられる通信ポート管理情報とを格納する。ここで、本実施形態において、連想記憶メモリ234は、端末160(図1参照)と、サーバ120(図1参照)との間におけるセッションを特定するセッション管理情報を格納する。中継装置150は、例えばOSI参照モデルにおけるトランスポート層、セッション層、プレゼンテーション層、及びアプリケーション層等における通信プロトコルに基づき動的に開設及び/又は閉鎖される送信元通信機器及び宛先通信機器間のコネクションであるセッションを特定するための情報を、セッション管理情報として格納してよい。また、セッション管理情報は、中継装置150が中継を許可又は禁止された送信元通信機器及び/又は宛先通信機器の組を、中継装置150の提供元又は利用者等により予め設定されてもよい。
【0033】
セッション状態メモリ236は、それぞれのセッションにおける端末160及びサーバ120の通信の状態を示す通信状態であるセッション状態情報を格納する。ここで、本実施形態において、連想記憶メモリ234は、それぞれのセッションに対応するセッション状態情報へのポインタを、セッション管理情報の少なくとも一部として記憶する。これにより、セッション状態メモリ236は、セッション管理情報に対応するセッション状態情報を格納する。この場合、セッション状態メモリ236は、例えば、連想記憶メモリ234においてセッション管理情報が格納されているメモリアドレスを、ポインタとして受け取る。
【0034】
ブリッジ270は、無線LANインターフェイス272、シリアルインターフェイス274、及びパラレルインターフェイス276を、CPUバス280に接続する。無線LANインターフェイス272は、例えばIEEE802.11b等の無線LANや、Bluetooth(登録商標)等の近距離無線通信等により、外部の機器と接続される。シリアルインターフェイス274は、例えばUSBやIEEE1394等のシリアルケーブルにより、外部の機器と接続される。パラレルインターフェイス276は、例えばSCSI等のパラレルケーブルにより、外部の機器と接続される。無線LANインターフェイス272、シリアルインターフェイス274、及びパラレルインターフェイス276に接続される機器は、例えばデジタルセットトップボックス、ゲーム機、PDA、若しくは携帯電話等の情報機器であってよく、テレビ受像機、デジタルカメラ、HDD録画機、オーディオ機器、若しくはDVDプレーヤ等のデジタル機器や、エアコン、照明機器、若しくは冷蔵庫等の家電機器や、温度計、圧力センサ、若しくは防犯センサ等のセンサ機器であってもよい。中継装置150は、中継装置150及び端末160a〜bによるLANの利用者又はその許可を受けた者によるLAN内又はWANからの制御に基づき、これらの機器の制御及び/又は情報採取を行ってよい。
【0035】
以上に示す通り、中継装置150は、連想記憶メモリ234に格納されたセッション管理情報及びセッション状態メモリ236に格納されたセッション状態に基づき受信した通信パケットの中継の許可又は禁止を判断する。これにより、中継装置150は、正当な通信パケットのみを中継することができ、WAN及びLAN間の通信のセキュリティを確保することができる。
【0036】
図3は、本実施形態に係る通信処理デバイス230の構成を示す。通信処理デバイス230は、転送判定部310、転送処理部306、及び状態更新部308を含む。
【0037】
転送判定部310は、サーバ120が端末160に対して送信した通信パケットである内部宛パケットの転送を許可するか否かを、セッション状態メモリ236に格納されたセッション状態情報に基づいて判定する。また、転送判定部310は、端末160がサーバ120に対して送信した通信パケットである外部宛パケットを、転送処理部306に転送させる。本実施形態において、転送判定部310は、セッション管理部302及び判定処理部304を有する。
【0038】
セッション管理部302は、連想記憶メモリ234に格納されたセッション管理情報を管理する。そして、中継装置150が内部宛パケットを受け取った場合、セッション管理部302は、セッション管理情報に基づき、内部宛パケットに対応するセッションを識別する。セッション管理部302は、例えば、内部宛パケットのヘッダ情報に基づく検索キーを連想記憶メモリ234に与えることにより、この内部宛パケットに対応するセッションを特定するセッション管理情報を取得する。また、中継装置150が外部宛パケットを受け取った場合、セッション管理部302は、外部宛パケットに対応するセッション管理情報を取得する。
【0039】
ここで、本実施形態において、連想記憶メモリ234は、セッション管理情報の少なくとも一部として、セッション状態メモリ236におけるセッション状態情報へのポインタを格納する。そのため、セッション管理部302は、セッション管理情報に基づき、セッション状態情報へのポインタを取得する。そして、セッション管理部302は、取得した当該ポインタを、判定処理部304に与える。
【0040】
尚、セッション管理部302は、セッションが開始された場合に、新たなセッション管理情報を連想記憶メモリ234に登録する。また、セッションが終了した場合、セッション管理部302は、このセッションに対応するセッション管理情報を消去してよい。
【0041】
判定処理部304は、セッション管理部302が識別したセッションに対応するセッション状態情報を取得する。例えば、判定処理部304は、セッション管理部302から受け取るポインタに基づき、セッション状態メモリ236から、内部宛パケットに対応するセッション状態情報を取得する。そして、判定処理部304は、このセッション状態情報に基づき、内部宛パケットの転送を許可するか否かを判定する。また、判定処理部304は、外部宛パケットを、転送処理部306に転送させる。他の例において、判定処理部304は、外部宛パケットの転送の許可するか否かを、更に判定してもよい。
【0042】
尚、判定処理部304は、CPUバス280を介して、例えばCPU200等と通信してよい。判定処理部304は、セッション状態情報に基づき、例えばCPU200に内部宛パケットを処理させ、この処理の結果に基づき、内部宛パケットの転送の可否を判定してよい。判定処理部304は、CPU200に、例えば暗号化された内部宛パケットの復号を行わせる。
【0043】
転送処理部306は、判定処理部304が内部宛パケットの転送を許可すると判定した場合に、この内部宛パケットを端末160に転送する。また、転送処理部306は、外部宛パケットをサーバ120に転送する。転送処理部306は、連想記憶メモリ234に格納された通信ポート管理情報に基づき、内部宛パケット及び外部宛パケットを転送してよい。
【0044】
状態更新部308は、外部宛パケット及び内部宛パケットのそれぞれのヘッダに基づき、セッション状態情報を更新する。これにより、判定処理部304は、外部宛パケット及び内部宛パケットに基づいて随時更新されるセッション状態情報に基づき、内部宛パケットの転送の可否を判定することができる。そのため、本実施形態によれば、内部宛パケットの転送の可否を、適切かつ柔軟に判定することができる。
【0045】
尚、転送判定部310、転送処理部306、及び状態更新部308のそれぞれは、ハードウェアで構成された論理回路によりそれぞれ動作してもよく、通信処理デバイス230の外部か提供される中継プログラム等のプログラムに従って、それぞれ動作してもよい。また、通信処理デバイス230は、一の半導体チップにより形成されたモノリシックLSIであるのが好ましい。この場合、通信処理デバイス230を低いコストで提供することができる。
【0046】
図4は、本実施形態に係る連想記憶メモリ234の一例を、表形式により示す。連想記憶メモリ234は、異なるメモリアドレスに格納される複数のデータそれぞれの所定のビットフィールドに、種類識別情報、タイマ処理情報、タイマ情報、及び格納情報を格納する。
【0047】
種類識別情報は、当該メモリアドレスに格納された格納情報の種類を識別する情報であり、当該格納情報が、セッション管理情報(S、値“10”)、通信ポート管理情報(P、値“11”)、及び無効な情報(E、値“00”)のいずれであるかを示す。
【0048】
タイマ処理情報は、そのメモリアドレスに格納された格納情報に対する有効期間の有無を示す消去フラグ情報である。タイマ処理情報は、格納情報が、有効期間が経過した場合に無効とされるべき一時的な格納情報(値01)、又は、有効期間が設けられず、時間の経過により無効とされない固定的な格納情報(値00)のいずれであるかを示す。これにより、連想記憶メモリ234は、セッション管理情報の消去の可否を示す消去フラグ情報を、セッション管理情報の一部として格納する。消去フラグ情報は、一時的な格納情報であるセッション管理情報に対して、消去が可能であることを示す値01を有する。
【0049】
ここで、セッション管理情報が一時的な格納情報である場合、このセッション管理情報に対応する外部宛パケット又は内部宛パケットを、転送処理部306が予め定められた期間転送しなければ、セッション管理部302は、このセッション管理情報を消去する。これにより、セッション管理部302は、セッション管理情報を、セッションの開始及び終了に応じて、動的に管理することができる。
【0050】
一方、セッション管理情報が固定的な格納情報である場合、このセッション管理情報に対応する外部宛パケット又は内部宛パケットを、転送処理部306が予め定められた期間転送しない場合においても、セッション管理部302は、このセッション管理情報を消去しない。これにより、セッション管理部302は、予め設定された所定のセッションを、静的に管理することができる。
【0051】
タイマ情報は、当該メモリアドレスに格納される格納情報の有効期間を示す情報であり、タイマ処理情報が“01”の場合に有効である。ここで、タイマ情報は、当該格納情報が格納された日及び/又は時刻を識別する情報であってもよく、当該格納情報が無効とされるまでの期間を示す情報であってもよい。本実施形態において、セッション管理部302は、タイマ情報に基づき、外部宛パケット又は内部宛パケットが転送されない期間を監視する。
【0052】
格納情報は、種類識別情報により指定される、セッション管理情報又は通信ポート管理情報を格納する。すなわち、連想記憶メモリ234は、各メモリアドレス毎に、種類識別情報“10”とセッション管理情報とを含むセッション管理データ、種類識別情報“11”と通信ポート管理情報とを含む通信ポート管理データ、又は、種類識別情報“00”と無効な情報とを含む無効なデータのいずれかを格納する。
【0053】
セッション管理情報は、端末160と、サーバ120との間におけるセッションを特定する情報を、ネットワーク層プロトコル、トランスポート層プロトコル、リモートポート番号、ローカルポート番号、リモートアドレス、及びローカルアドレスを含む情報として格納する。ネットワーク層プロトコルフィールドは、例えばIP、IPX(登録商標)、Apple Talk(登録商標)、PPPoE、ARP、RARP等の、OSI参照モデルにおけるネットワーク層(第3層)に分類される通信プロトコルを示す。トランスポート層プロトコルフィールドは、例えばIPinIP、IPsec、ICMP、UDP、TCP等の、OSI参照モデルにおけるトランスポート層(第4層)以上の階層に分類される通信プロトコルを示す。
【0054】
リモートポート番号フィールド及びリモートアドレスフィールドは、端末160a〜b等のLAN側の通信機器と通信する、例えば120a〜b等のWAN側の通信機器が、通信に用いるポート番号及びネットワークアドレスを示す。ローカルポート番号フィールド及びリモートアドレスフィールドは、端末160a〜b等のLAN側の通信機器が、通信に用いるポート番号及びネットワークアドレスを示す。ここで、ポート番号は、アプリケーションプログラム又はサービス等を識別するために用いられてよく、例えばTCPプロトコルにおけるTCPヘッダに含まれる送信元ポート番号又は宛先ポート番号に対応してよい。また、ネットワークアドレスは、例えばIPプロトコルにおけるIPアドレス等の、通信機器をネットワーク上で識別するために用いられる識別情報であってよい。
【0055】
ここで、本実施形態において、連想記憶メモリ234は、受け取った検索キーに対応する格納情報が格納されているメモリアドレスを出力する。連想記憶メモリ234は、例えば、ネットワーク層プロトコル、トランスポート層プロトコル、リモートポート番号、ローカルポート番号、リモートアドレス、及びローカルアドレスを含む検索キーに応じて、この検索キーに対応するセッション管理情報が格納されているメモリアドレスを、セッション状態メモリ236に格納されたセッション状態情報へのポインタとして出力する。これにより、連想記憶メモリ234は、セッション状態情報へのポインタを、セッション管理情報の一部として格納する。尚、他の例において、連想記憶メモリ234は、セッション状態情報へのポインタを、セッション管理情報における所定のビットフィールドに格納してもよい。
【0056】
セッション管理部302は、内部宛パケットのヘッダ情報に基づき、これらの検索キーを連想記憶メモリ234に与えることにより、この内部宛パケットに対応するセッション状態情報へのポインタを取得する。そして、セッション管理部302は、受け取ったポインタに基づき、内部宛パケットに対応するセッションの状態を示すセッション状態情報を取得する。
【0057】
一方、通信ポート管理情報は、中継装置150が通信パケットを転送すべき宛先通信機器に対応付けられた通信ポート及び通信パケットの宛先MACアドレスとすべきMACアドレスを、宛先アドレス、通信ポート番号、MACアドレスを含む情報として格納する。宛先アドレスフィールドは、中継装置150が通信パケットを転送すべき宛先通信機器のネットワークアドレスを示す。通信ポート番号フィールドは、中継装置150が当該宛先通信機器に対して通信パケットを転送する場合に、当該通信パケットを送信すべき通信ポートの番号を示す。MACアドレスフィールドは、中継装置150が当該通信パケットを転送する場合に、当該通信パケットの宛先MACアドレスとすべきMACアドレスを示す。
【0058】
以上に示した通り、本実施形態に係る中継装置150によれば、セッション管理情報及び通信ポート管理情報の双方を連想記憶メモリ234に格納することにより、それぞれを別個に連想記憶メモリに格納する場合と比較し、ハードウェア量及びコストを削減することができる。
【0059】
図5は、本実施形態に係るセッション状態メモリ236の一例を、表形式により示す。セッション状態メモリ236は、連想記憶メモリ234に格納されたセッション管理情報に対応して、このセッション管理情報により指定される送信元通信機器及び宛先通信機器間の通信におけるセッションの状態を含むセッション状態情報を格納する。ここで、セッション状態メモリ236は、連想記憶メモリ234が出力する、セッション状態情報へのポインタによって指定されるメモリアドレスに、対応するセッション状態情報を格納する。例えば、セッション状態メモリ236は、連想記憶メモリ234がポインタとして出力するメモリアドレスと同一のメモリアドレスに、対応するセッション状態情報を格納する。
【0060】
尚、セッション状態メモリ236は、それぞれ異なる通信プロトコルに基づく複数のセッションの状態をそれぞれ示す複数のセッション状態情報を格納してよい。セッション状態メモリ236は、例えば、TCP等のコネクション型のプロトコルに基づくセッションの状態を示すセッション状態情報と、UDP等のコネクションレス型のプロトコルに基づくセッションの状態を示すセッション状態情報とを格納してよい。
【0061】
また、セッション状態メモリ236は、それぞれのセッションが対応する通信プロトコルに応じて、それぞれ異なるフィールドを含むセッション状態情報を格納してよい。例えば、セッション状態メモリ236は、UDPに対応するセッション状態情報として、TCPに対応するセッション状態情報が含むフィールドの一部に対応する情報を格納してよい。
【0062】
本実施形態において、セッション状態メモリ236は、例えば、TCPに対応するセッション状態情報として、セッション状態情報は、有効フラグ、制御情報、セッション通信状態、ウィンドウサイズ、ACK番号、シーケンス番号、及び中継許可カウントの各フィールドを含む情報を格納する。有効フラグフィールドは、当該セッション状態情報の有効(値“1”)又は無効(値“0”)を示す。制御情報フィールドは、例えば、WAN側からLAN側への通信パケットの中継の許可又は禁止、LAN側からWAN側への通信パケットの中継の許可又は禁止、通信パケットに対してPPPoEプロトコルを適用するかどうか、通信パケットに対して帯域幅制限を設定するかどうか、通信パケットに対する通信処理の一部をCPU200に行わせるかどうか、通信パケットを暗号化するかどうか等の、通信パケットに対する通信処理の内容を示す。
【0063】
例えば、セッション状態メモリ236は、制御情報フィールドに、外部宛パケット又は内部宛パケットに対してCPU200が行うべき処理を示す処理情報を格納する。この場合、CPU200は、この処理情報に従って外部宛パケット又は内部宛パケットを処理した結果を判定処理部304に与える。判定処理部304は、この結果に基づき、内部宛パケットの転送を許可するか否かを判定してよい。
【0064】
セッション通信状態フィールドは、送信元通信機器及び宛先通信機器間の通信におけるセッションが、通信プロトコルにより定義されるいずれの状態にあるかを示す。例えば、メモリアドレス0におけるセッション通信状態“ESTBLSHD”は、TCPプロトコルにより定義されるTCP状態遷移において、送信元通信機器及び宛先通信機器間でコネクションが確立している状態を示す。また、メモリアドレス1におけるセッション通信状態“SYN_SENT_1”は、TCP状態遷移において、端末160がコネクションを確立するために送信した、SYNフラグが“1”である通信パケットを中継装置150が受信したことを示す。
【0065】
ウィンドウサイズフィールド及びACK番号フィールドは、LAN側からWAN側に対して送信された、TCPプロトコルに基づくTCP通信パケットによって、宛先通信機器に通知されたウィンドウサイズ及び確認応答番号(ACK番号)を示す。すなわち、セッション状態メモリ236は、外部宛パケットのヘッダにおける、ウィンドウフィールドの値を示すウィンドウ情報、及び確認応答番号フィールドの値を示す確認応答番号情報を、セッション状態情報におけるウィンドウサイズフィールド及びACK番号フィールドに格納する。
【0066】
シーケンス番号フィールドは、WAN側からLAN側に対して送信された、TCPプロトコルに基づくTCP通信パケットによって、宛先通信機器に通知されたシーケンス番号を示す。すなわち、セッション状態メモリ236は、内部宛パケットのヘッダにおけるシーケンス番号フィールドの値を示すシーケンス番号情報を、セッション状態情報におけるシーケンス番号フィールドに格納する。
【0067】
また、中継許可カウントフィールドは、セッション状態情報におけるシーケンス番号フィールドと同一シーケンス番号を有する通信パケットを中継した回数を示す。すなわち、セッション状態メモリ236は、シーケンス番号情報の示す値とシーケンス番号フィールドの値が同一である内部宛パケットを転送装置が転送した回数を示す同一シーケンス番号回数情報を、セッション状態情報における中継許可カウントフィールドに格納する。
【0068】
以上において、セッション管理情報は、セッション管理情報を検索するために用いられる検索キーの少なくとも一部に対応する検索対象ビットフィールドであるネットワーク層プロトコルフィールド、トランスポート層プロトコルフィールド、リモートポート番号フィールド、ローカルポート番号フィールド、リモートアドレスフィールド、及びローカルアドレスフィールドの1以上が、任意の値と一致すべきことを示す値である任意指定値“Any”を含んでもよい。ここで、“Any”は、当該フィールドの値として通常用いられない値、例えば“all
1”等の値であってよい。
【0069】
図6は、状態更新部308の動作の一例を説明する図である。本実施形態において、中継装置150は、内部宛パケット及び外部宛パケットとして、例えば、TCPに基づくTCPパケットを転送する。この場合、セッション状態メモリ236は、サーバ120と端末160との間のTCPセッションの状態を示すTCP状態をセッション状態フィールドに格納する。
【0070】
セッション状態メモリ236は、TCP状態として、CLOSED、SYN_RCVD_1、SYN_RCVD_2、SYN_SENT_1、SYN_SENT_2、ESTBLSHD、FIN_WAIT、CLOSING、TIME_WAIT、CLOSE_WAIT、又はLAST_ACKのいずれかの状態を格納する。ここで、中継装置150が、内部宛パケット又は外部宛パケットを転送した場合、状態更新部308は、この内部宛パケット又は外部宛パケットに対応するTCPセッションの状態を示すTCP状態を更新する。
【0071】
本実施形態において、状態更新部308は、外部送信パケット及び内部送信パケットのそれぞれのヘッダにおけるTCPフラグに基づき、TCP状態を更新する。これにより、セッション状態メモリ236は、サーバ120におけるTCPセッションの状態と、端末160におけるTCPセッションの状態とを示すTCP状態を格納する。また、判定処理部304は、内部宛パケットのヘッダにおけるTCPフラグ、及びTCP状態に基づき、内部宛パケットの転送を許可するか否かを判定する。
【0072】
TCPセッションが開始されていない場合、セッション状態メモリ236は、TCP状態として、CLOSEDを格納する。ここで、中継装置150が、SYNフラグを含む内部宛パケットを転送した場合、状態更新部308は、TCP状態を、SYN_RCVD_1に更新する。また、中継装置150が更にSYNフラグとACKフラグとを含む外部宛パケット、及びACKフラグを含む内部宛パケットを転送した場合、状態更新部308は、TCP状態を、SYN_RCVD_2、及びESTBLSHDのそれぞれに順次更新する。
【0073】
また、TCP状態がCLOSEDである場合に、中継装置150が、SYNフラグを含む外部宛パケット、SYNフラグとACKフラグとを含む内部宛パケット、ACKフラグを含む外部宛パケットを転送した場合、状態更新部308は、TCP状態を、SYN_SENT_1、SYN_SENT_2、及びESTBLSHDのそれぞれに順次更新する。
【0074】
そして、TCP状態がESTBLSHDである場合に、中継装置150が、FINフラグを含む外部宛パケット、FINフラグとを含む内部宛パケット、ACKフラグを含む内部宛パケットを転送した場合、状態更新部308は、TCP状態を、FIN_WAIT、CLOSING、及びTIME_WAITのそれぞれに順次更新する。この場合、状態更新部308は、TCP状態を、所定の時間の経過に応じてTIME_WAITから、CLOSEDに更新する。
【0075】
また、TCP状態がESTBLSHDである場合に、中継装置150が、FINフラグを含む内部宛パケット、FINフラグとを含む外部宛パケット、ACKフラグを含む内部宛パケットを転送した場合、状態更新部308は、TCP状態を、CLOSE_WAIT、LAST_ACK、及びCLOSEDのそれぞれに順次更新する。本実施形態によれば、状態更新部308が内部宛パケット及び外部宛パケットのそれぞれに応じてTCP状態を更新することにより、内部宛パケットの転送の可否を適切に判定することができる。尚、SYN、ACK、又はFINフラグを含む内部宛パケット又は外部宛パケットは、それぞれ、SYN、ACK、又はFINフラグが“1”である内部宛パケット又は外部宛パケットである。
【0076】
図7は、判定処理部304の動作を説明する図である。本実施形態において、判定処理部304は、セッション状態メモリ236に格納されたTCP状態、ウィンドウ情報(RWND)、確認応答番号情報(RNXT)、シーケンス番号情報(LSEQ)、及び同一シーケンス番号回数情報(LSCNT)に基づき、内部宛パケットの転送の可否を判定する。
【0077】
例えば、TCP状態が、SYN_SENT_1である場合、判定処理部304は、SYNフラグとACKフラグとを含む内部宛パケット、又はRSTフラグを含む内部宛パケットに対してのみ、転送を許可する。TCP状態が、SYN_SENT_2又はSYN_RCVD_2である場合、判定処理部304は、ACKフラグ又はRSTフラグを含む内部宛パケットに対してのみ、転送を許可する。TCP状態が、SYN_RCVD_1である場合、判定処理部304は、SYNフラグを含む内部宛パケットに対してのみ、転送を許可する。
【0078】
また、TCP状態が、ESTBLSHD、FIN_WAIT、又はCLOSINGである場合、判定処理部304は、SYNフラグを含まない内部宛パケットに対してのみ、転送を許可する。TCP状態が、CLOSE_WAIT、又はLAST_ACKである場合、判定処理部304は、SYNフラグ及びRSTフラグのいずれも含まない内部宛パケットに対してのみ、転送を許可する。
【0079】
更には、TCP状態が、SYN_SENT_1である場合、判定処理部304は、内部宛パケットヘッダにおけるシーケンス番号フィールドの値(SEQ#)によらずに、転送の可否を判定する。また、TCP状態が、SYN_SENT_2、SYN_RCVD_2、CLOSE_WAIT、又はLAST_ACKである場合、判定処理部304は、SEQ#=RNXTの内部宛パケットに対してのみ、転送を許可する。TCP状態が、SYN_RCVD_1又はCLOSINGである場合、判定処理部304は、SEQ#=LSEQであり、かつLSCNTが所定の上限値の一例である4より小さい内部宛パケットに対してのみ、転送を許可する。
【0080】
すなわち、RCNTが予め定められた回数に達した後において、#SEQ=LSEQである場合、判定処理部304は、その内部宛パケットの転送を許可しない。この場合、端末160等のLAN内の通信装置を、例えばDos攻撃等の、大量のデータや不正パケットを送りつける不正なアクセス等から保護することができる。
【0081】
また、TCP状態が、ESTBLSHD又はFIN_WAITである場合、判定処理部304は、RNXT≦SEQ#≦RNXT+RWNDである内部宛パケットに対してのみ、転送を許可する。但し、ここで、内部宛パケットがTCPデータを含み、かつ、SEQ#=LSEQである場合は、判定処理部304は、LSCNT<4の場合にのみ、この内部宛パケットの転送を許可する。本実施形態によれば、内部宛パケットの転送の可否を適切に判定することができる。また、これにより、端末160等を、LANの外部からの不正なアクセスから保護することができる。
【0082】
図8は、通信処理デバイス230の動作の一例を説明するフローチャートである。中継装置150が受信した通信パケットが外部宛パケットであり(S102)、この外部宛パケットに対応するセッション管理情報が連想記憶メモリ234に格納されている場合(S104)、転送処理部306は、この外部宛パケットをサーバ120に転送し(S106)、状態更新部308は、この外部宛パケットにヘッダに基づき、セッション状態情報を更新する(S108)。
【0083】
一方、外部宛パケットに対応するセッション管理情報が連想記憶メモリ234に格納されていない場合(S104)、この外部宛パケットが、SYNフラグを含む、サーバ120との間のセッションの確立を求めるパケットであれば(S110)、セッション管理部302は、この外部宛パケットに対応するセッション管理情報を、連想記憶メモリ234に新たに格納させ(S112)、S106に進む。尚、S110において、外部宛パケットがSYNフラグを含まない場合、判定処理部304は、この外部宛パケットを破棄する(S114)。
【0084】
また、中継装置150が受信した通信パケットが内部宛パケットであり(S102)、この内部宛パケットに対応するセッション管理情報が連想記憶メモリ234に格納されている場合(S116)、判定処理部304は、この内部宛パケットの転送を許可するか否かを判定する(S118)。
【0085】
そして、転送が許可された場合、判定処理部304は、この内部宛パケットを端末160に転送し(S106)、状態更新部308は、この内部宛パケットのヘッダに基づき、セッション状態情報を更新する(S108)。
【0086】
この場合、状態更新部308は、例えば、セッション状態メモリ236に格納された、このセッションに対応するシーケンス番号情報を、この内部宛パケットのヘッダにおけるシーケンス番号フィールドの値を示す情報に更新する。
【0087】
ここで、この内部宛パケットに対応するセッション管理情報が連想記憶メモリ234に格納されていない場合(S116)、判定処理部304は、この内部宛パケットの転送を許可せず、この内部宛パケットを破棄する(S114)。また、S118において、転送が許可されない場合も、判定処理部304は、この内部宛パケットを破棄する(S118)。本実施形態によれば、内部送信パケットを転送するか否かを適切に判定することができる。
【0088】
以上、本発明を実施形態を用いて説明したが、本発明の技術的範囲は上記実施形態に記載の範囲には限定されない。上記実施形態に、多様な変更または改良を加えることができる。そのような変更または改良を加えた形態も本発明の技術的範囲に含まれ得ることが、特許請求の範囲の記載から明らかである。
【0089】
上記説明から明らかなように、本発明によれば通信パケットを適切に転送することができる。
【図面の簡単な説明】
【図1】本発明の実施形態に係る通信システム100を示す図である。
【図2】本発明の実施形態に係る中継装置150の構成を示す図である。
【図3】本発明の実施形態に係る通信処理デバイス230の構成を示す図である。
【図4】本発明の実施形態に係る連想記憶メモリ234の一例を、表形式により示す図である。
【図5】本発明の実施形態に係るセッション状態メモリ236の一例を、表形式により示す図である。
【図6】状態更新部308の動作を説明する図である。
【図7】判定処理部304の動作を説明する図である。
【図8】通信処理デバイス230の動作の一例を説明するフローチャートである。
【符号の説明】
100・・・通信システム、120a〜b・・・サーバ、130・・・ISP中継装置、140・・・外部ネットワーク、150・・・中継装置、160a〜b・・・端末、200・・・CPU、210・・・ROM、220・・・RAM、230・・・通信処理デバイス、232a〜d・・・物理層インターフェイス、234・・・連想記憶メモリ、236・・・セッション状態メモリ、240・・・ハードディスクドライブ、250・・・フレキシブルディスクドライブ、260・・・CD−ROMドライブ、270・・・ブリッジ、272・・・無線LANインターフェイス、274・・・シリアルインターフェイス、276・・・パラレルインターフェイス、280・・・CPUバス、282・・・I/Oバス、290・・・フレキシブルディスク、295・・・CD−ROM、302・・・セッション管理部、304・・・判定処理部、306・・・転送処理部、308・・・状態更新部、310・・・転送判定部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a transfer device and a transfer method. In particular, the present invention relates to a transfer device for transferring a communication packet.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, there has been known a transfer device that restricts transfer of a packet from a device other than a permitted IP address by designating, for example, an IP address to which communication is permitted. In such a transfer device, an IP address that permits communication is set in advance by a user of the transfer device. In addition, conventionally, a transfer device that determines whether or not a setting condition is satisfied when a session is set up is known (for example, refer to Patent Literature 1).
[0003]
[Patent Document 1]
JP-A-2000-349851 (
[0004]
[Problems to be solved by the invention]
However, in the conventional transfer device, an illegal packet may be transferred, for example, when a third party impersonates the IP address. Also, after a session has been properly established, unauthorized access may have occurred. Therefore, conventionally, it has been difficult to appropriately transfer a packet.
[0005]
Therefore, an object of the present invention is to provide a transfer device and a transfer method that can solve the above-described problems. This object is achieved by a combination of features described in the independent claims. The dependent claims define further advantageous embodiments of the present invention.
[0006]
[Means for Solving the Problems]
That is, according to the first embodiment of the present invention, a transfer device for transferring a communication packet in communication between an internal communication device provided in a predetermined network and an external communication device provided outside the network And a state storage unit for storing a communication state indicating a state of communication in the internal communication device, and a communication state based on a header of an externally addressed packet which is a communication packet transmitted from the internal communication device to the external communication device. A state updating unit for updating, a transfer determining unit for determining whether to permit transfer of an internally addressed packet, which is a communication packet transmitted from the external communication device to the internal communication device, based on a communication state; A transfer processing unit configured to transfer the internally addressed packet to the internal communication device when the unit determines that the transfer of the internally addressed packet is permitted.
[0007]
Further, the internal communication device, further includes a session management information storage unit that stores session management information that specifies a session between the external communication device, the state storage unit stores a communication state corresponding to the session management information, The transfer determination unit manages the session management information, and, based on the session management information, a session management unit that identifies a session corresponding to the internally addressed packet, and a communication state corresponding to the session identified by the session management unit, A determination processing unit that determines whether to permit the transfer of the internally addressed packet.
[0008]
Further, the session management information storage unit is an associative storage device that stores a pointer to a communication state corresponding to the session as at least a part of the session management information. Based on the header information, by giving a search key including at least part of the IP address and port number of the internal communication device and the IP address and port number of the external communication device, a pointer to the communication state is obtained, and the determination process is performed. The unit may acquire a communication state corresponding to the internally addressed packet from the state storage unit based on the pointer received from the session management unit.
[0009]
If the session management information corresponding to the packet addressed to the outside is not stored in the session management information storage unit, and the packet addressed to the outside is a packet for requesting the establishment of a session with the external communication device, the session The management unit may newly store the session management information corresponding to the packet addressed to the outside in the session management information storage unit. If the session management information corresponding to the packet destined for the inside is not stored in the session management information storage unit, the determination processing unit does not have to permit the transfer of the packet destined for the inside.
[0010]
Further, the transfer processing unit further transfers the externally-addressed packet to the external communication device, and when the transfer processing unit does not transfer the externally-addressed packet or the internal-addressed packet corresponding to the session management information for a predetermined period, the session management unit. May delete the session management information. Further, the session management information storage unit stores, as at least a part of the session management information, erasure flag information indicating whether or not the session management information can be erased, and transfers an externally addressed packet or an internally addressed packet corresponding to the session management information. When the processing unit does not perform the transfer for a predetermined period and the erasure flag information corresponding to the session management information indicates that erasure is possible, the session management unit may erase the session management information.
[0011]
The packet processing unit further includes a packet processing unit that processes the packet addressed to the outside or the packet addressed to the inside, and the state storage unit performs a process to be performed by the packet processing unit on the packet addressed to the outside or the packet addressed to the inside as at least a part of the communication state. The transfer determination unit may store the processing information indicated by the packet and process the externally-addressed packet or the internally-addressed packet according to the processing information by the packet processing unit, and the transfer determination unit may determine whether to permit the transfer of the internally-addressed packet.
[0012]
Further, the transfer device transfers a TCP packet based on TCP (Transport Control Protocol) as an internal-addressed packet and an external-addressed packet, and the status storage unit stores a TCP status indicating a status of a TCP session in the internal communication device as a communication status. The status update unit updates the TCP status based on the TCP flag in the header of the externally-addressed packet, and the transfer determination unit updates the TCP status based on the TCP flag and the TCP status in the header of the internal-addressed packet. It may be determined whether or not the transfer of the packet addressed to the inside is permitted.
[0013]
The status storage unit stores acknowledgment number information indicating the value of the acknowledgment number field in the header of the packet addressed to the outside as at least a part of the communication state, and the transfer judgment unit determines the sequence number in the header of the packet addressed to the inside. Based on the value of the field and the acknowledgment number information, it may be determined whether to permit the transfer of the packet addressed to the inside. The state storage unit further stores window information indicating a value of a window field in a header of the packet destined to the outside as at least a part of the communication state, and the transfer determination unit determines a value of the sequence number field in the header of the packet destined to the inside. It may be determined based on the acknowledgment number information and the window information whether to permit the transfer of the packet addressed to the inside.
[0014]
The state storage unit stores information based on the header of the internal packet as at least a part of the communication state, and the state update unit further updates the communication state based on the header of the internal packet, and determines the transfer. The unit may determine, based on the communication state, whether to permit the transfer of the internally addressed packet. The state storage unit stores, as the TCP state, information further indicating the state of the TCP session in the external communication device, and the state update unit further updates the TCP state based on the TCP flag in the header of the packet addressed to the inside. The transfer determination unit may determine whether to permit the transfer of the packet addressed to the inside based on the TCP state.
[0015]
Further, the state storage unit stores, as at least a part of the communication state, sequence number information indicating a value of a sequence number field in a header of the internal packet, and when the transfer of the internal packet is permitted, the state update unit The sequence number information is updated to information indicating the value of the sequence number field in the header of the packet destined for the internal packet, and the transfer determination unit determines whether to permit the transfer of the packet destined for the internal packet based on the sequence number information. May be. Further, the state storage unit further stores the same sequence number count information indicating the number of times the transfer device has transferred the internal destination packet having the same value of the sequence number information and the value of the sequence number field as the communication state. If the value of the sequence number field in the packet addressed to the internal is equal to the value indicated by the sequence number information after the number of times indicated by the same sequence number frequency information reaches the predetermined number, It is not necessary to permit the transfer of packets addressed to the inside.
[0016]
According to a first aspect of the present invention, there is provided a transfer method for transferring a communication packet in communication between an internal communication device provided in a predetermined network and an external communication device provided outside the network. The communication state is updated based on a state storing step of storing a communication state indicating a state of communication in the internal communication apparatus and a header of an externally addressed packet which is a communication packet transmitted from the internal communication apparatus to the external communication apparatus. A state update step, a transfer determination step of determining whether to permit transfer of an internal destination packet, which is a communication packet transmitted from the external communication device to the internal communication device, based on the communication state; and A transfer processing step of transferring the packet destined for the inside to the internal communication device when it is determined that the transfer of the packet destined for the inside is permitted.
[0017]
Note that the above summary of the present invention does not list all of the necessary features of the present invention, and a sub-combination of these features may also be an invention.
[0018]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the present invention will be described through embodiments of the invention. However, the embodiments do not limit the invention according to the claims, and all combinations of the features described in the embodiments are solutions of the invention. It is not always necessary for the means.
[0019]
FIG. 1 shows a
[0020]
The
[0021]
The
[0022]
The
[0023]
Here, the
[0024]
The
[0025]
In the present embodiment, the
[0026]
FIG. 2 shows a configuration of the
[0027]
The
[0028]
A program such as a relay program provided to the
[0029]
The
[0030]
In the communication processing described above, the
[0031]
The
[0032]
The
[0033]
The
[0034]
The
[0035]
As described above, the
[0036]
FIG. 3 shows a configuration of the
[0037]
The
[0038]
The
[0039]
Here, in the present embodiment, the content
[0040]
When a session is started, the
[0041]
The
[0042]
Note that the
[0043]
When the
[0044]
The
[0045]
Note that each of the
[0046]
FIG. 4 shows an example of the
[0047]
The type identification information is information for identifying the type of storage information stored in the memory address. The storage information includes session management information (S, value “10”), communication port management information (P, value “11”). ") Or invalid information (E, value" 00 ").
[0048]
The timer processing information is erasure flag information indicating whether or not there is a valid period for the storage information stored at the memory address. The timer processing information includes temporary storage information (value 01) that is to be invalidated when the validity period elapses, or fixed storage information that has no validity period and is not invalidated by the elapse of time. Indicates which of the storage information (value 00). As a result, the
[0049]
Here, when the session management information is temporary storage information, if the
[0050]
On the other hand, when the session management information is fixed storage information, even if the
[0051]
The timer information is information indicating the validity period of the storage information stored in the memory address, and is valid when the timer processing information is “01”. Here, the timer information may be information for identifying the date and / or time when the storage information is stored, or may be information indicating a period until the storage information is invalidated. In the present embodiment, based on the timer information, the
[0052]
The storage information stores session management information or communication port management information specified by the type identification information. That is, the
[0053]
The session management information stores information for specifying a session between the terminal 160 and the server 120 as information including a network layer protocol, a transport layer protocol, a remote port number, a local port number, a remote address, and a local address. I do. The network layer protocol field indicates a communication protocol classified into a network layer (third layer) in the OSI reference model, such as IP, IPX (registered trademark), Apple Talk (registered trademark), PPPoE, ARP, and RARP. The transport layer protocol field indicates a communication protocol classified into a layer above the transport layer (the fourth layer) in the OSI reference model, such as IPinIP, IPsec, ICMP, UDP, and TCP.
[0054]
The remote port number field and the remote address field indicate a port number and a network address used for communication by the WAN-side communication device such as 120a-b, which communicates with the LAN-side communication device such as the
[0055]
Here, in the present embodiment, the
[0056]
The
[0057]
On the other hand, the communication port management information includes the communication port associated with the destination communication device to which the
[0058]
As described above, according to the
[0059]
FIG. 5 shows an example of the
[0060]
The
[0061]
In addition, the
[0062]
In the present embodiment, the
[0063]
For example, the
[0064]
The session communication status field indicates in which state the session in the communication between the source communication device and the destination communication device is defined by the communication protocol. For example, the session communication state “ESTBLSHD” at the
[0065]
The window size field and the ACK number field indicate a window size and an acknowledgment number (ACK number) notified to the destination communication device by a TCP communication packet based on the TCP protocol transmitted from the LAN side to the WAN side. That is, the
[0066]
The sequence number field indicates a sequence number notified to the destination communication device by a TCP communication packet based on the TCP protocol transmitted from the WAN side to the LAN side. That is, the
[0067]
The relay permission count field indicates the number of times a communication packet having the same sequence number as the sequence number field in the session state information has been relayed. That is, the
[0068]
In the above, the session management information is a network layer protocol field, a transport layer protocol field, a remote port number field, a local bit field, which is a search target bit field corresponding to at least a part of a search key used for searching the session management information. One or more of the port number field, the remote address field, and the local address field may include an optional value “Any” that is a value indicating that it should match an arbitrary value. Here, “Any” is a value that is not normally used as a value of the field, for example, “all”
It may be a value such as 1 ".
[0069]
FIG. 6 is a diagram illustrating an example of the operation of the
[0070]
The
[0071]
In the present embodiment, the
[0072]
If the TCP session has not been started, the
[0073]
When the
[0074]
When the TCP state is ESTBLSHD and the
[0075]
When the TCP state is ESTBLSHD and the
[0076]
FIG. 7 is a diagram illustrating the operation of the
[0077]
For example, when the TCP state is SYN_SENT_1, the
[0078]
When the TCP state is ESTBLSHD, FIN_WAIT, or CLOSING, the
[0079]
Further, when the TCP state is SYN_SENT_1, the
[0080]
That is, after #CNT reaches a predetermined number, if # SEQ = LSEQ, the
[0081]
Further, when the TCP state is ESTBLSHD or FIN_WAIT, the
[0082]
FIG. 8 is a flowchart illustrating an example of the operation of the
[0083]
On the other hand, when the session management information corresponding to the packet addressed to the outside is not stored in the associative memory 234 (S104), the packet addressed to the outside is a packet including a SYN flag and requesting the establishment of a session with the server 120. If there is (S110), the
[0084]
If the communication packet received by the
[0085]
Then, when the transfer is permitted, the
[0086]
In this case, the
[0087]
Here, when the session management information corresponding to the internal address packet is not stored in the associative memory 234 (S116), the
[0088]
As described above, the present invention has been described using the embodiment. However, the technical scope of the present invention is not limited to the scope described in the embodiment. Various changes or improvements can be added to the above embodiment. It is apparent from the description of the appended claims that embodiments with such changes or improvements can be included in the technical scope of the present invention.
[0089]
As is apparent from the above description, according to the present invention, communication packets can be appropriately transferred.
[Brief description of the drawings]
FIG. 1 is a diagram showing a
FIG. 2 is a diagram illustrating a configuration of a
FIG. 3 is a diagram showing a configuration of a
FIG. 4 is a diagram showing an example of a content
FIG. 5 is a diagram showing an example of a
FIG. 6 is a diagram illustrating an operation of a
FIG. 7 is a diagram illustrating an operation of a
FIG. 8 is a flowchart illustrating an example of an operation of the
[Explanation of symbols]
100 communication system, 120a-b server, 130 ISP relay device, 140 external network, 150 relay device, 160a-b terminal, 200 CPU , 210 ... ROM, 220 ... RAM, 230 ... Communication processing device, 232a-d ... Physical layer interface, 234 ... Associative memory, 236 ... Session state memory, 240 ... Hard disk drive, 250 Flexible disk drive, 260 CD-ROM drive, 270 Bridge, 272 Wireless LAN interface, 274 Serial interface, 276 Parallel interface, 280 ... CPU bus, 282 ... I / O bus, 290 ... Flexible Bull disk, 295 ... CD-ROM, 302 ... session management section, 304 ... determining unit, 306 ... transfer processing section, 308 ... state update unit, 310 ... transfer determination unit
Claims (16)
前記内部通信装置における前記通信の状態を示す通信状態を格納する状態格納部と、
前記内部通信装置が前記外部通信装置に対して送信する通信パケットである外部宛パケットのヘッダに基づき、前記通信状態を更新する状態更新部と、
前記外部通信装置が前記内部通信装置に対して送信する通信パケットである内部宛パケットの転送を許可するか否かを、前記通信状態に基づいて判定する転送判定部と、
前記転送判定部が前記内部宛パケットの転送を許可すると判定した場合に、前記内部宛パケットを前記内部通信装置に転送する転送処理部と
を備えることを特徴とする転送装置。An internal communication device provided in a predetermined network, and a transfer device for transferring a communication packet in communication between an external communication device provided outside the network,
A state storage unit that stores a communication state indicating the state of the communication in the internal communication device;
A state updating unit that updates the communication state based on a header of an externally addressed packet that is a communication packet that the internal communication device transmits to the external communication device,
A transfer determination unit that determines whether to permit transfer of an internal-addressed packet, which is a communication packet transmitted by the external communication device to the internal communication device, based on the communication state,
A transfer device, comprising: a transfer processing unit that transfers the internal-addressed packet to the internal communication device when the transfer determination unit determines that the transfer of the internal-addressed packet is permitted.
前記状態格納部は、前記セッション管理情報に対応する前記通信状態を格納し、
前記転送判定部は、
前記セッション管理情報を管理し、かつ、前記セッション管理情報に基づき、前記内部宛パケットに対応する前記セッションを識別するセッション管理部と、前記セッション管理部が識別した前記セッションに対応する前記通信状態に基づき、前記内部宛パケットの転送を許可するか否かを判定する判定処理部と
を有することを特徴とする請求項1に記載の転送装置。The internal communication device, further comprising a session management information storage unit that stores session management information specifying a session between the external communication device,
The state storage unit stores the communication state corresponding to the session management information,
The transfer determination unit,
Managing the session management information, and, based on the session management information, a session management unit that identifies the session corresponding to the internally addressed packet; and a communication state corresponding to the session identified by the session management unit. The transfer device according to claim 1, further comprising: a determination processing unit that determines whether to permit the transfer of the internal destination packet based on the determination.
前記セッション管理部は、前記連想記憶装置に、前記内部宛パケットのヘッダ情報に基づき、前記内部通信装置のIPアドレス及びポート番号と、前記外部通信装置のIPアドレス及びポート番号とを少なくとも一部として含む検索キーを与えることにより、前記通信状態へのポインタを取得し、
前記判定処理部は、前記セッション管理部から受け取る前記ポインタに基づき、前記状態格納部から、前記内部宛パケットに対応する前記通信状態を取得することを特徴とする請求項2に記載の転送装置。The session management information storage unit is a content addressable storage device that stores a pointer to the communication state corresponding to the session as at least a part of the session management information,
The session management unit stores the IP address and port number of the internal communication device and the IP address and port number of the external communication device in the associative storage device based at least on the header information of the internally addressed packet. By giving a search key including, to obtain a pointer to the communication state,
The transfer device according to claim 2, wherein the determination processing unit acquires the communication state corresponding to the internally addressed packet from the state storage unit based on the pointer received from the session management unit.
前記セッション管理情報に対応する前記外部宛パケット又は前記内部宛パケットを、前記転送処理部が予め定められた期間転送しない場合、前記セッション管理部は、当該セッション管理情報を消去することを特徴とする請求項2に記載の転送装置。The transfer processing unit further transfers the external-addressed packet to the external communication device,
When the transfer processing unit does not transfer the externally addressed packet or the internally addressed packet corresponding to the session management information for a predetermined period, the session management unit deletes the session management information. The transfer device according to claim 2.
前記セッション管理情報に対応する前記外部宛パケット又は前記内部宛パケットを、前記転送処理部が予め定められた期間転送しない場合において、当該セッション管理情報に対応する前記消去フラグ情報が、前記消去が可能であることを示す場合、前記セッション管理部は、当該セッション管理情報を消去することを特徴とする請求項6に記載の転送装置。The session management information storage unit stores erasure flag information indicating whether or not the session management information can be erased, as at least a part of the session management information,
When the transfer processing unit does not transfer the externally-addressed packet or the internally-addressed packet corresponding to the session management information for a predetermined period, the erasure flag information corresponding to the session management information can be erased. 7. The transfer device according to claim 6, wherein the session management unit deletes the session management information when indicating that the session management information is the same.
前記状態格納部は、前記通信状態の少なくとも一部として、前記外部宛パケット又は前記内部宛パケットに対して前記パケット処理部が行うべき処理を示す処理情報を格納し、
前記パケット処理部が前記処理情報に従って前記外部宛パケット又は前記内部宛パケットを処理した結果に基づき、前記転送判定部は、前記内部宛パケットの転送を許可するか否かを判定することを特徴とする請求項1に記載の転送装置。A packet processing unit that processes the externally addressed packet or the internally addressed packet,
The state storage unit stores, as at least a part of the communication state, processing information indicating a process to be performed by the packet processing unit on the externally-addressed packet or the internally-addressed packet,
Based on a result of the packet processing unit processing the externally-addressed packet or the internal-addressed packet according to the processing information, the transfer determination unit determines whether to permit the transfer of the internal-addressed packet. The transfer device according to claim 1, wherein
前記状態格納部は、前記内部通信装置におけるTCPセッションの状態を示すTCP状態を、前記通信状態の少なくとも一部として格納し、
前記状態更新部は、前記外部宛パケットのヘッダにおけるTCPフラグに基づき、前記TCP状態を更新し、
前記転送判定部は、前記内部宛パケットのヘッダにおけるTCPフラグ、及び前記TCP状態に基づき、前記内部宛パケットの転送を許可するか否かを判定することを特徴とする請求項1に記載の転送装置。The transfer device transfers a TCP packet based on TCP (Transport Control Protocol) as the internal-addressed packet and the external-addressed packet,
The state storage unit stores a TCP state indicating a state of a TCP session in the internal communication device as at least a part of the communication state,
The state updating unit updates the TCP state based on a TCP flag in a header of the packet addressed to the outside,
The transfer according to claim 1, wherein the transfer determination unit determines whether to permit the transfer of the internal packet based on a TCP flag in a header of the internal packet and the TCP state. apparatus.
前記転送判定部は、前記内部宛パケットのヘッダにおけるシーケンス番号フィールドの値、及び前記確認応答番号情報に基づき、前記内部宛パケットの転送を許可するか否かを判定することを特徴とする請求項9に記載の転送装置。The state storage unit stores acknowledgment number information indicating a value of an acknowledgment number field in a header of the externally-addressed packet as at least a part of the communication state,
The method according to claim 1, wherein the transfer determination unit determines whether to permit the transfer of the internal packet based on a value of a sequence number field in a header of the internal packet and the acknowledgment number information. 10. The transfer device according to 9.
前記転送判定部は、前記内部宛パケットのヘッダにおけるシーケンス番号フィールドの値、前記確認応答番号情報、及び前記ウィンドウ情報に基づき、前記内部宛パケットの転送を許可するか否かを判定することを特徴とする請求項10に記載の転送装置。The state storage unit further stores window information indicating a value of a window field in a header of the externally-addressed packet as at least a part of the communication state,
The transfer determining unit determines whether to permit transfer of the internal packet based on a value of a sequence number field in a header of the internal packet, the acknowledgment number information, and the window information. The transfer device according to claim 10, wherein
前記状態更新部は、前記内部宛パケットのヘッダに基づき、更に、前記通信状態を更新し、
前記転送判定部は、前記通信状態に基づき、前記内部宛パケットの転送を許可するか否かを判定することを特徴とする請求項9に記載の転送装置。The state storage unit stores information based on a header of the internally addressed packet as at least a part of the communication state,
The state update unit further updates the communication state based on a header of the internally addressed packet,
The transfer device according to claim 9, wherein the transfer determination unit determines whether to permit the transfer of the internally addressed packet based on the communication state.
前記状態更新部は、前記内部宛パケットのヘッダにおけるTCPフラグに基づき、更に、前記TCP状態を更新し、
前記転送判定部は、前記TCP状態に基づき、前記内部宛パケットの転送を許可するか否かを判定することを特徴とする請求項12に記載の転送装置。The state storage unit stores, as the TCP state, information further indicating a state of a TCP session in the external communication device,
The state updating unit further updates the TCP state based on a TCP flag in a header of the internal destination packet,
13. The transfer device according to claim 12, wherein the transfer determination unit determines whether to permit the transfer of the packet destined for the inside based on the TCP state.
前記内部宛パケットの転送が許可された場合、前記状態更新部は、前記シーケンス番号情報を、当該内部宛パケットのヘッダにおけるシーケンス番号フィールドの値を示す情報に更新し、
前記転送判定部は、前記シーケンス番号情報に基づき、前記内部宛パケットの転送を許可するか否かを判定することを特徴とする請求項12に記載の転送装置。The state storage unit stores sequence number information indicating a value of a sequence number field in a header of the internally addressed packet as at least a part of the communication state,
When the transfer of the internal-addressed packet is permitted, the state updating unit updates the sequence number information to information indicating a value of a sequence number field in a header of the internal-addressed packet,
13. The transfer device according to claim 12, wherein the transfer determination unit determines whether to permit the transfer of the internally addressed packet based on the sequence number information.
前記同一シーケンス番号回数情報が示す前記回数が予め定められた回数に達した後において、前記内部宛パケットにおけるシーケンス番号フィールドの値が、前記シーケンス番号情報の示す値と等しい場合、前記転送判定部は、当該内部宛パケットの転送を許可しないことを特徴とする請求項14に記載の転送装置。The state storage unit stores at least one of the communication states as the same sequence number count information indicating the number of times the transfer device has transferred the internal destination packet having the same value as the sequence number information and the value of the sequence number field. Further stored as a part,
After the number of times indicated by the same sequence number number information reaches a predetermined number, if the value of the sequence number field in the internally addressed packet is equal to the value indicated by the sequence number information, the transfer determination unit The transfer device according to claim 14, wherein transfer of the packet addressed to the inside is not permitted.
前記内部通信装置における前記通信の状態を示す通信状態を格納する状態格納段階と、
前記内部通信装置が前記外部通信装置に対して送信する通信パケットである外部宛パケットのヘッダに基づき、前記通信状態を更新する状態更新段階と、
前記外部通信装置が前記内部通信装置に対して送信する通信パケットである内部宛パケットの転送を許可するか否かを、前記通信状態に基づいて判定する転送判定段階と、
前記転送判定段階において、前記内部宛パケットの転送を許可すると判定された場合に、前記内部宛パケットを前記内部通信装置に転送する転送処理段階とを備えることを特徴とする転送方法。A transfer method for transferring a communication packet in communication between an internal communication device provided in a predetermined network and an external communication device provided outside the network,
A state storing step of storing a communication state indicating the state of the communication in the internal communication device;
A state updating step of updating the communication state based on a header of an externally addressed packet, which is a communication packet transmitted by the internal communication device to the external communication device,
A transfer determination step of determining whether to permit transfer of an internal-addressed packet, which is a communication packet transmitted by the external communication device to the internal communication device, based on the communication state;
A transfer processing step of transferring the internal destination packet to the internal communication device when it is determined in the transfer determination step that the transfer of the internal destination packet is permitted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002313417A JP2004153343A (en) | 2002-10-28 | 2002-10-28 | Transfer apparatus and transfer method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002313417A JP2004153343A (en) | 2002-10-28 | 2002-10-28 | Transfer apparatus and transfer method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004153343A true JP2004153343A (en) | 2004-05-27 |
Family
ID=32458049
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002313417A Pending JP2004153343A (en) | 2002-10-28 | 2002-10-28 | Transfer apparatus and transfer method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004153343A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007235497A (en) * | 2006-03-01 | 2007-09-13 | Kddi Corp | Transmission band allocation method and instrument |
JP2016218827A (en) * | 2015-05-22 | 2016-12-22 | 株式会社エヌ・ティ・ティ ピー・シー コミュニケーションズ | Session management device, session management method and program |
-
2002
- 2002-10-28 JP JP2002313417A patent/JP2004153343A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007235497A (en) * | 2006-03-01 | 2007-09-13 | Kddi Corp | Transmission band allocation method and instrument |
JP2016218827A (en) * | 2015-05-22 | 2016-12-22 | 株式会社エヌ・ティ・ティ ピー・シー コミュニケーションズ | Session management device, session management method and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7516328B2 (en) | Contents transmission/reception scheme with function for limiting recipients | |
US7181612B1 (en) | Facilitating IPsec communications through devices that employ address translation in a telecommunications network | |
JP4814489B2 (en) | Method, system and computer product for processing packet with layered header | |
WO2007076883A1 (en) | Method and system for secure communication between a public network and a local network | |
US8320249B2 (en) | Method and system for controlling network access on a per-flow basis | |
JP2004538678A (en) | Dynamic packet filter using session tracking | |
JP2004173148A (en) | Information processing apparatus, server client system and method, and computer program | |
WO2005099170A1 (en) | Packet encryption substituting device, method thereof, and program recording medium | |
US8830997B1 (en) | Preventing denial-of-service attacks employing broadcast packets | |
JP4290198B2 (en) | Flexible network security system and network security method permitting reliable processes | |
EP1758340B1 (en) | Access device for preventing transmission of copyrighted content to external network and method for the same | |
JP2020017809A (en) | Communication apparatus and communication system | |
WO2016150296A1 (en) | Method and device for sending and receiving flow specification rule | |
JP4226606B2 (en) | COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM | |
JP3960321B2 (en) | Electronics | |
US20060072618A1 (en) | Packet-sending communication apparatus with forwarding-address automatic-recognition function, communication system and programs thereof | |
JP2004153343A (en) | Transfer apparatus and transfer method | |
WO2006123456A1 (en) | Packet processing device, communication system, packet processing method, and program executing the method | |
JP4321375B2 (en) | Access control system, access control method, and access control program | |
TW201132055A (en) | Routing device and related packet processing circuit | |
JP4542053B2 (en) | Packet relay apparatus, packet relay method, and packet relay program | |
JP4195264B2 (en) | Information processing apparatus and information processing method | |
JP2003324458A (en) | Gateway device | |
JP4120000B2 (en) | Information processing apparatus and information processing method | |
JP4672350B2 (en) | Packet length control apparatus and method, and router apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20051026 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070925 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071002 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20080219 |