NetBSD-Bugs archive

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

kern/46199: 6.0_BETA. "qemu -net tap" + bridge(4). Network problems in guests.



>Number:         46199
>Category:       kern
>Synopsis:       6.0_BETA. "qemu -net tap" + bridge(4). Network problems in 
>guests.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 15 11:30:00 +0000 2012
>Originator:     Aleksey Cheusov
>Release:        NetBSD 6.0_BETA
>Organization:
>Environment:
System: NetBSD work.imb.invention.com 6.0_BETA NetBSD 6.0_BETA (GENERIC) #0: 
Mon Mar 12 17:25:05 FET 2012 
cheusov%work.imb.invention.com@localhost:/srv/obj-current/sys/arch/i386/compile/GENERIC
 i386
Architecture: i386
Machine: i386
>Description:
For testing purposes I use qemu with tap networking.

    /etc/rc.conf:
        net_interfaces='fxp0 bridge0'

    /etc/ifconfig.bridge0:
        !ifconfig tap0 create up
        !ifconfig tap1 create up
        !ifconfig tap2 create up
        !ifconfig tap3 create up
        !brconfig bridge0 add fxp0 add tap0 add tap1 add tap2 add tap3

Qemu guests are run with the following scripts:

   qemu -no-acpi \
       -drive file=/srv/qemu/openbsd.img,index=0,media=disk,cache=none \
       -m 192 \
       -net nic,model=ne2k_pci,macaddr=00:06:80:A3:85:CE \
       -net tap,fd=3 -boot c "$@" 3<>/dev/tap1

   qemu -no-acpi \
       -hda /srv/qemu/dfly.img \
       -m 192 \
       -net nic,model=ne2k_pci,macaddr=02:07:83:A8:81:FF \
       -net tap,fd=3 \
       -boot c "$@" 3<>/dev/tap3

I started them one-by-one and they started sucessfully for some time
and are becomes visible in my LAN.
However, after some time of uptime the network in guests(s) gisappeared.

    0 cheusov>ssh vm-openbsd uptime
    12:54PM  up 19 mins, 0 users, load averages: 0.07, 0.10, 0.08
    0 cheusov>ssh vm-dfly uptime
    ssh: connect to host vm-dfly port 22: Connection timed out
    255 cheusov>ssh vm-openbsd uptime
     1:02PM  up 26 mins, 0 users, load averages: 0.15, 0.11, 0.09
    0 cheusov>

I don't know is this a bug in the kernel or in qemu.
Restarting guest OS doesn't help.

But the following solves the problem.
   ifconfig tap3 destroy
   ifconfig tap3 create up
   brconfig bridge0 add tap3
   qemu ... 3<>/dev/tap3

>How-To-Repeat:
See above
>Fix:
No idea



Home | Main Index | Thread Index | Old Index