hp procurve networking advanced cli commands reference

Upload: sergey-sarmatov

Post on 01-Jun-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 HP Procurve Networking Advanced CLI Commands Reference

    1/4

    HomeTutorials ResourcesForumsEssential BooksContact UsAbout

    Sysadmin Tutorials

    Step-by-Step Tutorials for System Administrators

    HP Procurve Networking Advanced CLI Commands

    30 Flares Google+ 99

    Twitter 5 Tweet 5 LinkedIn 3 Facebook 12 12LikeLike StumbleUpon 0 Reddit 1 Pin It Share 0

    Filament.io Made with Flare More Info 30 Flares

    [AD]

    HP Procurve Networking Advanced CLI Command Reference

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

    Creating and assigning VLANSHP-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 commandsHP-Switch(vlan-10)#ip helper-address 192.168.1.1 (Sends DHCP or BOOTP packets to the following IP address)

    HP-Switch(vlan-10)#jumbo (Enables Jumbo Frames on this vlan)

    TrunkingTrunking 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 mustalso be configured for trunking.HP-Switch(Config)#trunk a4-a7 trk1 trunk (Creates a 4 port bundled trunk port with interface a4-a7)

    HP-Switch(Config)#trunk a4-a7 trk1 lacp (Creates a 4 port bundles trunk port with interface a4-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 RoutingHP-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 192.168.2.0/24 192.168.1.1 (Routes the subnet 192.168.2.0/24 to 192.168.1.1)

    Multicast and Multicast RoutingHP-Switch(vlan-10)#ip igmp (Enables Internet Group Management Protocol controls. IGMP allows the ports to detect IGMP queries and report packets and manage IPmulticast 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 enabledalso)

    HP-Switch(Config)#router pim (Enables Pim Dense Mode Multicast Routing)

    HP-Switch(vlan-1)#ip pim 192.168.1.1 (Assigns the routers pim source address statically)

    [AD]

    Spanning TreeHP-Switch(Config)#spanning-tree (Turns on Spanning Tree)

    Procurve Networking Advanced CLI Commands Reference http://www.sysadmintutorials.com/tutorials/hp/hp-procurve-advanced-c...

    4 26.01.2015 12:38

  • 8/9/2019 HP Procurve Networking Advanced CLI Commands Reference

    2/4

    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 bpdus. The port will continuously forward traffic. Useful for bridging devices)

    HP-Switch(Config)#spanning-tree a1 bpdu-protection (Disables the port if it receives bpdus)

    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 port s)

    Access ListsHP-Switch(Config)#ip access-list extended 100 (Creates an extended access list 100)

    HP-Switch(config-ext-nacl)#10 deny tcp 0.0.0.0 255.255.255.255 192.168.1.2 0.0.0.0 eq 25 (Denies everyone access to port 25 on 192.168.1.2)

    HP-Switch(config-ext-nacl)#20 permit ip 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255 (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 SnoopingDHCP Snooping prevents unauthorized DHCP servers from being used and providing invalid configuration data to clients on the networkHP-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 192.168.1.2 (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 ControlYou 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 managementmodule 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 act ive immediately)

    HP-Switch(Config)#show redundancy (Brief details on the redundant management and fabric modules)

    HP-Switch(Config)#show redundancy details (Displays the following)

    Procurve Networking Advanced CLI Commands Reference http://www.sysadmintutorials.com/tutorials/hp/hp-procurve-advanced-c...

    4 26.01.2015 12:38

  • 8/9/2019 HP Procurve Networking Advanced CLI Commands Reference

    3/4

    If you have any technical questions about this tutorial or any other tutorials on this site, please open a new thread in the forums and the community will be able to help youout.

    Disclaimer: All the tutorials inc luded on this s ite are performed in a l ab environment to simulate a real world production scenar io. As everything is done to provide the most accurate steps todate, we take no responsibility if you implement any of these steps in a production environment.

    [AD]

    Guest

    is thre command in procurve switch to show ports, and which vlan belong to

    http://www.sysadmintutorials.com David Rodriguez

    Yeah there are a few, you can issue show run and have a look under the vlan for untagged ports, you can type in show vlan ports a1-a24(a1-a24 being the ports you want to know about), show vlan 1 (shows all ports belonging to vlan 1) then lastly there is the web interfacewhich will show you graphically.

    hearthrobes

    i want to connect one cisco switch with HP procurve on port 48. anybody can tell me how to create HP procurve port as trunk port. here i am giving

    my configurationhostname MAIN-SW-KHO qos dscp-map 101110 priority 6 interface 50 flow-control exittrunk 50 Trk1 Trunk interface 51flow-control exitinterface 52 flow-control exittrunk 51 Trk2 Trunk trunk 52 Trk3 Trunk ip default-gateway 10.4.2.1 snmp-server community

    public Unrestricted vlan 1 name DEFAULT_VLAN untagged Trk1-Trk3 no ip address tagged 1-49 exit vlan 2 name DATAforbid 49 untagged 1-48 ip address 10.4.2.2 255.255.255.0 ip helper-address 10.4.2.1 tagged Trk1-Trk3 exit vlan 3 name VOICEuntagged 49 ip address 10.4.3.2 255.255.255.0 ip helper-address 10.4.3.1 tagged 1-48,Trk1-Trk3 voice exit lldp enable-notification

    1-52 qos type-of-service diff-services spanning-treespanning-tree Trk1 priority 4spanning-tree Trk2 priority 4spanning-tree Trk3 priority 4

    http://www.sysadmintutorials.com David Rodriguez

    Hi thanks for your comment, can you please post this question in the forums under Cisco and we will be able to help you. Click on forums atthe top of this page

    tcpdump

    hi, thanks for this nice guide, very helpful. I think there is a typo in the trunking section. HP-Switch(Config)#trunk a4-a7 trk1 t runk (Creates a 4 port bundled trunk port with interface a1-a7) should be HP-Switch(Config)#trunk a4-a7 trk1 trunk (Creates a 4 port bundled trunk port with interface a4-a7) ? Same in the next line. But still many thanksfor sharing this.

    Regards tcpdump

    http://www.sysadmintutorials.com David Rodriguez

    Hi, thanks for letting me know, ill fix it up now

    Emile

    given:2 coreswitches (3Com) and with LACP2 accessswitches with an ehterchannel between accessswitches.from each access switch to the core a trunk with LACP and spanning-tree Trkxx priority 4 (on 1 trunk)

    Would you recommend this for iSCSi traffic?Because what I see are a lot of dropped packages on the switches. I think that this infects the speed on the switchesand eventually the performance on your network.

    http://www.sysadmintutorials.com David Rodriguez

    Hi Emile, are you able to please post this question in my forums under HP Procurve. You can also post output of your configs and maybe asmall network diagram.

    Christian

    how can i delete an ipv4 Address from a VLAN? It`s a HP Procurve Switch

    http://www.sysadmintutorials.com David Rodriguez

    You can delete an ip address from a vlan by doing the following:conf tvlan 10no ip address 192.168.1.1 255.255.255.0then save the config

    Procurve Networking Advanced CLI Commands Reference http://www.sysadmintutorials.com/tutorials/hp/hp-procurve-advanced-c...

    4 26.01.2015 12:38

  • 8/9/2019 HP Procurve Networking Advanced CLI Commands Reference

    4/4

    Copyright 2015 Sysadmin Tutorials

    Powered by Flexibility 3

    bleUpon 0 Reddit 1 Pin It Share 0 Filament.io Made with Flare More Info 30 Flares

    0

    Procurve Networking Advanced CLI Commands Reference http://www.sysadmintutorials.com/tutorials/hp/hp-procurve-advanced-c...