Cisco Routing/Switching – Update your ios using TFTPD64

Updating a stack of Switches to a new ios is a breeze with TFTPD64.. read more below.

First of all stack all your switches up and grab a console cable.

 

 

 

 

 

 

Before doing anything make sure you have a backup of your current image or at-least have it available on another switch to copy from.

You will need to download an application called TFTPD64 a simple google search will grab you some download links and its freeware too.

In my example I’m looking to:

  • Install an ios update for Catalyst 2960-x Switches to keep them more current and to iron out some of the bugs and issues with older versions

So boot up your switches and get consoled in to your first switch.

Once you in you will need to create a VLAN (Don’t worry we can delete this after) Any VLAN you like:

Switch# conf t
Switch(config)#vlan 333
Switch(config-vlan)#name **TFTP**
Switch(config-vlan)#exit
Switch(config)#int vlan 333
Switch(config-if)#ip address 10.1.1.1 255.255.255.0
Switch(config-if)#end



What this has done is configured your VLAN (333) and I have named it TFTP and gave the interface of the VLAN the IP address 10.1.1.1 with the subnet mask of 255.255.255.0 – this can be anything really.

Confirm the VLAN is created by running sh vlan

Switch#sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Gi0/1, Gi0/2, Gi0/3, Gi0/4
                                                Gi0/5, Gi0/6, Gi0/7, Gi0/8
                                                Gi0/9, Gi0/10, Gi0/11, Gi0/12
                                                Gi0/13, Gi0/14, Gi0/15, Gi0/16
                                                Gi0/17, Gi0/18, Gi0/19, Gi0/20
                                                Gi0/21, Gi0/22, Gi0/23, Gi0/24
                                                Gi0/25, Gi0/26
333  **TFTP**                         active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
333  enet  100333     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 tr    101003     1500  -      -      -        -    -        0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
 --More--

Then check the interface has an IP you can communicate with:

Switch#sh ip int brief
Interface              IP-Address      OK? Method Status                Protocol
Vlan1                  unassigned      YES unset  administratively down down
Vlan333                10.1.1.1        YES manual up                    down
FastEthernet0          unassigned      YES unset  administratively down down
GigabitEthernet0/1     unassigned      YES unset  up                    up
GigabitEthernet0/2     unassigned      YES unset  down                  down
GigabitEthernet0/3     unassigned      YES unset  down                  down
GigabitEthernet0/4     unassigned      YES unset  down                  down
GigabitEthernet0/5     unassigned      YES unset  down                  down
GigabitEthernet0/6     unassigned      YES unset  down                  down
GigabitEthernet0/7     unassigned      YES unset  down                  down
GigabitEthernet0/8     unassigned      YES unset  down                  down
GigabitEthernet0/9     unassigned      YES unset  down                  down
GigabitEthernet0/10    unassigned      YES unset  down                  down
GigabitEthernet0/11    unassigned      YES unset  down                  down
GigabitEthernet0/12    unassigned      YES unset  down                  down
GigabitEthernet0/13    unassigned      YES unset  down                  down
GigabitEthernet0/14    unassigned      YES unset  down                  down
GigabitEthernet0/15    unassigned      YES unset  down                  down
GigabitEthernet0/16    unassigned      YES unset  down                  down
GigabitEthernet0/17    unassigned      YES unset  down                  down
GigabitEthernet0/18    unassigned      YES unset  down                  down

On your laptop at the other end set yourself an IP address, if you have multiple NIC’s ensure you do it on one you don’t use often, as you will probably forget to change it back to DHCP.

I’ve just set my laptop to 10.1.1.2 255.255.255.0 – then point it at that VLAN for the Default gateway.

 

 

 

 

 

 

 

 

 

Then ensure the interface your patched into is in the new vlan, you should then see the VLAN line protocol come up then too as it’s in use physically.

Switch#conf t
Switch(config)#int gigabitEthernet 0/1
Switch(config-if)#switchport access vlan 333
Switch(config-if)#shut
Switch(config-if)#no shut
Feb 14 14:55:37.010: %LINK-3-UPDOWN: Interface GigabitEthernet0/1, changed state to up
Feb 14 14:55:38.009: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up
Switch(config-if)#
Feb 14 14:56:05.017: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan333, changed state to up
Switch(config-if)#end



Let’s see if my laptop can communicate with the switch and vice versa

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

U:\>ping 10.1.1.1

