Apstra ZTP - ジュニパー
EXスイッチにはJunos OSバージョン21.2以上が必要です。21.2 未満の Junos OS バージョンを使用している EX スイッチでは、ZTP に必要な Python モジュールがありません。
ジュニパーとZTPのディスク容量
Apstra ZTPは、ジュニパーJunosデバイスのブートストラップとライフサイクルを管理します。カスタムスクリプトを使用して、オフボックスエージェントを作成し、ローカルユーザーを作成し、他のシステム構成を設定します。ZTP プロセスは、新しい OS イメージをスイッチにコピーします。Apstra ZTPをインストールする前に、スイッチにOSイメージに十分なディスク容量があることを確認してください。
root@leaf001-001-2> show system storage Filesystem Size Used Avail Capacity Mounted on /dev/gpt/junos 6.0G 1.0G 4.5G 18% /.mount <...>
例:Juniper Junos - ztp.json
ジュニパーJunosオフボックスエージェント/ Apstra ZTP 4.1
{ "junos": { "junos-versions": [ "20.2R2-S3.5" ], "junos-image": "http://192.168.59.4/jinstall-host-qfx-5-20.2R2-S3.5-signed.tgz", "device-root-password": "root-password", "device-user": "admin", "device-user-password": "admin-password", "custom-config": "junos_custom.sh", "system-agent-params": { "platform": "junos", "agent_type": "offbox", "job_on_create": "install" } } }
例:Juniper Junos OS Evolved - ztp.json
ジュニパー Junos OS Evolvedオフボックスエージェント/ Apstra ZTP 4.1
{ "junos-evo": { "junos-evo-versions": [ "20.4R3-S1.3-EVO" ], "junos-evo-image": "http://192.168.59.4/junos-evo-install-qfx-ms-fixed-x86-64-20.4R3-S1.3-EVO.iso", "device-root-password": "root-password", "device-user": "admin", "device-user-password": "admin-password", "custom-config": "junos_custom.sh", "system-agent-params": { "platform": "junos", "agent_type": "offbox", "job_on_create": "install" } } }
PTX10004 などのデュアル RE プラットフォームには、以下の追加フィールドを使用できます。
"dual-routing-engine": true, "management-ip": "10.161.37.7", "management-gw-ip": "10.161.39.254", "management-subnet-prefixlen": "21", "management-master-ip": "10.161.37.8", "management-backup-ip": "10.161.37.9",
ジュニパーJunosブートストラップファイル
Apstra ZTPは、ZTP中にPythonスクリプトを使用してデバイスをプロビジョニングします。Junos OS Evolvedされていないデバイスで Python スクリプト(ztp.py
)を実行できるようにするには、追加の設定が必要です。このスクリプトを junos_apstra_ztp_bootstrap.sh
使用して、JunosでApstra ZTPをブートストラップします。ZTP スクリプトをダウンロードして実行します。
Junos OS Evolvedデバイスには、このブートストラップは必要ありません。Apstra ZTP Pythonスクリプト(ztp.py)を直接実行します。
ジュニパーJunosカスタム設定ファイル
Juniper Junosデバイスを設定する custom-config
場合は、ZTPプロセス中に実行されるbash実行可能ファイルの例 junos_custom.sh
を参照してください。デバイス システム エージェントをインストールする前に、システム設定(Syslog、NTP、SNMP 認証など)を設定できます。
デュアル RE 設定の Junos OS および Junos OS Evolved プラットフォームでは、 コマンドが set system commit synchronize
必要です。この設定がない場合、ZTP プロセスは失敗します。コマンドをファイルに junos_custom.sh
追加することをお勧めします。
#!/bin/sh SOURCE_IP=$(cli -c "show conf interfaces em0.0" | grep address | sed 's/.*address \([0-9.]*\).*/\1/') # Syslog SYSLOG_SERVER="192.168.59.4" SYSLOG_PORT="514" # NTP NTP_SERVER="192.168.59.4" # SNMP SNMP_NAME="SAMPLE" SNMP_SERVER="192.168.59.3" # Syslog cli -c "configure; \ set system syslog host $SYSLOG_SERVER any notice ; \ set system syslog host $SYSLOG_SERVER authorization any ; \ set system syslog host $SYSLOG_SERVER port $SYSLOG_PORT ; \ set system syslog host $SYSLOG_SERVER routing-instance mgmt_junos ; \ commit and-quit" cli -c "configure; \ set system syslog file messages any notice ; \ set system syslog file messages authorization any ; \ commit and-quit" # NTP cli -c "configure; \ set system ntp server $NTP_SERVER routing-instance mgmt_junos ; \ set system ntp source-address $SOURCE_IP routing-instance mgmt_junos ; \ commit and-quit;" # SNMP cli -c "configure; \ set snmp name $SNMP_NAME; \ set snmp community public clients $SNMP_SERVER/32 ; \ set snmp community public routing-instance mgmt_junos ; \ set snmp routing-instance-access access-list mgmt_junos ; \ commit and-quit"
外部AAA認証(など authentication-order
)を設定した場合、デバイスシステムエージェント device-user
と device-user-password
AAAシステムで複製します。それ以外の場合、デバイス システム エージェントは認証エラーを生成します。
Juniper Junos ZTP を再起動する
デバイスを消去(ゼロ化)し、Juniper Junos ZTPプロセスを再起動するには、次の手順に従います。
root@leaf3> request system zeroize
ジュニパー Junos ZTP のトラブルシューティング
ZTPモードの場合、ジュニパースイッチは ztp.py
、 および ztp.json
ファイルをディレクトリに /var/preserve/apstra
ダウンロードします。診断の場合は、ファイルをメモします /var/preserve/apstra/aosztp.log
。
その他の有用なメッセージは、(「ztp」を検索)で /var/log/messages
見つけることができます。