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
  <cr>

Router#

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)
Router#

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:
Router#dir
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)
Router#

#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)
Router#

#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]
Router#

#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)
Router#

#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

Router#

#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).
Router#

#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
Router#

#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]
.....{truncated}.......
Fsck of flash: complete
Router#

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

Viva IPv6

It’s alive, but not quite ready. And it might be slowing down network response. You have some options for disabling IPv6 for now.

IPv6 is coming, yet at what appears to be a glacial pace. The problem, though, is that IPv6’s prevalence in Windows Vista and Windows Server 2008 means that these OSs at times tend to give an IPv6 response to a network request instead of the IPv4 answer we’re used to seeing.

When this happens, it can be cumbersome to troubleshoot what problem is affecting the server or desktop, doubly so when you’re not familiar with IPv6’s addressing scheme or nomenclature.

Among others, there are two things you can do that can assist with keeping IPv6 out of the picture for now, at least until global warming speeds IPv6’s glacial melt-off. The first is the “-4” switch used with the ping command. IPv6 responses to ping requests can be confusing, so this switch forces ping to use IPv4 for the query. To use this switch, simply enter it before the hostname you want to ping, as in:

ping -4 {hostname}

Another option is to disable IPv6 functionality entirely. This can be done by editing the registry. In the location HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\ create a registry DWORD value titled DisabledComponents. Set the data for this value to 0xffffffff to disable all IPv6 components except for the IPv6 loopback interface. This setting also configures the computer to prefer IPv4 over IPv6. Restart the computer for the setting to take effect.

Later on, when you implement IPv6 in your network, simply reset this value’s data to 0 and reboot again and you’re merrily on your way to the networking of tomorrow.

May 28, 2008 Posted by | Tech, Technology | | Leave a comment

Subnetting: Beyond CCNA?

Question:At my work, we have multiple networks set up across the world and I was looking over a listing of how our networks are subnetted. Here’s an example of how we’re set up on one of our networks:

Subnet id of 150.100.204.96
Range of .97 – .110
Broadcast of .111 on a subnet mask of /28 and the next subnet is
150.100.204.112-143 /27

It does work, but it seems contradictory to what’s taught in the basic CCNA courses. Is this typical advanced subnetting that I just haven’t learned or read about?

Answer:

Based on your IP subnets there, it looks like you’re running into the logical dilemma of mixing different types of subnets all next to each other.

If we used only /28s, we would expect:

150.100.0.0 (Giving hosts from .1 through .14 with a broadcast of .15.)
150.100.0.16 (Giving hosts from .17 through .30 with a broadcast of .31.)
150.100.0.32 (You get the point, so I won’t list them all!)
150.100.0.48
150.100.0.64
150.100.0.80
150.100.0.96
150.100.0.112
150.100.0.128
150.100.0.144
150.100.0.160
150.100.0.176
150.100.0.192
150.100.0.208
150.100.0.224
150.100.0.240

Now, if we had /27s, we would expect:

150.100.0.0 (Giving hosts from .1 through .30 with a broadcast of .31.)
150.100.0.32 (Giving hosts from .33 through .62 with a broadcast of .63.)
150.100.0.64 (Again, you get the point.)
150.100.0.96
150.100.0.128
150.100.0.160
150.100.0.192
150.100.0.224

I believe that’s the way we try to learn things in the CCNA/CCENT training. Mostly, we do that in order to be able to grasp the concepts of binary and how the router looks at things without running the risk of our heads exploding. What the router really looks at is pure binary groups, and as long as there’s no overlap, we’re good to go.

So notice the groupings we can have in the two lists. We all should’ve learned why we cannot have 150.100.0.80/27 as an example. While it makes perfect sense from a counting standpoint that this would allow from .81 to .110 as host addresses, it doesn’t work because of “crossing a bit boundary” (of .96) in the middle of it.

As long as we don’t cross any bit boundaries, though, we’re able to mix and match however we’d like to see things done and in any particular order (get ready for a little headache).

On a single router, or anywhere within my network, I could have:

