Bambang F. Indarto

The Journey… The Shares

Posts Tagged ‘IOS’

How to Copy IOS From One Cisco Router to Another

Posted by bfindarto on March 12, 2008

Well.. there will be the time that you want to install an ios for your router (maybe becouse of your router’s ios is crashed) or you want to upgrade your ios… but… you dont’t have the tftp server around, then you guys can follow these steps.

This method will work with requirements: the flash size of the destination router should be adequate for the new IOS file size.

Okay… here’s how to do it:

On the source router that contains the IOS file that you want to copy, issue the following command:

Router(config)#tftp-server flash:/SOURCE-IOS-FILE.bin

Where SOURCE-IOS-FILE.bin is the name of the IOS file that you want to copy. If you are using a router that has PCMCIA flash card, replace the ‘flash:’ with ‘slot0:’ or ‘slot1:’ in the previous command, depending on the slot that contains the file that you want to copy.

This command will make the router act as a TFTP server. And the rest of the procedure is done on the target router and can be found on this link.

After you complete the copy operation, issue the command:

Router(config)#no tftp-server flash:/SOURCE-IOS-FILE.bin


Posted in Cisco Networking | Tagged: , , , , , | Leave a Comment »

Upgrading the Cisco Routers IOS

Posted by bfindarto on March 12, 2008

In the circumtances of that your router’s IOS is corrupted… or you plan to add more duties to the router or new hardware, then you may do the upgrading proccess of your cisco router’s ios. First, you should make sure that the router’s flash size should be enough for the new IOS image. Also, before starting the procedure of IOS upgrade or installation, you will need to install TFTP server software on a PC connected to the router Ethernet interface. There are many free downloadable TFTP servers’ software on the Internet, however, my recommendation is Free TFTP Server 6.0.

Afterwards, you make sure to direct the TFTP server to the folder containing the new IOS image that you have.

If you have a router with internal flash memory, you may follow these steps:

  1. Create a console connection with the default settings (9600 baud, 8 databits, 0 parity bits, 1 stop bit, no flow control).
  2. Verify the connectivity between the router and the TFTP server using ‘ping’. Make sure that the router interface and the TFTP server IP addresses are in the same range and the ping is responding well.
  3. Although the upgrade will be happening in the flash and the configuration is saved in the NVRAM, make a backup of the configuration. This is recommended in case something goes wrong in the upgrade. Also, make a backup copy of the IOS you already have on the router. In case the new IOS image is corrupted, you will be on the safe side.
  4. Start the upgrade by the command:
    Router#copy tftp flashYou will be prompted to enter some information: remote host address/name,  and the ios file name. Please note that the file name is case sensitive, so be %100 sure of what you are writing.
    Next… you will be ask to enter the destination file name. It is preferred to keep it as the source file name, to be able to easily identify the files on the TFTP servers as compared to the ones on the routers.
  5. Now you will be asked whether to erase the existing file(s) in the flash or not. If you have enough free space on the flash, don’t erase the old IOS image, you might need it.
    Erase flash: before copying? [confirm]
  6. Afterwards, the router starts copying the new IOS file to the router, or start erasing the flash and then copying.
    The copying process takes several minutes; the time differs from network to network. During the copy process, messages and exclamation points (“!”) are displayed to indicate which file has been accessed. The exclamation point “!” indicates that the copy process is taking place. Each exclamation point indicates that ten packets have been transferred successfully. A checksum verification of the image occurs after the image is written to flash memory.
  7. Next… before reloading the router, you need to make sure of two things. The first is that the configuration register value is 0x2102. You can check that wit the ‘show version’ command. If the configuration register’s value is not 0x2102, you will need to set it to that value with the following command:Router(config)#config-register 0x2102

    The second thing is needed to be checked if you did not erase the contents of the flash. You will need to setup the router to boot from the new IOS file with the following commands:

    Router(config)#no boot system
    Router(config)#boot system flash cXXXX-X-XX.XXX-XX.bin

  8. If you type the reload command, the router asks you if you want to save the configuration. You should be very cautious here. The reason is that if the router is in boot mode for instance, it is a subset of the full Cisco IOS software which is running and there is no routing functionality. Therefore, all the routing configuration is gone in the running configuration and if you save the configuration at this time, then you erase the good startup-configuration in NVRAM and replace it by the incomplete running-configuration. Save the configuration only if you are sure that you have the full configuration in the output of show run. It is NOT necessary to save the configuration to take into account the new config-register if this one has been changed previously. That is done automatically.Router#reload
    System configuration has been modified. Save? [yes/no]: y 
    Building configuration…
    Proceed with reload? [confirm]
  9. To verify that the new image is loaded after the ‘reload’, use ‘show version’ command.

