qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] eth0 problems
@ 2004-08-28 21:54 Lonnie Cumberland
  2004-08-28 23:13 ` Joe Menola
  0 siblings, 1 reply; 12+ messages in thread
From: Lonnie Cumberland @ 2004-08-28 21:54 UTC (permalink / raw)
  To: qemu-devel

Hello All,

I have just been able to compile the 0.6.0 version. Thanks for the help 
with the C Math library.

Not the problem is that I am still seeing the same problem with the eth0 
interface.

When I run the qemu

    qemu -user-net linux.img

I am getting:

    SIOCSIFADDR: No such device
    eth0: Unknown Inteface:  No such device

I am using a standard install of Mandrake 10.0

How can I get qemu to see the network?

Thanks,
Lonnie

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

* Re: [Qemu-devel] eth0 problems
  2004-08-28 23:13 ` Joe Menola
@ 2004-08-28 23:04   ` Lonnie Cumberland
  2004-08-29  0:18     ` Joe Menola
  0 siblings, 1 reply; 12+ messages in thread
From: Lonnie Cumberland @ 2004-08-28 23:04 UTC (permalink / raw)
  To: qemu-devel

No, the /etc/qemu-ifup does not exist and my host eth0 is there but the guest linux.img eth0 does not show. Only the "lo" loopback.



Joe Menola wrote:

>On Sat August 28 2004 4:54 pm, Lonnie Cumberland wrote:
>  
>
>>Hello All,
>>
>>I have just been able to compile the 0.6.0 version. Thanks for the help
>>with the C Math library.
>>
>>Not the problem is that I am still seeing the same problem with the eth0
>>interface.
>>
>>When I run the qemu
>>
>>    qemu -user-net linux.img
>>
>>I am getting:
>>
>>    SIOCSIFADDR: No such device
>>    eth0: Unknown Inteface:  No such device
>>
>>I am using a standard install of Mandrake 10.0
>>
>>How can I get qemu to see the network?
>>
>>Thanks,
>>Lonnie
>>
>>    
>>
>
>Check for existence of /etc/qemu-ifup. If exists, try renaming it.
>
>Also, what is output of /sbin/ifconfig command?
>
>-jm
>
>
>_______________________________________________
>Qemu-devel mailing list
>Qemu-devel@nongnu.org
>http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
>  
>

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

* Re: [Qemu-devel] eth0 problems
  2004-08-28 21:54 [Qemu-devel] eth0 problems Lonnie Cumberland
@ 2004-08-28 23:13 ` Joe Menola
  2004-08-28 23:04   ` Lonnie Cumberland
  0 siblings, 1 reply; 12+ messages in thread
From: Joe Menola @ 2004-08-28 23:13 UTC (permalink / raw)
  To: qemu-devel

On Sat August 28 2004 4:54 pm, Lonnie Cumberland wrote:
> Hello All,
>
> I have just been able to compile the 0.6.0 version. Thanks for the help
> with the C Math library.
>
> Not the problem is that I am still seeing the same problem with the eth0
> interface.
>
> When I run the qemu
>
>     qemu -user-net linux.img
>
> I am getting:
>
>     SIOCSIFADDR: No such device
>     eth0: Unknown Inteface:  No such device
>
> I am using a standard install of Mandrake 10.0
>
> How can I get qemu to see the network?
>
> Thanks,
> Lonnie
>

Check for existence of /etc/qemu-ifup. If exists, try renaming it.

Also, what is output of /sbin/ifconfig command?

-jm

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

* Re: [Qemu-devel] eth0 problems
  2004-08-28 23:04   ` Lonnie Cumberland
@ 2004-08-29  0:18     ` Joe Menola
  2004-08-29  0:33       ` Jim C. Brown
  0 siblings, 1 reply; 12+ messages in thread
From: Joe Menola @ 2004-08-29  0:18 UTC (permalink / raw)
  To: qemu-devel

On Sat August 28 2004 6:04 pm, Lonnie Cumberland wrote:
> No, the /etc/qemu-ifup does not exist and my host eth0 is there but the
> guest linux.img eth0 does not show. Only the "lo" loopback.

-user-net doesn't provide eth0 in your qemu host. It provides internet access 
only. To get full networking (eth0) you need to setup a tun device.

-jm

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

* Re: [Qemu-devel] eth0 problems
  2004-08-29  0:18     ` Joe Menola
@ 2004-08-29  0:33       ` Jim C. Brown
  2004-08-29  0:43         ` Joe Menola
  0 siblings, 1 reply; 12+ messages in thread
From: Jim C. Brown @ 2004-08-29  0:33 UTC (permalink / raw)
  To: qemu-devel

On Sat, Aug 28, 2004 at 07:18:38PM -0500, Joe Menola wrote:
> On Sat August 28 2004 6:04 pm, Lonnie Cumberland wrote:
> > No, the /etc/qemu-ifup does not exist and my host eth0 is there but the
> > guest linux.img eth0 does not show. Only the "lo" loopback.
> 
> -user-net doesn't provide eth0 in your qemu host. It provides internet access 
> only. To get full networking (eth0) you need to setup a tun device.
> 
> -jm
> 
> 

Technically, tun doesn't provide eth0 for the host either. In fact, the
kernel documentation says you need to have eth0 first, or else you cant use
tuntap (that may no longer be true though, remember this is from the offical
kernel docs :). tuntap provides a tun0/tap0 device in the host and an eth0
device in the guest. user net should provide an eth0 as well, but it won't
add anything to the host.

If eth0 doesn't show, that may be due to lack of hardware support. Be sure
your kernel has support for the ne2k-pci module.

user net isn't just for internet access .. the guest can still access the LAN
or the WAN/intranet .. they just can't initiate a talk to it.

> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
> 

-- 
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.

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

* Re: [Qemu-devel] eth0 problems
  2004-08-29  0:33       ` Jim C. Brown
@ 2004-08-29  0:43         ` Joe Menola
  2004-08-29  1:03           ` Jim C. Brown
  0 siblings, 1 reply; 12+ messages in thread
From: Joe Menola @ 2004-08-29  0:43 UTC (permalink / raw)
  To: qemu-devel

On Sat August 28 2004 7:33 pm, Jim C. Brown wrote:
> On Sat, Aug 28, 2004 at 07:18:38PM -0500, Joe Menola wrote:
> > On Sat August 28 2004 6:04 pm, Lonnie Cumberland wrote:
> > > No, the /etc/qemu-ifup does not exist and my host eth0 is there but the
> > > guest linux.img eth0 does not show. Only the "lo" loopback.
> >
> > -user-net doesn't provide eth0 in your qemu host. It provides internet
> > access only. To get full networking (eth0) you need to setup a tun
> > device.
> >
> > -jm
>
> Technically, tun doesn't provide eth0 for the host either. In fact, the
> kernel documentation says you need to have eth0 first, or else you cant use
> tuntap (that may no longer be true though, remember this is from the
> offical kernel docs :). tuntap provides a tun0/tap0 device in the host and
> an eth0 device in the guest. user net should provide an eth0 as well, but
> it won't add anything to the host.
>
> If eth0 doesn't show, that may be due to lack of hardware support. Be sure
> your kernel has support for the ne2k-pci module.
>
> user net isn't just for internet access .. the guest can still access the
> LAN or the WAN/intranet .. they just can't initiate a talk to it.
>
You're correct...nor can network shares be accesed?

Thanks for the correction.

-jm

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

* Re: [Qemu-devel] eth0 problems
  2004-08-29  1:03           ` Jim C. Brown
@ 2004-08-29  0:55             ` Lonnie Cumberland
  2004-08-29  1:54               ` Mark Williamson
  2004-08-29  2:53               ` Joe Menola
  0 siblings, 2 replies; 12+ messages in thread
From: Lonnie Cumberland @ 2004-08-29  0:55 UTC (permalink / raw)
  To: qemu-devel

Hello All,

I just looked at  the kernel sources for my 2.6.3-7mdk kernel and 
TUN/TAP has already been compiled in as a module.

Although there is no /dev/net/tun0 listed or /dev/tun0 as well

Actually, on I do not even see the /dev/eth0 even though it is now 
working on my  cable modem and the ifconfig show that it is there.

Any other ideas?

Thanks for the help,
Lonnie

Jim C. Brown wrote:

>On Sat, Aug 28, 2004 at 07:43:55PM -0500, Joe Menola wrote:
>  
>
>>>Technically, tun doesn't provide eth0 for the host either. In fact, the
>>>kernel documentation says you need to have eth0 first, or else you cant use
>>>tuntap (that may no longer be true though, remember this is from the
>>>offical kernel docs :). tuntap provides a tun0/tap0 device in the host and
>>>an eth0 device in the guest. user net should provide an eth0 as well, but
>>>it won't add anything to the host.
>>>
>>>If eth0 doesn't show, that may be due to lack of hardware support. Be sure
>>>your kernel has support for the ne2k-pci module.
>>>
>>>user net isn't just for internet access .. the guest can still access the
>>>LAN or the WAN/intranet .. they just can't initiate a talk to it.
>>>
>>>      
>>>
>>You're correct...nor can network shares be accesed?
>>
>>    
>>
>
>Not sure. A node on the lan can't access shares on the user net guest, but
>the guest may be able to access shares on the node ... this depends on the
>protocol in question.
>
>Windows shares have the additional complication that they have to be on the
>same subnet, although I am not familar with Windows XP and above so they may
>have removed this limitation (Samba removes this limitation if you set an option
>in its config file).
>
>  
>
>>Thanks for the correction.
>>
>>
>>    
>>

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

* Re: [Qemu-devel] eth0 problems
  2004-08-29  0:43         ` Joe Menola