150.100.0.0/26 (Gives us from .1 to .62 as hosts and .63 as broadcast.)
150.100.0.64/28 (Gives us from .65 to .78 as hosts and .79 as broadcast.
150.100.0.80/29 (Gives us from .81 to .86 as hosts and .87 as broadcast.)
150.100.0.88/30 (Gives us from .89 to .90 as hosts and .91 as broadcast.)
150.100.0.92/31 (Gives us a point to point link with .92 and .93 usable.)
150.100.0.94/31 (Gives us a point to point link with .94 and .95 usable.)
150.100.0.96/27 (Gives us from .97 to .126 as hosts and .127 as broadcast.)
150.100.0.128/25 (Gives us from .129 to .254 as hosts and .255 as broadcast.)

We could have interfaces/networks with all of those subnets, all at the same time, because each and every one of them is contained within a bit boundary based on its netmask.

The router works in a purely binary world. So as long as each separate thing doesn’t violate any rule (like overlap another interface, or cross a bit boundary), then life is good!

CCNA/CCENT training gives us the building blocks by which we can make everything possible, but it’s often not the only way that we have to do things. I know that some people get very irritated by that, but think about it a different way.When you were first learning the concepts of multiplication and division, would it have been nice for your teacher to make you divide two fractions? Or give some long, heinous math problem involving parentheses and stuff? We certainly know now that it’s possible, but at that point in time, our heads would have exploded!

As you progress in networking, and certainly as you get into the world of CCIE, you’ll get to discover all sorts of things that make you go “hmm.” But I hope this at least helps give you a better understanding of the way routers think about things!

March 27, 2008 Posted by | CCNA, CCNP, Education, Tech, Technology | | 1 Comment

CCVP GETS A FACELIFT

With all the changes and advances in IP telephony, Cisco announced that it’s “enhancing” its Cisco Certified Voice Professional (CCVP) certification.

This certification requires five exams beyond the Cisco Certified Network Associate (CCNA) and focuses on integrating IP telephony solutions into underlying network architectures, as well as the ability to implement, configure and troubleshoot. Those who earn the certification are expected to know PSTN, VoIP, signaling protocols, voice gateways, gatekeepers and the Cisco Unified Border Element (CUBE).

Read the full article here.

March 27, 2008 Posted by | CCNA, CCNP, CCSP, Education, News, Tech, Technology | , , | Leave a comment

How to pass your CCNA exam

Ambition without knowledge is like a boat on dry land. If you truly want to set sail and reach your goal of Cisco certification, you will need several keys to help you reach it. In order to gain the knowledge required to pass the Cisco Certified Network Associate (CCNA) exam, you have to familiarize yourself with various mediums of information.Before I discuss those mediums, however, I want to mention what is most important for success. What is truly required to obtain any Cisco certification is not a tangible item (such as the plethora of books, manuals, PDF documents, Web sites and countless other commercial tools that are out there). It is the psychological fuel that motivates you to follow through with those tools and implement them into your understanding of the exam.

How to pass your CCNA exam

August 22, 2007 Posted by | CCNA, CCNP, Education | 1 Comment

CCNA certification: When to study, what to read

A few years ago, I had lost my driver’s license and with it my job. After a few months of searching, I eventually found a new job, but getting there and back meant an hour and a half each day on the train and a two mile walk to the office from the station.

I quickly realized I needed a way of killing time until I got to work — there was no way I was going to spend 3+ hours of my day staring out of a train window at a blur and having no choice but to listen to someone else’s music blaring out of their earphones.

My network manager at the time had mentioned studying for my CCNA, as there were only a few people there with any real routing/switching knowledge. So I decided that day to go out and buy one of the many CCNA books that were available.

Read the full CCNA certification: When to study, what to read article.

August 22, 2007 Posted by | CCNA, Education | Leave a comment

BOOK OF THE WEEK: CCNP ONT OFFICIAL EXAM CERTIFICATION GUIDE

CCNP certification continues to hold its value in the marketplace,and Cisco Press continues to put out high-quality study guides for the exams.

One of the newest entries in the line is Amir Ranjbar’s “CCNP ONT Official Exam Certification Guide.” Targeted at exam 642-845, this book walks through the objectives in an understandable manner and condenses what you need to know into a manageable package.

Tags: CCNP, CCNP Certification

July 13, 2007 Posted by | CCNP, Education, Tech, Technology | Leave a comment

EIGRP And Split Horizon

EIGRP is a major topic for your CCNA and CCNP studies, and one basic skill you’ll need to pass your Cisco certification exams is to identify situations where you need to enable or disable split horizon.

EIGRP commands tend to be a little different than those used with other protocols, so let’s take a look at how EIGRP and split horizon interoperate.

R1 is our hub router, with R2 and R3 as the spokes. There are no subinterfaces, and each router is advertising a single loopback network using its router number for each octet. R1 will see both R2 and R3’s loopback network, but the spokes will not have a route to the other spoke’s loopback. “show ip route eigrp” verifies this.

eigrp1.gif

EIGRP runs split horizon by default, making it impossible for R1 to forward an advertisement to R2 regarding R3’s loopback. Likewise, R1 cannot advertise R2’s loopback address to R3. We could configure two subinterfaces on R1 to resolve this issue, but here we’re going to disable split horizon instead.

eigrp2.gif

Note that disabling split horizon resulted in the EIGRP adjacencies being torn down. They came back up 20 – 35 seconds after being torn down according to the timestamps, but that’s a good detail to keep in mind!

The routing tables of each spoke should now show the loopback network configured on the remote spoke.

eigrp3.gif

Be careful when disabling split horizon. In this scenario, R1 can and will advertise routes out Serial0 that were learned about on that interface in the first place, and that’s not always desirable. Split horizon is enabled by default for a reason, so be careful when disabling it!

April 2, 2007 Posted by | CCNA, CCNP, Education, EIGRP, Technology | Leave a comment

Using OSPF’s

BSCI exam success, not to mention earning your CCNP, can come down to your OSPF route summarization skills.

There are a few different commands and situations you need to be ready for, and one of these situations is the proper use of the “summary-address” command.

The summary-address command should be used on an ASBR in order to summarize routes that are being injected into the OSPF domain via redistribution. In the following example, four routes are being redisitributed into OSPF on R1, making R1 an ASBR.

interface Loopback16
ip address 16.16.16.16 255.0.0.0
!
interface Loopback17
ip address 17.17.17.17 255.0.0.0
!
interface Loopback18
ip address 18.18.18.18 255.0.0.0
!
interface Loopback19
ip address 19.19.19.19 255.0.0.0
R1(config)#router ospf 1
R1(config-router)#redistribute connected subnets

These four routes are seen on downstream router R2 as External Type-2, the default for routes redistributed into OSPF.

R2#show ip route ospf
O E2 17.0.0.0/8 [110/20] via 172.12.123.1, 00:00:07, Serial0
O E2 16.0.0.0/8 [110/20] via 172.12.123.1, 00:00:07, Serial0
O E2 19.0.0.0/8 [110/20] via 172.12.123.1, 00:00:07, Serial0
O E2 18.0.0.0/8 [110/20] via 172.12.123.1, 00:00:07, Serial0

To summarize networks learned by redistribution, use the OSPF command summary-address. You can probably do this summarization in your head, but do so before continuing with the lab.

R1(config)#router ospf 1
R1(config-router)#summary-address 16.0.0.0 252.0.0.0

Look at the change in R2s OSPF table.

R2#show ip route ospf
O E2 16.0.0.0/6 [110/20] via 172.12.123.1, 00:00:05, Serial0

The external routes have been successfully summarized. Note that the summary route is still marked as an E2 route.

Theres an interesting route installed into R1s OSPF table as well.

R1#show ip route ospf
O 16.0.0.0/6 is a summary, 00:01:51, Null0

When you configure summary routes in OSPF, a route to null0 will be installed into the OSPF routing table. This helps to prevent routing loops. Any packets destined for the routes that have been summarized will have a longer match in the routing table….

C 17.0.0.0/8 is directly connected, Loopback17
C 16.0.0.0/8 is directly connected, Loopback16
C 19.0.0.0/8 is directly connected, Loopback19
C 18.0.0.0/8 is directly connected, Loopback18

O 16.0.0.0/6 is a summary, 00:03:10, Null0
O 12.0.0.0/6 is a summary, 00:07:53, Null0

… and packets that do not match one of the summarized routes but do match the summary route will be dropped.

March 17, 2007 Posted by | BSCI, CCNP | Leave a comment

OSPF Virtual Links

Knowing when and how to create an OSPF virtual link is an essential skill for BSCI and CCNP exam success, not to mention how important it can be on your job!

As a CCNA and CCNP candidate, you know the theory of virtual links, so let’s take a look at how to configure a virtual link, as well as some real-world tips that many CCNA and CCNP study guides leave out!

In this configuration, no router with an interface in Area 4 has a physical interface in Area 0. This means a logical connection to Area 0, a virtual link, must be built.

Tn the following example, R1 and R3 are adjacent and both have interfaces in Area 0. R4 has an adjacency with R3 via Area 34, but R4 has no physical interface in Area 0 and is advertising its loopback 4.4.4.4 into OSPF. R1 doesn’t have the route to that loopback.

R1#show ip route ospf
6.0.0.0/32 is subnetted, 1 subnets
O 6.6.6.6 [110/11] via 10.1.1.5, 01:05:45, Ethernet0
172.23.0.0/27 is subnetted, 1 subnets
O IA 172.23.23.0 [110/74] via 172.12.123.3, 00:04:14, Serial0
7.0.0.0/32 is subnetted, 1 subnets
O 7.7.7.7 [110/11] via 10.1.1.5, 01:05:45, Ethernet0

To resolve this, a virtual link will be built between R3 and R4 through Area 34. The area through which the virtual link is built, the transit area, cannot be a stub area of any kind.

R4(config)#router ospf 1
R4(config-router)#area 34 virtual-link 3.3.3.3
R3(config)#router ospf 12d07h: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 172.23.23.4, Ethernet0

R3(config)#router ospf 1
R3(config-router)#area 34 virtual-link 4.4.4.4
R3(config-router)#^Z
2d07h: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on OSPF_VL0 from LOADING to FULL, Loading Done

A few details worth noting… the virtual link command uses the remote device’s RID, not necessarily the IP address on the interface that’s in the transit area. Also, don’t worry about that error message you see in the output from R3 that is normal and you’ll see it until you finish building the virtual link.

Always confirm the virtual link with show ip ospf virtual-link. If you’ve configured it correctly, the VL should come up in a matter of seconds.

R3#show ip ospf virtual-link
Virtual Link OSPF_VL0 to router 4.4.4.4 is up
Run as demand circuit
DoNotAge LSA allowed.
Transit area 34, via interface Ethernet0, Cost of using 10
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:00
Adjacency State FULL (Hello suppressed)
Index 2/4, retransmission queue length 1, number of retransmission 1
First 0x2C8F8E(15)/0x0(0) Next 0x2C8F8E(15)/0x0(0)
Last retransmission scan length is 1, maximum is 1
Last retransmission scan time is 0 msec, maximum is 0 msec
Link State retransmission due in 3044 msec

Viirtual links are actually simple to configure, but for some reason they seem to intimidate people. It’s my experience that the error message highlighted in R3’s output above causes a lot of panic, but the only thing that message means is that you’re not finished configuring the virtual link yet.

There are three main misconfigurations that cause 99% of virtual link configuration issues:

  • Using the wrong OSPF RID value
  • Trying to use a stub area as the transit area
  • Failure to configure link authentication on the virtual link when Area 0 is running authentication

That last one is the one that gets forgotten! A virtual link is really an extension of Area 0, and if Area 0 is running link authentication, the virtual link must be configured for it as well. Pay attention to the details. don’t panic when you see the error message on the second router you configure with the virtual link, and you’ll be ready for any virtual link situation on the job or in the CCNA / CCNP exam room!

March 17, 2007 Posted by | BSCI, CCNP, Education, Technology | Leave a comment