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


Groups > linux.debian.user > #171002

Re: QEMU accessing VLAN

From Igor Cicimov <icicimov@gmail.com>
Newsgroups linux.debian.user
Subject Re: QEMU accessing VLAN
Date 2016-08-12 01:30 +0200
Message-ID <s57Ad-2eX-5@gated-at.bofh.it> (permalink)
References (1 earlier) <s4XAS-3T5-21@gated-at.bofh.it> <s4ZMm-5r3-23@gated-at.bofh.it> <s50p3-5GR-7@gated-at.bofh.it> <s57Ad-2eX-7@gated-at.bofh.it> <s57Ad-2eX-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 12 Aug 2016 1:46 am, "Dan Ritter" <dsr@randomstring.org> wrote:
>
> On Thu, Aug 11, 2016 at 04:08:35PM +0100, Andrew Wood wrote:
> >
> >
> > On 11/08/16 13:47, Igor Cicimov wrote:
> > >
> > > >
> > > What type of network card did you create the vm with? You need to use
> > > the virtio virtual network interface in your vm configuration.
> > >
> > Thanks for your reply.  I wondered about that but the QEMU wiki doesnt
seem
> > to detail how to configure it to to what I want. I will need to specify
more
> > than just --net nic,model=virtio ? Presumably using this I could give
it a
> > 'real' IP address on the network rather than asking QEMU to do port
> > forwarding?
>
> In that case, you want to change your host computer's config:
>
> Suppose that your main nic is eth0. Instead of
>
> auto eth0
> iface eth0 inet static
>    address 10.1.7.57
>    netmask 255.255.127.0
>    gateway 10.1.0.1
>
>
> you want to change that to
>
> auto eth0
>
> auto br0
> iface br0 inet static
>     address 10.1.7.57
>     netmask 255.255.127.0
>     gateway 10.1.0.1
>     bridge_ports eth0
>     bridge_maxwait 1
>     bridge_stp      on
>
> And from then on, remember that br0 is your main nic, not eth0.
>
> Now you can start your kvm/qemu with:
>
>  -device virtio-net-pci,vlan=0,id=net0,mac=$MAC,bus=pci.0,addr=0x3
>

Just a note here to avoid confusion, have in mind that qemu vlan, ie vlan=0
above, is *not* the same as 802.1q vlan's its just an internal qemu way for
traffic segmentation. Think OpenVswitch vlan tags if you want.

> (remember to specify the MAC address, or use
> livirtd/virt-manager to take care of setup details for you)
>
> -dsr-
>

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


Thread

QEMU accessing VLAN Andrew Wood <andrewjameswood@ymail.com> - 2016-08-10 18:00 +0200
  Re: QEMU accessing VLAN Igor Cicimov <icicimov@gmail.com> - 2016-08-11 14:50 +0200
    Re: QEMU accessing VLAN Andrew Wood <andrewjameswood@ymail.com> - 2016-08-11 17:10 +0200
      Re: QEMU accessing VLAN Dan Ritter <dsr@randomstring.org> - 2016-08-11 17:50 +0200
        Re: QEMU accessing VLAN Igor Cicimov <icicimov@gmail.com> - 2016-08-12 01:30 +0200
      Re: QEMU accessing VLAN Igor Cicimov <icicimov@gmail.com> - 2016-08-12 01:30 +0200

csiph-web