我有两个networking适配器的服务器。 我configuration绑定 ,它的作品。 这是工作configuration:
auto lo iface lo inet loopback auto eth0 iface eth0 inet manual bond-master bond0 bond-primary eth0 auto eth1 iface eth1 inet manual bond-master bond0 auto bond0 iface bond0 inet static bond-mode balance-rr bond-miimon 100 bond-slaves none address 192.168.1.2 gateway 192.168.1.1 netmask 255.255.255.0 dns-nameservers 192.168.1.13
我试图添加一个桥,但是,然后,机器失去连接。
我试过了:
要为bond0和br0指定相同的 IP地址,网关,networking掩码和名称服务器,或者只为br0指定一个,
为了在bond0 添加post-up / pre-down ,
要将pre-up / post-down到br0 ,
由Benjamin Franz克隆解决scheme (相应地调整IP地址),
通过Kendall Gifford克隆解决scheme (相应地调整IP地址)。
例如, 以下configuration不起作用:
auto lo iface lo inet loopback auto eth0 iface eth0 inet manual bond-master bond0 auto eth1 iface eth1 inet manual bond-master bond0 auto bond0 iface bond0 inet static bond-mode balance-rr bond-miimon 100 bond-slaves none auto br0 iface br0 inet static bridge_ports bond0 bridge_maxwait 0 bridge_fd 0 post-up ifup bond0 post-down ifdown bond0 address 192.168.1.2 gateway 192.168.1.1 netmask 255.255.255.0 dns-nameservers 192.168.1.13
我还有什么可以尝试使其工作?
它以某种方式工作:
删除任何后/前/后/前/后,
为br0和bond0添加IP地址,网关,networking掩码和名称服务器。
在启动过程中,我连续看到/etc/init/failsafe.conf的以下消息:
正在等待networkingconfiguration…
等待多达60秒的networkingconfiguration…
没有完整networkingconfiguration的引导系统…
但是一旦启动完成,机器就会连接到networking。
最终的configuration如下所示:
auto lo iface lo inet loopback auto eth0 iface eth0 inet manual bond-master bond0 auto eth1 iface eth1 inet manual bond-master bond0 auto bond0 iface bond0 inet static bond-mode balance-rr bond-miimon 100 bond-slaves none address 192.168.1.2 gateway 192.168.1.1 netmask 255.255.255.0 dns-nameservers 192.168.1.13 auto br0 iface br0 inet static bridge_ports bond0 bridge_maxwait 0 bridge_fd 0 post-up ifup bond0 post-down ifdown bond0 address 192.168.1.2 gateway 192.168.1.1 netmask 255.255.255.0 dns-nameservers 192.168.1.13
iface x inet static
只有在有ipconfiguration时才启动接口。 要在没有IPconfiguration的情况下调用接口,您必须使用:
iface x inet manual
所以修复你的configuration:
auto lo iface lo inet loopback auto eth0 iface eth0 inet manual bond-master bond0 auto eth1 iface eth1 inet manual bond-master bond0 auto bond0 iface bond0 inet manual bond-mode balance-rr bond-miimon 100 bond-slaves none auto br0 iface br0 inet static bridge_ports bond0 bridge_maxwait 0 bridge_fd 0 post-up ifup bond0 post-down ifdown bond0 address 192.168.1.2 gateway 192.168.1.1 netmask 255.255.255.0 dns-nameservers 192.168.1.13