Steve Borba

My notes, I hope they help you, feel free to comment/add to them

Catalyst Deploy

I needed to deploy a bunch of catalysts recently and found out that you can do some of that by using the catalyst as an SCP server!

First we need to turn the feature on (well, also need to have the ability to SSH to it also)

conf t
  ip scp server enable
  end
wr

First thing I am going to do is backup the config

for /l %a in (31,1,42) do pscp -scp -pwfile pw.txt user@192.0.2.%a:startup-config %a-start.txt
for /l %a in (31,1,42) do pscp -scp -pwfile pw.txt user@192.0.2.%a:running-config %a-run.txt

We should also grab the license level, serials and whatnot from “show ver” (this doesn’t need scp server)

for /l %a in (31,1,42) do plink -pwfile pw.txt -batch user@192.0.2.%a show ver

Now we can copy the code to the boxes

for /l %a in (31,1,42) do start pscp -scp -pwfile pw.txt c:\TFTP-Root\tftp\cat9k_lite_iosxe.17.03.04b.SPA.bin user@192.0.2.%a:bootflash:/cat9k_lite_iosxe.17.03.04b.SPA.bin

Next we install the code

for /l %a in (31,1,42) do start plink -pwfile pw.txt -batch user@192.0.2.%a install add file bootflash:cat9k_lite_iosxe.17.03.04b.SPA.bin activate commit prompt-level none

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>