JP2005079717A - Device and method for transferring packet - Google Patents

Device and method for transferring packet Download PDF

Info

Publication number
JP2005079717A
JP2005079717A JP2003305394A JP2003305394A JP2005079717A JP 2005079717 A JP2005079717 A JP 2005079717A JP 2003305394 A JP2003305394 A JP 2003305394A JP 2003305394 A JP2003305394 A JP 2003305394A JP 2005079717 A JP2005079717 A JP 2005079717A
Authority
JP
Japan
Prior art keywords
nat
packet
routing
processing system
communication processing
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.)
Granted
Application number
JP2003305394A
Other languages
Japanese (ja)
Other versions
JP4099124B2 (en
Inventor
Ryuken Ishi
竜権 石
Hiroyoshi Suzuki
弘喜 鈴木
Shinichi Machida
真一 町田
Hiroshi Matsuda
浩 松田
Akihito Inoshita
明史 井ノ下
Kouho Nishida
享邦 西田
Tsugumasa Hayashi
経正 林
Takao Kurahashi
孝雄 倉橋
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.)
Nippon Telegraph and Telephone Corp
Panasonic Holdings Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Matsushita Electric Industrial Co 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 Nippon Telegraph and Telephone Corp, Matsushita Electric Industrial Co Ltd filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2003305394A priority Critical patent/JP4099124B2/en
Publication of JP2005079717A publication Critical patent/JP2005079717A/en
Application granted granted Critical
Publication of JP4099124B2 publication Critical patent/JP4099124B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide packet transfer device and method for performing a NAT processing by high throughput. <P>SOLUTION: A classification device 101 performs selection to give a received packet to a CPU 106 or a routing NAT processing part 102 in accordance with a procedure written in a classification rule table 103. The CPU 106 performs the NAT processing on the packet received from the classification device 101 by using a NAT module and a routing table so as to output it. The CPU writes information (IP address and port number) on a network used in the NAT processing in a NAT table 105. The routing NAT processing part 102 performs the NAT processing on the packet received from the classification device 101 based on the routing table 104 and the NAT table 105. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、パケット転送装置およびパケット転送方法に関する。   The present invention relates to a packet transfer apparatus and a packet transfer method.

従来のパケット転送装置として、特許文献1に記載されているものがある。この従来のパケット転送装置は、FTP(File Transfer Protocol)、H.323及びSIP(Session Initiation Protocol)などNAT(Network Address Translation)を通過することができなかったアプリケーションのNAT通過を実現している。従来のパケット転送装置の一例を図8を参照して説明する。従来のパケット転送装置においては、予めプログラミングされているか、もしくはユーザによって設定された手順に基づいて、特定のパケットのみを選択しその内容を変更するという手段がとられる。ルータ802には予め送信先ポート番号が21であるパケットを選択し、その中に含まれるポートコマンドの内容を書き換えるというルールが設定されている。   As a conventional packet transfer apparatus, there is one described in Patent Document 1. This conventional packet transfer apparatus realizes NAT passage of applications that could not pass NAT (Network Address Translation) such as FTP (File Transfer Protocol), H.323, and SIP (Session Initiation Protocol). An example of a conventional packet transfer apparatus will be described with reference to FIG. In the conventional packet transfer apparatus, a means is adopted in which only a specific packet is selected and its content is changed based on a procedure programmed in advance or set by a user. The router 802 has a rule in which a packet having a destination port number of 21 is selected in advance and the contents of the port command included therein are rewritten.

ここでPC(Personal Computer)801とFTPサーバ803との間でTCP(Transmission Control Protocol)セッションが確立しポートコマンドが送信されると、ルータ802は図8に示すように通常のNAT処理と同様に単に送信元IP(Internet Protocol)アドレス及びポート番号を書き換えるだけでなく、ポートコマンド内のIPアドレス及びポート番号も適当な値に変更する。ただし、ここで変更した値と元の値とは関連付けて保持しておく。これにより、FTPサーバ803は、ポートコマンド応答をPC801に返した後、ルータ802により書き換えられたIPアドレス及びポート番号宛てにデータコネクション用TCPセッションの確立を試みる。ルータ802は、この宛先とPC801が元々ポートコマンドで指定したIPアドレス及びポート番号とを関連付けて保持しているため、正しくPC801にSYN(Synchronize Flag)パケットを送信することができる。そして、以後のFTPによるデータ転送が可能となる。
特表平10−504168号公報
Here, when a TCP (Transmission Control Protocol) session is established between a PC (Personal Computer) 801 and an FTP server 803 and a port command is transmitted, the router 802 performs the same process as the normal NAT processing as shown in FIG. In addition to rewriting the source IP (Internet Protocol) address and port number, the IP address and port number in the port command are also changed to appropriate values. However, the value changed here and the original value are stored in association with each other. As a result, the FTP server 803 returns a port command response to the PC 801 and then tries to establish a TCP session for data connection to the IP address and port number rewritten by the router 802. Since the router 802 associates and holds this destination and the IP address and port number originally designated by the port command by the PC 801, the router 802 can correctly transmit a SYN (Synchronize Flag) packet to the PC 801. Then, subsequent data transfer by FTP becomes possible.
Japanese National Patent Publication No. 10-504168