Pinging 10.1.1.1 with 32 bytes of data:
Reply from 10.1.1.1: bytes=32 time=19ms TTL=255
Reply from 10.1.1.1: bytes=32 time=1ms TTL=255
Reply from 10.1.1.1: bytes=32 time=7ms TTL=255
Reply from 10.1.1.1: bytes=32 time=3ms TTL=255

Ping statistics for 10.1.1.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1ms, Maximum = 19ms, Average = 7ms

U:\>

Command prompt from my laptop can ping the switch…

Switch#ping 10.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/3 ms
Switch#

The Switch can ping the Laptop, sweet!

So now were all set I’m going to update the IOS on my switches, I’m going to update them to c2960x-universalk9-mz.152-2.E7, so i downloaded this from Cisco and it’s sat on my C:\TFTP\

load up TFTPD64 and ensure you change the directory to where you have stored your file:

 

 

 

 

 

 

So i have changed my Directory to look at C:\TFTP **Ensure you have the .bin file for your ios in here**

Then back on the switch see the following:

Switch#copy tftp: flash:
Address or name of remote host []? 10.1.1.2
Source filename []? c2960x-universalk9-mz.152-2.E7.bin
Destination filename [c2960x-universalk9-mz.152-2.E7.bin]?
Accessing tftp://10.1.1.2/c2960x-universalk9-mz.152-2.E7.bin...

So I’m copying from *Location (in my case it’s TFTP) and I’m copying to flash, therefore Copy TFTP: flash:

Copy your file name and paste and put .bin at the end then remember your laptop IP or server IP however your doing it.

You should see on the TFTP app that it’s communicating with the server:

 

 

 

 

 

 

 

You will also see the progress on the switch too

Switch#copy tftp: flash:
Address or name of remote host []? 10.1.1.2
Source filename []? c2960x-universalk9-mz.152-2.E7.bin
Destination filename [c2960x-universalk9-mz.152-2.E7.bin]?
Accessing tftp://10.1.1.2/c2960x-universalk9-mz.152-2.E7.bin...
Loading c2960x-universalk9-mz.152-2.E7.bin from 10.1.1.2 (via Vlan333): !OO!OO!OO!OO!OO!OO!OOO!OO!OO!OO!O!OO!OO!OOO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OO!OOO!OO!OO!OO!O!OO!

Leave this for a while and reload the switch and your good to go.

If you need to copy something from the flash of the switch to tftp it’s just the opposite command

switch#copy flash: tftp:

This should then prompt you for the file name, and dependant on what your copying just copy the file name with the extension see below:

Switch#sh flash

Directory of flash:/

    2  -rwx        1913  Feb 14 2018 16:31:58 +00:00  config.text
    3  -rwx          34  Feb 14 2018 16:17:50 +00:00  pnp-tech-time
    4  -rwx       11462  Feb 14 2018 16:17:53 +00:00  pnp-tech-discovery-summary
    5  -rwx         616  Feb 14 2018 16:13:56 +00:00  vlan.dat
    6  -rwx    21284864  Feb 14 2018 16:15:49 +00:00  c2960x-universalk9-mz.152-2.E7.bin

Then just choose your file type

If you wanted to Delete that VLAN to keep it tidy, follow the below

Switch#conf t
Switch(config)#int gi0/1
Switch(config-if)#switchport access vlan 1
Switch(config-if)#
Feb 15 08:32:10.571: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan333, changed state to down
Switch(config-if)#exit
Switch(config)#no vlan 333
Switch(config)#no int vlan 333
Feb 15 08:32:26.052: %LINK-5-CHANGED: Interface Vlan333, changed state to administratively down
Switch(config)#do sh vlan

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Gi0/1, Gi0/2, Gi0/3, Gi0/4
                                                Gi0/5, Gi0/6, Gi0/7, Gi0/8
                                                Gi0/9, Gi0/10, Gi0/11, Gi0/12
                                                Gi0/13, Gi0/14, Gi0/15, Gi0/16
                                                Gi0/17, Gi0/18, Gi0/19, Gi0/20
                                                Gi0/21, Gi0/22, Gi0/23, Gi0/24
                                                Gi0/25, Gi0/26
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        0      0
1003 tr    101003     1500  -      -      -        -    -        0      0
1004 fdnet 101004     1500  -      -      -        ieee -        0      0
1005 trnet 101005     1500  -      -      -        ibm  -        0      0

Primary Secondary Type              Ports
------- --------- ----------------- ------------------------------------------

Switch(config)#

As you can see the vlan is now gone and your left with your existing config, if you already have a management VLAN set you could always use that and just set your laptop to a spare IP address if you have one, that always works too.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *