---
title: "MC-LAG redundant connection"
sidebar_label: "MC-LAG redundant connection"
sidebar_position: 12
description: "How it works, connection speed, configuration"
---

import Formbricks from '@theme/MDXComponents/Formbricks'
import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import {TabItemLabel} from '@selectel/docux/components'

# MC-LAG redundant connection

MC-LAG (Multi-chassis link aggregation group) — multi-chassis link aggregation. It provides redundant connections to LAN and Internet access switches, [increases infrastructure fault tolerance](/dedicated/about/increase-fault-tolerance/). For prebuilt servers, you can only reserve a connection to the LAN. Redundancy is not available for all configurations.

[Configure MC-LAG](#configure-mc-lag) only for servers whose configuration includes a redundant network card and MC-LAG.

For servers with an MC-LAG redundant connection, Selectel guarantees constant availability of one of the access switches, even during scheduled maintenance.

## How it works \{#principle-of-operation}

The server connects to two independent switches via an aggregated Ethernet channel (LAG, Etherchannel). The LACP 802.3ad protocol is used for the connection, and link aggregation is configured on the server side. In this case, two links from the access switches to the server will be active simultaneously.

![](https://423.selcdn.ru/kb/dedic-mlag-logic-LANG-THEME.png)

## Connection speed \{#connection-speed}

For servers of [custom configuration](/dedicated/order/dedicated-configurations.mdx#custom-servers):

* 1 Gbit/s — copper crossover is used for the connection;
* 10 Gbit/s — optical crossover is used for the connection;
* 25 Gbit/s — LAN only; optical crossover is used for the connection.

For servers of [prebuilt configuration](/dedicated/order/dedicated-configurations.mdx#prebuilt-servers):

* 10 Gbit/s — for public network, optical crossover is used for the connection;
* 10 Gbit/s — for LAN; optical crossover is used for the connection;
* 25 Gbit/s — for LAN; optical crossover is used for the connection.

## Cost \{#price}

The cost of an MC-LAG redundant connection depends on the selected connection speed.

You can view the cost in the configurator [on our website](https://selectel.ru/services/dedicated/) or when selecting server components in the [Control Panel](https://my.selectel.ru/servers/order/pre-built/).

## Configure MC-LAG \{#configure-mc-lag}

1. Make sure your dedicated server configuration includes a network card with redundancy and that MC-LAG is added. If there is no network card with redundancy, you can order a new server with redundancy or change components for a custom server configuration.
2. Wait for a server readiness message from technical support. The switch ports will be aggregated into a bond.
3. [Configure channel aggregation (LAG) on the server](#configure-channel-aggregation-on-server).

### Configure channel aggregation on the server \{#configure-channel-aggregation-on-server}

Do not connect to the server via network interfaces that will be included in the aggregation. They must be disconnected during configuration.

<Tabs queryString="configure-channel-aggregation-on-server">
  <TabItem value="ubuntu" default>
    <TabItemLabel>
      Ubuntu (netplan)
    </TabItemLabel>

    1. Connect to the server via a network interface that will not be included in the aggregation or via [KVM console](/dedicated/manage/connect-to-server.mdx#connect-via-kvm-console).

    2. Output information about the network interfaces:

       ```bash
       ip link
       ```

    3. Open the `/etc/netplan/01-netcfg.yaml` file:

       ```bash
       nano /etc/netplan/01-netcfg.yaml
       ```

    4. Set the settings for the network interfaces that will be included in the aggregation to the following:

       ```yaml
       network:
         version: 2
         renderer: networkd
         ethernets:
           <eth_name_1>:
             dhcp4: false
           <eth_name_2>:
             dhcp4: false

         bonds:
           bond0:
             addresses:
               - <ip_address>/<mask>
             gateway4: <gateway_4>
             gateway6: <gateway_6>
             interfaces:
               - <eth_name_1>
               - <eth_name_2>
             # https://netplan.io/reference#properties-for-device-type-bonds
             parameters:
               mode: 802.3ad
               lacp-rate: fast
               transmit-hash-policy: layer3+4
               mii-monitor-interval: 100
               down-delay: 100
               up-delay: 100
       ```

       Specify:

       * `<eth_name_1>`, `<eth_name_2>` — names of the network interfaces to be included in the aggregation;
       * `<ip_address>` — IP address to be used on the aggregated interface;
       * `<mask>` — the subnet mask;
       * `<gateway_4>`, `<gateway_6>` — gateway.

    5. Apply the new configuration:

       ```bash
       netplan --debug apply
       ```

    6. Check that the `bond0` network interface has been created correctly:

       ```bash
       cat /proc/net/bonding/bond0
       ```
  </TabItem>

  <TabItem value="debian">
    <TabItemLabel>
      Debian 9, 10 (lacp)
    </TabItemLabel>

    1. Connect to the server via a network interface that will not be included in the aggregation or via [KVM console](/dedicated/manage/connect-to-server.mdx#connect-via-kvm-console).

    2. Ensure that the `bonding` kernel module is installed on the server:

       ```bash
       lsmod | grep bond
       ```

       If there is no information in the response, the `bonding` kernel module is not installed.

    3. If the `bonding` kernel module is not installed, install it:

       ```bash
       sudo modprobe bonding
       ```

    4. Install the package for managing and configuring interfaces for parallel routing (`bonding`):

       ```bash
       apt-get install ifenslave
       ```

    5. Output information about the network interfaces:

       ```bash
       ifconfig -a
       ```

    6. Sequentially disable each network interface that will be included in the aggregation:

       ```bash
       ifdown <eth_name>
       ```

       Specify `<eth_name>` — the interface name you obtained in step 5.

    7. Open the `/etc/network/interfaces.d/50-cloud-init` file:

       ```bash
       nano /etc/network/interfaces.d/50-cloud-init
       ```

    8. Set the settings for the network interfaces that will be included in the aggregation to the following:

       ```text
       auto lo
       iface lo inet loopback

       auto <eth_name_1>
       iface <eth_name_1> inet static
           bond-master bond0
           bond-primary <eth_name_1> <eth_name_2>

       auto <eth_name_2>
       iface <eth_name_2> inet manual
           bond-master bond0
           bond-primary <eth_name_1> <eth_name_2>

       auto bond0
       iface bond0 inet static
           bond-slaves <eth_name_1> <eth_name_2>
           bond-mode 802.3ad
           bond-miimon 100
           bond-downdelay 100
           bond-updelay 100
           bond-xmit-hash-policy layer3+4
           address <ip_address>
           netmask <mask>
           gateway <gateway>
           dns-nameservers <dns_servers>
       ```

       Specify:

       * `<eth_name_1>`, `<eth_name_2>` — names of the network interfaces to be included in the aggregation;
       * `<ip_address>` — the IP address to use on the aggregated interface;
       * `<mask>` — the subnet mask;
       * `<gateway>` — the gateway;
       * `<dns_servers>` — DNS server address. We recommend using [Selectel recursive DNS servers](/infrastructure/dns/dns-recursive-servers-list.mdx), but you can specify any available DNS servers.

    9. Apply the network configuration changes:

       ```shell
       source /etc/network/interfaces.d/50-cloud-init
       ```

    10. Bring up the `bond0` network interface:

        ```bash
        ifup bond0
        ```

    11. Restart network services:

        ```bash
        /etc/init.d/networking start
        ```

    12. Check that the `bond0` network interface was created correctly:

        ```bash
        cat /proc/net/bonding/bond0
        ```
  </TabItem>

  <TabItem value="windows-2019">
    <TabItemLabel>
      Windows Server 2019
    </TabItemLabel>

    In Windows Server 2019, you can combine multiple network interfaces into one logical interface using NIC Teaming.

    <Tabs queryString="nic-teaming">
      <TabItem value="server-manager" default>
        <TabItemLabel>
          Server Manager
        </TabItemLabel>

        1. Connect to the server via a network interface that will not be included in the aggregation or via [KVM console](/dedicated/manage/connect-to-server.mdx#connect-via-kvm-console).

        2. Launch **Server Manager**.

        3. Open the **Local Server** section → **Properties** block.

        4. Click **NIC Teaming**.

        5. In the **Servers** block, select the server to configure.

        6. In the **Groups** block, click **Tasks** and select **New Team**.

        7. In the **Team name** field, enter the group name.

        8. In the **Member adapters** block, select the network adapters to add to the group.

        9. In the **Teaming mode** field, select — LACP.

        10. In the **Load balancing mode** field, select the load balancing algorithm.

        11. Optional: in the **Primary team interface** field, enter the VLAN ID for the group interface if it is used in a private network and you have [Q-in-Q](/dedicated/networks/q-in-q.mdx) enabled. Do not use a VLAN ID for the public network interface.

        12. Click **OK**.

        13. [Configure the aggregated network interface](/dedicated/networks/configure-network-interface-on-server.mdx).
      </TabItem>

      <TabItem value="powershell">
        <TabItemLabel>
          PowerShell
        </TabItemLabel>

        1. Connect to the server via a network interface that will not be included in the aggregation or via [KVM console](/dedicated/manage/connect-to-server.mdx#connect-via-kvm-console).

        2. Launch PowerShell as an administrator.

        3. Create a VMSwitch:

           ```bash
           New-NetLbfoTeam -Name <group_name> -TeamMembers "<eth_name_1>","<eth_name_2>" -TeamingMode <teaming_mode> -LoadBalancingAlgorithm <algorithm>
           ```

           Specify:

           * `<group_name>` — group name;
           * `<eth_name_1>`, `<eth_name_2>` — names of the interfaces to be added to the group;
           * `<teaming_mode>` — channel aggregation mode;
           * `<algorithm>` — load balancing algorithm.

        4. [Configure the aggregated network interface](/dedicated/networks/configure-network-interface-on-server.mdx).
      </TabItem>
    </Tabs>
  </TabItem>

  <TabItem value="windows-2022">
    <TabItemLabel>
      Windows Server 2022
    </TabItemLabel>

    Starting with Windows Server 2022, NIC Teaming technology has been replaced by Switch Embedded Teaming (SET). SET can only be configured when creating a Hyper-V virtual switch.

    1. Connect to the server via a network interface that will not be included in the aggregation or via [KVM console](/dedicated/manage/connect-to-server.mdx#connect-via-kvm-console).

    2. Launch PowerShell as an administrator.

    3. Create a VMSwitch:

       ```bash
       New-VMSwitch -Name <switch_name> -NetAdapterName "<eth_name_1>","<eth_name_2>" -EnableEmbeddedTeaming $true
       ```

       Specify:

       * `<switch_name>` — virtual switch name;
       * `<eth_name_1>`, `<eth_name_2>` — names of the interfaces to be added to the group.

    4. [Configure the aggregated network interface](/dedicated/networks/configure-network-interface-on-server.mdx).
  </TabItem>
</Tabs>

<Formbricks />
