LAG
此内容尚不支持你的语言。
LAG View
Section titled “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
Section titled “show link-aggregation summary”[Command]
show link-aggregation summary
[Purpose]
Display LAG configuration.
[View]
Privileged User View
[Use Cases]
sonic# show link-aggregation summaryFlags: 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)show {ip|ipv6} interfaces
Section titled “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 interfacesInterface Master IPv4 address/mask Admin/Oper BGP Neighbor Neighbor IP--------------- -------- ------------------- ------------ -------------- -------------0/0.2 2.0.0.1/24 up/down N/A N/A0/48 199.0.3.1/24 up/up N/A N/Aloopback0 10.1.0.34/32 up/up N/A N/Alag24 24.0.0.1/24 up/down N/A N/Amgmt 10.250.0.138/24 up/up N/A N/Ashow interface lag lag-id
Section titled “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 summaryFlags: 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 10lag10 is up, line protocol is upHardware is EthMac address is N/AInterface index is 0010Description is N/AMode of IPV4 address assignment: not-setMode of IPV6 address assignment: not-setIP MTU 9216 bytesLineSpeed 30.0G, CurrentSpeed 10.0G, Auto-negotiation offInput statistics: 82 packets, 14988 octets 82 Multicasts, 0 Broadcasts, 0 Unicasts 0 error, 0 discardedOutput statistics: 1205 packets, 158858 octets 1205 Multicasts, 0 Broadcasts, 0 Unicasts 0 error, 0 discardedLAG Config
Section titled “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 lag-id
Section titled “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 terminalsonic(config)# interface link-aggregation 3sonic(config-lagif-3)# show this!interface link-aggregation 3description description
Section titled “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 terminalsonic(config)# interface link-aggregation 100sonic(config-lagif-100)# description lag100sonic(config-lagif-100)# do show link-aggregation summaryFlags: 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) lag100link-aggregation-group lag-id [port-priority port-priority] [lacp-key lacp-key] [lacp-portid lacp-portid]
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]
| 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 terminalsonic(config)# interface ethernet 0/45sonic(config-if-0/45)# link-aggregation-group 1sonic# show link-aggregation summaryFlags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available, S - selected, D - deselected, * - not syncedNo. 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 500sonic(config-if-0/45)# link-aggregation-group 2 port-priority 500 lacp-key 10 lacp-portid 60mode {dynamic|static}
Section titled “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 terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# mode dynamicsonic (config-lagif-3)# show this!interface link-aggregation 3 mode dynamiclacp min-links min-links
Section titled “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 terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# lacp min-links 2sonic (config-lagif-3)# show this!interface link-aggregation 3lacp min-links 2mode dynamiclacp system-priority system-priority
Section titled “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 terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# lacp system-priority 100sonic (config-lagif-3)# show this!interface link-aggregation 3lacp system-priority 100 mode dynamiclacp system-id HH:HH:HH:HH:HH:HH
Section titled “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 terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# lacp system-id 00:a0:23:12:23:53sonic (config-lagif-3)# show this!interface link-aggregation 3commitlacp system-id 00:a0:23:12:23:53mode dynamiclacp fast-rate
Section titled “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 terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# lacp fast-ratesonic (config-lagif-3)# show this!interface link-aggregation 3lacp fast-ratemode dynamiclacp fallback
Section titled “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 terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# lacp fallbacksonic (config-lagif-3)# show this!interface link-aggregation 3lacp fallbackmode dynamicmtu mtu
Section titled “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 terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# mtu 2000sonic (config-lagif-3)# show this!interface link-aggregation 3 mtu 2000shutdown
Section titled “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 terminalsonic(config)# interface link-aggregation 3sonic(config-lagif-3)# shutdownsonic(config-lagif-3)# show this!interface link-aggregation 3 shutdownip address {A.B.C.D/M|A::B/M} [secondary]
Section titled “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 terminalsonic(config)# interface link-aggregation 3sonic(config-lagif-3)# ip address 3.3.3.6/24sonic(config-lagif-3)# show this!interface link-aggregation 3ip address 3.3.3.6/24mac_address HH:HH:HH:HH:HH:HH
Section titled “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 terminalsonic(config)# interface link-aggregation 3sonic(config-lagif-3)# mac-address 18:17:25:37:67:afsonic(config-lagif-3)# show this!interface link-aggregation 3mac-address 18:17:25:37:67:afmac-address learning
Section titled “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 terminalsonic(config)# interface link-aggregation 3sonic(config-lagif-3)# no mac-address learningsonic(config-lagif-3)# show this!interface link-aggregation 3 no mac-address learninglacp graceful-down
Section titled “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 terminalsonic(config)# interface link-aggregation 3sonic(config-lagif-3)# lacp graceful-down