Cisco CPT Command Reference Guide–CTC and Documentation Release 9.5.x and Cisco IOS Release 15.2(01)
LAG and LACP Command Reference

LAG and LACP Command Reference

This chapter describes commands to configure Link Aggregation Group (LAG) and Link Aggregation Control Protocol (LACP).

channel-group

To configure the interface in a channel group and set the Link Aggregation Control Protocol (LACP) mode, use the channel-group command in interface configuration mode. To remove the channel-group configuration from the interface, use the no form of this command.

channel-group channel-group-number mode {active | passive}

no channel-group channel-group-number

Syntax Description

channel-group-number

Integer that identifies the channel group. The range is from 1 to 128.

mode

Sets the LACP mode.

active

Enables LACP unconditionally.

passive

Enables LACP only when an LACP device is detected. This is the default state.

Command Default

No channel groups are assigned.

Command Modes

Interface configuration (config-if)

Command History

Release Modification
9.3.0 This command was introduced.

Usage Guidelines

You do not have to disable the IP address that is assigned to a physical interface that is part of a channel group, but we highly recommend in doing so. A port-channel must be created before member links are assigned to it.

Examples

The following example shows how to add the interface TenGigabitEthernet 4/1 to the channel group specified by port-channel 1:

Router(config)# interface port-channel 1
Router(config-if)# exit
Router(config)# interface TenGigabitEthernet 4/1
Router(config-if)# channel-group 1

Related Commands

Command Description
interface port-channel

Creates a port-channel virtual interface.

lacp port-priority

Sets the LACP priority for a physical interface.

lacp system-priority

Sets the LACP priority for a system.

show interfaces port-channel

Displays traffic that is seen by a specific port channel.

interface port-channel

To create a port-channel virtual interface, use the interface port-channel command in global configuration mode.

interface port-channel channel-number

Syntax Description

channel-number

Channel number assigned to this port-channel interface.

Command Default

The port-channel virtual interface is not created.

Command Modes

Global configuration (config)

Command History

Release Modification
9.3.0 This command was introduced.

Examples

The following example shows how to create a port-channel interface.

Router(config)# interface port-channel 2

Related Commands

Command Description
channel-group

Configures the interface in a channel group.

interface port-channel

Creates a port-channel virtual interface.

lacp min-bundle

Defines the minimum number of active bundled LACP ports allowed in a port channel.

lacp max-bundle

Defines the maximum number of active bundled LACP ports allowed in a port channel.

show interfaces port-channel

Displays traffic that is seen by a specific port channel.

lacp fast-switchover

To enable LACP 1:1 link redundancy, use the lacp fast-switchover command in interface configuration mode. To disable LACP 1:1 link redundancy, use the no form of this command.

lacp fast-switchover

no lacp fast-switchover

Syntax Description

This command has no arguments or keywords.

Command Default

LACP 1:1 link redundancy is disabled by default.

Command Modes

Interface configuration (config-if)

Command History

Release Modification
9.3.0 This command was introduced.

Usage Guidelines

Before entering the lacp fast-switchover command, ensure the following:

  • The port channel protocol type is LACP.
  • The lacp max-bundle command has been entered on the port channel. The lacp fast-switchover command does not affect the lacp max-bundle command.

When you enable LACP 1:1 link redundancy, based on the system priority and port priority, the port with the higher system priority chooses the link as the active link and the other link as the standby link. When the active link fails, the standby link is selected as the new active link without taking down the port channel. When the original active link recovers, it reverts to its active link status. During this switch over, the port channel is also up.

Examples

The following example shows how to enable LACP 1:1 link redundancy:

Router(config-if)# lacp fast-switchover

Related Commands

Command Description
lacp max-bundle

Defines the maximum number of active bundled LACP ports allowed in a port channel.

lacp max-bundle

To define the maximum number of active bundled LACP ports allowed in a port channel, use the lacp max-bundle command in interface configuration mode. To return to the default settings, use the no form of this command.

lacp max-bundle max-bundle-number

no lacp max-bundle

Syntax Description

max-bundle-number

Maximum threshold of active member links allowed in the LACP bundle. The range from is 1 to 8. The maximum threshold value must be greater than or equal to the minimum threshold value.

Command Default

A maximum number of active bundled LACP ports is not configured.

Command Modes

Interface configuration (config-if)

