Monday, April 30, 2007

do - Executing Commands in Configuration Mode

Ever need to execute a command when you have already dropped into the configuration mode? I used to spend alot of time dropping out of config mode to either look at an interface configuration or verify that a command I had just entered actually affected my device as I had expected before moving on to more configuration tasks. As of IOS 12.2(8)T Cisco added a new command called do. This allows you to run an EXEC level command in configuration mode. Simple, just run do show run int fa0/0 and you'll get the output without having to go into EXEC mode. A quick example:


Router#
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#sh run int fa0/0
^
% Invalid input detected at '^' marker.

Router(config)#do sh run int fa0/0
Building configuration...

Current configuration : 133 bytes
!
interface FastEthernet0/0
description 3mb Internet Connection
ip address 172.16.1.60 255.255.255.248
speed 100
full-duplex
end

Router(config)#


A brief overview of the command can be found here:

http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124tcr/tcf_r/cf_02ht.htm#wp1035222

Welcome - First Post

Welcome. I decided to give this blog a try and see how it will work out.

I plan to add some random notes on various network things I run into in my daily life. I intend to pick up my CCIE studies again in the near future after getting tired of it a few years back. I should start posting some more interesting information once I start that back up. Until then I'll post information and links to some of the lesser known commands that I find useful in hopes they will help someone out. If you have any ideas for something I should put here, let me know!

Thanks