Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to be a "high-lander" sticking to KVM plus virt-manager to manage my VMs. But it's about a week I'm around trying to create a bridge that works for using with my VMs.

I tried first tried attaching the bridge with brctl to my wlan0, to discover that it does not work.

Then I discovered the trick of sudo iw dev wlan0 set 4addr on, but then I got without network connection on the host. Let's agree: not cool.

Today I found the solution below which I found quite reasonable in terms of implementation: small and concise. Take a look at the post of Nattereri, of October 1st, 2011 on the link below:

http://ubuntuforums.org/showthread.php?t=1766674

So I installed parprouted and bcrelay and then edited my /etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto br0
iface br0 inet static
pre-up brctl addbr br0 setfd 0 stp off
address 192.168.1.10
netmask 255.255.255.0
post-up parprouted wlan0 br0
post-up bcrelay -d -i wlan0 -o br0
post-up sysctl net.ipv4.conf.wlan0.proxy_arp=1
post-up sysctl net.ipv4.conf.br0.proxy_arp=1

I rebooted with no problems, I do have internet on the host, but when I turn on my KVM Windows guest, I have no network on it.

Output from ifconfig -a:

br0       Link encap:Ethernet  Endereço de HW fe:54:00:ac:18:eb  
          inet end.: 192.168.1.10  Bcast:192.168.1.255  Masc:255.255.255.0
          endereço inet6: fe80::7016:5fff:fea5:c505/64 Escopo:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Métrica:1
          pacotes RX:369 erros:0 descartados:0 excesso:0 quadro:0
          Pacotes TX:594 erros:0 descartados:0 excesso:0 portadora:0
          colisões:0 txqueuelen:0 
          RX bytes:29151 (29.1 KB) TX bytes:59690 (59.6 KB)

lo        Link encap:Loopback Local  
          inet end.: 127.0.0.1  Masc:255.0.0.0
          endereço inet6: ::1/128 Escopo:Máquina
          UP LOOPBACK RUNNING  MTU:65536  Métrica:1
          pacotes RX:6675 erros:0 descartados:0 excesso:0 quadro:0
          Pacotes TX:6675 erros:0 descartados:0 excesso:0 portadora:0
          colisões:0 txqueuelen:0 
          RX bytes:11318392 (11.3 MB) TX bytes:11318392 (11.3 MB)

virbr0    Link encap:Ethernet  Endereço de HW 00:00:00:00:00:00  
          inet end.: 192.168.122.1  Bcast:192.168.122.255  Masc:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Métrica:1
          pacotes RX:91 erros:0 descartados:0 excesso:0 quadro:0
          Pacotes TX:7 erros:0 descartados:0 excesso:0 portadora:    0
          colisões:0 txqueuelen:0 
          RX bytes:8628 (8.6 KB) TX bytes:2342 (2.3 KB)

vnet0     Link encap:Ethernet  Endereço de HW fe:54:00:ac:18:eb  
          endereço inet6: fe80::fc54:ff:feac:18eb/64 Escopo:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Métrica:1
          pacotes RX:369 erros:0 descartados:0 excesso:0 quadro:0
          Pacotes TX:83 erros:0 descartados:0 excesso:0 portadora:0
          colisões:0 txqueuelen:500 
          RX bytes:34353 (34.3 KB) TX bytes:7229 (7.2 KB)

wlan0     Link encap:Ethernet  Endereço de HW 5c:51:4f:e9:96:ed  
          inet end.: 192.168.0.13  Bcast:192.168.0.255  Masc:255.255.255.0
          endereço inet6: fe80::5e51:4fff:fee9:96ed/64 Escopo:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Métrica:1
          pacotes RX:81109 erros:0 descartados:0 excesso:0 quadro:0
          Pacotes TX:57729 erros:0 descartados:0 excesso:0 portadora:0
          colisões:0 txqueuelen:1000 
          RX bytes:95362964 (95.3 MB) TX bytes:9751111 (9.7 MB)

Here the output of brctl show:

bridge name bridge id           STP enabled interfaces
br0         8000.fe5400ac18eb   no          vnet0
virbr0      8000.000000000000   yes     

I turned on my KVM windows 7 guest expecting to have DHCP-assigned IPs assigned to it on the 192.168.1.x range, but I it was assigned ...

the IP 192.168.0.15, with mask 255.255.255.0 and gateway 192.168.0.254 and DNS servers 212.27.40.241, 212.27.40.240

Well, my VM does not see any beam of internet flow.

Any ideas on where I could have missed something? Is it something missing on the client? I tried to force a static ip on the range 192.168.1.x without success...

Thank you anybody for an external view. I'm almost considering going back to vmware, but it would be a pity as I feel so close to the pleasure of the discovery.

Regards,

Luis

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.