Command History

Release Modification
9.3.0 This command was introduced.

Usage Guidelines

The value specified in the max-bundle-number argument determines the number of active links that are bundled in the port channel. The remaining links are in hot-standby mode.

Examples

The following example shows how to set three ports to bundle in port channel 2:

Router(config)# interface port-channel 2
Router(config-if)# lacp max-bundle 3

Related Commands

Command Description
interface port-channel

Creates a port-channel virtual interface.

lacp fast-switchover

Enables LACP 1:1 link redundancy.

lacp port-priority

Sets the LACP priority for a physical interface.

show interfaces port-channel

Displays traffic that is seen by a specific port channel.

lacp min-bundle

To define the minimum number of active bundled LACP ports allowed in a port channel, use the lacp min-bundle command in interface configuration mode. To return to the default settings, use the no form of this command.

lacp min-bundle min-bundle-number

no lacp min-bundle

Syntax Description

min-bundle-number

Minimum threshold of active member links allowed in the LACP bundle. The range is from 1 to 8. The default is 1.

Command Default

A minimum number of active bundled LACP ports is not configured.

Command Modes

Interface configuration (config-if)

Command History

Release Modification
9.3.0 This command was introduced.

Usage Guidelines

Use this command to configure the minimum number of active links allowed in an LACP bundle. When the number of active links falls below this minimum threshold, the port channel shuts down.

Examples

The following example shows how to set the minimum number of active links to five ports:

Router(config)# interface port-channel 2
Router(config-if)# lacp min-bundle 5

Related Commands

Command Description
interface port-channel

Creates a port-channel virtual interface.

show interfaces port-channel

Displays traffic that is seen by a specific port channel.

lacp port-priority

To set the LACP priority for a physical interface, use the lacp port-priority command in interface configuration mode. To return to the default setting, use the no form of this command.

lacp port-priority priority

no lacp port-priority

Syntax Description

priority

Integer that indicates the priority for the physical interface. The range is from 0 to 65535. The default is 32768.

Command Default

The default port priority is set to 32768.

Command Modes

Interface configuration (config-if)

Command History

Release Modification
9.3.0 This command was introduced.

Usage Guidelines

You may assign a port priority to each port on a device running LACP. You can specify the port priority by using the lacp port-priority command or use the default port priority (32768). The port priority is used to decide which ports should be put in standby mode when a hardware limitation or the lacp max-bundle command configuration prevents all compatible ports from aggregating. Priority is supported only on port channels with LACP-enabled physical interfaces.


Note


A high priority number means a low priority.


To verify the configured port priority, use the show lacp internal command.

Examples

The following example shows how to set a port priority of 23700 for an interface:

Router(config-if)# lacp port-priority 23700

Related Commands

Command Description
channel-group

Creates a channel group.

lacp max-bundle

Defines the maximum number of active bundled LACP ports allowed in a port channel.

lacp system-priority

Sets the LACP system priority.

show lacp

Displays information about LACP activity on the device.

lacp system-priority

To set the LACP priority for a system, use the lacp system-priority command in global configuration mode. To return to the default setting, use the no form of this command.

lacp system-priority priority

no lacp system-priority

Syntax Description

priority

Integer that indicates the LACP priority for the system. The range is from 0 to 65535. The default is 32768.

Command Default

The default system priority is set to 32768.

Command Modes

Global configuration (config)

Command History

Release Modification
9.3.0 This command was introduced.

Usage Guidelines

You can assign a system priority to each device running LACP. You can specify the system priority by using the lacp system-priority command or use the default system priority (32768). The system priority is used with the MAC address of the device to form the system ID and is used during negotiation with the other systems. The system priority is supported only on port channels with LACP-enabled physical interfaces.


Note


A high priority number means a low priority.


To verify the configured system priority, issue the show lacp command.

Examples

The following example shows how to set a system priority of 25500 for a device:

Router(config)# lacp system-priority 25500

Related Commands

Command Description
channel-group Creates a channel group.
lacp port-priority Sets the priority of a port.
show lacp

Displays information about LACP activity on the device.

port-channel load-balance

To configure a member link for load balancing, use the port-channel load-balance command in interface configuration mode. To disable load balancing, use the no form of this command.

port-channel load-balance {link link-id}

Syntax Description

link link-id

Integer that identifies the member link for load balancing. The range is from 1 to 8.

Command Default

The member link is not configured for load balancing.

Command Modes

Interface configuration (config-if)

Command History

Release Modification
9.3.0 This command was introduced.

Usage Guidelines

The Cisco CPT supports manual load balancing and platform default load balancing. It does not support weighted load balancing in this release. When manual load balancing is not configured and applied to the service instance, the default platform load balancing mechanism is used.

Examples

The following example shows how to configure manual load balancing:

Router(config)# interface port-channel 1
Router(config-if)# port-channel load-balance link 1

show interfaces port-channel

To display the traffic on specific port channel, use the show interfaces port-channel command in privileged EXEC mode.

show interfaces port-channel channel-number

Syntax Description

channel-number

(Optional) Port channel number. The range is 1 to 128.

Command Modes

Privileged EXEC (#)

Command History

Release Modification
9.3.0 This command was introduced.

Examples

The following is a sample output of the show interfaces port-channel command that shows how to view the information for a port channel interface.

Router# show interfaces port-channel 20
Port-channel20 is up, line protocol is up
Hardware is GEChannel, address is 0002.0415.0002 (bia 0000.0000.0000)
MTU 9600 bytes, BW 10000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
ARP type: ARPA, ARP Timeout 04:00:00
No. of active members in this channel: 1
Member 0 : TenGigabitEthernet4/2 , Full-duplex, 10000Mb/s
No. of passive members in this channel: 0
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
37 packets input, 7820 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
39 packets output, 8088 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out

Related Commands

Command Description
channel-group

Configures the interface in a channel group and sets the LACP mode.

interface port-channel

Creates a port-channel virtual interface.

lacp max-bundle

Defines the maximum number of active bundled LACP ports allowed in a port channel.

lacp min-bundle

Defines the minimum number of active bundled LACP ports allowed in a port channel.

show lacp

To display LACP information, use the show lacp command in privileged EXEC mode.

show lacp {channel-group-number | counters | internal [detail] | neighbor [detail] | sys-id}

Syntax Description

channel-group-number

Number of the channel group. The range is from 1 to 128.

counters

Displays information about the LACP traffic statistics.

internal

Displays LACP internal information.

detail

(Optional) Displays detailed internal information.

neighbor

Displays information about the LACP neighbor.

sys-id

Displays the LACP system identification. It is a combination of the port priority and the MAC address of the device.

Command Modes

Privileged EXEC (#)

Command History

Release Modification
9.3.0 This command was introduced.

Usage Guidelines

Use the show lacp command to troubleshoot problems related to LACP in a network. If you do not specify a value for the argument channel-group-number, all the channel groups are displayed.

Examples

The following are sample outputs of the show lacp command that shows how to view the LACP activity in the network.

Router# show lacp internal
Flags:  S - Device is requesting Slow LACPDUs
        F - Device is requesting Fast LACPDUs
        A - Device is in Active mode       P - Device is in Passive mode     

Channel group 20
                        LACP port   Admin   Oper  Port      Port
Port      Flags State   Priority    Key     Key   Number    State
Te4/2      SA    bndl    32768      0x5     0x5   0x42      0x3D  
Router# show lacp 20 counters
            LACPDUs         Marker      Marker Response    LACPDUs
Port       Sent   Recv     Sent   Recv     Sent   Recv      Pkts Err

---------------------------------------------------------------------
Channel group 20
Te4/2      21     18        0      0        0      0         0     
Router# show lacp 20 internal
Flags:  S - Device is requesting Slow LACPDUs
        F - Device is requesting Fast LACPDUs
        A - Device is in Active mode       P - Device is in Passive mode     
Channel group 20
                        LACP port   Admin   Oper  Port      Port
Port      Flags State   Priority    Key     Key   Number    State
Te4/2      SA    bndl    32768      0x5     0x5   0x42      0x3D
Router# show lacp 20 counters
             LACPDUs       Marker    Marker Response    LACPDUs
Port            Sent   Recv   Sent   Recv     Sent   Recv      Pkts  Err
-------------------------------------------------------------------------------
Channel group: 20
Te4/2           26      31     0      0        0      0         0     
Router# show lacp sys-id
32768,0005.9b2e.18e0

Related Commands

Command Description
lacp port-priority

Sets the priority for the physical interfaces.

lacp system-priority

Sets the priority of the system.