Discussion on:

28
Comments

Join the conversation!

Follow via:
RSS
Email Alert
0 Votes
+ -
"WR T" is not the same command as "copy run start". "WR T" does the same thing as "show running-config". If you use the command "WR", then you will achieve the "copy run start" function.
'wri mem' does wink
0 Votes
+ -
You are correct! This was fixed in the article, Thanks!
0 Votes
+ -
More please
5h4rk 16th Nov 2007
I would like to see more tips please.
This is very cool, learning something new everyday.
Personally I use the short codes and then the TAB key so I can see and control if I use the right commands. This TAB key doesn't work on the FWSM (Version 4.1(3)), but that isn't IOS...
I personally also like to use the ctrl-a and ctrl-e keys to go to the beginning or the end of a line. I also like the show run interface command to see just the configuration of a particular interface...
0 Votes
+ -
Have you ever been typing a command on a Cisco router or switch when some debug or informational message spits out on the screen and throws you off?

The answer is Ctrl+r. This quick command will bring you back to the prompt with the portion of the command you got typed before the debug threw you off.
0 Votes
+ -
Good tip...there is also a command you can enter on the router to stop this from happening altogether....on all your line configs aka line vty 0 4 line con 0 put the command logging synchronous
0 Votes
+ -
Tab works too
Joe-Swanson 1st Jul 2008
just press tab.
0 Votes
+ -
If you set up an alias, it may save you time NOW, but when you forget the actual command because you never type it out anymore, or worse, go to someone else's router that doesn't have your little shortcut, you are hosed.

I keep the abbreviations to a minimum because everytime I type it out, it reinforces it's self.

Saving two seconds to type in a command is not a valid savings in my mind for what it could cost you later on.
I agree with you about the aliases. They are not necessary...

But the shortcuts/abbreviations, I use all the time and actually do save a lot of time. When working in a large environment, such as an Enterprise with 6 Hospitals and 12 Medical Plazas, every bit of time-saving helps. Plus, I am very comfortable with IOS, so I know what I am typing out...

If someone is just starting out, then I would suggest typing out the whole command or using the TAB key just to ensure you are typing the correct command.
I think Cisco command aliases are a really bad idea. You are training your fingers and mind to remember the alias rather then the true command. I have met a lot of people who work on AS400s as operators and they have lost the actual command and just know their shortcuts. Not cool.

The DO command is really cool. Can't wait to try it out. -WTS
The do command in global is pretty nice. I wish it work with the command word completion though. I use that feature constantly. When in global using the do command you have to spell out each command word completley.

Thanks for the Tips!
0 Votes
+ -
Actually,....
digitalb 16th Nov 2007
depending on the version of IOS you DO NOT have to fully type out each command. For example our Core Router uses the following IOS (Version 12.2(17b)SXA)... rather old, but it support abbreviated "do" commands from Global Mode.
EX:
C2_DC_CA_2501(config)#do sh ver
Cisco Internetwork Operating System Software
IOS (tm) s72033_rp Software (s72033_rp-PK9SV-M), Version 12.2(17b)SXA, RELEASE SOFTWARE (fc1)
TAC Support: http://www.cisco.com/tac

This is an incredibly useful shortcut.
Another great shortcut is the "/"
If I do a "sh run" with no filters, when it is time to hit the space bar to page down, and I know what I am looking for I simply type / and then the part of the config I am looking for.
EX:
C2_DC_CA_2501(config)#do sh ru
Building configuration...

Current configuration : 54279 bytes
!
! Last configuration change at 15:26:25 EST Tue Nov 13 2007 by
! NVRAM config last updated at 15:26:27 EST Tue Nov 13 2007 by
!
version 12.2
no service pad
service timestamps debug datetime
service timestamps log datetime localtime
service password-encryption
--More-- (Now instead of pressing the space bar I type "/")
and I get this prompt:
/
Now type the word you are looking for. In this case I typed "ip c" and it took me directly to my classless static routes section of my config. This is also a major time saver if you know what you are looking for. Try it a few times and you will quickly become adept at using it.
-b
0 Votes
+ -
show run | begin ip c
show run | include ip c

I like this command better because you can tell it to "begin" the output once it gets to first iteration of this string, or you can say only "include" portions of the config containing this string.

Or if you really want to be slick you can specify multiple search strings. If you've ever worked with IPSec tunnels on a Cisco router you know that the crypto outputs are way too long. In the example below I wanted to filter the output of the "show ipsec sa" command to only show me lines with "172." and "Status" in them. The output quickly shows me the endpoints of the security association and it's status.

Router#show crypto ipsec sa | inc 172.|Status
Crypto map tag: DMVPN-head-2, local addr 172.16.1.4
local ident (addr/mask/prot/port): (172.16.1.4/255.255.255.255/47/0)
remote ident (addr/mask/prot/port): (172.16.1.2/255.255.255.255/47/0)
current_peer 172.16.1.2 port 500
local crypto endpt.: 172.16.1.4, remote crypto endpt.: 172.16.1.2
Status: ACTIVE
Status: ACTIVE

Other useful ones to try:

show run | inc interface|ip address
show run | inc access-list|access-group
0 Votes
+ -
Alternative
network_junta 19th Nov 2007
"show run | i interface|ip address" is equivalent to "sh ip int br".

if you want to know the IP address of a particular interface then you can use "sh ip int br ", ex: sh ip int br gig1/0
Please keep teaching to us newbeez
Thank you
I really like the default interface command - I use it with the range command to reconfigure a group of misconfigured ports on a switch all at once
Example:
default interface range gigaethernet 1/0/12 - 18
0 Votes
+ -
Try this too !
network_junta Updated - 19th Nov 2007
If you need to execute a command on a linecard then you don't have to attach to linecard. use the command "exec slot ".

ex: exe slot 3 sh ip cef
Personally I do not like seeing the service sequence-numbers in the logs. Unfortunately somewhere in the past year all my IOS devices decided to turn this option on. Has anyone else experienced this?
I am a newbie to the Cisco IOS and I am using some old 2500 series routers for my CCNA practice. Anyone know with what version of the IOS can that trick above with the 'do' command that allows you to run privileged mode commands from global config mode? I am using IOS Version 12.1(4)
0 Votes
+ -
12.2(8)T
n.stockwell@... 22nd Nov 2007
According to the Cisco's Configuration Fundamentals guide for 12.4 (http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cr/hcf_r/cfn_02h.htm#wp1035222) the 'do' command was introduced in version 12.2(8)T.

I have a few 2501 myself and I can't use 'do' either. However, if your just starting out I would recommend you start out avoiding the 'do' command because I found it very important to understand the what and the why behind using different command at different prompts.

The 'do' command, while helpful, can cause newbies to not think about what the point is to having different prompts.
Keyboard Shortcuts:
Prev
Next
Toggle
Join the conversation
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.