Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.

Unterschiede anzeigen Seitenhistorie anzeigen

« Vorherige Version anzeigen Version 16 Nächste Version anzeigen »


Description:

This article describes how the configuration of a LANCOM managed switch can be imported and exported via SCP (Secure Copy). This can be used as a foundation for an automated switch configuration backup.

The procedure for the configuration import / export for an XS series switch via the webinterface is described in this Knowledge Base article.

The procedure for the configuration import / export for an XS series switch via LANconfig is described in this Knowledge Base article.



Requirements:

  • LANCOM managed switch of the following series:
    • GS-23xx 
    • GS-3xxx
    • XS-51xx
  • SSH must be active on the switch 
  • SCP client (e.g. PSCP)
  • Any web browser for accessing the webinterface for saving the configuration as the start configuration (GS-23xx and GS-3xxx) or loading the start configuration (XS series)

PSCP can be downloaded separately, but it is also included in the "Windows Installer" package.



Procedure:

The procedure is basically the same for all switch types. As the different switch series use different file formats for the configuration files, this has to be taken into consideration for the file extension.


GS-23xx series:

1) Saving the switch configuration:

1.1) Start an instance of the Windows command line and go the menu where the tool PSCP is saved. If you installed the PuTTY utilities via the "Windows Installer" package, PSCP can also be run directly.

1.2) Enter the command in the format pscp -P 22 pw <password> -scp <user name>@<IP address>:config C:\Temp\<file name>.xml to save the configuration file in the folder C:\Temp.

In this example the command pscp -P 22 -pw password -scp admin@192.168.45.250:config C:\Temp\configuration.xml was used.

 

The parameter -P 22 makes sure, that the port 22 is used for the SSH connection. If you are using another port it has to be modified accordingly. The parameter -P has to be capitalized.

If you omit the destination folder and only specify the file name (e.g. configuration.xml), the file is saved in the folder, from where PSCP is invoked. 

The configuration file of a GS-23xx series switch has to be saved as XML file.


2) Uploading the switch configuration:

Nach dem Hochladen der Switch-Konfiguration muss diese noch als Start-Konfiguration gespeichert werden.

2.1 Starten Sie eine Instanz der Windows Kommandozeile und wechseln in das Verzeichnis, in dem das Tool PSCP gespeichert wurde. Wenn Sie die PuTTY Utilities über den "Windows Installer" installiert haben, kann PSCP auch direkt ausgeführt werden. 

2.2 Geben Sie den Befehl im Format pscp -P 22 -pw <passwort> -scp C:\Temp\<Datei Name>.xml <Benutzername>@<IP Adresse>:config ein, um die Konfigurations-Datei aus dem Verzeichnis C:\Temp in den Switch hochzuladen.

In diesem Beispiel wurde der Befehl pscp -P 22 -pw password -scp C:\Temp\configuration.xml admin@192.168.45.250:config verwendet.

Der Parameter -P 22 stellt sicher, dass der Port 22 für SSH verwendet wird. Sollten Sie einen anderen Port verwenden, passen Sie diesen entsprechend an. Der Parameter -P muss groß geschrieben werden.

2.3 Verbinden Sie sich mit dem Webinterface des Gerätes, wechseln in das Menü Maintenance → Save/Restore → Save Start und klicken auf Save, um die Konfiguration als Start-Konfiguration zu speichern.

Die Start-Konfiguration bleibt auch nach einem Neustart des Gerätes oder einem Stromausfall erhalten.


GS-3xx series:

1) Saving the switch configuration:

1.1) Start an instance of the Windows command line and go the menu where the tool PSCP is saved. If you installed the PuTTY utilities via the "Windows Installer" package, PSCP can also be run directly.

1.2) Enter the command in the format pscp -P 22 pw <password> -scp <user name>@<IP address>:config C:\Temp\<file name>.lcfsx to save the configuration file in the folder C:\Temp.

In this example the command pscp -P 22 -pw Password123 -scp admin@192.168.45.47:config C:\Temp\configuration.lcfsx was used.

 

The parameter -P 22 makes sure, that the port 22 is used for the SSH connection. If you are using another port it has to be modified accordingly. The parameter -P has to be capitalized.

If you omit the destination folder and only specify the file name (e.g. configuration.lcfsx), the file is saved in the folder, from where PSCP is invoked. 

The configuration file of a GS-3xxx series switch has to be saved as lcfsx file.


2) Uploading the switch configuration:

Nach dem Hochladen der Switch-Konfiguration muss diese noch als Start-Konfiguration gespeichert werden.

2.1 Starten Sie eine Instanz der Windows Kommandozeile und wechseln in das Verzeichnis, in dem das Tool PSCP gespeichert wurde. Wenn Sie die PuTTY Utilities über den "Windows Installer" installiert haben, kann PSCP auch direkt ausgeführt werden. 

2.2 Geben Sie den Befehl im Format pscp -P 22 -pw <passwort> -scp C:\Temp\<Datei Name>.lcfsx <Benutzername>@<IP Adresse>:config ein, um die Konfigurations-Datei aus dem Verzeichnis C:\Temp in den Switch hochzuladen.

In diesem Beispiel wurde der Befehl pscp -P 22 -pw Test12345 -scp C:\Temp\configuration.lcfsx admin@192.168.45.180:config verwendet.

Der Parameter -P 22 stellt sicher, dass der Port 22 für SSH verwendet wird. Sollten Sie einen anderen Port verwenden, passen Sie diesen entsprechend an. Der Parameter -P muss groß geschrieben werden.

2.3 Klicken Sie rechts oben auf das Disketten-Symbol, um die Konfiguration als Start-Konfiguration zu speichern.

Die Start-Konfiguration bleibt auch nach einem Neustart des Gerätes oder einem Stromausfall erhalten.

2.4 Bestätigen Sie die Abfrage mit einem Klick auf Ok.


XS-51xx series:

1) Saving the switch configuration:

1.1) Start an instance of the Windows command line and go the menu where the tool PSCP is saved. If you installed the PuTTY utilities via the "Windows Installer" package, PSCP can also be run directly.

1.2) Enter the command in the format pscp -P 22 pw <password> -scp <user name>@<IP address>:config C:\Temp\<file name>.cfg to save the configuration file in the folder C:\Users\...\Documents.

In this example the command pscp -P 22 -pw Test12345 -scp admin@172.23.56.224:config C:\Users\...\Documents\configuration.cfg was used.

The parameter -P 22 makes sure, that the port 22 is used for the SSH connection. If you are using another port it has to be modified accordingly. The parameter -P has to be capitalized.

If you omit the destination folder and only specify the file name (e.g. configuration.cfg), the file is saved in the folder, from where PSCP is invoked. 

The configuration file of an XS-51xx series switch has to be saved as cfg file.


2) Uploading the switch configuration:

Nach dem Import der Konfiguration als Startup Configuration muss diese noch aktiv geschaltet werden. Dazu muss die Konfiguration neu geladen oder alternativ der Switch neugestartet werden.

Wenn eine Konfigurations-Sicherung mit Stacking-Einstellungen importiert wird, muss anschließend zwingend ein Neustart des Gerätes erfolgen, damit die Einstellungen übernommen werden.

Einen Neustart können Sie z.B. im Webinterface in dem Menü System → Utilities → System Reboot vornehmen.

2.1 Starten Sie eine Instanz der Windows Kommandozeile und wechseln in das Verzeichnis, in dem das Tool PSCP gespeichert wurde. Wenn Sie die PuTTY Utilities über den "Windows Installer" installiert haben, kann PSCP auch direkt ausgeführt werden. 

2.2 Geben Sie den Befehl im Format pscp -P 22 -pw <passwort> -scp C:\Users\...\Downloads\Backup\<Datei Name>.cfg <Benutzername>@<IP Adresse>:startup-config ein, um die Konfigurations Datei aus dem Verzeichnis C:\Users\...\Downloads\Backup als Start-Konfiguration in den Switch hochzuladen.

In diesem Beispiel wurde der Befehl pscp -P 22 -pw Test12345 -scp C:\Users\...\Downloads\Backup\XS-5110-configuration.cfg admin@192.168.45.148:startup-config verwendet.

Der Parameter -P 22 stellt sicher, dass der Port 22 für SSH verwendet wird. Sollten Sie einen anderen Port verwenden, passen Sie diesen entsprechend an. Der Parameter -P muss groß geschrieben werden.

Alternativ kann die Konfiguration mit dem Parameter :config anstatt :startup-config auch als aktuelle Konfiguration hochgeladen werden. In diesem Fall muss diese noch über die Schaltfläche Save Configuration rechts oben im Webinterface als Start-Konfiguration gespeichert werden.

2.3 Wechseln Sie in das Menü System → Configuration Storage → Reload.

2.4 Klicken Sie auf die Schaltfläche Reload, damit die Start-Konfiguration aktiv geschaltet wird.

Alternativ kann dieser Vorgang auch auf der Konsole mit dem Befehl reload configuration durchgeführt werden.




  • Keine Stichwörter