Results 1 to 2 of 2

Thread: How to properly configure bridge interface for QEMU + KVM

  1. #1
    Join Date
    Jul 2020
    Beans
    6

    How to properly configure bridge interface for QEMU + KVM

    I want to configure my virtual network in such a way that my virtual machines would be accessible form outside.
    In my current configuration I have connection to usual home router to eth0 with DCHP

    Right now I have following config in /etc/network/interfaces



    Code:
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    
    source /etc/network/interfaces.d/*
    
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    
    auto br0
    iface br0 inet static
    address 192.168.1.110
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 192.168.1.1
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0
    
    
    auto eth0
    iface eth0 inet dhcp
    allow-hotplug eth0
    #iface eth1 inet dhcp
    #auto eth2
    #allow-hotplug eth2
    #iface eth2 inet dhcp
    #auto eth3
    #allow-hotplug eth3
    #iface eth0 inet dhcp

    It works but sometimes its behavior is really weird - sometimes eth0 gets an IP address from DHCP server (on the router), sometimes I can only access my PC by 192.168.1.110 (br0 interface)

    What is the proper way to configure it?

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to properly configure bridge interface for QEMU + KVM

    Since 17.10, netplan is the way to configure server networking, not the interfaces file. Use netplan.
    netplan.io has examples.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •