パケットベースの転送
SRXシリーズファイアウォールは、パケットモードとフローモードの2つの異なるモードで動作します。フローモードでは、SRXはトラフィックの状態またはセッションを分析して、すべてのトラフィックを処理します。これは、トラフィックのステートフル処理とも呼ばれます。パケットモードでは、SRXはパケットごとにトラフィックを処理します。これは、トラフィックのステートレス処理とも呼ばれます。
パケットベース処理について
Junos OS を実行しているジュニパーネットワークスのデバイスに出入りするパケットは、パケットベース処理の対象となります。パケットベース(ステートレス)のパケット処理は、パケットを個別に処理します。各パケットは、治療のために個別に評価されます。ステートレスなパケットベースの転送は、フローや状態の情報に関係なく、パケットごとに実行されます。各パケットは、治療のために個別に評価されます。
図 1 は、パケットベース転送のトラフィック フローを示しています。

パケットがデバイスに入ると、分類子、フィルター、ポリサーが適用されます。次に、パケットのエグレス インターフェイスがルート ルックアップによって決定されます。パケットのエグレスインターフェイスが見つかると、フィルターが適用され、パケットはエグレスインターフェイスに送信され、そこでキューに入れられ、送信がスケジュールされます。
パケットベースの転送では、特定の接続に属する前後のパケットに関する情報は必要なく、トラフィックを許可するか拒否するかの決定はパケットごとに行われます。このアーキテクチャでは、個々のフローや状態を追跡せずにパケットを転送するため、大規模に拡張できるというメリットがあります。
Junos OS リリース 15.1X49-D100以降、SRX100、SRX110、SRX210、SRX220、SRX240、SRX300、SRX320、SRX340、SRX345、SRX380、SRX550M、SRX650では、パケットキャプチャの最大キャプチャサイズが1520バイトに拡張され、1500バイトのデータと12バイトのジュニパーイーサネットヘッダーをキャプチャできるようになりました。
選択的ステートレス パケットベース サービスの理解
選択的ステートレス パケットベース サービスでは、システム上でフローベースとパケットベースの両方の転送を同時に使用できます。アクセス コントロール リスト(ACL)とも呼ばれるステートレス ファイアウォール フィルターを使用して、パケットベースのステートレス転送を必要とするトラフィックを選択的に誘導し、ステートフルなフローベースの転送を回避できます。そのように指示されていないトラフィックは、デフォルトのフローベース転送パスに従います。フローベース転送のバイパスは、フローセッションスケーリングの制約を明示的に回避したいトラフィックに有効です。
デフォルトでは、Junos OS を実行しているジュニパーネットワークスのセキュリティデバイスは、フローベースの転送を使用します。選択的ステートレス パケットベース サービスでは、入力フィルター条件に基づいて選択されたトラフィックに対してパケットベース処理のみを提供するようにデバイスを設定できます。その他のトラフィックは、フローベース転送用に処理されます。フローベースの転送をバイパスすることは、セッションスケーリングの制約や、セッションの作成およびメンテナンスコストを回避したい導入に有効です。
選択的ステートレス パケットベース処理を行うようにデバイスを設定する場合、システムに入るパケットは特定の条件に応じて異なる方法で処理されます。
パケットが入力フィルター条件で指定された一致条件を満たす場合、パケットモードとしてマークされ、設定されたすべてのパケットモード機能が適用されます。フローベースのセキュリティ機能は適用されません。それはそれらを迂回します。
パケットにパケットモードのフラグが立てられていない場合、パケットは通常どおり処理されます。このトラフィックには、MPLSを除くすべてのサービスを適用できます。
図 2 は、フローベースの処理をバイパスする、選択的なステートレス パケットベースのサービスによるトラフィック フローを示しています。

パケットがインターフェイスに着信すると、インターフェイスに設定された入力パケットフィルターが適用されます。
パケットが ファイアウォール フィルターで指定された条件に一致する場合、
packet-mode
アクション修飾子がパケットに設定されます。パケットモードアクション修飾子は、パケットキーバッファのビットフィールドを更新します。このビットフィールドは、フローベース転送をバイパスする必要があるかどうかを判断するために使用されます。その結果、パケット モード アクション修飾子が付いたパケットは、フローベース転送を完全にバイパスします。パケットのエグレスインターフェイスは、ルート検索によって決定されます。パケットのエグレスインターフェイスが見つかると、フィルターが適用され、パケットはエグレスインターフェイスに送信され、そこでキューに入れられ、送信がスケジュールされます。パケットがこのフィルター条件で指定された条件と一致しない場合、フィルターで設定された他の条件に対して評価されます。すべての用語が評価された後、パケットがフィルター内のどの用語にも一致しない場合、そのパケットは自動的に破棄されます。パケットが破棄されないようにするには、すべてのパケットを受け入れるアクションを指定する条件をフィルターで設定します。
ステートレス サービスの定義済みセットは、選択的ステートレス パケットベース サービスで利用できます。
IPv4/IPv6ルーティング(ユニキャストおよびマルチキャストプロトコル)
サービスクラス (CoS)
リンクのフラグメント化とインターリーブ(LFI)
一般的なルーティングカプセル化(GRE)
レイヤー2スイッチング
MPLS(マルチプロトコル ラベル スイッチ)
ステートレス ファイアウォール フィルター
CRTP(Compressed Real-Time Transport Protocol)
MPLS サービスを必要とするトラフィックはパケット モードで処理する必要がありますが、状況によっては、ステートフルインスペクション、NAT、IPsec など、フロー モードでしか提供できない特定のサービスをこのトラフィックに同時に適用する必要がある場合があります。フロー モードとパケット モードの両方でトラフィックを処理するようにシステムに指示するには、トンネル インターフェイスを介して接続された複数のルーティング インスタンスを設定する必要があります。一方のルーティング インスタンスはフロー モードでパケットを処理するように設定し、もう一方のルーティング インスタンスはパケット モードでパケットを処理するように設定する必要があります。トンネル インターフェイスを使用してルーティング インスタンスを接続すると、ルーティング インスタンス間のトラフィックが転送パスに再度挿入され、別の転送方法を使用して再処理できます。
選択的ステートレス パケットベース サービス構成の概要
この機能は、SRX300、SRX320、SRX340、SRX345、SRX380、SRX550M、SRX1500、vSRX仮想ファイアウォールの各デバイスでサポートされています。選択的なステートレス パケットベース サービスは、アクセス コントロール リスト(ACL)とも呼ばれるステートレス ファイアウォール フィルターを使用して設定します。ファイアウォールフィルターで一致条件を指定することでパケットベース転送のトラフィックを分類し、アクションを指定する packet-mode
アクション修飾子を設定します。一致条件とアクションが定義されると、ファイアウォールフィルターが関連するインターフェイスに適用されます。
ファイアウォールフィルターを設定するには:
パケットがインターフェイスに着信すると、インターフェイスに設定された入力パケットフィルターが適用されます。パケットが指定された条件に一致し、 packet-mode
アクションが設定されている場合、パケットはフローベース転送を完全にバイパスします。
フィルターを設定する際は、ファイアウォールフィルター内の条件の順序に注意してください。パケットは、設定に記載されている順序で各条件に対してテストされます。最初に一致する条件が見つかった場合、 next term
アクション修飾子が含まれていない限り、その条件に関連付けられたアクションがパケットに適用され、ファイアウォールフィルターの評価が終了します。 next term
アクションが含まれている場合、一致するパケットはファイアウォールフィルターの次の条件に対して評価されます。そうでない場合、一致するパケットはファイアウォールフィルターの後続の条件に対して評価されません。
選択的ステートレスパケットベースサービス用にファイアウォールフィルターを設定する場合:
不要なパケットドロップを回避するために、フローをバイパスする必要があるトラフィックを正確に特定します。
パケットベースのフロー パスに関与するすべてのインターフェイスで、パケットモード アクションでファイアウォール フィルターを適用してください。
フローベース転送を使用するようにホストバウンドTCPトラフィックを設定してください—
packet-mode
アクション修飾子を含むファイアウォールフィルター条件の一致条件を指定する場合は、このトラフィックを除外します。フローをバイパスするように設定されたホストバウンドTCPトラフィックはすべて破棄されます。非同期フローモード処理は、選択的ステートレス パケットベース サービスではサポートされていません。入力パケット フィルター(出力ではない)を
packet-mode
アクション修飾子で構成します。
ネストされたファイアウォールフィルター(別のフィルターの条件内でフィルターを構成する)は、選択的ステートレスパケットベースサービスではサポートされていません。
選択的なステートレスなパケットベースサービスを設定できる一般的な導入シナリオを以下に示します。
プライベートLANとWANインターフェイス間のトラフィックフロー(イントラネットトラフィックなど、エンドツーエンドの転送がパケットベース)
プライベートLANと安全性の低いWANインターフェイス間のトラフィックフロー。トラフィックは、安全なトラフィックとそうでないトラフィックにそれぞれパケットベースとフローベースの転送を使用します。
プライベートWANリンクがダウンした場合、フローベースのIPsec WANにフェイルオーバーする、プライベートLANとWANインターフェイス間のトラフィックフロー
フローベースLANからパケットベースMPLS WANへのトラフィックフロー
例:エンドツーエンドのパケットベース転送のための選択的ステートレス パケットベース サービスの設定
この例では、エンドツーエンドのパケットベース転送向けに、選択的なステートレスパケットベースサービスを設定する方法を示しています。この機能は、SRX300、SRX320、SRX340、SRX345、SRX380、SRX550M、SRX1500、vSRX仮想ファイアウォールの各デバイスでサポートされています
必要条件
開始する前に、以下を実行します。
ステートレス ファイアウォール フィルターの構成方法を理解します。
基本的な接続性を確立します。.
概要
この例では、各デバイスのインターフェイスのIPアドレスを設定します。R0 の場合は 10.1.1.2/24 です。R1 の場合は、10.1.1.1/24、10.2.1.1/24、および 203.0.113.1/30 です。R2の場合は203.0.113.2/30です。R3では10.2.1.2/24です。R0 は 10.1.1.2、R1 は 198.51.100.2、R2 は 203.0.113.1、R3 は 10.2.1.1 というように、スタティック ルートを作成し、デバイスのネクストホップ アドレスを関連付けます。
次に、デバイスR1でuntrustと呼ばれるゾーンを設定し、インターフェイスge-0/0/3に割り当てます。また、trustと呼ばれるゾーンを作成し、インターフェイスge-0/0/1およびge-0/0/2を割り当てます。trustゾーンとuntrustゾーンを設定して、サポートされているすべてのアプリケーションサービスをインバウンドサービスとして許可します。任意の送信元アドレス、宛先アドレス、アプリケーションからのトラフィックがゾーン間を通過できるようにすることができます。
次に、ファイアウォール フィルター bypass-flow-filter を作成し、内部インターフェイス ge-0/0/1 と ge-0/0/2 間のトラフィックに一致し、packet-mode アクション修飾子を含む条件 bypass-flow-term-1 と bypass-flow-term-2 を定義します。条件 accept-rest を定義して、残りのすべてのトラフィックを受け入れます。最後に、ファイアウォール フィルター bypass-flow-filter を内部インターフェイス ge-0/0/1 および ge-0/0/2(外部インターフェース 上にない)に適用します。その結果、すべての内部トラフィックはフローベース転送をバイパスし、インターネットとの間のトラフィックはフローベース転送をバイパスしません。
図 3 は、この例で使用されているネットワーク トポロジーを示しています。

