0

I have a CentOS 7 host with a network bridge set up for guest VM's to use. All was well until a recent reboot. After the reboot, the guest VM does not have internet access, nor can it ping other local addresses (and other local machines cannot ping the guest) The host machine has internet access, and I can SSH into it from within the LAN.

I have the following files in /etc/sysconfig/network-scripts on the host system:

ifcfg-br0:

STP=no
TYPE=Bridge
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=br0
UUID=3feaa236-2ea8-4024-9667-d446e952fc44
DEVICE=br0
ONBOOT=yes
IPADDR=192.168.1.130
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
ONBOOT=yes

ifcfg-bridge-slave-enp0s25:

TYPE=Ethernet
NAME=bridge-slave-enp0s25
UUID=b9e60eb8-b9f8-497c-89f6-40d60b4bced8
DEVICE=enp0s25
ONBOOT=yes
BRIDGE=br0

ifcfg-enp0s25:

TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s25
UUID=a4799b47-9042-4a95-925c-d1d364fc99de
DEVICE=enp0s25
ONBOOT=yes
IPADDR=192.168.1.131
PREFIX=24
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=8.8.4.4
IPV6_PRIVACY=no

GUEST SYSTEM'S /etc/sysconfig/network-scripts/ifcfg-eth0

TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="eth0"
UUID="7c2087a0-7d4b-4e3a-ac71-07b8dcac07ad"
DEVICE="eth0"
ONBOOT="yes"
IPADDR="192.168.1.132"
PREFIX="24"
GATEWAY="192.168.1.1"
DNS1="8.8.8.8"
DNS2="8.8.4.4"

The VM was installed with virt-install using the --network bridge=br0 argument, and it was able to access the web, serve web pages via apache, and it could be pinged my other computer in the LAN.

What can I do next to get this guest VM back on the network through the br0 network bridge?

1
  • @roaima Hey, I had actually deleted that comment and up voted you. It appears that this has actually restored my network access to the VM. I hooked up a monitor and keyboard to that server and rebooted, and everything was perfect. I think that the server itself just appeared to be on (orange power light) but didn't actually reboot. If you'd like to reply with an answer, I'll gladly accept. Mar 10, 2019 at 23:52

1 Answer 1

0

I don't have CentOS to hand, but I can speak from extensive experience in Debian.

Generally speaking, bridge configurations require that the interface itself (in your case enp0s25) is not configured with an IP address. The physical interface remains unconfigured but UP and RUNNING, and the IP configuration for the host gets applied to logical bridge interface instead.

I'd suggest changing the file ifcfg-enp0s25 to have ONBOOT=no and trying again.

If that doesn't work, delete the ifcfg-enp0s25 file (ie move it some place safe) because you've got the requisite settings in the slave file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .