1. nmcli命令搭建
nmcli connection add type bridge con-name br0 ifname br0 autoconnect yes nmcli connection modify br0 ipv4.addresses "192.168.8.16/24" ipv4.gateway 192.168.8.1 ipv4.dns 8.8.8.8 ipv4.method manual connection.autoconnect yes nmcli connection add type bridge-slave ifname enp8s0f0 master br0 nmcli connection down enp8s0f0; nmcli connection up br0 nmcli connection show
2. 配置文件搭建
# cat /etc/sysconfig/network-script/ifc-br0 TYPE=Bridge BOOTPROTO=none DEVICE=br0 ONBOOT=yes IPADDR=192.168.1.100 PREFIX=24 GATEWAY=192.168.1.1 DNS1=114.114.114.114 # cat /etc/sysconfig/network-script/ifc-eno1 TYPE=Ethernet BOOTPROTO=none DEVICE=eno1 ONBOOT=yes BRIDGE=br0
标签:nmcli,192.168,br0,connection,网桥,ipv4,yes,centos8,搭建 From: https://www.cnblogs.com/santia-god/p/17090386.html