Today I stumbled on a problem that I wanted to replace VPN names in my whole config on CSR1000v.
Instruction on how to do it I’ve found on invaluable Ivan Pepelnjak’s blog:
http://blog.ipspace.net/2008/01/copy-text-files-into-router-flash.html
Basically I created a file in Notepad++, replaced what I wanted then I copied the new content to new file on flash via ssh session using the instruction in the link provided above e.g.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
CSR1000v-1(tcl)#puts [open "flash:new-running-config" w+] { +>Current configuration : 9362 bytes +>! +>! Last configuration change at 23:43:47 UTC Mon Mar 16 2015 +>! +>version 15.4 +>service timestamps debug datetime msec +>service timestamps log datetime msec +>no platform punt-keepalive disable-kernel-core +>platform console virtual +>! +>hostname CSR1000v-1 +>! +>boot-start-marker +>boot-end-marker +>! +>! +>vrf definition VPN1 +> description "MPLS PE1" +> rd 65100:1 +> ! +> address-family ipv4 +> route-target export 65100:1 +> route-target import 65100:1 +> exit-address-family +> ! +> address-family ipv6 +> exit-address-family +>! |
Afterwards I just replaced current config with the one in file:
1 |
configure replace flash:new-running-config |
And voila!