禁用网络管理器

 

# chkconfig NetworkManager off

# service  NetworkManager stop

 

创建用以桥接的虚拟网卡

 

# cd /etc/sysconfig/network-scripts 

# cp ifcfg-eth0 ifcfg-br0

 

编辑 ifcfg-br0

 

# vi ifcfg-br0 

DEVICE="br0"
TYPE="Bridge"
ONBOOT="yes"
BOOTPROTO=static
IPADDR=192.168.1.17
PREFIX=24
GATEWAY=192.168.1.1
DNS1=202.106.46.151

DELAY=0 

 

编辑ifcfg-eth0 

 

# vi ifcfg-eth0 

 

DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Ethernet
BRIDGE="br0"
BOOTPROTO=none
IPADDR=192.168.1.17
PREFIX=24
GATEWAY=192.168.1.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
DNS1=202.106.46.151

HWADDR=00:1E:67:07:EC:30 

 

重新启动网络

 

# service network restart  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2021-09-20
  • 2022-01-07
  • 2021-07-31
  • 2022-01-25
  • 2021-07-26
猜你喜欢
  • 2022-12-23
  • 2021-10-16
  • 2021-08-17
  • 2022-01-15
  • 2022-01-15
相关资源
相似解决方案