Lab Objective
Verify a router has sufficient flash space for a new IOS image, copy the image from a TFTP server into flash, configure the boot system variable to point at the new image, and verify the configuration without yet reloading the device.
Lab Purpose
Upgrading IOS is a routine but consequential maintenance task, and skipping the flash space verification step is a common cause of a failed upgrade partway through the copy process, potentially leaving a router with a corrupted or incomplete image file.
Lab Topology
R1 ---- Gi0/0: 192.168.75.1/24
TFTP server: 192.168.75.100/24
New IOS image on server: c2900-universalk9-mz.SPA.157-3.M.bin
(approximately 89 MB)Task 1: Configure Basic Addressing
Configure R1's interface connecting to the TFTP server's segment.
Task 2: Verify Available Flash Space
Check flash memory to confirm sufficient space exists before attempting the copy.
Task 3: Copy the New IOS Image to Flash
Copy the image from the TFTP server into R1's flash memory.
Task 4: Verify the Image Copied Successfully
Confirm the new image file appears in flash with the correct file size.
Task 5: Configure the Boot System Variable
Point the boot system variable at the newly copied image so it loads on the next reload.
Task 6: Verify the Boot Configuration Without Reloading
Confirm the boot system statement is correctly saved, without yet reloading the router.
Solution and Verification
R1(config)# interface gigabitethernet0/0
R1(config-if)# ip address 192.168.75.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# endR1# show flash
-524288000 bytes total (198254592 bytes free)
-- Roughly 189 MB free -- more than enough
-- for the ~89 MB image, but this check must
-- always be done first, since copying a large
-- image with insufficient space can leave
-- a corrupted partial file consuming space
-- without providing a usable imageR1# copy tftp: flash:
Address or name of remote host []? 192.168.75.100
Source filename []? c2900-universalk9-mz.SPA.157-3.M.bin
Destination filename [c2900-universalk9-mz.SPA.157-3.M.bin]?
Accessing tftp://192.168.75.100/c2900-universalk9-mz.SPA.157-3.M.bin...
Loading c2900-universalk9-mz.SPA.157-3.M.bin from 192.168.75.100
[OK - 93326848 bytes]
93326848 bytes copied in 214.628 secsR1# show flash
93326848 c2900-universalk9-mz.SPA.157-3.M.bin
-- File size matches exactly what the TFTP
-- transfer reported, confirming a complete,
-- uncorrupted copyR1(config)# boot system flash:c2900-universalk9-mz.SPA.157-3.M.bin
R1(config)# end
R1# copy running-config startup-configR1# show running-config | include boot system
boot system flash:c2900-universalk9-mz.SPA.157-3.M.bin
-- The boot variable is saved and will take
-- effect the next time the router reloads --
-- no reload has occurred yet in this lab,
-- deliberately, since reloading during a
-- maintenance window is typically scheduled
-- as a separate, deliberate stepKey Takeaway
Verifying free flash space with show flash before starting the copy is not optional — a router that runs out of space mid-transfer can be left with a partially written, unusable image file, and in the worst case this can happen to the currently running image itself if flash management is not handled carefully, potentially leaving the device unable to boot at all.