JP2009038555A - Network apparatus - Google Patents

Network apparatus Download PDF

Info

Publication number
JP2009038555A
JP2009038555A JP2007200541A JP2007200541A JP2009038555A JP 2009038555 A JP2009038555 A JP 2009038555A JP 2007200541 A JP2007200541 A JP 2007200541A JP 2007200541 A JP2007200541 A JP 2007200541A JP 2009038555 A JP2009038555 A JP 2009038555A
Authority
JP
Japan
Prior art keywords
rule
session information
filtering
filtering rule
session
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
JP2007200541A
Other languages
Japanese (ja)
Other versions
JP4900119B2 (en
Inventor
Nobuhiko Kamimura
信彦 上村
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.)
Yamaha Corp
Original Assignee
Yamaha Corp
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 Yamaha Corp filed Critical Yamaha Corp
Priority to JP2007200541A priority Critical patent/JP4900119B2/en
Publication of JP2009038555A publication Critical patent/JP2009038555A/en
Application granted granted Critical
Publication of JP4900119B2 publication Critical patent/JP4900119B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a network apparatus for updating filtering rule, while session data of the established session is maintained. <P>SOLUTION: The network apparatus 1 determines acknowledgment or non-acknowledgment of transfer of packets trying to pass through the network between LAN and WAN based on the filtering rule. When the packets pass through the network based on this filtering rule, a session is established. The network apparatus 1 stores session information of the session established in relation to the corresponding filtering rule. When the filtering rule is updated, the network apparatus 1 evaluates the session information and the corresponding filtering rule within the range of applying influence on the update. On the basis of the evaluation result, the network apparatus 1 stores again the session information and the corresponding filtering rule. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

この発明は、送受信するパケットを選別するパケットフィルタリング機能を備えたネットワーク機器に関する。   The present invention relates to a network device having a packet filtering function for selecting packets to be transmitted and received.

ルータ等のネットワーク機器に搭載される一般的なファイヤーウォール機能は、送受信するパケットが通過属性を有するパケットであるかを選別し、該通過属性を有するパケットのみを通過させ、通過属性を有しないパケットは破棄するというパケットフィルタリング機能を有している。このパケットフィルタリング機能は、パケットを選別するためのルールであるフィルタリングルールを複数用いる場合が多い。このフィルタイリングルールに基づいて、パケットが通過することで、セッションが確立する(特許文献1参照。)。   A general firewall function installed in a network device such as a router selects whether a packet to be transmitted / received is a packet having a passage attribute, passes only a packet having the passage attribute, and does not have a passage attribute. Has a packet filtering function of discarding. This packet filtering function often uses a plurality of filtering rules, which are rules for selecting packets. A session is established when a packet passes based on this filtering rule (see Patent Document 1).

セッションが切断すると、通信状態を維持できないので、セッションを維持したまま各種ネットワーク接続のための処理を行いたい。例えば、特許文献1では、セッションを維持したままネットワーク機器等を切り替える方法について記載されている。
特開2004−274552号公報
If the session is disconnected, the communication state cannot be maintained, so we want to perform processing for various network connections while maintaining the session. For example, Patent Document 1 describes a method for switching a network device or the like while maintaining a session.
JP 2004-274552 A

しかしながら、ネットワーク機器が記憶するフィルタリングルールが更新されると、確立しているセッションは切断され、更新後のフィルタリングルールに基づいて新たにセッションが確立される。つまり、フィルタリングルールが更新されると、その時点の通信状態を維持し続けられない。   However, when the filtering rule stored in the network device is updated, the established session is disconnected, and a new session is established based on the updated filtering rule. That is, when the filtering rule is updated, the communication state at that time cannot be maintained.

そこで、フィルタリングルールを更新しても、確立しているセッションを維持することができるネットワーク機器を提供することを目的とする。   Therefore, an object of the present invention is to provide a network device that can maintain an established session even if the filtering rule is updated.

請求項1の発明は、複数のネットワークに接続されたネットワーク機器であって、パケットの属性を判定する判定条件と、この判定条件に合致したパケットに対して実行する動作を指定する動作指定情報とを含むフィルタリングルールを、その実行に際して優先順位の高いものから順に記憶するルール記憶部と、ネットワーク機器を介してセッションが確立した時のセッション情報を、該セッション情報に対応するフィルタリングルールの識別番号と関連付けて記憶するセッション記憶部と、前記ルール記憶部に記憶されたフィルタリングルールが更新されると、前記セッション記憶部に記憶されたセッション情報に対して、前記ルール記憶部に記憶された複数のフィルタリングルールが対応するか否か評価する評価手段と、前記評価手段の評価結果に基づいて、前記セッション記憶部に記憶されたセッション情報とフィルタリングルールの識別番号との関連付けを更新する更新手段と、を備え、前記評価手段は、更新されたフィルタリングルール、または、該更新されたフィルタリングルールより優先順位が低いフィルタリングルールの識別番号に関連付けられたセッション情報に対して評価することを特徴とする。   The invention of claim 1 is a network device connected to a plurality of networks, a determination condition for determining an attribute of a packet, and operation designation information for designating an operation to be performed on a packet that matches the determination condition A rule storage unit that stores the filtering rules in order from the highest priority in the execution thereof, and the session information when the session is established through the network device, the identification number of the filtering rule corresponding to the session information, and When a session storage unit stored in association and a filtering rule stored in the rule storage unit are updated, a plurality of filterings stored in the rule storage unit with respect to session information stored in the session storage unit An evaluation means for evaluating whether or not the rule corresponds; and Update means for updating the association between the session information stored in the session storage unit and the identification number of the filtering rule based on the result of the evaluation, and the evaluation means includes the updated filtering rule or the update Evaluation is performed on session information associated with an identification number of a filtering rule having a lower priority than the filtered filtering rule.

この構成では、ネットワーク機器は、ルータ等のファイヤーウォール機能を備え、ネットワーク間を通過するパケットに対して通過の可否を判定するフィルタリングルールと、セッションが確立した時のセッション情報と、を記憶する。このセッション情報は、対応するフィルタリングルールの識別番号と関連付けて記憶される。ネットワーク機器は、フィルタリングルールが更新されると、更新されたフィルタリングルールより優先順位が低いフィルタリングルールの識別番号に関連付けられたセッション情報に対して、フィルタリングルールと対応するか否か評価する。これにより、ネットワーク機器は、フィルタリングルールが更新されると、セッション情報を更新後のフィルタリングルールに対応するか否か評価し、評価結果に基づいて、セッション情報とフィルタリングルールの識別番号を関連付けて記憶する。このため、変更後のフィルタリングルールの下でも維持されるべきセッションについては、確立したセッションのセッション情報を維持したままで、フィルタリングルールを更新することができる。   In this configuration, the network device has a firewall function such as a router, and stores a filtering rule for determining whether or not a packet passing between networks is allowed to pass, and session information when a session is established. This session information is stored in association with the identification number of the corresponding filtering rule. When the filtering rule is updated, the network device evaluates whether the session information associated with the identification number of the filtering rule having a lower priority than the updated filtering rule corresponds to the filtering rule. Thereby, when the filtering rule is updated, the network device evaluates whether the session information corresponds to the updated filtering rule, and stores the session information and the identification number of the filtering rule in association with each other based on the evaluation result. To do. Therefore, for a session that should be maintained under the changed filtering rule, the filtering rule can be updated while maintaining the session information of the established session.

請求項2の発明は、前記評価手段は、前記ルール記憶部にフィルタリングルールが追加されると、追加されたフィルタリングルールより優先順位が低いフィルタリングルールの識別番号に関連付けられたセッション情報に対して、追加されたフィルタリングルールが対応するか否か評価し、前記更新手段は、追加されたフィルタリングルールが対応するセッション情報を、追加されたフィルタリングルールの識別番号と関連付けるように更新することを特徴とする。   In the invention of claim 2, when the filtering means is added to the rule storage unit, the evaluation unit performs the following on the session information associated with the identification number of the filtering rule having a lower priority than the added filtering rule: It is evaluated whether or not the added filtering rule corresponds, and the updating unit updates the session information corresponding to the added filtering rule so as to be associated with the identification number of the added filtering rule. .

この構成では、フィルタリングルールの追加時、ネットワーク機器は、追加されたフィルタリングルールより優先順位が低いフィルタリングルールに関連付けられたセッション情報に対して、追加されたフィルタリングルールと対応するか否か評価する。ネットワーク機器は、追加されたフィルタリングルールに対応するセッション情報を、追加されたフィルタリングルールと関連付ける。これにより、ネットワーク機器は、追加されたフィルタリングルールの影響を受けるセッション情報のみに対して評価を行う。このため、ネットワーク機器は、変更後のフィルタリングルールの下でも維持されるべきセッションについては、セッション情報を維持したままフィルタリングルールを更新することができる。   In this configuration, when adding a filtering rule, the network device evaluates whether session information associated with a filtering rule having a lower priority than the added filtering rule corresponds to the added filtering rule. The network device associates session information corresponding to the added filtering rule with the added filtering rule. As a result, the network device evaluates only the session information affected by the added filtering rule. Therefore, the network device can update the filtering rule while maintaining the session information for the session that should be maintained even under the changed filtering rule.

請求項3の発明は、前記評価手段は、前記ルール記憶部からフィルタリングルールが削除されると、削除されたフィルタリングルールの識別番号に関連付けられたセッション情報に対して、削除されたフィルタリングルールより優先順位の低いフィルタリングルールが対応するか否か評価し、前記更新手段は、削除されたフィルタリングルールの識別番号に関連付けられたセッション情報を、削除後に残るフィルタリングルールの内で対応する最も優先順位が高いフィルタリングルールの識別番号に関連付けるように更新することを特徴とする。   In the invention of claim 3, when the filtering rule is deleted from the rule storage unit, the evaluation unit has priority over the deleted filtering rule with respect to the session information associated with the identification number of the deleted filtering rule. It is evaluated whether or not a filtering rule with a lower rank corresponds, and the updating means has the highest priority corresponding to the session information associated with the identification number of the deleted filtering rule among the filtering rules remaining after deletion. The update is performed so as to be associated with the identification number of the filtering rule.

この構成では、フィルタリングルールの削除時、ネットワーク機器は、削除されたフィルタリングルールに関連付けられたセッション情報に対して、削除されたフィルタリングルールより優先順位が低いフィルタリングルールと対応するか否か評価する。ネットワーク機器は、削除されたフィルタリングルールに関連付けられたセッション情報を、対応するフィルタリングルールの中で最も優先順位が高いフィルタリングルールと関連付ける。これにより、ネットワーク機器は、削除されたフィルタリングルールの影響を受けるセッション情報のみに対して評価を行う。このため、ネットワーク機器は、変更後のフィルタリングルールの下でも維持されるべきセッションについては、セッション情報を維持したままフィルタリングルールを更新することができる。   In this configuration, when a filtering rule is deleted, the network device evaluates whether or not the session information associated with the deleted filtering rule corresponds to a filtering rule having a lower priority than the deleted filtering rule. The network device associates the session information associated with the deleted filtering rule with the filtering rule having the highest priority among the corresponding filtering rules. As a result, the network device evaluates only the session information affected by the deleted filtering rule. Therefore, the network device can update the filtering rule while maintaining the session information for the session that should be maintained even under the changed filtering rule.

請求項4の発明は、前記評価手段は、前記ルール記憶部のフィルタリングルールが変更されると、変更前のフィルタリングルールの識別番号に関連付けられたセッション情報に対して、変更後のフィルタリングルール及び変更後のフィルタリングルールより優先順位の低いフィルタリングルールが対応するか否か評価し、前記更新手段は、変更前のフィルタリングルールの識別番号に対応付けられたセッション情報を、変更後に存在するフィルタリングルールの内で対応する最も優先順位が高いフィルタリングルールの識別番号に関連付けるように更新することを特徴とする。   According to a fourth aspect of the present invention, when the filtering rule in the rule storage unit is changed, the evaluation unit changes the filtering rule and the change after changing the session information associated with the identification number of the filtering rule before the change. It is evaluated whether or not a filtering rule having a lower priority than a later filtering rule is supported, and the updating unit displays session information associated with the identification number of the filtering rule before the change among the filtering rules existing after the change. And updating so as to be associated with the identification number of the filtering rule with the highest priority corresponding to.

この構成では、フィルタリングルールの変更時、ネットワーク機器は、変更されたフィルタリングルールに関連付けられたセッション情報に対して、変更されたフィルタリングルール又は変更されたフィルタリングルールより優先順位が低いフィルタリングルールに対応するか否か評価する。ネットワーク機器は、変更されたフィルタリングルールに関連付けられたセッション情報を、変更されたフィルタリングルールを含む対応するフィルタリングルールの中で最も優先順位が高いフィルタリングルールと関連付ける。これにより、ネットワーク機器は、変更されたフィルタリングルールの影響を受けるセッション情報のみに対して評価を行う。このため、ネットワーク機器は、変更後のフィルタリングルールの下でも維持されるべきセッションについては、セッション情報を維持したままフィルタリングルールを更新することができる。   In this configuration, when the filtering rule is changed, the network device corresponds to the changed filtering rule or a filtering rule having a lower priority than the changed filtering rule for the session information associated with the changed filtering rule. Evaluate whether or not. The network device associates the session information associated with the changed filtering rule with the filtering rule having the highest priority among the corresponding filtering rules including the changed filtering rule. As a result, the network device evaluates only the session information affected by the changed filtering rule. Therefore, the network device can update the filtering rule while maintaining the session information for the session that should be maintained even under the changed filtering rule.

請求項5の発明は、前記評価手段は、前記ルール記憶部のフィルタリングルールの順序を入れ替えると、入れ替えたフィルタリングルールの識別番号に関連付けられたセッション情報に対して、入れ替えたフィルタリングルールより優先順位の低い、且つ、入れ替え後に入れ替えたフィルタリングルールより優先順位の高いフィルタリングルールが対応するか否か評価し、前記更新手段は、入れ替えたフィルタリングルールの識別番号に関連付けられたセッション情報を、入れ替え後のフィルタリングルールの内で対応する最も優先順位が高いフィルタリングルールの識別番号に関連付けるように更新することを特徴とする。   In the invention of claim 5, when the order of the filtering rules in the rule storage unit is changed, the evaluation unit has a higher priority than the changed filtering rule for the session information associated with the identification number of the changed filtering rule. It is evaluated whether or not a filtering rule having a lower priority than a filtering rule that has been replaced after replacement corresponds, and the update means performs filtering after replacing session information associated with the identification number of the replaced filtering rule. The rule is updated so as to be associated with the identification number of the filtering rule having the highest priority corresponding to the rule.

この構成では、フィルタリングルールの順序入れ替え時、ネットワーク機器は、入れ替えたフィルタリングルールに関連付けられたセッション情報に対して、入れ替えたフィルタリングルールより優先順位が低く、且つ、入れ替え後、順序を入れ替えたフィルタリングルールより優先順位が高くなるフィルタリングルールと対応するか否か評価する。ネットワーク機器は、入れ替えたフィルタリングルールに関連付けられたセッション情報を、入れ替えが行われた新たな優先順位において対応するフィルタリングルールの中で最も優先順位が高いフィルタリングルールと関連付ける。これにより、ネットワーク機器は、順序入れ替えされたフィルタリングルールの影響を受けるセッション情報のみに対して評価を行う。このため、ネットワーク機器は、変更後のフィルタリングルールの下でも維持されるべきセッションについては、セッション情報を維持したままフィルタリングルールを更新することができる。   In this configuration, when the order of the filtering rules is changed, the network device has a lower priority than the changed filtering rules for the session information associated with the changed filtering rules, and the filtering rules are changed in order after the replacement. It is evaluated whether or not it corresponds to a filtering rule having a higher priority. The network device associates the session information associated with the replaced filtering rule with the filtering rule having the highest priority among the corresponding filtering rules in the new priority that has been replaced. As a result, the network device evaluates only the session information affected by the filtering rules whose order has been changed. Therefore, the network device can update the filtering rule while maintaining the session information for the session that should be maintained even under the changed filtering rule.

請求項6の発明は、前記評価手段は、前記ルール記憶部を切り替えると、切り替え前のフィルタリングルールに関連付けられたセッション情報に対して、切り替え後のフィルタリングルールから、切り替え前に対応するフィルタリングルールより優先度が高いフィルタリングルールを除いて、対応するか否かを評価し、前記更新手段は、該セッション情報を、該当する最も優先順位が高いフィルタリングルールの識別番号に関連付けるように更新することを特徴とする。   In the invention of claim 6, when the evaluation means switches the rule storage unit, from the filtering rule after the switching, the filtering rule corresponding to the switching rule after the switching for the session information associated with the filtering rule before the switching. The update means evaluates whether or not it corresponds except for a filtering rule with a high priority, and updates the session information so as to associate it with the identification number of the corresponding filtering rule with the highest priority. And

この構成では、ルール記憶部(フィルタリングテーブル)の切り替え時、ネットワーク機器は、切り替え前のフィルタリングルールに関連付けられたセッション情報に対して、切り替え後のフィルタリングルールに対応するか否かを評価する。この際、切り替え前のセッション情報に対応するフィルタリングルールより優先順位が高いフィルタリングルールが、切り替え後のフィルタリングルールに存在する場合は、そのフィルタリングルールを除いて評価する。これにより、ネットワーク機器は、フィルタリングテーブルの切り替えに影響を受けるセッション情報のみに対して評価を行う。このため、変更後のフィルタリングルールの下でも維持されるべきセッションについては、ネットワーク機器は、セッション情報を維持したままフィルタリングルールを更新することができる。   In this configuration, at the time of switching the rule storage unit (filtering table), the network device evaluates whether or not it corresponds to the filtering rule after switching with respect to the session information associated with the filtering rule before switching. At this time, if a filtering rule having a higher priority than the filtering rule corresponding to the session information before switching is present in the filtering rule after switching, the filtering rule is excluded and evaluated. Thereby, the network device evaluates only the session information affected by the switching of the filtering table. For this reason, for a session that should be maintained under the changed filtering rule, the network device can update the filtering rule while maintaining the session information.

本発明によれば、ネットワーク機器は、フィルタリングルールが更新されると、更新されたフィルタリングルールの影響を受ける範囲で、セッション情報がどのフィルタリングルールに対応するか否かの評価を行う。これにより、ネットワーク機器は、確立したセッションのセッション情報を維持したままで、フィルタリングルールを更新することができる。   According to the present invention, when a filtering rule is updated, the network device evaluates which filtering rule the session information corresponds to within a range affected by the updated filtering rule. Thereby, the network device can update the filtering rule while maintaining the session information of the established session.

図1は、ネットワーク機器を介してLANとWANが接続された環境を示す図である。LANに設置されたクライアント装置2(例えば、PCや携帯電話等)は、ネットワーク機器1を介すことで、ネットワーク3(WAN)に接続される。ネットワーク機器1は、LAN側に設置されたクライアント装置2に対して、WAN側からデータの取得依頼が来ると、クライアント装置2からデータの転送を許可するか否かを判断する。また、ネットワーク機器1は、WAN側に設定された通信装置4(4a,4b)(例えば、ルータを介してネットワークに接続されたPCや携帯電話等)に対して、LAN側からデータの取得依頼を行うと、WAN側に設置された通信装置4へデータの取得依頼を行うか否かを判断する。この判断は、ネットワーク機器1が記憶するフィルタリングルール(以下、ルールと称す。)に基づいて行われる。   FIG. 1 is a diagram illustrating an environment in which a LAN and a WAN are connected via a network device. A client device 2 (for example, a PC or a mobile phone) installed in the LAN is connected to the network 3 (WAN) through the network device 1. When the network device 1 receives a data acquisition request from the WAN side to the client device 2 installed on the LAN side, the network device 1 determines whether or not to permit the data transfer from the client device 2. In addition, the network device 1 sends a data acquisition request from the LAN side to the communication device 4 (4a, 4b) set on the WAN side (for example, a PC or a mobile phone connected to the network via a router). If it performs, it will be judged whether the data acquisition request will be performed to the communication apparatus 4 installed in the WAN side. This determination is made based on a filtering rule (hereinafter referred to as a rule) stored in the network device 1.

データの取得依頼やデータの転送がルールに基づいて行われると、LAN側からWAN側へのパケット又はWAN側からLAN側へのパケットが通過するタイミングで、セッションが確立される。確立したセッションのセッション情報がネットワーク機器に記憶される。このセッションが確立すると、同一装置間(例えば、クライアント装置2と通信装置4a間)の同一サービスの通信は、ルールに基づいて判断せずに、セッション情報を参照することで、次のパケットを通過させることができる。例えば、クライアント装置2から通信装置4にポート番号80(WWWサービス)でアクセスしてセッションが確立すると、このセッションが確立している間は、クライアント装置2から通信装置4にポート番号80でアクセスすることができる。   When a data acquisition request or data transfer is performed based on a rule, a session is established at a timing when a packet from the LAN side to the WAN side or a packet from the WAN side to the LAN side passes. The session information of the established session is stored in the network device. When this session is established, communication of the same service between the same devices (for example, between the client device 2 and the communication device 4a) passes the next packet by referring to the session information without judging based on the rules. Can be made. For example, when a session is established by accessing the communication device 4 from the client device 2 with the port number 80 (WWW service), the client device 2 accesses the communication device 4 with the port number 80 while the session is established. be able to.

このセッション情報は、ルールに基づいて生成されるため、ルールが更新されると、セッション情報も更新される。この際、ネットワーク機器1は、更新後のルールに基づいて、セッション情報を評価する。セッション情報を評価することで、セッション情報には、ルールの更新内容が反映される。これにより、ネットワーク機器1は、ルールの更新に影響が無いセッション情報をそのまま維持することができる。また、ネットワーク機器1は、ルールの更新に影響を受けるセッション情報であっても、更新後のフィルタリングルールと対応すればそのまま維持することができる。   Since this session information is generated based on the rule, when the rule is updated, the session information is also updated. At this time, the network device 1 evaluates the session information based on the updated rule. By evaluating the session information, the updated contents of the rules are reflected in the session information. Thereby, the network device 1 can maintain the session information that does not affect the update of the rule as it is. Further, the network device 1 can maintain even the session information affected by the update of the rule as long as it corresponds to the updated filtering rule.

なお、本実施形態では、LAN側に1台のクライアント装置2とWAN側に2台の通信装置4を設置した。しかしながら、これに限らず、LAN側にクライアント装置、WAN側に通信装置が設置されていればよい。   In the present embodiment, one client device 2 is installed on the LAN side and two communication devices 4 are installed on the WAN side. However, the present invention is not limited to this, and it is only necessary to install a client device on the LAN side and a communication device on the WAN side.

次に、ネットワーク機器1の機能構成について説明する。図2は、ネットワーク機器のブロック図である。このネットワーク機器1は、例えば、ルータ装置やファイヤーウォール装置である。   Next, the functional configuration of the network device 1 will be described. FIG. 2 is a block diagram of the network device. The network device 1 is, for example, a router device or a firewall device.

ネットワーク機器1は、2つのネットワークを接続する装置であるが、一方のネットワークから他方のネットワークへパケットを転送するとき、そのパケットの転送を許可するか否かを判定し、許可したもののみ通過させ、その他のパケットを破棄するパケットフィルタリングを実行する。   The network device 1 is a device that connects two networks. When a packet is transferred from one network to the other, it is determined whether or not to permit the transfer of the packet, and only the permitted one is allowed to pass. Perform packet filtering to discard other packets.

ネットワーク機器1は、4つのLAN側ポート14及び1つのWAN側ポート16を備える。WAN側ポート16は、インターネットサービスを提供するISP等に接続される。WAN側ポート16は、PHYチップ15を介してCPU10に接続される。   The network device 1 includes four LAN side ports 14 and one WAN side port 16. The WAN side port 16 is connected to an ISP or the like that provides Internet services. The WAN side port 16 is connected to the CPU 10 via the PHY chip 15.

4つのLAN側ポート14には、それぞれPC等のクライアント装置2が接続される。これらLAN側ポート14は、レイヤ2スイッチチップ13に接続されている。レイヤ2スイッチチップ13は、LAN側ポート14に接続される複数のクライアント装置2間の通信を制御する。また、このレイヤ2スイッチチップ13には前記CPU10も接続されている。CPU10は、WAN側ポート16とLAN側ポート14との通信を制御する。   Each of the four LAN ports 14 is connected to a client device 2 such as a PC. These LAN side ports 14 are connected to the layer 2 switch chip 13. The layer 2 switch chip 13 controls communication between the plurality of client devices 2 connected to the LAN side port 14. The layer 2 switch chip 13 is also connected to the CPU 10. The CPU 10 controls communication between the WAN side port 16 and the LAN side port 14.

CPU10には、フラッシュメモリ11及びRAM12が接続される。フラッシュメモリ11は、図3に示すようなパケットフィルタリングテーブルを記憶する。また、RAM12は、図4に示すようなセッション情報テーブルを記憶し、LAN側ポート14及びWAN側ポート16から入力されたパケットを、転送または破棄の処理が決定するまでバッファする。   A flash memory 11 and a RAM 12 are connected to the CPU 10. The flash memory 11 stores a packet filtering table as shown in FIG. Further, the RAM 12 stores a session information table as shown in FIG. 4, and buffers packets input from the LAN side port 14 and the WAN side port 16 until a transfer or discard process is determined.

LAN側ポート14またはWAN側ポート16からパケットが入力されると、このパケットをRAM12にバッファするとともに、このパケットに図3のパケットフィルタリングテーブルの各ルールを適用して処理(通過/破棄)を決定する。通過と決定したパケットについては相手側のポート(WAN側ポート16又はLAN側ポート14)にこれを転送する。破棄と決定したパケットについてはRAM12からこれを消去する。   When a packet is input from the LAN side port 14 or the WAN side port 16, the packet is buffered in the RAM 12, and the processing (pass / discard) is determined by applying the rules of the packet filtering table of FIG. 3 to the packet. To do. The packet determined to pass is transferred to the partner port (WAN port 16 or LAN port 14). The packet determined to be discarded is deleted from the RAM 12.

なお、本実施形態では、WAN−LAN間の通信を制御する制御部としてCPU10を用いているが、ネットワークプロセッサという専用LSIを用いてもよい。   In this embodiment, the CPU 10 is used as a control unit that controls communication between the WAN and the LAN. However, a dedicated LSI called a network processor may be used.

また、本実施形態では、ネットワーク機器1は、4つのLAN側ポート14及び1つのWAN側ポート16を備える。しかしながら、これに限らず、少なくとも1つのLAN側ポート14と少なくとも1つのWAN側ポート16を備えればよい。   In this embodiment, the network device 1 includes four LAN ports 14 and one WAN port 16. However, the present invention is not limited thereto, and at least one LAN side port 14 and at least one WAN side port 16 may be provided.

次に、ネットワーク機器1がフラッシュメモリ11に記憶するパケットフィルタリングテーブルとRAM12に記憶するセッション情報テーブルについて説明する。図3は、パケットフィルタリングテーブルの例を示す図である。図4は、セッション情報テーブルの例を示す図である。   Next, a packet filtering table stored in the flash memory 11 by the network device 1 and a session information table stored in the RAM 12 will be described. FIG. 3 is a diagram illustrating an example of a packet filtering table. FIG. 4 is a diagram illustrating an example of the session information table.

まず、図3を参照して、パケットフィルタリングテーブルについて説明する。パケットフィルタリングテーブルに登録されたルールは、「入力I/F」、「出力I/F」、「始点アドレス(source address)」、「終点アドレス(destination address)」、「プロトコル(protocol)」、「始点ポート(source port)」、「終点ポート(destination port)」の属性を判定条件として用いている。そして、対応したパケットの動作指定情報として、そのパケットを通過させる「通過」又は破棄する「破棄」の2種類のうちいずれかが規定される。   First, the packet filtering table will be described with reference to FIG. The rules registered in the packet filtering table are “input I / F”, “output I / F”, “source address”, “destination address”, “protocol”, “protocol”, “protocol”, “protocol”, “protocol”, and “protocol”. The attributes of “start port (source port)” and “end point port (destination port)” are used as determination conditions. As the operation designation information of the corresponding packet, one of two types of “pass” that allows the packet to pass and “discard” that discards the packet is defined.

図3に示すパケットフィルタリングテーブルにおいて、
ルール1は、「入力I/F=LAN」、「出力I/F=WAN」、「始点アドレス=192.168.0.0/24」、「終点アドレス=ZZ.ZZ.ZZ.0/24」、「プロトコル=tcp」、「始点ポート=*(不問)」、「終点ポート=80」の判定条件と、「動作=破棄」の内容を規定している。
In the packet filtering table shown in FIG.
Rule 1 includes “input I / F = LAN”, “output I / F = WAN”, “start point address = 192.168.0.0 / 24”, “end point address = ZZ.ZZ.ZZ.0 / 24”. ”,“ Protocol = tcp ”,“ Start port = * (unquestioned) ”,“ End port = 80 ”, and“ Operation = Discard ”are defined.

ルール2は、「入力I/F=LAN」、「出力I/F=WAN」、「始点アドレス=192.168.0.0/24」、「終点アドレス=*」、「プロトコル=tcp」、「始点ポート=*」、「終点ポート=80」の判定条件と、「動作=通過」の内容を規定している。   Rule 2 consists of “input I / F = LAN”, “output I / F = WAN”, “start address = 192.168.0.0 / 24”, “end address = *”, “protocol = tcp”, The determination conditions “start port = *” and “end port = 80” and the contents of “operation = pass” are defined.

ルール3は、「入力I/F=WAN」、「出力I/F=LAN」、「始点アドレス=*」、「終点アドレス=192.168.0.0/24」、「プロトコル=tcp」、「始点ポート=80」、「終点ポート=*」の判定条件と、「動作=通過」の内容を規定している。   Rule 3 includes “input I / F = WAN”, “output I / F = LAN”, “start address = *”, “end address = 192.168.0.0 / 24”, “protocol = tcp”, The determination condition of “start port = 80” and “end port = *” and the content of “operation = pass” are defined.

ルール4は、「入力I/F=WAN」、「出力I/F=LAN」、「始点アドレス=AA.AA.AA.0/24」、「終点アドレス=192.168.0.0/24」、「プロトコル=tcp」、「始点ポート=23」、「終点ポート=*」の判定条件と、「動作=通過」の内容を規定している。   Rule 4 includes “input I / F = WAN”, “output I / F = LAN”, “start point address = AA.AA.AA.0 / 24”, “end point address = 192.168.0.0 / 24”. ”,“ Protocol = tcp ”,“ Start port = 23 ”,“ End port = * ”and“ Operation = Pass ”are defined.

ルール5は、「入力I/F=WAN」、「出力I/F=LAN」、「始点アドレス=BB.BB.BB.0/24」、「終点アドレス=192.168.0.0/24」、「プロトコル=tcp」、「始点ポート=23」、「終点ポート=*」の判定条件と、「動作=通過」の内容を規定している。   Rule 5 includes “input I / F = WAN”, “output I / F = LAN”, “start point address = BB.BB.BB.0 / 24”, “end point address = 192.168.0.0 / 24”. ”,“ Protocol = tcp ”,“ Start port = 23 ”,“ End port = * ”and“ Operation = Pass ”are defined.

ルール6は、「入力I/F=LAN」、「出力I/F=WAN」、「始点アドレス=*」、「終点アドレス=*」、「プロトコル=*」、「始点ポート=*」、「終点ポート=*」の判定条件と、「動作=破棄」の内容を規定している。   Rule 6 includes “input I / F = LAN”, “output I / F = WAN”, “start address = *”, “end address = *”, “protocol = *”, “start port = *”, “ The determination condition of “end point port = *” and the content of “operation = discard” are defined.

ルール7は、「入力I/F=WAN」、「出力I/F=LAN」、「始点アドレス=*」、「終点アドレス=*」、「プロトコル=*」、「始点ポート=*」、「終点ポート=*」の判定条件と、「動作=破棄」の内容を規定している。   Rule 7 includes “input I / F = WAN”, “output I / F = LAN”, “start address = *”, “end address = *”, “protocol = *”, “start port = *”, “ The determination condition of “end point port = *” and the content of “operation = discard” are defined.

ルータ装置1のCPU10は、入力されたパケットにこれらルールをルール1から順に
適用し、判定条件に合致した場合には、そのルールの動作指定情報に規定された動作を実
行する。すなわち、あるルールに対応した場合には、そのルールに規定する動作が実行さ
れ、それ以後のルールは適用されない。ここで、動作の「通過」とは、入力されたパケッ
トを相手側ポート(出力インタフェース)に転送する動作である。なお、図3に示すパケットフィルタリングテーブルの各ルールは、GUIで更新することができる。このルールの更新時に発生するセッション情報の評価処理の流れについては、後述して説明する。
The CPU 10 of the router device 1 applies these rules to the input packet in order from the rule 1, and when the determination conditions are met, the operation specified in the operation designation information of the rule is executed. That is, when a certain rule is supported, the operation specified in the rule is executed, and the subsequent rules are not applied. Here, “passing” of the operation is an operation of transferring the input packet to the partner port (output interface). Note that each rule of the packet filtering table shown in FIG. 3 can be updated by the GUI. The flow of the process for evaluating session information that occurs when updating this rule will be described later.

また、ネットワーク機器1のCPU10は、動作の「通過」に合致したパケットについて、セッションを確立する。確立したセッションは、後述するセッション情報テーブルに登録される。このセッション情報テーブルに登録されたセッションは、一定期間が経過すると自動的に破棄される。これにより、セッション情報テーブルには、パケットの入出力が行われているセッション情報のみが登録される。   Further, the CPU 10 of the network device 1 establishes a session for the packet that matches the “pass” of the operation. The established session is registered in a session information table described later. Sessions registered in this session information table are automatically discarded after a certain period of time. As a result, only the session information in which the packet is input / output is registered in the session information table.

次に、図4を参照して、セッション情報テーブルについて説明する。セッション情報テーブルに登録されたセッション情報は、「入力I/F」、「出力I/F」、「始点アドレス(source address)」、「終点アドレス(destination address)」、「プロトコル(protocol)」、「始点ポート(source port)」、「終点ポート(destination port)」から構成され、「パケットフィルタのID(特許請求の範囲の「フィルタリングルールの識別番号」に該当する。)」と関連付けられる。   Next, the session information table will be described with reference to FIG. The session information registered in the session information table includes “input I / F”, “output I / F”, “source address”, “destination address”, “protocol”, It is composed of “source port” and “destination port” and is associated with “packet filter ID (corresponding to“ filtering rule identification number ”in claims)”.

図4に示すセッション情報テーブルにおいて、
セッション101のセッション情報は、「入力I/F=LAN」、「出力I/F=WAN」、「始点アドレス=192.168.0.3」、「終点アドレス=ZZ.ZZ.1.ZZ」、「プロトコル=tcp」、「始点ポート=50001」、「終点ポート=80」である。図3に示すパケットフィルタリングテーブルの優先順位が最も高いルール1から順に、セッション101のセッション情報が対応するか否が判断されているので、セッション101のセッション情報は、ルール2と対応し、「パケットフィルタのID=2」と関連付けられる。
In the session information table shown in FIG.
The session information of the session 101 includes “input I / F = LAN”, “output I / F = WAN”, “start point address = 192.168.0.3”, “end point address = ZZ.ZZ.1.ZZ”. , “Protocol = tcp”, “start port = 50001”, “end port = 80”. Since it is determined in order from rule 1 having the highest priority in the packet filtering table shown in FIG. 3 whether or not the session information of session 101 corresponds, the session information of session 101 corresponds to rule 2 and “packet Filter ID = 2 ”.

セッション102のセッション情報は、「入力I/F=WAN」、「出力I/F=LAN」、「始点アドレス=AA.AA.AA.1」、「終点アドレス=192.168.0.3」、「プロトコル=tcp」、「始点ポート=23」、「終点ポート=56789」である。同様に、セッション102のセッション情報は、ルール4と対応するので、「パケットフィルタのID=4」と関連付けられる。   The session information of the session 102 includes “input I / F = WAN”, “output I / F = LAN”, “start point address = AA.AA.AA.1”, “end point address = 192.168.0.3”. , “Protocol = tcp”, “start port = 23”, “end port = 56789”. Similarly, since the session information of session 102 corresponds to rule 4, it is associated with “packet filter ID = 4”.

セッション103のセッション情報は、「入力I/F=WAN」、「出力I/F=LAN」、「始点アドレス=BB.BB.BB.1」、「終点アドレス=192.168.0.3」、「プロトコル=tcp」、「始点ポート=23」、「終点ポート=51234」である。同様に、セッション103のセッション情報は、ルール5と対応するので、「パケットフィルタのID=5」と関連付けられる。   The session information of the session 103 includes “input I / F = WAN”, “output I / F = LAN”, “start point address = BB.BB.BB.1”, “end point address = 192.168.0.3”. , “Protocol = tcp”, “starting port = 23”, and “ending port = 51234”. Similarly, since the session information of the session 103 corresponds to the rule 5, it is associated with “packet filter ID = 5”.

セッション104のセッション情報は、「入力I/F=WAN」、「出力I/F=LAN」、「始点アドレス=AA.AA.AA.1」、「終点アドレス=192.168.0.3」、「プロトコル=tcp」、「始点ポート=80」、「終点ポート=59999」である。同様に、セッション104のセッション情報は、ルール3と対応するので、「パケットフィルタのID=3」と関連付けられる。   The session information of the session 104 includes “input I / F = WAN”, “output I / F = LAN”, “start point address = AA.AA.AA.1”, “end point address = 192.168.0.3”. “Protocol = tcp”, “Starting port = 80”, “Ending port = 59999”. Similarly, since the session information of session 104 corresponds to rule 3, it is associated with “packet filter ID = 3”.

次に、パケットフィルタリングテーブルに登録されたルールの更新時に発生するセッション情報の評価処理について、図5〜図11を参照して説明する。図5は、図3に示すパケットフィルタリングルールから一部のルールを抜粋した例を示す図である。図5(A)は、「入力I/F=WAN」、「出力I/F=LAN」に該当するルールを示す図である。図5(B)は、図5(A)に、ルール9を追加した例を示す。図5(C)は、図5(B)のルール5を変更した例を示す。図5(D)は、図5(B)のルール3の順序を変更した例を示す。図6は、図4に示すセッション情報から一部のセッションを抜粋した例を示す図である。図6(A)は、「入力I/F=WAN」、「出力I/F=LAN」に該当するセッションを示す図である。図6(B)は、図6(A)のセッション102のパケットフィルタのIDを変更した例を示す。図6(C)は、図6(A)のセッション104のパケットフィルタのIDを変更した例を示す。図7は、ルールの追加時に発生するセッション情報の評価処理の流れを示すフローチャートである。図8は、ルールの削除時に発生するセッション情報の評価処理の流れを示すフローチャートである。図9は、ルールの変更時に発生するセッション情報の評価処理の流れを示すフローチャートである。図10は、ルールの順序入れ替え時に発生するセッション情報の評価処理の流れを示すフローチャートである。図11は、パケットフィルタリングテーブルの切り替え時に発生するセッション情報の評価処理の流れを示すフローチャートである。   Next, an evaluation process for session information that occurs when a rule registered in the packet filtering table is updated will be described with reference to FIGS. FIG. 5 is a diagram showing an example in which some rules are extracted from the packet filtering rules shown in FIG. FIG. 5A is a diagram illustrating rules corresponding to “input I / F = WAN” and “output I / F = LAN”. FIG. 5B shows an example in which the rule 9 is added to FIG. FIG. 5C shows an example in which the rule 5 in FIG. 5B is changed. FIG. 5D shows an example in which the order of rule 3 in FIG. 5B is changed. FIG. 6 is a diagram illustrating an example in which some sessions are extracted from the session information illustrated in FIG. 4. FIG. 6A illustrates a session corresponding to “input I / F = WAN” and “output I / F = LAN”. FIG. 6B shows an example in which the packet filter ID of the session 102 in FIG. 6A is changed. FIG. 6C shows an example in which the packet filter ID of the session 104 in FIG. 6A is changed. FIG. 7 is a flowchart showing a flow of session information evaluation processing that occurs when a rule is added. FIG. 8 is a flowchart showing a flow of session information evaluation processing that occurs when a rule is deleted. FIG. 9 is a flowchart showing a flow of session information evaluation processing that occurs when a rule is changed. FIG. 10 is a flowchart showing the flow of the session information evaluation process that occurs when the rule order is changed. FIG. 11 is a flowchart showing the flow of session information evaluation processing that occurs when switching packet filtering tables.

ネットワーク機器1は、パケットフィルタリングテーブルにルールの追加、削除、変更、順序入れ替えが発生すると、追加時のセッション情報の評価処理、削除時のセッション情報の評価処理、変更時のセッション情報の評価処理、順序入れ替え時のセッション情報の評価処理を行う。また、ネットワーク機器1は、パケットフィルタリングテーブルの切り替えが生じると、切り替え時のセッション情報の評価処理を行う。なお、複数処理(例えば、追加と削除等)が行われた場合は、ネットワーク機器1は、それぞれの評価処理(追加時のセッション情報の評価処理、削除時のセッション情報の評価処理)を行ってもよいし、切り替え時のセッション情報の評価処理を行ってもよい。以下に、セッション情報の評価処理の流れについて説明する。   When a rule is added, deleted, changed, or rearranged in the packet filtering table, the network device 1 evaluates the session information at the time of addition, evaluates the session information at the time of deletion, evaluates the session information at the time of change, Evaluate the session information when changing the order. Further, when switching of the packet filtering table occurs, the network device 1 performs an evaluation process of session information at the time of switching. When a plurality of processes (for example, addition and deletion) are performed, the network device 1 performs each evaluation process (evaluation process for session information at the time of addition, evaluation process for session information at the time of deletion). Alternatively, the session information evaluation process at the time of switching may be performed. The flow of session information evaluation processing will be described below.

1)ルールの追加時に発生するセッション情報の評価処理の流れについて
説明の簡単化のため、図5(A)に示すルールに、ルール9が追加され、図5(B)に示すルールに更新された場合を例にあげて説明する。この際、ネットワーク機器1は、図6(A)に示すセッション情報テーブルを記憶しているものとする。
1) Flow of session information evaluation processing that occurs when a rule is added For simplicity of explanation, rule 9 is added to the rule shown in FIG. 5A and updated to the rule shown in FIG. An example will be described. At this time, it is assumed that the network device 1 stores the session information table shown in FIG.

図7に示すように、ルール9が追加されると、追加されたルール9に対して、優先順位が低い側の次のルールが存在するか否かを調べる(S101)。ルールが存在しない場合は(S101:No)、処理を終了する。つまり、セッション情報テーブルの更新は行われない。   As shown in FIG. 7, when the rule 9 is added, it is checked whether or not there is a next rule with a lower priority for the added rule 9 (S101). If there is no rule (S101: No), the process is terminated. That is, the session information table is not updated.

図5(B)の例では、追加されたルール9に対して、優先順位が低い側の次のルール(ルール4)が存在するので(S101:Yes)、ルール4に関連付けられたセッション情報が存在するか否かを調べる(S102)。セッション情報が存在しない場合は(S102:No)、ステップS108へ進む。   In the example of FIG. 5B, since the next rule (rule 4) on the lower priority side exists with respect to the added rule 9 (S101: Yes), the session information associated with the rule 4 is It is checked whether or not it exists (S102). If session information does not exist (S102: No), the process proceeds to step S108.

ルール4に関連付けられたセッション情報(セッション102)が存在するので(S102:Yes)、追加されたルール9にセッション102が対応するか否かを調べる(S103)。追加されたルール9にセッション102が対応しない場合は(S103:No)、ステップS107へ進む。   Since session information (session 102) associated with the rule 4 exists (S102: Yes), it is checked whether or not the session 102 corresponds to the added rule 9 (S103). If the session 102 does not correspond to the added rule 9 (S103: No), the process proceeds to step S107.

追加されたルール9にセッション102が対応するので(S103:Yes)、追加したルール9の「動作」が「通過」に設定されているかどうか調べる(S104)。「通過」に設定されているので(S104:Yes)、セッション102の「パケットフィルタのID」を4から9に変更して(S105)、ステップS107へ進む。ここで、「破棄」に設定されている場合は(S104:No)、セッション102のセッション情報を削除して(S106)、ステップS107へ進む。   Since the session 102 corresponds to the added rule 9 (S103: Yes), it is checked whether or not the “action” of the added rule 9 is set to “pass” (S104). Since “pass” is set (S104: Yes), the “packet filter ID” of the session 102 is changed from 4 to 9 (S105), and the process proceeds to step S107. If “discard” is set (S104: No), the session information of the session 102 is deleted (S106), and the process proceeds to step S107.

ステップS107にて、ルール4に関連付けられた他のセッション情報が存在するか否かを調べる。他のセッション情報は存在しないので(S107:No)、ルール4に対して、優先順位が低い側の次のルール(ルール5)を参照して(S108)、ステップS102〜S108の処理を行う。また、他のセッション情報が存在した場合は(S107:Yes)、ステップS103〜S107の処理を行う。   In step S107, it is checked whether there is other session information associated with rule 4. Since no other session information exists (S107: No), the next rule (rule 5) on the lower priority side is referred to rule 4 (S108), and the processes of steps S102 to S108 are performed. If other session information exists (S107: Yes), the processing of steps S103 to S107 is performed.

ステップS108にて、現在参照しているルールに対して、優先順位が低い側の次のルールが存在するか否かを調べる(S108)。ルールが存在する場合は(S108:Yes)、ステップS102〜S108の処理を行う。また、ルールが存在しない場合は(S108:No)、処理を終了する。   In step S108, it is checked whether or not there is a next rule having a lower priority than the currently referenced rule (S108). If there is a rule (S108: Yes), the processing of steps S102 to S108 is performed. If there is no rule (S108: No), the process is terminated.

以上で、セッション情報テーブルの更新が完了する。なお、本説明の場合であればルール9が追加されると、セッション情報テーブルは、図6(B)に示すテーブルとなる。   Thus, the update of the session information table is completed. In the case of this description, when the rule 9 is added, the session information table becomes the table shown in FIG.

以上のように、ルール追加時に発生するセッション情報の評価処理では、追加したルールの後方(優先順位が低い側)のルールに関連付けられたセッション情報が追加したルールに対応するか否かを調べ、追加したルールに対応する場合は、対応するセッション情報を追加したルールと関連付ける。これにより、セッション情報テーブルに登録された全てのセッション情報に対して、どのルールと対応するのかを調べる必要がない。このため、セッション情報テーブルに登録されたセッション情報の更新をセッションを切断することなく短時間で行うことができる。   As described above, in the session information evaluation process that occurs when a rule is added, it is checked whether or not the session information associated with the rule behind the added rule (low priority order) corresponds to the added rule, If it corresponds to the added rule, the corresponding session information is associated with the added rule. Thereby, it is not necessary to check which rule corresponds to all the session information registered in the session information table. For this reason, the session information registered in the session information table can be updated in a short time without disconnecting the session.

2)ルールの削除時に発生するセッション情報の評価処理の流れについて
説明の簡単化のため、図5(B)に示すルールから、ルール9が削除され、図5(A)に示すルールに更新された場合を例にあげて説明する。この際、ネットワーク機器1は、図6(B)に示すセッション情報テーブルを記憶しているものとする。
2) Flow of session information evaluation process that occurs when a rule is deleted For simplicity of explanation, rule 9 is deleted from the rule shown in FIG. 5B and updated to the rule shown in FIG. An example will be described. At this time, it is assumed that the network device 1 stores the session information table shown in FIG.

図8に示すように、ルール9が削除されると、削除したルール9に関連付けられたセッション情報が存在するか否かを調べる(S111)。セッション情報が存在しない場合は(S111:No)、処理を終了する。つまり、セッション情報テーブルの更新は行われない。   As shown in FIG. 8, when the rule 9 is deleted, it is checked whether there is session information associated with the deleted rule 9 (S111). If session information does not exist (S111: No), the process ends. That is, the session information table is not updated.

削除したルール9に関連付けられたセッション情報(セッション102)が存在する場合は(S110:Yes)、削除したルール9に対して、優先順位が低い側の次のルールが存在するか否かを調べる(S112)。ルールが存在しない場合は(S112:No)、ステップS117へ進む。   When there is session information (session 102) associated with the deleted rule 9 (S110: Yes), it is checked whether or not there is a next rule with a lower priority for the deleted rule 9. (S112). If there is no rule (S112: No), the process proceeds to step S117.

削除したルール9に対して、優先順位が低い側の次のルール(ルール4)が存在するので(S112:Yes)、セッション102がルール4に対応するか否かを調べる(S113)。セッション102がルール4に対応するので(S113:Yes)、ルール4の「動作」が「通過」に設定されているかどうか調べる(S115)。「通過」に設定されているので(S115:Yes)、セッション102の「パケットフィルタのID」を9から4に変更して(S116)、ステップS118へ進む。ここで、「破棄」に設定されている場合は(S115:No)、セッション102のセッション情報を削除して(S117)、ステップS118へ進む。   Since the next rule (rule 4) with the lower priority exists for the deleted rule 9 (S112: Yes), it is checked whether or not the session 102 corresponds to the rule 4 (S113). Since the session 102 corresponds to the rule 4 (S113: Yes), it is checked whether the “operation” of the rule 4 is set to “pass” (S115). Since “pass” is set (S115: Yes), the “packet filter ID” of the session 102 is changed from 9 to 4 (S116), and the process proceeds to step S118. If “discard” is set (S115: No), the session information of the session 102 is deleted (S117), and the process proceeds to step S118.

また、セッション102がルール4に対応しない場合は(S113:No)、ルール4に対して、優先順位が低い側の次のルールが存在するか否かを調べる(S114)。次のルールが存在しない場合は(S114:No)、セッション102を削除して(S117)、ステップS118へ進む。また、次のルールが存在する場合は(S114:Yes)、ステップS113へ進む。   If the session 102 does not correspond to the rule 4 (S113: No), it is checked whether or not there is a next rule with a lower priority for the rule 4 (S114). When the next rule does not exist (S114: No), the session 102 is deleted (S117), and the process proceeds to step S118. If the next rule exists (S114: Yes), the process proceeds to step S113.

ステップS118にて、削除したルール9に他のセッション情報が対応付けられているか調べる。他のセッション情報が対応付けられている場合は(S118:Yes)、ステップS112〜S118の処理を行う。他のセッション情報が対応付けられていない場合は(S118:No)、処理を終了する。   In step S118, it is checked whether the deleted rule 9 is associated with other session information. If other session information is associated (S118: Yes), the processing of steps S112 to S118 is performed. If no other session information is associated (S118: No), the process ends.

以上で、セッション情報テーブルの更新が完了する。なお、ルール9が削除されルール4に対応すると、セッション情報テーブルは、図6(A)に示すテーブルとなる。   Thus, the update of the session information table is completed. If rule 9 is deleted and it corresponds to rule 4, the session information table becomes the table shown in FIG.

以上のように、ルールの削除時に発生するセッション情報の評価処理では、削除したルールに関連付けられたセッション情報が、削除したルールの後方の優先順位が低い側のどのルールに対応するか否かを調べ、対応するルールが存在する場合は、対応するルールに関連付ける。これにより、セッション情報テーブルに登録された全てのセッション情報に対して、どのルールと対応するのかを調べる必要がない。このため、セッション情報テーブルに登録されたセッション情報の更新をセッションを切断することなく短時間で行うことができる。   As described above, in the evaluation process of session information that occurs when a rule is deleted, it is determined whether the session information associated with the deleted rule corresponds to which rule on the lower priority side behind the deleted rule. Check and if there is a corresponding rule, associate it with the corresponding rule. Thereby, it is not necessary to check which rule corresponds to all the session information registered in the session information table. For this reason, the session information registered in the session information table can be updated in a short time without disconnecting the session.

3)ルールの変更時に発生するセッション情報の評価処理の流れについて
説明の簡単化のため、図5(B)に示すルールから、ルール5の「始点アドレス」が変更され、図5(C)に示すルールに更新された場合を例にあげて説明する。この際、ネットワーク機器1は、図6(B)に示すセッション情報テーブルを記憶しているものとする。
3) Flow of session information evaluation process that occurs when a rule is changed For simplification of explanation, the “starting address” of rule 5 is changed from the rule shown in FIG. A case where the rules are updated to be shown will be described as an example. At this time, it is assumed that the network device 1 stores the session information table shown in FIG.

図9に示すように、ルール5が変更されると、変更前のルール5に関連付けられたセッション情報が存在するか否かを調べる(S121)。セッション情報が存在しない場合は(S121:No)、ステップS132へ進む。   As shown in FIG. 9, when the rule 5 is changed, it is checked whether there is session information associated with the rule 5 before the change (S121). If session information does not exist (S121: No), the process proceeds to step S132.

変更前のルール5に関連付けられたセッション情報(セッション103)が存在するので(S121:Yes)、セッション103が変更後のルール5に対応するか否かを調べる(S122)。対応するので(S122:Yes)、変更後のルール5の「動作」が「通過」に設定されているかどうか調べる(S129)。「通過」に設定されているので(S129:Yes)、ステップS131へ進む。ここで、「破棄」に設定されている場合は(S129:No)、セッション103のセッション情報を削除して(S130)、ステップS131へ進む。   Since there is session information (session 103) associated with the rule 5 before the change (S121: Yes), it is checked whether or not the session 103 corresponds to the rule 5 after the change (S122). Since it corresponds (S122: Yes), it is checked whether or not the “operation” of the changed rule 5 is set to “pass” (S129). Since “pass” is set (S129: Yes), the process proceeds to step S131. If “discard” is set (S129: No), the session information of the session 103 is deleted (S130), and the process proceeds to step S131.

ステップS131にて、変更前のルール5に関連付けられた他のセッション情報が存在するか否かを調べる。他のセッション情報が存在する場合は(S131:Yes)、ステップS122〜S131の処理を行う。他のセッション情報が存在しないので(S131:No)、ステップS132へ進む。   In step S131, it is checked whether there is other session information associated with rule 5 before the change. When other session information exists (S131: Yes), the processing of steps S122 to S131 is performed. Since no other session information exists (S131: No), the process proceeds to step S132.

ステップS132にて、変更前のルール5に対して、優先順位が低い側の次のルールが存在する否かを調べる。ルールが存在しない場合は(S132:No)、処理を終了する。   In step S132, it is checked whether or not there is a next rule with a lower priority with respect to the rule 5 before the change. If there is no rule (S132: No), the process is terminated.

変更前のルール5に対して、優先順位が低い側の次のルール(ルール7)が存在するので(S132:Yes)、ルール7に関連付けられたセッション情報が存在するか否かを調べる(S133)。セッション情報が存在しないので(S133:No)、ステップS139へ進む。   Since the next rule (rule 7) on the lower priority side exists with respect to the rule 5 before the change (S132: Yes), it is checked whether or not the session information associated with the rule 7 exists (S133). ). Since session information does not exist (S133: No), the process proceeds to step S139.

また、ルール7に関連付けられたセッション情報が存在する場合は(S133:Yes)、ルール7に関連付けられたセッションtが変更後のルール5に対応するか否かを調べる(S134)。対応しない場合は(S134:No)、ステップS138へ進む。対応する場合は(S134:Yes)、変更後のルール5の「動作」が「通過」に設定されているかどうか調べる(S135)。「通過」に設定されている場合は(S135:Yes)、セッションの「パケットフィルタのID」を5に変更して(S136)、ステップS138へ進む。ここで、「破棄」に設定されている場合は(S135:No)、セッションtのセッション情報を削除して(S137)、ステップS138へ進む。   If session information associated with the rule 7 exists (S133: Yes), it is checked whether or not the session t associated with the rule 7 corresponds to the changed rule 5 (S134). When not corresponding (S134: No), it progresses to Step S138. When it corresponds (S134: Yes), it is checked whether or not the “Action” of the changed rule 5 is set to “Pass” (S135). When “pass” is set (S135: Yes), the “packet filter ID” of the session is changed to 5 (S136), and the process proceeds to step S138. If “discard” is set (S135: No), the session information of the session t is deleted (S137), and the process proceeds to step S138.

ステップS138にて、ルール7に関連付けられた他のセッション情報が存在するか否かを調べる。存在する場合は(S138:Yse)、ステップS134〜S138の処理を行う。存在しない場合は(S138:No)、S139へ進む。   In step S138, it is checked whether there is other session information associated with rule 7. If it exists (S138: Yse), the processing of steps S134 to S138 is performed. When it does not exist (S138: No), it progresses to S139.

ステップS139にて、ルール7に対して、優先順位が低い側の次のルールが存在するか否かを調べる(S139)。存在する場合は(S139:Yes)、ステップS133〜S139の処理を行う。存在しない場合は(S139:No)、処理を終了する。   In step S139, it is checked whether or not there is a next rule with a lower priority than rule 7 (S139). When it exists (S139: Yes), the process of step S133-S139 is performed. If it does not exist (S139: No), the process is terminated.

以上で、セッション情報テーブルの更新が完了する。なお、本説明の場合であれば、ルール5が変更されると、セッション情報テーブルは、図6(B)に示すテーブルとなる。   Thus, the update of the session information table is completed. In the case of this description, when rule 5 is changed, the session information table becomes the table shown in FIG.

また、ステップS122にて、セッション103が変更後のルール5に対応しない場合は(S122:No)、変更後のルール5に対して、優先順位が低い側の次のルールが存在するか否かを調べる(S123)。ルールが存在しない場合は(S123:No)、セッション103のセッション情報を削除して(S130)、ステップS131へ進む。また、変更後のルール5に対して、優先順位が低い側の次のルール(ルール7)が存在する場合は(S123:Yes)、セッション103がルール7に対応しているか否かを調べる(S124)。セッション103がルール7に対応していない場合は(S124:No)、ルール7に対して、優先順位が低い側の次のルールが存在するか否かを調べ(S125)、存在する場合は(S125:Yes)、ステップS124へ進む。存在しない場合は(S125:No)、セッション103のセッション情報を削除して(S128)、ステップS131へ進む。   In step S122, if the session 103 does not correspond to the rule 5 after the change (S122: No), whether there is a next rule with a lower priority than the rule 5 after the change. (S123). If there is no rule (S123: No), the session information of the session 103 is deleted (S130), and the process proceeds to step S131. If the next rule (rule 7) on the lower priority side is present with respect to the rule 5 after the change (S123: Yes), it is checked whether or not the session 103 corresponds to the rule 7 ( S124). When the session 103 does not correspond to the rule 7 (S124: No), it is checked whether or not the next rule with the lower priority is present for the rule 7 (S125). S125: Yes), the process proceeds to step S124. If it does not exist (S125: No), the session information of the session 103 is deleted (S128), and the process proceeds to step S131.

セッション103がルール7に対応している場合は(S124:Yes)、ルール7の「動作」が「通過」に設定されているかどうか調べる(S126)。「通過」に設定されている場合は(S126:Yes)、セッション103の「パケットフィルタのID」を5から7に変更して(S127)、ステップS131へ進む。「破棄」に設定されている場合は(S126:No)、セッション103のセッション情報を削除して(S128)、ステップS131へ進む。   When the session 103 corresponds to the rule 7 (S124: Yes), it is checked whether the “operation” of the rule 7 is set to “pass” (S126). If it is set to “pass” (S126: Yes), the “packet filter ID” of the session 103 is changed from 5 to 7 (S127), and the process proceeds to step S131. When “discard” is set (S126: No), the session information of the session 103 is deleted (S128), and the process proceeds to step S131.

以上のように、ルールの更新時に発生するセッション情報の評価処理では、更新したルールに関連付けられたセッション情報が、更新したルール以降のどのルールに対応するか否かを調べ、対応するルールが存在する場合は、対応するルールに関連付ける。また、更新したルールの後方に存在したルールに関連付けられたセッション情報が、更新したルールに対応するか否かを調べ、対応する場合は、更新したルールに関連付ける。これにより、セッション情報テーブルに登録された全てのセッション情報に対して、どのルールと対応するのかを調べる必要がない。このため、セッション情報テーブルに登録されたセッション情報の更新をセッションを切断することなく短時間で行うことができる。   As described above, in the process of evaluating session information that occurs when a rule is updated, it is checked whether the session information associated with the updated rule corresponds to which rule after the updated rule, and there is a corresponding rule. If so, associate it with the corresponding rule. In addition, it is checked whether or not the session information associated with the rule existing behind the updated rule corresponds to the updated rule, and if it corresponds, it is associated with the updated rule. Thereby, it is not necessary to check which rule corresponds to all the session information registered in the session information table. For this reason, the session information registered in the session information table can be updated in a short time without disconnecting the session.

4)ルールの順序入れ替え時に発生するセッション情報の評価処理の流れについて
説明の簡単化のため、図5(B)に示すルールから、ルールの順序を入れ替えて、図5(D)に示すルールに更新された場合を例にあげて説明する。この際、ネットワーク機器1は、図6(B)に示すセッション情報テーブルを記憶しているものとする。
4) Flow of session information evaluation process that occurs when the order of rules is changed For simplification of explanation, the rule order is changed from the rule shown in FIG. 5B to the rule shown in FIG. 5D. The case where it is updated will be described as an example. At this time, it is assumed that the network device 1 stores the session information table shown in FIG.

図10に示すように、順序入れ替え前の1つ目のルール(ルール3)を参照し(S141)、ルール3の順序が入れ替わっているかどうか調べる(S142)。ルール3の順序が入れ替わっていない場合は(S142:No)、ステップS152へ進む。   As shown in FIG. 10, the first rule (rule 3) before the order change is referred to (S141), and it is checked whether the order of rule 3 is changed (S142). When the order of rule 3 is not changed (S142: No), the process proceeds to step S152.

ルール3の順序が入れ替わっているので(S142:Yes)、順序入れ替え前のルール3に関連付けられたセッション情報が存在するか否かを調べる(S143)。セッション情報が存在しない場合は(S143:No)、ステップS152へ進む。   Since the order of rule 3 is changed (S142: Yes), it is checked whether there is session information associated with rule 3 before the order change (S143). If session information does not exist (S143: No), the process proceeds to step S152.

順序入れ替え前のルール3に関連付けられたセッション情報(セッション104)が存在するので(S143:Yes)、順序入れ替え前のルール3に対して、優先順位が低い側の次のルールが存在するか否かを調べる(S144)。ルールが存在しない場合は(S144:No)、ステップS152へ進む。   Since there is session information (session 104) associated with the rule 3 before the order change (S143: Yes), whether there is a next rule with a lower priority than the rule 3 before the order change. (S144). If there is no rule (S144: No), the process proceeds to step S152.

順序入れ替え前のルール3に対して、優先順位が低い側の次のルール(ルール9)が存在するので(S144:Yes)、ルール9が順序入れ替え後のルール3に対して、優先順位が高い側に存在するか否かを調べる(S145)。存在しない場合は(S145:No)、ステップS147へ進む。   Since the next rule (rule 9) on the side of lower priority exists for rule 3 before the order change (S144: Yes), rule 9 has a higher priority than rule 3 after the order change. It is checked whether it exists on the side (S145). If it does not exist (S145: No), the process proceeds to step S147.

ルール9が順序入れ替え後のルール3に対して、優先順位が高い側に存在するので(S145:Yes)、セッション104がルール9に対応するか否かを調べる(S146)。対応しない場合は(S146:No)、ステップS147へ進む。   Since rule 9 exists on the higher priority side with respect to rule 3 whose order has been changed (S145: Yes), it is checked whether or not session 104 corresponds to rule 9 (S146). When not corresponding (S146: No), it progresses to Step S147.

ステップS147にて、ルール9に対して、優先順位が低い側の次のルールが存在するか否かを調べる。存在する場合(S147:Yes)、ステップS145へ進む。存在しない場合は(S147:No)、ステップS151へ進む。   In step S147, it is checked whether or not there is a next rule with a lower priority with respect to rule 9. When it exists (S147: Yes), it progresses to step S145. If it does not exist (S147: No), the process proceeds to step S151.

セッション104がルール9に対応する場合は(S146:Yes)、ルール9の「動作」が「通過」に設定されているかどうか調べる(S148)。「通過」に設定されている場合は(S148:Yes)、セッション104の「パケットフィルタのID」を3から9に変更して(S149)、ステップS151へ進む。ここで、「破棄」に設定されている場合は(S148:No)、セッション104のセッション情報を削除して(S150)、ステップS151へ進む。   When the session 104 corresponds to the rule 9 (S146: Yes), it is checked whether or not the “operation” of the rule 9 is set to “pass” (S148). If it is set to “pass” (S148: Yes), the “packet filter ID” of the session 104 is changed from 3 to 9 (S149), and the process proceeds to step S151. If “discard” is set (S148: No), the session information of the session 104 is deleted (S150), and the process proceeds to step S151.

ステップS151にて、順序入れ替え前のルール3に関連付けられた他のセッション情報が存在するか否かを調べる。存在しない場合は(S151:No)、ステップS152へ進む。他のセッション情報が存在する場合(S151:Yes)、ステップS144〜S151の処理を行う。   In step S151, it is checked whether there is other session information associated with rule 3 before the order change. If it does not exist (S151: No), the process proceeds to step S152. When other session information exists (S151: Yes), the processing of steps S144 to S151 is performed.

ステップS152にて、ルール3に対して、優先順位が低い側の次のルールが存在するか否かを調べる。次のルール(ルール9)が存在する場合は(S152:Yes)、ルール9についてS142〜S152の処理を行う。以上のように、パケットフィルタリングルールに登録されたルールが存在する間は、ステップS142〜S152の処理を繰り返し実行する。また、次のルールが存在しない場合は(S152:No)、処理を終了する。   In step S152, it is checked whether or not there is a next rule with a lower priority for rule 3. When the next rule (rule 9) exists (S152: Yes), the processing of S142 to S152 is performed for rule 9. As described above, while there are rules registered in the packet filtering rule, the processes in steps S142 to S152 are repeatedly executed. If the next rule does not exist (S152: No), the process ends.

以上で、セッション情報テーブルの更新が完了する。なお、本説明の場合であれば、ルールの順序が入れ替わると、セッション情報テーブルは、図6(C)に示すテーブルとなる。   Thus, the update of the session information table is completed. In the case of this description, when the order of the rules is changed, the session information table becomes a table shown in FIG.

以上のように、ルールの順序入れ替え時に発生するセッション情報の評価処理では、全ルールに対して、順序の入れ替えが生じたか否かを調べる。そして、順序の入れ替えが生じたルールに関連付けられたセッション情報に対して、順序の入れ替えが生じたルールより後方のルールで且つ入れ替え後に順序の入れ替えが生じたルールより前方になるルールに対応するか否かを調べ、対応するルールが存在する場合は、対応するルールに関連付ける。これにより、セッション情報テーブルに登録された全てのセッション情報に対して、どのルールと対応するのかを調べる必要がない。このため、セッション情報テーブルに登録されたセッション情報の更新をセッションを切断することなく短時間で行うことができる。   As described above, in the process of evaluating session information that occurs when the order of rules is changed, it is checked whether or not the order has changed for all rules. Whether the session information associated with the rule whose order has been changed corresponds to a rule that is behind the rule that has been changed in order and is ahead of the rule that has been changed in order after the change. Whether or not the corresponding rule exists is related to the corresponding rule. Thereby, it is not necessary to check which rule corresponds to all the session information registered in the session information table. For this reason, the session information registered in the session information table can be updated in a short time without disconnecting the session.

