コンフィグ管理

動作確認バージョン

NetScaler VPX Version13.1 Standard Edition

ここでは、作成済みロードバランサー(NetScaler VPX)のコンフィグファイルをバックアップ/リストアする方法についてご説明します。

NetScaler VPXのコンフィグ保存

  1. ロードバランサー管理ポータルにログインします。

NetScaler GUI
  1. Configurationタブより、System -> Diagnostics を選択します。

NetScaler GUI
  1. View Configuration -> Running configuration を選択します。

NetScaler GUI
  1. Save text to a file を選択します。

NetScaler GUI
  1. nsrunning.conf を保存するため、ファイルを保存する を選択し、OK をクリックします。 (OSにより保存ダイアログに違いが生じます)

NetScaler GUI
  1. ファイル名を指定して、保存 を選択します。

  2. 保存したファイルを開き、コンフィグが保存されていることを確認します。

NetScaler GUI

注釈

  • 11.0-67.12からは、NetScalerに対してsshによるログインが可能となっておりますのでsshでログイン後 「show ns runningConfig」と実行いただき、その結果をコピーされる方法も実施可能です。

  • sshによるログイン方法は、NetScaler VPXへのログイン をご参照ください。

  • Windowsのメモ帳でファイルを開いた場合、改行コードの違いにより、表示が崩れてみえる可能性がございますが、設定は保存されております。




NetScaler VPXのコンフィグをリストアするための事前準備

上記で保存したコンフィグファイルをロードバランサーにリストアするために事前の準備を行います。
  1. コンフィグ修正

保存したコンフィグにおいて、ユーザーからの設定を禁止しているコマンド行を削除します。
  • 弊社にて禁止している機能に基づくコマンド行の削除
    • 禁止している機能につきましては、ロードバランサー 詳細情報 の「制約事項」の項目をご覧ください。

    • 主な削除対象につきましては次項にて例を提示しております。 これらの機能に関するコマンドを実行してリストアしようとした場合、「ERROR: Not authorized to execute this command」とのエラー応答がございますので、このエラー応答がある場合には事業者にて変更を禁止している機能であるとご判断ください。

注釈

  • 異なるバージョン間で初期コンフィグに差分が存在するため、異なるバージョン間でコンフィグをリストアする際にエラーが発生する可能性があります。これらの初期コンフィグは、お客様が意図して使用していない場合、システムの動作には影響を与えません。したがって、お客様が個別に設定されたコンフィグレーション以外は、移行せずとも問題ありません。

  • 参考)その他のリストア時の留意点
    • エラーとしては以下のような形式で出ることが多いですのでご参考にしてください。

    • 「ERROR: Feature(s) not licensed」--- ・初期設定としてNetScalerに入っているがご利用中のStandard Editionライセンスではご利用不可なもの

    • 「Warning: Feature(s) not enabled」初期設定としてNetScalerに入っているがお客さまにて機能を有効にしていないもの

    • 「ERROR: Resource already exists」「ERROR: Operation not permitted」「Warning: Current certificate replaces the previous binding」 --- 初期設定としてNetScalerに入っているため再度投入が不要なもの

  1. 1の削除対象サンプル

コンフィグ例

削除対象理由

禁止理由

実行時のレスポンス

set ns config -IPAddress 100.xx.xx.xx -netmask 255.255.240.0

事業者設定済

管理IPはCRUD不可

ERROR: Not authorized to execute this command

add route 0.0.0.0 0.0.0.0 100.xx.xx.xx

事業者設定済

事業者IPのDefaultGatewayはCRUD不可

ERROR: Not authorized to execute this command

add ns acl IN_PROVIDER_MGMT_11 ALLOW -srcIP = 100.xx.xx.xx-100.xx.xx.xx -destIP = 100.xx.xx.xx-100.xx.xx.xx -destPort = xxxx -protocol TCP -interface 0/1 -priority 11 -kernelstate SFAPPLIED61
add ns acl IN_PROVIDER_MGMT_99 DENY -interface 0/1 -priority 99 -kernelstate SFAPPLIED61

事業者設定済

事業者管理NWのACLはCRUD不可

ERROR: Not authorized to execute this command

add ns pbr OUT_PROVIDER_MGMT_11 ALLOW -srcIP = 100.xx.xx.xx-100.xx.xx.xx -destIP = 100.xx.xx.xx-100.xx.xx.xx -destPort = xxxx -nextHop 100.xx.xx.xx -protocol TCP -interface 0/1 -priority 11 -kernelstate SFAPPLIED61
add ns pbr OUT_PROVIDER_MGMT_99 DENY -interface 0/1 -priority 99 -kernelstate SFAPPLIED61

事業者設定済

事業者管理NWのPBRはCRUD不可

ERROR: Not authorized to execute this command

bind ssl service nshttps-100.x.x.x-443 -certkeyName ns-server-certificate

事業者設定済

事業者IPはCRUD不可

ERROR: Not authorized to execute this command

bind ssl service nsrpcs-100.x.x.x-3008 -certkeyName ns-server-certificate

事業者設定済

事業者IPはCRUD不可

ERROR: Not authorized to execute this command

bind ssl service nshttps-100.x.x.x-443 -eccCurveName P_256

事業者設定済

事業者IPはCRUD不可

ERROR: Not authorized to execute this command

bind ssl service nshttps-100.x.x.x-443 -eccCurveName P_384

事業者設定済

事業者IPはCRUD不可

ERROR: Not authorized to execute this command

bind ssl service nshttps-100.x.x.x-443 -eccCurveName P_224

事業者設定済

事業者IPはCRUD不可

ERROR: Not authorized to execute this command

bind ssl service nshttps-100.x.x.x-443 -eccCurveName P_521

事業者設定済

事業者IPはCRUD不可

ERROR: Not authorized to execute this command

bind ssl service nsrpcs-100.x.x.x-3008 -eccCurveName P_256

事業者設定済

事業者IPはCRUD不可

ERROR: Not authorized to execute this command

bind ssl service nsrpcs-100.x.x.x-3008 -eccCurveName P_384

事業者設定済

事業者IPはCRUD不可

ERROR: Not authorized to execute this command

bind ssl service nsrpcs-100.x.x.x-3008 -eccCurveName P_224

事業者設定済

事業者IPはCRUD不可

ERROR: Not authorized to execute this command

bind ssl service nsrpcs-100.x.x.x-3008 -eccCurveName P_521

事業者設定済

事業者IPはCRUD不可

ERROR: Not authorized to execute this command

add system group user-admin-group -timeout 1800

事業者設定済

groupはCRUD不可

ERROR: Not authorized to execute this command

add system group user-read-group -timeout 1800

事業者設定済

groupはCRUD不可

ERROR: Not authorized to execute this command

bind system group provider-group -userName provider-ctrl

事業者設定済

GroupはCRUD不可

ERROR: Not authorized to execute this command

bind system group provider-group -userName provider-dev

事業者設定済

GroupはCRUD不可

ERROR: Not authorized to execute this command

bind system group provider-group -policyName superuser 1

事業者設定済

GroupはCRUD不可

ERROR: Not authorized to execute this command

bind system group provider-ope-group -userName provider-ope

事業者設定済

GroupはCRUD不可

ERROR: Not authorized to execute this command

bind system group provider-ope-group -policyName ProviderOpe-only 10

事業者設定済

GroupはCRUD不可

ERROR: Not authorized to execute this command

bind system group user-admin-group -userName user-admin

事業者設定済

GroupはCRUD不可(重複)

ERROR: User already bound to system group

bind system group user-admin-group -policyName ProviderAccount-deny 10
bind system group user-admin-group -policyName ProviderALL-allow 199

事業者設定済

GroupはCRUD不可

ERROR: Not authorized to execute this command

bind system group user-read-group -userName user-read

事業者設定済

GroupはCRUD不可(重複)

ERROR: User already bound to system group

