添加桥接的接口

添加桥接的接口

我正在尝试编写/etc/network/interfaces将两个以太网接口组合在一个桥接器中的组合。问题在于系统使用 PXE 加载程序和 NFS 根启动,并且其中一个接口已在 NFS 挂载阶段获取其 IP。将分配有 IP 的接口添加到网桥可能没问题,但由于某种原因我的/etc/network/interfaces设置失败了。它看起来像:

# initrd assigns IP to eth0 automatically
auto eth0
iface eth0 inet manual
pre-up ifconfig $IFACE up
post-down ifconfig $IFACE down

auto eth1
iface eth1 inet manual
pre-up ifconfig $IFACE up
post-down ifconfig $IFACE down

auto br0
iface br0 inet dhcp
bridge_ports eth0 eth1

我相信在br0可以提出之前,eth0应该将其放下并分配类似的东西0.0.0.0

是否有一种自动方式告诉网络工具我想忽略任何现有eth0eth1已经存在的设置以及br0这两个设置?

相关内容