I'm preparing for RHCE using the official redhat course-ware. The chapter that introduces the concept of bridging only tells you the commands used to configure a software bridge. The practical implementation is not explained at all.
I know that software bridges are primarily used for connecting virtual machines to the network. But the commands given in the book do not describe how any virtual machines are being connected.
The following steps are mentioned to create a software bridge:
Create a bridge using nmcli and assign it an IP address.
nmcli con add type bridge con-name br0 ifname br0 nmcli con mod br0 ipv4.addresses 192.168.0.100/24
Attach physical interrfaces to this bridge.
nmcli con add type bridge-slave con-name br0-port1 ifname eth1 master br0 nmcli con add type bridge-slave con-name br0-port2 ifname eth2 master br0
Here eth1 and eth2 are both actual NICs. How will this be used for virtual machines? The main purpose of software bridges is enable networking in a virtualized environment.
But how do we configure this? How do we attach the virtual NICs of the guest OS to the bridge of host OS?