qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] TUN settings
@ 2004-06-07  9:57 Hetz Ben Hamo
  2004-06-07 10:13 ` Adrian Smarzewski
  2004-06-07 16:21 ` Tim
  0 siblings, 2 replies; 4+ messages in thread
From: Hetz Ben Hamo @ 2004-06-07  9:57 UTC (permalink / raw)
  To: qemu-devel

Hi,

Since SLiRP seems to not work with the PCI NE2000 here (4 machines, different 
configurations, none of them work), I decided to try the TUN way..

Here's my /etc/qemu-ifup script (based on what Tim posted):

!/bin/sh sudo /sbin/ifconfig tun0 192.168.2.200 netmask 255.255.255.0 
broadcast 192.168.2.255
sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'

(it's 2 lines, kmail breaks them...grrr)

In Windows 98 guest the config is:

IP Address: 		192.168.2.201
Subnet Mask:		255.255.255.0
Default Gateway:	192.168.2.200

And yet, I cannot ping the TUN interface in the host (192.168.2.200), and I 
cannot ping anywhere else.

Suggestions?

Thanks,
Hetz

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

* Re: [Qemu-devel] TUN settings
  2004-06-07  9:57 [Qemu-devel] TUN settings Hetz Ben Hamo
@ 2004-06-07 10:13 ` Adrian Smarzewski
  2004-06-07 16:21 ` Tim
  1 sibling, 0 replies; 4+ messages in thread
From: Adrian Smarzewski @ 2004-06-07 10:13 UTC (permalink / raw)
  To: qemu-devel

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

Hetz Ben Hamo wrote:
| And yet, I cannot ping the TUN interface in the host (192.168.2.200),
and I
| cannot ping anywhere else.
I have problems with usermode networking and tun networking too...

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

iD8DBQFAxD+tgnuWEmthbpURAvnxAJ9QNJc0AFeRUiskemsykyoHFjrY+gCeO/oP
lVbvdVBxr17uPSG5SoWSanQ=
=mQ5L
-----END PGP SIGNATURE-----

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

* Re: [Qemu-devel] TUN settings
  2004-06-07  9:57 [Qemu-devel] TUN settings Hetz Ben Hamo
  2004-06-07 10:13 ` Adrian Smarzewski
@ 2004-06-07 16:21 ` Tim
  2004-06-07 19:14   ` Adrian Smarzewski
  1 sibling, 1 reply; 4+ messages in thread
From: Tim @ 2004-06-07 16:21 UTC (permalink / raw)
  To: qemu-devel

> Here's my /etc/qemu-ifup script (based on what Tim posted):
> 
> !/bin/sh sudo /sbin/ifconfig tun0 192.168.2.200 netmask 255.255.255.0 
> broadcast 192.168.2.255
> sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'


on the first line... shouldn't that be broken into two?  
making it look something like:

#!/bin/sh
sudo /sbin/ifconfig tun0 192.168.2.200 netmask 255.255.255.0 broadcast 192.168.2.255
sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'


> And yet, I cannot ping the TUN interface in the host (192.168.2.200), and I 
> cannot ping anywhere else.

You probably know all of these things, but it doesn't hurt to check:

 - Your qemu-ifup script is executable by your user, yes?
 - /dev/net/tun exists (`MAKEDEV tun' has been run in /dev ??)
 - /dev/net/tun is writable by your user?
 - Your host OS's real ethernet card is configured to a different
   network than tun0, right?  You aren't going to be able to route (and
   ping may not even work) if you set tun0 and the guest OS to an IP in
   the same network range that your real NIC is a part of.

When QEMU is running, does ifconfig report the correct settings for
tun0?  

pardon me if this stuff is obvious to you,
tim

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

* Re: [Qemu-devel] TUN settings
  2004-06-07 16:21 ` Tim
@ 2004-06-07 19:14   ` Adrian Smarzewski
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Smarzewski @ 2004-06-07 19:14 UTC (permalink / raw)
  To: qemu-devel

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

Tim wrote:
| You probably know all of these things, but it doesn't hurt to check:
yes and the most important thing is that qemu does not report any errors
and I think it should if anything is wrong. Simply no communication.
In usermode I can ping the host and that's all. Tun-networking doen't
work at all. VMWare works in the same configuration. Kernel 2.6.5 with
some gentoo patches. Should I try vanilla kernel sources?

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

iD8DBQFAxL6RgnuWEmthbpURAiIrAKCPFsze6eK+7m66NW3zg9tYogZEZwCePSqU
3l1/cp+c/swT7PpBKP0Qd7c=
=7vyY
-----END PGP SIGNATURE-----

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

end of thread, other threads:[~2004-06-07 19:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-07  9:57 [Qemu-devel] TUN settings Hetz Ben Hamo
2004-06-07 10:13 ` Adrian Smarzewski
2004-06-07 16:21 ` Tim
2004-06-07 19:14   ` 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).