icon-zia.svg
インターネットとSaaSへのセキュアなアクセス(ZIA)

Juniper SRX用GRE設定ガイド

このガイドでは、Junos OS バージョン19.2R2.7を実行しているJuniper SRX300とZscalerサービスのZIA Public Service Edgeの間にGREトンネルを設定する例を示します。

図に示すように、プライマリおよびセカンダリGREトンネルは、Juniper SRXのゲートウェイ ポートからZscalerサービスの2つのZIA Public Service Edgeに構成されます。

Juniper SRXからZIAパブリックサービス エッジへのGREトンネル構成図

ルーターのゲートウェイ ポートgr-0/0/0のパブリックIPアドレスは<トンネル送信元IP>です。

ルーターはポートge-0/0/4でイングレス トラフィックを受信します。アウトバウンド トラフィックを信頼できないゾーンのge-0/0/0に転送し、2つのサブ インターフェイス(unit0とunit1)を使用して、GREトンネル経由でインターネットトラフィックをZscalerサービスに送信します。インターネットに直接送信するトラフィックに対してNATを実行します。GREトンネルの設定の詳細については、GREトンネルの設定を参照してください。

Juniper SRX300の詳細については、Juniperのドキュメンテーションを参照してください。

前提条件

赤で示されている次のパラメーターは、キープアライブを使用してGREトンネルを構成するために必要です。

  • [<トンネル送信元IP>I:組織のトンネル送信元のIPアドレス(例、10.96.19.5)。
  • <内部IP範囲>:Zscalerによって組織に割り当てられたIPアドレスの内部範囲(例えば、172.23.119.128—172.23.119.131)。
  • <プライマリDC VIP>:Zscalerのプライマリ データ センター(10.66.45.208など)のGRE仮想IPアドレスであるプライマリ トンネル宛先のIPアドレス。
    • <プライマリ内部ルーターIP>:プライマリ データ センター(172.23.119.129)に関連するGREトンネルのルーター(トンネルソース)の内部仮想IPです。
    • <プライマリ内部ZIA Public Service Edge IP>:プライマリ データ センター上のトンネル宛先の内部仮想IP(172.23.119.130など)。
  • <セカンダリDC VIP>:セカンダリ トンネルの宛先のIPアドレスで、Zscalerのセカンダリ データ センターのGRE仮想IPアドレスです(10.66.45.250など)。
    • <セカンダリ内部ルーターIP>:セカンダリ データ センターに関連付けられたGREトンネルのルーター(トンネル送信元)の内部仮想IP(172.23.119.133など)。
    • <セカンダリ内部ZIA Public Service Edge IP>:セカンダリ データ センター上のトンネル宛先の内部仮想IP(172.23.119.134など)
  • <キープアライブ時間>:トンネルがダウンしているかどうかを検出するためにNATキープアライブ メッセージを送信する間隔(秒単位)。
  • <ホールド タイム>:GREトンネルの発信側がトンネルのもう一方の端からのキープアライブ パケットを待機してから、トンネルを動作上ダウンとしてマークする時間(秒単位)。ホールド タイムは、キープアライブ タイムの少なくとも2倍にする必要があります。

GREトンネルの設定

Juniper SRX300とZIA Public Service Edge間のGREトンネルを設定するには、次の手順を参照してください。赤で示されているサンプル値を、展開の実際の値に置き換えます。

  • 次のコマンドを使用して、キープアライブでGREトンネルを設定します。

    root@srx300> show configuration interfaces gr-0/0/0  
    unit 0 {
        tunnel {
            source 10.96.19.5;
            destination 10.66.45.208;
        }
        family inet {
            address 172.23.119.129/30;
    }
    }
    
    root@srx300# show protocols oam   
    gre-tunnel {
        traceoptions {
            file gre_tun.log;
    flag all;
        }
        interface gr-0/0/0 {
            keepalive-time 10;
            hold-time 60;
        }
    }
    
    閉じる
  • 次のコマンドを使用して、ZscalerサービスのGREエンドポイント(<プライマリ内部ZIA Public Service Edge IP>および<セカンダリ内部ZIA Public Service Edge IP>)を監視するICMPベースのプローブを作成します。

    root@srx300# run show configuration services rpm 
    probe icmp_gre_tunnel {
        test icmp {
            probe-type icmp-ping;
            target address 172.23.119.130;
    プローブカウント5;
            プローブ間隔5;
            テスト間隔10;
            送信元アドレス 172.23.119.129;
            しきい値 {
                連続損失5;
                総損失5;
           } 
    
    閉じる
  • Use the following command to enable IP monitoring.The probe is sent to the primary interface at the Primary Internal ZIA Public Service Edge IP (e.g., 172.23.119.130).

    root@srx300# run show configuration services ip-monitoring 
    policy failover {
        match {
            rpm-probe icmp_gre_tunnel;
        }
        then {
            preferred-route {
                routing-instances traffic_tunnel {
                    route 0.0.0.0/0 {
                        next-hop 172.23.119.130;
    }
                }
            }
        }
    }
    
    閉じる
  • 次のコマンドを使用して、必要なセキュリティ ゾーンを構成します。

    root@srx300# run show configuration security zones 
    functional-zone management {
                ge-0/0/5.0{
                host-inbound-traffic {
                    system-services {
                        https;
                        ping;
                        ssh;
                    }
                }
       }
            ge-0/0/1.0{
       host-inbound-traffic {
                    system-services {
                        all;
                    }
                }
            }
        }
    }
    security-zone trust {
        host-inbound-traffic {
            system-services {
                all;
            }
            protocols {
                all;
            }
        }
        interfaces {
            irb.0;
        }
    }
    security-zone untrust {
        screen untrust-screen;
        host-inbound-traffic {
            protocols {
                all;
            }
        }
        interfaces {
            ge-0/0/0.0{
                host-inbound-traffic {
                    system-services {
                        dhcp;               
                        tftp;
                        https;
                        ping;
                        ssh;
                    }
                }
            }
            st0.0;
            gr-0/0/0.0;
    
    }
    
    閉じる
  • 次のコマンドを使用してセキュリティ ポリシーを構成し、信頼ゾーンから非信頼ゾーンへ、またはその逆の指定されたトラフィックを許可します。

    root@srx300# run show configuration security policies 
    from-zone trust to-zone trust {
        policy trust-to-trust {
            match {
                source-address any;
                destination-address any;
                application any;
            }
            then {
                permit;
            }
        }
    }
    from-zone trust to-zone untrust {
        policy trust-to-untrust {
            match {
                source-address any;
                destination-address any;
                application any;
            }
            then {
                permit;
            }
        }
    }
    
    閉じる

GRE トンネル設定の確認

ZIA管理ポータルでは、アナリティクス>トンネル解析に移動して、データを確認し、構成済みGREトンネルの正常性とステータスを監視できます。詳細は、解析についておよび解析ログについてを参照してください。

Junos OSでは、次のコマンドを使用してGREトンネルを監視およびトラブルシューティングできます。

  • pingコマンドを使用して、プライマリ内部ZIA Public Service Edge IPのZscalerサービス上のGREエンドポイントの到達可能性を検証します。次の例では、172.23.119.130がプライマリ内部ZIA Public Service Edge IPで、172.23.119.129がプライマリ内部ルーターIPです。

    root@srx300> ping 172.23.119.130 source 172.23.119.129 
    PING 172.23.119.130 (172.23.119.130):56データ バイト
    172.23.119.130から64バイト:icmp_seq=0 ttl=64 time=8.135ms
    172.23.119.130から64バイト:icmp_seq=1 ttl=64 time=6.322ms
    172.23.119.130から64バイト:icmp_seq=2 TTL=64 時間=3.664 ms
    
    閉じる
  • show interfaces gr-/0/0/0 extensiveコマンドを使用して、GREキープアライブ隣接関係状態が稼働中であることを確認します。

    root@srx300# run show interfaces gr-0/0/0 extensive 
    Physical interface: gr-0/0/0, Enabled, Physical link is Up
      Interface index: 147, SNMP ifIndex: 522, Generation: 150
      Type: GRE, Link-level type: GRE, MTU: Unlimited, Speed: 800mbps
      Link flags     : Scheduler Keepalives DTE
      Hold-times     : Up 0 ms, Down 0 ms
      Device flags   : Present Running
      Interface flags: Point-To-Point
      Statistics last cleared: Never
      Traffic statistics:
       Input  bytes  :              4394116                    0 bps
       Output bytes  :              1932957                    0 bps
       Input  packets:               101415                    0 pps
       Output packets:                31694                    0 pps
    
    Logical interface gr-0/0/0.0(Index 75) (SNMP ifIndex 538) (Generation 150)
        Flags: Up Point-To-Point SNMP-Traps 0x0 IP-Header 10.66.45.208:10.96.19.5:47:df:64:0000000000000000Encapsulation: GRE-NULL
        Copy-tos-to-outer-ip-header: Off, Copy-tos-to-outer-ip-header-transit: Off
        Gre keepalives configured: On, Gre keepalives adjacency state: up
        Traffic statistics:
         Input  bytes  :             24560164
         Output bytes  :             38111382
         Input  packets:               461523
         Output packets:               506340
        Local statistics:
         Input  bytes  :             24556029
         Output bytes  :             36178425
         Input  packets:               461470
         Output packets:               474646
        Transit statistics:
         Input  bytes  :                 4135                    0 bps
         Output bytes  :              1932957                    0 bps
         Input  packets:                   53                    0 pps
         Output packets:                31694                    0 pps
        Security: Zone: untrust
        Allowed host-inbound traffic : bfd bgp dvmrp igmp ldp msdp nhrp ospf pgm pim rip router-discovery rsvp sap vrrp
        Flow Statistics :  
        Flow Input statistics :
          Self packets :                     101362
          ICMP packets :                     69802
          VPN packets :                      0
          Multicast packets :                0
          Bytes permitted by policy :        4389981
          Connections established :          0 
        Flow Output statistics: 
          Multicast packets :                0
          Bytes permitted by policy :        3894469 
        Flow error statistics (Packets dropped due to): 
          Address spoofing:                  0
          Authentication failed:             0
          Incoming NAT errors:               0
          Invalid zone received packet:      0
          Multiple user authentications:     0 
          Multiple incoming NAT:             0
          No parent for a gate:              0
          No one interested in self packets: 0       
          No minor session:                  0 
          No more sessions:                  0
          No NAT gate:                       0 
          No route present:                  0 
          No SA for incoming SPI:            0 
          No tunnel found:                   0
          No session for a gate:             0 
          No zone or NULL zone binding       0
          Policy denied:                     0
          Security association not active:   0 
          TCP sequence number out of window: 0
          Syn-attack protection:             0
          User authentication errors:        0
        Protocol inet, MTU: 1476
        Max nh cache: 0, New hold nh limit: 0, Curr nh cnt: 0, Curr new hold cnt: 0, NH drop cnt: 0
        Generation: 165, Route table: 0
          Flags: Sendbcast-pkt-to-re
          Addresses, Flags: Is-Default Is-Preferred Is-Primary
            Destination: 172.23.119.128/30,ローカル:172.23.119.129、ブロードキャスト:172.23.119.131、世代:170
    

    GRE仮想IP下のデータ センターがダウンすると、Juniper SRXはキープアライブ メッセージ応答を受信せず、隣接状態がダウンします。次の例を参照してください。

    root@srx300> show interfaces gr-0/0/0 extensive    
    Physical interface: gr-0/0/0, Enabled, Physical link is Up
      Interface index: 147, SNMP ifIndex: 522, Generation: 150
      Type: GRE, Link-level type: GRE, MTU: Unlimited, Speed: 800mbps
      Link flags     : Scheduler Keepalives DTE
      Hold-times     : Up 0 ms, Down 0 ms
      Device flags   : Present Running
      Interface flags: Point-To-Point
      Statistics last cleared: Never
      Traffic statistics:
       Input  bytes  :              4443011                    0 bps
       Output bytes  :              1954856                    0 bps
       Input  packets:               102540                    0 pps
       Output packets:                32053                    0 pps
    
      Logical interface gr-0/0/0.0(Index 75) (SNMP ifIndex 538) (Generation 150)
        Flags: Up Point-To-Point SNMP-Traps 0x0 IP-Header 10.66.45.208:10.96.19.5:47:df:64:0000000000000000Encapsulation: GRE-NULL
        Copy-tos-to-outer-ip-header: Off, Copy-tos-to-outer-ip-header-transit: Off
        Gre keepalives configured: On, Gre keepalives adjacency state: down
        Traffic statistics:
         Input  bytes  :             24635211
         Output bytes  :             38242172
         Input  packets:               463115
         Output packets:               508310
        Local statistics:
         Input  bytes  :             24626995
         Output bytes  :             36287316
         Input  packets:               463009
         Output packets:               476257
        Transit statistics:
         Input  bytes  :                 8216                    0 bps
         Output bytes  :              1954856                    0 bps
         Input  packets:                  106                    0 pps
         Output packets:                32053                    0 pps
        Security: Zone: untrust
        Allowed host-inbound traffic : bfd bgp dvmrp igmp ldp msdp nhrp ospf pgm pim rip router-discovery rsvp sap vrrp
        Flow Statistics :  
    
    閉じる
  • show services rpm probe-resultsコマンドを使用して、ICMPプローブの結果を検証します。

    root@srx300# run show services rpm probe-results
     Owner: icmp_gre_tunnel, Test: icmp
        Target address: 172.23.119.130,送信元アドレス: 172.23.119.129、Probe type: icmp-ping, Icmp-id: 59, Test size: 5 probes
        Probe results:
          Response received
          Probe sent time: Tue Dec 20 19:12:58 2022
          Probe rcvd/timeout time: Tue Dec 20 19:12:58 2022, No hardware timestamps
          Rtt: 1275 usec, Round trip jitter: -26390 usec
          Round trip interarrival jitter: 12800 usec
        Results over current test:
          Probes sent: 2, Probes received: 2, Loss percentage: 0.000000
          Measurement: Round trip time
            Samples: 2, Minimum: 1275 usec, Maximum: 27665 usec, Average: 14470 usec, Peak to peak: 26390 usec, Stddev: 13195 usec, Sum: 28940 usec
          Measurement: Positive round trip jitter
            Samples: 1, Minimum: 26422 usec, Maximum: 26422 usec, Average: 26422 usec, Peak to peak: 0 usec, Stddev: 0 usec, Sum: 26422 usec
          Measurement: Negative round trip jitter
            Samples: 1, Minimum: 26390 usec, Maximum: 26390 usec, Average: 26390 usec, Peak to peak: 0 usec, Stddev: 0 usec, Sum: 26390 usec
        Results over last test:
          Probes sent: 5, Probes received: 5, Loss percentage: 0.000000
          Test completed on Tue Dec 20 19:12:43 2022
          Measurement: Round trip time      
            Samples: 5, Minimum: 1205 usec, Maximum: 4243 usec, Average: 2159 usec, Peak to peak: 3038 usec, Stddev: 1134 usec, Sum: 10793 usec
          Measurement: Positive round trip jitter
            Samples: 2, Minimum: 1245 usec, Maximum: 3011 usec, Average: 2128 usec, Peak to peak: 1766 usec, Stddev: 883 usec, Sum: 4256 usec
          Measurement: Negative round trip jitter
            Samples: 3, Minimum: 447 usec, Maximum: 2591 usec, Average: 1415 usec, Peak to peak: 2144 usec, Stddev: 888 usec, Sum: 4245 usec
        Results over all tests:
          Probes sent: 69962, Probes received: 69806, Loss percentage: 0.222978
          Measurement: Round trip time
            Samples: 69806, Minimum: 962 usec, Maximum: 808995 usec, Average: 5686 usec, Peak to peak: 808033 usec, Stddev: 13946 usec, Sum: 396946485 usec
          Measurement: Positive round trip jitter
            Samples: 35389, Minimum: 0 usec, Maximum: 807745 usec, Average: 6949 usec, Peak to peak: 807745 usec, Stddev: 18018 usec, Sum: 245916006 usec
          Measurement: Negative round trip jitter
            Samples: 34416, Minimum: 1 usec, Maximum: 804484 usec, Average: 7145 usec, Peak to peak: 804483 usec, Stddev: 18138 usec, Sum: 245916261 usec
    
    閉じる
  • show services ip-monitoring statusコマンドを使用して、IP監視を検証します。

    root@srx300# run show services ip-monitoring status 
    
    Policy - failover (Status: PASS)
      RPM Probes:
        Probe name             Test Name       Address          Status   
        ---------------------- --------------- ---------------- ---------
        icmp_gre_tunnel        icmp            172.23.119.130   PASS     
      Route-Action:
        route-instance    route             next-hop         state
        ----------------- ----------------- ---------------- ------------- 
        traffic_tunnel    0.0.0.0/0         172.23.119.130   NOT-APPLIED  
    
    [edit]
    
    閉じる
関連記事s
汎用ルーティング カプセル化(GRE)の紹介GREの展開シナリオGREトンネルの展開に関するベストプラクティスGREトンネルについてGREトンネルの自己プロビジョニングCSVファイルからのGREトンネルのインポートGREトンネルの設定Juniper SRX用GRE設定ガイドCisco 881 ISR用GRE設定ガイドZIA Public Service Edgeの仮想IPアドレスの検索