Configuring a Layer 2 dynamic aggregation group
Prerequisites
You must be in the global configuration context:switch(config)#
Procedure
- Create a Layer 2 aggregate interface and access the Layer 2 aggregate interface view by entering:
switch(config)#接口延迟
The range of the LAG interface ID is 1 to 256.
While creating the Layer 2 aggregate interface, the system automatically creates a Layer 2 dynamic aggregation group numbered the same.
- Set the operational state of every interface in the LAG to up by entering:
switch(config-lag-if)#no shutdown
NOTE:This command does not impact the administrative state of the member interfaces because the command was entered at the level of the LAG. To change the administrative state of a member interface, enter the command at the interface level. For example:switch(config)#interface 1/1/2switch(config-if)#no shutdown
- On the 8320, 8325, 8360, and 8400, disable routing by entering:
switch(config-lag-if)#no routing
See theCommand-Line Interface Guidefor your switch and software version for more information about the
no routing
command.NOTE:On the 6100 and 6200 Switch Series, routing is not supported on physical interfaces.
On the 6300 and 6400 Switch Series, routing is disabled by default.
- Configure the aggregation group to operate in dynamic mode by entering:
switch(config-lag-if)#lacp模式|{活跃passive}
For example:
switch(config-lag-if)#lacp mode active
- Configure the aggregation group to operate in fast or slow mode by entering:
switch(config-lag-if)#lacp rate {fast | slow}
For example:
switch(config-lag-if)#lacp rate fast
- Assign a native VLAN ID to a trunk interface by entering:
switch(config-lag-if)#vlan trunk native< vlan id >
For example:
switch(config-lag-if)#vlan trunk native 1
- Use the following steps to add a maximum of 16 interfaces to the LAG:
- To assign an interface to the LAG:
switch(config-lag-if)#interface
To assign a range of interfaces to a LAG:
switch(config-lag-if)#interface
- For example:
switch(config-lag-if)#interface 1/1/1-1/1/4
See theCommand-Line Interface Guidefor your switch and software version for more information about the
interface
command. - Assign an ID to the LAG:
switch(config-if)#lag
For example:
switch(config-if-<1/1/1-1/1/4>)#lag 20
- Set the administrative state of the member interface to up:
switch(config-if-<1/1/1-1/1/4>)#no shutdown
- To assign an interface to the LAG:
- View the configuration by entering:
For 6100, 6200, 6300, and 6400 switch series:
switch(config-if-<1/1/1-1/1/4>)#show running-configCurrent configuration: ! vlan 1 interface lag 20 no shutdown vlan trunk native 1 vlan trunk allowed all lacp mode active lacp rate fast interface 1/1/1 no shutdown lag 20 switch(config-if-<1/1/1-1/1/4>)#show lacp aggregatesAggregate name : lag100 Interfaces : 1/1/3 1/1/1 1/1/4 1/1/2 Heartbeat rate : Fast Hash : l3-src-dst Aggregate mode : Active
For 8320, 8325, 8360, and 8400 switch series:switch(config-if-<1/1/1-1/1/4>)#show running-configCurrent configuration: ! vlan 1 interface lag 20 no shutdown no routing vlan trunk native 1 vlan trunk allowed all lacp mode active lacp rate fast interface 1/1/1 no shutdown lag 20 switch(config-if-<1/1/1-1/1/4>)#show lacp aggregatesAggregate name : lag100 Interfaces : 1/1/3 1/1/1 1/1/4 1/1/2 Heartbeat rate : Fast Hash : l3-src-dst Aggregate mode : Active