会社の支社/拠点はプライベートWANで相互に接続されています。この内部トラフィックでは、セキュリティが問題にならないため、パケット転送が必要です。したがって、このトラフィックでは、フローベース転送をバイパスするために、選択的なステートレスパケットベースサービスを設定することにしました。インターネットとの間の残りのトラフィックは、フローベースの転送を使用します。
構成
プロシージャ
CLIクイック構成
この例を迅速に設定するには、次のコマンドをコピーしてテキストファイルに貼り付け、改行を削除して、ネットワーク設定に一致させる必要がある詳細情報を変更し、コマンドを [edit]
階層レベルのCLIにコピーアンドペーストして、設定モードから commit
を入力します。
{device R0} [edit] set interfaces ge-0/0/1 description "Internal 1" unit 0 family inet address 10.1.1.2/24 set routing-options static route 0.0.0.0/0 next-hop 10.1.1.1
{device R1} set interfaces ge-0/0/1 description "Internal 1" unit 0 family inet address 10.1.1.1/24 set interfaces ge-0/0/2 description "Internal 2" unit 0 family inet address 10.2.1.1/24 set interfaces ge-0/0/3 description "Internet" unit 0 family inet address 203.0.113.1/30 set routing-options static route 0.0.0.0/0 next-hop 203.0.113.2 set security zones security-zone untrust interfaces ge-0/0/3 set security zones security-zone trust interfaces ge-0/0/1 set security zones security-zone trust interfaces ge-0/0/2 set security zones security-zone trust host-inbound-traffic system-services all set security zones security-zone untrust host-inbound-traffic system-services all set security policies from-zone trust to-zone untrust policy Internet-traffic match source-address any destination-address any application any set security policies from-zone trust to-zone untrust policy Internet-traffic then permit set security policies from-zone untrust to-zone trust policy Incoming-traffic match source-address any destination-address any application any set security policies from-zone untrust to-zone trust policy Incoming-traffic then permit set security policies from-zone trust to-zone trust policy Intrazone-traffic match source-address any destination-address any application any set security policies from-zone trust to-zone trust policy Intrazone-traffic then permit set firewall family inet filter bypass-flow-filter term bypass-flow-term-1 from source-address 10.1.1.0/24 set firewall family inet filter bypass-flow-filter term bypass-flow-term–1 from destination-address 10.2.1.0/24 set firewall family inet filter bypass-flow-filter term bypass-flow-term-1 then packet-mode set firewall family inet filter bypass-flow-filter term bypass-flow-term-2 from source-address 10.2.1.0/24 set firewall family inet filter bypass-flow-filter term bypass-flow-term-2 from destination-address 10.1.1.0/24 set firewall family inet filter bypass-flow-filter term bypass-flow-term-2 then packet-mode set firewall family inet filter bypass-flow-filter term accept-rest then accept set interfaces ge-0/0/1 description "Internal 1" unit 0 family inet filter input bypass-flow-filer set interfaces ge-0/0/2 description "Internal 2" unit 0 family inet filter input bypass-flow-filer
{device R2} set interfaces ge-0/0/3 description "Internet" unit 0 family inet address 10.1.1.2/30 set routing-options static route 0.0.0.0/0 next-hop 10.1.1.1
{device R3} [edit] set interfaces ge-0/0/2 description "Internal 2" unit 0 family inet address 10.2.1.2/24 set routing-options static route 0.0.0.0/0 next-hop 10.2.1.1
手順
次の例では、設定階層のいくつかのレベルに移動する必要があります。その方法の詳細については、CLIユーザー ガイドの 設定モードにおけるCLIエディターの使用を参照してください。
エンドツーエンドのパケットベース転送用に選択的ステートレスパケットベースサービスを設定するには、以下を行います。
デバイス R0、R1、R2、および R3 のインターフェイスの IP アドレスを設定します。
{device R0} [edit] user@host#
set interfaces ge-0/0/1 description "Internal 1" unit 0 family inet address 10.1.1.2/24
{device R1} [edit] user@host#
set interfaces ge-0/0/1 description "Internal 1" unit 0 family inet address 10.1.1.1/24
user@host#set interfaces ge-0/0/2 description "Internal 2" unit 0 family inet address 10.2.1.1/24
user@host#set interfaces ge-0/0/3 description "Internet" unit 0 family inet address 203.0.113.1/30
{device R2} [edit] user@host#
set interfaces ge-0/0/3 description "Internet" unit 0 family inet address 203.0.113.1/30
{device R3} [edit] user@host#
set interfaces ge-0/0/2 description "Internal 2" unit 0 family inet address 10.2.1.2/24
スタティック ルートを作成し、デバイス R0、R1、R2、および R3 に適切なネクストホップ アドレスを関連付けます。
{device R0} [edit] user@host#
set routing-options static route 0.0.0.0/0 next-hop 10.1.1.1
{device R1} [edit] user@host#
set routing-options static route 0.0.0.0/0 next-hop 203.0.113.1
{device R2} [edit] user@host#
set routing-options static route 0.0.0.0/0 next-hop 203.0.113.2
{device R3} [edit] user@host#
set routing-options static route 0.0.0.0/0 next-hop 10.2.1.1
セキュリティ ゾーンを設定し、インターフェイスを割り当てます。
{device R1} [edit] user@host#
set security zones security-zone untrust interfaces ge-0/0/3
user@host#set security zones security-zone trust interfaces ge-0/0/1
user@host#set security zones security-zone trust interfaces ge-0/0/2
ゾーンのアプリケーションサービスを設定します。
{device R1} [edit] user@host#
set security zones security-zone trust host-inbound-traffic system-services all
user@host#set security zones security-zone untrust host-inbound-traffic system-services all
セキュリティ ポリシーを構成する
{device R1} [edit] user@host#
set security policies from-zone trust to-zone untrust policy Internet-traffic match source-address any destination-address any application any
user@host#set security policies from-zone trust to-zone untrust policy Internet-traffic then permit
user@host#set security policies from-zone untrust to-zone trust policy Incoming-traffic match source-address any destination-address any application any
user@host#set security policies from-zone untrust to-zone trust policy Incoming-traffic then permit
user@host#set security policies from-zone trust to-zone trust policy Intrazone-traffic match source-address any destination-address any application any
user@host#set security policies from-zone trust to-zone trust policy Intrazone-traffic then permit
ファイアウォールフィルターを作成し、すべてのパケットベース転送トラフィックの条件を定義します。
{device R1} [edit] user@host#
set firewall family inet filter bypass-flow-filter term bypass-flow-term-1 from source-address 10.1.1.0/24
user@host#set firewall family inet filter bypass-flow-filter term bypass-flow-term–1 from destination-address 10.2.1.0/24
user@host#set firewall family inet filter bypass-flow-filter term bypass-flow-term-1 then packet-mode
user@host#set firewall family inet filter bypass-flow-filter term bypass-flow-term-2 from source-address 10.2.1.0/24
user@host#set firewall family inet filter bypass-flow-filter term bypass-flow-term-2 from destination-address 10.1.1.0/24
user@host#set firewall family inet filter bypass-flow-filter term bypass-flow-term-2 then packet-mode
残りのトラフィックに別の条件を指定します。
{device R1} [edit] user@host#
set firewall family inet filter bypass-flow-filter term accept-rest then accept
ファイアウォールフィルターを関連するインターフェイスに適用します。
{device R1} [edit] user@host#
set interfaces ge-0/0/1 description "Internal 1" unit 0 family inet filter input bypass-flow-filer
user@host#set interfaces ge-0/0/2 description "Internal 2" unit 0 family inet filter input bypass-flow-filer
業績
設定モードから、 show interfaces
、 show routing-options
、および show firewall
コマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の設定手順を繰り返して設定を修正します。
{device R0} [edit] user@host# show interfaces ge-0/0/1 { description “Internal 1” unit 0 { family inet { address 10.1.1.2/24 } } }
{device R0} [edit] user@host# show routing-options static { route 0.0.0.0/0 next-hop 10.1.1.1; }
{device R2} [edit] user@host# show interfaces ge-0/0/3 { description “Internet” unit 0 { family inet { address 203.0.113.2/30; } } }
{device R2} [edit] user@host# show routing-options static { route 0.0.0.0/0 next-hop 203.0.113.1; }
{device R3} [edit] user@host# show interfaces ge-0/0/2 { description “Internal 2” unit 0 { family inet { address 10.2.1.2/24; } } }
{device R3} user@host# show routing-options static { route 0.0.0.0/0 next-hop 10.2.1.1; }
{device R1} [edit] user@host# show interfaces ge-0/0/1 { description “internal 1” unit 0 { family inet { filter { input bypass-flow-filter; } address 10.1.1.1/24; } } } ge-0/0/2 { description “Internal 2” unit 0 { family inet { filter { input bypass-flow-filter; } address 10.2.1.1/24; } } } ge-0/0/3 { description “Internet” unit 0 { family inet { address 203.0.113.1/30; } } } {device R1} [edit] user@host# show routing-options static { route 0.0.0.0/0 next-hop 203.0.113.1; } {device R1} [edit] user@host# show firewall family inet { filter bypass-flow-filter { term bypass-flow-term-1 { from { source-address { 10.1.1.0/24; } destination-address { 10.2.1.0/24; } } then packet-mode; } term bypass-flow-term-2 { from { source-address { 10.2.1.0/24; } destination-address { 10.1.1.0/24; } } then packet-mode; } term accept-rest { then accept; } } }
デバイスの設定が完了したら、設定モードから commit
を入力します。
検証
設定が正常に機能していることを確認します。
エンドツーエンドのパケットベース設定の検証
目的
選択的なステートレス パケットベース サービスが設定されていることを確認します。
アクション
設定モードから、 show interfaces
、 show routing-options
、 show security zones
、 show security policies
、および show firewall
コマンドを入力します。
ファイアウォールフィルター、インターフェイス、およびポリシーの意図した設定内容が出力されていることを確認します。
パケットをテストしたい順番に条件がリストされていることを確認します。 insert
コマンドを使用して、ファイアウォールフィルター内の条件を移動できます。
イントラネットトラフィックでのセッション確立の確認
目的
イントラネット内のインターフェイスにトラフィックが送信されるときに、セッションが確立されていることを確認します。
アクション
セッションが確立されていることを確認するには、以下のタスクを実行します。
デバイス
R1
で、動作モードclear security flow session all
コマンドを入力して、既存のセキュリティ フロー セッションをすべてクリアします。デバイス
R0
では、動作モードping
コマンドを入力して、デバイスR3
にトラフィックを送信します。デバイス
R1
で、デバイスR0
からR3
にR1
を介してトラフィックを送信する場合に、動作モードshow security flow session
コマンドを入力します。Flow Sessions on FPC10 PIC1: Total sessions: 0 Flow Sessions on FPC10 PIC2: Total sessions: 0 Flow Sessions on FPC10 PIC3: Total sessions: 0
確立されたセッションを確認するには、ping
コマンドがパケットを送受信している間に show security flow session
コマンドを入力してください。
Junos OS リリース 15.1X49-D30 および Junos OS リリース 17.3R1 以降、セッション フローの概要に CP セッション ID が含まれるようになりました。
{device R0} user@host> ping 203.0.113.6
PING 203.0.113.6 (203.0.113.6): 56 data bytes 64 bytes from 203.0.113.6: icmp_seq=0 ttl=63 time=2.326 ms 64 bytes from 203.0.113.6: icmp_seq=1 ttl=63 time=2.569 ms 64 bytes from 203.0.113.6: icmp_seq=2 ttl=63 time=2.565 ms 64 bytes from 203.0.113.6: icmp_seq=3 ttl=63 time=2.563 ms 64 bytes from 203.0.113.6: icmp_seq=4 ttl=63 time=2.306 ms 64 bytes from 203.0.113.6: icmp_seq=5 ttl=63 time=2.560 ms 64 bytes from 203.0.113.6: icmp_seq=6 ttl=63 time=4.130 ms 64 bytes from 203.0.113.6: icmp_seq=7 ttl=63 time=2.316 ms ...
{device R1} user@host> show security flow session
Flow Sessions on FPC10 PIC1: Total sessions: 0 Flow Sessions on FPC10 PIC2: Total sessions: 0 Flow Sessions on FPC10 PIC3: Total sessions: 0
この出力は、R0
からR3
へのトラフィック送信を示しており、セッションは確立されていません。この例では、会社のイントラネット トラフィックのインターフェイス Internal 1
と Internal 2
に packet-mode
アクション修飾子を含むbypass-flow-filter
を適用しました。この出力は、2 つのインターフェイス間のトラフィックがフローベース転送を正しくバイパスしているため、セッションが確立されていないことを検証します。
インターネットトラフィックでのセッション確立の確認
目的
トラフィックがインターネットに送信されるときに、セッションが確立されていることを確認します。
アクション
インターネットへのトラフィックがフローベース転送を使用しており、セッションが確立されていることを確認するには、以下のタスクを実行します。
デバイス
R1
で、動作モードclear security flow session all
コマンドを入力して、既存のセキュリティ フロー セッションをすべてクリアします。デバイス
R0
では、動作モードping
コマンドを入力して、デバイスR2
にトラフィックを送信します。デバイス
R1
で、R1
を介してR0
からR2
にトラフィックを送信する場合に、show security flow session
コマンドを動作モード入力します。
確立されたセッションを確認するには、ping
コマンドがパケットを送受信している間に show security flow session
コマンドを入力してください。
{device R0} user@host> ping 10.2.1.2 -c 10
PING 10.2.1.2 (10.2.1.2) 56(84) bytes of data. 64 bytes from 10.2.1.2: icmp_seq=1 ttl=63 time=6.07 ms 64 bytes from 10.2.1.2: icmp_seq=2 ttl=63 time=4.24 ms 64 bytes from 10.2.1.2: icmp_seq=3 ttl=63 time=2.85 ms 64 bytes from 10.2.1.2: icmp_seq=4 ttl=63 time=6.14 ms ...
{device R1} user@host>show security flow session
Flow Sessions on FPC10 PIC1: Session ID: 410000077, Policy name: Internet-traffic/5, Timeout: 2, Valid In: 10.1.1.2/3 --> 10.2.1.2/32055;icmp, If: ge-0/0/1.0, Pkts: 1, Bytes: 84, CP Session ID: 410000198 Out: 10.2.1.2/32055 --> 10.1.1.2/3;icmp, If: ge-0/0/2.0, Pkts: 1, Bytes: 84, CP Session ID: 410000198 Total sessions: 1 Flow Sessions on FPC10 PIC2: Session ID: 420000079, Policy name: Internet-traffic/5, Timeout: 2, Valid In: 10.1.1.2/5 --> 10.2.1.2/32055;icmp, If: ge-0/0/1.0, Pkts: 1, Bytes: 84, CP Session ID: 420000163 Out: 10.2.1.2/32055 --> 10.1.1.2/5;icmp, If: ge-0/0/2.0, Pkts: 1, Bytes: 84, CP Session ID: 420000163 Total sessions: 1 Flow Sessions on FPC10 PIC3: Session ID: 430000090, Policy name: Internet-traffic/5, Timeout: 4, Valid In:10.1.1.2/7 --> 10.2.1.2/32055;icmp, If: ge-0/0/1.0, Pkts: 1, Bytes: 84, CP Session ID: 430000088 Out: 10.2.1.2/32055 --> 10.1.1.2/7;icmp, If: ge-0/0/2.0, Pkts: 1, Bytes: 84, CP Session ID: 430000088 Total sessions: 1
出力は、R0
デバイスからR1
および確立されたセッションに送信されるトラフィックを示しています。この例では、会社のインターネット トラフィックのインターフェイス Internet
に packet-mode
アクション修飾子を含むbypass-flow-filter
を適用しませんでした。この出力は、インターネットへのトラフィックがフローベース転送を正しく使用しているため、セッションが確立されていることを確認します。
デバイス R3
から R2
にトラフィックを送信し、このセクションのコマンドを使用して確立されたセッションを確認します。
例:パケットベースからフローベースの転送のための選択的ステートレス パケットベース サービスの設定
この例では、パケットベースからフローベースへの転送向けに、選択的なステートレスパケットベースサービスを設定する方法を示しています。この機能は、SRX300、SRX320、SRX340、SRX345、SRX380、SRX550M、SRX1500、vSRX仮想ファイアウォールの各デバイスでサポートされています。
必要条件
開始する前に、以下を実行します。
ステートレス ファイアウォール フィルターの構成方法を理解します。
基本的な接続性を確立します。.
概要
この例では、各デバイスのインターフェイスのIPアドレスを設定します。デバイスR0の場合、198.51.100.9/24。R1 では 198.51.100.10/24 および 203.0.113.5/24 です。R2では203.0.113.9/24です。デバイスR1では、ルーティングインスタンス間に内部サービスインターフェイスlt-0/0/0を設定し、2つの仮想デバイス間のピア関係を設定します。次に、Primary-VR-zone と Internet-VR-zone の 2 つのセキュリティ ゾーンを作成し、関連するインターフェイスを割り当て、サポートされているすべてのアプリケーションとプロトコルを許可するように設定します。
次に、ポリシーを設定し、すべてのパケットを許可するように指定します。インターネット VR ルーティング インスタンス仮想デバイスを設定し、フローベースの転送用のインターフェイスを割り当てます。デバイス R0、R1、および R2 で OSPF をイネーブルにします。デバイスR2では、パケットモードアクション修飾子を含む条件bypass-flow-termを使用してフィルターバイパスフローフィルターを設定します。一致条件を指定していないため、このフィルターは適用されているインターフェイスを通過するすべてのトラフィックに適用されます。
最後に、デバイスR1で、ファイアウォールフィルターバイパスフローフィルターを内部インターフェイスge-0/0/2.0およびlt-0/0/0.0に適用します。このフィルターは、インターネット VR ルーティング インスタンスに関連付けられたインターフェイスには適用しません。その結果、プライマリ ルーティング インスタンスに関連付けられた LAN インターフェイスを通過するすべてのトラフィックはパケットベースの転送を使用し、インターネット VR ルーティング インスタンスを通過するすべてのトラフィックはフローベースの転送を使用します。
図 4 は、この例で使用されているネットワーク トポロジーを示しています。

プライベートLANに面したインターフェイスにはセキュリティサービスは必要ありませんが、WANに面したインターフェイスにはセキュリティが必要です。この例では、2つのルーティングインスタンス(1つはパケットベース転送を処理し、もう1つはフローベース転送を処理する)を設定することで、セキュアなトラフィックとそうでないトラフィックに対して、パケットベースとフローベースの両方の転送を構成することにしました。
構成
プロシージャ
CLIクイック構成
この例を迅速に設定するには、次のコマンドをコピーしてテキストファイルに貼り付け、改行を削除して、ネットワーク設定に一致させる必要がある詳細情報を変更し、コマンドを [edit]
階層レベルのCLIにコピーアンドペーストして、設定モードから commit
を入力します。
{device R0} set interfaces description “Connect to Primary VR” ge-0/0/2 unit 0 family inet address 198.51.100.9/24 set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
{device R1} set interfaces description “Connect to R0” ge-0/0/2 unit 0 family inet address 198.51.100.10/24 set interfaces description “Connect to R2” ge-0/0/3 unit 0 family inet address 203.0.113.5/24 set interfaces lt-0/0/0 unit 0 encapsulation frame-relay dlci 100 peer-unit 1 family inet address 192.0.2.1/16 set interfaces lt-0/0/0 unit 1 encapsulation frame-relay dlci 100 peer-unit 0 family inet address 192.0.2.2/16 set security zones security-zone Primary-VR-zone host-inbound-traffic system-services all set security zones security-zone Primary-VR-zone host-inbound-traffic protocols all set security zones security-zone Primary-VR-zone interfaces ge-0/0/2.0 set security zones security-zone Primary-VR-zone interfaces lt-0/0/0.0 set security zones security-zone Internet-VR-zone host-inbound-traffic system-services all set security zones security-zone Internet-VR-zone host-inbound-traffic protocols all set security zones security-zone Internet-VR-zone interfaces ge-0/0/3.0 set security zones security-zone Internet-VR-zone interfaces lt-0/0/0.1 set security policies default-policy permit-all set routing-instances Internet-VR instance-type virtual-router interface lt-0/0/0.1 set routing-instances Internet-VR instance-type virtual-router interface ge-0/0/3.0 set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 set protocols ospf area 0.0.0.0 interface lt-0/0/0.0 set routing-instances Internet-VR protocols ospf area 0.0.0.0 interface lt-0/0/0.1 set routing-instances Internet-VR protocols ospf area 0.0.0.0 interface ge-0/0/3.0 set firewall family inet filter bypass-flow-filter term bypass-flow-term then accept set firewall family inet filter bypass-flow-filter term bypass-flow-term then packet-mode set interfaces ge-0/0/2 unit 0 family inet filter input bypass-flow-filter set interfaces lt-0/0/0 unit 0 family inet filter input bypass-flow-filter
{device R2} set interfaces description “Connect to Internet-VR” ge-0/0/3 unit 0 family inet address 203.0.113.9/24 set protocols ospf area 0.0.0.0 interface ge-0/0/3
手順
次の例では、設定階層のいくつかのレベルに移動する必要があります。その方法の詳細については、CLIユーザー ガイドの 設定モードにおけるCLIエディターの使用を参照してください。
エンドツーエンドのパケットベース転送用に選択的ステートレスパケットベースサービスを設定するには、以下を行います。
インターフェイスのIPアドレスを設定します。
{device R0} [edit] user@host#
set interfaces description “Connect to Primary VR” ge-0/0/2 unit 0 family inet address 198.51.100.9/24
{device R1} [edit] user@host#
set interfaces description “Connect to R0” ge-0/0/2 unit 0 family inet address 198.51.100.10/24
user@host#set interfaces description “Connect to R2” ge-0/0/3 unit 0 family inet address 203.0.113.5/24
{device R2} [edit] user@host#
set interfaces description “Connect to Internet-VR” ge-0/0/3 unit 0 family inet address 203.0.113.9/24
ルーティングインスタンス間の内部サービスインターフェイスを設定します。
{device R1} [edit] user@host#
set interfaces lt-0/0/0 unit 0 encapsulation frame-relay dlci 100 peer-unit 1 family inet address 192.0.2.1/16
user@host#set interfaces lt-0/0/0 unit 1 encapsulation frame-relay dlci 100 peer-unit 0 family inet address 192.0.2.2/16
セキュリティ ゾーンを設定します。
{device R1} [edit] user@host#
set security zones security-zone Primary-VR-zone host-inbound-traffic system-services all
user@host#set security zones security-zone Primary-VR-zone host-inbound-traffic protocols all
user@host#set security zones security-zone Primary-VR-zone interfaces ge-0/0/2.0
user@host#set security zones security-zone Primary-VR-zone interfaces lt-0/0/0.0
user@host#set security zones security-zone Internet-VR-zone host-inbound-traffic system-services all
user@host#set security zones security-zone Internet-VR-zone host-inbound-traffic protocols all
user@host#set security zones security-zone Internet-VR-zone interfaces ge-0/0/3.0
user@host#set security zones security-zone Internet-VR-zone interfaces lt-0/0/0.1
ポリシーを設定します。
{device R1} [edit] user@host#
set security policies default-policy permit-all
仮想デバイスルーティング インスタンスを設定します。
{device R1} [edit] user@host#
set routing-instances Internet-VR instance-type virtual-router interface lt-0/0/0.1
user@host#set routing-instances Internet-VR instance-type virtual-router interface ge-0/0/3.0
ネットワーク内のすべてのインターフェイスで OSPF を有効にします。
{device R0} [edit] user@host#
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
{device R1 for Primary-VR} [edit] user@host#
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
user@host#set protocols ospf area 0.0.0.0 interface lt-0/0/0.0
{device R1 for Internet-VR} [edit] user@host#
set routing-instances Internet-VR protocols ospf area 0.0.0.0 interface lt-0/0/0.1
user@host#set routing-instances Internet-VR protocols ospf area 0.0.0.0 interface ge-0/0/3.0
{device R2} [edit] user@host#
set protocols ospf area 0.0.0.0 interface ge-0/0/3
ファイアウォールフィルターを作成し、パケットベース転送トラフィックの条件を定義します。
{device R1} [edit] user@host#
set firewall family inet filter bypass-flow-filter term bypass-flow-term then accept
user@host#set firewall family inet filter bypass-flow-filter term bypass-flow-term then packet-mode
ファイアウォールフィルターを関連するインターフェイスに適用します。
{device R1} [edit] user@host#
set interfaces ge-0/0/2 unit 0 family inet filter input bypass-flow-filter
user@host#set interfaces lt-0/0/0 unit 0 family inet filter input bypass-flow-filter
業績
設定モードから、 show interfaces
、 show protocols
、 show security
、 show routing-instances
、および show firewall
コマンドを入力して設定を確認します。出力結果に意図した設定内容が表示されない場合は、この例の設定手順を繰り返して設定を修正します。
{device R0} [edit] user@host# show interfaces ge-0/0/2 { description “Connect to Primary-VR” unit 0 { family inet { address 198.51.100.9/24 } } }
{device R0} [edit] user@host# show protocols ospf { area 0.0.0.0/0 { interface ge-0/0/2.0; } }
{device R2} [edit] user@host# show interfaces ge-0/0/3 { description “Connect to Internet-VR” unit 0 { family inet { address 203.0.113.9/24; } } }
{device R2} [edit] user@host# show protocols ospf { area 0.0.0.0/0 { interface ge-0/0/3.0; } }
{device R1} [edit] user@host# show interfaces ge-0/0/2 { description “Connect to R0” unit 0 { family inet { filter { input bypass-flow-filter; } address 198.51.100.10/24; } } } lt-0/0/0 { unit 0 { encapsulation frame-relay; dlci 100; peer-unit 1; family inet { filter { input bypass-flow-filter } address 192.0.2.1/16; } } unit 1{ encapsulation frame-relay; dlci 100; peer-unit 0; family inet { address 192.0.2.2/16 ; } } } {device R1} [edit] user@host# show protocols ospf { area 0.0.0.0/0 { interface ge-0/0/2.0; interface lt-0/0/0.0; } } {device R1} [edit] user@host# show firewall filter bypass-flow-filter { term bypass-flow-term { then { packet-mode; accept; } } }
{device R1} [edit] user@host# show routing-instances Internet-VR { instance-type virtual-router; interface lt-0/0/0.1; interface ge-0/0/3.0; protocols { ospf { area 0.0.0.0 { interface ge-0/0/3.0; lt-0/0/0.1; } } } }
{device R1} [edit] user@host# show security security zone Primary-VR-zone { host-inbound-traffic { system-services { all; { protocols { all; { { intefaces { ge-0/0/2.0; lt-0/0/0.0; { { security zone Internet-VR-zone { host-inbound-traffic { system-services { all; { protocols { all; } } intefaces { ge-0/0/3.0; lt-0/0/0.1; { { policies { default-policy { permit-all; } }
デバイスの設定が完了したら、設定モードから commit
を入力します。
検証
設定が正常に機能していることを確認します。
パケットベースからフローベースへの設定の確認
目的
選択的ステートレス パケットベース サービスが、パケットベースからフローベースへの転送用に構成されていることを確認します。
アクション
設定モードから、 show interfaces
、 show protocols
、 show security
、 show routing-instances
、および show firewall
コマンドを入力します。
ファイアウォールフィルター、ルーティングインスタンス、インターフェイス、およびポリシーの意図した設定内容が出力されていることを確認します。
パケットをテストしたい順番に条件がリストされていることを確認します。 insert
コマンドを使用して、ファイアウォールフィルター内の条件を移動できます。
LANトラフィックでのセッション確立の検証
目的
LAN内のインターフェイスでトラフィックが送信された時点で、セッションが確立されていることを確認します。
アクション
セッションが確立されていることを確認するには、以下のタスクを実行します。
デバイス
R1
で、動作モードからclear security flow session all
コマンドを入力して、既存のセキュリティ フロー セッションをすべてクリアします。デバイス
R0
では、運用モードからping
コマンドを入力して、デバイスPrimary-VR
にトラフィックを送信します。デバイス
R1
で、デバイスからR0
からR1
を介してトラフィックが送信される場合、動作モードからshow security flow session
コマンドを入力します。
確立されたセッションを確認するには、ping
コマンドがパケットを送受信している間に show security flow session
コマンドを入力してください。
{device R0} user@host> ping 192.0.2.1
PING 192.0.2.1 (192.0.2.1): 56 data bytes 64 bytes from 192.0.2.1: icmp_seq=0 ttl=63 time=2.208 ms 64 bytes from 192.0.2.1: icmp_seq=1 ttl=63 time=2.568 ms 64 bytes from 192.0.2.1: icmp_seq=2 ttl=63 time=2.573 ms 64 bytes from 192.0.2.1: icmp_seq=3 ttl=63 time=2.310 ms 64 bytes from 192.0.2.1: icmp_seq=4 ttl=63 time=1.566 ms 64 bytes from 192.0.2.1: icmp_seq=5 ttl=63 time=1.569 ms ...
{device R1} user@host> show security flow session
0 sessions displayed
この出力は、R0
からPrimary-VR
にトラフィックを送信しており、セッションは確立されていないことを示しています。この例では、会社の LAN トラフィックのインターフェイス ge-0/0/0
と lt-0/0/0.0
に、packet-mode
アクション修飾子を含むbypass-flow-filter
を適用しました。この出力は、2 つのインターフェイス間のトラフィックがフローベース転送を正しくバイパスしているため、セッションが確立されていないことを検証します。
インターネットトラフィックでのセッション確立の確認
目的
トラフィックがインターネットに送信されるときに、セッションが確立されていることを確認します。
アクション
インターネットへのトラフィックがフローベース転送を使用しており、セッションが確立されていることを確認するには、以下のタスクを実行します。
デバイス
R1
で、動作モードからclear security flow session all
コマンドを入力して、既存のセキュリティ フロー セッションをすべてクリアします。デバイス
R0
では、運用モードからping
コマンドを入力して、デバイスR2
にトラフィックを送信します。デバイス
R1
では、トラフィックがR1
を介してR0
からR2
に送信されている場合、動作モードからshow security flow session
コマンドを入力します。root@host> show security flow session Flow Sessions on FPC10 PIC1: Total sessions: 0 Flow Sessions on FPC10 PIC2: Total sessions: 0 Flow Sessions on FPC10 PIC3: Total sessions: 0
確立されたセッションを確認するには、ping
コマンドがパケットを送受信している間に show security flow session
コマンドを入力してください。
{device R0} user@host> ping 192.0.2.1 -c 10
PING 60.0.0.1 (60.0.0.1) 56(84) bytes of data. 64 bytes from 192.0.2.1: icmp_seq=1 ttl=64 time=1.98 ms 64 bytes from 192.0.2.1: icmp_seq=2 ttl=64 time=1.94 ms 64 bytes from 192.0.2.1: icmp_seq=3 ttl=64 time=1.92 ms 64 bytes from 192.0.2.1: icmp_seq=4 ttl=64 time=1.89 ms ...
{device R1} user@host> show security flow session
Session ID: 189900, Policy name: default-policy/2, Timeout: 2 In: 198.51.100.9/0 --> 192.0.2.1/5924;icmp, If: lt-0/0/0.1 Out: 192.0.2.1/5924 --> 198.51.100.9/0;icmp, If: ge-0/0/3.0 Session ID: 189901, Policy name: default-policy/2, Timeout: 2 In: 198.51.100.9/1 --> 192.0.2.1/5924;icmp, If: lt-0/0/0.1 Out: 192.0.2.1/5924 --> 198.51.100.9/1;icmp, If: ge-0/0/3.0 Session ID: 189902, Policy name: default-policy/2, Timeout: 4 In: 198.51.100.9/2 --> 192.0.2.1/5924;icmp, If: lt-0/0/0.1 Out: 192.0.2.1/5924 --> 198.51.100.9/2;icmp, If: ge-0/0/3.0 3 sessions displayed
出力は、デバイスR0
からR2
および確立されたセッションに送信されるトラフィックを示しています。この例では、会社のインターネット トラフィックの ルーティング インスタンス Internet-VR
に packet-mode
アクション修飾子を含むbypass-flow-filter
を適用しませんでした。この出力は、インターネットへのトラフィックがフローベース転送を正しく使用しているため、セッションが確立されていることを確認します。
セッションは、トラフィックが lt-0/0/0.1
と ge-0/0/3
の間を流れているときにのみ確立され、 ge-0/0/2
と lt-0/0/0.0
の間でトラフィックが流れているときには確立されないことに注意してください。
変更履歴
サポートされる機能は、使用しているプラットフォームとリリースによって決まります。特定の機能がお使いのプラットフォームでサポートされているかどうかを確認するには、 Feature Explorer を使用します。