Image of Cortney & Jeremy

LACP Between HP and Cisco Switches

by Jeremy L. Gaddis on August 12, 2011 · 6 comments

in Networking

Jennifer Huber posed a question on Twitter today:

Does anyone have any opinion or pointers for HP Procurve 2900s? Had issues setting up LACP trunks w/c2960s, opted for single connections..

I thought I had written up how to configure LACP between HP and Cisco switches before, but after checking I realized that I didn’t. What I had mentioned was a “gotcha” regarding how a ProCurve calculates the spanning tree cost of an LACP link (a.k.a. “the wrong way”).

After a frantic search for an HP console cable (someone was “nice enough” to “organize” my office a bit while I was recently out of state), I decided to lab it up and write about it (surely someone will need to do this at some point).

I’m not going to bother with drawing up a diagram in Visio — hopefully you engineers can imagine three cables connecting the two switches. I’m using interfaces 1, 2, and 3 on the HP side and fa0/1, fa0/2, and fa0/3 on the Cisco side.

Let’s start with the Cisco side of things, since that’s probably what most people are familiar with.

CISCO(config)# interface range fa0/1 - 3
CISCO(config-if-range)# spanning-tree portfast trunk
%Warning: portfast should only be enabled on ports connected to a single
 host. Connecting hubs, concentrators, switches, bridges, etc... to this
 interface  when portfast is enabled, can cause temporary bridging loops.
 Use with CAUTION

CISCO(config-if-range)# channel-protocol lacp
CISCO(config-if-range)# channel-group 1 mode active
Creating a port-channel interface Port-channel 1
CISCO(config-if-range)# interface port-channel 1
CISCO(config-if)# switchport mode trunk
CISCO(config-if)#

Let’s go ahead and create a few VLANs to trunk across our link:

CISCO(config-if-range)# vlan 10

CISCO(config-vlan)# vlan 20
CISCO(config-vlan)# vlan 30
CISCO(config-vlan)#

I’ll configure an IP address on the VLAN 1 interface so that we can generate some traffic to send across and verify our link is operational.

CISCO(config-vlan)# interface vlan 1

CISCO(config-if)# ip address 10.0.0.1 255.255.255.0
CISCO(config-if)# no shutdown
CISCO(config-if)#
00:13:03: %LINK-3-UPDOWN: Interface Vlan1, changed state to up
00:13:04: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
CISCO(config-if)#

Now we can move over to the HP side and create an LACP “trunk”. Note that HP uses different terminology and a “trunk” refers to an aggregated link.

HP(config)# trunk 1-3 trk1 lacp
HP(config)#

Create the same VLANs we did on the Cisco side and tell the switch to pass those VLANs across our aggregated link with 802.1Q tags inserted into their frames (e.g. “tagged”):

HP(config)# vlan 10
HP(vlan-10)# tagged trk1
HP(vlan-10)# vlan 20
HP(vlan-20)# tagged trk1
HP(vlan-20)# vlan 30
HP(vlan-30)# tagged trk1
HP(vlan-30)#

While we’re here, I’ll go ahead and configure the IP address for VLAN 1 as well:

HP(config)# vlan 1
HP(vlan-1)# ip address 10.0.0.2 255.255.255.0
HP(vlan-1)#

On the Cisco side, I’ll run a debug so that we can see exactly what happens as I plug in the cables (note that all the interfaces are already enabled):

CISCO(config-if)# debug etherchannel event
PAgP/LACP Shim Events debugging is on
CISCO(config-if)#

*Jeremy gets up, walks over, and plugs in the cables.*

00:48:18: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
00:48:19: FEC: pagp_switch_port_up: Fa0/1
00:48:19: FEC: pagp_switch_invoke_port_up: Fa0/1
00:48:19: FEC: lacp_switch_add_port_to_associated_list: Fa0/1 added to list
 for Po1
00:48:21: FEC: lacp_switch_add_port_to_agport_internal: Fa0/1 added to
 aggregator Po1 list
00:48:22: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1,
 changed state to up
00:48:23: %LINK-3-UPDOWN: Interface Port-channel1, changed state to up
00:48:24: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1,
 changed state to up
00:48:33: %LINK-3-UPDOWN: Interface FastEthernet0/2, changed state to up
00:48:34: FEC: pagp_switch_port_up: Fa0/2
00:48:34: FEC: pagp_switch_invoke_port_up: Fa0/2
00:48:34: FEC: lacp_switch_get_first_agg_id_from_admin_oper_keys: found
 aggregator Po1 for admin_key [0x1] and oper_key [0x1]
00:48:34: FEC: lacp_switch_get_first_associated_port_from_agg_id: found
 port Fa0/1 associated to Po1
00:48:34: FEC: lacp_switch_add_port_to_associated_list: Fa0/2 added to
 list for Po1
00:48:36: FEC: lacp_switch_add_port_to_agport_internal: Fa0/2 added to
 aggregator Po1 list
00:48:37: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2,
 changed state to up
00:48:48: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up
00:48:49: FEC: pagp_switch_port_up: Fa0/3
00:48:49: FEC: pagp_switch_invoke_port_up: Fa0/3
00:48:49: FEC: lacp_switch_get_first_agg_id_from_admin_oper_keys: found
 aggregator Po1 for admin_key [0x1] and oper_key [0x1]
00:48:49: FEC: lacp_switch_get_first_associated_port_from_agg_id: found
 port Fa0/1 associated to Po1
00:48:49: FEC: lacp_switch_add_port_to_associated_list: Fa0/3 added to
 list for Po1
00:48:51: FEC: lacp_switch_add_port_to_agport_internal: Fa0/3 added to
 aggregator Po1 list
00:48:52: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3,
 changed state to up

Let’s send some pings across the link:

CISCO(config-if)# do ping
Protocol [ip]:
Target IP address: 10.0.0.2
Repeat count [5]: 10000
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 10000, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

... (output removed) ...

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (10000/10000), round-trip min/avg/max = 4/5/36 ms
CISCO(config-if)#

Last, we can use show etherchannel summary to verify the configuration of our aggregated link:

CISCO(config-if)# do show etherchannel summary
Flags:  D - down        P - in port-channel
        I - stand-alone s - suspended
        H - Hot-standby (LACP only)
        R - Layer3      S - Layer2
        u - unsuitable for bundling
        U - in use      f - failed to allocate aggregator
        d - default port

Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
------+-------------+-----------+---------------------------------------
1      Po1(SU)         LACP      Fa0/1(Pd)   Fa0/2(P)    Fa0/3(P)

I hope this was helpful (and correct!) as I did it in quite a hurry and got pulled away for a few minutes in the middle of doing it and had to try to remember where I left off!

{ 6 comments… read them below or add one }

Leave a Comment

Previous post:

Next post: