Cisco Devices arbeiten bekanntlich mit der "running-config". Als Admin hält man sich bei komplexen Änderungen gerne mal das Hintertürchen offen, die Konfiguration nicht zu speichern um im Notfall einfach das Device zu booten und so die "startup-config" wieder zu laden.
Was in der Regel nichts bringt, ist der Befehl "copy startup-config running-config". In diesem Fall werden die beiden Configs nur gemerged, nicht ersetzt!!!
Um die Startup-Config wirklich zu laden, müsste man eigentlich das Gerät rebooten. Da ein Reboot aber schon mal ein paar Minuten dauern kann und endgültig zu einem Totalausfall führt, gibt es auch eine viel bessere und schnellere Methode; nämlich den Befehl
"CONFIGURE REPLACE"Hier ein kleines Beispiel dazu:TestRouter#show running-config interface FastEthernet 5
Building configuration...
Current configuration : 54 bytes
!
interface FastEthernet5
description ***ABC***
endin der Running-Config ist am Interface eine Description gesetztTestRouter#show startup-config
...
!
interface FastEthernet5
!
... in der Startup-Config ist keine Description gesetzt Nun kopieren wir die Startup- in die Running-Config TestRouter#copy startup-config running-config
Destination filename [running-config]?
2987 bytes copied in 0.496 secs (6022 bytes/sec)
TestRouter#
TestRouter#show running-config interface FastEthernet 5
Building configuration...
Current configuration : 54 bytes
!
interface FastEthernet5
description ***ABC***
end
TestRouter# Obwohl die Startup-Config geladen wurde, ist die Description immer noch vorhanden. Die beiden Configs wurden nur gemergedUnd nun der selbe Versuch mit dem configure replace CommandTestRouter#configure replace nvram:startup-config
This will apply all necessary additions and deletions
to replace the current running configuration with the
contents of the specified configuration file, which is
assumed to be a complete configuration, not a partial
configuration. Enter Y if you are sure you want to proceed. ? [no]: Y
Sep 13 19:11:09.295: Rollback:Acquired Configuration lock.
Sep 13 19:11:14.479: %PARSER-3-CONFIGNOTLOCKED: Unlock requested by process '3'. Configur.
TestRouter#
TestRouter#
TestRouter#show running-config interface FastEthernet 5
Building configuration...
Current configuration : 31 bytes
!
interface FastEthernet5
end
TestRouter#Wie man sieht wurde in diesem Fall die Running-Config wirklich vollständig durch die Startup-Config ersetzt!
Die neue Konfiguration wird tatsächlich so geladen, wie es auch bei einem Reboot der Fall wäre.
Natürlich können auch Konfigurationen von externen Quellen auf diese Weise geladen werden: TestRouter#configure replace ?
archive: URL of config file that will replace running-config
cns: URL of config file that will replace running-config
flash: URL of config file that will replace running-config
ftp: URL of config file that will replace running-config
http: URL of config file that will replace running-config
https: URL of config file that will replace running-config
null: URL of config file that will replace running-config
nvram: URL of config file that will replace running-config
pram: URL of config file that will replace running-config
rcp: URL of config file that will replace running-config
scp: URL of config file that will replace running-config
system: URL of config file that will replace running-config
tar: URL of config file that will replace running-config
tftp: URL of config file that will replace running-config
xmodem: URL of config file that will replace running-config
ymodem: URL of config file that will replace running-config
TestRouter#Ich denke, wer diesen Befehl kennt, wird einen Reboot nicht mehr so schnell in Erwägung ziehen

Viel Spaß damit!