Difference between revisions of "HP cli basics"
From Notes_Wiki
m |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[Switch configuration notes]] > [[HP cli basics]] | [[Main Page|Home]] > [[Switch configuration notes]] > [[HP cli basics]] | ||
=Connect and use CLI= | |||
==Connect to HP switch CLI== | ==Connect to HP switch CLI== | ||
To connect to HP switch over CLI, use: | To connect to HP switch over CLI, use: | ||
<pre> | <pre> | ||
Line 10: | Line 10: | ||
== | ==Shift backspace to delete characters== | ||
Instead of backspace use shift backspace to delete characters | |||
To | ==Come directly to top== | ||
To change directly to top use Ctrl+Z | |||
=Look at existing configuration= | |||
==See port number for given MAC address using mac address table (CAM table)== | ==See port number for given MAC address using mac address table (CAM table)== | ||
To see port number for given MAC address using mac address table (CAM table): | To see port number for given MAC address using mac address table (CAM table): | ||
<pre> | <pre> | ||
display mac-address AAAA-BBBB-CCCC | display mac-address AAAA-BBBB-CCCC | ||
</pre> | </pre> | ||
==See port configuration== | ==See port configuration== | ||
To see configuration for an interface: | To see configuration for an interface: | ||
<pre> | <pre> | ||
Line 34: | Line 32: | ||
</pre> | </pre> | ||
==See current configuration== | |||
To see current configuration (Similar to running-config in Cisco/Dell) use: | |||
<pre> | |||
display current-configuration | |||
</pre> | |||
==See VLAN information== | |||
To see vlan information use: | |||
<pre> | |||
display vlan brief | |||
</pre> | |||
==See routing table== | |||
To see route use: | |||
<pre> | |||
display ip routing-table | |||
</pre> | |||
=Change configuration= | |||
==Switch to system-view similar to enable mode== | |||
To get system-view similar to enable mode use: | |||
<pre> | |||
system-view | |||
</pre> | |||
==To change interface configuration== | ==To change interface configuration== | ||
To change interface configuration use: | To change interface configuration use: | ||
<pre> | <pre> | ||
Line 43: | Line 68: | ||
shut | shut | ||
</pre> | </pre> | ||
Note that any any point we can reset interface back to default settings using: | |||
<pre> | |||
default | |||
</pre> | |||
==Add new static route== | |||
To add a new static route use below example: | |||
<pre> | |||
ip route-static 0.0.0.0 0.0.0.0 192.168.7.5 | |||
</pre> | |||
==To quit from switch completely== | ==To quit from switch completely== | ||
To quit from switch use: | To quit from switch use: | ||
<pre> | <pre> |
Latest revision as of 07:31, 11 June 2023
Home > Switch configuration notes > HP cli basics
Connect and use CLI
Connect to HP switch CLI
To connect to HP switch over CLI, use:
ssh admin@IP or admin1@IP
based on whether username is set as admin or admin1.
Shift backspace to delete characters
Instead of backspace use shift backspace to delete characters
Come directly to top
To change directly to top use Ctrl+Z
Look at existing configuration
See port number for given MAC address using mac address table (CAM table)
To see port number for given MAC address using mac address table (CAM table):
display mac-address AAAA-BBBB-CCCC
See port configuration
To see configuration for an interface:
display current interface Gig 1/0/34
See current configuration
To see current configuration (Similar to running-config in Cisco/Dell) use:
display current-configuration
See VLAN information
To see vlan information use:
display vlan brief
See routing table
To see route use:
display ip routing-table
Change configuration
Switch to system-view similar to enable mode
To get system-view similar to enable mode use:
system-view
To change interface configuration
To change interface configuration use:
interface Gig 1/0/34 shut
Note that any any point we can reset interface back to default settings using:
default
Add new static route
To add a new static route use below example:
ip route-static 0.0.0.0 0.0.0.0 192.168.7.5
To quit from switch completely
To quit from switch use:
quit quit