Command Line Reference
Ethernet Switching
Link Aggregation Configuration
13 min
link aggregation configuration link aggregation configuration show link aggregation summary show link aggregation summary \[command] show link aggregation summary \[purpose] display lag configuration information \[view] system view \[use cases] sonic# show link aggregation summary flags a active, i inactive, up up, dw down, n/a not available, s selected, d deselected, not synced no team dev protocol ports \ 0001 portchannel0001 lacp(a)(dw) ethernet1(d) 0002 portchannel0002 lacp(a)(dw) ethernet2(d) description of the show link aggregation summary command output parameter parameter description description team dev link aggregation group name protocol link aggregation group type: loadbalance static link aggregation group lacp dynamic link aggregation group dynamic link aggregation group states a (active) indicates that the interface is in a normal and usable state i (inactive) indicates that the current interface is not available for use link aggregation group states up when at least one member interface in the aggregation group is in the up state, and there are selected member interfaces in the dynamic link aggregation group this allows for normal traffic forwarding dw (down) when there are no member interfaces in the up state within the link aggregation group, or there are no selected member interfaces in the dynamic link aggregation group this results in the inability to forward traffic ports member interface physical states up the interface's physical state is up dw (down) the interface's physical state is down member interface states in lacp mode s (selected) indicates that this member interface is in a selected state d (deselected) indicates that this member interface is not selected (not synced) when the port link is in the up state but is in a suspended state due to factors such as the remote end not enabling lacp or inconsistent port attributes negotiated through messages interface link aggregation interface link aggregation lag id \[command] interface link aggregation lag id no interface link aggregation lag id \[purpose] add aggregation groups \[parameter] parameter description lag id aggregate group id, range 1 9999 \[view] system configuration view \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic(config lagif 3)# show this ! interface link aggregation 3 link aggregation group lag id \[port priority link aggregation group lag id \[port priority port priority ] \[command] link aggregation group lag id \[port priority port priority ] no link aggregation group lag id \[purpose] add member ports to an aggregation group \[parameter] parameter description lag id aggregate group id, range 1 9999 port priority interface priority, range 0 65535, default 255 \[view] interface view \[usage scenario] configuring interface priority is done to differentiate between different interfaces on the same device interfaces with higher priority will be selected as active interfaces if interface priority is not configured, the active interfaces will be selected based on the interface numbers, with lower numbered interfaces having higher priority \[notes] port priority is used for setting the priority of device ports ports with higher priority will be selected as active ports this parameter is typically used to configure the priority of multiple ports within a link aggregation group (lag) to enable fast failover to backup links in case of a link failure lacp key is used for setting the key value for the device's link aggregation control protocol (lacp) ports with the same key value will be considered part of the same aggregation group when multiple ports in a lag need to be controlled using lacp, they should have the same key value assigned to be recognized as part of the same aggregation group lacp portid is used to set the port id for the lacp protocol, which identifies each port within a link aggregation group (lag) when multiple ports in a lag need to be controlled using lacp, each port should be assigned a unique port id for correct identification and control \[use cases] sonic# configure terminal sonic(config)# interface ethernet 1 sonic(config if 1)# link aggregation group 1 sonic(config if 1)# link aggregation group 1 port priority 500 sonic# show link aggregation summary flags a active, i inactive, up up, dw down, n/a not available, s selected, d deselected, not synced no team dev protocol ports \ 0001 portchannel0001 lacp(a)(dw) ethernet1(d) ethernet2(d) 0002 portchannel0002 lacp(a)(dw) ethernet3(d) mode {dynamic|static} mode {dynamic|static} \[command] mode {dynamic|static} \[purpose] configure the mode of the lag \[view] lagif view \[usage scenario] the device currently supports two types of operating modes dynamic lacp mode in this mode, the device can achieve both load balancing and redundant backup functions additionally, it can automatically detect and add member ports to the link aggregation group (lag) this mode is suitable for scenarios where you want the device to manage lags automatically default static mode in this mode, lag creation and the addition of member interfaces are entirely configured manually this means that you have full control over which interfaces are part of the lag and how they are configured this mode is typically used when you want to configure lags and their members manually according to specific requirements \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic(config lagif 3)# mode dynamic please enter 'commit' to make lacp and mode command take effert sonic(config lagif 3)# commit sonic(config lagif 3)# show this ! interface link aggregation 3 mode dynamic lacp system priority lacp system priority system priority \[command] lacp system priority system priority \[purpose] configure the sys prio in the portchannel port lacp attribute \[parameter] parameter description system priority system priority, in the range 0 65535 \[view] lagif view \[usage scenario] configuring the system priority is done to differentiate between the local device's priority and the remote device's priority in a link aggregation group (lag) the device with the higher system priority will be selected as the active side of the lag, and the selection of active interfaces will be based on the active side's interfaces when system priorities are not configured, the local and remote devices will be selected as the active side based on the system ids the device with the smaller system id will become the active side by default, the system id is set to the system's mac address \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic (config lagif 3)# lacp system priority 100 sonic (config lagif 3)# show this ! interface link aggregation 3 lacp system priority 100 mode dynamic lacp system id lacp system id mac address \[command] lacp system id mac address no lacp system id \[purpose] configure the sys id in the portchannel port lacp attribute \[parameter] parameter description mac address system id, non all 0 mac address \[view] lagif view \[usage scenario] the system id is used to identify devices in the lacp (link aggregation control protocol) protocol by default, the system id is set to the system's mac address when the system priority is not configured, the devices' priority is determined based on the system id's size smaller system ids are given higher priority \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic (config lagif 3)# lacp system id 00\ a0 23 12 23 53 sonic (config lagif 3)# show this ! interface link aggregation 3 commit lacp system id 00\ a0 23 12 23 53 mode dynamic lacp fast rate lacp fast rate \[command] lacp fast rate no lacp fast rate \[purpose] enable the fast rate attribute of lacp \[view] lagif view \[usage scenario] this configuration will make your local device consider a link as down if it doesn't receive lacp packets from the remote device within a short period, which is usually around 3 seconds \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic (config lagif 3)# lacp fast rate sonic (config lagif 3)# show this ! interface link aggregation 3 lacp fast rate mode dynamic lacp fallback lacp fallback \[command] lacp fallback no lacp fallback \[purpose] enable the fallback attribute of lacp \[usage scenario] this command is used to enable the fast negotiation mode for the link aggregation control protocol (lacp) in this mode, the lacp protocol quickly renegotiates the link aggregation group in the event of a link failure, ensuring a fast recovery of the link aggregation group typically, lacp protocol link aggregation groups take some time to renegotiate, and if a link failure occurs, the reconfiguration process may lead to network interruption or delays, impacting the reliability and performance of the network by using this command, the dynamic link aggregation group can be kept in the up (active) state at all times, providing continuous and reliable network connectivity \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic (config lagif 3)# lacp fallback sonic (config lagif 3)# show this ! interface link aggregation 3 lacp fallback mode dynamic
