绑定负载均衡概述

Bonding is a technology that allows the aggregation of multiple ethernet-like interfaces into a single virtual link, thus getting higher data rates and providing failover.

配置实例

假设在每个路由器上有两个以太网接口(SW1和SW2),希望在这两个路由器之间获得最大的速率。为了实现这一点,请按以下步骤:

  1. 确保接口上没有IP地址,这些接口将被设为绑定接口。

  2. 在SW1上添加绑定接口和IP地址:

    /interface bonding add mode =802.3ad slaves =ether1,ether2 name =bond1

    /ip address add address =172.16.0.1/24 interface =bond1

  3. 在SW2做同样的设置:

    /interface bonding add mode =802.3ad slaves =ether1,ether2 name =bond1

    /ip address add address =172.16.0.2/24 interface =bond1

  4. 从Router1测试连接:

[admin@Router1] > ping 172.16.0.2
  SEQ HOST                                 SIZE TTL TIME  STATUS
    0 172.16.0.2                             56  64 0ms
    1 172.16.0.2                             56  64 0ms
    2 172.16.0.2                             56  64 0ms
    sent =3 received =3 packet-loss =0% min-rtt =0ms avg-rtt =0ms max-rtt =0ms

The bonding interface has to be configured on both hosts and needs a couple of seconds to get connectivity with its peers.

平衡模式

balance-xor

这种模式根据散列的协议头信息在活动端口之间平衡出站流量,接受来自任何活动端口的入站流量。该模式和 LACP 非常相似,只是没有标准化,与 layer-3-and-4 的哈希策略一起工作。该模式可以和静态链路聚合组(LAG)接口一起工作。

其他信息

更多信息 Bonding in RouterOS!