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: Vlad Yasevich
Subject: Re: [Qemu-discuss] Host-Bridge in routed TAP Mode
Date: Wed, 25 Sep 2013 10:30:15 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 09/25/2013 09:59 AM, Sven Gehr 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:



From what I understand, routed mode is just that.  It depends
on ip forwarding being enabled for the interfaces and it will
try to route the packets from your bridge out through your designated
interface.

What you seem to be looking for is a bridged configuration where
you connect the physical nic and virtial nic to the same bridge.
I don't see libvirt support that in their virtual network config.
You can used libvirt to setup a bridged interface in the Network Interfaces tab though.

-vlad

<forward dev='eth0' mode='route'/>

??







reply via email to

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