しかしながら、従来のパケット転送装置においては、新しいアプリケーションの処理に対応するため頻繁にバージョンアップが必要になること、及び、FTP、H.323、RTSPなどの上位層の多様な処理をASIC(Application Specific Integrated Circuit)などのハードウェアで実現することは困難であることなどの理由によりソフトウェアによってNAT処理を行っており、ソフトウェアで上位層の処理まで行うと家庭向けルータなどに用いられる安価なCPUでは高いスループットを得ることができない問題がある。加えてパケットフィルタリングが固定的に設定されるため、ポート番号やメッセージ内容まで確認してパケットフィルタリングするといったきめ細かいパケットフィルタリングが行えないので、セキュリティ的にも問題がある。   However, in the conventional packet transfer apparatus, it is necessary to frequently upgrade in order to cope with processing of new applications, and FTP, H.264, and so on. The NAT processing is performed by software for the reason that it is difficult to realize various processes of the upper layer such as H.323 and RTSP by hardware such as ASIC (Application Specific Integrated Circuit). When processing is performed, there is a problem that an inexpensive CPU used for a home router cannot obtain high throughput. In addition, since packet filtering is fixedly set, detailed packet filtering such as packet filtering after confirming the port number and message content cannot be performed, so there is a security problem.

本発明は、かかる点に鑑みてなされたものであり、高いスループットでNAT処理をするパケット転送装置並びにパケット転送方法を提供すること及び動的パケットフィルタリング装置を提供することを目的とする。   The present invention has been made in view of this point, and an object of the present invention is to provide a packet transfer apparatus and a packet transfer method that perform NAT processing with high throughput, and to provide a dynamic packet filtering apparatus.

請求項1に係る発明のパケット転送装置は、第1の通信処理系と第2の通信処理系とを具備し、前記第1の通信処理系は、クラシファイ装置とクラシファイルールテーブルとルーティングNAT処理手段とルーティングテーブルとNATテーブルとを具備し、前記クラシファイ装置は、受け取るパケットの送り先として前記クラシファイルールテーブルのルール情報に基づいて前記第1の通信処理系及び前記第2の通信処理系のいずれかもしくは、パケット破棄を選択し、前記第2の通信処理系は、前記クラシファイ装置から受け取る前記パケットについてNATモジュールを用いてのNAT処理及び前記ルーティングテーブル又は前記第2の通信処理系が保持する他のルーティングテーブルの情報に基づいての前記パケットのルーティング処理をする他のルーティングNAT処理手段と、当該NAT処理の時に用いる情報を前記NATテーブルに書き込む書込手段と、前記クラシファイルールテーブルに前記ルール情報を書き込む他の書込手段と、を具備し、前記第1の通信処理系の前記ルーティングNAT処理手段は、前記クラシファイ装置から受け取る前記パケットを前記NATテーブル及び前記ルーティングテーブルの情報に基づいて前記NAT処理及び前記ルーティング処理を行う構成を採る。   The packet transfer apparatus according to the first aspect of the present invention includes a first communication processing system and a second communication processing system, and the first communication processing system includes a classification device, a class file table, and a routing NAT process. A class table, a routing table, and a NAT table, wherein the classifying device is a destination of a packet to be received based on rule information of the class file table, whichever one of the first communication processing system and the second communication processing system Alternatively, packet discard is selected, and the second communication processing system performs NAT processing using a NAT module and the routing table or the second communication processing system holds the packet received from the classification device. Routing of the packet based on the routing table information of Other routing NAT processing means for processing, writing means for writing information used in the NAT processing to the NAT table, and other writing means for writing the rule information to the class file table. The routing NAT processing means of the first communication processing system adopts a configuration in which the NAT processing and the routing processing are performed on the packet received from the classification device based on information in the NAT table and the routing table.

この構成によれば、第1の通信処理系のハードウェアによるパケットの高速なルーティング処理及びNAT処理、動的パケットフィルタリング処理と第2の通信処理系のソフトウェアによるパケットのルーティング処理及びNAT処理とを使い分けることにより、複雑なNAT処理が必要なストリームに対しても高いスループットのパケット転送を実現することができる。   According to this configuration, high-speed packet routing processing and NAT processing by the first communication processing system hardware, dynamic packet filtering processing, and packet routing processing and NAT processing by the second communication processing system software are performed. By using them properly, high-throughput packet transfer can be realized even for streams that require complex NAT processing.

請求項2に係る発明の集積回路は、請求項1記載のパケット転送装置における前記第1の通信系を具備する構成を採る。   An integrated circuit according to a second aspect of the invention employs a configuration including the first communication system in the packet transfer apparatus according to the first aspect.

この構成によれば、請求項1の効果に加えて、パケット転送装置の小型軽量化を実現することができる。   According to this configuration, in addition to the effect of the first aspect, the packet transfer device can be reduced in size and weight.

請求項3に係る発明のパケット転送装置の制御方法は、クラシファイ装置が受け取るパケットの送り先としてクラシファイルールテーブルのルール情報に基づいて第1の通信処理系及び第2の通信処理系のいずれかを選択もしくはパケット破棄を行うステップと、前記第2の通信処理系が前記クラシファイ装置から受け取るパケットについてNATモジュールを用いてのNAT処理及び前記ルーティングテーブル又は前記第2の通信処理系が保持する他のルーティングテーブルの情報に基づいての前記パケットのルーティング処理をするステップと、前記第2の通信処理系が当該NAT処理の時に用いる情報をNATテーブルに書き込むステップと、前記第2の通信処理系が前記クラシファイルールテーブルに前記ルール情報を書き込むステップと、前記第1の通信処理系が前記クラシファイ装置から受け取る前記パケットを前記NATテーブル及び前記ルーティングテーブルの情報に基づいて前記NAT処理及び前記ルーティング処理を行うステップと、を具備するようにした。   According to a third aspect of the present invention, there is provided a method for controlling a packet transfer apparatus, wherein a first communication processing system or a second communication processing system is used as a destination of a packet received by a classification device based on rule information of a class file table. A step of selecting or discarding the packet, and a NAT process using a NAT module for the packet received by the second communication processing system from the classification device and other routings held by the routing table or the second communication processing system. A step of routing the packet based on information in the table, a step of writing information used by the second communication processing system to the NAT table in the NAT table, and the second communication processing system The rule information is written to the file table. And flop, the first communication processing system is so equipped, and performing the NAT processing and the routing processing based on the information of the said packet NAT table and the routing table received from the classifier device.

この方法によれば、第1の通信処理系のハードウェアによるパケットの高速なルーティング処理及びNAT処理およびパケットフィルタリング処理と第2の通信処理系のソフトウェアによるパケットのルーティング処理及びNAT処理および動的パケットフィルタリング処理とを使い分けることにより、複雑なNAT処理が必要なストリームに対しても高いスループットのパケット転送を実現することができる。   According to this method, high-speed packet routing processing and NAT processing and packet filtering processing by the first communication processing system hardware and packet routing processing and NAT processing and dynamic packet by the second communication processing software By properly using the filtering process, it is possible to realize a high-throughput packet transfer even for a stream that requires a complicated NAT process.

請求項4に係る発明のパケット転送装置の制御プログラムは、請求項3記載のパケット転送装置の制御方法をコンピュータに実行させる構成を採る。   A control program for a packet transfer apparatus according to a fourth aspect of the invention employs a configuration for causing a computer to execute the control method for the packet transfer apparatus according to the third aspect.

この構成によれば、第1の通信処理系のハードウェアによるパケットの高速なルーティング処理及びNAT処理と第2の通信処理系のソフトウェアによるパケットのルーティング処理及びNAT処理とを使い分けることにより、複雑なNAT処理が必要なストリームに対しても高いスループットのパケット転送を実現することができる。   According to this configuration, the high-speed routing processing and NAT processing of packets by the hardware of the first communication processing system and the packet routing processing and NAT processing of software of the second communication processing system are properly used, thereby making it complicated. High throughput packet transfer can be realized even for a stream that requires NAT processing.

以上説明したように、本発明によれば、第1の通信処理系のハードウェアによるパケットの高速なルーティング処理及びNAT処理、パケットフィルタリング処理と第2の通信処理系のソフトウェアによるパケットのルーティング処理及びNAT処理とを使い分けることにより、高いスループットでパケット転送や動的パケットフィルタリングをすることができる。   As described above, according to the present invention, high-speed packet routing processing and NAT processing by hardware of the first communication processing system, packet filtering processing and packet routing processing by software of the second communication processing system, and By properly using NAT processing, packet transfer and dynamic packet filtering can be performed with high throughput.

本発明の骨子は、第1の通信処理系が備えるクラシファイ装置が、第2の通信処理系により書き込まれるクラシファイルールテーブルの情報に基づいて、ハードウェアによるパケットの高速なルーティング処理とNAT処理およびパケットフィルタリング処理とを行う第1の通信処理系、及び、ソフトウェアによるパケットのルーティング処理とNAT処理とを行う第2の通信処理系のいずれかを選択することである。   The essence of the present invention is that the classification device provided in the first communication processing system performs high-speed routing processing and NAT processing of packets by hardware based on the information in the class file table written by the second communication processing system. One of a first communication processing system that performs packet filtering processing and a second communication processing system that performs packet routing processing and NAT processing by software is selected.

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

図1は、本発明の一実施の形態に係るパケット転送装置の構成を示すブロック図である。   FIG. 1 is a block diagram showing a configuration of a packet transfer apparatus according to an embodiment of the present invention.

本発明の一実施の形態に係るパケット転送装置100は、クラシファイ装置101、ルーティングNAT処理部102、クラシファイルールテーブル103、ルーティングテーブル104、NATテーブル105及びCPU106を備える。   The packet transfer apparatus 100 according to an embodiment of the present invention includes a classification apparatus 101, a routing NAT processing unit 102, a class file table 103, a routing table 104, a NAT table 105, and a CPU 106.

クラシファイ装置101は、クラシファイルールテーブル103に書き込まれた手順に従って、受け取ったパケットをCPU106及びルーティングNAT処理部102のいずれに与えるかもしくは、パケット破棄を行うのかの選択を行う。CPU106は、NATモジュール及びCPU上で実行するOSが保持するルーティングテーブルを用いてクラシファイ装置101から受け取るパケットにNAT処理を施して出力し、かつ、NAT処理で用いたネットワークに関する情報(IPアドレス及びポート番号)をNATテーブル105およびクラシファイルールテーブル103に書き込む。ルーティングNAT処理部102は、ルーティングテーブル104及びNATテーブル105に基づいてクラシファイ装置101から受け取るパケットにNAT処理を施して出力する。なお、CPU106は保持しているルーティングテーブルの情報を定期的にルーティングテーブル104に合わせ込む処理を行う。   The classifying apparatus 101 selects, according to the procedure written in the class file table 103, whether to give the received packet to the CPU 106 or the routing NAT processing unit 102 or to discard the packet. The CPU 106 performs NAT processing on a packet received from the classification device 101 using a routing table held by the NAT module and an OS executed on the CPU, outputs the packet, and information on the network (IP address and port) used in the NAT processing. Number) is written in the NAT table 105 and the class file table 103. The routing NAT processing unit 102 performs NAT processing on a packet received from the classification device 101 based on the routing table 104 and the NAT table 105 and outputs the packet. Note that the CPU 106 performs processing to periodically match the routing table information held in the routing table 104.

パケット転送装置100は、2つの機能ブロックを有している。すなわち、パケット転送装置100は、ルーティング回路部107とCPU106とを有している。ルーティング回路部107は、クラシファイ装置101、クラシファイルールテーブル103、ルーティングテーブル104、NATテーブル105及びルーティングNAT処理部102を有している。CPU106は、ソフトウェアにてIPパケットのフォワーディングを行う。ルーティング回路部107は、ASIC(Application Specific Integrated Circuit)又はFPGA(Field Programmable Gate Array)などの集積回路によって実現され、高速フォワーディングを可能にする。   The packet transfer apparatus 100 has two functional blocks. That is, the packet transfer apparatus 100 includes a routing circuit unit 107 and a CPU 106. The routing circuit unit 107 includes a classification device 101, a class file table 103, a routing table 104, a NAT table 105, and a routing NAT processing unit 102. The CPU 106 forwards the IP packet by software. The routing circuit unit 107 is realized by an integrated circuit such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA), and enables high-speed forwarding.

なお、ここではルーティング回路部107は、クラシファイ装置101、クラシファイルールテーブル103、ルーティングテーブル104、NATテーブル105及びルーティングNAT処理部102からなる集積回路としているが、クラシファイ装置101及びクラシファイルールテーブル103と、ルーティングテーブル104、NATテーブル105及びルーティングNAT処理部102と、を分離して配設する構成としてもよい。   Here, the routing circuit unit 107 is an integrated circuit including the classification device 101, the class file table 103, the routing table 104, the NAT table 105, and the routing NAT processing unit 102. The routing table 104, the NAT table 105, and the routing NAT processing unit 102 may be arranged separately.

また、本発明の一実施の形態に係るパケット転送装置100においては、CPU106は、保持しているルーティングテーブルの情報を定期的に第1の通信処理系としてのルーティング回路部107が備えるルーティングテーブル104に合わせ込む処理を行っているが、第2の通信処理系が他のルーティングテーブルを備えて、CPU106が保持しているルーティングテーブルの情報を定期的に当該他のルーティングテーブルに合わせ込む処理を行う構成としてもよい。   Further, in the packet transfer apparatus 100 according to the embodiment of the present invention, the CPU 106 periodically includes the routing table information held therein in the routing circuit unit 107 as the first communication processing system. However, the second communication processing system includes another routing table, and periodically performs processing for matching the routing table information held by the CPU 106 with the other routing table. It is good also as a structure.

図2は、本発明の一実施の形態に係るパケット転送装置100のCPU106が行うNAT処理において用いるソフトウェアを説明するための図である。図3は、本発明の一実施の形態に係るパケット転送装置100のクラシファイルールテーブルの構成を説明するための図である。図4は、本発明の一実施の形態に係るパケット転送装置100が装置内部でパケットを処理する際のパケットの構成の概略を説明するための図である。図5は、本発明の一実施の形態に係るパケット転送装置100の他のクラシファイルールテーブルの構成を説明するための図である。図6は、本発明の一実施の形態に係るパケット転送装置100のNATテーブルの構成を説明するための図である。図7は、本発明の一実施の形態において、LAN側のPCとWAN側のFTPサーバとがパケット転送装置を介してTCPセッションを確立するまでの一連の処理を説明するための図である。   FIG. 2 is a diagram for explaining software used in NAT processing performed by the CPU 106 of the packet transfer apparatus 100 according to the embodiment of the present invention. FIG. 3 is a diagram for explaining the configuration of the class file table of the packet transfer apparatus 100 according to the embodiment of the present invention. FIG. 4 is a diagram for explaining an outline of a packet configuration when the packet transfer apparatus 100 according to an embodiment of the present invention processes a packet inside the apparatus. FIG. 5 is a diagram for explaining the configuration of another class file table of the packet transfer apparatus 100 according to an embodiment of the present invention. FIG. 6 is a diagram for explaining the configuration of the NAT table of the packet transfer apparatus 100 according to the embodiment of the present invention. FIG. 7 is a diagram for explaining a series of processing until the LAN side PC and the WAN side FTP server establish a TCP session via the packet transfer device in the embodiment of the present invention.

図2において、監視制御部201は、装置状態の定期的な監視及びユーザから入力されたコマンドを受け付けOSが保持するルーティングテーブルやルーティング回路部107の各種テーブルなどに設定を行う。FTP対応NATモジュール202は、TCP/IPプロトコルスタックに動的にロード又はアンロードされ、ポートコマンドの内容書き換えを行う。   In FIG. 2, the monitoring control unit 201 periodically monitors the device status and accepts a command input from the user, and sets the routing table held by the OS and various tables of the routing circuit unit 107. The FTP-compatible NAT module 202 is dynamically loaded or unloaded on the TCP / IP protocol stack, and rewrites the contents of the port command.

次に、パケット転送装置100の動作について、図1から図6を参照しつつ図7に示す流れに沿って説明する。ここでは、パケット転送装置100は、監視制御部201によりFTPのNAT通過を行えるようにクラシファイルールテーブル103に図3に示す設定がなされ、かつ、FTP対応NATモジュール202はOSからTCP/IPプロトコルスタックにロードされた状態になっているものとする。   Next, the operation of the packet transfer apparatus 100 will be described along the flow shown in FIG. 7 with reference to FIGS. Here, in the packet transfer apparatus 100, the setting shown in FIG. 3 is set in the class file table 103 so that the monitoring control unit 201 can perform the NAT of FTP, and the FTP-compatible NAT module 202 is set by the OS from the TCP / IP protocol. Assume that it is loaded on the stack.

図3において、No.1及びNo.2のエントリーがFTPのNAT通過に必要な設定である。具体的には、クラシファイ装置101が、受け取るパケットのポートコマンドに格納される送信先ポート番号(LAN側のPC701からFTPサーバ702への方向を意味する)または送信元ポート番号(FTPサーバ702からLAN側のPC701への方向を意味する)が21であるパケットをCPU106に転送するように設定されている。ここで、各項目において「―」が記述されているところは、当該項目がDon’t Careとなっていることを示す。なお、No.3および4のエントリーは、WANすなわち外部ネットワークからのTCPセッション確立要求であるSYNパケット(すなわちAck bit(Positive Acknowledgement Bit)がOFFである)の通過を許可しない設定であり、この設定は多くのホームルータで登録される設定である。   In FIG. 1 and no. The entry of 2 is a setting necessary for passing through the NAT of FTP. Specifically, the classification device 101 receives a destination port number (meaning a direction from the PC 701 on the LAN side to the FTP server 702) or a source port number (from the FTP server 702 to the LAN) stored in the port command of the received packet. Is set to transfer to the CPU 106 a packet whose value is 21). Here, “-” in each item indicates that the item is Do n’t Care. In addition, No. The entries 3 and 4 are settings that do not allow passage of SYN packets (that is, Ack bit (Positive Acknowledgment Bit) is OFF) that is a TCP session establishment request from the WAN, that is, an external network. This setting is registered on the router.

この状態でLAN側に存在するPC701から送信先ポート番号21のパケットをクラシファイ装置101が受け取ると、クラシファイ装置101はパケットをCPU106に転送する。この際に、クラシファイ装置101は、図4に示すように、イーサネット(R)ヘッダからトレイラまでの標準フレームフォーマットの末尾に、さらに独自情報を付加してCPU106に転送する。なお、この独自情報は様々な目的で使用することが可能である。ここでは、独自情報はNATモジュールを起動すべきパケットであることを識別するためのエリアとして使用する。当該エリアの所定のビットがONの場合、NATモジュールを起動するものとする。なお、本実施例において、クラシファイ装置101はクラシファイルールにおいて特定のポート番号が指定されている場合(例えば図3のNo.1および2)に本ビットをONにするものとする。   In this state, when the classification device 101 receives the packet of the transmission destination port number 21 from the PC 701 existing on the LAN side, the classification device 101 transfers the packet to the CPU 106. At this time, as shown in FIG. 4, the classification device 101 further adds unique information to the end of the standard frame format from the Ethernet (R) header to the trailer and transfers it to the CPU 106. This unique information can be used for various purposes. Here, the unique information is used as an area for identifying that the NAT module should be activated. When the predetermined bit of the area is ON, the NAT module is activated. In the present embodiment, it is assumed that the classifying apparatus 101 turns on this bit when a specific port number is specified in the class file (for example, No. 1 and No. 2 in FIG. 3).

次に、クラシファイ装置101は、LAN側のPC701から送られるTCPセッションの確立要求のためのパケットに対してFTPサーバ702が送信する応答パケットを受け取る。このとき、ポート番号が21のパケットはCPU106に渡すようにクラシファイルールテーブル103に設定されているため、クラシファイ装置101はそのパケットをCPU106に渡す。これにより、FTPの制御コネクション用のセッションが確立し、PC701からPORTコマンドを含むパケットが送信され、ルーティング回路部107が受信しクラシファイ装置101がクラシファイルールテーブル103を参照する。   Next, the classification apparatus 101 receives a response packet transmitted from the FTP server 702 in response to a packet for establishing a TCP session sent from the PC 701 on the LAN side. At this time, since the packet with the port number 21 is set in the class file table 103 so as to be passed to the CPU 106, the classifier 101 passes the packet to the CPU 106. As a result, an FTP control connection session is established, a packet including a PORT command is transmitted from the PC 701, the routing circuit unit 107 receives it, and the classifier 101 refers to the class file table 103.

こうしてCPU106に転送されたPORTコマンドを含むパケットは、図4に示すTCP/IPプロトコルスタック(具体的には、イーサネット(R)ドライバ、IP、TCP)によってレイヤ毎の処理が施される。パケットがTCP層までの処理を施された後、CPU106は、図4に示す独自情報エリアを参照し、ビットが立っているかどうかをチェックする。ここではビットがONのため、さらにFTP対応NATモジュール202を起動する。ここでのFTP対応NATモジュール202のパケット内容書き換え処理は、送信元IPアドレスとポート番号の変更(それぞれ192.168.0.10→202.19.176.120、5038→8279へ変更)及びPORTコマンドの中のIPアドレスとポート番号の変更(それぞれ192.168.0.10→202.19.176.120、2000→3083へ変更)である。   The packet including the PORT command transferred to the CPU 106 in this manner is subjected to processing for each layer by the TCP / IP protocol stack (specifically, Ethernet (R) driver, IP, TCP) shown in FIG. After the packet is processed up to the TCP layer, the CPU 106 refers to the unique information area shown in FIG. 4 and checks whether a bit is set. Here, since the bit is ON, the FTP-compatible NAT module 202 is further activated. The packet content rewriting process of the FTP-compatible NAT module 202 is performed by changing the source IP address and port number (change from 192.168.0.10 to 202.19.176.120 and 5038 to 8279, respectively), and the IP address and port in the PORT command. Number change (change from 192.168.0.10 to 202.19.176.120 and 2000 to 3083, respectively).

次に、以降のパケットのフォワーディングをルーティングNAT処理部102で高速に行えるようにするために、CPU106は、クラシファイルールテーブル103及びNATテーブル105の内容の設定を行う。具体的には、CPU106は、上述のFTP対応NATモジュール202によるパケットの内容の変更情報を基に、図5に示すクラシファイルールテーブルのエントリーNo.3のように、送信先IPアドレス及び送信先ポートがそれぞれ202.19.176.120と3083であるパケットがクラシファイ装置101によりルーティングNAT処理部102へ渡されるように設定する。このクラシファイヤの設定により図3の設定では通過できなかった送信先IPアドレス及び送信先ポートが202.19.176.120と3083であるパケットが通過できるようになり、動的パケットフィルタリングを実現する。また、CPU106は、図6に示すNATテーブル105のエントリーNo.2の旧送信元IPアドレス、旧送信元ポート、新送信元IPアドレス及び新送信元ポートをそれぞれ192.168.0.10、2000、202.19.176.120及び3083に設定する。   Next, the CPU 106 sets the contents of the class file table 103 and the NAT table 105 so that the routing NAT processing unit 102 can perform subsequent packet forwarding at high speed. Specifically, the CPU 106 changes the entry number of the class file table shown in FIG. 3, it is set so that packets whose destination IP address and destination port are 202.19.176.120 and 3083, respectively, are passed to the routing NAT processing unit 102 by the classifier 101. With this classifier setting, packets whose transmission destination IP addresses and transmission destination ports are 202.19.176.120 and 3083 that could not pass in the setting of FIG. 3 can be passed, thereby realizing dynamic packet filtering. Further, the CPU 106 sets the entry number of the NAT table 105 shown in FIG. The old transmission source IP address, the old transmission source port, the new transmission source IP address, and the new transmission source port are set to 192.168.0.10, 2000, 202.19.176.120, and 3083, respectively.

次に、クラシファイ装置101は、FTPサーバ702が送信するPORT応答パケットを受け取る。このとき、ポート番号が21のパケットはCPU106に渡すようにクラシファイルールテーブル103に設定されているため、クラシファイ装置101はそのパケットをCPU106に渡す。ここで、図7においては、便宜上ルーティング回路部107のクラシファイ装置101を通らずに直接CPU106にパケットが渡されているように表現している。   Next, the classification device 101 receives a PORT response packet transmitted from the FTP server 702. At this time, since the packet with the port number 21 is set in the class file table 103 so as to be passed to the CPU 106, the classifier 101 passes the packet to the CPU 106. Here, in FIG. 7, for the sake of convenience, it is expressed that the packet is directly passed to the CPU 106 without passing through the classification device 101 of the routing circuit unit 107.

CPU106は、そのパケットの情報を書き換えると共にNATテーブル105を参照してLAN側のPC701に転送する。また、以降のパケットフォワーディングをルーティングNAT処理部102で高速に行えるようにするために、そのFTPサーバ702からの応答パケットのポートコマンドに含まれるアドレス及びポートの番号を基に図6に示すNATテーブル105のエントリーNo.2の設定を完成させる。ここで、NATテーブル105において「送信元」「送信先」は、それぞれLANからWANへの上り方向のパケットに対しての「送信元」「送信先」を意味する。旧送信元とはLAN側のPC701を意味し、新送信元とはルータ自身を意味する。   The CPU 106 rewrites the packet information and transfers it to the LAN-side PC 701 with reference to the NAT table 105. Further, in order to enable subsequent packet forwarding at high speed in the routing NAT processing unit 102, the NAT table shown in FIG. 6 is based on the address and port number included in the port command of the response packet from the FTP server 702. No. 105 entry No. Complete the second setting. Here, in the NAT table 105, “transmission source” and “transmission destination” mean “transmission source” and “transmission destination” for uplink packets from the LAN to the WAN, respectively. The old transmission source means the PC 701 on the LAN side, and the new transmission source means the router itself.

以上の処理により、NATテーブル105が完成されるため、FTPサーバ702から転送されるファイルデータのパケットはCPU106においてソフトウェアによる処理を施されることなく、ルーティングNAT処理部102においてルーティングテーブル104及びNATテーブル105を基に高速にルーティング処理及びNAT処理が施される。   The NAT table 105 is completed by the above processing, so that the file data packet transferred from the FTP server 702 is not processed by software in the CPU 106, and the routing NAT processing unit 102 performs the routing table 104 and the NAT table. Based on 105, routing processing and NAT processing are performed at high speed.

本発明の一実施の形態によれば、第2の通信処理系のソフトウェアによるNAT処理を少なくして第1の通信処理系によるハードウェアによる高速フォワーディングを行うことにより、高スループットのパケット転送を実現できる。   According to an embodiment of the present invention, high throughput packet transfer is realized by reducing NAT processing by software of the second communication processing system and performing high-speed forwarding by hardware by the first communication processing system. it can.

