MC-LAG
此内容尚不支持你的语言。
Table 1 MC-LAG View
| Command | Purpose |
|---|---|
| **show mclag state ** [domain-id] | Display information about MC-LAG. |
| show mclag consistency_check_result | Display the results of the parameter consistency check of MC-LAG. |
| show interface errdown | Display interfaces with err-down status. |
| **show loopback-detect ** [ethernet|link-aggregation interface_name] | Display MC-LAG loopback detection configuration. |
show mclag state [
Section titled “show mclag state [”[Command] **show mclag state ** [domain-id]
[Purpose] Display information about MC-LAG.
[Parameters]
| Parameter | Description |
|---|---|
| domain-id | Specify the domain ID, and the range is from 1 to 4095. |
[View] Privileged User View
[Use Cases]
sonic# show mclag state 11The MCLAG's keepalive is: OKMCLAG info sync is: completedDomain id: 11Local Ip: 11.0.0.6Peer Ip: 11.0.0.7Peer Link Interface: Ethernet100Keepalive time: 1sesssion Timeout : 15Peer Link Mac: 18:17:25:37:67:20Role: ActiveMCLAG Interface: PortChannel0009Loglevel: NOTICEshow mclag consistency_check_result
Section titled “show mclag consistency_check_result”[Command] show mclag consistency_check_result
[Purpose] Display the results of the parameter consistency check of MC-LAG.
[View] Privileged User View
[Use Cases]
sonic# show mclag consistency_check_result---------------------------------------------------------------------------------ifname mode(lacp/static) fast-rate fallback trunk_mode allowed_vlan---------------------------------------------------------------------------------lag203 Pass Pass Pass Pass Passlag202 Pass Pass Pass Pass Passshow interface errdown
Section titled “show interface errdown”[Command] show interface errdown
[Purpose] Display interfaces with err-down status.
[View] Privileged User View
[Use Cases]
sonic# show interface errdownInterface Status--------------- --------Ethernet0 errdownEthernet1 upEthernet2 upEthernet3 upEthernet4 upEthernet5 upEthernet6 upEthernet7 upEthernet8 upEthernet9 upEthernet10 upEthernet11 upEthernet12 upEthernet13 upEthernet14 upEthernet15 upEthernet16 upEthernet17 upEthernet18 upEthernet19 upEthernet20 upEthernet21 upEthernet22 upEthernet23 upEthernet24 upEthernet25 upEthernet26 upEthernet27 upEthernet28 upEthernet29 upEthernet30 upEthernet31 upEthernet32 upEthernet33 upEthernet34 errdownEthernet35 upEthernet36 upEthernet37 upEthernet38 upEthernet39 upEthernet40 upEthernet41 upEthernet42 upEthernet43 upEthernet44 upEthernet45 upEthernet46 upEthernet47 errdownEthernet48 errdownEthernet52 upEthernet56 errdownEthernet60 errdownEthernet64 errdownEthernet68 upEthernet72 upEthernet76 upPortChannel0001 errdownPortChannel0099 upshow loopback-detect [ethernet|link-aggregation
Section titled “show loopback-detect [ethernet|link-aggregation”[Command] **show loopback-detect ** [ethernet|link-aggregation interface_name]
[Purpose] Display MC-LAG loopback detection configuration.
[Parameters]
| Parameter | Description |
|---|---|
| interface_name | Interface name (eg.0/1) |
[View] Privileged User View
[Use Cases]
sonic# show loopback-detectPort Policy Vlan Interval Wait time Vlans with loop------ -------- ------- ---------- ----------- -----------------lag111 shutdown 100-200 10 60sonic# show loopback-detect link-aggregation 111Port Policy Vlan Interval Wait time Vlans with loop------ -------- ------- ---------- ----------- -----------------lag111 shutdown 100-200 10 60MC-LAG Config
Section titled “MC-LAG Config”Table 2 MC-LAG Config
| Command | Purpose |
|---|---|
| mclag domain domain-id | Create a MC-LAG domain. |
| peer-link {ethernet|link-aggregation} interface_name | Set peer-link for MC-LAG. |
| peer-address {A.B.C.D|A::B} | Configure peer IP address of MC-LAG control link. |
| local-address {A.B.C.D|A::B} | Configure local IP address of MC-LAG control link. |
| heartbeat-interval interval | Set the sending interval for MC-LAG keepalive messages. |
| session-timeout timeout | Set the timeout for MC-LAG sessions. |
| member lag lag-id | Configure the member ports for MC-LAG. |
| vrf vrf_name | Specify the vrf that MC-LAG keepalive session belongs to. |
| consistency-check-action {default|graceful|idle} | Specify the mode for MC-LAG consistency check. |
| backup-channel vlan vlan-id | Configure ICCP backup channel for MC-LAG. |
| dad local-address {A.B.C.D|A::B} | Configure local IP address of MC-LAG DAD link. |
| dad peer-address {A.B.C.D|A::B} | Configure peer IP address of MC-LAG DAD link. |
| dad detection-delay delay_time | Specify the delay time for MC-LAG DAD detection. |
| dad recovery-delay {non-mlag|mlag} delay_time | Specify the delay time for the interfaces in error-down to be brought up on MC-LAG standby side. |
| dad vrf vrf_name | Specify the vrf where MC-LAG DAD link is located. |
| loopback-detect vlan vlan-id [policy {shutdown|block-vlan} interval interval [wait-time wait-time]] | Configure MC-LAG loopback detection. |
| unique-ip vlan vlan-id [diff_mac|same_mac] | Enable unique-ip feature for the VLAN. |
Notes:
- It is recommended to use low-speed interfaces for the member ports of MC-LAG. To improve system reliability, it is recommended to set the link aggregation mode of member ports to LACP, and it is also recommended to enable fast-rate to improve the performance of failover convergence.
- Set a directly connected aggregation link between two MC-LAG peers as peer-link. It is recommended to use high-speed interfaces for peer-link. In order to improve the reliability of MC-LAG, it is recommended to set peer-link as static aggregation, and the number of member ports is no less than two. You need to manually assign a private VLAN for peer-link and add it to the service VLANs. No other configuration is allowed on the interfaces that are configured as peer-link.
- It is recommended to use low-speed interfaces for DAD-link (currently does not support out-of-band Management Interface ). DAD-link and peer-link cannot be shared.
- Please configure DAD-link when the peer-link status is up to prevent the ports of the standby side from being mistakenly set as error-down.
- You need to manually set a monitor link group for MC-LAG active and standby side. The uplink port is configured as uplink, and the downlink port is configured as downlink, please refer to section Monitor Link Config for specific configuration commands.
mclag domain
Section titled “mclag domain”[Command] mclag domain domain-id
[Purpose] Create a MC-LAG domain.
[Parameters]
| Parameter | Description |
|---|---|
| domain-id | Specify the domain ID, and the range is from 1 to 4095. |
[View] Global Configuration View
[Notes] Run command no mclag domain domain-id to delete MC-LAG domain.
[Use Cases]
sonic# configure terminalsonic(config)# mclag domain 1peer-link {ethernet|link-aggregation}
Section titled “peer-link {ethernet|link-aggregation}”[Command] peer-link {ethernet|link-aggregation} interface_name
[Purpose] Set peer-link for MC-LAG.
[Parameters]
| Parameter | Description |
|---|---|
| interface_name | Interface name (eg.0/1) |
[View] MC-LAG Domain Configuration View
[Notes] Run command no peer-link to delete peer-link configuration.
[Use Cases]
sonic# configure terminalsonic(config)# mclag domain 1sonic(mclag-domain)# peer-link ethernet 0/100sonic(mclag-domain)# peer-link link-aggregation 10peer-address {
Section titled “peer-address {”[Command] peer-address {A.B.C.D|A::B}
[Purpose] Configure peer IP address of MC-LAG control link.
[Parameters]
| Parameter | Description |
|---|---|
| A.B.C.D | IPv4 address |
| A::B | IPv6 address |
[View] MC-LAG Domain Configuration View
[Notes] Run command no peer-address to delete peer IP address of MC-LAG control link.
[Use Cases]
sonic# configure terminalsonic(config)# mclag domain 1sonic(mclag-domain)# peer-address 11.0.0.6local-address {
Section titled “local-address {”[Command] local-address {A.B.C.D|A::B}
[Purpose] Configure local IP address of MC-LAG control link.
[Parameters]
| Parameter | Description |
|---|---|
| A.B.C.D | IPv4 address |
| A::B | IPv6 address |
[View] MC-LAG Domain Configuration View
[Notes] Run command no local-address to delete local IP address of MC-LAG control link.
[Use Cases]
sonic# configure terminalsonic(config)# mclag domain 1sonic(mclag-domain)# local-address 11.0.0.6heartbeat-interval
Section titled “heartbeat-interval”[Command] heartbeat-interval interval
[Purpose] Set the sending interval for MC-LAG keepalive messages.
[Parameters]
| Parameter | Description |
|---|---|
| interval | Specify the interval in seconds. The range is from 1 to 60, and the default is 1. |
[View] MC-LAG Domain Configuration View
[Notes] The keepalive message interval value should be less than 1/3 of the session timeout, and the session timeout should be a multiple of the keepalive message interval. Run command no heartbeat-interval to restore MC-LAG keepalive message sending interval to the default.
[Use Cases]
sonic# configure terminalsonic(config)# mclag domain 1sonic(mclag-domain)# heartbeat-interval 6session-timeout
Section titled “session-timeout”[Command] session-timeout timeout
[Purpose] Set the timeout for MC-LAG sessions.
[Parameters]
| Parameter | Description |
|---|---|
| timeout | Specify the timeout in seconds. The range is from 3 to 3600, and the default is 15. |
[View] MC-LAG Domain Configuration View
[Notes] The keepalive message interval value should be less than 1/3 of the session timeout, and the session timeout should be a multiple of the keepalive message interval. Run command no session-timeout to restore MC-LAG session timeout to the default.
[Use Cases]
sonic# configure terminalsonic(config)# mclag domain 1sonic(mclag-domain)# session-timeout 6member lag
Section titled “member lag”[Command] member lag lag-id
[Purpose] Configure the member ports for MC-LAG.
[Parameters]
| Parameter | Description |
|---|---|
| lag-id | LAG ID, the range is from 1 to 9999. |
[View] MC-LAG Domain Configuration View
[Notes] Supports configuring multiple MC-LAG member ports. Run command no member lag lag-id to delete MC-LAG member ports configuration.
[Use Cases]
sonic# configuresonic(config)# mclag domain 1sonic(mclag-domain)# member lag 9[Command] vrf vrf_name
[Purpose] Specify the vrf that MC-LAG keepalive session belongs to.
[Parameters]
| Parameter | Description |
|---|---|
| vrf_name | Specify the VRF name, the default VRF is default. |
[View] MC-LAG Domain Configuration View
[Notes] Configure the vrf that MC-LAG keepalive session belongs to, that is, specify the vrf of the router interface to which local-address belongs. Run command no vrf to delete MC-LAG keepalive vrf configuration and restore to default vrf.
[Use Cases]
sonic# configuresonic(config)# mclag domain 1sonic(mclag-domain)# vrf 9consistency-check-action {default|graceful|idle}
Section titled “consistency-check-action {default|graceful|idle}”[Command] consistency-check-action {default|graceful|idle}
[Purpose] Specify the mode for MC-LAG consistency check.
[Parameters]
| Parameter | Description |
|---|---|
| default | In this mode, if the consistency check fails, the active and standby switches will bring the member ports down administratively at the same time. |
| graceful | In this mode, if the consistency check fails, only standby switch will bring the member ports down administratively, and the active switch will keep the member ports up. |
| idle | In this mode, it only displays the result of the consistency check, without any corresponding action. |
[View] MC-LAG Domain Configuration View
[Notes] The consistency check is in idle mode by default.
[Use Cases]
sonic# configuresonic(config)# mclag domain 1sonic(mclag-domain)# consistency-check-action defaultbackup-channel vlan
Section titled “backup-channel vlan”[Command] backup-channel vlan vlan-id
[Purpose] Configure ICCP backup channel for MC-LAG.
[Parameters]
| Parameter | Description |
|---|---|
| vlan-id | VLAN ID, the range is [1,4094]. |
[View] MC-LAG Domain Configuration View
[Notes] This feature requires an additional link. Add the interface to a separate VLAN and configure VLANIF with interface vlan vlan-id command, and then use this VLANIF as the ICCP backup channel. Run command no backup-channel to delete ICCP backup channel for MC-LAG.
[Use Cases]
sonic# configuresonic(config)# mclag domain 1sonic(mclag-domain)# backup-channel vlan 10dad local-address {
Section titled “dad local-address {”[Command] dad local-address {A.B.C.D|A::B}
[Purpose] Configure local IP address of MC-LAG DAD link.
[Parameters]
| Parameter | Description |
|---|---|
| A.B.C.D | IPv4 address |
| A::B | IPv6 address |
[View] MC-LAG Domain Configuration View
[Notes] Run command no dad local-address to delete local IP address of MC-LAG DAD link.
[Use Cases]
sonic# configuresonic(config)# mclag domain 1sonic(mclag-domain)# dad local-address 10.0.0.3dad peer-address {
Section titled “dad peer-address {”[Command] dad peer-address {A.B.C.D|A::B}
[Purpose] Configure peer IP address of MC-LAG DAD link.
[Parameters]
| Parameter | Description |
|---|---|
| A.B.C.D | IPv4 address |
| A::B | IPv6 address |
[View] MC-LAG Domain Configuration View
[Notes] Run command no dad peer-address to delete peer IP address of MC-LAG DAD link.
[Use Cases]
sonic# configuresonic(config)# mclag domain 1sonic(mclag-domain)# dad peer-address 10.0.0.2dad detection-delay
Section titled “dad detection-delay”[Command] dad detection-delay delay_time
[Purpose] Specify the delay time for MC-LAG DAD detection.
[Parameters]
| Parameter | Description |
|---|---|
| delay_time | Specify the delay time in seconds. The range is from 0 to 512, and the default is 15. |
[View] MC-LAG Domain Configuration View
[Notes] Run command no dad detection-delay time to restore the delay time to default.
[Use Cases]
sonic# configuresonic(config)# mclag domain 1sonic(mclag-domain)# dad detection-delay 60dad recovery-delay {non-mlag|mlag}
Section titled “dad recovery-delay {non-mlag|mlag}”[Command] dad recovery-delay {non-mlag|mlag} delay_time
[Purpose] Specify the delay time for the interfaces in error-down to be brought up on MC-LAG standby side.
[Parameters]
| Parameter | Description |
|---|---|
| non-mlag | Configure the delay time for non-MC-LAG members. |
| mlag | Configure the delay time for MC-LAG members. |
| delay_time | Specify the delay time for error-down interface state recovery in seconds. The range is from 0 to 1000. The default value is 60 for MC-LAG members and 0 for non-MC-LAG members. |
[View] MC-LAG Domain Configuration View
[Notes] Run command no dad recovery-delay {non-mlag|mlag} to restore the delay time to default.
[Use Cases]
sonic# configuresonic(config)# mclag domain 1sonic(mclag-domain)# dad recovery-delay non-mlag 30sonic(mclag-domain)# dad recovery-delay mlag 90dad vrf
Section titled “dad vrf”[Command] dad vrf vrf_name
[Purpose] Specify the vrf where MC-LAG DAD link is located.
[Parameters]
| Parameter | Description |
|---|---|
| vrf_name | Specify the VRF name, the default VRF is default. |
[View] MC-LAG Domain Configuration View
[Notes] Run command no dad vrf to restore the VRF of MC-LAG DAD link to default VRF.
[Use Cases]
sonic# configuresonic(config)# mclag domain 1sonic(mclag-domain)# dad vrf 200loopback-detect vlan
Section titled “loopback-detect vlan”[Command] loopback-detect vlan vlan-id [policy {shutdown|block-vlan} interval interval [wait-time wait-time]]
[Purpose] Configure MC-LAG loopback detection.
[Parameters]
| Parameter | Description |
|---|---|
| vlan-id | VLAN ID, the range is [1,4094]. |
| policy | Optionally configure the execution policy after a loopback has been detected. The default is shutdown mode. |
| shutdown | Indicates that the switch will shut down interfaces with loopback detection configured. |
| block-vlan | Indicates that the switch will block the VLAN with loopback detection configured. |
| interval | Specify the interval time in seconds, and the default value is 5 seconds. |
| wait-time | Specifies the wait time in seconds before restoring a blocked port or VLAN. The default value is 60 seconds. |
[View] Physical Interface Configuration View / LAGIF Configuration View
[Notes] This feature is enabled on the MC-LAG downlink aggregation port to avoid traffic looping due to configuration mistakes. Run command no loopback-detect to disable loopback detection.
[Use Cases]
sonic# configuresonic(config)# interface ethernet 0/52sonic(config-if-0/52)# loopback-detect vlan 10 policy shutdown interval 3sonic(config)# interface link-aggregation 111sonic(config-lagif-111)# loopback-detect vlan 200-300unique-ip vlan
Section titled “unique-ip vlan”[Command] unique-ip vlan vlan-id [diff_mac|same_mac] [Purpose] Enable unique-ip feature for the VLAN.
[Parameters]
| Parameter | Description |
|---|---|
| vlan-id | VLAN ID, the range is [1,4094]. |
| diff_mac | Use diff_mac mode when the MAC of the MC-LAG Peer’s protocol VLAN is different and the default is diff-mac mode when not specified. |
| same_mac | Use same_mac mode when the MAC of the MC-LAG Peer’s protocol VLAN is the same. |
[View] MC-LAG Domain Configuration View
[Notes] This feature supports the MC-LAG Peer to establish a routing protocol with the access side to transmit routes. There are two programmes currently supported:
- The gateway VLAN and the routing protocol VLAN are shared. The primary IP of the SVI are supposed to be different for protocol interactions, while the secondary IP be the same for external gateway. The VLAN MAC should be set to the same value (not the same with system MAC or interface MAC of the peers). In addition, it is required to enable unique-ip in same_mac mode and ARP proxy in EVPN mode for this VLAN.
- Dual VLANs, that is, the gateway VLAN is separate from the routing protocol VLAN. The IP and the MAC of the gateway VLAN should be the same. While the IP of the routing protocol VLAN should be different from one another and the MAC can just use the default value. In addition, it is required to enable unique-ip in diff_mac mode and ARP proxy in EVPN mode for routing protocol VLAN. Run command no unique-ip vlan vlan-id to disable unique-ip for vlan.
[Use Cases]
sonic# configuresonic(config)# mclag domain 1sonic(mclag-domain)# unique-ip vlan 3010 same_mac