Linux eth0 does not work with bridge

Friends, I'm trying to connect my qemu client to a real network using the linux bridge utility.
For this, I use a very simple method:

  • Create a bridge on the host using (sudo brctl addbr br0)
  • Add eth0 to this bridge (sudo brctl addif br0 eth0)
  • Changed / etc / qemu -ifup script (brctl addif br0 $ 1)
  • Changed / etc / qemu -ifdown script (brctl delif br0 $ 1)

Over 4 steps, I got my guest network while working properly. But now the problem is that my host network is not working after I attach my eth0 to the br0 bridge.

I confirmed that after steps 1 and 2 my host network stops working. But the guest network continues to work, and this is what puzzles me.

Can someone please indicate what is the problem with these two lines?

  • Create a bridge on the host using (sudo brctl addbr br0)
  • Add eth0 to this bridge (sudo brctl addif br0 eth0)

PS: , . , linux, qemu,

+3
1

. , .

. ip , eth0.

ip- eth0 . , . , .

:

  • , (sudo brctl addbr br0)
  • ip addr on eth0 ( )
  • eth0 (sudo brctl addif br0 eth0)
  • ip stack (sudo dhclient br0)
  • /etc/qemu -ifup script (brctl addif br0 $1)
  • /etc/qemu -ifdown script (brctl delif br0 $1)

qemu, , :
sudo qemu-system-i386 -enable-kvm -net tap, vlan = 0, ifname = tap0 -net nic, vlan = 0 -hda ~/Data/OS_DiskImages/ubuntu11.10/disk.qcow2

, :

+4

All Articles