networking in sheepshaver linux

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
User avatar
Cat_7
Expert User
Posts: 5255
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

networking in sheepshaver linux

Post by Cat_7 »

Hello,

anyone succesfull in getting networking going in sheepshaver for linux? the tap/tunconfig keeps giving me errors.

Cat_7
DittoBox
Tinkerer
Posts: 47
Joined: Wed Dec 08, 2004 9:00 pm
Location: la la land

Post by DittoBox »

In the source there is a directory (SheepShaver/src/Unix/Linux/networking...or was it sheepnet?), type make, and then su to root and then type make install (I think, I've never actually done this). Kernel 2.6 breaks this module at compile time, thus you will need 2.4. To this end you will also need the kernel headers/source installed, if you're using a binary based distro.

Those of you using source-based distros need not worry about isntalling the source, you most likely compile your own and thus it's already installed.

Of course if you are the latter, then you already knew that >_>
gb
Real Swell Guy!
Posts: 116
Joined: Tue Jun 22, 2004 4:20 am

Post by gb »

sheep_net also works in 2.6, at least on x86_64 with 2.6.8.1.
DittoBox
Tinkerer
Posts: 47
Joined: Wed Dec 08, 2004 9:00 pm
Location: la la land

Post by DittoBox »

I'm on 2.6.9 under gentoo, and it's a no go.
User avatar
Cat_7
Expert User
Posts: 5255
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

This is what I get when using the make command in the NetDriver directory:

VMC:/cvs/SheepShaver/src/Unix/Linux/NetDriver # make
make -C /lib/modules/2.6.8-24.11-smp/build M=$PWD modules
make[1]: Entering directory `/usr/src/linux-2.6.8-24.11-obj/i386/smp'
make -C ../../../linux-2.6.8-24.11 O=../linux-2.6.8-24.11-obj/i386/smp modules
CC [M] /cvs/SheepShaver/src/Unix/Linux/NetDriver/sheep_net.o
/cvs/SheepShaver/src/Unix/Linux/NetDriver/sheep_net.c:29:31: linux/modversions.h: No such file or directory
make[4]: *** [/cvs/SheepShaver/src/Unix/Linux/NetDriver/sheep_net.o] Error 1
make[3]: *** [_module_/cvs/SheepShaver/src/Unix/Linux/NetDriver] Error 2
make[2]: *** [modules] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.8-24.11-obj/i386/smp'
make: *** [sheep_net.ko] Error 2

Best wishes
Cat_7
Jack Hair
Student Driver
Posts: 16
Joined: Tue Oct 05, 2004 7:55 am
Location: Nuth - Netherlands

Post by Jack Hair »

im having the exact same error when trying to compile sheepnet on SuSE 9.2 X86_64

/usr/src/BasiliskII/src/Unix/Linux/NetDriver> make install
make -C /lib/modules/2.6.8-24.11-default/build M=$PWD modules
make[1]: Entering directory `/usr/src/linux-2.6.8-24.11-obj/x86_64/default'
make -C ../../../linux-2.6.8-24.11 O=../linux-2.6.8-24.11-obj/x86_64/default modules
CC [M] /usr/src/BasiliskII/src/Unix/Linux/NetDriver/sheep_net.o
/usr/src/BasiliskII/src/Unix/Linux/NetDriver/sheep_net.c:29:31: linux/modversions.h: No such file or directory
make[4]: *** [/usr/src/BasiliskII/src/Unix/Linux/NetDriver/sheep_net.o] Error 1
make[3]: *** [_module_/usr/src/BasiliskII/src/Unix/Linux/NetDriver] Error 2
make[2]: *** [modules] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.8-24.11-obj/x86_64/default'
make: *** [sheep_net.ko] Error 2

Ive been trying the TUN setup too (got TUN working for PearPC) but i cant get it to work either?
User avatar
Cat_7
Expert User
Posts: 5255
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Maybe networking with SheepShaver doesn't work in these parts of Holland :lol:

I've got the "tun" solution running.

1. Make sure you have the following preference items set up correctly in ~/.sheepshaver_prefs:
-ether tun
-etherconfig /path/to/tunconfig (most likely like "your path to"/BasiliskII/src/Unix/tunconfig)

2. Disable the gui, because settings for network could overwrite your preferences

3. Make sure you have sudo working for your user for the following binaries:
/sbin/ifconfig
/sbin/iptables
( I had to copy one of these files from /usr/sbin to /sbin on SuSe 9.2)

Or you will have to run SheepShaver as root. (I run as root)

4. Check the IP of the tun0 device with /sbin/ifconfig.
(Most of the time it will report 172.20.40.1)

5. Next, on the MacOS side, set up a static IP address in this form: 172.20.XX.2 , where XX is generally 40 as you might have found with "ifconfig".
Use the ip address of the tun device as router address and enter your isp's dns ip-address as dns entries.

6. Start "ifconfig" when SheepShaver has started, and check for packages being RX-ed and TX-ed from the tun device.

7. If not, you might also need to issue the following command(s) to get the network going:
echo 1 > /proc/sys/net/ipv4/ip_forward
(try this one first)
or even these:
echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
echo 1 > /proc/sys/net/ipv4/conf/tun0/proxy_arp

Cat_7
Jack Hair
Student Driver
Posts: 16
Joined: Tue Oct 05, 2004 7:55 am
Location: Nuth - Netherlands

Post by Jack Hair »

Cat_7 wrote:Maybe networking with SheepShaver doesn't work in these parts of Holland :lol:
Cat_7
Lets hope not :P

Anyway thx very much for the explanation on tun, i finaly got internet on SheepShaver :!: :D
GreenMan
Student Driver
Posts: 12
Joined: Wed Jul 20, 2005 2:09 am

Post by GreenMan »

I followed the instructions, above, for the 2.6 kernel and 'tun'.

In MacOS 9.0.4 I entered the following into the TCP/IP control panel:

IP address : 172.20.40.2
Subnet mask: 255.255.248.0
Router address: 172.20.40.1

<my ISP's name servers>

This lets me see pages I serve off my Linux box, when accessed by IP address (hooray!), but it will not resolve names.

I have an actual router through which I get to the greater Internet. It is at 192.168.0.1. The control panel whined when I tried to enter that address for the router address, saying that the router must be on the same subnet as "this computer". I tied giving it a 192.168.0.xxx address and the physical router's address, but was unable to see anything, even the local machine.

Is there further configuration I need to do?

More information:
I can enter http://216.239.37.99/ and get to Google, so I guess it is not the router situation. I have double-checked the name server addresses, and they are correct.

Curiouser and curiouser.
User avatar
Cat_7
Expert User
Posts: 5255
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Hi,

Have you tried the new networking support gwenole has come up with, using slirp from qemu?
Just enter "slirp" in the ethernet preference and try.

On the Mac OS side, set ethernet to dhcp and restart.

Best wishes,

Cat_7
GreenMan
Student Driver
Posts: 12
Joined: Wed Jul 20, 2005 2:09 am

Post by GreenMan »

Wow! That was easy! The slirp technique works great.

Thanks for the tip.

More info: but it is VERY slow, about 6 kilobits per second. I wonder why?
gb
Real Swell Guy!
Posts: 116
Joined: Tue Jun 22, 2004 4:20 am

Post by gb »

If you are using FTP, is your client using passive mode? If so, that may be the reason. In other words, that's the only case I came up with.
GreenMan
Student Driver
Posts: 12
Joined: Wed Jul 20, 2005 2:09 am

Post by GreenMan »

More data on speed (or the lack thereof).

Using Mozilla 1.2.1 I did an FTP download on the (3200+) 64-bit system, and got 4.4 kbps.

Using the same Mac hardfile on the 32-bit system (which has a 1.2 GHz Via CPU) I measured 13 kbps.

I'm out of time right now. Later I'll test with BasiliskII and see if they have similar performance.

What sort of performance do the rest of you see? Do you run at the full speed of your connection?
User avatar
Cat_7
Expert User
Posts: 5255
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

I too have terrible slow performance using slirp, comparable to the before mentioned speeds.

I run Suse 9.2 as host on a PIV 1.7 Ghz. Speed is very slow no matter what I use the network for.

At work I run Suse 9.2 on a PIV 3.0 Ghz, and it doesn't matter a single "bit" ;-)

So for me, only the ease of getting networking running with slirp is a big advantage, not the speeds it delivers.

Best wishes,

Cat_7
Post Reply