CLI For HP Switches|info@networkjourney.
com | +91 9739521088
            Cheatsheet Guide
CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 1 | 16
              CLI For HP Switches|info@networkjourney.com | +91 9739521088
                              Enable-Based Commands:
Sr.No      CLI Command             Privilege Mode                      Description
  1     enable                                         Enters privileged EXEC mode
 2      configure terminal                             Enters global configuration mode
                                                       Displays the currently running
 3      show running-config
                                                       configuration
                                                       Saves the current configuration to the
 4      write memory
                                                       startup config file
        copy running-config                            Copies the running configuration to the
 5
        startup-config                                 startup configuration
 6      reload                                         Reloads the switch
 7      show ip route                                  Displays the IP routing table
 8      show vlan                                      Displays VLAN information
 9      show interfaces                                Displays information about interfaces
                                                       Displays switch software and hardware
 10     show version
                                                       versions
                                                       Displays Spanning Tree Protocol (STP)
 11     show spanning-tree
                                                       information
 12     show logging                                   Displays logging information
                                    Privileged (#)
 13     show tech                                      Displays detailed technical information
                                                       Copies a file from a TFTP server to flash
 14     copy tftp flash
                                                       memory
                                                       Copies a file from flash memory to a TFTP
 15     copy flash tftp
                                                       server
 16     clear arp                                      Clears the ARP cache
        clear lldp info remote-
 17                                                    Clears LLDP neighbor information
        device
 18     clear logging                                  Clears the system log
 19     show interfaces status                         Displays the status of interfaces
        show ip route                                  Displays a summary of IP routing
 20
        summary                                        information
                                                       Displays detailed information about a
 21     show vlan id <vlan-id>
                                                       specific VLAN
        show interfaces                                Displays detailed information about a
 22
        <interface>                                    specific interface
        show mac-address-
 23                                                    Displays the MAC address table
        table
         CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 2 | 16
           CLI For HP Switches|info@networkjourney.com | +91 9739521088
     show spanning-tree                             Displays detailed Spanning Tree Protocol
24
     detail                                         (STP) information
25   show flash                                     Displays information about flash memory
26   show boot-config                               Displays the boot configuration
27   show startup-config                            Displays the startup configuration
     show tech
28                                                  Displays information about transceivers
     transceivers
     show system-
29                                                  Displays system information
     information
     copy startup-config                            Copies the startup configuration to the
30
     running-config                                 running configuration
     copy running-config                            Copies the running configuration to a TFTP
31
     tftp <ip-address>                              server
     copy startup-config                            Copies the startup configuration to a TFTP
32
     tftp <ip-address>                              server
33   reload at <time>                               Reloads the switch at the specified time
     copy startup-config
                                                    Copies the startup configuration to a TFTP
34   tftp <ip-address>
                                                    server
     <filename>
35   show tech all                                  Displays all technical information
36   show ip ospf neighbor                          Displays OSPF neighbor information
37   show ip bgp summary                            Displays a summary of BGP information
38   show ip bgp neighbor                           Displays BGP neighbor information
     show ip bgp
39                                                  Displays BGP community-list information
     community-list
     show ip bgp route-
40                                                  Displays BGP route-map information
     map
     show ip bgp
41                                                  Displays dampened BGP paths
     dampened-paths
     show ip bgp flap-
42                                                  Displays BGP flap statistics
     statistics
      CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 3 | 16
           CLI For HP Switches|info@networkjourney.com | +91 9739521088
     show ip bgp
43                                                  Displays dampened BGP paths
     dampened-paths
     show ip bgp
44                                                  Displays dampened BGP paths
     dampened-paths
     show ip bgp
45                                                  Displays dampened BGP paths
     dampened-paths
     show ip bgp
46                                                  Displays dampened BGP paths
     dampened-paths
     show ip bgp
47                                                  Displays dampened BGP paths
     dampened-paths
     show ip bgp
48                                                  Displays dampened BGP paths
     dampened-paths
     show ip bgp
49                                                  Displays dampened BGP paths
     dampened-paths
     show ip bgp
50                                                  Displays dampened BGP paths
     dampened-paths
     show ip bgp
51                                                  Displays dampened BGP paths
     dampened-paths
     show ip bgp
52                                                  Displays dampened BGP paths
     dampened-paths
     show ip bgp
53                                                  Displays dampened BGP paths
     dampened-paths
     show ip bgp neighbor                           Displays detailed information about routes
54
     <ip-address> routes                            exchanged with a specific BGP neighbor
     show ip bgp neighbor
                                                    Displays routes advertised by a specific BGP
55   <ip-address>
                                                    neighbor
     advertised-routes
     show ip bgp neighbor
                                                    Displays routes received from a specific
56   <ip-address> received-
                                                    BGP neighbor
     routes
     show ip bgp
57                                                  Displays dampened BGP paths
     dampened-paths
     show ip bgp
58                                                  Displays BGP community-list information
     community-list
     show ip bgp route-
59                                                  Displays BGP route-map information
     map
     show ip bgp flap-
60                                                  Displays BGP flap statistics
     statistics
      CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 4 | 16
          CLI For HP Switches|info@networkjourney.com | +91 9739521088
     show ip bgp
61                                                 Displays dampened BGP paths
     dampened-paths
     show ip bgp
62                                                 Displays dampened BGP paths
     dampened-paths
     show ip bgp
63                                                 Displays dampened BGP paths
     dampened-paths
     show ip bgp
64                                                 Displays dampened BGP paths
     dampened-paths
     show ip bgp
65                                                 Displays dampened BGP paths
     dampened-paths
     show ip bgp
66                                                 Displays dampened BGP paths
     dampened-paths
     show ip bgp
67                                                 Displays dampened BGP paths
     dampened-paths
     show ip bgp
68                                                 Displays dampened BGP paths
     dampened-paths
     show ip bgp
69                                                 Displays dampened BGP paths
     dampened-paths
     show ip bgp
70                                                 Displays dampened BGP paths
     dampened-paths
     CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 5 | 16
             CLI For HP Switches|info@networkjourney.com | +91 9739521088
               User Exec Pre-Privilege Mode Commands
Sr.No      CLI Command        Privilege Mode                      Description
                                                  Exits the current mode and returns to the
    1     exit
                                                  previous mode
    2     logout                                  Logs out of the current session
                                                  Sends ICMP echo requests to test
    3     ping
                                                  connectivity
    4     traceroute                              Traces the route to a destination
    5     show ip                                 Displays IP information
          show
    6     interfaces                              Displays the status of interfaces
          status
          show
    7     interfaces                              Displays brief information about interfaces
          brief
          show ip
    8
          interface                               Displays information about IP interfaces
          show ip
                                                  Displays brief information about IP
    9     interface
          brief                                   interfaces
          show mac-
   10
          address               User Exec (>)     Displays MAC address table information
   11     show arp                                Displays ARP table information
          show lldp
                                                  Displays information about LLDP
   12     info remote-
          device                                  neighbors
          show cdp
   13
          neighbors                               Displays information about CDP neighbors
   14     show log                                Displays the system log
   15     show clock                              Displays the current time and date
          show
   16     interfaces                              Displays the status of interfaces
          status
          show
   17     interfaces                              Displays brief information about interfaces
          brief
          show ip
                                                  Displays brief information about IP
   18     interface
          brief                                   interfaces
          show mac-
   19
          address                                 Displays the MAC address table
        CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 6 | 16
          CLI For HP Switches|info@networkjourney.com | +91 9739521088
20     show arp                                Displays ARP table information
       show lldp
                                               Displays information about LLDP
21     info remote-
       device                                  neighbors
       show cdp
22
       neighbors                               Displays information about CDP neighbors
23     show log                                Displays the system log
24     show clock                              Displays the current time and date
       ping <ip-                               Sends ICMP echo requests to test
25
       address>                                connectivity
       traceroute
26
       <ip-address>                            Traces the route to a destination
       telnet <ip-                             Initiates a telnet session to the specified IP
27
       address>                                address
       ssh <ip-                                Initiates an SSH session to the specified IP
28
       address>                                address
29     logout                                  Logs out of the current session
       show ip ospf
30
       interface                               Displays OSPF interface information
       show ip ospf
31
       database                                Displays OSPF database information
       show ip ospf
32
       route                                   Displays OSPF routing table information
       show ip
33
       route                                   Displays the IP routing table
34     show ip bgp                             Displays detailed BGP information
       show ip bgp
35
       summary                                 Displays a summary of BGP information
       show ip bgp
36
       neighbors                               Displays BGP neighbor information
       show ip bgp
37     dampened-                               Displays dampened BGP paths
       paths
       show ip bgp
38     community-                              Displays BGP community-list information
       list
       show ip bgp
39
       route-map                               Displays BGP route-map information
       show ip bgp
40     flap-                                   Displays BGP flap statistics
       statistics
     CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 7 | 16
          CLI For HP Switches|info@networkjourney.com | +91 9739521088
       show ip bgp
                                               Displays detailed information about a
41     neighbor
       <ip-address>                            specific BGP neighbor
       show ip bgp
       neighbor
                                               Displays routes advertised by a specific
42     <ip-address>
       advertised-                             BGP neighbor
       routes
       show ip bgp
       neighbor
                                               Displays routes received from a specific
43     <ip-address>
       received-                               BGP neighbor
       routes
       show ip bgp
       neighbor                                Displays detailed information about routes
44
       <ip-address>                            exchanged with a specific BGP neighbor
       routes
       show ip bgp
                                               Displays detailed information about a
45     neighbor
       <ip-address>                            specific BGP neighbor
46     show ip bgp                             Displays detailed BGP information
       show ip bgp
47
       summary                                 Displays a summary of BGP information
       show ip bgp
48
       neighbors                               Displays BGP neighbor information
       show ip bgp
49     dampened-                               Displays dampened BGP paths
       paths
       show ip bgp
50     community-                              Displays BGP community-list information
       list
       show ip bgp
51
       route-map                               Displays BGP route-map information
       show ip bgp
52     flap-                                   Displays BGP flap statistics
       statistics
       show ip bgp
       neighbor
                                               Displays routes advertised by a specific
53     <ip-address>
       advertised-                             BGP neighbor
       routes
     CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 8 | 16
          CLI For HP Switches|info@networkjourney.com | +91 9739521088
       show ip bgp
       neighbor
                                               Displays routes received from a specific
54     <ip-address>
       received-                               BGP neighbor
       routes
       show ip bgp
       neighbor                                Displays detailed information about routes
55
       <ip-address>                            exchanged with a specific BGP neighbor
       routes
       show ip bgp
56
       summary                                 Displays a summary of BGP information
       show ip bgp
57
       neighbors                               Displays BGP neighbor information
       show ip bgp
58     dampened-                               Displays dampened BGP paths
       paths
       show ip bgp
59     community-                              Displays BGP community-list information
       list
       show ip bgp
60
       route-map                               Displays BGP route-map information
       show ip bgp
61     flap-                                   Displays BGP flap statistics
       statistics
       show ip bgp
       neighbor
                                               Displays routes advertised by a specific
62     <ip-address>
       advertised-                             BGP neighbor
       routes
       show ip bgp
       neighbor
                                               Displays routes received from a specific
63     <ip-address>
       received-                               BGP neighbor
       routes
       show ip bgp
       neighbor                                Displays detailed information about routes
64
       <ip-address>                            exchanged with a specific BGP neighbor
       routes
     CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 9 | 16
               CLI For HP Switches|info@networkjourney.com | +91 9739521088
                        Global Config Mode Commands
                                    Privilege
Sr.No      CLI Command               Mode                           Description
        interface                                   Enters interface configuration mode for
  1
        <interface>                                 the specified interface
                                                    Enters VLAN configuration mode for the
  2     vlan <vlan-id>
                                                    specified VLAN
  3     ip routing                                  Enables IP routing on the switch
        ip default-
                                                    Configures the default gateway for the
  4     gateway <ip-
        address>                                    switch
        hostname
  5
        <hostname>                                  Configures the hostname for the switch
        logging <ip-                                Configures logging to a remote syslog
  6
        address>                                    server
        snmp-server
        community                                   Configures SNMP community string for
  7
        <community-                                 SNMP access
        string>
        snmp-server host
                                  Global Config
        <ip-address>
                                       (#)          Configures SNMP trap destination and
  8     community
        <community-                                 community string
        string>
 9      no shutdown                                 Enables the specified interface
 10     shutdown                                    Disables the specified interface
                                                    Exits the current mode and returns to the
 11     exit
                                                    previous mode
        interface                                   Enters interface configuration mode for
 12
        <interface>                                 the specified interface
                                                    Enters VLAN configuration mode for the
 13     vlan <vlan-id>
                                                    specified VLAN
 14     ip routing                                  Enables IP routing on the switch
        ip default-
                                                    Configures the default gateway for the
 15     gateway <ip-
        address>                                    switch
        hostname
 16
        <hostname>                                  Configures the hostname for the switch
         CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 10 | 16
            CLI For HP Switches|info@networkjourney.com | +91 9739521088
     logging <ip-                                Configures logging to a remote syslog
17
     address>                                    server
     snmp-server
     community                                   Configures SNMP community string for
18
     <community-                                 SNMP access
     string>
     snmp-server host
     <ip-address>
                                                 Configures SNMP trap destination and
19   community
     <community-                                 community string
     string>
20   no shutdown                                 Enables the specified interface
21   shutdown                                    Disables the specified interface
                                                 Exits the current mode and returns to the
22   exit
                                                 previous mode
     ip access-list
23
     extended <name>                             Enters extended ACL configuration mode
     ip access-list
24
     standard <name>                             Enters standard ACL configuration mode
     no ip access-
25   list <type>                                 Deletes the specified ACL
     <name>
     ip route
     <destination>
26
     <mask> <next-                               Configures a static route
     hop>
     router ospf                                 Enters OSPF configuration mode for the
27
     <process-id>                                specified process ID
     router bgp <as-                             Enters BGP configuration mode for the
28
     number>                                     specified AS number
     ip route
29   <prefix> <mask>                             Configures a static route
     <next-hop>
     ip route
30   <prefix> <mask>                             Configures a null route
     Null0
      CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 11 | 16
            CLI For HP Switches|info@networkjourney.com | +91 9739521088
     ip route 0.0.0.0
31   0.0.0.0 <next-                              Configures a default route
     hop>
     ip route 0.0.0.0                            Configures a default route to Null0
32
     0.0.0.0 Null0                               interface
     ip prefix-list
                                                 Configures an IP prefix list for use in
33   <name> seq <seq>
     permit <prefix>                             route-map or distribute-list
     ip prefix-list
                                                 Configures an IP prefix list for use in
34   <name> seq <seq>
     deny <prefix>                               route-map or distribute-list
     ip prefix-list                              Configures an IP prefix list with a length
     <name> seq <seq>
35
     permit <prefix>                             range for use in route-map or distribute-
     le <length>                                 list
     ip prefix-list                              Configures an IP prefix list with a length
     <name> seq <seq>
36
     deny <prefix> le                            range for use in route-map or distribute-
     <length>                                    list
     ip prefix-list
                                                 Configures an IP prefix list to permit any
37   <name> seq <seq>
     permit any                                  route
     ip prefix-list
                                                 Configures an IP prefix list to deny any
38   <name> seq <seq>
     deny any                                    route
     ip prefix-list
     <name> seq <seq>                            Configures an IP prefix list to permit any
39
     permit 0.0.0.0/0                            route with a specific length range
     le <length>
      CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 12 | 16
            CLI For HP Switches|info@networkjourney.com | +91 9739521088
     ip prefix-list
     <name> seq <seq>                            Configures an IP prefix list to deny any
40
     deny 0.0.0.0/0                              route with a specific length range
     le <length>
     ip prefix-list
                                                 Configures an IP prefix list to permit any
41   <name> seq <seq>
     permit 0.0.0.0/0                            route
     ip prefix-list
                                                 Configures an IP prefix list to deny any
42   <name> seq <seq>
     deny 0.0.0.0/0                              route
     ip route
43   <prefix> <mask>                             Configures a static route
     <next-hop>
     ip route
44   <prefix> <mask>                             Configures a null route
     Null0
     ip route 0.0.0.0
45   0.0.0.0 <next-                              Configures a default route
     hop>
     ip route 0.0.0.0                            Configures a default route to Null0
46
     0.0.0.0 Null0                               interface
     ip prefix-list
                                                 Configures an IP prefix list for use in
47   <name> seq <seq>
     permit <prefix>                             route-map or distribute-list
     ip prefix-list
                                                 Configures an IP prefix list for use in
48   <name> seq <seq>
     deny <prefix>                               route-map or distribute-list
      CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 13 | 16
            CLI For HP Switches|info@networkjourney.com | +91 9739521088
     ip prefix-list                              Configures an IP prefix list with a length
     <name> seq <seq>
49
     permit <prefix>                             range for use in route-map or distribute-
     le <length>                                 list
     ip prefix-list                              Configures an IP prefix list with a length
     <name> seq <seq>
50
     deny <prefix> le                            range for use in route-map or distribute-
     <length>                                    list
     ip prefix-list
                                                 Configures an IP prefix list to permit any
51   <name> seq <seq>
     permit any                                  route
     ip prefix-list
                                                 Configures an IP prefix list to deny any
52   <name> seq <seq>
     deny any                                    route
     ip prefix-list
     <name> seq <seq>                            Configures an IP prefix list to permit any
53
     permit 0.0.0.0/0                            route with a specific length range
     le <length>
     ip prefix-list
     <name> seq <seq>                            Configures an IP prefix list to deny any
54
     deny 0.0.0.0/0                              route with a specific length range
     le <length>
     ip prefix-list
                                                 Configures an IP prefix list to permit any
55   <name> seq <seq>
     permit 0.0.0.0/0                            route
     ip prefix-list
                                                 Configures an IP prefix list to deny any
56   <name> seq <seq>
     deny 0.0.0.0/0                              route
      CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 14 | 16
            CLI For HP Switches|info@networkjourney.com | +91 9739521088
     router ospf                                 Enters OSPF configuration mode for the
57
     <process-id>                                specified process ID
     router bgp <as-                             Enters BGP configuration mode for the
58
     number>                                     specified AS number
     ip route
59   <prefix> <mask>                             Configures a static route
     <next-hop>
     ip route
60   <prefix> <mask>                             Configures a null route
     Null0
     ip route 0.0.0.0
61   0.0.0.0 <next-                              Configures a default route
     hop>
     ip route 0.0.0.0                            Configures a default route to Null0
62
     0.0.0.0 Null0                               interface
     ip prefix-list
                                                 Configures an IP prefix list for use in
63   <name> seq <seq>
     permit <prefix>                             route-map or distribute-list
     ip prefix-list
                                                 Configures an IP prefix list for use in
64   <name> seq <seq>
     deny <prefix>                               route-map or distribute-list
     ip prefix-list                              Configures an IP prefix list with a length
     <name> seq <seq>
65
     permit <prefix>                             range for use in route-map or distribute-
     le <length>                                 list
     ip prefix-list                              Configures an IP prefix list with a length
     <name> seq <seq>
66
     deny <prefix> le                            range for use in route-map or distribute-
     <length>                                    list
      CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 15 | 16
            CLI For HP Switches|info@networkjourney.com | +91 9739521088
     ip prefix-list
                                                 Configures an IP prefix list to permit any
67   <name> seq <seq>
     permit any                                  route
     ip prefix-list
                                                 Configures an IP prefix list to deny any
68   <name> seq <seq>
     deny any                                    route
     ip prefix-list
     <name> seq <seq>                            Configures an IP prefix list to permit any
69
     permit 0.0.0.0/0                            route with a specific length range
     le <length>
     ip prefix-list
     <name> seq <seq>                            Configures an IP prefix list to deny any
70
     deny 0.0.0.0/0                              route with a specific length range
     le <length>
     ip prefix-list
                                                 Configures an IP prefix list to permit any
71   <name> seq <seq>
     permit 0.0.0.0/0                            route
     ip prefix-list
                                                 Configures an IP prefix list to deny any
72   <name> seq <seq>
     deny 0.0.0.0/0                              route
      CLI For HP Switches| info@networkjourney.com | +91 9739521088 || P a g e 16 | 16