Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #227251

Re: dhcp bridge for virtual machines using KVM

From Fabien Roucaute <fabien.roucaute@free.fr>
Newsgroups linux.debian.user
Subject Re: dhcp bridge for virtual machines using KVM
Date 2020-09-22 18:50 +0200
Message-ID <ARTEl-3AR-1@gated-at.bofh.it> (permalink)
References <ARTkZ-3uq-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Le 22/09/2020 à 18:26, James Allsopp a écrit :
> Hi,
> I've got a computer that I'm running debian 10 on with KVM. The machine
> is connected to a OpenWRT router which provides DHCP and DNS to the
> network, via a wifi link used for the host and an ethernet connection on
> eth1 used for a bridge
> 
> I've set this file up for the bridge in /etc/network/interfaces.d/br0
> auto eth1
> auto br0
> iface br0 inet dhcp
> bridge_ports eth1
> bridge_fd 0
> bridge_stp off
> 
> ifup br0 brought it up nicely and it got an IP address in the range I'd
> expect. So far so good. The only problem is now, I can't get any of the
> VM's I create to use this network. When creating a VM using Virtual
> Machine Manager, it gives me the option to specify shared device name
> for the network source. One of these is for a network I already created
> in virsh;
> 
> <network>
>   <name>host-bridge</name>
>   <forward mode="bridge"/>
>   <bridge name="br0"/>
> </network>
> 
> However, if I set the network to either 'host-bridge' or br0 directly,
> the route is never set and I can never get  a dhcp setting. I've checked
> ip_forward is set to 1.
> 
> I'd just like to set it up this way, as it seems really inefficient to
> have a dhcp and then use difficult to remember static IP's everywhere.
> 
> Thanks
> James
> 
> 
You don't need to create a virtual network to 'plug' your vm on the
brigde using the host NIC. Just select the br0 bridge as the source on
the VM's NIC hardware settting.

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

dhcp bridge for virtual machines using KVM James Allsopp <jamesaallsopp@googlemail.com> - 2020-09-22 18:30 +0200
  Re: dhcp bridge for virtual machines using KVM Fabien Roucaute <fabien.roucaute@free.fr> - 2020-09-22 18:50 +0200
    Re: dhcp bridge for virtual machines using KVM Fabien Roucaute <fabien.roucaute@free.fr> - 2020-09-22 19:00 +0200
      Re: dhcp bridge for virtual machines using KVM James Allsopp <jamesaallsopp@googlemail.com> - 2020-09-22 23:00 +0200
        Re: dhcp bridge for virtual machines using KVM Fabien Roucaute <fabien.roucaute@free.fr> - 2020-09-23 07:30 +0200
          Re: dhcp bridge for virtual machines using KVM Fabien Roucaute <fabien.roucaute@free.fr> - 2020-09-23 15:20 +0200
            Re: dhcp bridge for virtual machines using KVM john doe <johndoe65534@mail.com> - 2020-09-23 15:50 +0200
          Re: dhcp bridge for virtual machines using KVM Lucas Castro <lucas@gnuabordo.com.br> - 2020-09-23 16:50 +0200
  Re: dhcp bridge for virtual machines using KVM Lucas Castro <lucas@gnuabordo.com.br> - 2020-09-22 20:50 +0200
    Re: dhcp bridge for virtual machines using KVM James Allsopp <jamesaallsopp@googlemail.com> - 2020-09-22 23:00 +0200
      Re: dhcp bridge for virtual machines using KVM Lucas Castro <lucas@gnuabordo.com.br> - 2020-09-22 23:40 +0200
        Re: dhcp bridge for virtual machines using KVM James Allsopp <jamesaallsopp@googlemail.com> - 2020-09-23 13:50 +0200

csiph-web