Helpful command shortcuts - Layer 2

As I continue to study, I have been increasingly developing shortcut commands that aid in identifying exact information I want to see.  Please contribute yours:

Spanning-tree
show spanning-tree vlan 146 bridge detail
show spanning-tree vlan 10 bridge detail
show spanning-tree vlan 10 | i This|Fa

VTP
show vtp status | i Op|Dom|MD5

VLANs
show vlan | i VL

Interfaces
show inter status | i trunk
show inter status | ex not
show run | i (0/[1-2][0-9])|switch
show ip int brie | ex admin

Comments

  • VTP
    show vtp status | i Op|Dom|MD5

    I would add following commands for VTP troubleshooting

    show vtp statistics

    show vtp password

    Interfaces
    show inter status | i trunk
    show inter status | ex not
    show run | i (0/[1-2][0-9])|switch
    show ip int brie | ex admin

    I would add following commands for trunk related troubleshooting

    show interfaces switchport

    show interface fa0/0 switchport

    show interfaces trunk

    Lots of commands for spanning-tree

     

  • Spanning-tree
    show spanning-tree vlan 146 bridge detail
    show spanning-tree vlan 10 bridge detail
    show spanning-tree vlan 10 | i This|Fa

    VTP
    show vtp status | i Op|Dom|MD5

    VLANs
    show vlan | i VL

    Interfaces
    show inter status | i trunk
    show inter status | ex not
    show run | i (0/[1-2][0-9])|switch
    show ip int brie | ex admin

    Interesting set of command shortcuts but most of the times these commands are used.

    show spanning-tree vlan 10 or detail

    show vtp status and password

    sh vlan brief

    show run int f0/0

    show ip int br | ex unass

    show int trunk

    show etherchannel summary 

    etc...

  • These are indeed great commands, adding two more to the list:

    sh spanning-tree root

    sh ip int brief | ex una

    HTH

    Good luck!

  • Hmmm... Lets begin with :

     

    sh ver | i bia

    sh vlan b | ex un

    sh int status | e una|do

     

    HTH...

    Deepak Arora

    http://deepakarora1984.blogspot.com

     

  • Here is another good use of regex for show commands.  when you get used to writing regex, they are really helpful.

    sh ip route rip | i (/24 [120/[6-9])
    ( - groups the regex
    /24 - finds /24 subnets
    [ - the is an escape character so i you can scan for the [ character in the string
    /[6-9] - looks for any hop count metric between 6 and 9

    Rack10SW2#sh ip route rip | i (/24 [120/[6-9])
    R    212.18.1.0/24 [120/8] via 155.10.58.5, 00:00:06, Vlan58
    R    212.18.0.0/24 [120/8] via 155.10.58.5, 00:00:06, Vlan58
    R    212.18.3.0/24 [120/8] via 155.10.58.5, 00:00:06, Vlan58
    R    212.18.2.0/24 [120/8] via 155.10.58.5, 00:00:06, Vlan58
    R       150.10.6.0/24 [120/7] via 155.10.58.5, 00:00:06, Vlan58

Sign In or Register to comment.