qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] usermode-networking problem
@ 2004-05-23 18:58 Adrian Smarzewski
  0 siblings, 0 replies; 8+ messages in thread
From: Adrian Smarzewski @ 2004-05-23 18:58 UTC (permalink / raw)
  To: qemu-devel

Hi,

QEmu 2.5.5 with usermode-networking compiled and turned on.
Internet connection on host system (linux 2.6) works.
on guest system (linux-test):


sh-2.05b# ping -c 3 10.0.2.2
PING 10.0.2.2 (10.0.2.2) 56(84) bytes of data.
64 bytes from 10.0.2.2: icmp_seq=1 ttl=255 time=3.16 ms
64 bytes from 10.0.2.2: icmp_seq=2 ttl=255 time=0.390 ms
64 bytes from 10.0.2.2: icmp_seq=3 ttl=255 time=0.333 ms

sh-2.05b# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
10.0.0.0        *               255.0.0.0       U     0      0        0 eth0
default         10.0.2.2        0.0.0.0         UG    0      0        0 eth0

sh-2.05b# ping -c 3 212.77.100.101
PING 212.77.100.101 (212.77.100.101) 56(84) bytes of data.

--- 212.77.100.101 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2018ms


I don't know why. Should I configure something on host os?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] usermode-networking problem
@ 2004-05-23 18:58 Adrian Smarzewski
  2004-05-23 20:28 ` Carlos Valiente
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Adrian Smarzewski @ 2004-05-23 18:58 UTC (permalink / raw)
  To: qemu-devel

Hi,

QEmu 2.5.5 with usermode-networking compiled and turned on.
Internet connection on host system (linux 2.6) works.
on guest system (linux-test):


sh-2.05b# ping -c 3 10.0.2.2
PING 10.0.2.2 (10.0.2.2) 56(84) bytes of data.
64 bytes from 10.0.2.2: icmp_seq=1 ttl=255 time=3.16 ms
64 bytes from 10.0.2.2: icmp_seq=2 ttl=255 time=0.390 ms
64 bytes from 10.0.2.2: icmp_seq=3 ttl=255 time=0.333 ms

sh-2.05b# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
10.0.0.0        *               255.0.0.0       U     0      0        0 eth0
default         10.0.2.2        0.0.0.0         UG    0      0        0 eth0

sh-2.05b# ping -c 3 212.77.100.101
PING 212.77.100.101 (212.77.100.101) 56(84) bytes of data.

--- 212.77.100.101 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2018ms


I don't know why. Should I configure something on host os?


-- 
Pozdrowienia
Adrian Smarzewski

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] usermode-networking problem
  2004-05-23 18:58 [Qemu-devel] usermode-networking problem Adrian Smarzewski
@ 2004-05-23 20:28 ` Carlos Valiente
  2004-05-24 20:10   ` Adrian Smarzewski
  2004-05-25  1:55   ` James Ascroft-Leigh
  2004-05-23 20:56 ` vaise
  2004-05-23 21:05 ` Fabrice Bellard
  2 siblings, 2 replies; 8+ messages in thread
From: Carlos Valiente @ 2004-05-23 20:28 UTC (permalink / raw)
  To: qemu-devel

On Sun, 2004-05-23 at 19:58, Adrian Smarzewski wrote:
> sh-2.05b# ping -c 3 212.77.100.101
> PING 212.77.100.101 (212.77.100.101) 56(84) bytes of data.
> 
> --- 212.77.100.101 ping statistics ---
> 3 packets transmitted, 0 received, 100% packet loss, time 2018ms
> 
> 
> I don't know why. Should I configure something on host os?

Yes: On your host you have to:

1. Enable IP forwarding:

# echo 1 > /proc/sys/net/ipv4/ip_forward

2. Enable masquerading

# iptables -t nat -A POSTROUTING	\
	-s 10.0.0.0/8			\
	-d ! 10.0.0.0/8 -j MASQUERADE

C

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] usermode-networking problem
  2004-05-23 18:58 [Qemu-devel] usermode-networking problem Adrian Smarzewski
  2004-05-23 20:28 ` Carlos Valiente
@ 2004-05-23 20:56 ` vaise
  2004-05-23 21:05 ` Fabrice Bellard
  2 siblings, 0 replies; 8+ messages in thread
From: vaise @ 2004-05-23 20:56 UTC (permalink / raw)
  To: qemu-devel

On Sunday 23 May 2004 19:58, Adrian Smarzewski wrote:
> QEmu 2.5.5 with usermode-networking compiled and turned on.
> Internet connection on host system (linux 2.6) works.
> on guest system (linux-test):
>
> I don't know why. Should I configure something on host os?

Have you tried with your firewall totally opened ? (iptables -P INPUT/OUPUT 
ACCEPT and ADSL unplugged of course)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] usermode-networking problem
  2004-05-23 18:58 [Qemu-devel] usermode-networking problem Adrian Smarzewski
  2004-05-23 20:28 ` Carlos Valiente
  2004-05-23 20:56 ` vaise
@ 2004-05-23 21:05 ` Fabrice Bellard
  2 siblings, 0 replies; 8+ messages in thread
From: Fabrice Bellard @ 2004-05-23 21:05 UTC (permalink / raw)
  To: qemu-devel

Hi,

ping is _not_ supported reliably in user mode network except to ping the 
local router.

Fabrice.

Adrian Smarzewski wrote:
> Hi,
> 
> QEmu 2.5.5 with usermode-networking compiled and turned on.
> Internet connection on host system (linux 2.6) works.
> on guest system (linux-test):
> 
> 
> sh-2.05b# ping -c 3 10.0.2.2
> PING 10.0.2.2 (10.0.2.2) 56(84) bytes of data.
> 64 bytes from 10.0.2.2: icmp_seq=1 ttl=255 time=3.16 ms
> 64 bytes from 10.0.2.2: icmp_seq=2 ttl=255 time=0.390 ms
> 64 bytes from 10.0.2.2: icmp_seq=3 ttl=255 time=0.333 ms
> 
> sh-2.05b# route
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use
> Iface
> 10.0.0.0        *               255.0.0.0       U     0      0        0 
> eth0
> default         10.0.2.2        0.0.0.0         UG    0      0        0 
> eth0
> 
> sh-2.05b# ping -c 3 212.77.100.101
> PING 212.77.100.101 (212.77.100.101) 56(84) bytes of data.
> 
> --- 212.77.100.101 ping statistics ---
> 3 packets transmitted, 0 received, 100% packet loss, time 2018ms
> 
> 
> I don't know why. Should I configure something on host os?
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] usermode-networking problem
  2004-05-23 20:28 ` Carlos Valiente
@ 2004-05-24 20:10   ` Adrian Smarzewski
  2004-06-03 10:24     ` Adrian Smarzewski
  2004-05-25  1:55   ` James Ascroft-Leigh
  1 sibling, 1 reply; 8+ messages in thread
From: Adrian Smarzewski @ 2004-05-24 20:10 UTC (permalink / raw)
  To: qemu-devel

Carlos Valiente wrote:
> Yes: On your host you have to:
> 
> 1. Enable IP forwarding:
> 
> # echo 1 > /proc/sys/net/ipv4/ip_forward
> 
> 2. Enable masquerading
> 
> # iptables -t nat -A POSTROUTING	\
> 	-s 10.0.0.0/8			\
> 	-d ! 10.0.0.0/8 -j MASQUERADE

doesn't work for me :(

root@thunder root # cat /proc/sys/net/ipv4/ip_forward
1

root@thunder root # ifconfig
<...>
eth1      Link encap:Ethernet  HWaddr 00:02:44:3C:06:53
           inet addr:112.2.2.17  Bcast:112.2.2.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:18610 errors:0 dropped:0 overruns:0 frame:0
           TX packets:13040 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:10535515 (10.0 Mb)  TX bytes:1478199 (1.4 Mb)
           Interrupt:11 Base address:0xee00
<...>

root@thunder root # route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use 
Iface
112.2.2.0       0.0.0.0         255.255.255.0   U     0      0        0 eth1
<...>
0.0.0.0         112.2.2.11      0.0.0.0         UG    0      0        0 eth1

dhcp on 10.0.2.2 and dns on 10.0.2.3 are working.

-- 
Pozdrowienia
Adrian Smarzewski

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] usermode-networking problem
  2004-05-23 20:28 ` Carlos Valiente
  2004-05-24 20:10   ` Adrian Smarzewski
@ 2004-05-25  1:55   ` James Ascroft-Leigh
  1 sibling, 0 replies; 8+ messages in thread
From: James Ascroft-Leigh @ 2004-05-25  1:55 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

On Sun, 2004-05-23 at 21:28 +0100, Carlos Valiente wrote:
> On Sun, 2004-05-23 at 19:58, Adrian Smarzewski wrote:
> > sh-2.05b# ping -c 3 212.77.100.101
> > PING 212.77.100.101 (212.77.100.101) 56(84) bytes of data.
> > 
> > --- 212.77.100.101 ping statistics ---
> > 3 packets transmitted, 0 received, 100% packet loss, time 2018ms
> > 
> > 
> > I don't know why. Should I configure something on host os?
> 
> Yes: On your host you have to:
> 
> 1. Enable IP forwarding:
[...]
> 2. Enable masquerading
[...]

Not sure but I thought that the purpose of the the -user-net feature was
to remove the need for any superuser privileges or special host
configuration.

From what I understand user-mode networking is quite a feat to pull off,
with ICMP (e.g. ping(8)) being probably harder than TCP or UDP due to
the interfaces made available by the system to non-superusers.  I have
not looked at the code but the suggestion has been made that it may even
be necessary to fork and exec the (setuid) /usr/ping executable.

I would suspect that, as previously mentioned, UDP is working but the
connection tracking of the TCP implementation is broken/incomplete in
some way.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] usermode-networking problem
  2004-05-24 20:10   ` Adrian Smarzewski
@ 2004-06-03 10:24     ` Adrian Smarzewski
  0 siblings, 0 replies; 8+ messages in thread
From: Adrian Smarzewski @ 2004-06-03 10:24 UTC (permalink / raw)
  To: qemu-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Adrian Smarzewski wrote:
| doesn't work for me :(
no ideas?

- --
Pozdrowienia
Adrian Smarzewski
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAvvxMgnuWEmthbpURAjIjAJwPBGAVuh3XI1MAE4RiyCdr1H9WTwCfSdTZ
pK/LMNgzx/ErYx34Xn976+g=
=uklp
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-06-03 10:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-23 18:58 [Qemu-devel] usermode-networking problem Adrian Smarzewski
2004-05-23 20:28 ` Carlos Valiente
2004-05-24 20:10   ` Adrian Smarzewski
2004-06-03 10:24     ` Adrian Smarzewski
2004-05-25  1:55   ` James Ascroft-Leigh
2004-05-23 20:56 ` vaise
2004-05-23 21:05 ` Fabrice Bellard
  -- strict thread matches above, loose matches on Subject: below --
2004-05-23 18:58 Adrian Smarzewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).