Some time ago, ZDNet's George Ou wrote an innovative article for TechRepublic about using USB flash drives or compact flash (CF) cards to upgrade a router. I want to take that article a step further -- here's how I used my USB flash drive with my Cisco 871W router.

A little background
Before we get started, let's review some of the specifics you need to know about using USB flash and CF cards with Cisco routers. You can find much of this in George's article, but here's a recap:

  • Many of the newer 800, 1800, 2800, and 3800 series routers support USB Flash. 800 series routers don’t support CF, but they do support USB flash.
  • The Cisco IOS can only read FAT-formatted flash drives.
  • The IOS may not recognise the proper size of your USB flash drive. However, it doesn't really matter -- you have much more space with today's USB flash drives than you could ever use.
  • While using USB flash and CF cards are a great way to transfer data to and from a router, you obviously must have physical access to the router.
  • The USB ports on a router are usually USB 2.0, but check the specifications.
  • Some routers with certain IOS versions support Aladdin eTokens.

Ideally, USB flash can hold multiple copies of the Cisco IOS and multiple router configurations, and you can use it to easily move and copy those IOS files and configurations from router to router. And many times, when you're physically at the router, the copying process can take place several times faster than it would over a LAN or WAN.

My experience
I have a new 4GB USB flash drive that I recently bought for about US$40. I had used this drive on my Window Vista PC to back up and transport data.

I wondered if I could easily copy or back up the Cisco IOS from my 871W onto another 871W without configuring network settings on the router, plugging it into the network, running a TFTP server on my PC, and copying the IOS over. I wanted to just plug in the USB drive and copy off the IOS, just as I would on my PC with any other file.

I'll be honest: Like most techies out there, I abhor reading directions. I save that until something absolutely, positively doesn't work. Admittedly, I had only skimmed George's article, and it had been some time since I had done even that. (Yes, I confess: I didn't read it thoroughly until after this experiment.)

So, like most new gadgets I try out for the first time, I just plugged it in to see what would happen. While on the console of my Cisco 871W, I took the USB flash drive from my pocket and connected it to the router. Immediately, the router told me this:

*Aug 26 21:03:10.251: %USBFLASH-5-CHANGE: usbflash1 has been inserted!
 *Aug 26 21:03:10.275: %USBFLASH-4-FORMAT: usbflash1 contains unexpected 
values in partition table or boot sector.
Device needs formatting before use!

Actually, this was a pleasant surprise: At least, the router knew there was a USB flash drive connected, it knew it didn't work, and it knew why it didn’t work.

Later, I found out that the drive wouldn't work because of its NTFS format. As mentioned above, it needed a FAT format -- the Cisco IOS only recognises the FAT file system. As I already knew that I didn't need anything on this flash drive, I formatted the flash drive with the router. (I could have also formatted the flash drive with a PC as long as I specified the FAT file system.)

Here's what it looked like:

TechRepublic-Router# format ?
   flash:      Filesystem to be formatted
   usbflash1:  Filesystem to be formatted

 TechRepublic-Router# format usbflash1:
 Format operation may take a while. Continue? [confirm]
 Format operation will destroy all data in "usbflash1:". Continue? [confirm]
 Format: Drive communication & 1st Sector Write OK...

 Format: All system sectors written. OK...

 Format: Total data sectors in formatted partition: 8191435
 Format: Total data bytes in formatted partition: -100952576
 Format: Operation completed successfully.

 Format of usbflash1 complete
 TechRepublic-Router#

At this point, as you can see below, I had a working USB flash drive.

TechRepublic-Router# dir usbflash1:
 Directory of usbflash1:/

 No files in directory

 No space information available
 TechRepublic-Router#

Next, I copied my 871W IOS from the internal flash and to the USB flash. Here's what it looked like:

TechRepublic-Router# dir
 Directory of flash:/

     2  -rwx    17227284   Aug 8 2006 17:16:53 +00:00 
c870-advipservicesk9-mz.124-11.T2.bin
     3  -rwx        3053  Aug 26 2006 20:24:58 +00:00  SDM_Backup

 23482368 bytes total (6246400 bytes free)
 TechRepublic-Router# copy c870-advipservicesk9-mz.124-11.T2.bin usb
 TechRepublic-Router# copy c870-advipservicesk9-mz.124-11.T2.bin usbflash1:
 Destination filename [c870-advipservicesk9-mz.124-11.T2.bin]?
 Copy in progress...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
 (truncated)
 17227284 bytes copied in 14.440 secs (1193025 bytes/sec)

 TechRepublic-Router# dir usbflash1:
 Directory of usbflash1:/

     1  -rw-    17227284  
Aug 26 2006 21:07:00 +00:00  c870-advipservicesk9-mz.124-11.T2.bin

 No space information available
 TechRepublic-Router#

At this point, I had my 17MB Cisco IOS on my flash drive. I could then take it and plug it into any other router and quickly copy that IOS without going through any network configuration or connecting that router to the network.

Some helpful commands
Here are some commands that can come in handy, along with links to their Cisco documentation:

Summary
A USB flash drive offers cheap, easy storage space for your Cisco routers to hold the Cisco IOS, configuration files, and security certificates. However, what interests me even more is that it frees us from the limitations of only having 16MB, 128MB, or 256MB of storage on our routers. These limitations have defined our work for so long that the lack of them suddenly opens up so many more possibilities.

David Davis has worked in the IT industry for 12 years and holds several certifications, including CCIE, MCSE+I, CISSP, CCNA, CCDA, and CCNP. He currently manages a group of systems/network administrators for a privately owned retail company and performs networking/systems consulting on a part-time basis.

TechRepublic is the online community and information resource for all IT professionals, from support staff to executives. We offer in-depth technical articles written for IT professionals by IT professionals. In addition to articles on everything from Windows to e-mail to firewalls, we offer IT industry analysis, downloads, management tips, discussion forums, and e-newsletters.

Advertisement
  • Leave A Comment

(if you need to share some code)

You must read and type the 6 chars within 0..9 and A..F

* mandatory fields.

Log in


Sign up | Forgot your password?

  • Blogs

StaffXO to run XP
When Bill Gates says that everything in the world should be a computer, what he means is that everything in the world should be running Windows. Read more »

-- posted by Staff

StaffDrop in on Builder AU at Open CeBiT 2008
Got a question on open source you need answered? Need a way to help convince your boss that open source is the way to go? Or just curious to learn what all the fuss is about? Then drop in to the Builder AU Open Source Afternoon on Wednesday May 21. Read more »

-- posted by Staff

Chris DuckettAssumption-based Hacking 101
High-level thinking leads to assumptions, and assumptions are the mother of all mistakes -- consequently the best place to find a security hole is in a place where the programmer has made an incorrect assumption. Read more »

-- posted by Chris Duckett

  • What's On?

Club Builder: Vapour-where? Club Builder: Vapour-where?
Applets are back from the dead, but do we want them? This week's Club Builder also looks at which pieces of software are utter vapour.

Understanding task and data parallelism
The difference between task and data parallelism, and how there is a way around the limits imposed by Amdahl's Law.