Cisco Basic Setup – IOS Labs
by Michael T. Durham
Cisco Basic Setup Lab – Loading the IOS from a TFTP Server
The very first thing we need to do is check our router (25xx and 26xx series and most switches) to verify that we have a version of the IOS that loaded on the router. To do this you need to connect your PC to the router via the console cable. Turn on the router and load a communications program such as Putty or Hyperterm so you can determine the router’s IOS version and set its IP addresses.
Once the router boots up and you are at the router> prompt, enter the show version command. Look for the line that shows the .bin file that is loaded on your router.
You should see something like this:
System image file is “flash:c2800nm-adventerprisek9-mz.151-4.M3.bin
Should your router already have the correct IOS version loaded, you are good to start learning.
However, we recommend that you read through this lab to learn how to set up a TFTP server on your PC so that you can load a router or switch with a different IOS version or need to change the firmware on an IP phone.
There are two parts to uploading a different IOS or phone firmware.
- Configuring a TFTP server on a PC
- Enter commands on the Cisco device to update
Configuring a TFTP server on a PC
We need to load a TFTP server software program on to your PC so that we can update Cisco IOS’ on routers and switches as well as update the firmware on IP phones. Solar Winds has a good free TFTP server application and it can be download from their site at http://www.solarwinds.com/register/registrationb.aspx?program=52&c=70150000000CcH2.
Download and install the TFTP application but do not run it just yet. First we need to change the IP address of your PC to match the network we are creating on the router. Set your PC’s IP address to 192.168.1.2 and the gateway to 192.168.1.1.
Launch the Solar Winds TFTP Server application and click on File and then Configure menu options.
Check which directory the TFTP server is using as its root. This directory is where you put the files that will be uploaded to the Cisco device. Let’s say that you want to change the IOS that is currently on your router to the c2600-ipvoice-ivs-mz.124-9.T.bin file. Just copy that file to the TFTP root directory and click on the Start button shown in the screenshot above.
We now have a running TFTP server that is ready to upload and download files between our tftp client, the router.
Enter commands on the Cisco device to update
While still connected to the router (or other device) via the console cable, you need set an IP address on the Ethernet port that is connected to your PC. Enter the following commands on the router:
router(config-if)#ip address 192.168.1.1 255.255.255.0
Be sure to use a crossover Ethernet cable when connecting a PC directly to a router.
Before going any further, we need to test the connection to the PC by using the ping command and pinging the PC’s IP address.
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
The next commands will download the IOS version we want on to the router. Enter the copy command followed by where to get the file from (source) and then we tell the router where to save the file destination). The router will then prompt us for the IP address of the tftp server and we enter 192.168.1.2. Next we are prompted for the source filename which is our new IOS. Be careful to enter the filename exactly as it is in the tftp upload directory on the PC. When you are prompted for the destination filename, just press the enter key. The final step is to confirm the erasing of the system flash: before copying by pressing enter. You will be asked to confirm erasing the flash a second time, again, just press the enter key.
router(config)#copy tftp flash
Address or name of the remote host? 192.168.1.2
Source filename? C2600-ipvoice-ivs-mz.124-9.T.bin
Destination filename [c2600-ipvoice-ivs-mz.124-9.T.bin enter
Erase flash: before copying [confirm] enter
Erasing the flash filesystem will remove aal files! Continue? [confirm] enter
At this point the router or switch will begin erasing current filesystem for the device. If for some reason your device seems stuck at the Accessing tftp://192.168.1.2/c2600-ipvoice-ivs-ms.124-9.T.bin process, bring up your tftp application and stop the server then re-start the tftp server. Make sure that the IP address at the bottom left of the tftp server window is correct.
Erasing device… eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Erase of flash: complete
Loading c2600-ipvoice-ivs-mz.124-9.T.bin from 192.168.1.2 (via
[OK – 24752244 bytes]
Verifying checksum…. OK
The output above from the router and the screenshot from the PC confirm that an upload to the router has taken place. Depending on the file size and your Ethernet connection speed, this process may take a little while. Once the checksum completes you are returned to the router# prompt.
You should verify that the file you wanted uploaded is in fact saved on the flash memory. To do this, enter the show flash: command. You must use the : at the end of the word flash.
System flash directory:
File Length Name/status
[24752308 bytes used. 25055048 available, 49807356 total]
49152K bytes if processor board System flash (Read/Write)
The new IOS version has been loaded on to the flash memory and is ready to use. The final step is to reload the router’s memory and start using your new IOS. Enter the following:
System configuration has been modified. Save? [yes/no]: yes
Proceed with reload? [confirm] enter
When the router or other device completes the reload (rebooting) process, it is ready to configure using the new IOS.
After you have setup and tested this lab, please blog your experience below: