I am trying to set up multiple VM's on a Server with multiple network interfaces via KVM and network bridges. The idea is to have a Bind/ISC Server with an IP on Bridge#1 that assigns IP's and hostnames to different VM's and Interfaces on the same network.

My Setup is as follows:

          Internet Access
          on eth0           +---------+
                            +---------+        Server #1
                     |        +----------+
                     +------->+eth0||    |
                     |        +----------+     Server #2
Bind /ISC VM attach- |        |    ||    |
ed to eth2 on        |        +----------+
Server #1 serves IP's|
and Domain Names to  |
other devices on an  |        +----------+
internal network     +------->+eth0||    |
(eg. via DHCP)       |        +----------+     Server #3
                     |        |    ||    |
                     |        +----------+

I used network bridges to connect virtual machines on Server #1 to the network, so that each VM receives it's own IP address. I have previously run a bridge on eth1 of server #1, to connect Vm's to the network with outbound internet access and when doing so, DHCP will work and all VM's as well as the bridge will receive IP adresses from an outside DHCP server on the network. When doing so with the bridge on eth3 though, this will not work. Connecting the bridge on eth3 to the same network as internet access will not assign an IP address, the bridge won't even come online as an interface inside the VM.

I have used netplan to configure the interfaces as bridges:

            dhcp4: true
            dhcp4: false
            dhcp4: true
            dhcp4: false
    version: 2

                        interfaces: [ eth1]
                        dhcp4: yes
                                stp: false #stp (bool) determines wether the bridge should use spanning tree protocol
                                forward-delay: 0

                        interfaces: [ eth3]
                        dhcp4: yes
                                stp: false 
                                forward-delay: 0

Inside my VM, when having both bridges (kvm-bridge + br-bind9) attached, only one interface will show up: (ifconfig output)

ens2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet xx.xx.xx.xx  netmask  broadcast xx.xx.xx.xx
        inet6 fe80::5054:ff:fe94:5f65  prefixlen 64  scopeid 0x20<link>
        ether 52:54:00:94:5f:65  txqueuelen 1000  (Ethernet)
        RX packets 6187  bytes 9240019 (9.2 MB)
        RX errors 0  dropped 1433  overruns 0  frame 0
        TX packets 4482  bytes 377955 (377.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet  netmask
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 122  bytes 10582 (10.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 122  bytes 10582 (10.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

And I'm asking myself why. Is there a better method to achieve what I want? It's really hard for me to find understandable resscources or documentation for virtio, for what I'm tryin to achieve. Again, the idea is to have an internal network with each server running virtual machines off of every network interface, so that basicially every network service such as DHCP / DNS can be virtualized. Would Vlans solve my problem, instead of medling with physical connections?

Thanks in advance for any help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.