为何找不到我的桥?

为何找不到我的桥?

我正在全新安装的 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 上以相同方式设置的桥接器都没有问题)。错误的原因可能是什么?

答案1

原来我失踪了bridge-utils

# apt install bridge-utils

解决了这个问题。

相关内容