Home > OS >  Centos7.3 KVM Bridge, virtual machine can't surf the Internet
Centos7.3 KVM Bridge, virtual machine can't surf the Internet

Time:10-07

The host: Red Hat Enterprise Linux Server release 7.3
KVM virtual machine using the bridge network
The host network configuration:
The cat ifcfg - ens192

BOOTPROTO=none
DEVICE=ens192
NM_CONTROLLED=no
ONBOOT=yes
BRIDGE br0=
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The cat ifcfg - br0

BOOTPROTO=static
DEVICE=br0
TYPE=Bridge,
NM_CONTROLLED=no
IPADDR=192.168.1.214
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
ONBOOT=yes
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The virtual machine network configuration
The cat/etc/sysconfig/network - scripts/ifcfg - eth0

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=192.168.1.215
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
BRCTL show
Bridge the name bridge id STP enabled interfaces
8000.0050568 cdf22 br0 no ens192
Vnet0
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
With virsh list
Id Name State
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
1 centos6.6 running
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
With virsh edit centos6.6



CodePudding user response:

Virtual LAN in bridge mode?

CodePudding user response:

The virtual machine network card set to dynamic IP, to see if there are any more problems, network segment

CodePudding user response:

Try to add a new card, then he configured to DHCP mode, reboot the machine, then restart a router, feeling is to configure static IP, capture network card MAC address is not a router,
  • Related