因此,我安装了 ubuntu 13.10 并尝试聚合我的几个接口。首先,我觉得可疑的是我的接口以不寻常的方式调用:p1p1 和 p1p2,而不是通常的 eth0 和 eth1。因此,我安装了 ifenslave,并尝试创建 bond0 接口,这是我的第二点:当我启动服务器时,出现很多失败消息,提示“无法创建虚拟网络接口”。网络服务已停止,并且由于未知原因无法启动。ifconfig -a 显示包括 bond0 在内的所有接口,但当我尝试 ifup bond0 时,它显示:/etc/networking/interfaces:21:未知地址类型。这个问题的原因是什么?我阅读了很多手册,按照上面写的方法操作,但徒劳无功。这是我的 /etc/networking/interfaces:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
#auto p1p1
#iface p1p1 inet static
# address 10.0.9.15
# netmask 255.255.255.0
# network 10.0.9.0
# broadcast 10.0.9.255
# gateway 10.0.9.254
# # dns-* options are implemented by the resolvconf package, if installed
# dns-nameservers 10.0.9.6
# dns-search school49-tver.ru
auto bond0
iface bond0 itet static
address 172.16.0.2
netmask 255.255.255.128
network 172.16.0.0
broadcast 172.16.0.127
gateway 172.16.0.1
dns-nameservers 10.0.9.6
dns-search school49-tver.ru
bond-mode 4
bond-miimon 100
bond-lacp-rate 1
bond-slaves p1p1 p1p2
#auto bond0.40
auto p1p1
iface p1p1 inet manual
bond-master bond0
auto p1p2
iface p1p2 inet manual
bond-master bond0
答案1
问题一下子就解决了。关注这说明。这是我的工作配置:
auto lo
iface lo inet loopback
auto p1p1
iface p1p1 inet manual
bond-master bond0
auto p1p2
iface p1p2 inet manual
bond-master bond0
auto bond0
iface bond0 inet static
address 172.16.0.2
netmask 255.255.255.128
network 172.16.0.0
broadcast 172.16.0.127
gateway 172.16.0.1
bond-mode 4
bond-miimon 100
bond-lacp-rate 1
bond-slaves p1p1 p1p2