CCNA Certification

CCNA, CCNP, CCIE Certification News

The 10 Cisco IOS Router file management commands you must know

Just like a Windows or Linux operating system, the Cisco IOS has its own list of commands to manipulate files, very similar to DOS/Windows commands. These files could be your IOS router operating system, configuration file, or other type of IOS file. Knowing these file commands is a critical requirement for any Cisco admin.

Let’s look at 10 Cisco IOS file management commands you must know.

#1 dir

This shows a directory list of files on a filesystem. To see the options, type dir ?

Router#dir ?

  /all             List all files
  /recursive       List files recursively
  all-filesystems  List files on all filesystems
  archive:         Directory or file name
  cns:             Directory or file name
  flash:           Directory or file name
  null:            Directory or file name
  nvram:           Directory or file name
  system:          Directory or file name
  tar:             Directory or file name
  tmpsys:          Directory or file name
  xmodem:          Directory or file name
  ymodem:          Directory or file name


You can think of each of these filesystems almost like disk drives in DOS, where you have to put a colon after the name. So, the nvram is called nvram:. The default is to show a directory of the router’s flash as your default current directory is flash:

Router# dir
Directory of flash:/

    2  -rwx    18929780  Aug 29 2006 15:49:57 +00:00  c870-advipservicesk9-mz.124-15.T5.bin
    3  -rwx        2143  Aug 29 2006 16:42:14 +00:00  running-config

23482368 bytes total (4544512 bytes free)

Every router will have at least flash memory and nvram (non-volatile random access memory).

#2 cd

Change directory: Use cd to change your current directory to a different device or subdirectory on that device. In the following, when I change my directory to the nvram: filesystem and do a dir, I get a list of nvram. I could also cd to a subdirectory after I have created a directory with mkdir.

Router#cd nvram:
Directory of nvram:/

  126  -rw-        2143                    <no date>  startup-config
  127  ----           5                    <no date>  private-config
  128  -rw-        2143                    <no date>  underlying-config
    1  ----          49                    <no date>  persistent-data
    2  -rw-           0                    <no date>  ifIndex-table
131072 bytes total (116584 bytes free)

#3 copy

This is used to copy the IOS or a config file from and to somewhere. You would use this to copy the router’s configuration off the router to a TFTP server or just make a local backup of it on the router. You would also use the copy command to upgrade the router with a new IOS from a TFTP server.

Here, I am making a local backup of the router’s running configuration:

Router#copy running-config davids-backup-before-upgrade
Destination filename [davids-backup-before-upgrade]?
2181 bytes copied in 3.052 secs (715 bytes/sec)

#4 delete and rm

Very simply, you will use delete to delete files and rm to remove folders/directories. Here, I use delete to delete the backup of my config that I just created:

Router#delete davids-backup-before-upgrade
Delete filename [davids-backup-before-upgrade]?
Delete flash:/davids-backup-before-upgrade? [confirm]

#5 show flash

This is used to show the files in your flash. The command show flash is similar to dir flash: but it provides a little more information on the size and type of flash memory in your router.

Router#show flash
24576K bytes of processor board System flash (Intel Strataflash)
Directory of flash:/
    2  -rwx    18929780  Aug 29 2006 15:49:57 +00:00  c870-advipservicesk9-mz.124-15.T5.bin
    3  -rwx        2181   Oct 4 2006 04:03:00 +00:00  mybackup-today
23482368 bytes total (4544512 bytes free)

#6 erase and format

It can be a bit confusing why you would erase one type of filesystem, but format another. What you really need to know is that you format flash devices and erase nvram. There are other types of filesystems, and you may erase or format them, depending on their type. The erase command is most used when you want to wipe out the router’s configuration and start with a default configuration. This is done with erase startup-configuration.

Router# erase ?
  /all                       Erase all files(in NVRAM)
  /no-squeeze-reserve-space  Do not reserve space for squeeze operation
  flash:                     Filesystem to be erased
  nvram:                     Filesystem to be erased
  startup-config             Erase contents of configuration memory

Router# format ?
  flash:  Filesystem to be formatted


#7 more

This shows a text / configuration file. Let’s say that you want to view a backup configuration file that you created. Just use the more command to view it:

Router# more my-backup-config
version 12.4
parser config cache interface
parser config interface
{config truncated}

#8 verify

This is used to verify the checksum or compute a MD5 signature for a file.

Router#verify flash:c870-advipservicesk9-mz.124-15.T5.bin
Verifying file integrity of flash:c870-advipservicesk9-mz.124-15.T5.bin.......{truncated}............ Done!
Embedded Hash   MD5 : CA8AEC573B197AEC6BD5892DE23C4754
Computed Hash   MD5 : CA8AEC573B197AEC6BD5892DE23C4754
CCO Hash        MD5 : 9D39672246853C0F31533B6BCB21DFE5
Embedded hash verification successful.
File system hash verification failed for file flash:c870-advipservicesk9-mz.124-15.T5.bin(No such file or directory).

#9 mkdir

Just like in DOS, you use mkdir to create a directory/folder. I would do this to perhaps create an archive folder for backup configurations or old IOS files.

Router# mkdir backup-configs
Create directory filename [backup-configs]?
Created dir flash:backup-configs

#10 fsck

FAT filesystem check is typically used to check your flash filesystem integrity. You may do this if you have experienced some corruption of your IOS files in flash.

Router# fsck
Fsck operation may take a while. Continue? [confirm]
Fsck of flash: complete

While there are so many reasons to use file system commands like these, if I had to select three of the most practical uses for some of the commands listed above, here is my list:

  1. Navigating the Cisco IOS filesystems — knowing what configuration files and what IOS files are on the router, perhaps before performing an upgrade.
  2. Back up your configuration to the local router or off to a TFTP server, again, perhaps before a backup
  3. Performing an upgrade of the Cisco IOS by copying the IOS from a TFTP server to the router.

It’s very important to understand IOS file management commands, what those commands are, and how you can use them in the real world. You don’t want to be stumbling to restore your IOS when the primary IOS is corrupt!

Technorati Tags: ,

April 1, 2009 Posted by | BCMSN, CCNA, CCNP, CCSP, Tech, Technology | 1 Comment

Cisco CCNP Certification / BCMSN Exam Tutorial: Uplinkfast

You remember from your CCNA studies that when a port goes through the transition from blocking to forwarding, you´re looking at a 50-second delay before that port can actually begin forwarding frames.

Configuring a port with PortFast is one way to get around that, but again, you can only use it when a single host device is found off the port. What if the device connected to a port is another switch?

A switch can be connected to two other switches, giving that local switch a redundant path to the root bridge, and that´s great – we always want a backup plan! However, STP will only allow one path to be available, but if the available path to the root switch goes down, there will be a 50-second delay due to the STP timers MaxAge and ForwardDelay before the currently blocked path will be available.

The delay is there to prevent switching loops, and we can´t use PortFast to shorten the delay since these are switches, not host devices. What we can use is Uplinkfast.

The ports that SW3 could potentially use to reach the root switch are collectively referred to as an uplink group. The uplink group includes the ports in forwarding and blocking mode. If the forwarding port in the uplink group sees that the link has gone down, another port in the uplink group will be transitioned from blocking to forwarding immediately. Uplinkfast is pretty much PortFast for wiring closets. (Cisco recommends that Uplinkfast not be used on switches in the distribution and core layers.)

Some additional details regarding Uplinkfast:

The actual transition from blocking to forwarding mode takes about three seconds.

Uplinkfast cannot be configured on a root switch.

Uplinkfast is configured globally. You can´t run Uplinkfast on some ports or on a per-VLAN basis – it´s all or nothing.

The original root port will become the root port again when it detects that its link to the root switch has come back up. This does not take place immediately. The switch uses the following formula to determine how long to wait before transitioning back to the forwarding state:

( 2 x FwdDelay) + 5 seconds

Uplinkfast will take immediate action to ensure that the switch upon which it is configured cannot become the root switch. First, the switch priority will be set to 49,152, which means that if all other switches are still at their default priority, they´d all have to go down before this switch can possibly become the root switch. Additionally, the STP Port Cost will be increased by 3000, making it highly unlikely that this switch will be used to reach the root switch by any downstream switches.

And you just know there´s got to be at least one option with this command, right? Let´s run IOS Help and see.

SW2(config)#spanning-tree uplinkfast ?

max-update-rate Rate at which station address updates are sent

When there is a direct link failure, dummy multicast frames are sent to the MAC destination 0100.0ccd.cdcd. The max-update-rate value determines how many of these frames will be sent in a 100-millisecond time period.

Mastering the details of UplinkFast, BackboneFast, BPDU Guard, and Loop Guard are vital to your success on the CCNP exams, and one or more of these features are in use on almost every network in the world. Learn these features for success in both the exam room and the real world!

Tag: Cisco, CCNP, BCMSN

November 18, 2006 Posted by | BCMSN, CCNP | 1 Comment

Static VLANs

BCMSN exam success and earning your CCNP certification requires you to add to your knowledge of VLAN configuration.

When you studied for your CCNA exam, you learned how to place ports into a VLAN and what the purpose of VLANs was, but you may not be aware that there are two types of VLAN membership. To pass the BCMSN exam, you must know the details of both types.

In this tutorial, we´ll take a look at the VLAN type you are most familiar with, the “static VLAN”. As you know, VLANs are a great way to create smaller broadcast domains in your network. Host devices connected to a port belonging to one VLAN will receive broadcasts and multicasts only if they were originated by another host in that same VLAN. The drawback is that without the help of a Layer 3 switch or a router, inter-VLAN communication cannot occur.

The actual configuration of a static VLAN is simple enough. In this example, by placing switch ports 0/1 and 0/2 into VLAN 12, the only broadcasts and multicasts hosts connected to those ports will receive are the ones transmitted by ports in VLAN 12.

SW1(config)#int fast 0/1
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 12
% Access VLAN does not exist. Creating vlan 12

SW1(config-if)#int fast 0/2
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 12

One of the many things I love about Cisco switches and routers is that if you have forgotten to do something, the Cisco device is generally going to remind you or in this case actually do it for you. I placed port 0/1 into a VLAN that did not yet exist, so the switch created it for me!

There are two commands needed to place a port into a VLAN. By default, these ports are running in dynamic desirable trunking mode, meaning that the port is actively attempting to form a trunk with a remote switch in order to send traffic between the two switches. The problem is that a trunk port belongs to all VLANs by default, and we want to put this port into a single VLAN only. To do so, we run the switchport mode access command to make the port an access port, and access ports belong to one and only one VLAN. After doing that, we placed the port into VLAN 12 with the switchport access vlan 12 command. Running the switchport mode access command effectively turns trunking off on that port.

The hosts are unaware of VLANs; they simply assume the VLAN membership of the port they´re connected to. But that´s not quite the case with dynamic VLANs, which we´ll examine in the next part of this BCMSN tutorial.

Technorati: VLAN, BCMSN, CCNP

March 23, 2006 Posted by | BCMSN, CCNP | Leave a comment