跳转到内容
Ask AI

LAG

此内容尚不支持你的语言。

Table 1 LAG View

CommandPurpose
show link-aggregation summaryDisplay LAG configuration.
show {ip|ipv6} interfacesDisplay IP address configuration of lag interfaces.
show interface lag lag-idDisplay information about the status of LAG interfaces.

[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 Lag1 LACP(A)(Dw) Ethernet46(D)
0002 Lag2 LACP(A)(Dw) Ethernet47(D)

[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

[Command]

show interface lag lag-id

[Purpose]

Display information about the status of LAG interfaces.

[Parameters]

ParameterDescription
lag-idLAG 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

Table 2 LAG Config

CommandPurpose
interface link-aggregation lag-idCreate a link-aggregation group and enter LAG Configuration View.
description descriptionSpecify 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-linksSet the minimum number of active links for LACP.
lacp system-priority system-prioritySet system-priority for LACP.
lacp system-id HH:HH:HH:HH:HH:HHSet system-id for LACP.
lacp fast-rateEnable short timeout for LACP.
lacp fallbackEnable fallback for LACP.
mtu mtuConfigure the MTU value on a lag interface.
shutdownBring 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:HHSpecify a MAC address to the lag interface.
mac-address learningEnable MAC learning for the lag.
lacp graceful-downDynamic LAG disconnects LACP interactions actively.

[Command]

interface link-aggregation lag-id

[Purpose]

Create a link-aggregation group and enter LAG Configuration View.

[Parameters]

ParameterDescription
lag-idLAG 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

[Command]

description description

[Purpose]

Specify the description for the lag.

[Parameters]

ParameterDescription
descriptionIn 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
Section titled “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]

ParameterDescription
lag-idLAG ID, the range is from 1 to 9999.
port-priorityPort priority, the range is 0-65535. The default is 255.
lacp-keyLACP message key value, the range is 0-65535. The default is 0.
lacp-portidInterface 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
----- --------- ----------- ---------------------------
0001 Lag1 LACP(A)(Dw) Ethernet46(D) Ethernet45(D)
0002 Lag2 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

[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

[Command]

lacp min-links min-links

[Purpose]

Set the minimum number of active links for LACP.

[Parameters]

ParameterDescription
min-linksThe 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

[Command]

lacp system-priority system-priority

[Purpose]

Set system-priority for LACP.

[Parameters]

ParameterDescription
system-prioritySystem 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

[Command]

lacp system-id HH:HH:HH:HH:HH:HH

[Purpose]

Set system-id for LACP.

[Parameters]

ParameterDescription
HH:HH:HH:HH:HH:HHMAC 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

[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

[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

[Command]

mtu mtu

[Purpose]

Configure the MTU value on a lag interface.

[Parameters]

ParameterDescription
mtuMaximum 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

[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

[Command]

ip address {A.B.C.D/M|A::B/M} [secondary]

[Purpose]

Configure IP address for the lag interface.

[Parameters]

ParameterDescription
A.B.C.D/MIPv4 address with prefix length.
A::B/MIPv6 address with prefix length.
secondaryThe 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

[Command]

mac_address HH:HH:HH:HH:HH:HH

[Purpose]

Specify a MAC address to the lag interface.

[Parameters]

ParameterDescription
HH:HH:HH:HH:HH:HHMAC 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

[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

[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