TOPS-20 networking
Adam Thornton
athornton at gmail.com
Tue Mar 3 13:06:43 CST 2020
*TOPS-20*
The set of config files you need to edit in TOPS-20 is found here, about
halfway down the page:
http://www.ldx.ca/notes/tops-20-notes.html
I'll paste it here:
Configuring the system
The *Panda Distribution* README has this to say about initial configuration:
You’ll need to edit the following files. EMACS is installed on this system,
along with TECO and EDIT. [More on these editors later.]
SYSTEM:7-1-CONFIG.CMD to set your timezone
SYSTEM:HOSTS.TXT to define your local host name and network
SYSTEM:INTERNET.ADDRESS to define (again!) your IP address – must be the
same as in klt20.ini. Also define your netmask here as LOGICAL-HOST-MASK
SYSTEM:INTERNET.GATEWAYS to define your IP gateway
SYSTEM:INTERNET.NAMESERVERS Don’t bother with SYSTEM:INTERNET.NAMESERVERS.
That is the configuration file for DEC’s resolver; although it’s simpler it
has some interoperability problems with MMAILR which haven’t been resolved
yet.
SYSTEM:MONNAM.TXT to define your system name
DOMAIN:RESOLV.CONFIG to define your DNS servers, your default domain
(replacing MYDOMAIN.COM) and any users in addition to OPERATOR who can send
control messages to the resolver.
To actually edit any of those, you'll probably need to ENABLE first, eg:
@ena
$
The dollar-sign ($) prompt indicates that your privileges are enabled.
*Linux Host*
On the host side, I like to convert my ethernet to a bridge so I can add
virtual interfaces easily. Here's the script I use (requires sudo, and
that the user running it be in group adm, and that the tuntap devices be
owned by and writeable by group adm):
#!/bin/sh
eth0text=$(/sbin/ifconfig eth0 | grep "inet ")
HOSTIP=$(echo "${eth0text}" | awk '{print $2}')
HOSTNETMASK=$(echo "${eth0text}" | awk '{print $4}')
HOSTBCASTADDR=$(echo "${eth0text}" | awk '{print $6}')
HOSTDEFAULTGATEWAY=$(/sbin/route -n | grep ^0.0.0.0 | awk '{ print $2 }')
# Change as we add more guest OSes with network stacks
_maxtap=2
#
for i in $(seq 0 ${_maxtap}); do
/usr/bin/tunctl -t tap${i} -u adam -g adm
/sbin/ifconfig tap${i} up
done
#
# Now convert eth0 to a bridge and bridge it with the TAP interfaces
/sbin/brctl addbr bridge0
sleep 1
/sbin/brctl addif bridge0 eth0
sleep 1
/sbin/brctl setfd bridge0 0
/sbin/ifconfig eth0 0.0.0.0
/sbin/ifconfig bridge0 $HOSTIP netmask $HOSTNETMASK broadcast
$HOSTBCASTADDR up
# set the default route to the bridge0 interface
/sbin/route add -net 0.0.0.0/0 gw $HOSTDEFAULTGATEWAY
#
# bridge in the tap devices
for i in $(seq 0 ${_maxtap}); do
/sbin/brctl addif bridge0 tap${i}
/sbin/ifconfig tap${i} 0.0.0.0
done
For some reason this seems to work even though that should be group
netdev. I guess because "adam," who is running the emulator, owns the
tun/tap devices.
I have this in /etc/udev/rules.d/99_net_tun.rules:
KERNEL=="tun", GROUP="netdev", MODE="0660", OPTIONS+="static_node=net/tun"
I don't think that's standard; I think I added that at some point.
And then in klt20.ini, I have a statement that looks like:
devdef ni0 564 ni20 ifc=bridge0 ipaddr=192.168.248.249 dedic=false
And then finally the dnpni20 executable is setuid root.
All of this together gives me a TCP/IP stack on klh10 that allows the
emulator to run as me, not as root, and bridges the TOPS-20 host into my
real network.
Adam
More information about the cctech
mailing list