Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171356 - app-emulation/qemu-0.9.0 and tap prolem - network script issues
Summary: app-emulation/qemu-0.9.0 and tap prolem - network script issues
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Luca Barbato
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-18 16:03 UTC by GNUtoo
Modified: 2009-03-07 15:47 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
tcpdump (tcpdump,25.28 KB, text/plain)
2007-03-18 18:01 UTC, GNUtoo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description GNUtoo 2007-03-18 16:03:35 UTC
can't:
*ping my qemu machine from linux(tryed Knoppix and windows2000)
*ping my machine from qemu(tryed Knoppix and windows2000)

I have set-up Qemu the gentoo way: i used /etc/conf.d/net in order to set up the tap device:
first the tap device is in the kernel(and not as module) 

i've all the details in the web link such as tcpdump

Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-03-18 17:22:29 UTC
Not baselayout. Also no real information here whatsoever; like qemu version, emerge --info, your configuration? Plus *don't* refer to forums.gentoo.org for bug description, renders searching for bugs completely useless.



Comment 2 GNUtoo 2007-03-18 17:57:14 UTC
# emerge --info
Portage 2.1.2-r9 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.20-gentoo_sempron_2500 i686)
=================================================================
System uname: 2.6.20-gentoo_sempron_2500 i686 AMD Sempron(tm) 2500+
Gentoo Base System release 1.13.0_alpha12
Timestamp of tree: Thu, 01 Mar 2007 16:00:01 +0000
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex 7zip X a52 aac acl adns alsa amr apache2 asf berkdb bitmap-fonts bl blender-game cairo cdda cddb cdr chardet clearcase cli contrarius cracklib cran crypt css cups cvs dbus dga divx dri dts dv dvd dvdr dvdread editor eds effects emboss enca encode examples exif expat fam fat ffmpeg firefox flac foomaticdb gdbm gif gimpprint glsa gmedia gpm gstreamer gtk hal hfs httpd iconv inkjar inquisitio ipv6 isdnlog jfs jpeg jpeg2k kde kerberos kqemu lcms ldap libg++ libnotify lzo mad matroska midi mikmod mmx mmxext mng mp3 mp4 mpeg mpi musepack ncurses nls nptl nptlonly nsplugin ntfs ogg openal openexr opengl pam pcre perforce perl php plugin png ppds pppd python qa qt3 qt4 quicktime quotas readline realmedia reflection reiser4 reiserfs rt2500pci rtc rtsp samba sdl session skins sox speex spell spl srteam sse ssl stream subversion svg swat tcpd tga theora tiff timidity tordns truetype truetype-fonts type1-fonts unicode usb vcd vidx vlm vorbis wma wmf wmp wxwindows x264 x86 xanim xfs xml xorg xprint xv xvid xvmc yv12 zlib zsh" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 3 GNUtoo 2007-03-18 17:59:10 UTC
#  /etc/init.d/net.tap0 restart
 * Stopping tap0
 *   Bringing down tap0
 *     Destroying Tun/Tap interface tap0 ...                                                                         [ ok ]
 *     network interface tap0 does not exist
 *     Please verify hardware or kernel module (driver)                                                              [ ok ]
 *     network interface tap0 does not exist
 *     Please verify hardware or kernel module (driver)
 * Starting tap0
 *   network interface tap0 does not exist
 *   Please verify hardware or kernel module (driver)
 *   network interface tap0 does not exist
 *   Please verify hardware or kernel module (driver)
 *   network interface tap0 does not exist
 *   Please verify hardware or kernel module (driver)
 *   Creating Tun/Tap interface tap0 ...                                                                             [ ok ]
 *   Bringing up tap0
 *     192.168.0.1/24                   
Comment 4 GNUtoo 2007-03-18 17:59:30 UTC
# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:615 errors:0 dropped:0 overruns:0 frame:0
          TX packets:615 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:11070 (10.8 Kb)  TX bytes:11070 (10.8 Kb)

ra0       Link encap:Ethernet  HWaddr 00:08:A1:A0:1B:B7
          inet addr:192.168.1.105  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::208:a1ff:fea0:1bb7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:99336 errors:0 dropped:0 overruns:0 frame:0
          TX packets:84457 errors:444 dropped:444 overruns:0 carrier:0
          collisions:12484 txqueuelen:1000
          RX bytes:135055376 (128.7 Mb)  TX bytes:7223017 (6.8 Mb)
          Interrupt:22 Base address:0xc000

tap0      Link encap:Ethernet  HWaddr A2:66:A4:F3:E2:0D
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::a066:a4ff:fef3:e20d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:9 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b) 
Comment 5 GNUtoo 2007-03-18 17:59:42 UTC
qemu -localtime -m 64 -hda /mnt/300/qemu/win2k.img -net nic -net tap,script=no,ifname=tap0
Comment 6 GNUtoo 2007-03-18 18:01:02 UTC
Created attachment 113679 [details]
tcpdump
Comment 7 GNUtoo 2007-03-18 18:01:33 UTC
i tryed to reporoduce it on my laptop without sucess
Comment 8 Javier Miqueleiz 2007-05-03 19:57:13 UTC
I did found the same bug. No communication is possible between the host and the QEMU guest.

Looking in detail, you can see that the tap interface has txqueuelen:0. No packets can go host through guest (in the reverse sense, comm is feasible, as tcpdump shows).

As a workaround, I tried the following. It worked for me.
/sbin/ip link set tap0 txqueuelen 500

Or better, add the following lines to /etc/conf.d/net:

postup() {
    if [ ${IFACE} = tap0 ] ; then /sbin/ip link set ${IFACE} txqueuelen 500; fi
}

If you create the interface manually (tunctl -t tap0 && ip link set tap0 up) the txqueulen is ok (500). So the cause must lie in the network scripts.

I would appreciate some feedback. In order to confirm this...
Comment 9 GNUtoo 2007-05-03 21:39:30 UTC
(In reply to comment #8)
> I did found the same bug. No communication is possible between the host and the
> QEMU guest.
> 
> Looking in detail, you can see that the tap interface has txqueuelen:0. No
> packets can go host through guest (in the reverse sense, comm is feasible, as
> tcpdump shows).
> 
> As a workaround, I tried the following. It worked for me.
> /sbin/ip link set tap0 txqueuelen 500
> 
> Or better, add the following lines to /etc/conf.d/net:
> 
> postup() {
>     if [ ${IFACE} = tap0 ] ; then /sbin/ip link set ${IFACE} txqueuelen 500; fi
> }
>
thanks it works
 
> If you create the interface manually (tunctl -t tap0 && ip link set tap0 up)
> the txqueulen is ok (500). So the cause must lie in the network scripts.
> 
> I would appreciate some feedback. In order to confirm this...
> 

Comment 10 Roy Marples (RETIRED) gentoo-dev 2007-05-04 05:59:52 UTC
Do both of you have openvpn installed? If so, what version?
Comment 11 Javier Miqueleiz 2007-05-10 16:05:25 UTC
I do have latest stable (net-misc/openvpn-2.0.6).

This bug seems the same as # 150791 (http://bugs.gentoo.org/show_bug.cgi?id=150791).

I have looked my emerge history. What still doesn't make sense to me is that I emerged version 2.0.6 on April 2006. But this problem began after other updates (many months later). Any light here?
Comment 12 Luca Barbato gentoo-dev 2009-03-07 15:47:19 UTC
I update the ifup/ifdown scripts to be the same as kvm.