Tuesday, May 25, 2021

netmiko Cisco ASR config replace

I want to upload a modified config to a Cisco ASR (IOS-XR) and do a 'config replace' to replace the whole running config. I have the config on the router but I need to run the config replace command with netmiko and wondering if someone has already figured out the relevant netmiko commands for this sequence so I can re-use them?

The manual process looks like this:

RP/0/RP0/CPU0:ASR-Router1#conf t Tue May 25 05:18:59.211 UTC RP/0/RP0/CPU0:ASR-Router1(config)#load disk0:modified-config Loading. 2611 bytes parsed in 1 sec (2603)bytes/sec RP/0/RP0/CPU0:ASR-Router1(config)#commit replace Tue May 25 05:21:14.750 UTC This commit will replace or remove the entire running configuration. This operation can be service affecting. Do you wish to proceed? [no]: y RP/0/RP0/CPU0:ASR-Router1(config)# 

Thanks



No comments:

Post a Comment