source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
步调 3 - 在 /etc/network/interfaces.d/br0 中设备网桥(br0)
应用文本编辑器创建一个文本文件,比如 vi
敕令:
在个中添加设备:
## static ip config file for br0 ##
auto br0
iface br0 inet static
address 192.168.2.23
broadcast 192.168.2.255
netmask 255.255.255.0
gateway 192.168.2.254
# If the resolvconf package is installed, you should not edit
# the resolv.conf configuration file manually. Set name server here
#dns-nameservers 192.168.2.254
# If you have muliple interfaces such as eth0 and eth1
# bridge_ports eth0 eth1
bridge_ports eno1
bridge_stp off # disable Spanning Tree Protocol
bridge_waitport 0 # no delay before a port becomes available
bridge_fd 0 # no forwarding delay
如不雅你想应用 DHCP 来获得 IP 地址: