OS X 10.6, Basilisk II, tuntaposx bridge failure

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
User avatar
jollyroger
Student Driver
Posts: 14
Joined: Sat Mar 07, 2015 3:21 pm

OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by jollyroger »

Hey folks,

I'm currently running MacHTTP in System 7.5.5 in Basilisk II on OS X 10.10 with tuntaposx on a Mac mini, and it works very well! It allows me to assign a static IP address to System 7.5.5 in the TCP/IP control panel, so that I can reach the web server easily outside of my LAN.

I am trying (currently without success) to move the setup to another (older) Mac mini that runs OS X 10.6 instead.

I've installed what seems like the appropriate version of tuntaposx, tuntap_20111101.tar.gz from here:

https://sourceforge.net/projects/tuntap ... /20111101/

My Ethernet interface device on this machine is en0:

Code: Select all

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 00:16:cb:a5:66:f0 
	inet6 fe80::216:cbff:fea5:66f0%en0 prefixlen 64 scopeid 0x4 
	inet 10.0.0.7 netmask 0xffffff00 broadcast 10.0.0.255
	inet6 2601:7:1680:1c00:216:cbff:fea5:66f0 prefixlen 64 autoconf 
	media: autoselect (1000baseT <full-duplex,flow-control>)
	status: active
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 00:14:51:ee:41:ed 
	media: autoselect (<unknown type>)
	status: inactive
I'm using BasiliskII_32bit-etherhelper-SDL.zip from here:

http://www.emaculation.com/forum/viewto ... f=6&t=8067

In Basilisk II settings, under Serial/Network, I have the Ethernet Interface set to etherhelper/tap0/bridge0/en0.

When I launch Basilisk II, I see in the system log that etherhelpertool fails to create bridge0 and the tap0 device:

Code: Select all

Apr  2 13:34:33 mini /Applications/Basilisk II/BasiliskII.app/Contents/MacOS/BasiliskII[321]: CPSGetCurrentProcess(): This call is deprecated and should not be called anymore.
Apr  2 13:34:33 mini /Applications/Basilisk II/BasiliskII.app/Contents/MacOS/BasiliskII[321]: CPSSetForegroundOperationState(): This call is deprecated and should not be called anymore.
Apr  2 13:34:33 mini SecurityAgent[265]: system.privilege.admin|2015-04-02 13:34:33 -0700
Apr  2 13:34:36 mini authexec[327]: executing /Applications/Basilisk II/BasiliskII.app/Contents/Resources/etherhelpertool
Apr  2 13:34:36 mini [0x0-0x24024].BasiliskII[321]: etherhelpertool: Failed to create bridge0
Apr  2 13:34:36 mini [0x0-0x24024].BasiliskII[321]: etherhelpertool: open device failed.
Apr  2 13:27:31 mini [0x0-0x1b01b].BasiliskII[280]: etherhelpertool: open device failed.
Unfortunately, it doesn't tell me why the failure is happening. Anyone have any ideas how I might further debug this issue to get this working?

Perhaps I have missed some essential step for OS X 10.6?

Any ideas you might have would be greatly appreciated!
Last edited by jollyroger on Thu Apr 02, 2015 9:53 pm, edited 4 times in total.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: OS X 10.6, tuntaposx, Basilisk II problem

Post by adespoton »

Have you tried using the tap0 interface from some other tun/tap software? That will at least identify whether the problem is with BII's etherhelper or with that version of tun/tap on 10.6.
User avatar
jollyroger
Student Driver
Posts: 14
Joined: Sat Mar 07, 2015 3:21 pm

Re: OS X 10.6, tuntaposx, Basilisk II problem

Post by jollyroger »

Thanks for responding!

No, I haven't. And I'm very unfamiliar with tun tap, unfortunately.

Could you suggest something simple to try out?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by Cat_7 »

Hi,

Mac OS X below 10.8 doesn't support ethernet device bridging.
So you would need to follow the old route with IPNetrouter.
http://www.emaculation.com/doku.php/app ... heepshaver
Also works for BasiliskII.

Best,
Cat_7
User avatar
jollyroger
Student Driver
Posts: 14
Joined: Sat Mar 07, 2015 3:21 pm

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by jollyroger »

Hey Cat_7. Thanks for the response!

I think I need some clarification:

Step 3 on that page instructs us to launch SheepShaver as root manually with sudo ~/SheepShaver/SheepShaver.app/Contents/MacOS/SheepShaver. I figure I should also launch Basilisk as root similarly; but when I do, I see these messages in the terminal window:

Code: Select all

$ sudo /Applications/Basilisk\ II/BasiliskII.app/Contents/MacOS/BasiliskII 
Password:
Basilisk II V1.0 by Christian Bauer et al.
Reading ROM file...
etherhelpertool: Failed to create bridge0
etherhelpertool: open device failed.
WARNING: Unable to run ether helper helper tool.
Using SDL/coreaudio audio output
<JIT compiler> : enable runtime disassemblers : no
<JIT compiler> : compile FPU instructions : yes
<JIT compiler> : requested translation cache size : 8192 KB
Max CPUID level=10 Processor is GenuineIntel [PentiumPro]
<JIT compiler> : target processor has CMOV instructions : yes
<JIT compiler> : target processor can suffer from partial register stalls : yes
<JIT compiler> : alignment for loops, jumps are 16, 16
<JIT compiler> : lazy translation cache invalidation : on
<JIT compiler> : register aliasing : on
<JIT compiler> : FP register aliasing : on
<JIT compiler> : lazy constant offsetting : on
<JIT compiler> : translate through constant jumps : on
<JIT compiler> : separate blockinfo allocation : on
<JIT compiler> : building compiler function tables
<JIT compiler> : supposedly 42382 compileable opcodes!
<JIT compiler> : actual translation cache size : 8192 KB at 0x0E41D000
<JIT compiler> : gather statistics on untranslated insns count
<JIT compiler> : gather statistics on translation time
FATAL: Could not reallocate framebuffer at previous address
etherhelpertool: Failed to create bridge0
etherhelpertool: open device failed.
WARNING: Unable to run ether helper helper tool.
WARNING: RmvTime(07f33a7c): Descriptor not found
After I start IPNetRouter, I do not see a "tap0" interface in the interface listing. This is probably because of the previous error, right?

I'm not sure how to proceed from there.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by Cat_7 »

Correct, you should start Basilisk in same manner as SheepShaver.

Please note that you are still using the parameters used to start the etherhelper. They are not needed when you just want to enable the tap device.
Your setting should simply be "tap0" instead of "etherhelper/tap0/bridge0/en0"

Best,
Cat_7
User avatar
jollyroger
Student Driver
Posts: 14
Joined: Sat Mar 07, 2015 3:21 pm

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by jollyroger »

Ah, thank you. I wasn't aware I should not be using ethernethelpertool in OS X 10.6.

Ok, so I set the Basilisk Ethernet Interface to tap0:

Image

Then I launched Basilisk with:

Code: Select all

$sudo /Applications/Basilisk\ II/BasiliskII.app/Contents/MacOS/BasiliskII
Password:
Basilisk II V1.0 by Christian Bauer et al.
Reading ROM file...
Using SDL/coreaudio audio output
<JIT compiler> : enable runtime disassemblers : no
<JIT compiler> : compile FPU instructions : yes
<JIT compiler> : requested translation cache size : 8192 KB
Max CPUID level=10 Processor is GenuineIntel [PentiumPro]
<JIT compiler> : target processor has CMOV instructions : yes
<JIT compiler> : target processor can suffer from partial register stalls : yes
<JIT compiler> : alignment for loops, jumps are 16, 16
<JIT compiler> : lazy translation cache invalidation : on
<JIT compiler> : register aliasing : on
<JIT compiler> : FP register aliasing : on
<JIT compiler> : lazy constant offsetting : on
<JIT compiler> : translate through constant jumps : on
<JIT compiler> : separate blockinfo allocation : on
<JIT compiler> : building compiler function tables
<JIT compiler> : supposedly 42382 compileable opcodes!
<JIT compiler> : actual translation cache size : 8192 KB at 0x0C900000
<JIT compiler> : gather statistics on untranslated insns count
<JIT compiler> : gather statistics on translation time
FATAL: Could not reallocate framebuffer at previous address
WARNING: RmvTime(07f33a7c): Descriptor not found
Then I launched IPNetRouterX; but it appears the tap0 device is not getting an IP address as it should, instead displaying not available:

Image

I do see a tap0 interface in the ifconfig listing - though it does not have a status of active:

Code: Select all

$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
	inet 127.0.0.1 netmask 0xff000000 
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	ether 00:16:cb:a5:66:f0 
	inet6 fe80::216:cbff:fea5:66f0%en0 prefixlen 64 scopeid 0x4 
	inet 10.0.0.7 netmask 0xffffff00 broadcast 10.0.0.255
	inet6 2601:7:1680:1c00:216:cbff:fea5:66f0 prefixlen 64 autoconf 
	media: autoselect (1000baseT <full-duplex,flow-control>)
	status: active
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 00:14:51:ee:41:ed 
	media: autoselect (<unknown type>)
	status: inactive
tap0: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 4a:78:b1:23:b0:21 
	open (pid 1638)
I have verified that the System 7.5.5 AppleTalk and TCP/IP control panels are set correctly for my network (these settings worked fine when Basilisk was running on my other Mac mini running Yosemite):

Image

Image

Image

Image

I feel like I'm close, if I can just get the tap0 interface working correctly. Ideas?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by Cat_7 »

The tap device doesn't need an IP address, you bridged them correctly. The tap device is active, as it doesn't display status: inactive. It wouldn't show up in IPNetrouter if it wasn't up.

Best,
Cat_7
User avatar
jollyroger
Student Driver
Posts: 14
Joined: Sat Mar 07, 2015 3:21 pm

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by jollyroger »

Hmm... Are you sure it's not supposed to be tap0?

I set Basilisk to use tap for the Ethernet Interface:

Image

After launching Basilisk and running IPNetRouter, I no longer see a tap device in the IPNetRouter Interfaces listing:

Image

And there is no longer a tap interface in the ifconfig listing:

Code: Select all

$ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
	inet 127.0.0.1 netmask 0xff000000 
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	ether 00:16:cb:a5:66:f0 
	inet6 fe80::216:cbff:fea5:66f0%en0 prefixlen 64 scopeid 0x4 
	inet 10.0.0.7 netmask 0xffffff00 broadcast 10.0.0.255
	inet6 2601:7:1680:1c00:216:cbff:fea5:66f0 prefixlen 64 autoconf 
	media: autoselect (1000baseT <full-duplex,flow-control>)
	status: active
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	ether 00:14:51:ee:41:ed 
	media: autoselect (<unknown type>)
	status: inactive
Thanks for your help with this!
Last edited by jollyroger on Fri Apr 03, 2015 4:41 pm, edited 1 time in total.
User avatar
jollyroger
Student Driver
Posts: 14
Joined: Sat Mar 07, 2015 3:21 pm

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by jollyroger »

Another data point: I just tried setting the Basilisk Ethernet interface to slirp and the System 7.5.5 TCP/IP control panel to use DHCP, and after restarting, I have network access.

Setting it back to tap0 / Manual now...
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by Cat_7 »

Hi,

I fixed that post about tap/tap0 perhaps 30 seconds after I posted it ;-)

Best,
Cat_7
User avatar
jollyroger
Student Driver
Posts: 14
Joined: Sat Mar 07, 2015 3:21 pm

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by jollyroger »

Ah, ok. Cool.

So I've got everything configured as outlined, but I'm unable to contact any servers from within System 7, and pings to the manual IP address are failing.

I'm not sure what I'm missing here. When I set it to use slirp with DHCP, I can access the net. When I switch it to use tap0 with a valid manual address, I get nothing. : (
User avatar
jollyroger
Student Driver
Posts: 14
Joined: Sat Mar 07, 2015 3:21 pm

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by jollyroger »

I wonder if this is indication of a problem with tuntaposx.

I see this in the system log during startup:

Code: Select all

Apr  3 11:29:11 mini com.apple.SystemStarter[32]: Initializing tap devices
Apr  3 11:29:11 mini com.apple.SystemStarter[32]: Initializing tun devices
Apr  3 11:29:13 mini ntpd[26]: bind() fd 26, family 30, port 123, scope 0, addr 2601:7:1680:1c00:216:cbff:fea5:66f0, in6_is_addr_multicast=0 flags=0x11 fails: Can't assign requested address
Apr  3 11:29:13 mini ntpd[26]: unable to create socket on en0 (6) for 2601:7:1680:1c00:216:cbff:fea5:66f0#123
Apr  3 11:29:13 mini configd[14]: network configuration changed.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by Cat_7 »

Hi,

I got networking going using these commands:
Start two terminals. Execute this in the first:
sudo ~/BasiliskII/BasiliskII.app/Contents/MacOS/BasiliskII & sleep 10

(Check the paths to your BasiliskII folder)

execute this in the second:
sudo ifconfig tap0 192.168.0.20 netmask 255.255.255.0

Run IPNetRouterX and bridge en0 and tap0.

Please check that you use a non-used IP address for the tap0 device from your network.
Please check this old version of our guide:
http://www.emaculation.com/doku.php/app ... 1395468818

I had to use manual IP settings in Mac OS 7.5, as it wouldn't get an IP address through DHCP

As shown in the old revision of the guide, you can automate this with an executable script. For example:

#!/bin/bash
sudo ~/BasiliskII/BasiliskII.app/Contents/MacOS/BasiliskII & sleep 10
sudo ifconfig tap0 192.168.0.20 netmask 255.255.255.0
/Applications/IPNetrouterX/IPNetrouterX.app/Contents/MacOS/IPNetRouterX

Best,
Cat_7
NucAr
Tinkerer
Posts: 69
Joined: Mon Aug 13, 2012 1:42 am

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by NucAr »

Hi Cat_7 and all,

Since I'm the one who said that the tap interface doesn't need an IP address, I'd better clean up my mess. At that time, I'd worked with bridging in only 10.8+ and not in 10.6 using IPNetRouterX. Recently, I looked into running the 2009 build of Basilisk II in a virtual machine running 10.6 because of lag issues in more recent versions of OS X.

For some reason, it looks as if tap0 indeed needs an IP address when used with IPNetRouterX. I guess it needs something to put in the IP header. However, it doesn't need to be an address on your network, and you don't need to specify a netmask. You can use the address 0.0.0.0, which is used to keep an interface up and receiving packets, while not taking up an address on your network that will never be used.

So the script you posted above would look like

Code: Select all

#!/bin/bash
sudo ~/BasiliskII/BasiliskII.app/Contents/MacOS/BasiliskII & sleep 10
sudo ifconfig tap0 0.0.0.0
/Applications/IPNetrouterX/IPNetrouterX.app/Contents/MacOS/IPNetRouterX
Also, in case anyone uses IPNetRouterX for anything else other than bridging (I doubt anyone reading this does), you can save IPNetRouterX settings using File > Save As... to a file called, say, Bridge_en0_tap0.ipnr. Then you can pass this file as a command-line argument to IPNetRouterX:

Code: Select all

#!/bin/bash
sudo ~/BasiliskII/BasiliskII.app/Contents/MacOS/BasiliskII & sleep 10
sudo ifconfig tap0 0.0.0.0
/Applications/IPNetrouterX/IPNetrouterX.app/Contents/MacOS/IPNetRouterX /path/to/Bridge_en0_tap0.ipnr
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by Cat_7 »

Ah, good that you confess publicly ;-)
Who would have thought that we need to be backwards compatible. I mean, who would run ancient software in an emulator in a outdated version of an OS?

Lets hope the OPs problem is solved...

Best,
Cat_7
User avatar
jollyroger
Student Driver
Posts: 14
Joined: Sat Mar 07, 2015 3:21 pm

Re: OS X 10.6, Basilisk II, tuntaposx bridge failure

Post by jollyroger »

Sure enough, the tap interface address was what I was missing. After setting that, everything works like a charm.

Thanks for the tip about setting up IPNetRouter from the command line. That may come in handy as well.

Thanks for all of your help with this! : )
Post Reply