なお、以上の説明は、アプリケーションとしてFTPを想定して記述したが、CPU106は、H.323の場合にはSETUPメッセージの中の送信元IPアドレスを書き換え、また、SIPの場合にはINVITEメッセージの中の送信元IPアドレス、更にRTSPであっても、SETUPメッセージ内の宛先IPアドレスとポート番号を書き換えればよい。従って、最初に設定するクラシファイルールテーブルの設定内容、および、NATモジュールの内容を変更または追加することにより、パケット転送装置100は、これまでの記述とほぼ同様にパケットのNAT通過や動的パケットフィルタリングを容易に実現することができる。   Note that the above description has been described assuming FTP as an application. In the case of H.323, the source IP address in the SETUP message is rewritten, in the case of SIP, the source IP address in the INVITE message, and even in the case of RTSP, the destination IP address and port in the SETUP message You only have to rewrite the number. Therefore, by changing or adding the setting contents of the class file table to be initially set and the contents of the NAT module, the packet transfer apparatus 100 can perform the NAT passage of packets and the dynamic packet in substantially the same manner as described above. Filtering can be easily realized.

また、本発明の一実施の形態は、第2の通信処理系によりNATテーブルに情報を書き込んだ後には、そのNATテーブル及びルーティングテーブルに基づいて第1の通信処理系がルーティング処理及びNAT処理を行うように第2の通信処理系がクラシファイルールテーブルを書き換えているが、パケットの内容によりそのパケットの送り先をクラシファイ装置が臨機応変に選択できるように第2の通信処理系がクラシファイルールテーブルを必要に応じて書き換える構成としてもよい。   In the embodiment of the present invention, after the information is written in the NAT table by the second communication processing system, the first communication processing system performs the routing process and the NAT process based on the NAT table and the routing table. The second communication processing system rewrites the class file table so that the second communication processing system can select the destination of the packet according to the contents of the packet. It is good also as a structure which rewrites as needed.

本発明に係るパケット転送装置およびパケット転送方法は、高いスループットでパケット転送や動的パケットフィルタリングをすることができるものとして有用である。   The packet transfer apparatus and the packet transfer method according to the present invention are useful as those capable of performing packet transfer and dynamic packet filtering with high throughput.

本発明の一実施の形態に係るパケット転送装置の構成を示すブロック図The block diagram which shows the structure of the packet transfer apparatus which concerns on one embodiment of this invention 本発明の一実施の形態に係るパケット転送装置のCPUが行うNAT処理において用いるソフトウェアを説明するための図The figure for demonstrating the software used in the NAT process which CPU of the packet transfer apparatus concerning one embodiment of this invention performs 本発明の一実施の形態におけるクラシファイルールテーブルの構成を説明するための図The figure for demonstrating the structure of the class file table in one embodiment of this invention 本発明の一実施の形態におけるパケットの構成の概略を説明するための図The figure for demonstrating the outline of a structure of the packet in one embodiment of this invention 本発明の一実施の形態における他のクラシファイルールテーブルの構成を説明するための図The figure for demonstrating the structure of the other class file table in one embodiment of this invention 本発明の一実施の形態におけるNATテーブルの構成を説明するための図The figure for demonstrating the structure of the NAT table in one embodiment of this invention 本発明の一実施の形態におけるパケット転送装置を介してTCPセッションを確立するまでの一連の処理を説明するための図The figure for demonstrating a series of processes until a TCP session is established via the packet transfer apparatus in one embodiment of this invention 従来のパケット転送装置の一例を示した図The figure which showed an example of the conventional packet transfer apparatus

符号の説明Explanation of symbols

101 クラシファイ装置
102 ルーティングNAT処理部
103 クラシファイルールテーブル
104 ルーティングテーブル
105 NATテーブル
106 CPU
107 ルーティング回路部
201 監視制御部
202 FTP対応NATモジュール
701 PC
702 FTPサーバ
DESCRIPTION OF SYMBOLS 101 Classifier 102 Routing NAT processing part 103 Class file table 104 Routing table 105 NAT table 106 CPU
107 Routing Circuit Unit 201 Monitoring Control Unit 202 FTP Compatible NAT Module 701 PC
702 FTP server

Claims (4)

