Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts
1
Posted byJNCIS-SSL,SEC,M/T/MX,FWV3 months ago

(how to) Upgrade code on a 2960x?

Hey /r/networking!

So, my first time upgrading code on a cisco switch (single device in our lab/staging area). I've read a bunch of different ways to do this, and all seem to offer conflicting or assuming someone would know additional information.

I've downloaded the code to install (c2960x-universalk9-mz.152-2.E7.bin), and I have the tftp server running on my workstation. I'm just wanting to make sure I do this right.

Could someone give me a quick step-by-step guide I can walk through to make sure I don't hork it?

29 comments
54% Upvoted
What are your thoughts? Log in or Sign uplog insign up
level 1

Very easy to do:

  • copy tftp:<file name> flash:<file name>

  • ip of tftp server

  • enter to keep file name same in flash

Once copied:

  • config t

  • boot system flash:<file name>

  • exit

  • write mem

  • reload

Switch will boot to new IOS, and you can remove the old IOS from flash after it boots up.

level 2
JNCIS-SSL,SEC,M/T/MX,FWVOriginal Poster1 point · 3 months ago

That's gloriously easy... wish that other walkthrough pages were that simple.

Thank you!

level 3

You’re welcome!

level 4
JNCIS-SSL,SEC,M/T/MX,FWVOriginal Poster1 point · 3 months ago

Question - do the 2960x's support USB copy of code files? I couldn't find much on the CLI or online that supports it; I can see the USB drive when I plug it in, just can't figure out how to copy or show a file list on it.

level 5

actually they do!

copy usbflash0:/image.bin flash:

level 6

Was this changed at some point in the 15.2 train? Haven’t tried it since 15.0, and it didn’t work back then. Awesome if they did add this.

level 7
CCNP R&S / CCNA Security1 point · 3 months ago

They've had it for a while now actually; if it's got a USB Type A port you can copy the file over. Been doing it for ages with our 3750Xs.

level 6
JNCIS-SSL,SEC,M/T/MX,FWVOriginal Poster1 point · 3 months ago

well, shit it does... at least on the version I'm on now, I swore it wasn't there before... :: shrug ::

level 5

Yeah USB is much easier and 2960x is one of the easiest switches to upgrade.

level 5

No, they don’t. They support using a USB cable in place of the standard console cable, but they don’t mount a USB flash directory like the 3850 or 4500X to copy to onboard flash.

level 6
JNCIS-SSL,SEC,M/T/MX,FWVOriginal Poster1 point · 3 months ago

glar... I figured that was the answer.

So I'm doing the xfer now - this looks ... odd to me... ?

122185728 bytes total (98652160 bytes free)

ModelOp-2960#copy tftp flash:

Address or name of remote host []? 10.5.5.25

Source filename []? c2960x-universalk9-mz.152-2.E7.bin

Destination filename [c2960x-universalk9-mz.152-2.E7.bin]?

Accessing tftp://10.74.5.50/c2960x-universalk9-mz.152-2.E7.bin...

Loading c2960x-universalk9-mz.152-2.E7.bin from 10.5.5.25 (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!OOOOOOOOOOOOOOO!!!!!!!!!

level 7

Is there an issue with communicating with the tftp server? Looks like it continued eventually. If it fails, you may want to make sure there is enough space in flash for the new file.

level 8
JNCIS-SSL,SEC,M/T/MX,FWVOriginal Poster2 points · 3 months ago

Sorry for keeping this going - the MD5 hash checked out, and I'm reloading the switch after setting the boot system file. Thanks for the help on this again, hopefully all is good now :)

level 9

You’re welcome - happy to help!

level 8
JNCIS-SSL,SEC,M/T/MX,FWVOriginal Poster1 point · 3 months ago

it's still going, it's been xferring for the last 45 minutes... which shouldn't be me thinks. the devices are all on the same physical LAN, and routing is all there, so not sure why it's running so damn slow.

one thing I saw said to delete the old code before tftp'ing the new... if this fails, I'll try that next.

level 9

I wouldn’t do that. The 2960X can easily hold two versions. That was really only an issue on the 3750G, 3750V2.

Yes, that is a long time on what I assume is a 1G LAN.

level 10
JNCIS-SSL,SEC,M/T/MX,FWVOriginal Poster1 point · 3 months ago

so I killed the TFTP server and restarted it - either it was mostly done, or it grabbed and finished it fast. gonna MD5 that thing to confirm.

level 10

If something goes sideways, you can always just boot an image on the flash drive from rommon and then attempt the copy again.

level 6

Then we've been doing it wrong because we copy our IOS files over from a flash drive all the time.

level 2

I’d add that if they are in stack you can reduce downtime and pre copy the image to all the slave flashes instead of letting it do it during boot.

Show switch to find the master.

Copy flash:file flash2:file

Replacing the 2 for each switch number not the master.

level 1

Personally, I like the archive command:

archive download-sw { /directory | /force-reload | /imageonly | /leave-old-sw | /no-set-boot | /no-version-check | /destination-systemstack-member-number | /only-system-typesystem-type | /overwrite | /reload | /safe} source-url

level 2

Examples help:

archive download-sw /overwrite tftp://172.20.129.10/test-image.tar

level 2
JNCIS-SSL,SEC,M/T/MX,FWVOriginal Poster1 point · 3 months ago

Could you simplify this a bit? If we wanted to run the command on a remote switch to have it download the upgrade file, write mem, then reload on the new version?

level 3

archive download-sw /overwrite /reload tftp://172.20.129.10/test-image.tar

level 4
JNCIS-SSL,SEC,M/T/MX,FWVOriginal Poster1 point · 3 months ago

Bless you good sir (ma'am?)! much appreciated!

level 5

Make sure you save your config before you run it. Otherwise I think the reload aborts.

level 6
JNCIS-SSL,SEC,M/T/MX,FWVOriginal Poster1 point · 3 months ago

right - write mem and backup external copy before going forward! :)

level 1

FWIW, http will usually transfer quicker than tftp, but you need a webserver to host the bin. example: copy http://10.5.5.25/c2960x-universalk9-mz.152-2.E7.bin flash:

level 2
JNCIS-SSL,SEC,M/T/MX,FWVOriginal Poster1 point · 3 months ago

hmm... good to know!

Community Details

131k

Subscribers

1.1k

Online

###Enterprise Networking Routers, switches and firewalls. Network blogs, news and network management articles. Cisco, Juniper, Brocade and more all welcome.

Create Post
r/networking Rules
1.
Rule #1: No Home Networking.
2.
Rule #2: No Certification Brain Dumps / Cheating.
3.
Rule #3: No BlogSpam / Traffic re-direction.
4.
Rule #4: No Low Quality Posts.
5.
Rule #5: No Early Career Advice.
6.
Rule #6: Educational Questions must show effort.
Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.