daf*_*ydd 6 linux networking ethernet bonding
我几乎可以发布解决我复杂的端口绑定问题的解决方案了。但是,在读取bonding.txt文件时,我看到了这个选项文本:
ad_select
Specifies the 802.3ad aggregation selection logic to use. The possible values and their effects are:
stable or 0
The active aggregator is chosen by largest aggregate bandwidth.
Reselection of the active aggregator occurs only when all slaves of the active aggregator are down or the active aggregator has no slaves.
This is the default value.
bandwidth or 1
The active aggregator is chosen by largest aggregate bandwidth. Reselection occurs if:
- A slave is added to or removed from the bond
- Any slave's link state changes
- Any slave's 802.3ad association state changes
- The bond's administrative state changes to up
count or 2
The active aggregator is chosen by the largest number of ports (slaves). Reselection occurs as described under the "bandwidth" setting, above.
Run Code Online (Sandbox Code Playgroud)
如此写法,我不知道一个债券是否可以包含多个聚合器!如果绑定模块足够智能,可以在一个绑定中整理出多个聚合,那么我就是金子!
让我从那边简化我的绘图:
____________ eth1 ________ eth2 ____________
| switch 1 |========| host |--------| switch 2 |
------------ eth3 -------- ------------
Run Code Online (Sandbox Code Playgroud)
这些交换机不会跨交换机执行 802.3ad。那么,如果我将所有三个接口都放在一个 802.3ad 绑定中,我会得到两个聚合器吗?一个包含 eth1 和 eth3,另一个只包含 eth2?可以想象,主机和交换机之间的 LACP 信号足以做到这一点。我只是不知道该功能是否真的内置。
任何人?任何人?我可以从单个接口绑定中获得两个聚合器吗?
是的,鉴于以下配置:
.-----------. .-----------.
| Switch1 | | Switch2 |
'-=-------=-' '-=-------=-'
| | | |
| | | |
.-=----.--=---.---=--.----=-.
| eth0 | eth1 | eth2 | eth3 |
|---------------------------|
| bond0 |
'---------------------------'
Run Code Online (Sandbox Code Playgroud)
如果每个交换机都在 中配置了两个端口PortChannel,则具有 LACP 绑定的 Linux 端将协商两个聚合器 ID:
Aggregator ID 1
- eth0 and eth1
Aggregator ID 2
- eth2 and eth3
Run Code Online (Sandbox Code Playgroud)
并且开关将具有彼此完全分开的视图。
开关 1 会认为:
Switch 1
PortChannel 1
- port X
- port Y
Run Code Online (Sandbox Code Playgroud)
Switch 2 会想:
Switch 2
PortChannel 1
- port X
- port Y
Run Code Online (Sandbox Code Playgroud)
在带有绑定的 Linux 系统中,在给定时间只会使用一个聚合器,并且会根据ad_select.
因此,假设Aggregator ID 1正在使用中,并且您将eth0的电缆拔出,则默认行为是保持打开状态Aggregator ID 1。
但是,Aggregator ID 1只有 1 根电缆,还有Aggregator ID 22 根电缆的备用电缆 - 带宽的两倍!
如果使用ad_select=count或ad_select=bandwidth,则活动聚合器 ID 会故障转移到具有最多电缆或最大带宽的聚合器。
注意LACP要求一个Aggregator的端口都必须是相同的速度和双工,所以我相信你可以配置一个1Gbps端口的聚合器和一个10Gbps端口的聚合器,并根据你是否有20/10/2/1Gbps来智能选择可用的。
如果这没有意义,请告诉我,我很乐意改进此答案。LACP 是一个很棒的协议,它可以做很多人们不知道的事情,这是常见的一种。
人们总是想要“绑定”,这是无法做到的,但 LACP 允许相同的设置,具有更多优势和智能链接选择。
VPC注意事项
某些交换机可以配置为“逻辑加入”一个聚合器,因此这两个交换机充当一个聚合器 ID。这通常称为“虚拟端口通道”或“多机箱链路聚合”(MLAG)。
这是可能的,但不是我们在这里谈论的。在这个答案中,我们谈论的是两个彼此不了解的分立开关。
| 归档时间: |
|
| 查看次数: |
7327 次 |
| 最近记录: |