Note: In step 1 or after the upgrade, if the router boots into rommon mode or boot mode and you have one of the following case:
rommon 1 > dir flash: 
device does not contain a valid magic number 
dir: cannot open device “flash:” 
rommon 2 >


device does not contain a valid magic number
boot: cannot open “flash:”
boot: cannot determine first file name on device “flash:”

This means that the flash is empty or the file system is corrupted. In this case, you have to consider using the procedure of Upgrading or Installing the IOS from ROMmon mode .

Posted in Cisco Networking | Tagged: , , , , , | Leave a Comment »

Most Useful “Show” Commands in Cisco Router

Posted by bfindarto on March 12, 2008

Show command in cisco routers is the most important and useful tools to see (mostly) recent router’s configuration. Here are about ten show commands that widely used…

  1. show version
    This command shows detailed information about the IOS. It shows the file name of the IOS along with the version of the IOS and value of the configuration register. The configuration register is a set of bits that controls the boot sequence of the router. This command is the only command used to show this register’s value.
  2. show running-config
    This command is your true best friend. It shows the complete configuration that is running currently. Using it you can troubleshoot almost all issues regarding routing, filtering, secure access, and many other issues. Using it before you start configuring the router would give you a clear idea of what services and protocols are operating by default and which are turned off by default.
  3. show startup-config
    This command shows the configuration that is saved on the NVRAM. It is helpful in knowing the configuration that will be applied the next time the routers is reloaded. And also this command is useful in knowing the configuration that was loaded at the start-up of the router before making changes to it.
  4. show ip interface <brief>
    This command displays information about IP protocol and the interface, and if you type “brief”, means show the information briefly. You might be wondering why would you need this command. I will answer that. This command shows which access-lists are applied at the interfaces and in which direction. This kind of information is not shown by the ‘show access-list’ command. However, you can find out which access-list is applied where using ‘show run’.
  5. show interfaces
    This command shows status and statistics regarding interfaces. This command is almost always needed in troubleshooting routing and link issues. Things that are shown using this command include, interface IP address and subnet mask, interface status, encapsulation type, bandwidth, and many other important indicator about the interface operation.
  6. show ip route
    This command shows the routing table. This table helps you in finding out the next hop for each and every routable packet. It is the first indicator to point a problem in routing.
  7. show ip protocols
    This command shows the routing protocols used in the router and what networks are these protocols advertising. It also shows the sources of routing updates received at this router. It is very useful in routing issues troubleshooting.
  8. show access-list
    This command shows the contents of each access-list. It is very useful in troubleshooting filtering issues. Note that this command does not show you where each access-list is applied. 
  9. show cdp neighbor detail
    This command displays detailed information about the neighboring devices like IP addresses, platforms, and host names. This command can be useful in troubleshooting connectivity issues, and also can be used in finding out how devices are connected to each other when you have no clear drawn network map. 
  10. show flash or show slot0
    This command is used to view the contents of the flash and the size of the IOS file(s) and the size of the flash and how much of it is free. It is necessary in upgrading or installing the IOS file.

Posted in Cisco Networking | Tagged: , , , , , , , | Leave a Comment »