It's still not working. For my latest attempt, I'm using this script to
set up an ethernet bridge:
#!/bin/sh
TAPUSER="dave"
#DEV="enp3s0"
DEV="eth0"
IFCONFIG="/sbin/ifconfig"
ROUTE="/sbin/route"
TUNCTL="/usr/bin/tunctl"
BRCTL="/sbin/brctl"
#HOSTIP=`hostname -I`
HOSTIP=`$IFCONFIG $DEV | gawk -- '/inet/{ print substr($2,1) }' | head -n1`
HOSTNM=`$IFCONFIG $DEV | gawk -- '/inet/{ print substr($4,1) }' | head -n1`
HOSTBR=`$IFCONFIG $DEV | gawk -- '/inet/{ print substr($6,1) }' | head -n1`
HOSTGW=`$ROUTE -n | gawk -- '/^
0.0.0.0/{ print $2 }' | head -n 1`
#
echo "Device: $DEV"
echo "Host Addr: ${HOSTIP}"
echo "Netmask: ${HOSTNM}"
echo "Broadcast: ${HOSTBR}"
echo "Default GW: ${HOSTGW}"
#
#exit
$TUNCTL -t tap0 -u $TAPUSER
#$TUNCTL -t tap1 -u $TAPUSER
#$TUNCTL -t tap2 -u $TAPUSER
$IFCONFIG tap0 up
#$IFCONFIG tap1 up
#$IFCONFIG tap2 up
#
# Now convert eth0 to a bridge and bridge it with the TAP interface
$BRCTL addbr br0
$BRCTL addif br0 $DEV
$BRCTL setfd br0 0
$IFCONFIG $DEV 0.0.0.0
$IFCONFIG br0 $HOSTIP netmask $HOSTNM broadcast $HOSTBR up
# set the default route to the br0 interface
$ROUTE add -net
0.0.0.0/0 gw $HOSTGW
# bridge in the tap device
$BRCTL addif br0 tap0
#$BRCTL addif br0 tap1
#$BRCTL addif br0 tap2
$IFCONFIG tap0 0.0.0.0
#$IFCONFIG tap1 0.0.0.0
#$IFCONFIG tap2 0.0.0.0
echo "nameserver $HOSTGW" >>/etc/resolv.conf
I now have this from ifconfig -a:
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.200 netmask 255.255.255.0 broadcast 10.0.0.255
inet6 fe80::dea6:32ff:fe8d:beb1 prefixlen 64 scopeid 0x20<link>
ether 62:81:39:ef:9c:60 txqueuelen 1000 (Ethernet)
RX packets 6665 bytes 687214 (671.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4392 bytes 616787 (602.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.200 netmask 255.255.255.0 broadcast 10.0.0.255
inet6 fe80::2bd:675c:d87c:eea0 prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:8d:be:b1 txqueuelen 1000 (Ethernet)
RX packets 107392 bytes 18851135 (17.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 17072 bytes 2104538 (2.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 39181290 bytes 3795708610 (3.5 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 39181290 bytes 3795708610 (3.5 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tap0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 62:81:39:ef:9c:60 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tap1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.200 netmask 255.0.0.0 broadcast 10.255.255.255
inet6 fe80::d0d7:b6ff:fe1c:dd45 prefixlen 64 scopeid 0x20<link>
ether d2:d7:b6:1c:dd:45 txqueuelen 1000 (Ethernet)
RX packets 76 bytes 7734 (7.5 KiB)
RX errors 0 dropped 26 overruns 0 frame 0
TX packets 36 bytes 4593 (4.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.125 netmask 255.255.255.0 broadcast 10.0.0.255
inet6 fe80::fcff:d312:9210:7935 prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:8d:be:b2 txqueuelen 1000 (Ethernet)
RX packets 52372 bytes 8347062 (7.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 269 bytes 13736 (13.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
This is the .ini file I'm giving to the kn10-kl executable:
; Define basic device config - one DTE, one disk, one tape
devdef dte0 200 dte master
devdef rh0 540 rh20
devdef rh1 544 rh20
devdef dsk0 rh0.0 rp type=rp07 format=dbd9
devdef mta0 rh1.0 tm03 type=tu45
; Set Ethernet address
devdef ni0 564 ni20 ipaddr=10.0.0.200 ifc=tap0 decnet=false dedic=TRUE
; Define the idle device on 700
devdef idler 700 host
; Set switch register
set sw=254200,,147
; Set console lights I/O base register
;Uncomment the following line if you have a Panda display.
;lights 378
; Load disk bootstrap directly
load boot.sav
; Ready to GO
Now to run it, I've made sure that dpni20 is setuid-root, but when I
start the emulation as a normal user, I get these error messages having
to do with networking:
Run CHECKD? no
DDMP: Started
SIOCSIFADDR: Operation not permitted
SIOCSIFFLAGS: Operation not permitted
SIOCSIFDSTADDR: Operation not permitted
SIOCSIFFLAGS: Operation not permitted
SIOCSIFFLAGS: Operation not permitted
[dpni20: Fatal error: osn_pfinit_tuntap: ifconfig failed to initialize tunnel device? - Success]
[KNILDR: Loading microcode version 1(172) into Ethernet channel 0]
14-Nov-2023 21:05:29 ***BUGCHK KNIINF*** PHYKNI - NIA20 initialization timed out Job: 0, User: OPERATOR, Data: 400007000036
14-Nov-2023 21:05:34 ***BUGCHK IPDWNS*** Datagram was
SYSJOB 7A(88)-4 started at 14-Nov-2023 2105
not sent Job: 0, User: OPERATOR, Data: 36, 2
14-Nov-2023 21:05:34 ***BUGCHK KNIRLF*** PHYKNI - NIA20 Reload Failed Job: 0, User: OPERATOR, Data: 10
Here's what happens if I run it as root:
Run CHECKD? no
DDMP: Started
[dpni20: ifc "tap2" => ether f2:b:a4:54:52:4]
[dpni20: VHOST 10.0.0.200]
[dpni20: Enabled net.ipv4.conf.tap2.arp_accept]
[KNILDR: Loading microcode version 1(172) into Ethernet channel 0]
I believe this is now correct behavior. But the TOPS20 instance is
still not getting access to the network, not even to itself:
@ftp ftp.foo.bar
?No such host - Unknown host name - "ftp.foo.bar"
@ftp 123.123.123.123
?No such host - Unknown host name - "123.123.123.123"
@ftp 10.0.0.200
--
David Griffith
da...@661.org