Sie sind auf Seite 1von 8

Note: HP Procurve Configuration will be done via the CLI and assumes you have a console connection to the

switch and are in configure mode. Enter configure mode by typeing configure. Setting a hostname
1. hostname Coreswitch (Include quotations)

Setting an ip address to the default vlan

1. vlan 1 2. ip address 3. exit

Setting a default route

1. ip default-gateway

Setting up DNS servers

1. ip dns server-address priority 1 2. ip dns server-address priority 2

Configuring time sync

1. 2. 3. 4. timesync sntp sntp unicast time timezone 600 (the amount of minutes from GMT) sntp server priority 1

Configuring SNMP
1. 2. 3. 4. 5. snmp-server contact IT Department snmp-server location Level 1 Sydney snmp-server community snmp-public restricted snmp-server community snmp-private unrestricted snmp-server host (ip to send traps to)

Adding a description or name to an interface

1. interface A1 2. name Uplink to Level 2

Setting username and password for manager (read/write) and operator (read only)

1. password manager user adminfull plaintext password123 2. password operator user adminread plaintext password456

Setting an inactivity timer for the console (in minutes)

1. console inactivity-timer 5

Setting console logging levels (none|debug|all|not-info|critical)

1. console events critical

To enable web-management
1. web-management

To disable http web management and enable secure https web-management

1. no web-management 2. web-management ssl

Disclaimer: All the tutorials included on this site are performed in a lab environment to simulate a real world production scenario. As everything is done to provide the most accurate steps to date, we take no responsibility if you implement any of these steps in a production environment.

HP Procurve Advanced CLI Commands Reference

This page will provide a subset of advanced HP Procurve CLI commands for easy reference.

Creating and assigning VLANS HP-Switch(Config)#Vlan 10 (Creates VLAN 10) HP-Switch(vlan-10)#untagged a1 (Puts interface a1 into vlan 10 as untagged, meaning any packets that are untagged are on vlan 10) HP-Switch(Config)#Vlan 20 (Creates VLAN 20) HP-Switch(vlan-20)#tagged a1 (Makes interface a2 an 802.1q trunked port. Tagging this port with vlan 20 means that interface a2 accepts vlan 20 tagged packets) HP-Switch(Config)#show vlan (Shows vlan ID, Name, Status, Voice and Jumbo support) HP-Switch(Config)#show vlan ports a1 (Shows the vlans belonging to a1) HP-Switch(Config)#show vlan 1 (Shows ports that are assigned to vlan 1) Additional VLAN commands HP-Switch(vlan-10)#ip helper-address (Sends DHCP or BOOTP packets to the following IP address) HP-Switch(vlan-10)#jumbo (Enables Jumbo Frames on this vlan) Trunking Trunking in HP terms is bundling 2 or more ports together to create a larger bandwidth port. In Cisco terms it is referred to as Etherchannel. The connecting switch must also be configured for trunking. HP-Switch(Config)#trunk a4-a7 trk1 trunk (Creates a 4 port bundled trunk port with interface a1-a7) HP-Switch(Config)#trunk a4-a7 trk1 lacp (Creates a 4 port bundles trunk port with interface a1-a7 using the lacp protocol) HP-Switch(Config)#show trunk (Shows Port name, connection speeds, trunk group and type trunk | LACP) HP-Switch(Config)#show trunk a4 (Shows trunk information for the interface a4 member) HP-Switch(Config)#show lacp (Displays information about lacp status on port members) IP Routing

HP-Switch(Config)#ip routing (Turns on IP routing for the switch. Out of the box the switch support static routes and RIP. With a Premium license you will get OSPF) HP-Switch(Config)#ip route (Routes the subnet to Multicast and Multicast Routing HP-Switch(vlan-10)#ip igmp (Enables Internet Group Management Protocol controls. IGMP allows the ports to detect IGMP queries and report packets and manage IP multicast traffic through the switch. By default multicast traffic is flooded through all ports except the port it was received on) HP-Switch(Config)#ip multicast-routing (Enables Multicast Routing across subnets, you must have a license to enable this feature an you must have ip routing enabled also) HP-Switch(Config)#router pim (Enables Pim Dense Mode Multicast Routing) HP-Switch(vlan-1)#ip pim (Assigns the routers pim source address statically) Spanning Tree HP-Switch(Config)#spanning-tree (Turns on Spanning Tree) HP-Switch(Config)#spanning-tree priority 0 (Makes this switch the root switch with a priority of 4096) HP-Switch(Config)#spanning-tree force-version rstp-operation (Operates spanning tree in Rapid Spanning Tree mode) HP-Switch(Config)#spanning-tree a1 bpdu-filter (Stops the port from transmitting or receiving bpdu s. The port will continuously forward traffic. Useful for bridging devices) HP-Switch(Config)#spanning-tree a1 bpdu-protection (Disables the port if it receives bpdu s) HP-Switch(Config)#spanning-tree a1 admin-edge-port (Makes a1 an admin edge port. Used for connected to end devices) HP-Switch(Config)#no spanning-tree a1 admin-edge-port (Makes a1 a non-admin edge port. Used for connections to switches) HP-Switch(Config)#show spanning-tree (Shows spanning tree information for vlans and ports) HP-Switch(Config)#show spanning-tree bpdu-protection (Shows which ports are configured with bpdu protection) HP-Switch(Config)#show spanning-tree detail (Shows extended information on vlans and ports) Access Lists

HP-Switch(Config)#ip access-list extended 100 (Creates an extended access list 100) HP-Switch(config-ext-nacl)#10 deny tcp eq 25 (Denies everyone access to port 25 on HP-Switch(config-ext-nacl)#20 permit ip (Permit any to any for any IP service) HP-Switch(vlan10)#ip access-group 100 in (Applies the access list 100 in an inbound direction for vlan 10) HP-Switch(Config)#show access-list (Displays configured access-lists) DHCP Snooping DHCP Snooping prevents unauthorized DHCP servers from being used and providing invalid configuration data to clients on the network HP-Switch(Config)#dhcp-snooping (Turns on DHCP Snooping) HP-Switch(Config)#dhcp-snooping vlan 1 (Turns on DHCP Snooping for vlan 1) HP-Switch(eth-a1)#dhcp-snooping trust (Makes interface a1 a trusted DHCP snooping interface i.e. an uplink to known DHCP Server) HP-Switch(Config)#dhcp-snooping authorized-server (Authorized DHCP Server address, the DHCP Server packet must also be received on a trusted port) HP-Switch(Config)#show dhcp-snooping stats (Shows packet type action and reason. i.e. Server, Client, forward, drop, Reason and count) Flow Control You can turn on Flow Control between switch uplinks. Flow Control will not allow packets to drop if the link is being saturated. HP-Switch(Config)#interface a4 (First step is to go into the interface) HP-Switch(eth-A4)#flow-control (Second Step is to turn on Flow-Control on the interface) Management Modules (For 8000 series switches)

HP-Switch(Config)#redundancy management-module nonstop-switching (Turns on nonstop-switching for redundant management modules. This allows a management module to fail without dropping packets. This is Active/Active) HP-Switch(Config)#redundancy management-module (Turns on normal management module redundancy where the passive module reboots once the primary fails. This is Active/Passive) HP-Switch(Config)#redundancy active-management management-module2 (Will make management module 2 active on next boot) HP-Switch(Config)#redundancy switchover (Make the standby management module active immediately) HP-Switch(Config)#show redundancy (Brief details on the redundant management and fabric modules) HP-Switch(Config)#show redundancy details (Displays the following)