05-03-2023 02:31 AM
Hi all
I would load to add a specific configuration from a txt-file to a running Cisco Nexus 3600/9000 switch. Not overwriting the whole current configuration, but add the configuration from the configuration file.
For example, I have a running nexus with some VLANs and interfaces configured and my config.txt is something like this:
interface Ethernet1/5
switchport trunk allowed vlan remove 1234
interface Ethernet1/6
switchport trunk allowed vlan remove 2222
no vlan 1234
no vlan 2222
Now I like to "execute" this config.txt, instead of copy-past it to "conf t". The reason I like to do this is that I have to add a large configuration to a lot of Nexus switches. And I like to avoid mistakes by copy-past. Of course I can use something like ansible, but it's a one-time-thing that I have to do, so the way over a config.txt would be the best way to do it.
Is this possible on NXOS?
05-03-2023 05:12 AM - edited 05-03-2023 05:14 AM
Hello @schwarzenbachcyb,
The correct command to add specific configuration from a txt-file to a running Cisco Nexus 3600/9000 switch without overwriting the entire current configuration is the "configure replace" command with the "force" option.
The "configure replace" command allows you to merge new configuration into the running configuration of the switch without overwriting the entire configuration. The "force" option allows the merge to occur even if there are errors or warnings in the new configuration.
Nexus 9000 series:
05-03-2023 06:22 AM
are you 100% sure?
But you links are helpful.
05-03-2023 09:42 PM
Do yo follow the official documentation?
05-05-2023 01:26 AM
Try this:
# copy bootflash:config.txt running-config
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide