Router(config)#
tftp-server flash:c2800nm-advipservicesk9-mz.124-12.bin
And finally, you set the IOS filename of the file on your TFTP server. Whew! Job saved.
There is one other way you can restore the IOS on a router, but it takes a while. You can use what is called the
Xmodem
protocol to actually upload an IOS file into flash memory through the console port. You’d use the
Xmodem
through the console port procedure if you had no network connectivity to the router or switch.
Using the Cisco IOS File System (Cisco IFS)
Cisco has created a file system called Cisco IFS that allows you to work with files and directories just as you would
from a Windows DOS prompt. The commands you use are
dir
,
copy
,
more
,
delete
,
erase
or
format
,
cd
and
pwd
, and
mkdir
and
rmdir
.
Working with IFS gives you the ability to view all files, even those on remote servers. And you definitely want to
find out if an image on one of your remote servers is valid before you copy it, right? You also need to know how big
it is—size matters here! It’s also a really good idea to take a look at the remote server’s configuration and make
sure it’s all good before loading that file on your router.
It’s very cool that IFS makes the file system user interface universal—it’s not platform specific anymore. You now
get to use the same syntax for all your commands on all of your routers, no matter the platform!
Sound too good to be true? Well, it kind of is because you’ll find out that support for all commands on each file
system and platform just isn’t there. But it’s really no big deal since various file systems differ in the actions they
perform; the commands that aren’t relevant to a particular file system are the very ones that aren’t supported on
that file system. Be assured that any file system or platform will fully support all the commands you need to
manage it.
Another cool IFS feature is that it cuts down on all those obligatory prompts for a lot of the commands. If you want
to enter a command, all you have to do is type all the necessary info straight into the command line—no more
jumping through hoops of prompts! So, if you want to copy a file to an FTP server, all you’d do is first indicate
where the desired source file is on your router, pinpoint where the destination file is to be on the FTP server,
determine the username and password you’re going to use when you want to connect to that server, and type it all
in on one line—sleek! And for those of you resistant to change, you can still have the router prompt you for all the
information it needs and enjoy entering a more elegantly minimized version of the command than you did before.
But even in spite of all this, your router might still prompt you—even if you did everything right in your command
line. It comes down to how you’ve got the
file prompt
command configured and which command you’re trying
to use. But no worries—if that happens, the default value will be entered right there in the command, and all you
have to do is hit Enter to verify the correct values.
IFS also lets you explore various directories and inventory files in any directory you want. Plus, you can make
subdirectories in flash memory or on a card, but you only get to do that if you’re working on one of the more recent
platforms.
And get this—the new file system interface uses URLs to determine the whereabouts of a file. So just as they
pinpoint places on the Web, URLs now indicate where files are on your Cisco router, or even on a remote file
server! You just type URLs right into your commands to identify where the file or directory is. It’s really that easy—
to copy a file from one place to another, you simply enter the
copy
source-url destination-url
command
—sweet! IFS URLs are a tad different than what you’re used to though, and there’s an array of formats to use that
vary depending on where, exactly, the file is that you’re after.
We’re going to use Cisco IFS commands pretty much the same way that we used the
copy
command in the IOS
section earlier:
1. For backing up the IOS
2. For upgrading the IOS
3. For viewing text files
Okay—with all that down, let’s take a look at the common IFS commands available to us for managing the IOS. I’ll
get into configuration files soon, but for now I’m going to get you started with going over the basics used to
manage the new Cisco IOS.
Do'stlaringiz bilan baham: