Back to the Basics – Showing Run like a Pro

Standard

Continuing the theme of showing what show commands can do, let’s look at show run for a bit.

A Cisco configuration can range from dozens of lines to thousands depending on what is setup on the router so here are some tips to help you control exactly what you are looking at.

One of the most useful filters is the interface keyword, this lets you show just the configuration for a particular interface. Incidentally the fact that PT doesn’t support this command is one of things I find most frustrating about the tool.

R01#show run interface g2.254
Building configuration...

Current configuration : 100 bytes
!
interface GigabitEthernet2.254
 encapsulation dot1Q 254
 ip address 10.0.254.1 255.255.255.0
end

You can also use the partition keyword to show specific configuration for routing processes, or things like ACLs.

R01#show running-config partition router ospf 1
Building configuration...

Current configuration : 134 bytes
!
Configuration of Partition - router ospf 1
!
!
!
!
!
!
router ospf 1
 router-id 1.1.1.1
 network 10.1.2.0 0.0.0.255 area 0

We can also search the output by pressing / at the --more-- pager and typing a search term. This actually works for all show commands though it is usually the most useful with viewing configs.

R01#show run  
Building configuration...

Current configuration : 4356 bytes
!
! Last configuration change at 06:57:42 UTC Mon Feb 6 2017
!
version 16.4
service timestamps debug datetime msec
service timestamps log datetime msec
no platform punt-keepalive disable-kernel-core
platform console serial
!
hostname R01
!
boot-start-marker
boot-end-marker
!
!
vrf definition Mgmt-intf
 !
 address-family ipv4
 exit-address-family
 !
 address-family ipv6
/router   
filtering...
router ospf 1
 router-id 1.1.1.1
 network 10.1.2.0 0.0.0.255 area 0

If you want to include linenumbers we can use the linenum keyword, this can be handy for reference purposes. You can use this with viewing the startup-config as well.

R01#show run  linenum 
Building configuration...

Current configuration : 4286 bytes
     1 : !
     2 : ! Last configuration change at 03:44:31 UTC Mon Feb 6 2017
     3 : !
     4 : version 16.4
     5 : service timestamps debug datetime msec
     6 : service timestamps log datetime msec
     7 : no platform punt-keepalive disable-kernel-core
     8 : platform console serial
     9 : !
    10 : hostname R01
    11 : !
    12 : boot-start-marker
    13 : boot-end-marker
    14 : !
    15 : !
    16 : vrf definition Mgmt-intf
    17 :  !
    18 :  address-family ipv4
    19 :  exit-address-family
    20 :  !
    21 :  address-family ipv6

I’ll skip the example but the brief keyword will skip the certificate information in the running config which can help clean up the output a bit.

Lastly we can use the all keyword so the router will show all the default configuration that is normally not shown. This can be useful to remind yourself how something is configured by default.

R01#show run all | sec Gigabit.*254
interface GigabitEthernet2.254
 encapsulation dot1Q 254
 ip address 10.0.254.1 255.255.255.0
 ip redirects
 ip unreachables
 ip proxy-arp
 ip mtu 1500
 ip pim join-prune-interval 60
 ip pim dr-priority 1
 ip pim query-interval 30
 ip mfib forwarding input
 ip mfib forwarding output
 ip mfib cef input
 ip mfib cef output
 no ip flowspec
 ip cef accounting non-recursive internal
 ip load-sharing per-destination
 ip route-cache
 ip split-horizon
 ip igmp last-member-query-interval 1000
 ip igmp last-member-query-count 2
 ip igmp query-max-response-time 10
 ip igmp v3-query-max-response-time 10
 ip igmp version 2
 ip igmp query-interval 60
 ip igmp tcn query count 2
 ip igmp tcn query interval 10
 no shutdown
 no medium p2p
 ipv6 nd reachable-time 0
 ipv6 nd ns-interval 0
 ipv6 nd dad attempts 1
 ipv6 nd dad loopback detect
 ipv6 nd prefix framed-ipv6-prefix
 ipv6 nd nud igp
 no ipv6 nd ra solicited unicast
 ipv6 nd ra lifetime 1800
 ipv6 nd ra interval 200
  ipv6 redirects
  ipv6 unreachables
 ipv6 mfib forwarding input
 ipv6 mfib forwarding output
 ipv6 mfib cef input
 ipv6 mfib cef output
 no ipv6 flowspec
 mpls mtu 1500
 mpls mldp
 no snmp trap link-status
 autonomic
 arp timeout 14400
 no h323-gateway voip interface
 no bgp-policy accounting input
 no bgp-policy accounting output
 no bgp-policy accounting input source
 no bgp-policy accounting output source
 no bgp-policy source ip-prec-map
 no bgp-policy source ip-qos-map
 no bgp-policy destination ip-prec-map
 no bgp-policy destination ip-qos-map

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s