linux网桥(桥接配置)

1.编辑网桥配置

[root@node2 ~]# vim /etc/sysconfig/network-scripts/ifcfg-br0

DEVICE=br0

TYPE=Bridge

ONBOOT=yes

NM_CONTROLLED=no

BOOTPROTO=none

IPADDR=172.16.10.124

PREFIX=16

GATEWAY=172.16.0.1

DNS1=172.16.0.1

2.修改eth0配置

[root@node2 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=no

BOOTPROTO=none

BRIDGE=br0

3.重启网络

[root@node2 ~]# service network restart

你可能感兴趣的:(linux网桥(桥接配置))