ADC

NSPEPI ツールを使用してポリシー表現を変換する

注:

NSPEPI と事前設定チェックツールは、公開 GitHub からダウンロードできます。ツールのダウンロード、インストール、使用方法の詳細については、 GitHub NSPEPI ページと README ページを参照してください。お客様には、GitHub で利用可能なツールを使用して、最も完全で最新のバージョンを使用することをお勧めします。

従来のポリシーベースの機能は、NetScaler 12.0ビルド56.20以降では廃止されました。 別の方法として、NetScalerでは、NSPEPIツールでサポートされる機能に高度なポリシーインフラストラクチャを使用することを推奨しています。サポートされている機能のリストについては、「 nspepi 変換ツールで処理されるコマンドまたは機能」を参照してください。NSPEPI ツールでサポートされていない機能は、引き続きクラシックポリシーをサポートします。サポートされていない機能のリストについては、「 NSPEPI ツールのサポートされていない機能」を参照してください。

このnspepiツールは次のタスクを実行できます:

  1. クラシックポリシー式を高度なポリシー式に変換します。
  2. 特定のクラシックポリシーとそのエンティティバインディングを高度なポリシーおよびバインディングに変換します。
  3. いくつかの非推奨の機能を、対応する非推奨の機能に変換します。
  4. 従来のフィルタコマンドを高度なフィルタコマンドに変換します。

注:

nspepiツールが ns.conf 構成ファイルを正常に変換すると、変換されたファイルは、接頭辞「new_」が付いた新しいファイルとして表示されます。変換された設定ファイルにエラーまたは警告がある場合は、変換プロセスの一環として手動で修正する必要があります。変換したら、テスト環境でファイルをテストし、それを使用して実際の ns.conf 構成ファイルを置き換える必要があります。テスト後、新しく変換または修正された ns.conf 構成ファイル用にアプライアンスを再起動する必要があります。

クラシックポリシーまたは式のみをサポートする機能は廃止され、対応する非推奨の機能に置き換えることができます。

注:

旧バージョンのnspepiツールに関する情報は PDF 形式で入手できます。詳細については、「 12.1-51.16 PDF より前の nspepi ツールを使用した従来のポリシー変換 」を参照してください。

変換の警告とエラーファイル

変換ツールを使用する前に、注意すべき点がいくつかあります:

  1. すべての警告とエラーがコンソールに出力されます。設定ファイルが保存されている場所に警告ファイルが作成されます。
  2. 警告およびエラーファイルの名前は、入力ファイルと同じですが、ファイル名に接頭辞「warn_」が追加されています。式の変換中 (-e を使用する場合)、警告はカレントディレクトリに「warn_expr」という名前で表示されます。

注:

このファイルは、日付/時刻スタンプとログレベルを含む標準のログファイル形式です。ツールが複数回実行されるので、ファイルの以前のインスタンスは「.1」、「.2」などの接尾辞で保持されます。最大で 10 個のインスタンスが保持されます。

変換されたファイル形式

設定ファイル (「-f」を使用) を変換する場合、変換されたファイルは、同じ名前でプレフィックス「new_」の入力設定ファイルが存在するディレクトリと同じディレクトリに置かれます。

nspepi 変換ツールによって処理されるコマンドまたは機能

自動変換処理中に処理されるコマンドは次のとおりです。

  • 次のクラシックポリシーとその式は、高度なポリシーと式に変換されます。変換には、エンティティバインディングとグローバルバインディングが含まれます。
  1. add appfw policy
  2. add cmp policy
  3. add cr policy
  4. add cs policy
  5. SSL ポリシーの追加
  6. add filter action
  7. add filter policy
  8. 負荷分散、コンテンツスイッチング、キャッシュリダイレクト、およびグローバルへのポリシーバインディングをフィルタします。
  • 「Add lb 仮想サーバー」で設定されたルールパラメーターは、クラシック式から高度な式に変換されます。
  • 「追加 ns HttpProfile」または「ns httpProfile を設定」コマンドで設定された SPDY パラメータが「-http2 ENABLED」に変更されます。
  • 名前付き式 (「ポリシー式の追加」コマンド)。各クラシック名前付きポリシー式は、接頭辞として「nspepi_adv_」が設定された、対応する Advanced 名前付き式に変換されます。さらに、変換されたクラシック式での名前付き式の使用は、対応する Advanced 名前付き式に変更されます。さらに、すべての名前付き式には 2 つの名前付き式があります。1 つは Classic で、もう 1 つは Advanced です (以下を参照)。
  • トンネルトラフィックポリシー変換がサポートされています。
  • CMP、CR、およびトンネルでの組み込みのクラシックポリシーバインディングの処理。
  • Patclass フィーチャは Pat セットフィーチャに変換されます。
  • 「書き換えアクションを追加」コマンドの「-pattern」パラメータは、「-search」パラメータを使用するように変換されます。
  • 高度な定義式の Q および S プレフィックスは、非推奨の同等の高度な式に変換されます。これらの式は、高度な定義式を使用できるすべてのコマンドで見ることができます。

例:

add policy expression classic_expr ns_true
Converts to:
add policy expression classic_expr ns_true
add policy expression nspepi_adv_classic_expr TRUE
<!--NeedCopy-->
  • 「set cmp パラメータ」コマンドで設定された policyType パラメータが削除されます。デフォルトでは、ポリシータイプは「Advanced」です。

従来のフィルタコマンドを高度なフィルタコマンドに変換する

このnspepiツールは、追加、バインドなどの従来のフィルタ操作に基づくコマンドを高度なフィルタコマンドに変換できます。

ただし、 nspepiツールは次のフィルターコマンドをサポートしていません。

  1. add filter action <action Name> FORWARD <service name>
  2. add filter action <action name> ADD prebody
  3. add filter action <action name> ADD postbody

注:

  1. ns.conf に既存の書き換え機能またはレスポンダ機能があり、それらのポリシーがGOTOENDまたはUSER_INVOCATION_RESULTとしてグローバルにバインドされ、 バインドタイプがREQ_XまたはRES_Xである場合、バインドフィルタコマンドは部分的に変換され、コメントアウトされます。手動変換ではエラーが表示されます。
  2. 既存の書き換え機能またはレスポンダー機能があり、そのポリシーがGOTO - ENDまたはUSER_INVOCATION_RESULTを使用して HTTPS タイプの仮想サーバー (負荷分散、コンテンツスイッチング、キャッシュリダイレクトなど) にバインドされている場合、ツールはバインドフィルターコマンドを部分的に変換してからコメントアウトします。手動変換には警告が表示されます。

以下は入力例です。

