brief/abbreviated "show configuration" command

  • 0
  • 1
  • Question
  • Updated 9 months ago
  • Answered
Hey,

Often times I just want a quick print out of the live config on a switch and see if there are any oddities.The problem is many of the per-port commands (QPs, DiffServ Exam/Replace, LLDP/CDP/EDP) add a config line entry for each port. If I have a stack of 48 port switches even the most basic config can span hundreds and hundreds of lines. Is there a way to show a condensed show configuration" command?

For example, issuing a single command to enable full LLDP TLVs adds ~250 lines to the configuration per switch.
Photo of kyler hauschildt

kyler hauschildt

  • 80 Points 75 badge 2x thumb

Posted 9 months ago

  • 0
  • 1
Photo of Necheporenko, Nikolay

Necheporenko, Nikolay, Employee

  • 1,450 Points 1k badge 2x thumb
Hello Kyler,

You may do filtering config per module and also do grep for including/excluding config lines, like in example below:

SW2.1 # sh configuration 
  <cr>            Execute the command
  detail          display all configuration data including default, otherwise default would not be displayed
  |               Filter the output of the command
  <module-name>   Configuration module name
    "aaa"         "acl"         "cfgmgr"      "cfm"         "devmgr"      
    "dirser"      "dosprotect"  "eaps"        "edp"         "elrp"        
    "elsm"        "ems"         "epm"         "erps"        "esrp"        
    "etmon"       "fdb"         "hal"         "hclag"       "idMgr"       
    "ipSecurity"  "lacp"        "lldp"        "mcmgr"       "mrp"         
    "netlogin"    "nettools"    "nodemgr"     "poe"         "polMgr"      
    "rtmgr"       "snmp"        "stp"         "telnetd"     "thttpd"      
    "vlan"        "xmlc"        "xmldbe"      
SW2.1 # sh configuration "lldp" | 
  begin           Display all the lines starting with the first line that matches the regular expression
  exclude         Do not display the lines that match the regular expression
  include         Display the lines that match the regular expression
Photo of kyler hauschildt

kyler hauschildt

  • 80 Points 75 badge 2x thumb
Thanks Nikolay.

I should have stated that I already use include and categories when I can , I'm just wondering if there's a way to condense the config into something similar to the commands someone would actually enter.

For example, I'm on a stack of two X460-48t switches and someone entered:
create qosprofile QP2
create qosprofile QP5
create qosprofile QP6
Those three commands resulted in 350 lines being added to the running configuration with each line being for a specific QP for a specific port:
...
configure qosprofile QP2 minbw 0 maxbw 100 ports 1:1
configure qosprofile QP2 minbw 0 maxbw 100 ports 1:2
configure qosprofile QP2 minbw 0 maxbw 100 ports 1:3
configure qosprofile QP2 minbw 0 maxbw 100 ports 1:4
configure qosprofile QP2 minbw 0 maxbw 100 ports 1:5
...
Whereas most vendors would condense this down into:
configure qosprofile QP2 minbw 0 maxbw 100 ports 1:1-1:58
configure qosprofile QP2 minbw 0 maxbw 100 ports 2:1-2:58
For most vendors showing the running config is considered to be the go-to command when trying to figure out how a switch has been configured. Configuration categories and the include command are useful if I already know what I'm looking for but I'm finding that's the case less and less often the more I work :)
Photo of Drew C.

Drew C., Community Manager

  • 38,610 Points 20k badge 2x thumb
The closest thing to this that I'm aware of is the "show config clean" script that we've got on our GitHub:
https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python/show_config_clean

By adding some additional logic to this script, it could be updated to further condense configuration lines like you're suggesting.