MX-SPC3でのアダプティブ サービスと次世代サービスの設定の違い
概要
MX-SPC3の次世代サービスでは、MSタイプのカード(MS-MPC、MS-MIC、MS-DPC)で実行されるアダプティブサービスで慣れ親しんでいるものとは異なるサービスを設定する必要があります。MX-SPC3 サービス カードの設定は、SRXシリーズ サービス ゲートウェイの設定方法により近いものになります。このより統一されたアプローチに慣れれば、これら2つのプラットフォーム上でサービスをよりシームレスに設定できるようになるはずです。その結果、トレーニングのオーバーヘッドが減り、設定エラーのリスクが低下します。
CLIの違いとは別に、マルチサービス(MS)タイプ(MS-DPC、MS-MPC、MS-MIC)カードとMX-SPC3サービスカードの基本的なハードウェアの違いに注意する必要があります。MS タイプのカードには 4 つの CPU コンプレックスが含まれていますが、MX-SPC3 カードはより強力ですが、2 つの CPU コンプレックスが含まれています。各 CPU コンプレックスは 1 つの PIC に対応します。つまり、MS タイプのカードは 4 つの PIC をサポートするのに対し、MX-SPC3 は 2 つの PIC をサポートします。MSタイプのカードは特別なマルチサービス(MS)および適応サービス(AS)PICを使用しますが、MX-SPC3カードのPICは統合されています。
PICの数はインターフェイスの数に直接影響するため(表1)、MX-SPC3の各インターフェイスに論理ユニットを追加して、インターフェイスの数を4つに増やす必要がある場合があります。例えば、現在MSタイプカードで4つのインターフェイスすべてを使用しており、インターフェイスごとにサービスセットがある場合、MX-SPC3でインターフェイスごとに2つの論理ユニットを作成してインターフェイスの合計数を4にし、4つのサービスセットをこれら4つの論理インターフェイスに再関連付けできます。
MSカード |
MX-SPC3 |
|
---|---|---|
CPU コンプレックスの数 |
4 |
2 |
CPUコンプレックスあたりのPIC数 |
1 |
1 |
PICあたりのインターフェイス数 |
1 |
1 |
カード上のインターフェイスの総数 |
4 |
2 |
手記:
MX-SPC3ハードウェアの詳細については、 MXシリーズ5Gユニバーサルルーティングプラットフォームインターフェイスモジュールリファレンス をご覧ください。 |
以下のセクションでは、MSタイプカード上のサービスとMX-SPC3カード上のサービスの基本的な設定の違いの概要について説明します。これらのセクションの目的は、基本的な例を使用して主な変更点を説明することで、作業の開始を支援することです。これらの例は、CLI設定オプションのサブセットを示したものであり、ルーティングデバイス用次世代サービスインターフェイスユーザーガイドとJunos OS CLIリファレンスガイドに記載されている主題のより正式な扱いを置き換えるものではありません。
これらのセクションの設定例は、2 つの違いを簡単に確認できるように、横に並べて示されています。この例は、MX-SPC3で既存のMSタイプのカード機能を設定する方法を示すことを目的としています。この例は、MX-SPC3 にのみ見られる新機能の設定方法を示すためのものではありません。読みやすく、比較しやすいように、表示されるステートメントの順序は、CLIに表示される実際のステートメントの順序と若干異なる場合があります。
既存のアダプティブ サービスのセットが多数ある場合、これらの変更はお客様に不便をおかけする可能性があることを認識しています。MS タイプのカードから MX-SPC3 への移行をサポートするため、次の手順を実行することをお勧めします。
このガイドの例を参照して、必要な変更の全体像を把握してください。
ナレッジベース記事KB35348の設定例のセットに目を通してください。
すべての機能、設定オプション、構文を理解するには、このガイドと Junos OS CLI リファレンス ガイドを参照してください。
移行についてはJTACにお問い合わせください。
MS タイプのカードでアダプティブ サービスを引き続き実行する場合は、これらの設定変更を行う必要はありません。ただし、MX-SPC3をルーターに導入した後は、そのルーター上のすべてのMSタイプカードを交換し、次世代サービス設定パラダイムに合わせてサービスを再設定する必要があります。
インターフェイス
MSタイプのカードはインターフェイス命名規則 ms-1/0/0
を使用しますが、MX-SPC3インターフェイスは仮想マルチサービスまたは vms-1/0/0
インターフェイス命名規則を使用して指定します。 ams
および mams
インターフェイスの名前に変更はありません。
また、ms
インターフェイスの services-options
で設定されているパラメーターの多くは、サービス セットの service-set-options
で設定されています。
表 2 は、これらの変更の例を示しています。
MSタイプカード |
MX-SPC3 |
---|---|
[edit interfaces] ms-5/1/0 { <...> } |
[edit interfaces] # Change interface name to vms. vms-5/1/0 { <...> } |
[edit interfaces] ms-5/1/0 { services-options { open-timeout 40; close-timeout 40; inactivity-tcp-timeout 10; inactivity-asymm-tcp-timeout 10; tcp-tickles 8; ignore-errors tcp; } } |
[edit services] service-set sset1 { service-set-options { # Set tcp parameters under tcp-session. tcp-session { open-timeout 40; close-timeout 40; inactivity-tcp-timeout 10; inactivity-asymm-tcp-timeout 10; tcp-tickles 8; ignore-errors tcp; } } } |
[edit interfaces] ms-5/1/0 { services-options { inactivity-non-tcp-timeout 40; session-timeout 10; } } |
[edit services] service-set sset1 { # Set non-tcp parameters directly under # service-set-options. service-set-options { inactivity-non-tcp-timeout 40; session-timeout 10; } } |
[edit interfaces] ms-5/1/0 { services-options { fragment-limit 10; reassembly-timeout 5; } } |
[edit interfaces] vms-5/1/0 { services-options { fragment-limit 10; reassembly-timeout 5; } } |
[edit interfaces] ms-5/1/0 { services-options { session-limit { maximum 100; cpu-load-threshold 12; rate 10; } } } |
[edit services] # Maximum number of sessions can be # specified per service-set. service-set sset1 { service-set-options { session-limit { maximum 100; } } } [edit interfaces] # All session-limit parameters continue to be # configurable per interface. If the maximum # number of sessions is different from the associated # service-set, the smaller number takes effect. vms-5/1/0 { services-options { session-limit { maximum 100; cpu-load-threshold 12; rate 10; } } } |
[edit interfaces] ms-5/1/0 { services-options { pba-interim-logging-interval 10; } } |
[edit interfaces] # Set interim-logging-interval under the nat branch. nat { source { pool src-pool { port { block-allocation { interim-logging-interval 10; } } } |
[edit interfaces] ms-5/1/0 { services-options { syslog { host { <...> } } } } |
|
[edit interfaces] ms-5/1/0 { services-options { syslog { message-rate-limit 10; } } } |
[edit services] service-set sset1 { syslog { event-rate 10; } } |
[edit interfaces] ms-5/1/0 { services-options { ignore-errors alg; disable-global-timeout-override; trio-flow-offload { minimum-bytes 1000; } } } |
未対応 |
サービスセット
表 3 は、一部の service-set
パラメーターの構成方法の軽微な変更を示しています。
MSタイプカード |
MX-SPC3 |
---|---|
[edit services] service-set sset1 { tcp-mss 1460; service-set-options { tcp-non-syn drop-flow-send-rst; tcp-fast-open drop; } } |
[edit services] service-set sset1 { service-set-options { # Set tcp parameters under tcp-session. tcp-session { tcp-mss 1460; tcp-non-syn drop-flow-send-rst; tcp-fast-open drop; } } } |
[edit services] service-set sset1 { replicate-services { replication-threshold 180; } } |
[edit interfaces] # Set replication-threshold on the interface. vms-5/1/0 { redundancy-options { replication-threshold 180; } } |
[edit services] service-set sset1 { syslog { host 10.1.1.1 { port 514; } } } |
[edit services] service-set sset1 { syslog # Process security logs in the dataplane. mode stream; stream s1 { # Specify host to send security logs to. host { 10.1.1.1; port 514; } } } } |
[edit services] service-set sset1 { syslog { host local; } } |
[edit services] service-set sset1 { syslog # Process security logs in the control plane, # saving logs to local file specified by rtlog. mode event; } } rtlog { traceoptions { # Specify filename for logs. file rtlog size 1g; flag all; } } |
[edit services] service-set sset1 { service-order <...> } |
サービス注文は固定されています。 |
[edit services] service-set sset1 { sampling-service <...> } |
J-Flowロギングはインラインでサポートされています。 |
[edit services] service-set sset1 { tag-rule-sets <...> tag-rules <...> hcm-profile <...> hcm-url-rule-sets <...> hcm-url-rules <...> service-set-options { bypass-traffic-on-pic-failure; } } |
現在サポートされていません |
ステートフルファイアウォール
ルールとポリシー
MX-SPC3のステートフルファイアウォールルールは、MSタイプカード上のサービス向けのステートフルファイアウォールルールとは若干異なる構造になっています。MX-SPC3 では、ルールを policies
ラッパーで囲み、ルールに含まれる policy
でルールの一致条件とアクションを定義します。
MSタイプカード上のステートフルファイアウォールサービスと同様に、インターフェイスをルールセットに関連付けるためのサービスセットを作成します。ルール セットには、1 つ以上のルールへの参照が含まれています。ルールは、一致が発生してアクションが実行されるまで、リストされた順序で順番に適用されます。
各ルールには、一致条件とアクションのペアが 1 つ以上含まれます。MX-SPC3 では、一致条件とアクションの各ペアは ポリシー と呼ばれます。ポリシーは、一致が発生してアクションが実行されるまで、指定した順序で順次適用されます。
表 4 は、MS カードと MX-SPC3 のステートフル ファイアウォール ルールの設定の違いを示しています。特に、 permit
/deny
/reject
アクションの定義が異なることに注意してください。
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set s1 { stateful-firewall-rule-sets rule-set-basic-sfw; interface-service { service-interface ms-1/1/0; } } |
service-set s1 { policies stateful-firewall-rule-sets rule-set-basic-sfw; interface-service { service-interface vms-1/1/0; } } |
stateful-firewall { |
# Enclose stateful firewall rules within the policies wrapper. policies { |
rule Rule1 { match-direction input; term ping-https-apps { from { source-address { any } destination-address { any } applications [junos-icmp-ping junos-https]; } then { accept/reject/discard skip-ids; syslog; } } term accept { then { accept; } } } # end Rule1 |
policies stateful-firewall-rule Rule1 { match-direction input; # Define match terms and actions in a policy. policy ping-https-apps { # Unlike the from statement, the match statement (and # source-address, destination-address, and application) # are mandatory. match { source-address any; destination-address any; application [ junos-icmp-ping junos-https ]; } then { # permit = allow # deny = silently drop # reject = drop and send ICMP unreachable or TCP RST permit/deny/reject # skip-ids is not supported. One possible way of # achieving this same goal is to create two # service-sets, one with IDS and one without IDS, # and route your next-hop-service # traffic to the desired service set via the associated # inside or outside interface. log; } } policy accept { match { source-address any; destination-address any; application any; } then { permit; } } } # end Rule1 |
rule Rule2 { match-direction output; term local { from { source-address { 10.1.3.2/32; } application-sets APPL-SET1; } then { accept; } } } # end Rule2 |
policies stateful-firewall-rule Rule2 { match-direction output; policy local { match { source-address 10.1.3.2/32; destination-address any; # application can refer to an application set. application APPL-SET1; } then { permit; } } } # end Rule2 |
rule-set rule-set-basic-sfw { rule Rule1; rule Rule2; } } # end stateful-firewall |
# Use the stateful-firewall-rule-set element to list the # firewall rules in the order that you want them applied. stateful-firewall-rule-set rule-set-basic-sfw { stateful-firewall-rule Rule1; stateful-firewall-rule Rule2; } } # end policies |
アドレスリストと範囲
ステートフル ファイアウォール ルールには、アドレス範囲とリストを参照する一致条件を含めることができます。
MSカードでは、source-address-range
要素とdestination-address-range
要素を使用してアドレス範囲を指定し、policy-options
下のprefix-list
要素を使用してアドレスリストを指定します。prefix-list
要素は、ステートフル ファイアウォール ルールのみに使用するものではありません。また、prefix-list
要素を使用して、ルーティング ポリシー内で使用するアドレス一覧を指定することもできます。
MX-SPC3では、ステートフルファイアウォールルールにprefix-list
要素は使用されません。ステートフル ファイアウォール ルール内で使用するアドレス一覧と範囲を定義するには、services
の下の address-book
を使用します。prefix-list
要素はまだ存在しますが、ルーティング ポリシーにのみ使用されます。そのため、ステートフル ファイアウォール ルールのアドレス一覧とルーティング ポリシーのアドレス一覧を指定する場合は、address-book
要素とprefix-list
要素の両方を設定する必要があります。
表 5 は、MS カードと MX-SPC3 でステートフル ファイアウォール ルールのアドレスを指定する方法の違いを示しています。
MSカード |
MX-SPC3 |
---|---|
[edit] policy-options { prefix-list p1 { 10.1.22.45/32; 192.168.0.11/32; } } [edit services] stateful-firewall { rule sfw-rule { match-direction input; term banned-addresses { from { source-prefix-list { p1; } source-address-range { low 10.1.22.100 high 10.1.22.109; } } then { reject; syslog; } } <...> |
[edit services] # Define address lists and address ranges in an address book. address-book { global { address-set p1 { address p1-a; address p1-b; } address p1-a 10.1.22.45/32; address p1-b 192.168.0.11/32; address p2 { address-range 10.1.22.100/32 { to { 10.1.22.109/32; } } } } } # end address-book policies { stateful-firewall-rule sfw-rule { match-direction input; policy banned-addresses { match { # Refer to the addresses defined in the address book. source-address [ p1 p2 ]; destination-address any; application any; } then { deny; log; } <...> |
アプリケーション
MX-SPC3 は、MS カードよりも多くの組み込み Junos アプリケーションをサポートしています。ステートフル ルールオプションは、ファイアウォールルールを作成するときに、これらの組み込みアプリケーションで照合できます。
組み込みアプリケーションの完全なリストを表示するには、 show groups junos-defaults applications
設定モードコマンドを使用します。例えば:
[edit] # show groups junos-defaults applications | match junos application junos-ftp { application junos-ftp-data { application junos-tftp { application junos-twamp { application junos-rtsp { application junos-netbios-session { <...>
traceoptionsとカウンター
MX-SPC3上の次世代サービス向けのステートフルファイアウォールは、トラフィックのデバッグとカウントに役立つ追加機能をサポートしています。
traceoptions
- ポリシールックアップやルールベースのイベントなど、ポリシー関連のイベントをトレースするために使用します。イベントは、表示用に指定されたファイルにキャプチャされます。count
- 送受信バイトやパケットなどのトラフィック関連のイベントをカウントするために使用します。show コマンドを使用してカウンターを表示します。show services policies detail
- ポリシーでcount
オプションを指定した場合、出力にはトラフィック関連のカウンターが含まれますshow services policies hit-count
- ヒット数は、ポリシーでcount
オプションを使用するかどうかに関係なく、常に使用できます
表 6 は、 traceoptions
要素と count
要素の使用方法を示しています。
MSカード |
MX-SPC3 |
---|---|
未対応 |
[edit services] policies { # Enable traceoptions to trace policy-related events. traceoptions { file policylogs size 10m files 5; flag all; } stateful-firewall-rule Rule1 { match-direction input; policy my-policy { match { source-address any; destination-address any; application [ junos-dns-udp junos-dns-tcp ]; } then { permit # Enable counting of traffic events. count; } } # end my-policy ... |
キャリアグレードネットワークアドレス変換(CGNAT)
MX-SPC3 での次世代サービスの NAT の設定は、MS カードでのレガシー サービスでの NAT の設定とはいくつかの点で異なります。
MX-SPC3 では、送信元 NAT と宛先 NAT を別個に設定します。ソースNATは設定ツリーの送信元ブランチで設定し、宛先NATは設定ツリーの宛先ブランチで設定します。ソース NAT と宛先 NAT は、それぞれコンフィギュレーション ツリーのブランチに独自のアドレス プールとルールのセットを持っています。
MX-SPC3では、送信元NATと宛先NATの両方を設定した場合、宛先NATが最初に適用され、次に送信元NATが宛先NAT変換結果に適用されます。つまり、元のパケットではなく、宛先 NAT ルールに基づいて送信元 NAT ルールを作成します。
MX-SPC3では、
translation-type
を明示的に設定しません。変換のタイプは、設定によって暗黙的に決定されます。MX-SPC3では、ポート変換がダイナミックマッピングのデフォルト動作です(異なるNAT前アドレスが時間の経過とともに同じNAT後アドレスにマッピングされる可能性があります)。プール定義に
port
ステートメントを明示的に含めない場合、ポート変換はポート範囲 [1024, 65535] で行われ、ポートはラウンドロビン方式で選択されます。ポート変換を行わない場合は、no-translation
オプションでport
ステートメントを追加する必要があります。このデフォルトは、NAT 前のアドレスが常に同じ NAT 後のアドレスにマッピングされるスタティック マッピングには適用されません。
表 7 から 表 19 は、MX-SPC3 でさまざまな変換タイプがどのように設定されるかを示しています。
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-basic-nat44; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-basic-nat44; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { source { |
pool src-pool { address 10.10.10.0/24; } |
pool src-pool { address { 10.10.10.0/24; } # host-address-base indicates a type of static mapping # where the base address 10.45.1.0/0 maps to the # lowest address in the pool, namely 10.10.10.0/0, # and the other addresses map sequentially from there # e.g. 10.45.1.1 maps to 10.10.10.1, and so on. # Since this is a static mapping, there is no port translation # by default. # Note that host-address-base does not have to be the # lowest address allowed by the subsequent source rule. # Any packet with a source address allowed by the source rule # but is lower than the host-address-base is discarded. host-address-base 10.45.1.0/0; } |
rule rule-basic-nat44 { match-direction input; term t1 { from { source-address { 10.45.1.0/24 } } then { translated { source-pool src-pool; translation-type { basic-nat44; } } } } } |
rule-set rule-basic-nat44 { match-direction input; rule r1 { match { source-address 10.45.1.0/24; } then { source-nat { pool { src-pool; } } } } } |
} # end nat |
} # end source } # end nat |
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-basic-nat66; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-basic-nat66; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { source { |
pool src-pool { address 2001:DB8:2222::0/96; } |
pool src-pool { address { 2001:DB8:2222::0/96; } } |
rule rule-basic-nat66 { match-direction input; term t1 { from { source-address { 2001:DB8:1111::0/96; } } then { translated { source-pool src-pool; translation-type { basic-nat66; } } } } } |
rule-set rule-basic-nat66 { match-direction input; rule r1 { match { source-address 2001:DB8:1111:::0/96; } then { source-nat { pool { src-pool; } } } } } |
} # end nat |
} # end source } # end nat |
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-dynamic-nat44; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-dynamic-nat44; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { source { |
pool src-pool { address-range low 10.10.10.2 high 10.10.10.10; } |
pool src-pool { address { 10.10.10.2/32 to 10.10.10.10/32; } # Since this is implicitly a dynamic mapping, # there is port translation by default , so we need to # explictly specify that we don’t want port translation. port { no-translation; } } |
rule rule-dynamic-nat44 { match-direction input; term t0 { from { applications junos-icmp-all; } then { no-translation; } } term t1 { from { destination-address { 10.99.0.2/32; } source-address-range { low 10.45.0.2 high 10.45.0.10; } } then { translated { source-pool src-pool; translation-type { dynamic-nat44; } } } } } |
rule-set rule-dynamic-nat44 { match-direction input; rule r0 { match { source-address 0.0.0.0/0; application junos-icmp-all; } then { source-nat { off; } } } rule r1 { match { source-address-name addr1; destination-address 10.99.0.2/32; } then { source-nat { pool { src-pool; } } } } } |
} # end nat |
} # end source } # end nat |
|
address-book { global { address addr1 { address-range 10.45.0.2/32 { to { 10.45.0.10/32; } } } } } |
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-napt44; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-napt44; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { source { |
pool src-pool { address 10.10.10.0/24; port { automatic; } } |
pool src-pool { address { 10.10.10.0/24; } # Since this is implicitly a dynamic mapping, # and there is no explicit port statement # to indicate otherwise, the default port # mapping behavior takes effect. } |
rule rule-napt44 { match-direction input; term t1 { from { source-address { 10.45.1.0/24 } application-sets accept-algs; } then { translated { source-pool src-pool; translation-type { napt44; } } } } } |
rule-set rule-napt44 { match-direction input; rule r1 { match { source-address 10.45.1.0/24; application accept-algs; } then { source-nat { pool { src-pool; } } } } } |
} # end nat |
} # end source } # end nat |
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-napt66; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-napt66; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { source { |
pool src-pool { address 2001:DB8:2222::0/112; port { range low 20000 high 30000; } } |
pool src-pool { address { 2001:DB8:2222::0/112; } port { range { 20000; to { 30000; } } } } |
rule rule-napt66 { match-direction input; term t1 { from { source-address { 2001:DB8:1111::0/96; } } then { translated { source-pool src-pool; translation-type { napt66; } } } } } |
rule-set rule-napt66 { match-direction input; rule r1 { match { source-address 2001:DB8:1111::0/96; } then { source-nat { pool { src-pool; } } } } } |
} # end nat |
} # end source } # end nat |
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-dnat-44; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-dnat-44; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { destination { |
pool dest-pool { address 10.10.10.2/32; } |
pool dest-pool { address { 10.10.10.2/32; } } |
rule rule-dnat-44 { match-direction input; term t1 { from { destination-address { 10.45.0.2/32 } } then { translated { destination-pool dest-pool; translation-type { dnat-44; } } } } } |
rule-set rule-dnat-44 { match-direction input; rule r1 { match { destination-address 10.45.0.2/32; } then { destination-nat { pool { dest-pool; } } } } } |
} # end nat |
} # end destination } # end nat |
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-stateful-nat464; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-stateful-nat464-src; nat-rule-sets rule-stateful-nat464-dest; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { source { |
pool src-pool { address 10.10.10.0/24; port { automatic; } } |
pool src-pool { address { 10.10.10.0/24; } port { automatic { round-robin; } } } |
rule rule-stateful-nat464 { match-direction input; term t1 { from { source-address { 2001:DB8:1111::0/96; } destination-address { 2001:DB8:2222::0/96; } applications [junos-icmp-all junos-icmp-ping junos-traceroute junos-traceroute-ttl 1]; } then { translated { source-pool src-pool; clat-prefix 2001:DB8:1111::0/96; destination-prefix 2001:DB8:2222::0/96; translation-type { stateful-nat464; } } } } } |
# This source rule applies after the destination rule. rule-set rule-stateful-nat464-src { match-direction input; rule r1 { match { source-address 2001:DB8:1111::0/96; # Since destination NAT happens first, the # destination IPv6 prefix has been stripped off, # resulting in an IPv4 destination address. destination-address 0.0.0.0/0; application [junos-icmp-all junos-icmp-ping junos-traceroute junos-traceroute-ttl 1]; } then { source-nat { pool { src-pool; } clat-prefix 2001:DB8:1111::0/96; } } } } |
} # end nat |
} # end source |
|
destination { |
|
# This destination rule applies before the source rule. rule-set rule-stateful-nat464-dest { match-direction input; rule r1 { match { destination-address 2001:DB8:2222::0/96; } then { destination-nat { destination-prefix 2001:DB8:2222::0/96; } } } } |
|
} # end destination } # end nat |
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-stateful-nat64; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-stateful-nat64-src; nat-rule-sets rule-stateful-nat64-dest; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { source { |
pool src-pool { address 10.10.10.0/24; port { automatic; random-allocation; } } mapping-timeout 500; } |
pool src-pool { address { 10.10.10.0/24; } port { automatic { random-allocation; } } mapping-timeout 500; } |
rule rule-stateful-nat64 { match-direction input; term t1 { from { destination-address { 2001:DB8:2222::0/64; } } then { translated { source-pool src-pool; destination-prefix 2001:DB8:2222::0/64; translation-type { stateful-nat64; } } } } term t2 { from { destination-address { 2001:DB8:3333::0/64; } } then { translated { source-pool src-pool; destination-prefix 2001:DB8:3333::0/64; translation-type { stateful-nat64; } } } } } |
# This source rule applies after the destination rule. rule-set rule-stateful-nat64-src { match-direction input; rule r1 { match { source-address 0::/0; # Since destination NAT applies first, the # destination address is now IPv4. destination-address 0.0.0.0/0; } then { source-nat { pool { src-pool; } } } } } |
} # end nat |
} # end source |
|
destination { |
|
# This destination rule applies before the source rule. rule-set rule-stateful-nat64-dest { match-direction input; rule r1 { match { destination-address 2001:DB8:2222::0/64; } then { destination-nat { destination-prefix 2001:DB8:2222::0/64; } } } rule r2 { match { destination-address 2001:DB8:3333::0/64; } then { destination-nat { destination-prefix 2001:DB8:3333::0/64; } } } } |
|
} # end destination } # end nat |
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-twice-basic-nat-44; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-twice-basic-nat-44-src; nat-rule-sets rule-twice-basic-nat-44-dest; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { source { |
pool src-pool { address 10.98.10.0/24; } pool dest-pool { address 10.99.10.0/24; } |
pool src-pool { address { 10.98.10.0/24; } # host-address-base indicates a type of static mapping where # the base address 10.10.10.0/0 maps to the lowest # address in the pool, namely 10.98.10.0/0, # and the other addresses map sequentially from there # e.g. 10.10.10.1 maps to 10.98.10.1, and so on. # Since this is a static mapping, there is no port translation # by default. # Note that host-address-base does not have to be the # lowest address allowed by the subsequent source rule. # Any packet with a source address allowed by the source rule # but is lower than the host-address-base is discarded. host-address-base 10.10.10.0/0; } |
rule rule-twice-basic-nat-44 { match-direction input; term t1 { from { source-address { 10.10.10.0/24; } destination-address { 10.20.10.0/24; } } then { translated { source-pool src-pool; destination-pool dest-pool; translation-type { twice-basic-nat-44; } } } } } |
# This source rule applies after the destination rule. rule-set rule-twice-basic-nat-44-src { match-direction input; rule r1 { match { source-address 10.10.10.0/24; # Since destination NAT happens first, the destination # address refers to the NAT’d address. destination-address 10.99.10.0/24; } then { source-nat { pool { src-pool; } } } } } |
} # end nat |
} # end source |
|
destination { |
|
pool dest-pool { address { 10.99.10.0/24; } } |
|
# This destination rule applies before the source rule. rule-set rule-twice-basic-nat-44-dest { match-direction input; rule r1 { match { destination-address 10.20.10.0/24; } then { destination-nat { pool { dest-pool; } } } } } |
|
} # end destination } # end nat |
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-twice-dynamic-nat-44; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-twice-dynamic-nat-44-src; nat-rule-sets rule-twice-dynamic-nat-44-dest; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { source { |
pool src-pool { address 10.98.10.0/24; } pool dest-pool { address 10.99.10.0/24; } |
pool src-pool { address { 10.98.10.0/24; } port { no-translation; } } |
rule rule-twice-dynamic-nat-44 { match-direction input; term t1 { from { source-address { 10.10.10.0/24; } destination-address { 10.20.10.0/24; } } then { translated { source-pool src-pool; destination-pool dest-pool; translation-type { twice-dynamic-nat-44; } } } } } |
# This source rule applies after the destination rule. rule-set rule-twice-dynamic-nat-44-src { match-direction input; rule r1 { match { source-address 10.10.10.0/24; # Since destination NAT happens first, the destination # address refers to the NAT’d address. destination-address 10.99.10.0/24; } then { source-nat { pool { src-pool; } } } } } |
} # end nat |
} # end source |
|
destination { |
|
pool dest-pool { # By default, address mapping in destination pools is static. address { 10.99.10.0/24; } } |
|
# This destination rule applies before the source rule. rule-set rule-twice-dynamic-nat-44-dest { match-direction input; rule r1 { match { destination-address 10.20.10.0/24; } then { destination-nat { pool { dest-pool; } } } } } |
|
} # end destination } # end nat |
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-twice-napt-44; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-twice-napt-44-src; nat-rule-sets rule-twice-napt-44-dest; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { source { |
pool src-pool { address 10.98.10.0/24; port { automatic; secured-port-block-allocation block-size 256 max-blocks-per-address 1 active-block-timeout 300; } } pool dest-pool { address 10.99.10.2/32; } |
pool src-pool { address { 10.98.10.0/24; } port { automatic { round-robin; } block-allocation { block-size 256; maximum-blocks-per-host 1; active-block-timeout 300; } } } |
rule rule-twice-napt-44 { match-direction input; term t1 { from { source-address { 10.10.10.0/24; } destination-address { 10.20.10.2/32; } } then { translated { source-pool src-pool; destination-pool dest-pool; translation-type { twice-napt-44; } } } } } |
# This source rule applies after the destination rule. rule-set rule-twice-napt-44-src { match-direction input; rule r1 { match { source-address 10.10.10.0/24; # Since destination NAT happens first, the # destination address refers to the NAT’d address. destination-address 10.99.10.2/32; } then { source-nat { pool { src-pool; } } } } } |
} # end nat |
} # end source |
|
destination { |
|
pool dest-pool { address { 10.99.10.2/32; } } |
|
# This destination rule applies before the source rule. rule-set rule-twice-napt-44-dest { match-direction input; rule r1 { match { source-address 10.10.10.0/24; destination-address 10.20.10.2/32; } then { destination-nat { pool { dest-pool; } } } } } |
|
} # end destination } # end nat |
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-deterministic-napt44; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-deterministic-napt44; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { source { |
pool src-pool { address 10.10.10.0/24; port { range low 1024 high 19999; deterministic-port-block-allocation block-size 256; } mapping-timeout 120; } |
pool src-pool { address { 10.10.10.0/24; } port { range { 1024; to { 19999; } } deterministic { block-size 256; # host address specifies the subnet that you # want to apply to this pool. host address 10.2.0.0/20; } } mapping-timeout 120; } |
rule rule-deterministic-napt44 { match-direction input; term t1 { from { source-address { 10.2.0.0/18; } } then { translated { source-pool src-pool; translation-type { deterministic-napt44; } mapping-type endpoint-independent; } } } } |
rule-set rule-deterministic-napt44 { match-direction input; rule r1 { match { source-address 10.2.0.0/18; } then { source-nat { pool { src-pool; } mapping-type endpoint-independent; } } } } |
} # end nat |
} # end source } # end nat |
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-deterministic-napt64; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-deterministic-napt64-src; nat-rule-sets rule-deterministic-napt64-dest; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { source { |
pool src-pool { address 10.98.10.0/24; port { automatic; random-allocation; } deterministic-port-block-allocation block-size 256; } } |
pool src-pool { address { 10.98.10.0/24; } port { automatic { random-allocation; } deterministic { block-size 256; host address 2001:DB8:1111::1/120; } } } |
rule rule-deterministic-napt64 { match-direction input; term t1 { from { source-address { 2001:DB8:1111::1/120; } } then { translated { destination-prefix 2001:DB8:2222::/96; source-pool src-pool; translation-type { deterministic-napt64; } } } } } |
# This source rule applies after the destination rule. rule-set rule-deterministic-napt64-src { match-direction input; rule r1 { match { source-address 2001:DB8:1111::1/120; # Since destination NAT happens first, the destination # address refers to the NAT’d address. destination-address 0.0.0.0/0; } then { source-nat { pool { src-pool; } } } } } |
} # end nat |
} # end source |
|
destination { |
|
pool dest-pool { address { 10.99.10.2/32; } } |
|
# This destination rule applies before the source rule. rule-set rule-destination-napt64-dest { match-direction input; rule r1 { match { destination-address 2001:DB8:2222::/96; } then { destination-nat { destination-prefix 2001:DB8:2222::/96; } } } } |
|
} # end destination } # end nat |
MSカード |
MX-SPC3 |
---|---|
[edit services] |
[edit services] |
service-set sset1 { nat-rules rule-napt-pt; interface-service { service-interface ms-1/2/0; } } |
service-set sset1 { nat-rule-sets rule-napt-pt-src; nat-rule-sets rule-napt-pt-dest; interface-service { service-interface vms-2/0/0; } } |
nat { |
nat { source { |
pool src-pool { address 10.10.10.2/32; } pool dest-pool { address 10.99.10.2/32; } |
pool src-pool { address { 10.10.10.2/32; } } |
rule rule-napt-pt { match-direction input; term t1 { from { source-address { 2001:DB8:1111::2/128; } destination-address { 2001:DB8:2222::2/128; } } then { translated { source-pool src-pool; destination-pool dest-pool; translation-type { napt-pt; } } } } } |
rule-set rule-napt-pt-src { match-direction input; rule r1 { match { source-address 2001:DB8:1111::2/128; destination-address 10.99.10.0/24; } then { source-nat { pool { src-pool; } } } } } |
} # end nat |
} # end source |
|
destination { |
|
pool dest-pool { address { 10.99.10.2/32; } } |
|
rule-set rule-napt-pt-dest { match-direction input; rule r1 { match { destination-address 2001:DB8:2222::2/128; } then { destination-nat { pool { dest-pool; } } } } } |
|
} # end destination } # end nat |
侵入検知システム(IDS)
MX-SPC3 上の次世代サービスの IDS ルールは、 screen
ブランチで定義されています。さまざまな要素の命名に若干の違いがありますが、主な変更点は、IPv4 オプションと IPv6 拡張を持つパケットを検出する動作です。
MS カードの IDS サービスの場合、デフォルト動作は、IPv4 オプションと IPv6 拡張を持つパケットを検出してドロップすることです。これらのパケットを許可する場合は、設定で明示的に許可する必要があります。
MX-SPC3 上の IDS 次世代サービスの場合、デフォルト動作は、IPv4 オプションと IPv6 拡張を持つパケットを許可することです。これらのパケットを検出してドロップするには、設定によって明示的に許可しないようにする必要があります。
表 21 は、設定の相違の例を示しています。
MSカード |
MX-SPC3 |
---|---|
[edit services] service-set sset1 { ids-rules r1; ids-rules r2; } |
[edit services] service-set sset1 { # Replace ids-rules with ids-option. ids-option ids1; ids-option ids2; } |
[edit services] ids { rule r1 { match-direction input; term t1 { <...> } } } |
[edit services] # Define ids rules under the screen branch. screen { # Replace rule with ids-option. ids-option ids1 { match-direction input; # Flatten hierarchy by removing term and placing # contents directly under ids-option. <...> } } |
[edit services] ids { rule r1 { match-direction input; term t1 { then { allow-ip-options [ loose-source-route route-record router-alert security stream-id strict-source-route timestamp ]; } } } } |
[edit services] screen { ids-option ids1 { match-direction input; # By default, all ip options are allowed. } } |
[edit services] ids { rule r1 { match-direction input; term t1 { then { <no allow-ip-options configured> } } } } |
[edit services] screen { ids-option ids1 { match-direction input; # Explicitly specify the disallowed options. ip { loose-source-route-option; record-route-option; security-option; stream-option; strict-source-route-option; timestamp-option; # router-alert option for IPv4 is not supported. } } } |
[edit services] ids { rule r1 { match-direction input; term t1 { then { allow-ipv6-extension-header [ ah dstopts esp fragment hop-by-hop mobility routing ]; } } } } |
[edit services] screen { ids-option ids1 { match-direction input; # By default, all ipv6 extensions are allowed. } } |
[edit services] ids { rule r1 { match-direction input; term t1 { then { <no allow-ipv6-extension-header configured> } } } } |
[edit services] screen { ids-option ids1 { match-direction input; ip { # Explicitly specify the disallowed extensions. ipv6-extension-header { AH-header; ESP-header; fragment-header; hop-by-hop-header; mobility-header; routing-header; # dstoptions is not supported. } } } } |
[edit services] ids { rule r1 { match-direction input; term t1 { then { aggregation { source-prefix 24; destination-prefix 24; source-prefix-ipv6 64; destination-prefix-ipv6 64; } } } } } |
[edit services] screen { ids-option ids1 { match-direction input; aggregation { source-prefix-mask 24; destination-prefix-mask 24; source-prefix-v6-mask 64; destination-prefix-v6-mask 64; } } } |
[edit services] ids { rule r1 { match-direction input; term t1 { then { icmp-fragment-check; icmp-large-packet-check; } } } } |
[edit services] screen { ids-option ids1 { match-direction input; # Group icmp checks under icmp. icmp { fragment; large; } } } |
[edit services] ids { rule r1 { match-direction input; term t1 { then { land-attack-check; tcp-winnuke-check; tcp-syn-fragment-check; tcp-syn-defense; } } } } |
[edit services] screen { ids-option ids1 { match-direction input; # Group tcp checks under tcp. tcp { land; winnuke; syn-frag; # tcp-syn-defense is not supported. } } } |
[edit services] ids { rule r1 { match-direction input; term t1 { then { session-limit { by-source { maximum 100; rate 10; packets 1k; } by-destination { maximum 100; rate 10; packets 1k; } } } } } } |
[edit services] screen { ids-option ids1 { match-direction input; limit-session { by-source { maximum-sessions 100; session-rate 10; packet-rate 1k; } by-destination { maximum-sessions 100; session-rate 10; packet-rate 1k; } } } } |
[edit services] ids { rule r1 { match-direction input; term t1 { then { session-limit { by-source { by-protocol { tcp { maximum 100; rate 10; packets 1k; } udp { maximum 100; rate 10; packets 1k; } icmp { maximum 100; rate 10; packets 1k; } } } } } } } |
[edit services] screen { ids-option ids1 { match-direction input; limit-session { by-source { by-protocol { tcp { maximum-sessions 100; session-rate 10; packet-rate 1k; } udp { maximum-sessions 100; session-rate 10; packet-rate 1k; } icmp { maximum-sessions 100; session-rate 10; packet-rate 1k; } } } } } } |
[edit services] ids { rule r1 { match-direction input; term t1 { then { session-limit { by-destination { by-protocol { tcp { maximum 100; rate 10; packets 1k; } udp { maximum 100; rate 10; packets 1k; } icmp { maximum 100; rate 10; packets 1k; } } } } } } } |
[edit services] screen { ids-option ids1 { match-direction input; limit-session { by-destination { by-protocol { tcp { maximum-sessions 100; session-rate 10; packet-rate 1k; } udp { maximum-sessions 100; session-rate 10; packet-rate 1k; } icmp { maximum-sessions 100; session-rate 10; packet-rate 1k; } } } } } } |
MS カードから MX-SPC3 への移行
次世代サービスをサポートするルーターを設定するには、この手順を使用します。
通常、この手順は、MS カードのレガシー サービスをサポートするルーターを、MX-SPC3 で次世代サービスをサポートするルーターに移行するために使用されますが、移行元のルーターに MS カード カードが含まれていなくても、この手順が適用されます。
次世代サービス設定はレガシー サービス プロビジョニングと互換性がないため、MX-SPC3 で次世代サービスをサポートするようにルーターを移行するには、ルーターを完全にプロビジョニング解除して再プロビジョニングする必要があります。その上:
MS カードを搭載したルーターに MX-SPC3 カードを取り付けることはできません。
MS カードを搭載したルーターでは、次世代サービスを設定することはできません。
MX-SPC3カードを搭載したルーターでは、レガシーサービスを設定することはできません。
つまり、ルーターはMSカードまたはMX-SPC3カードのいずれかで実行できますが、両方を同時に実行することはできません。
この手順はサービスに影響します。ルーターを工場出荷時のデフォルト設定に設定しています。