CHR proper way to add interfaces

Hi, testing chr for first time on qemu/kvm

How do we add interfaces properly. When I created the virtual machine, I selected the bridge network I had made and I see this nic in CHR.

Do I have to create individual new bridges for each physical nic or do you create one bridge with several physical nics in that bridge? If one bridge multiple nics, will CHR not send data to all thise physical nics simultaneously?

It depends on your hypervisor.

In VMware you add another NIC to the virtual machine. Proxmox is almost identical.

Those devices get added to what ever Virtual Switch you are using.

Hmmm in QEMU/KVN, You either add the VM to NAT created by kvm, host nic via MAVTAP which is not recommended or via a bridge you have created in the host OS. In that config file (netplan) you add seperate nics to each bridge or multiple nic to a bridge. Hence the reason for my question.. Which is the best way to go. Multiple per nic per bridge or individual nic and bridge

Proxmox uses KVM.

For VLANs you need to make the bridge interface VLAN aware and then add the interface to the VM something like this:

virtio=00:00:00:00:00:00,bridge=vmbr0,firewall=1,tag=88

Where tag=88 is obviously VLAN88.

For a physical network you will need to create a new bridge for each physical interface.

When adding interfaces to a CHR instance running on qemu/kvm, it’s best to create a new bridge for each physical NIC that you want to connect to the virtual machine. This way, each bridge corresponds to a single physical NIC, and you can configure the bridges and NICs independently.

If you create one bridge and add multiple physical NICs to it, the CHR instance will send data to all of those physical NICs simultaneously. However, this may not be the best approach for your network configuration, as it can lead to network congestion and other issues. It’s usually better to create separate bridges for each physical NIC, so that you can control the flow of traffic more effectively.

To add interfaces to a CHR instance in qemu/kvm, you can use the “add-nic” command in the qemu monitor. For example, to add a new interface to a CHR instance running on qemu/kvm, you could run the following command in the qemu monitor:

add-nic CHR nic_model=virtio-net-pci,netdev=chr-net-1

This would add a new interface to the CHR instance, using the “virtio-net-pci” NIC model and the “chr-net-1” network device. You can then configure the new interface in CHR as needed.

thx for your replies. :slight_smile: