Apstra ZTP – Cisco
Cisco NX-OS und ZTP Festplattenspeicher
Stellen Sie sicher, dass ausreichend Festplattenspeicher auf dem Switch verfügbar ist. Als Teil des ZTP-Prozesses wird ein neues Betriebssystem-Image auf den Switch kopiert. Stellen Sie vor der Installation von Apstra ZTP sicher, dass der Switch über ausreichend Speicherplatz für das Betriebssystem-Image verfügt.
switch1# dir bootflash: | include free|total 1296171008 bytes free 3537219584 bytes total
Wenn ZTP das Cisco NX-OS-Image installiert, müssen Sie das Image (z. B. nxos.7.0.3.I7.7.bin) in das /containers_data/tftp
Verzeichnis kopieren, um die richtigen Dateiberechtigungen zu gewährleisten.
Beispiel: Cisco NX-OS – ztp.json
{ "nxos": { "nxos-versions": [ "9.2(2)" ], "nxos-image": "http://192.168.0.6/nxos.9.2.2.bin", "device-root-password": "admin-password", "custom-config": "nxos_custom.sh", "device-user": "admin", "device-user-password": "admin-password", "system-agent-params": { "agent_type": "onbox", "job_on_create": "install" } } }
Diese Konfiguration ermöglicht einen sicheren Offbox-Agent HTTPS (Port 443) zwischen dem Offbox-Agent auf dem Server und der Geräte-API.
Cisco NX-OS Custom Config File
Bei der Konfiguration custom-config
für Cisco NX-OS-Geräte finden Sie im Beispiel nxos_custom.sh
eine ausführbare Bash-Datei, die während des ZTP-Prozesses ausgeführt wird. Es kann NX-OS-Konfigurationsbefehle ausführen, die die Systemkonfiguration festlegen, z. B. das SSH-Anmeldebanner, vor der Installation des Gerätesystemagenten.
Sie müssen über die NX-OS custom-config-Datei hinzufügen copp profile strict
.
#!/bin/sh /isan/bin/vsh -c "conf ; copp profile strict ; banner motd ~ ######################################################## BANNER BANNER BANNER BANNER BANNER BANNER BANNER BANNER ######################################################## Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec gravida, arcu vitae tincidunt sagittis, ligula massa dignissim blah, eu sollicitudin nisl dui at massa. Aliquam erat volutpat. Vitae pellentesque elit at pulvinar volutpat. Etiam lacinia derp lacus, non pellentesque nunc venenatis rhoncus. ######################################################## ~"
Cisco NX-OS Offbox Agent Custom Config File
Wenn Sie Apstra ZTP verwenden, um ein Cisco NX-OS-Gerät für die Verwendung mit Offbox-Agenten vorzubereiten, müssen Sie über die benutzerdefinierte Konfigurationsdatei die folgenden NX-OS-Konfigurationsbefehle aktivieren.
feature nxapi feature bash-shell feature scp-server feature evmed copp profile strict nxapi http port 80
Sie können folgendes nxos_custom.sh
verwenden, um diese zusammen mit einem Banner hinzuzufügen.
#!/bin/sh /isan/bin/vsh -c "conf ; feature nxapi ; nxapi http port 443 ; feature bash-shell ; feature scp-server ; feature evmed ; copp profile strict ; banner motd ~ ######################################################## BANNER BANNER BANNER BANNER BANNER BANNER BANNER BANNER ######################################################## Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec gravida, arcu vitae tincidunt sagittis, ligula massa dignissim blah, eu sollicitudin nisl dui at massa. Aliquam erat volutpat. Vitae pellentesque elit at pulvinar volutpat. Etiam lacinia derp lacus, non pellentesque nunc venenatis rhoncus. ######################################################## ~"
Cisco NX-OS ZTP neu starten
Wenn ein Agent bereits auf dem Gerät installiert ist, entfernen Sie den ZTP-Prozess vor dem Neustart des Geräts entweder über das Installationsprogramm für Den Geräteagenten der Benutzeroberfläche oder manuell über die Geräte-CLI.
C9K-172-20-65-5# guestshell destroy Remove remaining AOS data from system Removing the guest-shell deletes most of the data left by AOS. Some files are still on the bootflash:/.aos folder. C9K-172-20-65-5# delete bootflash:.aos no-prompt
Weitere Informationen finden Sie unter Cisco Geräteagenten .
So starten Sie den Cisco NX-OS ZTP-Prozess neu:
switch# write erase switch# reload