[SOLVED] Issues with starting default network due to being in use by bridge

Issues related to configuring your network
Post Reply
subzerotitan
Posts: 5
Joined: 2022/09/22 00:11:18

[SOLVED] Issues with starting default network due to being in use by bridge

Post by subzerotitan » 2022/09/22 00:24:53

Hello All,

I'm still getting my feet wet with CentOS 7 and for the most part it's been pretty straightforward. I'm running into an issue with configuring my default network (or bridge) correctly in order to begin creating guest VM's on this linux host. My physical server has 4 onboard cards that are all connected to my network switch. The 4 ethernet interfaces are bonded into

Code: Select all

bond0
which is a slave to the bridge

Code: Select all

br0
. I've attached a drawing of the server topology so it makes more sense in the event I didn't do well in explaining.

I have already created a VM and was able to get an IP from my network while the network interface was assigned to 'specify connection' and I entered 'br0' for my bridge. But obviously in this case I would want my VM network interface to be set to the 'default' NAT network. After making this change, I cannot start up the VM and it errors out with:

Code: Select all

error: Failed to start domain VM_NAME
error: Requested operation is not valid: network 'default' is not active
I am SSH'ing into this machine by connecting to the bridge

Code: Select all

br0
interface as well. I've read countless RH documentation pages as well as other forum pages but can't figure this part out. I did find a website that mentioned deleting the bridge and then starting the network, but then I'd still have to create the bridge all over again which would cause the same issue.

Am I configuring this incorrectly? I was wondering if maybe I should have been reserving one of the physical interfaces to assign a separate IP on the same subnet. Any help is much appreciated!
Attachments
ServerTopology.png
ServerTopology.png (53.24 KiB) Viewed 1011 times
Last edited by subzerotitan on 2022/09/22 21:31:45, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 32401
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Issues with starting default network due to being in use by bridge

Post by TrevorH » 2022/09/22 09:29:28

The 'default' network is already set up by libvirt and uses virbr0 and has a DHCP server on it serving ip addresses from 192.168.122.0/24. You probably want to use --network=bridge:br0
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke

subzerotitan
Posts: 5
Joined: 2022/09/22 00:11:18

Re: Issues with starting default network due to being in use by bridge

Post by subzerotitan » 2022/09/22 10:14:39

Hi Trevor,

Are you referring to using —network=bridge:br0 in the creation of the VM? Also, the default network was modified by me with the attributes that are seen in my attachment. Should I change it back to the defaults?

I believe I’m just confused on how I’m supposed to create and manage existing VM’s to obtain an IP on my existing LAN subnet (192.168.19.0/24) when I can’t use the ‘default’ network to accomplish this.

User avatar
TrevorH
Site Admin
Posts: 32401
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Issues with starting default network due to being in use by bridge

Post by TrevorH » 2022/09/22 10:30:42

Yes, don't use the default network, set up your own bridge and use that. Disable the default network virsh net-autostart default --disable
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke

User avatar
jlehtone
Posts: 4202
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Issues with starting default network due to being in use by bridge

Post by jlehtone » 2022/09/22 11:33:02

If you have a managed network switch, then it has IP address that you can connect to in order to manage it. Unmanaged switch does not have IP address.

A bridge is a network switch. You have created (correctly) the br0 that is connected to other (physical) switch with bonded links.
Your host server has its IP address (192.168.19.108) on the bridge and is thus member in subnet "LAN" (192.168.19.0/24).


If you do let libvirt to start the subnet "default", then the host is a member on that separate subnet (default 192.168.122.0/24) too.
If you attach VM to "default", the host acts as router between "LAN" and "default".
(Does NAT too, so members of LAN believe that there is only 192.168.19.108.)

You can't have 192.168.19.0/24 on both subnets -- you can't be 192.168.19.108 on more than one subnet; they must be different.


Yes, you can attach VM to br0, just like you would plug physical machine to physical network switch. You can do it when you create VM, or you can modify existing VM; network devices are usually "hotpluggable", so one can add/remove them while VM is running.

When VM has network interface on br0, it is in the "LAN".

While I prefer CLI (so mostly virsh for libvirt) I do also like virt-manager that is Python-based GUI for creating&managing VMs (of multiple hosts via ssh).

subzerotitan
Posts: 5
Joined: 2022/09/22 00:11:18

Re: Issues with starting default network due to being in use by bridge

Post by subzerotitan » 2022/09/22 13:04:48

Thanks TrevorH and jlehtone, I'll disable 'default' network and give this another shot. That makes much more sense, I was curious why some guides instruct to configure the default network IP as the bridge IP.

subzerotitan
Posts: 5
Joined: 2022/09/22 00:11:18

Re: Issues with starting default network due to being in use by bridge

Post by subzerotitan » 2022/09/22 14:41:10

Interesting, so disabling the default network and enabling DHCP on my network gateway resolved the issue with the guest VM's not being able to connect to my local LAN. I see the DHCP reservation on my gateway, but the guest VM (Windows Server) is displaying 'Unidentified Network' so I can't sign into it.

Going to keep digging as I can't ping the guest VM from any other network device either, so it seems like it's something on the host itself.

User avatar
jlehtone
Posts: 4202
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Issues with starting default network due to being in use by bridge

Post by jlehtone » 2022/09/22 20:46:36

When host routes between subnets, the traffic goes through netfilter. Therefore, firewall must allow the traffic.

However, when traffic is bridged, it is not filtered by the host at all; no firewall.
(There is a way to explicitly enable the filtering for bridged traffic, but you would know if you had done that.)


What do you mean by "sign into it"?

subzerotitan
Posts: 5
Joined: 2022/09/22 00:11:18

Re: Issues with starting default network due to being in use by bridge

Post by subzerotitan » 2022/09/22 21:31:25

Thanks for the clarification on when traffic is filtered! I was referring to signing into one of the guest VM's that had already been domain joined prior to making changes to the networking layout of this host.

All is working now as intended, I appreciate your help very much!

Post Reply