JP3824903B2 - Data relay method and apparatus - Google Patents
Data relay method and apparatus Download PDFInfo
- Publication number
- JP3824903B2 JP3824903B2 JP2001316761A JP2001316761A JP3824903B2 JP 3824903 B2 JP3824903 B2 JP 3824903B2 JP 2001316761 A JP2001316761 A JP 2001316761A JP 2001316761 A JP2001316761 A JP 2001316761A JP 3824903 B2 JP3824903 B2 JP 3824903B2
- Authority
- JP
- Japan
- Prior art keywords
- header
- layer
- data
- data packet
- 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
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Description
【0001】
【発明の属する技術分野】
この発明は、入力されるデータパケットの送信先を決定して中継するデータ中継方法およびその装置に関するものである。
【0002】
【従来の技術】
従来のデータ中継方法において、入力したデータの中継方向を決定するには、例えばレイヤ2の宛先に基づいて決定する場合、ブリッジの機能を用い、IEEE802.3で規定されたローカルエリアネットワーク(以下、「LAN」という)であればMACアドレスを学習、解析することで決定していた。また、レイヤ3の宛先に基づいて決定する場合には、ルータの機能を用い、IPであればIPアドレスを解析することにより中継方向を決定し、レイヤ4の宛先に基づいて決定する場合にも、ルータの機能を用い、TCPやUDPであればサービスのポート番号を解析することにより中継方向を決定していた。
【0003】
このようなデータ中継では、中継方向を決定するためのデータの宛先や種類をソフトウェアで解析処理するものがあったが、この処理では、例えばDRAMに格納されているプログラムデータを一旦CPUが読み出し、ハードウェアから入力した情報に基づいてデータ処理を行うので、このDRAMからのプログラムデータの読み出しやデータ処理に時間がかかり、データの中継処理が迅速に行われなかった。
【0004】
そこで、この中継処理の高速化を図るために、ソフトウェアでの解析処理を、専用のハードウェア、いわゆるスイッチング機構を用いた解析処理に置き換えて行うものがあった。なお、このようなスイッチングを行うデバイスには、例えばインターネットの技術では、レイヤ3スイッチやレイヤ4スイッチと呼ばれるものがある。
【0005】
しかしながら、ハードウェアによる解析処理を行う上記従来例においては、例えばレイヤ3でのフラグメントが発生した場合、レイヤ4スイッチングでは、レイヤ4のヘッダを解析する必要があるにもかかわらず、フラグメントされた2つ目以降のパケットには、レイヤ4のヘッダが存在しないので、出力先が特定されずスイッチングができないという問題点があった。
【0006】
すなわち、図4の各階層のパケット構成に示すように、ネットワーク通信では、各階層ごとに通信形態が分かれており、それぞれのレイヤは、1回に伝達できるデータ長の最大値が決まっている。このデータ長の最大値(MTU)は、例えばレイヤ2のプロトコルであるLANでは、ヘッダが14バイト、データ1500バイトおよびFCS4バイトの合計1518バイトであり、レイヤ3のプロトコルであるIP(インターネット・プロトコル)では、IPヘッダ20バイト以上を含む65535バイトであり、レイヤ4のプロトコルであるTCP(トランスミッション・コントロール・プロトコル)では、TCPヘッダ20バイト以上を含む数ギガバイト程度である。
【0007】
この各階層のMTUが決まっている状態で、上位層のデータ長は、必然的に下位層のデータ長の制約を受けることとなる。つまり、IPのデータは、LANのパケット内にカプセル化されるので、IPのMTUはLANのMTUの制約を受けることとなる。また、TCPのMTUも同様の理由で、LANのMTUの制約を受けることとなる。
【0008】
例えば伝達したいIPのデータ長が4000バイトであっても、下位層であるレイヤ2のLANのMTUが1500バイトであるので、1回でIPのデータを伝送することはできない。このため、IPのデータは、レイヤ3においてフラグメントの処理がなされ、予めマックスが1500バイトずつの3つのデータに分割される。この分割では、データ部の先頭にヘッダがそれぞれ付加されることとなる。
【0009】
この際に、例えば3980バイトのTCPのデータも3分割されるが、ここではレイヤ3レベルでのフラグメントなので、TCPのデータは先頭から単純に分割されることとなる。このため、フラグメントされた最初のパケットにはレイヤ4のヘッダが存在することとなるが、2つ目以降のパケットには、レイヤ4のヘッダが存在しなくなってしまう。
【0010】
従って、レイヤ4スイッチングでは、レイヤ4のヘッダを解析する必要があるにもかかわらず、フラグメントされた2つ目以降のパケットには、レイヤ4のヘッダが存在しないので、解析が困難となって出力先が特定されずスイッチングができなくなっていた。
【0011】
この第1の解決方法としては、フラグメントされた先頭のパケットから終端のパケットまでのデータを、中継装置内に設けたバッファメモリに一旦格納し、パケットを再構築した後に、特定された出力先に出力していた。
【0012】
また、この他の第2の解決方法としては、フラグメントされた2つ目以降のパケットには、先頭のパケットの続きを示す識別子ID、例えばレイヤ3がIPであれば、フラグメントビットおよびIP識別子が、レイヤ3のヘッダ内に格納されているので、入力されるパケットに対して、この識別子IDを認識することで、このフラグメントされた2つ目以降のパケットを先頭のパケットと同一の方向に中継していた。
【0013】
【発明が解決しようとする課題】
しかしながら、この第1の解決方法では、フラグメントされたデータの先頭から終端まで、データが全て完結するまで上記データを中継装置内にバッファリングしておかなければならず、中継処理の高速化の妨げになっていた。さらに、この解決方法では、大量のデータを保持しておくために大容量、高価格のDRAMなどのバッファメモリが必要となるという問題点もあった。
【0014】
また、この第2の解決方法では、例えばフラグメントされたデータのうち、先頭のパケットよりも先に2つ目以降のパケットが到着した場合には、対応がとれないという問題点があった。これを解決するためには、第1の解決方法と同様に、このパケットのデータをバッファメモリにバッファリングするなどの対策が必要となり、第1の解決方法と同様の問題点が生じる。
【0015】
この発明は、上記問題点に鑑みなされたもので、大容量のメモリを必要とすることなく、中継処理の高速化を図ることができるデータ中継方法およびその装置を提供することを目的とする。
【0016】
【課題を解決するための手段】
上記目的を達成するため、この発明では、各階層のヘッダを有して伝送されるデータパケットを、前記ヘッダの内容と経路情報に基づいて送信先を決定して中継するデータ中継方法において、受信した前記データパケットの前記階層が上位層であるレイヤ4のヘッダを抽出して該ヘッダの内容を解析して出力ポートを決定し、かつその下位層であるレイヤ3のヘッダ内の宛先情報および前記決定した出力ポートの情報を少なくとも記憶手段に記憶させる解析工程と、前記受信したデータパケットにレイヤ4のヘッダが付加されている場合には、前記決定した出力ポートに前記データパケットをハードウェアによって転送し、またレイヤ4のヘッダが付加されていない場合に、前記レイヤ3のヘッダの内容から前記記憶手段に記憶された内容を検索し、該当する内容が検索された場合には、前記記憶手段に記憶されている出力ポートに前記データパケットをハードウェアによって転送する転送工程と、を含むことを特徴とするデータ検索方法が提供される。
【0017】
この発明によれば、レイヤ4のヘッダの内容を解析して出力ポートを決定し、かつアドレス情報であるレイヤ3のヘッダの宛先情報と決定した出力ポートの情報を記憶手段に記憶する解析機能を含み、受信したデータパケットにレイヤ4のヘッダが付加されている場合には、この解析機能によって決定した出力ポートにデータパケットを転送し、このレイヤ4のヘッダが付加されていない場合には、レイヤ3のヘッダの宛先情報が記憶手段の内容と一致するときに、その記憶された出力ポートにデータパケットをハードウェアによって転送することで、小容量のメモリを用いて中継処理の高速化を図ることを可能とする。させる
【0018】
この発明の請求項2では、上記発明において、前記転送工程では、前記データパケット内に前記レイヤ4のヘッダがなく、かつ前記記憶手段に前記データパケットのレイヤ3のヘッダの内容に該当する記憶内容がない場合には、前記レイヤ3のヘッダの内容と前記経路情報に基づいて前記データパケットをハードウェアによって転送することを特徴とする。
【0019】
この発明によれば、データパケットにレイヤ4のヘッダもなく、記憶手段にレイヤ3のヘッダの内容に該当する内容もない場合には、レイヤ3のヘッダの内容と経路情報によってデータパケットを転送することで、データ転送の遅延を防ぎ、中継処理の高速化を図る
【0022】
この発明の請求項3では、経路情報を記憶する経路情報記憶手段を有し、各階層のヘッダを有して伝送されるデータパケットに対し、前記ヘッダの内容と前記経路情報から送信先を決定して前記データを中継するデータ中継装置において、受信した前記データパケットの前記階層が上位層であるレイヤ4のヘッダを抽出して該ヘッダの内容を解析する解析手段と、前記データパケットの下位層であるレイヤ3のヘッダ内の宛先情報と前記解析結果である自装置の出力ポートの情報を少なくとも含む情報を記憶する記憶手段と、前記データパケットのレイヤ3の内容から前記記憶手段に記憶された内容を検索する検索手段と、前記受信したデータパケットにレイヤ4のヘッダが付加されている場合には、前記解析内容に従い前記データパケットをハードウェアによって転送するとともに、前記データパケットに前記レイヤ4のヘッダが付加されていない場合には、前記検索手段の検索結果に応じて前記データパケットをハードウェアによって転送する転送手段と、を備えたことを特徴とするデータ中継装置が提供される。
【0023】
この発明によれば、レイヤ4のヘッダの内容を解析して出力ポートを決定してデータパケットをハードウェアによって転送するとともに、レイヤ3のヘッダ内の宛先情報と決定した出力ポートの情報を小容量の記憶手段に記憶させ、レイヤ4のヘッダが付加されていない場合には、検索された記憶手段の内容に基づきデータパケットを転送させることで、小容量のメモリを用いて中継処理の高速化を図る。
【0024】
この発明の請求項4では、上記発明において、前記転送手段は、前記データパケットに前記レイヤ4のヘッダがなく、かつ前記検索手段によって前記レイヤ3のヘッダの内容と前記解析結果の情報が前記記憶手段から検索された場合には、前記解析結果の情報に基づき、前記データパケットをハードウェアによって転送することを特徴とする。
【0025】
この発明によれば、レイヤ4のヘッダがなく、レイヤ3のヘッダの内容が記憶手段から検索されると、該当する解析結果に基づき、データパケットをハードウェアによって転送することで、データ中継の遅延を防ぎ、中継処理の高速化を図る。
【0026】
この発明の請求項5では、上記発明において、前記転送手段は、前記データパケットに前記レイヤ4のヘッダがなく、かつ前記検索手段によって前記レイヤ3のヘッダの内容が前記記憶手段から検索されなかった場合には、前記レイヤ3のヘッダの内容と前記経路情報記憶手段に記憶されている経路情報に基づいて、前記データパケットをハードウェアによって転送することを特徴とする。
【0027】
この発明によれば、レイヤ4のヘッダがなく、レイヤ3のヘッダの内容も記憶手段から検索されないと、レイヤ3のヘッダ内容と経路情報に基づき、データパケットをハードウェアによって転送することで、データ中継の遅延を防ぎ、中継処理の高速化を図る。
【0028】
この発明の請求項6では、上記発明において、前記転送手段は、前記データパケットをハードウェアによって転送するためのスイッチング機構を有することを特徴とする。
【0029】
この発明によれば、スイッチング機構のハードウェアによってデータパケットを転送することで、ソフトウェアによるデータ転送の遅延を解消し、中継処理の高速化を図る。
【0032】
この発明の請求項7では、上記発明において、前記記憶手段は、キャッシュメモリからなることを特徴とする。
【0033】
この発明によれば、宛先情報や出力ポートの情報の登録用にキャッシュメモリを用いることで、メモリの小容量化および低コスト化が可能となる。
【0034】
【発明の実施の形態】
以下に添付図面を参照して、この発明にかかるデータ中継方法およびその装置の好適な実施の形態を説明する。
【0035】
この発明にかかるデータ中継装置は、隣接するネットワーク間に接続され、データパケットの転送を行っており、レイヤ4のヘッダが付加されているパケットは無論のこと、フラグメントされてレイヤ4のヘッダが付加されていないパケットの1つ1つに対しても出力先を検索して、この出力先から宛先の端末にデータパケットを転送することを可能にしている。
【0036】
すなわち、データ中継装置は、図1に示すように、WANやLANなどのネットワークから入力されるパケットを取り込むパケット入力部11と、取り込まれたパケットのヘッダの内容を解析するL3/L4ヘッダ解析部12と、レイヤ3およびレイヤ4の経路情報を格納するL3/L4経路テーブル13と、L3/L4ヘッダ解析部12で解析された中継結果を記憶する中継結果キャッシュ部14と、複数のネットワークとそれぞれ接続されてパケットを出力する各パケット出力部15〜17とから構成されている。
【0037】
L3/L4ヘッダ解析部12は、この発明の解析手段、検索手段および転送手段を構成している。L3/L4ヘッダ解析部12は、入力するデータパケットに付加されたレイヤ3のヘッダとレイヤ4のヘッダの内容を解析するとともに、解析結果に基づいてパケットをハードウェアによって転送するスイッチング機構を有している。すなわち、L3/L4ヘッダ解析部12は、レイヤ4のヘッダに対しては、宛先アドレスのデータなどに基づいてL3/L4経路テーブル13を検索して経路情報を得て最短経路を求め、次の中継装置が接続される自装置の出力ポートを認識して、その出力ポートにデータパケットが出力されるようにスイッチ機構を動作させている。なお、このスイッチング機構は、従来技術で示した既存のものと同様の構成であるので、ここでは説明を省略する。
【0038】
このL3/L4ヘッダ解析部12は、入力するデータパケットに付加されたレイヤ3のヘッダに対しては、宛先アドレスの情報を抽出して、このレイヤ3の宛先アドレスと、上記の解析によって得られた出力ポートの情報を中継結果キャッシュ部14に書き込んでいる。なお、このL3/L4ヘッダ解析部12による書き込みにおいて、既に中継結果キャッシュ部14内に書き込まれている宛先アドレスに対しては、パケット入力のたび毎に対応する出力ポートの情報の更新が行われる。
【0039】
また、このL3/L4ヘッダ解析部12は、入力するデータパケットにレイヤ4のヘッダが付加されていない場合、例えばフラグメントされたデータの2つ目以降のパケットの場合には、レイヤ3のヘッダに対して、宛先アドレスのデータなどに基づいてL3/L4経路テーブル13を参照して経路情報を得て送信経路を求め、次の中継装置が接続される自装置の出力ポートを認識して、その出力ポートにデータパケットの出力を行う。なお、この場合にはレイヤ4の経路情報を参照できないので、最短経路を求めることはできないが、目的の宛先の端末に至る次の中継装置を認識することは可能である。
【0040】
このように、L3/L4ヘッダ解析部12から所定の出力ポートに出力されたデータパケットは、その出力ポートに接続されたパケット出力部によって特定のネットワークに送出されることとなる。
【0041】
中継結果キャッシュ部14は、この発明の記憶手段を構成しており、図1に示すように、L3/L4ヘッダ解析部12で抽出されたレイヤ3の宛先アドレスと、この宛先アドレスに対応する出力ポートの情報が記憶されている。なお、この図に示した宛先アドレスは、IPの宛先アドレスを一例として示している。
【0042】
次に、図2のフローチャートを用いてデータ中継装置の中継動作を説明する。図において、パケット入力部11からパケットが入力されると、L3/L4ヘッダ解析部12は、このパケットのレイヤ3ヘッダの内容を解析する(ステップ101)。そして、このレイヤ3ヘッダ内の識別子ID、すなわちフラグメントされたパケットを示す識別子を検索して、入力されたパケットがフラグメントされたパケットかどうか判断する(ステップ102)。
【0043】
ここで、このパケットがフラグメントされたパケットの場合には、このパケットがフラグメントの先頭のパケットかどうか判断しており(ステップ103)、例えばこのパケットがフラグメントの先頭のパケットの場合、またステップ102において、フラグメントされたパケットでない場合には、パケットにはレイヤ4ヘッダが付加されているので、このレイヤ4ヘッダの解析を行う(ステップ104)。
【0044】
次に、パケット内のレイヤ3、レイヤ4ヘッダの内容に基づいてL3/L4経路テーブル13を検索して(ステップ105)、出力先(自装置の出力ポート)を決定して、このパケットを決定した出力ポートに転送し(ステップ106)、レイヤ3ヘッダの宛先アドレスとこの決定した出力先の情報を中継結果キャッシュ部14に書き込んで、データの更新を行う(ステップ107)。
【0045】
また、ステップ103において、L3/L4ヘッダ解析部12は、入力されたパケットがフラグメントの先頭のパケットでない場合には、このパケットのレイヤ3ヘッダを抽出し、このレイヤ3ヘッダの内容(宛先アドレス)に基づいて中継結果キャッシュ部14を検索し(ステップ108)、キャッシュヒットしたかどうか判断する(ステップ109)。
【0046】
ここで、検索対象の宛先アドレスが中継結果キャッシュ部14内に記憶されていないことにより、キャッシュヒットしなかった場合には、パケットのL3ヘッダの内容のみに基づいてL3/L4経路テーブル13、この場合はL3の経路情報を検索して(ステップ110)、出力ポートを決定して、このパケットの転送を行い(ステップ111)、次のパケットと入力を待つ。
【0047】
また、この宛先アドレスの検索により、キャッシュヒットした場合には、対応する出力ポートの情報から出力先を決定して、このパケットの転送を行い(ステップ111)、次のパケットと入力を待つ。
【0048】
次に、図3に示すパケット配列の一例を用いて中継動作を説明する。ここで、パケット1,2,3は、フラグメントされたパケットでパケット1にのみTCPヘッダが付加されており、伝送の途中の経路でパケット1と2が入れ替わって伝送されてきたものとし、パケットA,Bはそれぞれ別々の単発のパケットで、TCPヘッダがそれぞれに付加されているものとする。
【0049】
このようなTCPのデータ通信の場合、通信を開始する時に、まずコネクション開設のための制御系のパケットを伝送する。このパケットは、カプセル化されたIPのデータ内にTCPヘッダと、通信開始を示すデータしか入っていないので、フラグメントの発生は起こらない。従って、データ中継装置では、このTCPヘッダから抽出した各宛先アドレスと出力先の情報を予め中継結果キャッシュ部に書き込むことができる。
【0050】
この状態で、パケット2が入力されると、L3/L4ヘッダ解析部12は、このパケットのレイヤ3のIPヘッダの内容を解析し、フラグメントの先頭のパケットでないことを認識し、次にIPヘッダの宛先IPアドレスによって中継結果キャッシュ部14を検索して出力ポート、例えばポート1の情報を得て、このポート1にパケット2を転送することができる。
【0051】
次に、入力されるパケットA,1,Bに対しては、いずれもレイヤ4のヘッダが付加されているので、L3/L4ヘッダ解析部12は、このレイヤ4のTCPヘッダの内容を解析し、出力ポートを求めて該当ポートに各パケットを転送することができる。ここでは、パケット1はポート1に、パケットA,Bはポート2にそれぞれ転送される。これと同時に、L3/L4ヘッダ解析部12は、これらパケットのレイヤ3の宛先IPアドレスによって中継結果キャッシュ部14の記憶内容を検索し、中継結果キャッシュ部14の該当する宛先IPアドレスと出力ポートの情報を更新する。
【0052】
次に、パケット3が入力されるが、この場合、L3/L4ヘッダ解析部12は、パケット2の場合と同様に、レイヤ3のIPヘッダの宛先IPアドレスによって中継結果キャッシュ部14を検索し、中継結果キャッシュ部14の該当する出力ポートの情報を得て、この出力ポートにパケット3を転送することができる。
【0053】
なお、コネクション開設後のデータ通信の運用時に、宛先の端末が他のネットワークに接続されて変更され、また新たな端末が追加される状況も考えられる。しかし、この場合も、コネクション開設時と同様に、制御系のパケットが端末から出力されるので、データ中継装置では、入力されるパケットのヘッダの内容に基づいて中継結果キャッシュ部14の内容を変更することが可能となり、なんら支障をきたすことなく、データの中継処理を行うことができる。
【0054】
このように、この実施例では、パケットの中継処理の工程をスイッチング機構によるゲートロジックで組むことによって、データ中継の高速化が図れるとともに、パケットのレイヤ3の宛先アドレスと、これに対応する出力ポートの情報をキャッシュメモリに記憶させておき、レイヤ4ヘッダが付加されていない、例えばフラグメントされたパケットに対しても、レイヤ3のヘッダの内容から出力ポートを決定できるようにした。このため、この実施例では、メモリに記憶するデータの容量が従来例に比べて大幅に減り、大容量のメモリを必要とすることなく、レイヤ4のヘッダが付加されていないパケットに対しても中継処理の高速化を図ることが可能となった。
【0055】
この発明は、これら実施形態に限定されるものではなく、この発明の要旨を逸脱しない範囲で種々の変形実施が可能である。
【0056】
【発明の効果】
以上説明したように、この発明では、上位層ヘッダの内容を解析して出力ポートを決定するハードウェアによる解析機能を含み、受信したデータパケットに上位層ヘッダが付加されている場合には、この解析機能によって決定した出力ポートにデータパケットを転送し、この上位層ヘッダが付加されていない場合には、その下位層ヘッダの内容によって記憶手段を検索し、記憶内容がこのヘッダの内容と一致するときに、その記憶された出力ポートにデータパケットを転送することで、中継処理の高速化を図ることができる。
【0057】
また、この発明では、データパケットに上位層ヘッダもなく、記憶手段に下位層ヘッダの内容に該当する内容もない場合には、この下位層ヘッダの内容と経路情報によって出力ポートを決定してデータパケットを転送するので、データ転送の遅延を防ぎ、中継処理の高速化を図ることができる。
【0058】
さらに、この発明では、記憶手段に記憶される内容は、下位層の宛先アドレスの情報と、対応する出力ポートの情報であり、上位層のヘッダが付加されていないパケットに対しては、この下位層の宛先アドレスから記憶手段を検索して、出力ポートを決定するので、このメモリを用いて中継処理の高速化を図ることできるとともに、メモリの小容量化が可能となる。
【図面の簡単な説明】
【図1】この発明にかかるデータ中継装置の機能構成を示す構成図である。
【図2】図1に示したデータ中継装置の中継動作を示すフローチャートである。
【図3】中継動作を説明するためにパケット配列の一例とL3/L4ヘッダ解析部を示す図である。
【図4】レイヤ3でのフラグメントを説明するための各階層のパケット構成を示す構成図である。
【符号の説明】
11 パケット入力部
12 L3/L4ヘッダ解析部
13 L3/L4経路テーブル
14 中継結果キャッシュ部
15〜17 パケット出力部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data relay method and apparatus for determining and relaying a transmission destination of an input data packet.
[0002]
[Prior art]
In the conventional data relay method, in order to determine the relay direction of the input data, for example, when determining based on the destination of
[0003]
In such data relay, there is a software that analyzes and analyzes the destination and type of data for determining the relay direction. In this processing, for example, the CPU once reads program data stored in the DRAM, Since data processing is performed based on information input from hardware, it takes time to read program data from the DRAM and data processing, and data relay processing is not performed quickly.
[0004]
Therefore, in order to increase the speed of the relay processing, there is a method in which the analysis processing by software is replaced with analysis processing using dedicated hardware, a so-called switching mechanism. Examples of devices that perform such switching include what are called
[0005]
However, in the above-described conventional example in which the analysis process is performed by hardware, for example, when a fragment in
[0006]
That is, as shown in the packet configuration of each layer in FIG. 4, in the network communication, the communication form is divided for each layer, and each layer has a maximum data length that can be transmitted at one time. For example, in a LAN that is a
[0007]
In a state where the MTU of each layer is determined, the data length of the upper layer is necessarily limited by the data length of the lower layer. In other words, since IP data is encapsulated in a LAN packet, the IP MTU is restricted by the LAN MTU. The TCP MTU is also restricted by the MTU of the LAN for the same reason.
[0008]
For example, even if the IP data length to be transmitted is 4000 bytes, since the MTU of the
[0009]
At this time, TCP data of 3980 bytes, for example, is also divided into three, but here, since it is a fragment at the
[0010]
Therefore, in Layer 4 switching, although it is necessary to analyze the layer 4 header, the second and subsequent packets that have been fragmented do not have the layer 4 header, so that the analysis becomes difficult. The destination was not specified and switching was impossible.
[0011]
As this first solution, the data from the fragmented head packet to the end packet is temporarily stored in a buffer memory provided in the relay device, and after the packet is reconstructed, it is sent to the specified output destination. It was output.
[0012]
As another second solution, the fragmented second and subsequent packets include an identifier ID indicating the continuation of the first packet, for example, if the
[0013]
[Problems to be solved by the invention]
However, in this first solution, the data must be buffered in the relay device from the beginning to the end of the fragmented data until all the data is completed, which hinders the speeding up of the relay processing. It was. Further, this solution has a problem that a large capacity and high price buffer memory such as a DRAM is required to hold a large amount of data.
[0014]
In addition, in the second solution, for example, in the fragmented data, when the second and subsequent packets arrive before the first packet, there is a problem that it is not possible to take a countermeasure. In order to solve this problem, it is necessary to take measures such as buffering the data of the packet in the buffer memory as in the first solution, and the same problem as in the first solution arises.
[0015]
The present invention has been made in view of the above problems, and an object of the present invention is to provide a data relay method and apparatus capable of increasing the speed of relay processing without requiring a large-capacity memory.
[0016]
[Means for Solving the Problems]
In order to achieve the above object, according to the present invention, a data packet transmitted with a header of each layer is received in a data relay method in which a transmission destination is determined and relayed based on the contents of the header and route information. wherein the hierarchy of the data packet to determine extracts the header of layer 4 analyzes the content of the header output port is the upper layer, and the destination information and the in the header of
[0017]
According to the present invention, the analysis function for analyzing the contents of the layer 4 header to determine the output port and storing the address information of the
In a second aspect of the present invention, in the above invention, the the transfer process, the in the data packet without header of the Layer 4, and storage corresponding to the contents of the header of
[0019]
According to the invention, without the header of Layer 4 de Tapaketto, if there is no content corresponding to the content of the
According to a third aspect of the present invention, there is provided route information storage means for storing route information, and a destination is determined from the contents of the header and the route information for a data packet transmitted with a header of each layer. In the data relay apparatus for relaying the data, an analysis means for extracting the header of the layer 4 in which the hierarchy of the received data packet is an upper layer and analyzing the contents of the header, and a lower layer of the data packet Storage means for storing information including at least the destination information in the header of
[0023]
According to the present invention, the contents of the layer 4 header are analyzed to determine the output port, the data packet is transferred by hardware, and the destination information in the
[0024]
According to a fourth aspect of the present invention, in the above invention, the transfer means does not include the layer 4 header in the data packet, and the search means stores the contents of the
[0025]
According to the present invention, when there is no layer 4 header and the content of the
[0026]
According to claim 5 of the present invention, in the above invention, the transfer means does not have the layer 4 header in the data packet, and the search means does not retrieve the contents of the
[0027]
According to the present invention, if there is no layer 4 header and the content of the
[0028]
According to claim 6 of the present invention, in the above invention, the transfer means includes a switching mechanism for transferring the data packet by hardware.
[0029]
According to the invention, by transferring the data packets by hardware switching mechanism to eliminate the delay of data transfer by software, to speed up the relay process.
[0032]
According to a seventh aspect of the present invention, in the above invention, the storage means comprises a cache memory.
[0033]
According to the present invention, by using a cache memory for registering destination information and output port information, the memory capacity can be reduced and the cost can be reduced.
[0034]
DETAILED DESCRIPTION OF THE INVENTION
Exemplary embodiments of a data relay method and apparatus according to the present invention will be described below with reference to the accompanying drawings.
[0035]
The data relay apparatus according to the present invention is connected between adjacent networks and transfers data packets. Of course, a packet to which a layer 4 header is added is fragmented and a layer 4 header is added. An output destination is searched for each of the packets that have not been processed, and a data packet can be transferred from the output destination to the destination terminal.
[0036]
That is, as shown in FIG. 1, the data relay apparatus includes a
[0037]
The L3 / L4
[0038]
The L3 / L4
[0039]
Further, the L3 / L4
[0040]
As described above, the data packet output from the L3 / L4
[0041]
The relay
[0042]
Next, the relay operation of the data relay apparatus will be described using the flowchart of FIG. In the figure, when a packet is input from the
[0043]
Here, if this packet is a fragmented packet, it is determined whether or not this packet is the first packet of the fragment (step 103). For example, if this packet is the first packet of the fragment, in step 102 If the packet is not a fragmented packet, since the layer 4 header is added to the packet, the layer 4 header is analyzed (step 104).
[0044]
Next, the L3 / L4 route table 13 is searched based on the contents of the
[0045]
In step 103, if the input packet is not the first packet of the fragment, the L3 / L4
[0046]
Here, if the cache hit does not occur because the destination address to be searched is not stored in the relay
[0047]
If a cache hit is found by searching for the destination address, the output destination is determined from the information of the corresponding output port, the packet is transferred (step 111), and the next packet and input are awaited.
[0048]
Next, the relay operation will be described using an example of the packet arrangement shown in FIG. Here, it is assumed that
[0049]
In the case of such TCP data communication, when communication is started, a control system packet for establishing a connection is first transmitted. Since this packet contains only the TCP header and data indicating the start of communication in the encapsulated IP data, no fragmentation occurs. Therefore, in the data relay apparatus, each destination address and output destination information extracted from the TCP header can be written in the relay result cache unit in advance.
[0050]
In this state, when the
[0051]
Next, since the layer 4 header is added to the input packets A, 1 and B, the L3 / L4
[0052]
Next, the
[0053]
It should be noted that when data communication is performed after the connection is established, the destination terminal may be connected to another network and changed, and a new terminal may be added. However, in this case as well, when the connection is established, since the control system packet is output from the terminal, the data relay device changes the content of the relay
[0054]
As described above, in this embodiment, by combining the packet relay process step with the gate logic by the switching mechanism, the data relay speed can be increased, and the
[0055]
The present invention is not limited to these embodiments, and various modifications can be made without departing from the spirit of the present invention.
[0056]
【The invention's effect】
As described above, the present invention includes a hardware analysis function that determines the output port by analyzing the contents of the upper layer header. When the upper layer header is added to the received data packet, When the data packet is transferred to the output port determined by the analysis function and this upper layer header is not added, the storage means is searched by the content of the lower layer header, and the stored content matches the content of this header. Sometimes, the forwarding process can be speeded up by transferring the data packet to the stored output port.
[0057]
Further, in the present invention, when there is no upper layer header in the data packet and there is no content corresponding to the content of the lower layer header in the storage means, the output port is determined by the content of the lower layer header and the route information, and the data Since the packet is transferred, it is possible to prevent delay in data transfer and increase the speed of the relay process.
[0058]
Furthermore, in the present invention, the contents stored in the storage means are information on the lower layer destination address and information on the corresponding output port. For packets to which no upper layer header is added, this lower layer Since the storage means is searched from the destination address of the layer and the output port is determined, the relay process can be speeded up using this memory, and the memory capacity can be reduced.
[Brief description of the drawings]
FIG. 1 is a configuration diagram showing a functional configuration of a data relay device according to the present invention;
FIG. 2 is a flowchart showing a relay operation of the data relay device shown in FIG. 1;
FIG. 3 is a diagram illustrating an example of a packet arrangement and an L3 / L4 header analysis unit for explaining a relay operation.
FIG. 4 is a configuration diagram showing a packet configuration of each layer for explaining a fragment in
[Explanation of symbols]
11
Claims (7)
受信した前記データパケットの前記階層が上位層であるレイヤ4のヘッダを抽出して該ヘッダの内容を解析して出力ポートを決定し、かつその下位層であるレイヤ3のヘッダ内の宛先情報および前記決定した出力ポートの情報を少なくとも記憶手段に記憶させる解析工程と、
前記受信したデータパケットにレイヤ4のヘッダが付加されている場合には、前記決定した出力ポートに前記データパケットをハードウェアによって転送し、またレイヤ4のヘッダが付加されていない場合に、前記レイヤ3のヘッダの内容から前記記憶手段に記憶された内容を検索し、該当する内容が検索された場合には、前記記憶手段に記憶されている出力ポートに前記データパケットをハードウェアによって転送する転送工程と、
を含むことを特徴とするデータ中継方法。In a data relay method for relaying a data packet transmitted with a header of each layer by determining a transmission destination based on the content of the header and route information,
The layer 4 header , which is the upper layer of the received data packet , is extracted, the contents of the header are analyzed to determine the output port, and the destination information in the layer 3 header , which is the lower layer, and An analysis step of storing information of the determined output port in at least storage means;
When a layer 4 header is added to the received data packet, the data packet is transferred to the determined output port by hardware, and when a layer 4 header is not added, the layer 3. The content stored in the storage means is searched from the content of the header of No. 3, and when the corresponding content is searched, the data packet is transferred by hardware to the output port stored in the storage means Process ,
A data relay method comprising:
受信した前記データパケットの前記階層が上位層であるレイヤ4のヘッダを抽出して該ヘッダの内容を解析する解析手段と、
前記データパケットの下位層であるレイヤ3のヘッダ内の宛先情報と前記解析結果である自装置の出力ポートの情報を少なくとも含む情報を記憶する記憶手段と、
前記データパケットのレイヤ3の内容から前記記憶手段に記憶された内容を検索する検索手段と、
前記受信したデータパケットにレイヤ4のヘッダが付加されている場合には、前記解析内容に従い前記データパケットをハードウェアによって転送するとともに、前記データパケットに前記レイヤ4のヘッダが付加されていない場合には、前記検索手段の検索結果に応じて前記データパケットをハードウェアによって転送する転送手段と、
を備えたことを特徴とするデータ中継装置。Data that has route information storage means for storing route information, and relays the data by determining a transmission destination from the contents of the header and the route information for a data packet transmitted with a header of each layer In the relay device,
Analyzing means for extracting a layer 4 header whose upper layer is the received data packet and analyzing the content of the header;
Storage means for storing information including at least destination information in a header of a layer 3 that is a lower layer of the data packet and information on an output port of the own apparatus that is the analysis result;
Search means for searching the contents stored in the storage means from the contents of layer 3 of the data packet;
When a layer 4 header is added to the received data packet, the data packet is transferred by hardware according to the analysis content, and when the layer 4 header is not added to the data packet Transfer means for transferring the data packet by hardware according to the search result of the search means ;
A data relay device comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001316761A JP3824903B2 (en) | 2001-10-15 | 2001-10-15 | Data relay method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001316761A JP3824903B2 (en) | 2001-10-15 | 2001-10-15 | Data relay method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2003124982A JP2003124982A (en) | 2003-04-25 |
JP3824903B2 true JP3824903B2 (en) | 2006-09-20 |
Family
ID=19134720
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2001316761A Expired - Fee Related JP3824903B2 (en) | 2001-10-15 | 2001-10-15 | Data relay method and apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3824903B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5092842B2 (en) * | 2008-03-27 | 2012-12-05 | 沖電気工業株式会社 | Packet processing apparatus and packet processing method |
CN101695047B (en) * | 2009-10-26 | 2015-01-28 | 中兴通讯股份有限公司 | Method and switch for realizing forwarding of dynamic tunnel message |
JP7347182B2 (en) * | 2019-12-10 | 2023-09-20 | 株式会社デンソー | relay device |
CN111355672A (en) * | 2020-03-02 | 2020-06-30 | 杭州迪普信息技术有限公司 | Message forwarding method and device |
-
2001
- 2001-10-15 JP JP2001316761A patent/JP3824903B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2003124982A (en) | 2003-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3645734B2 (en) | Network relay device and network relay method | |
US7440417B2 (en) | Method and system for frame and protocol classification | |
US9432283B2 (en) | Communication control system and communication control method | |
JP2000332817A (en) | Packet processing unit | |
KR100798926B1 (en) | Apparatus and method for forwarding packet in packet switch system | |
US20030110208A1 (en) | Processing data across packet boundaries | |
US10757230B2 (en) | Efficient parsing of extended packet headers | |
JP2001251351A (en) | Input packet processing system for packet switch | |
JP4182180B2 (en) | Network relay device and network relay method | |
JP3824903B2 (en) | Data relay method and apparatus | |
JP3711965B2 (en) | IP flow multi-stage hash device, IP flow multi-stage hash method, IP flow multi-stage hash program, and recording medium thereof | |
JP4263718B2 (en) | Communication processing apparatus and communication processing method | |
US7249216B2 (en) | Data relay apparatus, content addressable/associative memory device, and content addressable/associative memory device use information search method | |
JP3645735B2 (en) | Network relay device and network relay method | |
JP3837670B2 (en) | Data relay apparatus, associative memory device, and associative memory device utilization information retrieval method | |
JP2003143208A (en) | Method and apparatus for relaying data | |
US9030950B2 (en) | Communication apparatus, processing method for the same, and computer-readable storage medium | |
JP2005333220A (en) | Network node device | |
JP2008205868A (en) | Ip fragment packet processor, and ip fragment packet processing method and program to be used in the same | |
JP2000092110A (en) | Inter-network connector | |
JP2005101690A (en) | Repeating device and repeating method | |
JPH0832608A (en) | Network repeater | |
JP3508057B2 (en) | Layer 3 switch | |
US20030161293A1 (en) | Router, method of administrating data transfer routes, and computer program for doing the same | |
JP3592570B2 (en) | IP communication method, ATM communication device, and recording medium in ATM network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040701 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20060227 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060307 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060508 |
|
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: 20060530 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060628 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090707 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100707 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110707 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110707 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120707 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120707 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130707 Year of fee payment: 7 |
|
LAPS | Cancellation because of no payment of annual fees |