basics | defaults | fw | init | lacp | passwords | setup | ssh
what model?
show version | include Model number
eventually check official sources – or search around…
here’s a few resulting firmwares & hashes
also worth a look:
Cisco IOS Software : Retired Releases and Scheduled to be Retired Releases https://www.cisco.com/web/software/SPRIT/swretirement/IOSRetirementTable.html
you need a management ip for that
interface vlan1 no shutdown ip address 10.7.7.203 255.255.255.0 ip route-cache
check your current firmware version
show version | include Version show version | include flash:
allow uploads on your TFTP server with -v -c
apt install tftpd-hpa tftp # tftpd cp -pi /etc/default/tftpd-hpa /etc/default/tftpd-hpa.dist vi /etc/default/tftpd-hpa TFTP_USERNAME="tftp" TFTP_DIRECTORY="/tftpboot" TFTP_ADDRESS="0.0.0.0:69" TFTP_OPTIONS="-4 --secure -v -c" mkdir -p /tftpboot/upload/ chmod 777 /tftpboot/upload/ chmod +t /tftpboot/upload/ systemctl restart tftpd-hpa netstat -lntup | grep :69
make sure you do not have a system firewall blocking the interface your are playing on
iptables -nvL nft list ruleset # here -I not -A #iptables -I INPUT -i eth0 -j ACCEPT #iptables -I OUTPUT -o eth0 -j ACCEPT
validate from the host system or ideally remotely already
cd ~/ ls -lF .vimrc ifconfig eth0 tftp 10.7.7.201 put .vimrc upload/.vimrc ^D ls -alF /tftpboot/upload/ rm -f /tftpboot/upload/.vimrc ping -c1 10.7.7.203
and upload the current firmware from the switch
ping 10.7.7.201 copy flash:c2950-i6q4l2-mz.121-22.EA12.bin tftp://10.7.7.201/upload/c2950-i6q4l2-mz.121-22.EA12.bin ping x.x.x.x copy flash:c2960-lanbasek9-mz.122-50.SE3.bin tftp://x.x.x.x/upload/c2960-lanbasek9-mz.122-50.SE3.bin
sort things out and keep them for reference
ls -alF /tftpboot/upload/ chown root:root /tftpboot/upload/* chmod 644 /tftpboot/upload/* md5sum /tftpboot/upload/* #md5sum /tftpboot/upload/* > /tftpboot/upload/MD5
cd /tftpboot/ wget http://lab.nethence.com/elge/cisco/... wget http://lab.nethence.com/elge/cisco/MD5 cat MD5 md5sum *
if there’s not enough space available, you might have to make some room right away
!show flash: cd flash:/ dir ! c2950 delete flash://c2950-i6q4l2-mz.121-22.EA12.bin ! c2960 delete flash://c2960-lanbasek9-mz.122-50.SE3.bin delete /recursive /force flash:/c2960-lanbasek9-mz.122-44.SE6
and proceed with the upgrade
! c2950 copy tftp://10.7.7.201/c2950-i6k2l2q4-mz.121-22.EA14.bin flash verify /md5 c2950-i6k2l2q4-mz.121-22.EA14.bin ! c2960 copy tftp://x.x.x.x/c2960-lanbasek9-mz.122-55.SE12.bin flash verify /md5 c2960-lanbasek9-mz.122-55.SE12.bin
you are now ready to setup the switch (conf t
)
! c2950 boot system flash:c2950-i6k2l2q4-mz.121-22.EA14.bin ! c2960 boot system flash:c2960-lanbasek9-mz.122-55.SE12.bin do show boot do write erase do reload
and eventually re-enable firewall on your workstation ;o)
systemctl stop tftpd-hpa systemctl disable tftpd-hpa systemctl restart nftables
and from within the switch
verify /md5 flash:<?>
in case some config element got stuck on a c2950 e.g. vlan
I had no other choice than to
more nvram:startup-config more flash:config.text copy nvram:startup-config tftp cd /tftpboot/upload/ mv SW-config ../ cd ../ chown root:root SW-config chmod 644 SW-config cp SW-config SW-config.dist vi SW-config
and push it back over to the switch
copy tftp://x.x.x.x/SW-confg nvram:startup-config reload
Cisco 2950 V.12.1 IOS Upgrade to 15.0 or Higher https://community.cisco.com/t5/switching/cisco-2950-v-12-1-ios-upgrade-to-15-0-or-higher/td-p/2609183
Upgrading Software Images on Catalyst 2950 and 2955 Series Switches Using the Command Line Interface https://www.cisco.com/c/en/us/support/docs/switches/catalyst-2950-series-switches/41542-191.html
Cisco Catalyst 2950 firmware update https://community.spiceworks.com/topic/1444860-cisco-catalyst-2950-firmware-update
Cisco 3900 Series, 2900 Series, and 1900 Series Software Configuration Guide https://www.cisco.com/c/en/us/td/docs/routers/access/1900/software/configuration/guide/Software_Configuration/upgrade.html
Upgrading IOS https://janadelsbach.com/datacenter.cisco.html
How To: Upgrade IOS On A Cisco 2950 http://tuxlabs.com/?p=256
How to Update/Upgrade Cisco IOS Software https://www.cisco.com/c/en/us/products/ios-nx-os-software/networking_solutions_products_genericcontent0900aecd806ea5be.html
Upgrading from non Crypto to Crypto Image https://community.cisco.com/t5/switching/upgrading-from-non-crypto-to-crypto-image/td-p/2887141
Image with /without payload encryption https://community.cisco.com/t5/other-network-architecture/image-with-without-payload-encryption/td-p/1766672
Config.text and Startup-config Files in Cisco Switches https://learningnetwork.cisco.com/thread/98141
Edit Cisco startup-config https://ori0nx.wordpress.com/2010/12/31/edit-cisco-startup-config/
erasing a config and vlan.dat file in Catalyst 4507R Switch https://community.cisco.com/t5/switching/erasing-a-config-and-vlan-dat-file-in-catalyst-4507r-switch/td-p/2275969
https://www.rogerperkin.co.uk/network-automation/ansible/cisco-ios-upgrade-for-switch/
https://netdevops.blog/posts/netdevops/rollout_images_to_cisco_devices_with_ansible/
https://geekshangout.com/deleting-all-the-contents-of-a-folder-on-a-cisco-ios-device/