From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWvu6-00052O-78 for qemu-devel@nongnu.org; Wed, 15 Jun 2011 15:37:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWvu4-00058k-0E for qemu-devel@nongnu.org; Wed, 15 Jun 2011 15:37:29 -0400 Received: from mail-qy0-f173.google.com ([209.85.216.173]:39515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWvu3-00058W-OV for qemu-devel@nongnu.org; Wed, 15 Jun 2011 15:37:27 -0400 Received: by qyk36 with SMTP id 36so2318657qyk.4 for ; Wed, 15 Jun 2011 12:37:26 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Blue Swirl Date: Wed, 15 Jun 2011 22:37:06 +0300 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] user-mode networking not allowing internet traffic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amitava Shee Cc: qemu-devel@nongnu.org On Wed, Jun 15, 2011 at 9:12 PM, Amitava Shee wrot= e: > My ubuntu 11.04 guest is not able to connect to the internet when launche= d > as -net user. Any help is much appreciated. > > qemu command line > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > amitava@bonjovi:/var/vms$ qemu-system-x86_64 -m 512 -drive > index=3D0,media=3Ddisk,if=3Dvirtio,file=3Dub2.qcow2,boot=3Don -vnc :0 -mo= nitor stdio > -net nic,model=3Dvirtio,vlan=3D1 -net user,vlan=3D1,hostname=3Dubuntu2 > > ifconfig output in guest > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > amitava@ubuntu2:~$ ifconfig eth0 > eth0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Link encap:Ethernet=C2=A0 HWaddr 52:54= :00:12:34:56 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 inet addr:10.0.2.1= 5=C2=A0 Bcast:10.0.2.255=C2=A0 Mask:255.255.255.0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 inet6 addr: fe80::= 5054:ff:fe12:3456/64 Scope:Link > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UP BROADCAST RUNNI= NG MULTICAST=C2=A0 MTU:1500=C2=A0 Metric:1 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 RX packets:11 erro= rs:0 dropped:0 overruns:0 frame:0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 TX packets:16 erro= rs:0 dropped:0 overruns:0 carrier:0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 collisions:0 txque= uelen:1000 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 RX bytes:1984 (1.9= KB)=C2=A0 TX bytes:1748 (1.7 KB) > > amitava@ubuntu2:~$ nslookup google > Server:=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 10.0.2.3 > Address:=C2=A0=C2=A0=C2=A0 10.0.2.3#53 > > Non-authoritative answer: > Name:=C2=A0=C2=A0=C2=A0 google.com > Address: 74.125.115.104 > Name:=C2=A0=C2=A0=C2=A0 google.com > Address: 74.125.115.106 > Name:=C2=A0=C2=A0=C2=A0 google.com > Address: 74.125.115.105 > Name:=C2=A0=C2=A0=C2=A0 google.com > Address: 74.125.115.147 > Name:=C2=A0=C2=A0=C2=A0 google.com > Address: 74.125.115.103 > Name:=C2=A0=C2=A0=C2=A0 google.com > Address: 74.125.115.99 This and the IP address of the eth0 show that the connection is working. > amitava@ubuntu2:~$ traceroute google.com > traceroute to google.com (74.125.115.99), 30 hops max, 60 byte packets > =C2=A01=C2=A0 10.0.2.2 (10.0.2.2)=C2=A0 0.469 ms=C2=A0 0.457 ms=C2=A0 0.4= 53 ms > =C2=A02=C2=A0 * * * > =C2=A03=C2=A0 * * * > =C2=A04=C2=A0 * * * > =C2=A05=C2=A0 * * * > =C2=A06=C2=A0 * * * > =C2=A07=C2=A0 * * * > =C2=A08=C2=A0 * * * > =C2=A09=C2=A0 * * * > 10=C2=A0 * * * > 11=C2=A0 * * * > 12=C2=A0 * * * > 13=C2=A0 * * * > 14=C2=A0 * * * > 15=C2=A0 * * * > 16=C2=A0 * * * > 17=C2=A0 * * * > 18=C2=A0 * * * > 19=C2=A0 * * * > 20=C2=A0 * * * > 21=C2=A0 * * * > 22=C2=A0 * * * > 23=C2=A0 * * * > 24=C2=A0 * * * > 25=C2=A0 * * * > 26=C2=A0 * * * > 27=C2=A0 * * * > 28=C2=A0 * * * > 29=C2=A0 * * * > 30=C2=A0 * * * User mode network (SLIRP) only supports plain TCP and UDP, traceroute and ping (which need ICMP) do not work.