qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Host-Bridge in routed TAP Mode


From: Tony Su
Subject: Re: [Qemu-discuss] Host-Bridge in routed TAP Mode
Date: Thu, 26 Sep 2013 09:07:49 -0700

If your objective is to create a libvirt-managed bridge device, have
you considered using vm manager?

I use a different distro, but assume that ubuntu distributes all the
major libvirt packages which should include not only the libvirt
library but the graphical apps as well. On my distro (openSUSE) I
install not only libvirt, but "libvirt-client" and "libvirt-python" of
which the latter includes the graphical apps.

If you create your virtual networking using the graphical app "vm
manager" you automatically also create the associated bridge device
(typically named virbr) and the bridge device's configuration which
includes the virtual network name, what physical interface to bind to,
if NAT or routed is the configuration, the network range and whether a
minimal DHCP service is enabled within the virtual network and whether
the bridge device should "auto start."

Using a managing tool to create the bridge device can avoid errors.
After the bridge device is created (and if configured also to
autostart), then it's available for all technologies to use... I've
used the same bridge device not only for KVM but also for LXC and UML
and theoretically should be accessible to others like Virtualbox.

Tony

On Wed, Sep 25, 2013 at 6:59 AM, Sven Gehr <address@hidden> wrote:
> address@hidden,
>
> I'm use KVM on a Ubuntu Server 12.04 LTS 64 Bit and I try to configure the
> bridge completely with libvirt.
>
> The Device eth0 is connected to the lan (192.168.100.0/24)
>
> I generate the file /etc/libvirt/qemu/networks/intern.xml to specify my
> network 'intern'
>
> <network>
>   <name>intern</name>
>   <uuid>77b879fa-4c04-0cb2-e58a-aef0673806a4</uuid>
>   <forward dev='eth0' mode='route'/>
>   <bridge name='intern' stp='on' delay='0' />
>   <mac address='52:54:00:8F:05:DB'/>
>   <ip address='192.168.100.1' netmask='255.255.255.0'>
>   </ip>
> </network>
>
> and mark it 'autostart'
>
>
> My /etc/network/interfaces looks like this:
>
> # The loopback network interface
> auto lo
> iface lo inet loopback
>
>
> # eth0 ohne IP für Bridge Variante 1
> auto eth0
> iface eth0 inet manual
>   up ifconfig eth0 0.0.0.0 promisc up
>
>
> I reboot the system ....
>
>
> ifconfig show me:
>
> address@hidden:~# ifconfig
> eth0      Link encap:Ethernet  Hardware Adresse 68:05:ca:0f:81:2c
>           inet6-Adresse: fe80::6a05:caff:fe0f:812c/64
> Gültigkeitsbereich:Verbindung
>           UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metrik:1
>           RX packets:192 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:228 errors:0 dropped:0 overruns:0 carrier:0
>           Kollisionen:0 Sendewarteschlangenlänge:1000
>           RX-Bytes:22033 (22.0 KB)  TX-Bytes:24529 (24.5 KB)
>           Interrupt:18 Speicher:fcfc0000-fcfe0000
>
> intern    Link encap:Ethernet  Hardware Adresse 52:54:00:8f:05:db
>           inet Adresse:192.168.100.1  Bcast:192.168.100.255
> Maske:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
>           RX packets:172 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
>           Kollisionen:0 Sendewarteschlangenlänge:0
>           RX-Bytes:14661 (14.6 KB)  TX-Bytes:16033 (16.0 KB)
>
> lo        Link encap:Lokale Schleife
>           inet Adresse:127.0.0.1  Maske:255.0.0.0
>           inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
>           UP LOOPBACK RUNNING  MTU:65536  Metrik:1
>           RX packets:20 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
>           Kollisionen:0 Sendewarteschlangenlänge:0
>           RX-Bytes:1536 (1.5 KB)  TX-Bytes:1536 (1.5 KB)
>
>
>
> and:
>
>
> address@hidden:~# brctl show
> bridge name     bridge id               STP enabled     interfaces
> intern          8000.5254008f05db       yes             intern-nic
>
> The problem is that eth0 was not bound to the bridge 'intern' intern.
>
>
>
> When I add eth0 manually it will work and I can ping the host from the lan
>
>
> address@hidden:~# brctl addif intern eth0
> [...]
> address@hidden:~# brctl show
> bridge name     bridge id               STP enabled     interfaces
> intern          8000.5254008f05db       yes             eth0
>                                                         intern-nic
>
>
> but why it is not automatically added by this line:
>
>
> <forward dev='eth0' mode='route'/>
>
> ??
>
>
>
> --
> Viele Grüsse
>
> Sven Gehr
> 77815 Bühl
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]