Bridge Network question

Latest response

Hello, I was hoping someone might be able to help me out with bridge networking.

I've been trying to learn KVM and I'm unsure if I'm doing things the right way or not and was hoping to get some feedback.

So I come from a Hyper-V/VMware background and have been working with VMware primarily for the past few years. I've been working through setting up a KVM host by command line to try to learn it.

I did end up getting it to work but I want to know if this would be the preferred way to do it. I saw there were multiple ways.

I have a host set up using 2 nics. Eno1 is for management of the host and eno2 will be used for a bridge network (virtual switch) for the VMs.

I've been using nmcli to set things up, if this is not the preferred way, I'd love to know.

My steps are:
nmcli add ifname br0 type bridge con-name br0
nmcli con add type bridge-slave autoconnect yes ifname eno2 master br0

But it would seem the only way I can get it to work is assign an IP address, DNS server, gateway and turn of stp to the bridge nic to get things to work properly.

Am I doing this the correct way? Is the bridge nic supposed to have an IP? I mean for my testing it's whatever, but I just think about large datacenters running 1000's of KVM hosts. Would each host need to have an IP assigned to the bridge networks?

Looking at VMware and Hyper-v, I don't see the virtual switches set up with IP addresses, so I was thinking I was setting it up wrong. I've tried many other combinations, but just can't seem to get it working without an IP.

I'm still extremely interested in learning Linux and KVM, but it would be extremely helpful to get real world examples, and not necessarily hosts with just 1 nic like in most of the articles I've found.

Responses