bind system group user-read-group -policyName ProviderTD-deny 10
bind system group user-read-group -policyName ProviderRead-only 99

事業者設定済

GroupはCRUD不可

ERROR: Not authorized to execute this command

set interface 1/1 -throughput 0 -bandwidthHigh 0 -bandwidthNormal 0 -intftype "KVM Virtio" -ifnum 1/1

事業者設定済

InterfaceはCRUD不可

ERROR: Not authorized to execute this command

set interface 1/2 -throughput 0 -bandwidthHigh 0 -bandwidthNormal 0 -intftype "KVM Virtio" -ifnum 1/2

事業者設定済

InterfaceはCRUD不可

ERROR: Not authorized to execute this command

set interface 1/3 -throughput 0 -bandwidthHigh 0 -bandwidthNormal 0 -intftype "KVM Virtio" -ifnum 1/3

事業者設定済

InterfaceはCRUD不可

ERROR: Not authorized to execute this command

set interface 1/4 -haMonitor OFF -state DISABLED -throughput 0 -bandwidthHigh 0 -bandwidthNormal 0 -intftype "KVM Virtio" -ifnum 1/4

事業者設定済

InterfaceはCRUD不可

ERROR: Not authorized to execute this command

set interface LO/1 -haMonitor OFF -throughput 0 -bandwidthHigh 0 -bandwidthNormal 0 -intftype Loopback -ifnum LO/1

事業者設定済

InterfaceはCRUD不可

ERROR: Not authorized to execute this command

add ns trafficDomain 10 -aliasName user-data-plane

事業者設定済

TDはCRUD不可

ERROR: Not authorized to execute this command

bind ns trafficDomain 10 -vlan 20

事業者設定済

TD/VLANはCRUD不可

ERROR: Not authorized to execute this command

bind ns trafficDomain 10 -vlan 10

事業者設定済

TD/VLANはCRUD不可

ERROR: Not authorized to execute this command

bind ns trafficDomain 10 -vlan 30

事業者設定済

TD/VLANはCRUD不可

ERROR: Not authorized to execute this command

add vlan 10

事業者設定済

VLANはCRUD不可

ERROR: Not authorized to execute this command

add vlan 20

事業者設定済

VLANはCRUD不可

ERROR: Not authorized to execute this command

add vlan 30

事業者設定済

VLANはCRUD不可

ERROR: Not authorized to execute this command

bind vlan 10 -ifnum 1/1

事業者設定済

VLANはCRUD不可

ERROR: Not authorized to execute this command

bind vlan 10 -IPAddress 172.x.x.x 255.255.255.0 -td 10

事業者設定済

VLANはCRUD不可

ERROR: Operation not permitted

bind vlan 20 -ifnum 1/2

事業者設定済

VLANはCRUD不可

ERROR: Not authorized to execute this command

bind vlan 20 -IPAddress 172.x.x.x 255.255.255.0 -td 10

事業者設定済

VLANはCRUD不可

ERROR: Operation not permitted

bind vlan 30 -ifnum 1/3

事業者設定済

VLANはCRUD不可

ERROR: Not authorized to execute this command

bind vlan 30 -IPAddress 172.x.x.x 255.255.255.0 -td 10

事業者設定済

VLANはCRUD不可

ERROR: Operation not permitted

set nd6RAvariables -vlan 1

NetScalerデフォルト値

VLANはCRUD不可

ERROR: Not authorized to execute this command

set ipsec parameter -lifetime 28800

NetScalerデフォルト値

IPSECはCRUD不可

ERROR: Not authorized to execute this command

add route 0.0.0.0 0.0.0.0 172.x.x.x -td 10

事業者設定済

DefaultGatewayはCRUD不可

ERROR: Not authorized to execute this command

set dns parameter -dns64Timeout 1000

NetScalerデフォルト値

DNSはCRUD不可

ERROR: Not authorized to execute this command

add dns nsRec . a.root-servers.net -TTL 3600000
add dns nsRec . m.root-servers.net -TTL 3600000

NetScalerデフォルト値

DNSはCRUD不可

ERROR: Not authorized to execute this command

add dns addRec a.root-servers.net 198.x.x.x -TTL 3600000
add dns addRec m.root-servers.net 202.x.x.x -TTL 3600000

NetScalerデフォルト値

DNSはCRUD不可

ERROR: Not authorized to execute this command




NetScaler VPXのコンフィグをリストアする

注釈

  • コンフィグファイルをリストアするロードバランサーは新規で作成し、インターフェイスがロジカルネットワークに接続されていることを想定しています。

  • 本リストア手順では、保存したコンフィグ設定で上書き投入することを前提としており、古いコンフィグ等が残っている場合は適宜、削除・修正して下さい。

  • インターフェイスに接続されているIPが異なるなど、別アドレスで作成したい場合には、各種IPの設定やロードバランシング関連設定(virutal server,service,server)などの各種設定に含まれるIPアドレスを、変更したいアドレス設計に基づき事前に修正してください。

  • リストアした設定が目的のものであるかを差分確認するため、設定を投入する前に元のコンフィグを手元に保管されることをお勧めいたします。

  • 本手順でSSL証明書を移行することはできません。お客さまにて保管しているSSL証明書は別途、NetScaler VPXにインポートしていただく必要がございます。

  1. ロードバランサー管理ポータルにログインします。

NetScaler GUI
  1. Configurationタブより、System -> Diagnostics を選択します。

NetScaler GUI
  1. Utilities -> Command line interface を選択します。

NetScaler GUI
  1. Command Line Interface (CLI) 画面が表示されます。

NetScaler GUI
  1. 保存したコンフィグから、リストアしたいコマンド行をコピーします。

 (複数コマンド行を一括投入したい場合は、入力するコマンドの後に ; を記載して下さい)
NetScaler GUI

注釈

  • 11.0-67.12からは、NetScalerに対して、sshによるログインが可能となっておりますのでsshでログインし、事前に準備したコンフィグを投入する方法も可能となります。

  • sshでログインしてコンフィグを投入する場合は、複数コマンド行を一括投入することが可能です。 (入力コマンドの後に ; を記載する必要はありません。)

  1. Command Line Interface (CLI) 画面の Command にコピーしたコマンド行を貼り付けて、Go 押下します。

NetScaler GUI
  1. 実行したコマンドが正常に NetScaler VPX に設定されていることを確認します。

 正常にコマンドが設定されるとコマンド行の後に、Done と表示されます。
NetScaler GUI
 お客さまが設定できないコマンド行が含まれている場合は、エラーが表示されますので、再度投入する設定を見直してください。
 エラー例につきましては、ロードバランサーのコンフィグをリストアするための事前準備 をご覧ください。
NetScaler GUI
  1. 設定内容が反映されていることを確認します。

 Configurationタブより、System -> Diagnostics -> View Configuration -> Running configuration と遷移し、表示される Running Configuration と設定前のRunning Configuration を比較して、目的の設定が入っているかをご確認ください。
NetScaler GUI

注釈

  • 11.0-67.12からは、NetScalerに対して、sshによるログインが可能となっておりますのでsshでログイン後 「show ns runningConfig」と実行いただき、その結果を利用する方法も実施可能です。

  • リストア前と後で期待する設定が入っているかコンフィグの差分を確認することを推奨します。8.の段階では、コンフィグは保存されていないため、再起動により設定されたコンフィグはリストア前の状態に戻ります。

  • リストア後のNetScaler VPXの動作確認は、8.のタイミングで行われることをお勧めします。

  1. 設定画面右上の保存ボタンを押下して、コンフィグを保存します。

 (保存ボタン押下後、確認画面がポップアップしますので、Yes を選択してください。)
NetScaler GUI

注釈

  • 11.0-67.12からは、NetScalerに対して、sshによるログインが可能となっておりますので「save ns config」と実行いただき、コンフィグを保存される方法も実施可能です。