第1の通信処理系と第2の通信処理系とを具備し、
前記第1の通信処理系は、クラシファイ装置とクラシファイルールテーブルとルーティングNAT処理手段とルーティングテーブルとNATテーブルとを具備し、
前記クラシファイ装置は、受け取るパケットの送り先として前記クラシファイルールテーブルのルール情報に基づいて前記第1の通信処理系及び前記第2の通信処理系のいずれか、もしくはパケット破棄を選択し、
前記第2の通信処理系は、前記クラシファイ装置から受け取る前記パケットについてNATモジュールを用いてのNAT処理及び前記ルーティングテーブル又は前記第2の通信処理系が保持する他のルーティングテーブルの情報に基づいての前記パケットのルーティング処理をする他のルーティングNAT処理手段と、当該NAT処理の時に用いる情報を前記NATテーブルに書き込む書込手段と、前記クラシファイルールテーブルに前記ルール情報を書き込む他の書込手段と、を具備し、
前記第1の通信処理系の前記ルーティングNAT処理手段は、前記クラシファイ装置から受け取る前記パケットに対し前記NATテーブル及び前記ルーティングテーブルの情報に基づいて前記NAT処理及び前記ルーティング処理を行うことを特徴とするパケット転送装置。
A first communication processing system and a second communication processing system;
The first communication processing system includes a classification device, a class file table, a routing NAT processing means, a routing table, and a NAT table,
The classification device selects either the first communication processing system or the second communication processing system or packet discard based on the rule information of the class file table as a destination of the received packet,
The second communication processing system is configured to perform NAT processing using a NAT module on the packet received from the classification device and information on the routing table or another routing table held by the second communication processing system. Other routing NAT processing means for routing the packet, writing means for writing information used in the NAT processing to the NAT table, and other writing means for writing the rule information to the class file table , And
The routing NAT processing means of the first communication processing system performs the NAT processing and the routing processing on the packet received from the classification device based on information of the NAT table and the routing table. Packet transfer device.
請求項1記載のパケット転送装置における前記第1の通信処理系を具備することを特徴とする集積回路。   2. An integrated circuit comprising the first communication processing system in the packet transfer apparatus according to claim 1. クラシファイ装置が受け取るパケットの送り先としてクラシファイルールテーブルのルール情報に基づいて第1の通信処理系及び第2の通信処理系のいずれかを選択もしくはパケット破棄を行うステップと、
前記第2の通信処理系が前記クラシファイ装置から受け取るパケットについてNATモジュールを用いてのNAT処理及び前記ルーティングテーブル又は前記第2の通信処理系が保持する他のルーティングテーブルの情報に基づいての前記パケットのルーティング処理をするステップと、前記第2の通信処理系が当該NAT処理の時に用いる情報をNATテーブルに書き込むステップと、前記第2の通信処理系が前記クラシファイルールテーブルに前記ルール情報を書き込むステップと、
前記第1の通信処理系が前記クラシファイ装置から受け取る前記パケットを前記NATテーブル及び前記ルーティングテーブルの情報に基づいて前記NAT処理及び前記ルーティング処理を行うステップと、を具備することを特徴とするパケット転送装置の制御方法。
Selecting one of the first communication processing system and the second communication processing system or discarding the packet based on the rule information of the class file table as the destination of the packet received by the classification device;
The packet received by the second communication processing system from the classification device based on NAT processing using a NAT module and information on the routing table or other routing table held by the second communication processing system A routing process, a step in which the second communication processing system writes information used in the NAT process to the NAT table, and a second communication processing system writes the rule information in the class file table. Steps,
Performing the NAT process and the routing process on the basis of information of the NAT table and the routing table for the packet received by the first communication processing system from the classification device. Control method of the device.
請求項3記載のパケット転送装置の制御方法をコンピュータに実行させるパケット転送装置の制御プログラム。   A control program for a packet transfer apparatus that causes a computer to execute the control method for the packet transfer apparatus according to claim 3.
JP2003305394A 2003-08-28 2003-08-28 Packet transfer apparatus and packet transfer method Expired - Fee Related JP4099124B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003305394A JP4099124B2 (en) 2003-08-28 2003-08-28 Packet transfer apparatus and packet transfer method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003305394A JP4099124B2 (en) 2003-08-28 2003-08-28 Packet transfer apparatus and packet transfer method

Publications (2)

Publication Number Publication Date
JP2005079717A true JP2005079717A (en) 2005-03-24
JP4099124B2 JP4099124B2 (en) 2008-06-11

Family

ID=34408820

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003305394A Expired - Fee Related JP4099124B2 (en) 2003-08-28 2003-08-28 Packet transfer apparatus and packet transfer method

Country Status (1)

Country Link
JP (1) JP4099124B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007221240A (en) * 2006-02-14 2007-08-30 Nippon Telegr & Teleph Corp <Ntt> Device and method for controlling passage of packet
CN112087533A (en) * 2020-09-11 2020-12-15 北京青云科技股份有限公司 Message processing method, device, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007221240A (en) * 2006-02-14 2007-08-30 Nippon Telegr & Teleph Corp <Ntt> Device and method for controlling passage of packet
CN112087533A (en) * 2020-09-11 2020-12-15 北京青云科技股份有限公司 Message processing method, device, equipment and storage medium
CN112087533B (en) * 2020-09-11 2023-05-09 北京青云科技股份有限公司 Message processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
JP4099124B2 (en) 2008-06-11

Similar Documents

Publication Publication Date Title
US8817797B2 (en) Method and apparatus for multipath protocol packet relay
JP4627669B2 (en) Packet transfer apparatus and transfer control method thereof
US9807134B2 (en) Method and device for filtering media packets
EP1771998B1 (en) Systems and methods for optimizing communications between network nodes
CN107113342B (en) Relay optimization using software defined networks
US8447802B2 (en) Address manipulation to provide for the use of network tools even when transaction acceleration is in use over a network
KR19980070104A (en) How to Improve Session and Transport Layer Proxies with Transport Control Protocol Glue
US20190215384A1 (en) Efficient parsing of optional header fields
JP2010510715A (en) How to remove redundant connections
US20090043889A1 (en) Communication system, data processing apparatus, server, data processing method, program that executes the data processing method, and recording medium to record the program
WO2013063791A1 (en) Nat/firewall accelerator
US20190075061A1 (en) Transparent and efficient multi-destination tcp communications based on bit indexed explicit replication
US8739270B1 (en) Trusted, cross domain information sharing between multiple legacy and IP based devices
US7130266B2 (en) Handling of data packets
JP2006148903A (en) Tunneling method and tunneling apparatus for multicasting
JP4099124B2 (en) Packet transfer apparatus and packet transfer method
JP2006295787A (en) System, apparatus, and method for information processing
JP2005260415A (en) Network repeating device
JP2006005548A (en) Method, device and program for preventing unauthorized access
JP2010166189A (en) Ip repeater, communication system, and tcp flow control method used for them
JP2005094050A (en) Packet transfer apparatus and packet transfer method
JP4469691B2 (en) Communication control device
JP2006238161A (en) Packet-switching apparatus and packet processing method
JP2005064803A (en) Packet transfer apparatus
CN1552147A (en) Performance intensifying proxy and method for infensifying performance

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050808

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070918

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070925

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071120

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080314

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110321

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110321

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120321

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130321

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130321

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees