我在全新的 Ubuntu 16.04 安装上设置了一座桥,但它在“查找设备”时失败了。
它在 /etc/network/interfaces 中配置:
auto testing0
iface testing0 inet static
bridge_ports none
address 10.20.2.254
netmask 255.255.255.0
broadcast 10.20.2.255
当(重新)启动服务时,我收到一个奇怪的错误:
# ifup testing0 --verbose
Parsing file /etc/network/containers
Configuring interface testing0=testing0 (inet)
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/ifenslave
+ [ inet = meta ]
+ IF_BOND_SLAVES=
+ [ ]
+ [ ]
+ [ -z ]
+ exit
run-parts: executing /etc/network/if-pre-up.d/vlan
/bin/ip addr add 10.20.2.254/255.255.255.0 broadcast 10.20.2.255 dev testing0 label testing0
Cannot find device "testing0"
Failed to bring up testing0.
这是我第一次看到这样的问题(其他 Ubuntu 16.04 上的其他网桥以相同的方式设置也可以)。错误的原因可能是什么?
原来我失踪了
bridge-utils
。解决了这个问题。