@ 2004-08-29  1:03           ` Jim C. Brown
  2004-08-29  0:55             ` Lonnie Cumberland
  0 siblings, 1 reply; 12+ messages in thread
From: Jim C. Brown @ 2004-08-29  1:03 UTC (permalink / raw)
  To: qemu-devel

On Sat, Aug 28, 2004 at 07:43:55PM -0500, Joe Menola wrote:
> > Technically, tun doesn't provide eth0 for the host either. In fact, the
> > kernel documentation says you need to have eth0 first, or else you cant use
> > tuntap (that may no longer be true though, remember this is from the
> > offical kernel docs :). tuntap provides a tun0/tap0 device in the host and
> > an eth0 device in the guest. user net should provide an eth0 as well, but
> > it won't add anything to the host.
> >
> > If eth0 doesn't show, that may be due to lack of hardware support. Be sure
> > your kernel has support for the ne2k-pci module.
> >
> > user net isn't just for internet access .. the guest can still access the
> > LAN or the WAN/intranet .. they just can't initiate a talk to it.
> >
> You're correct...nor can network shares be accesed?
> 

Not sure. A node on the lan can't access shares on the user net guest, but
the guest may be able to access shares on the node ... this depends on the
protocol in question.

Windows shares have the additional complication that they have to be on the
same subnet, although I am not familar with Windows XP and above so they may
have removed this limitation (Samba removes this limitation if you set an option
in its config file).

> Thanks for the correction.
> 
> -jm
> 

-- 
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.

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

* Re: [Qemu-devel] eth0 problems
  2004-08-29  0:55             ` Lonnie Cumberland
@ 2004-08-29  1:54               ` Mark Williamson
  2004-08-29  2:53               ` Joe Menola
  1 sibling, 0 replies; 12+ messages in thread
From: Mark Williamson @ 2004-08-29  1:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: Mark.Williamson

> Actually, on I do not even see the /dev/eth0 <snip>

You wouldn't: normal network devices do not have corresponding device files 
under Linux (because they don't behave like files).

I myself was in the dark about this for a long time - just assumed they'd be 
there...

HTH,
Mark

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

* Re: [Qemu-devel] eth0 problems
  2004-08-29  2:53               ` Joe Menola
@ 2004-08-29  2:33                 ` Lonnie Cumberland
  2004-08-29  5:39                   ` Joe Menola
  0 siblings, 1 reply; 12+ messages in thread
From: Lonnie Cumberland @ 2004-08-29  2:33 UTC (permalink / raw)
  To: qemu-devel

Is there a way for me to tell if the TUN module has been compiled into 
this kernel?

I looked at the src for the kernel via the "make menuconfig" and it 
showed the TUN/TAP device as a Module. Also the module exists in the 
/lib/modules directory.

how can I load the tun module?

Thanks,
Lonnie


Joe Menola wrote:

>On Sat August 28 2004 7:55 pm, Lonnie Cumberland wrote:
>  
>
>>I just looked at  the kernel sources for my 2.6.3-7mdk kernel and
>>TUN/TAP has already been compiled in as a module.
>>
>>Although there is no /dev/net/tun0 listed or /dev/tun0 as well
>>    
>>
>
>/dev/net/tun0 wont exist until module "tun" is loaded.
>
>If you wish to setup a tun device, I've created a small and raw howto for my 
>own use on what works for me. Should give you a decent start...
>
>  
>
>First off, kernel needs tun networking support compiled in and module loaded. 
>
>"eth0" =host device connected to lan 
>"/etc/rc.d/init.d" = path to init scripts
>adjust as needed
>
>		Setup Masquerade 
>
>Run in terminal as root:
>	# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE 
>	#/etc/rc.d/init.d/iptables save
>
>		Sanity check
>	#/etc/rc.d/init.d/iptables start
>	#/etc/rc.d/init.d/iptables status
>
>Rule "Chain POSTROUTING (policy ACCEPT)" 
> should contain:
>	"MASQUERADE  all  --  anywhere             anywhere"
>
>		Create Ifup scripts
>
>1- Create file: /etc/qemu-ifup 
>
>#!/bin/sh
>sudo /sbin/ifconfig $1 <ip address>
>sudo /etc/qemu-iptables
>#end 
>
>2- #chmod 777 /etc/qemu-ifup
>
>3- Create file /etc/qemu-iptables
>
>#!/bin/sh
>/etc/rc.d/init.d/iptables stop
>echo "1" >&/proc/sys/net/ipv4/ip_forward
>/etc/rc.d/init.d/iptables start
>#/usr/sbin/dhcpd -q tun0
>#end
>
>4- #chmod 777 /etc/qemu-iptables
><<<<<<<<<<
>	
>
>
>_______________________________________________
>Qemu-devel mailing list
>Qemu-devel@nongnu.org
>http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
>  
>

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

* Re: [Qemu-devel] eth0 problems
  2004-08-29  0:55             ` Lonnie Cumberland
  2004-08-29  1:54               ` Mark Williamson
@ 2004-08-29  2:53               ` Joe Menola
  2004-08-29  2:33                 ` Lonnie Cumberland
  1 sibling, 1 reply; 12+ messages in thread
From: Joe Menola @ 2004-08-29  2:53 UTC (permalink / raw)
  To: qemu-devel

On Sat August 28 2004 7:55 pm, Lonnie Cumberland wrote:
> I just looked at  the kernel sources for my 2.6.3-7mdk kernel and
> TUN/TAP has already been compiled in as a module.
>
> Although there is no /dev/net/tun0 listed or /dev/tun0 as well

/dev/net/tun0 wont exist until module "tun" is loaded.

If you wish to setup a tun device, I've created a small and raw howto for my 
own use on what works for me. Should give you a decent start...

>>>>>>
First off, kernel needs tun networking support compiled in and module loaded. 

"eth0" =host device connected to lan 
"/etc/rc.d/init.d" = path to init scripts
adjust as needed

		Setup Masquerade 

Run in terminal as root:
	# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE 
	#/etc/rc.d/init.d/iptables save

		Sanity check
	#/etc/rc.d/init.d/iptables start
	#/etc/rc.d/init.d/iptables status

Rule "Chain POSTROUTING (policy ACCEPT)" 
 should contain:
	"MASQUERADE  all  --  anywhere             anywhere"

		Create Ifup scripts

1- Create file: /etc/qemu-ifup 

#!/bin/sh
sudo /sbin/ifconfig $1 <ip address>
sudo /etc/qemu-iptables
#end 

2- #chmod 777 /etc/qemu-ifup

3- Create file /etc/qemu-iptables

#!/bin/sh
/etc/rc.d/init.d/iptables stop
echo "1" >&/proc/sys/net/ipv4/ip_forward
/etc/rc.d/init.d/iptables start
#/usr/sbin/dhcpd -q tun0
#end

4- #chmod 777 /etc/qemu-iptables
<<<<<<<<<<
	

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

* Re: [Qemu-devel] eth0 problems
  2004-08-29  2:33                 ` Lonnie Cumberland
@ 2004-08-29  5:39                   ` Joe Menola
  0 siblings, 0 replies; 12+ messages in thread
From: Joe Menola @ 2004-08-29  5:39 UTC (permalink / raw)
  To: qemu-devel

On Sat August 28 2004 9:33 pm, Lonnie Cumberland wrote:
> Is there a way for me to tell if the TUN module has been compiled into
> this kernel?
>
> I looked at the src for the kernel via the "make menuconfig" and it
> showed the TUN/TAP device as a Module. Also the module exists in the
> /lib/modules directory.
>
> how can I load the tun module?
>

#modprobe tun

To verify it's loaded

#lsmod

-jm

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

end of thread, other threads:[~2004-08-29  5:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-28 21:54 [Qemu-devel] eth0 problems Lonnie Cumberland
2004-08-28 23:13 ` Joe Menola
2004-08-28 23:04   ` Lonnie Cumberland
2004-08-29  0:18     ` Joe Menola
2004-08-29  0:33       ` Jim C. Brown
2004-08-29  0:43         ` Joe Menola
2004-08-29  1:03           ` Jim C. Brown
2004-08-29  0:55             ` Lonnie Cumberland
2004-08-29  1:54               ` Mark Williamson
2004-08-29  2:53               ` Joe Menola
2004-08-29  2:33                 ` Lonnie Cumberland
2004-08-29  5:39                   ` Joe Menola

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).