add lb vserver v1 http 1.1.1.1 80 -persistenceType NONE -cltTimeout 9000
add cs vserver csv1 HTTP 1.1.1.2 80 -cltTimeout 180 -persistenceType NONE
add cr vserver crv1 HTTP 1.1.1.3 80 -cacheType FORWARD
add service svc1 1.1.1.4 http 80
add filter action fact_add add 'header:value'
add filter action fact_variable add 'H1:%%HTTP.TRANSID%%'
add filter action fact_prebody add prebody
add filter action fact_error_act1 ERRORCODE 200 "<HTML>Good URL</HTML>"
add filter action fact_forward_act1 FORWARD svc1
add filter policy fpol_add_res -rule ns_true -resAction fact_add
add filter policy fpol_error_res -rule ns_true -resAction fact_error_act1
add filter policy fpol_error_req -rule ns_true -reqAction fact_error_act1
add filter policy fpol_add_req -rule ns_true -reqAction fact_add
add filter policy fpol_variable_req -rule ns_true -reqAction fact_variable
add filter policy fpol_variable_res -rule ns_true -resAction fact_variable
add filter policy fpol_prebody_req -rule ns_true -reqAction fact_prebody
add filter policy fpol_prebody_res -rule ns_true -resAction fact_prebody
add filter policy fpol_forward_req -rule ns_true -reqAction fact_forward_act1
bind lb vserver v1 -policyName fpol_add_res
bind lb vserver v1 -policyName fpol_add_req
bind lb vserver v1 -policyName fpol_error_res
bind lb vserver v1 -policyName fpol_error_req
bind lb vserver v1 -policyName fpol_variable_res
bind lb vserver v1 -policyName fpol_variable_req
bind lb vserver v1 -policyName fpol_forward_req
bind cs vserver csv1 -policyName fpol_add_req
bind cs vserver csv1 -policyName fpol_add_res
bind cs vserver csv1 -policyName fpol_error_res
bind cs vserver csv1 -policyName fpol_error_req
bind cr vserver crv1 -policyName fpol_add_req
bind cr vserver crv1 -policyName fpol_add_res
bind cr vserver crv1 -policyName fpol_error_res
bind cr vserver crv1 -policyName fpol_error_req
bind cr vserver crv1 -policyName fpol_forward_req
bind filter global fpol_add_req
bind filter global fpol_add_res
bind filter global fpol_error_req
bind filter global fpol_error_res
bind filter global fpol_variable_req
bind filter global fpol_variable_res
bind filter global fpol_variable_res -state DISABLED
bind filter global fpol_prebody_req
bind filter global fpol_forward_req
After conversion, warning/error messages will be displayed for manual effort.
Warning files:
cat warn_<input file name>:
2019-11-07 17:13:34,724: ERROR - Conversion of [add filter action fact_prebody add prebody] not supported in this tool.
2019-11-07 17:13:34,739: ERROR - Conversion of [add filter action fact_forward_act1 FORWARD svc1] not supported in this tool.
2019-11-07 17:13:38,042: ERROR - Conversion of [add filter policy fpol_prebody_req -rule ns_true -reqAction fact_prebody] not supported in this tool.
2019-11-07 17:13:38,497: ERROR - Conversion of [add filter policy fpol_prebody_res -rule ns_true -resAction fact_prebody] not supported in this tool.
2019-11-07 17:13:39,035: ERROR - Conversion of [add filter policy fpol_forward_req -rule ns_true -reqAction fact_forward_act1] not supported in this tool.
2019-11-07 17:13:39,060: WARNING - Following bind command is commented out because state is disabled. Advanced expressions only have a fixed ordering of the types of bindings without interleaving, except that global bindings are allowed before all other bindings and after all bindings. If you have global bindings in the middle of non-global bindings or any other interleaving then you will need to reorder all your bindings for that feature and direction. Refer to nspepi documentation. If command is required please take a backup because comments will not be saved in ns.conf after triggering 'save ns config': bind filter global fpol_variable_res -state DISABLED


<!--NeedCopy-->

次に、出力例を示します。変換されたすべてのコマンドにはコメントが付きます。

cat new_<input file name>
add rewrite action fact_add insert_http_header header ""value""
add filter action fact_prebody add prebody
add filter action fact_forward_act1 FORWARD svc1
add filter policy fpol_prebody_req -rule ns_true -reqAction fact_prebody
add filter policy fpol_prebody_res -rule ns_true -resAction fact_prebody
add filter policy fpol_forward_req -rule ns_true -reqAction fact_forward_act1
bind lb vserver v1 -policyName fpol_forward_req
bind cr vserver crv1 -policyName fpol_forward_req
#bind filter global fpol_variable_res -state DISABLED
bind filter global fpol_prebody_req
bind filter global fpol_forward_req
add rewrite action nspepi_adv_fact_variable insert_http_header H1 HTTP.RES.TXID
add rewrite action fact_variable insert_http_header H1 HTTP.REQ.TXID
add responder action fact_error_act1 respondwith "HTTP.REQ.VERSION.APPEND(" 200 OK\r
nConnection: close\r
nContent-Length: 21\r\n\r
n<HTML>Good URL</HTML>")"
add rewrite action nspepi_adv_fact_error_act1 replace_http_res "HTTP.REQ.VERSION.APPEND(" 200 OK\r
nConnection: close\r
nContent-Length: 21\r\n\r
n<HTML>Good URL</HTML>")"
add rewrite policy fpol_add_res TRUE fact_add
add rewrite policy fpol_error_res TRUE nspepi_adv_fact_error_act1
add responder policy fpol_error_req TRUE fact_error_act1
add rewrite policy fpol_add_req TRUE fact_add
add rewrite policy fpol_variable_req TRUE fact_variable
add rewrite policy fpol_variable_res TRUE nspepi_adv_fact_variable
set cmp parameter -policyType ADVANCED
bind rewrite global fpol_add_req 100 NEXT -type REQ_DEFAULT
bind rewrite global fpol_variable_req 200 NEXT -type REQ_DEFAULT
bind rewrite global fpol_add_res 100 NEXT -type RES_DEFAULT
bind rewrite global fpol_error_res 200 NEXT -type RES_DEFAULT
bind rewrite global fpol_variable_res 300 NEXT -type RES_DEFAULT
bind responder global fpol_error_req 100 END -type REQ_DEFAULT
bind lb vserver v1 -policyName fpol_add_res -type RESPONSE -priority 100 -gotoPriorityExpression NEXT
bind lb vserver v1 -policyName fpol_error_res -type RESPONSE -priority 200 -gotoPriorityExpression NEXT
bind lb vserver v1 -policyName fpol_variable_res -type RESPONSE -priority 300 -gotoPriorityExpression NEXT
bind lb vserver v1 -policyName fpol_add_req -type REQUEST -priority 100 -gotoPriorityExpression NEXT
bind lb vserver v1 -policyName fpol_variable_req -type REQUEST -priority 200 -gotoPriorityExpression NEXT
bind lb vserver v1 -policyName fpol_error_req -type REQUEST -priority 100 -gotoPriorityExpression END
bind cs vserver csv1 -policyName fpol_add_req -type REQUEST -priority 100 -gotoPriorityExpression NEXT
bind cs vserver csv1 -policyName fpol_add_res -type RESPONSE -priority 100 -gotoPriorityExpression NEXT
bind cs vserver csv1 -policyName fpol_error_res -type RESPONSE -priority 200 -gotoPriorityExpression NEXT
bind cs vserver csv1 -policyName fpol_error_req -type REQUEST -priority 100 -gotoPriorityExpression END
bind cr vserver crv1 -policyName fpol_add_req -type REQUEST -priority 100 -gotoPriorityExpression NEXT
bind cr vserver crv1 -policyName fpol_add_res -type RESPONSE -priority 100 -gotoPriorityExpression NEXT
bind cr vserver crv1 -policyName fpol_error_res -type RESPONSE -priority 200 -gotoPriorityExpression NEXT
bind cr vserver crv1 -policyName fpol_error_req -type REQUEST -priority 100 -gotoPriorityExpression END

<!--NeedCopy-->

既存の書き換えまたはレスポンダーポリシーバインディングに goto 式 END または USE_INNVOCATION がある場合、従来のフィルタコマンドを高度な機能コマンドに変換します

この変換では、書き換えポリシーが 1 つ以上の仮想サーバーにバインドされ、サーバーに END または USE_INVOCATION_RESULT がある場合、ツールはコマンドをコメントアウトします。

次に、入力コマンドの例を示します:

COPY
add filter policy fpol1 -rule ns_true -resAction reset
add filter policy fpol2 -rule ns_true -reqAction reset
add rewrite policy pol1 true NOREWRITE
add rewrite policylabel pl http_res
bind rewrite policylabel pl pol1 1
bind rewrite global NOPOLICY 1 USE_INVOCATION_RESULT -type RES_DEFAULT -invoke policylabel pl
add responder policy pol2 true NOOP
add responder policylabel pl -policylabeltype HTTP
bind responder policylabel pl pol2 1
bind responder global NOPOLICY 1 USE_INVOCATION_RESULT -type REQ_DEFAULT -invoke policylabel pl
bind lb vserver v1_tcp -policyName pol1 -priority 100 -gotoPriorityExpression USE_INVOCATION_RESULT -type RESPONSE
bind cs vserver csv1_tcp -policyName pol1 -priority 100 -gotoPriorityExpression USE_INVOCATION_RESULT -type RESPONSE
bind lb vserver v1_tcp -policyName pol2 -priority 100 -gotoPriorityExpression USE_INVOCATION_RESULT -type REQUEST
bind cs vserver csv1_tcp -policyName pol2 -priority 100 -gotoPriorityExpression USE_INVOCATION_RESULT -type REQUEST
bind cr vserver crv1_tcp -policyName pol2 -priority 100 -gotoPriorityExpression USE_INVOCATION_RESULT -type REQUEST
bind lb vserver v1_http -policyName fpol1
bind cs vserver csv1_http -policyName fpol1
bind lb vserver v2_http -policyName fpol2
bind cs vserver csv2_http -policyName fpol2
bind cr vserver crv2_http -policyName fpol2
bind filter global fpol1 -priority 100
bind filter global fpol2 -priority 100
<!--NeedCopy-->

次に、出力コマンドの例を示します:

COPY
add rewrite policy pol1 true NOREWRITE
add rewrite policylabel pl http_res
bind rewrite policylabel pl pol1 1
add responder policy pol2 true NOOP
add responder policylabel pl -policylabeltype HTTP
bind responder policylabel pl pol2 1
add rewrite policy fpol1 TRUE RESET
add responder policy fpol2 TRUE RESET
#bind lb vserver v1_http -policyName fpol1 -type RESPONSE
#bind cs vserver csv1_http -policyName fpol1 -type RESPONSE
#bind rewrite global fpol1 100 -type RES_DEFAULT
#bind lb vserver v2_http -policyName fpol2 -type REQUEST
#bind cs vserver csv2_http -policyName fpol2 -type REQUEST
#bind cr vserver crv2_http -policyName fpol2 -type REQUEST
#bind responder global fpol2 100 -type REQ_DEFAULT
bind rewrite global NOPOLICY 1 USE_INVOCATION_RESULT -type RES_DEFAULT -invoke policylabel pl
bind responder global NOPOLICY 1 USE_INVOCATION_RESULT -type REQ_DEFAULT -invoke policylabel pl
bind lb vserver v1_tcp -policyName pol1 -priority 100 -gotoPriorityExpression USE_INVOCATION_RESULT -type RESPONSE
bind lb vserver v1_tcp -policyName pol2 -priority 100 -gotoPriorityExpression USE_INVOCATION_RESULT -type REQUEST
bind cs vserver csv1_tcp -policyName pol1 -priority 100 -gotoPriorityExpression USE_INVOCATION_RESULT -type RESPONSE
bind cs vserver csv1_tcp -policyName pol2 -priority 100 -gotoPriorityExpression USE_INVOCATION_RESULT -type REQUEST
bind cr vserver crv1_tcp -policyName pol2 -priority 100 -gotoPriorityExpression USE_INVOCATION_RESULT -type REQUEST-

<!--NeedCopy-->

nspepi ツールを実行する

以下は、nspepiツールを実行するためのコマンドライン例です。このツールは、シェルのコマンドラインから実行されます(そのためには、NetScaler「CLI」に「シェル」コマンドを入力する必要があります)。変換を実行するには、「-f」または」-e」のいずれかを指定する必要があります。「-d」の使用は、Citrix 担当者がサポート目的で分析することを意図しています。

usage: nspepi [-h] (-e <classic policy expression> | -f <path to ns config file>)[-d] [-v] [-V

Convert classic policy expressions to advanced policy expressions and deprecated commands to non-deprecated
commands.

optional arguments:
-h, --help show this help message and exit
-e <classic policy expression>, --expression <classic policy expression>
convert classic policy expression to advanced policy
expression (maximum length of 8191 allowed)
-f <path to ns config file>, --infile <path to ns config file>
convert netscaler config file
-d, --debug log debug output
-v, --verbose show verbose output
-V, --version show program's version number and exit
<!--NeedCopy-->

使用例:

  1. nspepi -e "req.tcp.destport == 80"
  2. nspepi -f /nsconfig/ns.conf

次に、CLIを使用したnspepiツールの実行例をいくつか示します。

—e パラメータの出力例:

root@ns# nspepi -e "req.http.header foo == "bar""
"HTTP.REQ.HEADER("foo").EQ("bar")"
<!--NeedCopy-->

-f パラメータの出力例:

root@ns# cat sample.conf
add cr vserver cr_vs HTTP -cacheType TRANSPARENT -cltTimeout 180 -originUSIP OFF
add cr policy cr_pol1 -rule ns_true
bind cr vserver cr_vs -policyName cr_pol1
<!--NeedCopy-->

-f パラメータを指定して nspepi を実行中:

nspepi -f sample.conf
<!--NeedCopy-->

変換されたコンフィグは新しいファイルnew_sample.confで使用できます。 warn_sample.confファイルをチェックして、生成された可能性のある警告またはエラーがないか確認します。

-f パラメータと-v パラメータの出力例

nspepi -f sample.conf -v
INFO - add cr vserver cr_vs HTTP -cacheType TRANSPARENT -cltTimeout 180 -originUSIP OFF
INFO - add cr policy cr_pol1 -rule TRUE -action ORIGIN
INFO - bind cr vserver cr_vs -policyName cr_pol1 -priority 100 -gotoPriorityExpression END -type REQUEST
<!--NeedCopy-->

変換されたコンフィグは新しいファイルnew_sample.confで使用できます。 warn_sample.confファイルをチェックして、生成された可能性のある警告またはエラーがないか確認します。

変換された設定ファイル:

root@ns# cat new_sample.conf
add cr vserver cr_vs HTTP -cacheType TRANSPARENT -cltTimeout 180 -originUSIP OFF
add cr policy cr_pol1 -rule TRUE -action ORIGIN
set cmp parameter -policyType ADVANCED
bind cr vserver cr_vs -policyName cr_pol1 -priority 100 -gotoPriorityExpression END -type REQUEST

<!--NeedCopy-->

エラーや警告のない設定例の出力例:

nspepi -f sample_2.conf
<!--NeedCopy-->

変換されたコンフィグは新しいファイルnew_sample_2.confで使用できます。 warn_sample_2.confファイルをチェックして、生成された可能性のある警告またはエラーがないか確認します。

警告付きの設定例の出力例:

root@ns# cat sample_2.conf
add policy expression security_expr "req.tcp.destport == 80" -clientSecurityMessage "Not allowed"
set cmp parameter -policyType CLASSIC
add cmp policy cmp_pol1 -rule ns_true -resAction COMPRESS
add cmp policy cmp_pol2 -rule ns_true -resAction COMPRESS
add cmp policy cmp_pol3 -rule TRUE -resAction COMPRESS
bind cmp global cmp_pol1
bind cmp global cmp_pol2 -state DISABLED
bind cmp global cmp_pol3 -priority 1 -gotoPriorityExpression END -type RES_DEFAULT
bind lb vserver lb_vs -policyName cmp_pol2
root@ns#
<!--NeedCopy-->

-f パラメータを指定した nspepi の実行例:

root@ns# nspepi -f sample_2.conf
ERROR - Error in converting expression security_expr : conversion of clientSecurityMessage based expression is not supported.
WARNING - Following bind command is commented out because state is disabled. Advanced expressions only have a fixed ordering of the types of bindings without interleaving, except that global bindings are allowed before all other bindings and after all bindings. If you have global bindings in the middle of non-global bindings or any other interleaving then you will need to reorder all your bindings for that feature and direction. Refer to nspepi documentation. If command is required please take a backup because comments will not be saved in ns.conf after triggering 'save ns config': bind cmp global cmp_pol2 -state DISABLED
Warning - Bindings of advanced CMP policies to cmp global are commented out, because initial global cmp parameter is classic but advanced policies are bound. Now global cmp parameter policy type is set to advanced. If commands are required please take a backup because comments will not be saved in ns.conf after triggering 'save ns config'. Advanced expressions only have a fixed ordering of the types of bindings without interleaving, except that global bindings are allowed before all other bindings and after all bindings. If you have global bindings in the middle of non-global bindings or any other interleaving then you will need to reorder all your bindings for that feature and direction. Refer to nspepi documentation.
root@ns#
<!--NeedCopy-->

変換されたファイル:

root@ns# cat new_sample_2.conf  
add policy expression security_expr "req.tcp.destport == 80" -clientSecurityMessage "Not allowed"
set cmp parameter -policyType ADVANCED
add cmp policy cmp_pol1 -rule TRUE -resAction COMPRESS
add cmp policy cmp_pol2 -rule TRUE -resAction COMPRESS
add cmp policy cmp_pol3 -rule TRUE -resAction COMPRESS
#bind cmp global cmp_pol2 -state DISABLED
#bind cmp global cmp_pol3 -priority 1 -gotoPriorityExpression END -type RES_DEFAULT
bind cmp global cmp_pol1 -priority 100 -gotoPriorityExpression END -type RES_DEFAULT
bind lb vserver lb_vs -policyName cmp_pol2 -priority 100 -gotoPriorityExpression END -type RESPONSE
root@ns#
<!--NeedCopy-->

警告ファイル:

root@ns# cat warn_sample_2.conf
2019-02-28 06:20:10,590: ERROR - Error in converting expression security_expr : conversion of clientSecurityMessage based expression is not supported.
2019-02-28 06:20:12,187: WARNING - Following bind command is commented out because state is disabled. Advanced expressions only have a fixed ordering of the types of bindings without interleaving, except that global bindings are allowed before all other bindings and after all bindings. If you have global bindings in the middle of non-global bindings or any other interleaving then you will need to reorder all your bindings for that feature and direction. Refer to nspepi documentation. If command is required please take a backup because comments will not be saved in ns.conf after triggering 'save ns config': bind cmp global cmp_pol2 -state DISABLED
2019-02-28 06:20:12,191: WARNING - Bindings of advanced CMP policies to cmp global are commented out, because initial global cmp parameter is classic but advanced policies are bound. Now global cmp parameter policy type is set to advanced. If commands are required please take a backup because comments will not be saved in ns.conf after triggering 'save ns config'. Advanced expressions only have a fixed ordering of the types of bindings without interleaving, except that global bindings are allowed before all other bindings and after all bindings. If you have global bindings in the middle of non-global bindings or any other interleaving then you will need to reorder all your bindings for that feature and direction. Refer to nspepi documentation.
root@ns#
<!--NeedCopy-->

バインディングの優先順位

高度なポリシーでは、グローバルと非グローバルの間、および異なるバインディングタイプ間の優先度による任意のインターリーブは許可されません。このようなクラシックポリシーの優先順位のインターリーブに依存する場合は、高度なポリシールールに準拠し、希望する動作になるように優先順位を調整する必要があります。 詳細ポリシーの優先順位は、バインドポイントに対してローカルです。バインドポイントは、プロトコル、機能、方向、およびエンティティの一意の組み合わせです(エンティティは、特定の仮想サーバ、ユーザ、グループ、サービス、およびグローバルオーバーライドまたはグローバルデフォルトのいずれかです)。ポリシーの優先順位は、バインドポイント全体では従いません。

特定のプロトコル、機能、方向性について、詳細ポリシーを評価する順序は次のとおりです。

  • グローバルオーバーライド。
  • (現在の) 認証、承認、および監査ユーザー。
  • 認証、認可、および監査グループ(ユーザーがメンバーである)の重み順です。複数のグループの重みが同じ場合、順序は定義されません。
  • 要求を受信したか、コンテンツスイッチングが選択された LB 仮想サーバー。
  • コンテンツスイッチング仮想サーバー、要求を受信したキャッシュリダイレクト仮想サーバー。
  • 負荷分散によって選択されたサービス。
  • グローバルデフォルト。

各バインドポイント内では、ポリシーは、番号の小さいものから高い番号の優先順位で評価されます。ポリシーは、使用されているプロトコルとメッセージの受信元の方向についてのみ評価されます。

手動での優先順位の再設定が必要な従来のポリシーバインディング

ここでは、ニーズを満たすために手動で優先順位を再設定する必要があるクラシックポリシーバインディングのタイプをいくつか示します。これらはすべて、特定のフィーチャと方向に対するものです。

  • 上記のエンティティタイプリストの方向とは逆のプライオリティ番号が増加するクラシックプライオリティ。たとえば、負荷分散仮想サーバーバインディングよりも低いコンテンツスイッチング仮想サーバーバインディングです。
  • 認証、認可、および監査グループの重みの順序以外の数が増加する従来の優先順位。
  • 一部の非グローバルプライオリティよりも小さく、同じグローバルプライオリティのクラシックグローバルプライオリティは、他の非グローバルプライオリティ(つまり、非グローバルプライオリティのセグメント、続いて 1 つ以上のグローバル、その後に非グローバルプライオリティ)よりも大きくなります。

NSPEPIおよびcheck_invalid_configツールは、CentOSおよびUbuntuシステムで実行できます

以下のモジュールは、これらのツールを使用するための前提条件です。

  • Python
  • Perl
  • Python pipモジュール
  • パイソン用 PLY モジュール
  • .pm を Perl 用に Switch.pm

Python 3 がインストールされている場合は、"ln -s /usr/bin/python3 /usr/bin/python"などのソフトリンクを作成します。

Python の pip モジュール、Python 用の PLY モジュール、および Perl 用の Switch.pm を CentOS にインストールするには、次のコマンドを実行します。

  • sudo yum install -y perl-Switch
  • sudo yum install python-pip
  • sudo yum install python-ply

Python の pip モジュール、Python 用の PLY モジュール、および Perl 用の Switch.pm を Ubuntu にインストールするには、以下のコマンドを実行します。

  • sudo apt install libswitch-perl
  • sudo apt install python-ply
  • sudo apt install python-pip or sudo apt install python3-pip