5)パケットフィルタリングテーブルの切り替え時に発生するセッション情報の評価処理の流れについて
説明の簡単化のため、図5(A)に示すルールから、図5(C)に示すルールに切り替えた場合を例にあげて説明する。この際、ネットワーク機器1は、図6(A)に示すセッション情報テーブルを記憶しているものとする。
5) Flow of session information evaluation process that occurs when switching packet filtering tables For simplicity of explanation, the rule shown in FIG. 5A is switched to the rule shown in FIG. 5C as an example. I will explain. At this time, it is assumed that the network device 1 stores the session information table shown in FIG.

図11に示すように、切替前のパケットフィルタリングテーブルにおいて、1つ目のルールm(ルール3)を参照し(S161)、ルール3に関連付けられたセッション情報が存在するか否かを調べる(S162)。存在しない場合は(S162:No)、ステップS172へ進む。   As shown in FIG. 11, in the packet filtering table before switching, the first rule m (rule 3) is referred to (S161), and it is checked whether there is session information associated with rule 3 (S162). ). If it does not exist (S162: No), the process proceeds to step S172.

ルール3に関連付けられたセッション情報(セッション104)が存在するので(S162:Yes)、切替後のパケットフィルタリングテーブルにおいて、1つ目のルールn(ルール3)を参照する(S163)。切替前のルールm(ルール3)と切替後のルールn(ルール3)とが同じルールか否かを調べる(S164)。切替前後で、ルールが同じなので(S164:Yes)、ステップS172へ進む。   Since session information (session 104) associated with rule 3 exists (S162: Yes), the first rule n (rule 3) is referred to in the packet filtering table after switching (S163). It is checked whether or not the rule m before switching (rule 3) and the rule n after switching (rule 3) are the same rule (S164). Since the rules are the same before and after switching (S164: Yes), the process proceeds to step S172.

ステップS172にて、切替前のルールm(ルール3)に対して、優先順位が低い側の次のルールが存在するか否かを調べ、次のルール(ルール4)が存在するので(S172:Yes)、ルール4に関連付けられたセッション情報が存在するか否かを調べる(S162)。   In step S172, it is checked whether or not there is a next rule with a lower priority with respect to the rule m (rule 3) before switching, and the next rule (rule 4) exists (S172: Yes), it is checked whether there is session information associated with the rule 4 (S162).

ルール4に関連付けられたセッション情報(セッション102)が存在するので(S162:Yes)、切替後のパケットフィルタリングテーブルにおいて、1つ目のルールn(ルール3)を参照する(S163)。切替前のルールm(ルール4)と切替後のルールn(ルール3)とが同じルールか否かを調べる(S164)。切替前後で、ルールが異なるので(S164:No)、切替前のパケットフィルタリングテーブルにおいて、ルール3(切替後のルールn)がルール4(切替前のルールm)に対して、優先順位が高い側に存在するか否かを調べる(S165)。ルール3はルール4に対して、優先順位が高い側に存在するので(S165:Yes)、切替後のルールn(ルール3)に対して、優先順位が低い側の次のルールが存在するか否かを調べる(S166)。次のルールが存在しない場合は(S166:No)、セッション102を削除する(S169)。   Since there is session information (session 102) associated with rule 4 (S162: Yes), the first rule n (rule 3) is referred to in the packet filtering table after switching (S163). It is checked whether or not the rule m before switching (rule 4) and the rule n after switching (rule 3) are the same rule (S164). Since the rules are different before and after switching (S164: No), in the packet filtering table before switching, rule 3 (rule n after switching) has higher priority than rule 4 (rule m before switching). (S165). Since rule 3 exists on the higher priority side with respect to rule 4 (S165: Yes), whether the next rule on the lower priority side exists for rule n after switching (rule 3). Whether or not is checked (S166). If the next rule does not exist (S166: No), the session 102 is deleted (S169).

次のルール(ルール9)が存在するので(S166:Yes)、切替前のルールm(ルール4)と切替後のルールn(ルール9)とが同じルールか否かを調べる(S164)。切替前後で、ルールが異なるので(S164:No)、切替前のパケットフィルタリングテーブルにおいて、ルール9(切替後のルールn)がルール4(切替前のルールm)の前に存在するか否かを調べる(S165)。ルール9はルール4の前に存在しないので(S165:No)、セッション102(ルール4に関連付けられたセッション情報)がルール9に対応するか否かを調べる(S167)。対応しない場合は(S167:No)、ステップS166へ進む。   Since the next rule (rule 9) exists (S166: Yes), it is checked whether the rule m before switching (rule 4) and the rule n after switching (rule 9) are the same rule (S164). Since the rules are different before and after switching (S164: No), whether or not rule 9 (rule n after switching) exists before rule 4 (rule m before switching) in the packet filtering table before switching. Check (S165). Since rule 9 does not exist before rule 4 (S165: No), it is checked whether or not session 102 (session information associated with rule 4) corresponds to rule 9 (S167). If not (S167: No), the process proceeds to step S166.

セッション102がルール9に対応するので(S167:Yes)、ルール9の「動作」が「通過」に設定されているかどうか調べる(S168)。「通過」に設定されているので(S168:Yes)、セッション102の「パケットフィルタのID」を4から9に変更して(S170)、ステップS171へ進む。ここで、「破棄」に設定されている場合は(S168:No)、セッション102のセッション情報を削除して(S169)、ステップS171へ進む。   Since the session 102 corresponds to the rule 9 (S167: Yes), it is checked whether the “operation” of the rule 9 is set to “pass” (S168). Since “pass” is set (S168: Yes), the “packet filter ID” of the session 102 is changed from 4 to 9 (S170), and the process proceeds to step S171. If “discard” is set (S168: No), the session information of the session 102 is deleted (S169), and the process proceeds to step S171.

ステップS171にて、ルール4に関連付けられた他のセッション情報が存在するか否かを調べる。存在する場合は(S171:Yes)、他のセッション情報について、ステップS163〜S171の処理を行う。   In step S171, it is checked whether there is other session information associated with rule 4. When it exists (S171: Yes), the process of step S163 to S171 is performed about other session information.

他のセッション情報が存在しないので(S171:No)、ルール4(切替前のルールm)に対して、優先順位が低い側の次のルールが存在するか否かを調べる(S172)。次のルール(ルール5)が存在するので(S172:Yes)、ルール5について、ステップS162〜S172の処理を実行する。以上のように、切替前のパケットフィルタリングテーブルに登録されたルールが存在する間は、ステップS162〜S172の処理を繰り返し実行する。また、次のルールが存在しない場合は(S172:No)、処理を終了する
以上で、セッション情報テーブルの更新が完了する。なお、本説明の場合であれば、パケットフィルタリングテーブルが切り替わると、セッション情報テーブルは、図6(B)に示すテーブルとなる。
Since there is no other session information (S171: No), it is checked whether or not there is a next rule with a lower priority with respect to rule 4 (rule m before switching) (S172). Since the next rule (rule 5) exists (S172: Yes), the processing of steps S162 to S172 is executed for rule 5. As described above, while there are rules registered in the packet filtering table before switching, the processes in steps S162 to S172 are repeatedly executed. If the next rule does not exist (S172: No), the process ends. The update of the session information table is completed. In the case of this description, when the packet filtering table is switched, the session information table becomes the table shown in FIG.

以上のように、ルールの切り替え時に発生するセッション情報の評価処理では、切替前のパケットフィルタリングテーブルの全ルールに対して、次の処理を行う。切替後のパケットフィルタリングテーブルの優先度の高いルールから順に、切替前のフィルタリングテーブルおいて、評価対象ルールの前方に存在したルールか否かを調べる。評価対象ルールの前方に存在しなかった場合は、評価対象ルールに関連付けられたセッション情報が、該当ルールに対応するか調べ、対応する場合は、該当ルールに関連付ける。これにより、セッション情報テーブルに登録された全てのセッション情報に対して、どのルールと対応するのかを調べる必要がない。このため、セッション情報テーブルに登録されたセッション情報の更新をセッションを切断することなく短時間で行うことができる。   As described above, in the process of evaluating session information that occurs when switching rules, the following processing is performed for all rules in the packet filtering table before switching. In order from the rule with the highest priority of the packet filtering table after switching, it is checked whether or not the rule exists in front of the evaluation target rule in the filtering table before switching. If it does not exist in front of the evaluation target rule, it is checked whether or not the session information associated with the evaluation target rule corresponds to the corresponding rule. Thereby, it is not necessary to check which rule corresponds to all the session information registered in the session information table. For this reason, the session information registered in the session information table can be updated in a short time without disconnecting the session.

なお、本実施形態では、「入力I/F=WAN」、「出力I/F=LAN」のルール更新時のセッション情報の評価処理について説明した。しかしながら、これに限らず、「入力I/F=LAN」、「出力I/F=WAN」のルール更新時についても、同様の処理手順で、セッション情報の評価処理を行うことができる。   In the present embodiment, the session information evaluation process when updating the rules of “input I / F = WAN” and “output I / F = LAN” has been described. However, the present invention is not limited to this, and the session information evaluation process can be performed in the same processing procedure even when the rules of “input I / F = LAN” and “output I / F = WAN” are updated.

以上のように、本発明に係るネットワーク機器1は、パケットフィルタリングテーブルのルールが更新されると、セッション情報テーブルに登録されたセッション情報を評価して、セッション情報テーブルを更新する。この際、更新対象のルールとそのルール以降に登録されたルールのみを参照して、セッション情報を評価する。これにより、パケットフィルタリングテーブルに登録された全てのルールを参照して、セッション情報を評価する必要がないので、セッション情報テーブルを短時間で更新することができる。   As described above, when the rule of the packet filtering table is updated, the network device 1 according to the present invention evaluates the session information registered in the session information table and updates the session information table. At this time, the session information is evaluated with reference to only the rule to be updated and the rules registered after that rule. Thereby, since it is not necessary to evaluate the session information with reference to all the rules registered in the packet filtering table, the session information table can be updated in a short time.

また、本発明に係るネットワーク機器1は、パケットフィルタリングテーブルが更新されると、セッション情報を評価して、セッション情報テーブルを更新する。セッション情報の評価は、更新後のパケットフィルタリングルールに基づいて、セッション情報を対応するルールに関連付ける。これにより、セッション情報テーブルに登録されたセッション情報は、更新後のパケットフィルタリングテーブルに登録されたルールに対応するのであれば、破棄されずそのまま登録される。このため、ネットワーク機器1は、確立しているセッションを維持したまま、パケットフィルタリング処理を行うことができる。   In addition, when the packet filtering table is updated, the network device 1 according to the present invention evaluates the session information and updates the session information table. The evaluation of the session information associates the session information with the corresponding rule based on the updated packet filtering rule. Thereby, if the session information registered in the session information table corresponds to the rule registered in the updated packet filtering table, it is registered as it is without being discarded. Therefore, the network device 1 can perform the packet filtering process while maintaining the established session.

ネットワーク機器を介してLANとWANが接続された環境を示す図である。It is a figure which shows the environment where LAN and WAN were connected via the network apparatus. ネットワーク機器のブロック図である。It is a block diagram of a network device. パケットフィルタリングテーブルの例を示す図である。It is a figure which shows the example of a packet filtering table. セッション情報テーブルの例を示す図である。It is a figure which shows the example of a session information table. 図3に示すパケットフィルタリングテーブルから一部のルールを抜粋した例を示す図である。It is a figure which shows the example which extracted a part of rule from the packet filtering table shown in FIG. 図4に示すセッション情報から一部のセッションを抜粋した例を示す図である。It is a figure which shows the example which extracted a part of session from the session information shown in FIG. ルールの追加時に発生するセッション情報の評価処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the evaluation process of the session information which occurs when a rule is added. ルールの削除時に発生するセッション情報の評価処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the evaluation process of the session information which occurs at the time of deletion of a rule. ルールの変更時に発生するセッション情報の評価処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the evaluation process of the session information which occurs at the time of a rule change. ルールの順序入れ替え時に発生するセッション情報の評価処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the evaluation process of the session information which generate | occur | produces at the time of order change of a rule. パケットフィルタリングテーブルの切り替え時に発生するセッション情報の評価処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the evaluation process of the session information which generate | occur | produces at the time of switching of a packet filtering table.

符号の説明Explanation of symbols

1−ネットワーク機器,2−クライアント装置,3−ネットワーク,4(4a,4b)−通信装置,10−CPU,11−フラッシュメモリ,12−RAM,13−レイヤ2スイッチチップ,14−LAN側ポート,15−PHYチップ,16−WAN側ポート 1-network device, 2-client device, 3-network, 4 (4a, 4b) -communication device, 10-CPU, 11-flash memory, 12-RAM, 13-layer 2 switch chip, 14-LAN side port, 15-PHY chip, 16-WAN side port

Claims (6)

複数のネットワークに接続されたネットワーク機器であって、
パケットの属性を判定する判定条件と、この判定条件に合致したパケットに対して実行する動作を指定する動作指定情報とを含むフィルタリングルールを、その実行に際して優先順位の高いものから順に記憶するルール記憶部と、
ネットワーク機器を介してセッションが確立した時のセッション情報を、該セッション情報に対応するフィルタリングルールの識別番号と関連付けて記憶するセッション記憶部と、
前記ルール記憶部に記憶されたフィルタリングルールが更新されると、前記セッション記憶部に記憶されたセッション情報に対して、前記ルール記憶部に記憶された複数のフィルタリングルールが対応するか否か評価する評価手段と、
前記評価手段の評価結果に基づいて、前記セッション記憶部に記憶されたセッション情報とフィルタリングルールの識別番号との関連付けを更新する更新手段と、を備え、
前記評価手段は、更新されたフィルタリングルール、または、該更新されたフィルタリングルールより優先順位が低いフィルタリングルールの識別番号に関連付けられたセッション情報に対して評価するネットワーク機器。
A network device connected to multiple networks,
Rule storage that stores filtering rules including determination conditions for determining packet attributes and operation designation information for specifying operations to be performed on packets that match the determination conditions, in descending order of priority. And
A session storage unit for storing session information when a session is established via a network device in association with an identification number of a filtering rule corresponding to the session information;
When the filtering rule stored in the rule storage unit is updated, it is evaluated whether or not the plurality of filtering rules stored in the rule storage unit correspond to the session information stored in the session storage unit. An evaluation means;
Updating means for updating the association between the session information stored in the session storage unit and the identification number of the filtering rule based on the evaluation result of the evaluation means;
The evaluation unit is a network device that evaluates session information associated with an updated filtering rule or an identification number of a filtering rule having a lower priority than the updated filtering rule.
前記評価手段は、前記ルール記憶部にフィルタリングルールが追加されると、追加されたフィルタリングルールより優先順位が低いフィルタリングルールの識別番号に関連付けられたセッション情報に対して、追加されたフィルタリングルールが対応するか否か評価し、
前記更新手段は、追加されたフィルタリングルールが対応するセッション情報を、追加されたフィルタリングルールの識別番号と関連付けるように更新する請求項1に記載のネットワーク機器。
When a filtering rule is added to the rule storage unit, the evaluating unit corresponds to the session information associated with the identification number of the filtering rule having a lower priority than the added filtering rule. Evaluate whether or not
The network device according to claim 1, wherein the updating unit updates the session information corresponding to the added filtering rule so as to be associated with the identification number of the added filtering rule.
前記評価手段は、前記ルール記憶部からフィルタリングルールが削除されると、削除されたフィルタリングルールの識別番号に関連付けられたセッション情報に対して、削除されたフィルタリングルールより優先順位の低いフィルタリングルールが対応するか否か評価し、
前記更新手段は、削除されたフィルタリングルールの識別番号に関連付けられたセッション情報を、削除後に残るフィルタリングルールの内で対応する最も優先順位が高いフィルタリングルールの識別番号に関連付けるように更新する請求項1に記載のネットワーク機器。
When the filtering rule is deleted from the rule storage unit, the evaluation means corresponds to a filtering rule having a lower priority than the deleted filtering rule for the session information associated with the identification number of the deleted filtering rule. Evaluate whether or not
The update means updates the session information associated with the identification number of the deleted filtering rule so as to be associated with the identification number of the filtering rule having the highest priority among the filtering rules remaining after the deletion. The network equipment described in 1.
前記評価手段は、前記ルール記憶部のフィルタリングルールが変更されると、変更前のフィルタリングルールの識別番号に関連付けられたセッション情報に対して、変更後のフィルタリングルール及び変更後のフィルタリングルールより優先順位の低いフィルタリングルールが対応するか否か評価し、
前記更新手段は、変更前のフィルタリングルールの識別番号に対応付けられたセッション情報を、変更後に存在するフィルタリングルールの内で対応する最も優先順位が高いフィルタリングルールの識別番号に関連付けるように更新する請求項1に記載のネットワーク機器。
When the filtering rule of the rule storage unit is changed, the evaluation unit has priority over the changed filtering rule and the changed filtering rule with respect to the session information associated with the identification number of the filtering rule before the change. Evaluate whether low filtering rules are supported,
The update unit updates the session information associated with the identification number of the filtering rule before the change so as to associate with the identification number of the filtering rule with the highest priority corresponding to the filtering rule existing after the change. Item 4. The network device according to Item 1.
前記評価手段は、前記ルール記憶部のフィルタリングルールの順序を入れ替えると、入れ替えたフィルタリングルールの識別番号に関連付けられたセッション情報に対して、入れ替えたフィルタリングルールより優先順位の低い、且つ、入れ替え後に入れ替えたフィルタリングルールより優先順位の高いフィルタリングルールが対応するか否か評価し、
前記更新手段は、入れ替えたフィルタリングルールの識別番号に関連付けられたセッション情報を、入れ替え後のフィルタリングルールの内で対応する最も優先順位が高いフィルタリングルールの識別番号に関連付けるように更新する請求項1に記載のネットワーク機器。
When the order of the filtering rules in the rule storage unit is changed, the evaluation unit has a lower priority than the replaced filtering rules for the session information associated with the identification number of the replaced filtering rule, and is replaced after the replacement. Evaluate whether filtering rules with higher priority than filtering rules
The update unit updates the session information associated with the identification number of the replaced filtering rule so as to be associated with the identification number of the filtering rule with the highest priority corresponding to the filtering rule after the replacement. The described network equipment.
前記評価手段は、前記ルール記憶部を切り替えると、切り替え前のフィルタリングルールに関連付けられたセッション情報に対して、切り替え後のフィルタリングルールから、切り替え前に対応するフィルタリングルールより優先度が高いフィルタリングルールを除いて、対応するか否かを評価し、
前記更新手段は、該セッション情報を、該当する最も優先順位が高いフィルタリングルールの識別番号に関連付けるように更新する請求項1のネットワーク機器。
When the evaluation unit switches the rule storage unit, a filtering rule having a higher priority than the filtering rule corresponding to the pre-switching filtering rule is selected from the post-switching filtering rule for the session information associated with the pre-switching filtering rule. Except, evaluate whether to respond,
The network device according to claim 1, wherein the updating unit updates the session information so as to be associated with an identification number of a corresponding filtering rule having the highest priority.
JP2007200541A 2007-08-01 2007-08-01 Network equipment Active JP4900119B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007200541A JP4900119B2 (en) 2007-08-01 2007-08-01 Network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007200541A JP4900119B2 (en) 2007-08-01 2007-08-01 Network equipment

Publications (2)

Publication Number Publication Date
JP2009038555A true JP2009038555A (en) 2009-02-19
JP4900119B2 JP4900119B2 (en) 2012-03-21

Family

ID=40440095

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007200541A Active JP4900119B2 (en) 2007-08-01 2007-08-01 Network equipment

Country Status (1)

Country Link
JP (1) JP4900119B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018508166A (en) * 2015-01-09 2018-03-22 北京京東尚科信息技術有限公司Beijing Jingdong Shangke Information Technology Co., Ltd. System and method for regulating access requests

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10224409A (en) * 1997-02-07 1998-08-21 Oki Electric Ind Co Ltd Communication system
JPH10243028A (en) * 1997-01-15 1998-09-11 At & T Corp Session cache and rule cashing method for dynamic filter
JP2000349851A (en) * 1999-06-02 2000-12-15 Fujitsu Ltd Device for packet transfer
JP2004538678A (en) * 2001-05-09 2004-12-24 テレコム・イタリア・エッセ・ピー・アー Dynamic packet filter using session tracking

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10243028A (en) * 1997-01-15 1998-09-11 At & T Corp Session cache and rule cashing method for dynamic filter
JPH10224409A (en) * 1997-02-07 1998-08-21 Oki Electric Ind Co Ltd Communication system
JP2000349851A (en) * 1999-06-02 2000-12-15 Fujitsu Ltd Device for packet transfer
JP2004538678A (en) * 2001-05-09 2004-12-24 テレコム・イタリア・エッセ・ピー・アー Dynamic packet filter using session tracking

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018508166A (en) * 2015-01-09 2018-03-22 北京京東尚科信息技術有限公司Beijing Jingdong Shangke Information Technology Co., Ltd. System and method for regulating access requests

Also Published As

Publication number Publication date
JP4900119B2 (en) 2012-03-21

Similar Documents

Publication Publication Date Title
US20180083865A1 (en) Systems and methods for software defined networking service function chaining
US9215237B2 (en) Communication system, control device, communication method, and program
US8798016B2 (en) Method for improving peer to peer network communication
EP3021538A1 (en) Message transmission method, router, and service switch
JP6308601B2 (en) Packet processing method and device
US20170195241A1 (en) Communication flow control system, communication flow control method, and communication flow processing program
WO2016123314A1 (en) Data loop determination in a software-defined network
JP6437693B2 (en) Multicast data packet forwarding
CN110381025B (en) Implementation method of software defined firewall system
KR102585874B1 (en) Method and apparatus for routing control in sdn network
US9998542B2 (en) System and method for determining routing information
CN102265563B (en) Method and arrangement of identifying traffic flows in communication network
CN114205312A (en) Method and equipment for generating table entry
JP4900119B2 (en) Network equipment
CA2595438C (en) Method for improving peer to peer network communication
EP3140966B1 (en) Service application with learning capability
US20150263953A1 (en) Communication node, control apparatus, communication system, packet processing method and program
EP3589024A1 (en) Method and apparatus for processing message
WO2016159964A1 (en) Network policy distribution
CN108476172B (en) Control device, computer-readable recording medium, and equipment control system
WO2017170155A1 (en) Communication system, flow control apparatus, flow processing apparatus, and control method
JP2016178530A (en) Communication system, communication terminal, communication method, and program
KR20110037860A (en) Method for applying dynamic updates of forwarding and qos rules on flow based network devices
JP2017085369A (en) Network controller and network system
CN112956163B (en) Communication device and communication method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100622

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111011

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111219

R150 Certificate of patent or registration of utility model

Ref document number: 4900119

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150113

Year of fee payment: 3