Groups | Search | Server Info | Login | Register


Groups > alt.sys.pdp10 > #9764

Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX

From jayjwa <jayjwa@atr2.ath.cx.invalid>
Newsgroups alt.sys.pdp10
Subject Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX
Date 2025-10-26 14:51 -0400
Organization Atr2 RG 2025
Message-ID <87bjltts2w.fsf@atr2.ath.cx> (permalink)
References <10dfvld$2k7ba$1@dont-email.me> <87frb7g9po.fsf@atr2.ath.cx> <597cce07-dc9b-4f7b-b39c-3bd6d97049e7@gmail.com>

Show all headers | View raw


David Todd <HDTodd@gmail.com> writes:

> Second, my apologies.  Despite having spent several days looking for
> solutions, I did not see your posting on the github klh10 site.  I
> don't know that I'd have resolved the problem, but I'd have known that
> what I was seeing wasn't unique.
SIMH's simh_ether.c has an example of how to use a tap without having to
manually put it in but KLH10 uses a different method.  

> Finally, yes, I think it would help for me to see your script if
> you're willing to share it.
#!/bin/zsh
##
## $Header: /root/sys-maint/RCS/rc.bridge-vlan-setup,v 1.3 2024/11/13 19:52:59 root Exp $
##
## $Log: rc.bridge-vlan-setup,v $
## Revision 1.3  2024/11/13 19:52:59  root
## Add macvlan to attach PyDECNET since both it and Linux DECnet can't
## attach to the same interface.
##
## Revision 1.2  2023/06/28 16:43:18  root
## Increase number of TUNTAP devices. Add selectable methods of routing
## DECNET.
##
## Revision 1.1  2023/01/04 21:26:04  root
## Initial revision
##
## --------------------------------------------------------------------
## A script to set up a bridge and TUNTAP interfaces for use with
## SIMH simulator. Taps 0-4 (5 total) will be set up, and
## master set to the bridge. The bridge lladdr will be set to 
## DECNET equal of node 1.1 for use with DECNET. Other devices, such as
## a wireless access point, can be later added to this bridge as needed.
##
## Assumes: There is no br0 created currently. Iproute2 installed. $PATH
## set to sane value. Root user able to make devices running script.
## Kernel will load bridge module on its own, if needed.
##


## [Sanity check, to make sure there's not already a bridge.] ----------

# Color codes for fancy output.
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m'

if $(ip link show | grep -q br0); then
	printf "${RED}Not making another br0, one already exists.${NC}\\n"
	exit 1
fi


## [Link creation/setup section] ----------------------------------------
# The ip4 address you want the bridge to have. We will place
# hosts on 192.168.c.d.
bridge_addr="192.168.20.1"

# A function to make a TUNTAP device and assign it to the br0 interface
function make_set_tuntap() {
	printf "${BLUE}Adding TUNTAP %s to bridge.${NC}\\n" "${1}"
	# Create the device
	ip -c tuntap add dev tap${1} mode tap
	# Stuff it into the bridge
	ip -c link set dev tap${1} master br0
	# Set it up. Note, it will still show "down" until used
	ip -c link set tap${1} up
}

# First, make the bridge, then turn on spanning tree protocol,
# set the lladdr for DECNET node 1.1. This is in case you want
# to (try to - code broke between 3.x-4.x kernels) use Linux 
# DECENT. Node 1.1 can be the Linux executor.
printf "${GREEN}Making the bridge, br0.${NC} \\n"
ip -c link add name br0 type bridge
ip -c link set br0 type bridge stp_state 1
ip -c link set dev br0 address AA:00:04:00:01:04
ip -c link set br0 up
ip -c addr add ${bridge_addr}/24 broadcast + dev br0

# Error out if something went wrong and no br0. Exit script.
$(ip link show | grep -q br0) || {
       printf "${RED}Bridge not created. Cannot continue.${NC}\\n"
       exit 1
}

# Make and add TUNTAPs to the brige. You can change this number for 
# more (or less) devices. Ex: seq 0 7 for six taps.
printf "${GREEN}Setting up the TUNTAPs now...${NC} \\n"
for taps in $( seq 0 10 ); do
	make_set_tuntap ${taps}
done

## DECNET routing. Pick a method of routing DECNET, PyDECNET or
## bridge.c. Comment out if not using.
# Use PyDECNET router. PyDECNET and Linux DECnet can't both
# attach to the same interface, and attaching to eth0 causes the
# lladdr to change so hang a macvlan off it then use that. 
ip -c link add name macvlan0 link eth0 type macvlan
ip -c link set dev macvlan0 address AA:00:04:00:02:04
ip -c link set macvlan0 up
/etc/pydecnet/start_router.zsh

# Use Johnny Billquist bridge (Italian update/version)
#decnet-bridge -d -l /var/log/decnet-bridge.log -u nobody && printf "${GREEN}DECNET bridge program running...${NC} \\n"

# Add LinuxDECNET, LAT support
/etc/rc.d/rc.decnet start
/etc/rc.d/rc.latd start

# Show links/addresses.
ip -c addr show

printf "\\n${GREEN}Done.${NC}\\n"

## [SIMH .ini file configuration tips] ------------------------------------
# SIMH .ini file part for a microvax3900 might go like so, attached to
# tap3, node 1.13.
#
#  SET XQ MAC=AA:00:04:00:0D:04
#  SET XQ TYPE=DELQA
#  ATT XQ tap:tap3

# Decnet MAC addresses are tied to node address.
#	AA:00:04:00:01:04 = 1.1
#	AA:00:04:00:0A:04 = 1.10
#	AA:00:04:00:0B:04 = 1.11
#	AA:00:04:00:0C:04 = 1.12
#	AA:00:04:00:0D:04 = 1.13
#	AA:00:04:00:0E:04 = 1.14


## [VMS Routing tips] ------------------------------------------------------
# In VMS, set 192.168.20.1 (the bridge ip4 address) as static gateway. Set
# static ip4 address for VMS node. On Linux host, forward traffic for interfaces:
#  net.ipv4.conf.all.forwarding = 1
# Masquerade all private address space traffic:
#  iptables -t nat -A POSTROUTING -m comment --comment "Masquerade all rfc1918 addresses" -s 192.168.0.0/16 -j MASQUERADE
# In VMS, add name servers, and assign host addresses. Match tcpip host name and node name for
# simplicity (6 character limit to DECNET node names).
#  TCPIP> SET NAME_SERVICE /SERVER=208.67.222.222 /enable /system
#  TCPIP> set host teostr /address=192.168.20.2 /alias=teostr.lan
#  TCPIP> set host lunast /address=192.168.20.3 /alias=lunast.lan

## EOF

>     $ telnet pi-0w
>     Trying 192.168.1.79...
>     telnet: Unable to connect to remote host: Connection refused
>     Name (pi-0:hdtodd):
Right, it won't work unless you are running telnet under Linux.

>     Run FTPSER.EXE on the dec20 and try to
I think this is started by the startup scripts under TOPS-20 out of the
box? If so, you don't have to rerun it.

>     FTP from Panda host to dec20 gets
>     $ ftp dec20
>     Connected to dec20.
>     220 (vsFTPd 3.0.5)
>     Name (dec20:hdtodd):
>
> THIS IS THE PI-0 HOST RESPONDING!  NOT SURPRISING THAT TELNET
> DIDN'T WORK AS APPARENTLY 192.168.1.60 ACTUALLY
> GOES TO 192.168.1.79.
I think I know why this is...

> So telnet on the dec20 is working.
$tstats
JCN       STATE       LPORT  FPORT  FGN-HOST    R-SEQUENCE  S-SEQUENCE  SENDW
5,2   FIN.FIN.--P-V--    37      0  0,0,0,0              0           0      0
5,5   FIN.FIN.--P-V--    79      0  0,0,0,0              0           0      0
6,1   FIN.FIN.--P----    25      0  0,0,0,0              0           0      0
0,1   FIN.FIN.--P-V--    23      0  0,0,0,0              0           0      0
5,1   FIN.FIN.--P-V--    21      0  0,0,0,0              0           0      0
5,3   FIN.FIN.--P-V--    19      0  0,0,0,0              0           0      0
5,4   FIN.FIN.--P-V--    13      0  0,0,0,0              0           0      0
8,1   FIN.FIN.--P----   143      0  0,0,0,0              0           0
0

can show what's serving.

> The networking configuration on Pi-0 *looks* correct.  br0
> has the IP address of the dec20 virtual machine, and its
> MAC address is the same as eth0.
br0 should have Linux's internal IP address and no interfaces should
share a MAC address.

The route for it:
ip -c route show dev br0
192.168.20.0/24 proto kernel scope link src 192.168.20.1

> tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>         inet 192.168.1.79  netmask 255.255.255.0  broadcast 192.168.1.255
>         inet6 fe80::38ff:5eff:fedc:20f7  prefixlen 64  scopeid 0x20<link>
>         ether 3a:ff:5e:dc:20:f7  txqueuelen 1000  (Ethernet)
>         RX packets 46  bytes 5113 (4.9 KiB)
>         RX errors 0  dropped 17  overruns 0  frame 0
>         TX packets 101  bytes 8164 (7.9 KiB)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
You're using ifconfig instead of iproute2, so it's not clear if tap0 is
actually *in* the bridge. It will show with iproute2 (the master bit):
ip -c link show tap11
18: tap11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 7a:f6:3d:53:f8:be brd ff:ff:ff:ff:ff:ff
    
In ifconfig syntax (evidently my ifconfig is a different flavor from
yours):
ifconfig tap11
tap11     Link encap:Ethernet  HWaddr 7A:F6:3D:53:F8:BE
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9168 errors:0 dropped:0 overruns:0 frame:0
          TX packets:156426 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:979901  TX bytes:21997483

Note there are no IP addresses on taps under bridges. That's probably
why you got network weirdness. The address you pasted on the tap should
only show from instead TOPS-20.

$info interNET 
 Network atr2net host name is amatsu.lan
 Network interface type is IPNI, Internet address is 192.168.20.8
 Network interface is up, output is enabled
 Network service is enabled
 Last network interface up transition: 25-Oct-2025 22:19:56
 
To recap, in my setup, Linux is 192.168.20.1, no IP addresses on taps, and
TOPS-20 is 192.168.20.8.

> The resolv.config file probably isn't the issue for what I'm seeing,
> but it looks correct, too:
>     $cat resolv.config
>     ; Default (safety belt) nameservers.  These are contacted when we
>     ; are completely unable to figure out who ask a particular query.
>     DSERVE	192.168.1.1
>     DSERVE	8.8.8.8
Assuming 192.168.1.1 is your DNS server, I don't see an issue here.

-- 
PGP Key ID: 781C A3E2 C6ED 70A6 B356  7AF5 B510 542E D460 5CAE
       "The Internet should always be the Wild West!"

Back to alt.sys.pdp10 | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX David Todd <HDTodd@gmail.com> - 2025-10-24 09:40 -0400
  Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX jayjwa <jayjwa@atr2.ath.cx.invalid> - 2025-10-24 19:29 -0400
    Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX David Todd <HDTodd@gmail.com> - 2025-10-25 18:53 -0400
      Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-26 03:50 +0000
        Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX David Todd <HDTodd@gmail.com> - 2025-10-26 07:10 -0400
          Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-26 21:16 +0000
            Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX David Todd <HDTodd@gmail.com> - 2025-10-27 15:18 -0400
      Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX jayjwa <jayjwa@atr2.ath.cx.invalid> - 2025-10-26 14:51 -0400
    Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX David Todd <HDTodd@gmail.com> - 2025-10-28 18:13 -0400
      Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX jayjwa <jayjwa@atr2.ath.cx.invalid> - 2025-10-29 13:14 -0400
        Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-29 23:51 +0000
        Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX David Todd <HDTodd@gmail.com> - 2025-10-30 08:59 -0400
          Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX jayjwa <jayjwa@atr2.ath.cx.invalid> - 2025-10-30 13:51 -0400
      Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX scott@slp53.sl.home (Scott Lurndal) - 2025-10-29 17:24 +0000
        Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX David Todd <HDTodd@gmail.com> - 2025-10-30 09:04 -0400
        Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX jayjwa <jayjwa@atr2.ath.cx.invalid> - 2025-10-30 12:43 -0400
          Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX scott@slp53.sl.home (Scott Lurndal) - 2025-10-30 17:36 +0000
            Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX David Todd <HDTodd@gmail.com> - 2025-11-07 13:30 -0500
              Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX scott@slp53.sl.home (Scott Lurndal) - 2025-11-07 21:48 +0000
              Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX jayjwa <jayjwa@atr2.ath.cx.invalid> - 2025-11-07 17:21 -0500
                Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX David Todd <HDTodd@gmail.com> - 2025-11-08 05:55 -0500
                Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX Lars Brinkhoff <lars.spam@nocrew.org> - 2025-11-08 17:16 +0000
                Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX David Todd <HDTodd@gmail.com> - 2025-11-08 15:33 -0500
                Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX jayjwa <jayjwa@atr2.ath.cx.invalid> - 2025-11-09 17:45 -0500
                Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX Rich Alderson <news@alderson.users.panix.com> - 2025-11-08 20:42 -0500
                Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX jayjwa <jayjwa@atr2.ath.cx.invalid> - 2025-11-08 14:57 -0500
                Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX David Todd <HDTodd@gmail.com> - 2025-11-08 15:37 -0500
                Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX Rich Alderson <news@alderson.users.panix.com> - 2025-11-08 20:47 -0500
                Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX jayjwa <jayjwa@atr2.ath.cx.invalid> - 2025-11-09 17:58 -0500
                Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX Rich Alderson <news@alderson.users.panix.com> - 2025-11-09 21:00 -0500
          Re: ?TCPIP TOPS-20 <--> Raspberry Pi or Mac OSX David Todd <HDTodd@gmail.com> - 2025-11-01 14:05 -0400

csiph-web