- [Instructor] It's likely that at some point
you'll want to use a file transfer protocol
with your iOS device.
The protocols that we commonly use use include TFTP,
SCP, HTTP,
and HTTPS
among others.
Now these are the most commonly used
for upgrading iOS images,
or for transferring other files
between your management hosts,
and the device.
So in other words, for things like
backing up your iOS files.
So let's take a look
at some common troubleshooting issues here,
starting with TFTP.
Which is the trivial file transfer protocol.
And this is a simplified version
of FTP.
The most common use for this with cisco devices
is when we upgrade,
or backup iOS.
There are lots of TFTP options out there
that will essentially turn
any host machine
into a TFTP server.
So that you can download your iOS files,
and you can transfer those
to your cisco device.
They'll also allow you to back up
iOS files
from the device
to the host machine.
A few things to be aware of with troubleshooting this,
are first
TFTP uses
UDP communication
specifically, UDP port 69.
So you'll want to make sure this port isn't blocked
in order to communicate properly.
You'll also want to check
your storage space.
If you're having TFTP
transfer issues.
You'll want to do that both on the TFTP server,
and on the cisco device.
If you're trying to copy a file
that's larger than the available free space
on the cisco router or switch,
that's obviously going to fail.
And you'll likely get
a failure message
buffer overflow
if this is the case.
If you want to check the available space
you can run the command
show flash
to verify the free space
on your device.
And you'd want to compare the output of that size
to the file size that you are attempting to transfer.
Also, make sure
your TFTP server is reachable
from, the cisco iOS device.
If you aren't getting any communication at all.
Again, a simple ping
is the best way to verify that
from iOS
to the TFTP servers IP address.
Here's a look
at the syntax
of a copy command from within iOS.
This starts with the
copy TFTP keywords that we see here,
and that's followed by
the IP address
for the TFTP server.
Which in this case
is 10.1.1.50.
And that's followed by
a forward slash,
and the exact file path,
and file name
for the file that is being copied.
And then we have a space,
and at the end we see our destination,
which is the local flash.
So we see flash colon
again followed by
the file name that is being copied.
So, you have to choose the correct copy command.
If you say copy,
and you look at contextual help
you're going to have a lot of different options there.
You want to select the correct one.
In this case,
that would be
of course TFTP,
and you'll want to follow that
with a file location,
and the destination.
It's also possible
to use HTTP,
or HTTPS
to transfer files
to and from
a remote web server.
HTTP of course uses
TCP port 80,
while HTTPS uses TCP port 443.
So obviously these are the ports
you want to make sure are not being blocked
in any way.
These are the default ports
but you can configure your web server to use
whatever port you'd like.
If you do that,
you just want to make sure that you specify this
in the command
when you're transferring files.
And we'll look at that
in just a bit.
Many of the same tips
apply here
as with TFTP.
Such as making sure you can ping
the HTTP, or HTTPS servers
IP address,
and making sure you use the correct copy command.
Let's take a look
at a sample command here.
You can see we again
use the copy key word,
but this time it's followed by HTTP
instead of TFTP.
You can see that that's followed by,
a username, and password.
That's something a little bit different here.
We have the username, admin
then we have a colon,
and then we have that followed with
the password.
Which in this case is
secure password.
Then we have an at symbol
followed by
the IP address
for the HTTP server.
So when we're using HTTP,
or HTTPS,
this is something different to be aware of.
We will have
user credentials.
And similarly at the end
we have that followed by
the IP address
of the HTTP server,
the file path and file name.
And then
the destination where that's going to go,
which is of course
our local flash.
One additional thing to look at,
remember that we can choose to use ports
other than
the default port.
If we do that
we need to aphend
the actual port number
at the end of the web server IP address.
We can see that listed here.
Notice at the end of the very first line
we see a colon
after the IP address.
And we see port 8080.
That is another common port for HTTP traffic.
So, if we use a nonstandard port,
if we have that configured on the server,
we want to make sure that we indicate that here
in our copy command.
Also note
that you want to be sure you're using the correct protocol.
If you're using HTTPS
make sure the copy command
has an HTTPS address in there.
And not just HTTP.
And you'll want to do
a similar thing for HTTP,
you want to make sure that your copy command
doesn't have
an HTTPS address listed.
One final protocol to mention
is SCP,
secure copy protocol.
This uses SSH
to provide authentication
for transferring our files.
And because of this
we need to make sure we have triple A enabled
on the router.
Remember that's done globally
with the command,
AAA new hyphen model.
And you'll want to make sure that you've configured
username and passwords
for this authentication, and authorization as well.
A few other notes
with SCP,
you need to make sure that SCP is enabled
on the cisco device.
So you'll want to specifically run the command
IP SCP server unable,
to make sure that's unabled.
If you remember our discussion about remote access protocols
and SSH.
You'll recall that this requires an RSA key
to be in place.
And that's the same for SCP.
And the reason is
SCP actually leverages SSH.
Again, you can do that with the command
crypto key generates rsa
followed by
the modular size in bits.
And finally,
as with our other methods
you want to make sure you're using the correct copy command.
The option as we see here
is copy, SCP.
Followed by
the username and password combination,
the at symbol,
and the SCP server IP address.
And then we have of course the local
destination for that to be copied to.
By the way,
if you want to leave out the password here,
if you want to leave that out,
and only have admin,
and then the at symbol,
the IP address,
you could certainly do that.
That's a valid thing to do.
If you're not comfortable typing your password
into the console
in plain text.
Maybe you're worried about
someone, maybe an employee or someone else in the office,
seeing that password over your shoulder,
you can actually leave that out.
And once you hit enter
you'll be prompted for the password after that.
So that's a look at file transfer protocols,
and the common places
where you would want to troubleshoot those.