Jun
10

In this short video I outline how to use the Configuration Rollback and Replace feature, which can save you a great deal of time when you’re switching between blank configs or initial configurations for INE’s CCIE Routing & Switching Version 5 Workbook.

About Brian McGahan, CCIE #8593, CCDE #2013::13:

Brian McGahan was one of the youngest engineers in the world to obtain the CCIE, having achieved his first CCIE in Routing & Switching at the age of 20 in 2002. Brian has been teaching and developing CCIE training courses for over 10 years, and has assisted thousands of engineers in obtaining their CCIE certification. When not teaching or developing new products Brian consults with large ISPs and enterprise customers in the midwest region of the United States.

Find all posts by Brian McGahan, CCIE #8593, CCDE #2013::13 | Visit Website


You can leave a response, or trackback from your own site.

18 Responses to “Using Config Replace For Managing Router & Switch Initial Configs”

 
  1. Comment says:

    It’s nice, but it doesn’t work with VLAN configuration. It can’t replace/remove VLANs :/

  2. Chad Stambaugh says:

    I learn something every time… haha. I had no idea you could drag/drop ascii. I was using tftp to bring my initials into the router to save right to flash.

  3. Roger Perkin says:

    Awesome tips Brian!

    I was looking for a slick way to get the configs into the routers and was fed up with opening the file select all / copy paste etc.

    I never know about the Send AscII feature in SecureCRT

    I am using it all the time now, even using it at work!

    Roger

  4. Alex says:

    Hi,

    How are you managing the device? I assume this is CSR1000v. But if you do replace config you will lose the management config( vrf or whatever) because the management config is not in initial config.
    Or am I missing something?

  5. Mohamed A. Monsef says:

    Nice to put a spot in this one as no more people Knows, I knew about it from work experience. and also a good behaviour is to install the all pre-config and lock them down in your racks and the students can load the pre-config will make it faster and manageable .

    Another sport is to save the running config as .txt file in the flash and then use the more option to read the file in case you are doing some changes in the router and need to verify the old configuration before saving you updates.

    at the Thanks Brian for everything.

  6. Murad says:

    This command is very handy in troubleshooting as well. if we do something that break other things, with this all the config can be replaced quickly.

    Thanks Brian for talking about.

    Murad

  7. Paul says:

    How would you tftp all the files on to the ine routers?

    • You’d have to extract the zip local, create a tarball of it, tftp it to the router’s flash, and then extract the tarball. In the case of rack rentals it would be quicker just to use our automation system for this but if you have a home lab the tftp solution is an option.

  8. David Jones says:

    Hi Brian

    Excellent tip. I wanted to go one stage further with this. I created the tarball and TFTP’d it to all 10 routers. There is only one downfall with this – all the router device names remain, and obviously you cannot then do the “send to all devices” because you can’t copy R1.cfg to 10 devices… :)

    So – I was wondering if you knew if you could called the hostname of the router as a reference.

    For example

    copy flash:ine.configs/initial.ospf/.cfg

    where then calls the hostname, thus R1 calls R1.cfg.

    Is this possible? The other way of doing this would be to script it on a linux host to create 10 seperate copies of all the files but instead of having R1-R10.cfg in each folder, you just have one file name, so for the R1 version it would just be… config.cfg and then it would result in the one command being issued to the SecureCRT command line…

    Or am I spending way too much time thinking about this? :)

    • Yes you can do this in TCL but I don’t know the syntax offhand.

    • adel mezibra says:

      I have a workaround for that:

      what i did is i created a base config with tftp server access (say via gi3)
      each routers get IP address 10.1.1.y (where y is Ry)

      the centos and ubuntu default tftpserver (tftpd-hpa) has a nice remap feature.

      # /usr/sbin/in.tftpd –version
      tftp-hpa 0.49, with remap, with tcpwrappers

      change you /etc/xinetd.d/tftp server_args line to match :

      server_args = -c -s /var/lib/tftpboot -m /etc/tftpd.map

      and create a tftpd.map file :
      # cat /etc/tftpd.map
      r myconfig.txt \i.txt

      what this do essentially is whenever you request a file named myconfig.txt with :

      copy tftp://10.1.1.100/whatever_lab_path/myconfig.txt running.

      it will server for Ry the file name 10.1.1.y.txt.

      so you just need to rename your file R1 to 10.1.1.1.txt , R2 10.1.1.2.txt
      etc..

      you can easily do that on shell with :
      cd
      rename R1.txt 10.1.1.1.txt `find . -name ‘*.txt’`
      ..

      so to launch a given lab the process is simple :
      launch the transient basic config with tftp access

      config replace flash:basic.tftp force
      copy tftp://10.1.1.100/labX/myconfig.txt running

      PS: if some of your file are not ASCII encoded (^M in them) run:
      iconv -c -f UTF-16LE -t ASCII ripng.initial/10.1.1.10.txt -o ripng.initial/10.1.1.10.txt
      they will then load properly.

  9. David Jones says:

    should read

    For example

    copy flash:ine.configs/initial.ospf/–variable–.cfg

    where –variable– then calls the hostname, thus R1 calls R1.cfg.

  10. Gary says:

    Can the “Send ASCII” command also be used in Putty client when dragging the config file from folder to the routers / switches or only this feature works in SecureCRT?

  11. Venkata Dendukuri says:

    Hi Brian,
    Thanks for awesome tips, Please clarify me one more doubt.
    if i build my own lab as per ccie v5 INE blueprint, and i wanted to change all routers configuration to default or each advanced technology labs without wasting much time, How should i go about it

    Please reply
    Regards,
    Venkata

 

Leave a Reply

Categories

CCIE Bloggers