我的处境:
我有一个运行Ubuntu16.04的服务器。
此服务器有两个IP地址。
现在,我想安装一个Brige,让VM (KVM)访问网络,这样我就不必为这个端口转发编写没完没了的IP表规则。
有什么办法吗?
如果我进入一个桥,然后键入"brctl显示“,它不会是谁在我的记忆中创建了br0。
发布于 2017-06-19 11:29:25
将桥的ethX设备设置为/etc/network/interfaces中的手动设备,并将桥端口设置为ethX设备。例如:
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 5现在,您可以在KVM或virsh中使用br0设备。
sudo brctl show
bridge name bridge id STP enabled interfaces
br0 8000.5254003fa659 no eth0有关桥接设备的详细信息,请参阅https://wiki.debian.org/BridgeNetworkConnections。
一如既往,您可以向任何设备添加多个IP地址,例如:
auto br0:1
iface br0:1 inet static
address 192.168.1.2https://askubuntu.com/questions/926975
复制相似问题