Menu:

Saturday, October 04, 2003

simh: modified version of taptap.c

On at least Linux, the vax and pdp11 emulators cannot directly communicate with the host due to limitiations of the pcap interface. taptap is a small tool to work around this problem by bridging between to tuntap interfaces. If you find yourself running multiple instances of networked emulators, you may find this modified version useful.

In essence, taptap calls an external program with the names of the created tuntap interface pair. The interfaces will be removed upon termination of the external program. If no program is specified, the original behavior is mimicked and you have to use killall or equivalent to kill the running taptap bridge processes.

Source code: taptap-modified.c

See below the fold for a sample wrapper script that updates a simh configuration file on the fly and runs simh. You should edit the embedded config file as needed.

#!/bin/sh

DEV="$1"
DEVQE="$2"

TMPFILE="`mktemp /tmp/$0.XXXXXX`"
export TMPFILE

SIMH="./vax"

DEVIP=192.168.201.1
DEVMASK=255.255.255.0

sighandler() {
	rm $TMPFILE
	exit
}

trap sighandler 1 3 9  15

cat <<_EOF > $TMPFILE
load -r ka655.bin
;
set rq0 ra92
at rq0 ra0.disk
;
set xq mac=08-00-2B-C0-01-EE
at xq0 $DEVQE
;
_EOF

ifconfig $DEV up $DEVIP netmask $DEVMASK
ifconfig $DEVQE up

nice $SIMH $TMPFILE

rm $TMPFILE

Posted by markus in • Retrocomputing
(3) CommentsPermalink

Next entry: SIMH/Vax versus OpenBSD 3.3

Previous entry: 4.3BSD-Quasijarus on simh/Vax

Comments

I’m not having much success at all with the taptap approach to simh networking.  In particular, it’s not clear how the various tun devices and the emulated machine get their IP addresses?  If tun0 does not have an IP address assigned and tun1 gets, e.g. 192.168.100.1:

a) Which interface does the emulated machine bind to?
b) What IP address does the emulated machine need to assume?

Regardless of what I’ve tried, my PDP11 guest (running 4.2BSD) does not end up with a functional network. If I bind directly to eth0 in promiscuous mode, it’s fine, so I now I understand the fundamentals of configuring the guest machine.  It’s only the tun/tap arrangement that refuses to work.

Posted by  on  02/02  at  09:56 AM

taptap creates a pair of bridged interfaces, say tun0 for use by the host and tun1 for use by the SIMH instance. Further assuming that this bridged network uses the 192.168.100/0/24 network, you would do something like this:

On the host, do

ifconfig tun0 inet up address 192.189.100.1 netmask 255.255.255.0
ifconfig tun1 up

Please note that you only bring tun1 up, you don’t assign an IP address for it on the host.

Configure SIMH to use tun1

set xq mac=11-22-33-44-55-66
at xq0 tun1

and finally, configure the XQ0 interface on the guest to use IP address 192.168.100.2 as required by the guest OS. If you’re running 4.2BSD, something like

ifconfig qe0 inet up address 192.168.100.2 netmask 255.255.255.0

should work (I’m guessing about the device name, though).

Posted by markus  on  02/02  at  01:12 PM

The PDP11 simh (or is the BSD environment?) seems to expect the DEUNA unibus ethernet device XU which shows up as de0 in the unix environment.  The recipe you provide is just not creating a working network.  ifconfig packet counts on the Linux host shows that packets are going both directions on both tun0 and tun1, but I can neither obtain a ping response nor make any other sort of connection.  I cannot even ping the tun0 address!

I’ll just suffer with eth0 in promiscuous mode for the time being.  If you have any further ideas for troubleshooting, I’ll be delighted to try them.  I have searched Google high and low for anything resembling a tun/tap howto or technical overview.  All I can find are specific recipes, with no overall explanation or rationale.

Posted by  on  02/02  at  02:53 PM

Page 1 of 1 pages

Add a comment

Name:

Email:

Location:

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?

Submit the word you see below: