A recent thread on TechExams gave me the idea for a post on all the variations of the “show run” command. In this article I’ll go through the variations that I use the most, and some others that I don’t use much, but are pretty helpful.

Let’s take a look:

First we’ll look at all the options provided by IOS help:

EDGE#sh run ?
  all            Configuration with defaults
  brief          configuration without certificate data
  class-map      Show class-map information
  control-plane  Show Control-Plane information
  flow           Global Flow configuration subcommands
  full           full configuration
  interface      Show interface configuration
  linenum        Display line numbers in output
  map-class      Show map class information
  policy-map     Show policy-map information
  ssid           Show Dot11 SSID information
  view           View options
  vlan           Show L2 VLAN information
  vrf            Show VRF aware configuration
  |              Output modifiers

I’m sure everyone reading this has used good old “sh run” many times. What about the other options? I use “sh run interface” quite a bit:

EDGE#sh run int fa0/0
interface FastEthernet0/0
 description OUTSIDE
 ip address xx.xx.xx.xx
 ip access-group OUTSIDE_IN in
 no ip redirects
 no ip unreachables
 no ip proxy-arp
 ip accounting access-violations
 ip nbar protocol-discovery
 ip nat outside
 ip virtual-reassembly
 load-interval 30
 duplex auto
 speed auto
 no cdp enable
 service-policy input QoS_IN
 service-policy output SHAPER

That and “sh run | section” are probably the variations I use most:

EDGE#sh run | sec ephone-dn
ephone-dn  1  dual-line
 number 5001 no-reg primary
 label Colby
 name Colby
ephone-dn  3
 number 5003 no-reg primary
 label Laptop
 name Colby-Laptop
ephone-dn  4
 number 5004 no-reg primary
 name Wireless
ephone-dn  5
 number 5005 no-reg primary
ephone-dn  6
 number 5006 no-reg primary
 name Katie
ephone-dn  11  dual-line
 number 555-555-5555
 label 555-555-5555
 name Colby

That one is perfect for times when you are looking for specific parts of the config, without having to wade through everything.

A new one I just learned from Networking-Forum:

EDGE#sh run
Building configuration...
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
/ospf <--- I typed this
router ospf 200
 network area 1
 network area 0
 network area 0