CCIE Pursuit Blog

October 6, 2007

Port Channel Interface Characteristics

Here’s something that I “knew” on an instinctual level but never really thought about or tested:

The interfaces in a port channel must share the same speed and duplex, trunking encapsulation(if not trunking – the same access vlan), the same STP cost per per VLAN, and no ports can have SPAN configured.

I’ve never really thought about this because I generally take x (2 – 8) number of defaulted interfaces and stick them in a channel-group (“channel-group 1 mode on”).  With all of the default settings none of the above possible mismatches occur.

I decided to test a couple of mismatches to see what would happen.  Maintaining the same speed/duplex across the channel-group members makes sense since the ports load-balance.

fa0/13 – 15 are members of my channel-group:

sw1(config-if)#do sh eth sum | b Group
Group  Port-channel  Protocol    Ports
——+————-+———–+———————————————–
1      Po1(SU)          –        Fa0/13(P)   Fa0/14(P)   Fa0/15(P)

sw1(config-if)#do sh int fa0/14 status

Port      Name               Status       Vlan       Duplex  Speed Type
Fa0/14    ->sw2              connected    trunk      a-full  a-100 10/100BaseTX

First let’s set the speed to 10 and see if that kills the etherchannel:

sw1(config-if)#speed 10
*Mar  1 00:42:44: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/14, changed state to down
*Mar  1 00:42:47: %EC-5-CANNOT_BUNDLE2: Fa0/14 is not compatible with Fa0/13 and will be suspended (speed of Fa0/14 is 10M, Fa0/13 is 100M)

sw1(config-if)#do sh eth sum
Flags:  D – down        P – in port-channel
        I – stand-alone s – suspended
        H – Hot-standby (LACP only)
        R – Layer3      S – Layer2
        U – in use      f – failed to allocate aggregator
        u – unsuitable for bundling
        w – waiting to be aggregated
        d – default port
Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
——+————-+———–+———————————————–
1      Po1(SU)          –        Fa0/13(P)   Fa0/14(s)   Fa0/15(P)

Nothing too surprising there.  Now let’s try something nuanced…let’s reset the speed to auto:

sw1(config-if)#speed auto
sw1(config-if)#shut
*Mar  1 00:43:36: %LINK-3-UPDOWN: Interface FastEthernet0/14, changed state to d own
*Mar  1 00:43:38: %LINK-5-CHANGED: Interface FastEthernet0/14, changed state to administratively down
sw1(config-if)#no shut
*Mar  1 00:43:40: %LINK-3-UPDOWN: Interface FastEthernet0/14, changed state to up
*Mar  1 00:43:43: %EC-5-COMPATIBLE: Fa0/14 is compatible with port-channel members

Now let’s hard set the port to 100/Full.  This will match the speed/duplex on the other ports in the bundle, but won’t use auto-negotiation.  Is that enough to break the etherchannel?

sw1(config-if)#do sh int fa0/14 status

Port      Name               Status       Vlan       Duplex  Speed Type
Fa0/14    ->sw2              connected    trunk      a-full  a-100 10/100BaseTX

sw1(config-if)#do sh eth sum | b Group
Group  Port-channel  Protocol    Ports
——+————-+———–+———————————————–
1      Po1(SU)          –        Fa0/13(P)   Fa0/14(P)   Fa0/15(P)
sw1(config-if)#speed 100
*Mar  1 00:46:25: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/14, changed state to down
sw1(config-if)#duplex full
*Mar  1 00:46:33: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/14, changed state to up

sw1(config-if)#do sh int fa0/14 status

Port      Name               Status       Vlan       Duplex  Speed Type
Fa0/14    ->sw2              connected    trunk        full    100 10/100BaseTX

sw1(config-if)#do sh eth sum | b Group
Group  Port-channel  Protocol    Ports
——+————-+———–+———————————————–
1      Po1(SU)          –        Fa0/13(P)   Fa0/14(P)   Fa0/15(P)

Interesting.  This does not break the etherchannel.  The speed/duplex must be the same, but does not need to be set via the same method (auto-negotation vs. hard set) on all links.

Trunking encapsulation is a less intuitive issue but still makes sense.  ISL and dot1q use different means of marking VLANs and don’t agree on using Native VLAN, so it makes sense that since an etherchannel is treated as a single STP link there would be problems if you mixed and matched trunking encapsulations.

sw1#sh eth sum | b Group
Group  Port-channel  Protocol    Ports
——+————-+———–+———————————————–
1      Po1(SU)          –        Fa0/13(P)   Fa0/14(P)   Fa0/15(P)

Let’s change one of the channel port’s trunking encap:

sw1(config-if)#do sh int fa0/13 trunk

Port        Mode         Encapsulation  Status        Native vlan
Fa0/13      on           isl            trunk-inbndl  1
                                            (Po1)

sw1(config)#do sh run int fa0/13
Building configuration…

Current configuration : 137 bytes
!
interface FastEthernet0/13
 description ->sw2
 switchport trunk encapsulation isl
 switchport mode trunk
 channel-group 1 mode on
end

sw1(config)#int fa0/13
sw1(config-if)#switch trunk encap dot
*Mar  1 00:29:20: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/13, changed state to down
*Mar  1 00:29:22: %EC-5-CANNOT_BUNDLE2: Fa0/13 is not compatible with Fa0/14 and will be suspended (trunk encap of Fa0/13 is dot1q, Fa0/14 is isl)
sw1(config-if)#do sh eth sum
Flags:  D – down        P – in port-channel
        I – stand-alone s – suspended
        H – Hot-standby (LACP only)
        R – Layer3      S – Layer2
        U – in use      f – failed to allocate aggregator
        u – unsuitable for bundling
        w – waiting to be aggregated
        d – default port
Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
——+————-+———–+———————————————–
1      Po1(SU)          –        Fa0/13(s)   Fa0/14(P)   Fa0/15(P)

[note: I changed the sw2's fa0/13 to trunk with dot1q as well]

sw1(config-if)#do sh int fa0/13 trunk

Port        Mode         Encapsulation  Status        Native vlan
Fa0/13      on           802.1q         trunking      1

Port        Vlans allowed on trunk
Fa0/13      none

Port        Vlans allowed and active in management domain
Fa0/13      none

Port        Vlans in spanning tree forwarding state and not pruned
Fa0/13      none

sw1(config-if)#do sh int fa0/13 status

Port      Name               Status       Vlan       Duplex  Speed Type
Fa0/13    ->sw2              suspended    trunk      a-full  a-100 10/100BaseTX

The interface will trunk, but is suspended because it’s part of an etherchannel and its trunking encapsulation does not match the trunking encapsulation of the other members of the channel-group.

Finally, let’s play with the STP cost values:

sw1#sh span int fa0/13 cost
VLAN0001         9
sw1#sh span int fa0/14 cost
VLAN0001         9
sw1#sh span int fa0/15 cost
VLAN0001         9
sw1#sh span int po1 cost
VLAN0001         9

This is interesting in itself as a 100M interface has an STP cost of 19 by default.  By bundling three FastEthernet interfaces we have achieved an STP cost of 9.

sw1(config)#int fa0/15
sw1(config-if)#span cost 4
sw1(config-if)#do sh sp int fa0/15 cost
VLAN0001         9

sw1(config-if)#do sh run int fa0/15
Building configuration…

Current configuration : 159 bytes
!
interface FastEthernet0/15
 description ->sw2
 switchport trunk encapsulation isl
 switchport mode trunk
 channel-group 1 mode on
 spanning-tree cost 4
end

sw1(config-if)#do sh sp int fa0/15 det
 Port 72 (Port-channel1) of VLAN0001 is forwarding
   Port path cost 9, Port priority 128, Port Identifier 128.72.
   Designated root has priority 32769, address 0012.009c.ca00
   Designated bridge has priority 32769, address 0012.009c.ca00
   Designated port id is 128.72, designated path cost 0
   Timers: message age 2, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is point-to-point by default
   BPDU: sent 56, received 2367

So the “spanning-tree cost 4″ shows up in the configuration, but the setting does not take as the interface is a member of the channel-group.  Let’s break it out from the channel-group:

sw1(config)#int fa0/15
sw1(config-if)#no channel-group 1
sw1(config-if)#do sh span int fa0/15 cost
VLAN0001         4

The STP cost setting is now in effect.  Now let’s see if we can add it back into the channel-group:

sw1(config-if)#channel-group 1 mode on
sw1(config-if)#do sh eth sum | b Group
Group  Port-channel  Protocol    Ports
——+————-+———–+———————————————–
1      Po1(SU)          –        Fa0/13(P)   Fa0/14(P)   Fa0/15(P)

sw1(config-if)#do sh span int fa0/15 cost
VLAN0001         9

IOS allows us to add the interface to the channel-group, but overrides the STP cost.

STP port-priority is treated in the same manner:

sw1(config)#int fa0/15
sw1(config-if)#span port-priority 64
sw1(config-if)#do sh sp int fa0/15 prio
VLAN0001         128

sw1(config-if)#span vlan 1 port-priority 64
sw1(config-if)#do sh sp int fa0/15 prio
VLAN0001         128

sw1(config-if)#do sh run int fa0/15
Building configuration…

Current configuration : 208 bytes
!
interface FastEthernet0/15
 description ->sw2
 switchport trunk encapsulation isl
 switchport mode trunk
 channel-group 1 mode on
 spanning-tree vlan 1 port-priority 64
 spanning-tree port-priority 64
end

sw1(config-if)#do sh sp int fa0/15 det
 Port 72 (Port-channel1) of VLAN0001 is forwarding
   Port path cost 9, Port priority 128, Port Identifier 128.72.
   Designated root has priority 32769, address 0012.009c.ca00
   Designated bridge has priority 32769, address 0012.009c.ca00
   Designated port id is 128.72, designated path cost 0
   Timers: message age 1, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is point-to-point by default
   BPDU: sent 54, received 2186

The port will accept the setting if you remove it from the channel-group:

sw1(config-if)#no channel-group 1
sw1(config-if)#do sh sp int fa0/15 prio
VLAN0001         64

About these ads

7 Comments »

  1. This is the best thing since cbt’s.

    Cant help but read on .

    Thanks for sharing!

    Comment by LLOYD — December 11, 2007 @ 3:17 am | Reply

  2. What version of Cisoc IOS have you used in this test ?

    Comment by Yuri Hryshchuk — February 7, 2009 @ 9:42 am | Reply

  3. Wonderful write up on EtherChannels! Very informative! :)

    Comment by SG — April 18, 2009 @ 7:50 pm | Reply

  4. It’s interesting that changing an autonegotiated 100/Full port to locked-in 100/Full didn’t break the channel.

    My expectation would have been that the channel would fail from the other end:

    Sure, *this* interface is at 100/Full, just like the other members of the channel, but the other end of that link should have switched to 100/Half when its negotiation attempt failed.

    How was the etherchannel configured (PAGP / LACP / or forced on) ?

    Maybe coherent duplex is not a requirement for building an etherchannel?

    Good post, thanks.

    Comment by chris — April 30, 2009 @ 12:23 pm | Reply

  5. Thanks a lot, Well explained ;)

    Comment by nkiti — June 23, 2009 @ 10:31 am | Reply

  6. Hi,
    you forgot to mention a case where the port channel is a trunk and there is a mismatch between the alloweds vlan of the physical ports.

    I’m not sure but i think in this case the entire Port-channel will be suspended.

    Comment by Marco — July 13, 2009 @ 3:33 am | Reply

  7. Hi
    I have got 2 core switches, 2 port channels from each switch. And from each switch to a load balancer 4 interfaces. I have created a new mst instance for this. On one switch all 4 interfaces bundled into new port channel but on the second one only 2. They have got exactly the same config. Any suggestions ???

    thanks

    Comment by Bilgisayar — September 30, 2009 @ 8:18 am | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 111 other followers

%d bloggers like this: