Command Line Reference
Layer 2 Configuration
LAG
26 min
lag view lag view table 1 lag view table 1 lag view command purpose show link aggregation summary display lag configuration show { ip | ipv6 } interfaces display ip address configuration of lag interfaces show interface lag lag id display information about the status of lag interfaces show link aggregation summary show link aggregation summary \[command] show link aggregation summary \[purpose] display lag configuration \[view] privileged user 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) ethernet46(d) 0002 portchannel0002 lacp(a)(dw) ethernet47(d) show {ip|ipv6} interfaces show {ip|ipv6} interfaces \[command] show { ip | ipv6 } interfaces \[purpose] display ip address configuration of lag interfaces \[view] privileged user view \[use cases] sonic# show ip interfaces interface master ipv4 address/mask admin/oper bgp neighbor neighbor ip \ 0/0 2 2 0 0 1/24 up/down n/a n/a 0/48 199 0 3 1/24 up/up n/a n/a loopback0 10 1 0 34/32 up/up n/a n/a lag24 24 0 0 1/24 up/down n/a n/a mgmt 10 250 0 138/24 up/up n/a n/a show interface lag show interface lag lag id \[command] show interface lag lag id \[purpose] display information about the status of lag interfaces \[parameters] parameter description lag id lag id, the range is from 1 to 9999 \[view] privileged user 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 description \ 0010 lag 10 lacp(a)(up) 0/3 (d) n/a 0/2 (s) 0/4 (d) sonic# show interface lag 10 lag10 is up, line protocol is up hardware is eth mac address is n/a interface index is 0010 description is n/a mode of ipv4 address assignment not set mode of ipv6 address assignment not set ip mtu 9216 bytes linespeed 30 0g, currentspeed 10 0g, auto negotiation off input statistics 82 packets, 14988 octets 82 multicasts, 0 broadcasts, 0 unicasts 0 error, 0 discarded output statistics 1205 packets, 158858 octets 1205 multicasts, 0 broadcasts, 0 unicasts 0 error, 0 discarded lag config table 2 lag config table 2 lag config command purpose interface link aggregation lag id create a link aggregation group and enter lag configuration view description description specify the description for the lag link aggregation group lag id \[ port priority port priority ] \[ lacp key lacp key ] \[ lacp portid lacp portid ] configure the lag member ports and set their attributes mode { dynamic|static } set the aggregation mode lacp min links min links set the minimum number of active links for lacp lacp system priority system priority set system priority for lacp lacp system id hh\ hh\ hh\ hh\ hh\ hh set system id for lacp lacp fast rate enable short timeout for lacp lacp fallback enable fallback for lacp mtu mtu configure the mtu value on a lag interface shutdown bring the lag down administratively ip address { a b c d/m|a b/m } \[ secondary ] configure ip address for the lag interface mac address hh\ hh\ hh\ hh\ hh\ hh specify a mac address to the lag interface mac address learning enable mac learning for the lag lacp graceful down dynamic lag disconnects lacp interactions actively interface link aggregation interface link aggregation lag id \[command] interface link aggregation lag id \[purpose] create a link aggregation group and enter lag configuration view \[parameters] parameter description lag id lag id, the range is from 1 to 9999 \[view] global configuration view \[notes] the default aggregation mode is lacp run command no interface link aggregation lag id to delete the link aggregation group the member ports should be removed before deleting \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic(config lagif 3)# show this ! interface link aggregation 3 description description description \[command] description description \[purpose] specify the description for the lag \[parameters] parameter description description in string form \[view] lagif configuration view \[notes] run command no description to delete description \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 100 sonic(config lagif 100)# description lag100 sonic(config lagif 100)# do 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 description \ 0100 lag100 lacp(a)(dw) lag100 link aggregation group link aggregation group lag id \[port priority port priority ] \[lacp key lacp key ] \[lacp portid lacp portid ] \[command] link aggregation group lag id \[ port priority port priority ] \[ lacp key lacp key ] \[ lacp portid lacp portid ] \[purpose] configure the lag member ports and set their attributes \[parameters] parameter description lag id lag id, the range is from 1 to 9999 port priority port priority, the range is 0 65535 the default is 255 lacp key lacp message key value, the range is 0 65535 the default is 0 lacp portid interface id value, the range is 0 65535 \[view] physical interface configuration view \[notes] run command no link aggregation group lag id to delete aggregation member ports \[use cases] sonic# configure terminal sonic(config)# interface ethernet 0/45 sonic(config if 0/45)# link aggregation group 1 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 \ portchanne000l lacp(a)(dw) n/a 0001 portchannel0001 lacp(a)(dw) ethernet46(d) ethernet45(d) 0002 portchannel0002 lacp(a)(dw) ethernet47(d) sonic(config if 0/45)# link aggregation group 1 port priority 500 sonic(config if 0/45)# link aggregation group 2 port priority 500 lacp key 10 lacp portid 60 mode {dynamic|static} mode {dynamic|static} \[command] mode { dynamic | static } \[purpose] set the aggregation mode \[view] lagif configuration view \[notes] run commit to take effect; the default is dynamic(lacp) \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic (config lagif 3)# mode dynamic sonic (config lagif 3)# show this ! interface link aggregation 3 mode dynamic lacp min links lacp min links min links \[command] lacp min links min links \[purpose] set the minimum number of active links for lacp \[parameters] parameter description min links the minimum number of active links, the range is 1 128 \[view] dynamic lagif configuration view \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic (config lagif 3)# lacp min links 2 sonic (config lagif 3)# show this ! interface link aggregation 3 lacp min links 2 mode dynamic lacp system priority lacp system priority system priority \[command] lacp system priority system priority \[purpose] set system priority for lacp \[parameters] parameter description system priority system priority, the range is 0 65535 \[view] dynamic lagif configuration view \[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 hh\ hh\ hh\ hh\ hh\ hh \[command] lacp system id hh\ hh\ hh\ hh\ hh\ hh \[purpose] set system id for lacp \[parameters] parameter description hh\ hh\ hh\ hh\ hh\ hh mac address \[view] dynamic lagif configuration view \[notes] run command no lacp system id to delete system id configuration \[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 \[purpose] enable short timeout for lacp \[view] dynamic lagif configuration view \[notes] the default lacp timeout mode is long timeout run command no lacp fast rate to disable short timeout for lacp \[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 \[purpose] enable fallback for lacp \[view] dynamic lagif configuration view \[notes] run command no lacp fallback to disable fallback for lacp \[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 mtu mtu mtu \[command] mtu mtu \[purpose] configure the mtu value on a lag interface \[parameters] parameter description mtu maximum transmission unit, the range is from 1312 to 9216 the default is 9216 bytes \[view] lagif configuration view \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic (config lagif 3)# mtu 2000 sonic (config lagif 3)# show this ! interface link aggregation 3 mtu 2000 shutdown shutdown \[command] shutdown \[purpose] bring the lag down administratively \[view] lagif configuration view \[notes] run command no shutdown to bring the lag up administratively \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic(config lagif 3)# shutdown sonic(config lagif 3)# show this ! interface link aggregation 3 shutdown ip address { ip address { a b c d/m|a b/m } \[secondary] \[command] ip address { a b c d/m|a b/m } \[ secondary ] \[purpose] configure ip address for the lag interface \[parameters] parameter description a b c d/m ipv4 address with prefix length a b/m ipv6 address with prefix length secondary the default is primary ip, specifying this option means configuring as secondary ip, which requires that the secondary ip and primary ip be in the same network segment \[view] lagif configuration view \[notes] ipv4 address with subnet mask /32 is not allowed to be configured addresses with subnet mask /31 is allowed in other subnet masks, addresses with the host portion all zeros or all ones are not allowed ipv6 address with subnet mask /127 or /128 is not allowed to be configured in other subnet masks, addresses with the host portion all zeros are not allowed, but all ones are allowed run command no ip address { a b c d/m|a b/m } \[ secondary ] to delete ip address configuration of the lag interface \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic(config lagif 3)# ip address 3 3 3 6/24 sonic(config lagif 3)# show this ! interface link aggregation 3 ip address 3 3 3 6/24 mac address mac address hh\ hh\ hh\ hh\ hh\ hh \[command] mac address hh\ hh\ hh\ hh\ hh\ hh \[purpose] specify a mac address to the lag interface \[parameters] parameter description hh\ hh\ hh\ hh\ hh \ hh mac address, not case sensitive \[view] lagif configuration view \[notes] the default is the mac of the switch; run command no mac address to restore the mac of the lag interface to default \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic(config lagif 3)# mac address 18 17 25 37 67\ af sonic(config lagif 3)# show this ! interface link aggregation 3 mac address 18 17 25 37 67\ af mac address learning mac address learning \[command] mac address learning \[purpose] enable mac learning for the lag \[view] lagif configuration view \[notes] the interface to be operated should be added to a vlan mac learning is enabled by default run command no mac address learning to disable mac learning for the lag \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic(config lagif 3)# no mac address learning sonic(config lagif 3)# show this ! interface link aggregation 3 no mac address learning lacp graceful down lacp graceful down \[command] lacp graceful down \[purpose] dynamic lag disconnects lacp interactions actively \[view] lagif configuration view \[notes] after executing the no lacp graceful down command, the lag resumes lacp interaction this command is valid for a single time and will not be saved to the configuration, i e , the lag interface will be restored to up after reboot or reload \[use cases] sonic# configure terminal sonic(config)# interface link aggregation 3 sonic(config lagif 3)# lacp graceful down
