我目前有一个处于主动备份配置的绑定设置。我试图做的是将这两个 NIC 设置为能够利用它们可以提供的大部分带宽的配置。
这会是模式 3(广播)吗?
我当前的配置如下:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
#eth0:0
iface eth0 inet manual
bond-master bond0
bond-primary eth0
# The secondary network interface
auto eth1
iface eth1 inet manual
bond-master bond0
# Bonding eth0 & eth1 to create bond0 NIC
auto bond0
iface bond0 inet static
address 192.168.1.200
gateway 192.168.1.254
netmask 255.255.255.0
bond-mode active-backup
bond-miimon 100
bond-slaves none
当我检查状态时我看到:
mlavender@~$ cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: eth0 (primary_reselect always)
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 9c:5c:8e:4f:1b:87
Slave queue ID: 0
我该如何配置才能同时使用两个 NIC,从而有效地传输超过 1GB 的数据?
附加信息
我有一台 Netgear GS724T ProSafe 交换机。我在 LAG 中配置了两个端口,并且已启用。它确实支持 – IEEE 802.3ad 静态和/或动态链路聚合
据我所知,我可以 ping 定义为 DNS 服务器的主机。本地网关和两个 Google DNS 服务器。我无法 ping 任何其他东西。当然,由于名称解析问题,运行 apt-get update 也会失败。
有任何想法吗?
更新
尝试运行 tracepath
tracepath 8.8.8.8
mlavender@~$ tracepath 8.8.8.8
1?: [LOCALHOST] pmtu 1500
1: 192.168.1.254 0.831ms
1: 192.168.1.254 0.914ms
2: xxx.xxx.x.xxx 168.148ms
3: 71.149.77.116 5.205ms
4: 75.8.128.144 4.537ms
5: 12.83.68.145 6.995ms
6: 12.122.85.197 10.035ms asymm 7
7: no reply
8: no reply
9: no reply
10: no reply
我可以 ping Google DNS 服务器。我可以 ping LAN 上的任何设备。更新的接口文件:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet manual
bond-master bond0
bond-master eth0
# The secondary network interface
auto eth1
iface eth1 inet manual
bond-master bond0
# Bonding eth0 & eth1 to create bond0 NIC
auto bond0
iface bond0 inet static
address 192.168.1.200
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254
bond-mode 802.3ad
bond-miimon 100
bond-slaves none
我也进入了交换机,并且没有将 LAG 类型设置为静态,而是将其切换为 LACP。
答案1
最终,解决这个问题的方法是编辑我的 resolv.conf 文件。完成此操作后,我重新启动了服务器,然后,瞧!神奇!
感谢大家的帮助。对于任何需要它的人,这将使你的两个 NIC 绑定在一起,形成一个有效的 LAG。确保你的交换机也设置为 LACP。
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet manual
bond-master bond0
# The secondary network interface
auto eth1
iface eth1 inet manual
bond-master bond0
# Bonding eth0 & eth1 to create bond0 NIC
auto bond0
iface bond0 inet static
address 10.0.0.90
netmask 255.255.255.0
network 10.0.0.0
broadcast 10.0.0.255
gateway 10.0.0.250
dns-nameserver 10.0.0.250 8.8.8.8 8.8.4.4
bond-mode 4
bond-miimon 100
bond-slaves all