我正在尝试在 Ubuntu 服务器 16.04 上设置特定的网络配置以便使用 KVM。
我需要创建三个 Bond,一个没有网桥,一个有网桥和 Vlan。所有 Bond 都处于主动备份模式
纽带 :
Bond0 --> br0 --> ip address
Bond1 --> br1 -->
Bond1.103 --> br1.103 --> ip address
Bond5 --> ip address
目前,只有第一个键/桥工作正常(bond0/br0)。
这里的配置是:
# The primary network interface
auto ens1f0
iface ens1f0 inet manual
bond-master bond0
bond-primary ens1f0
auto ens1f1
iface ens1f1 inet manual
bond-master bond0
#Bond0
auto bond0
iface bond0 inet manual
bond_slaves none
bond-downdelay 0
bond-updelay 0
bond-miimon 100
#bond_mode 1
#br0
auto br0
iface br0 inet static
bridge_ports bond0
bridge_fd 5
bridge_stp off
bridge_maxwait 1
address 192.15.22.200
netmask 255.255.255.0
broadcast 192.15.22.255
gateway 192.15.22.254
dns-nameservers 8.8.8.8
第二个 (债券1/br1)似乎已启动,但我无法提升 vlan(债券1.103) 和桥 (cloudbr1.103)
这里的配置是:
auto enp2s0f0
iface enp2s0f0 inet manual
bond-master bond1
bond-primary enp2s0f0
auto enp2s0f1
iface enp2s0f1 inet manual
bond-master bond1
#bond1
auto bond1
iface bond1 inet manual
bond-downdelay 0
bond-updelay 0
bond-miimon 100
bond_slaves none
# VLAN
#vlan103
auto bond1.103
iface bond1.103 inet manual
vlan_raw_device bond1
# BRIDGES
#br1
auto br1
iface br1 inet manual
bridge_ports bond1
bridge_fd 5
bridge_stp off
bridge_maxwait 1
#br1.103
auto br1.103
iface br1.103 inet static
address 192.15.3.218
netmask 255.255.255.0
network 192.15.3.0
gateway 192.15.3.254
bridge_ports bond1.103
bridge_fd 5
bridge_stp off
bridge_maxwait 1
最后一个,我做了和下面完全相同的配置bond0但在启动或网络重启期间不会提高绑定......
这里的配置是:
auto ens2f0
iface ens2f0 inet manual
bond-master bond5
bond-primary ens2f0
auto ens2f1
iface ens2f1 inet manual
bond-master bond5
#bond5
auto bond5
iface bond5 inet static
address 192.15.5.200
netmask 255.255.255.0
gateway 192.15.5.254
network 192.15.5.0
broadcast 192.15.5.255
bond_slaves none
bond-downdelay 0
bond-updelay 0
bond-miimon 100
#bond_mode 1
与此债券相关的系统日志错误:
Jul 2 11:00:35 KVM08 kernel: [86708.649875] bond5: Removing slave ens2f1
Jul 2 11:00:35 KVM08 kernel: [86708.649927] bond5: Releasing backup interface ens2f1
Jul 2 11:00:35 KVM08 kernel: [86708.649931] bond5: the permanent HWaddr of ens2f1 - 68:b5:99:b5:a4:84 - is still in use by bond5 - set the HWaddr of ens2f1 to a different address to avoid conflicts
Jul 2 11:00:37 KVM08 kernel: [86709.981820] bond5: Removing slave ens2f0
Jul 2 11:00:37 KVM08 kernel: [86709.981876] bond5: Releasing active interface ens2f0
Jul 2 11:00:37 KVM08 kernel: [86710.004204] bonding: bond5 is being deleted...
Jul 2 11:00:37 KVM08 kernel: [86710.005675] bond5 (unregistering): Released all slaves
Jul 2 11:00:37 KVM08 systemd[1]: Stopping ifup for bond5...
Jul 2 11:00:37 KVM08 ifdown[6310]: /sbin/ifdown: waiting for lock on /run/network/ifstate.bond5
Jul 2 11:00:37 KVM08 ifdown[6310]: /sbin/ifdown: interface bond5 not configured
Jul 2 11:00:37 KVM08 systemd[1]: Stopped ifup for bond5.
我已经关注这线。
所以如果有人可以看一下我的配置并检查是否存在一些错误......