CentOS 桥接网卡配置

[root@controller ~]# cat /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=static
IPADDR=10.95.42.23
NETMASK=255.255.254.0
GATEWAY=10.95.42.1
DEFROUTE=yes
[root@controller ~]# cat /etc/sysconfig/network-scripts/ifcfg-em1
DEVICE=em1
NM_CONTROLLED=no
ONBOOT=yes
BOOTROTO=none
BRIDGE=br0
HWADDR=24:6e:96:d1:46:7c

重启服务:systemctl restart network

posted @ 2019-05-23 09:29  salami_china  阅读(940)  评论(0编辑  收藏  举报