Networking BSD2.11+ installed on RPi4/5 with RPI OS Bookworm from GitHub

111 views
Skip to first unread message

Richard McDonald

unread,
Mar 21, 2025, 1:23:54 AM3/21/25
to [PiDP-11]
I have installed from the GitHub repository.  After much head scratching and reading conversations on this group I have managed to get BSD2.11 networking to work through a NAT interface to my local network using a wired connection.  I can ping google.com & local addresses gleaned from my local DNS, and I can telnet in using the 2323 port at my RPi's IP address.  

I would, however, prefer to have my BSD2.11 OS be a full network citizen with it's own IP address separate from the underlying RPi's IP address.  So bridging in lieu of NATing my connection is desired.  Somehow this functionality was lost when the RPi OS was switched to Bookworm.  BTW I have no need or desire to run on a wireless connection.

Is this an impossible goal given simh on Bookworm?  
Is simh network bridging broken on Bookworm?  
Or have I just not yet found the book of magic incantations?

Cheers,
Rich

terry-...@glaver.org

unread,
Mar 21, 2025, 2:55:06 AM3/21/25
to [PiDP-11]
On Friday, March 21, 2025 at 1:23:54 AM UTC-4 ranc...@gmail.com wrote:
I have installed from the GitHub repository.  After much head scratching and reading conversations on this group I have managed to get BSD2.11 networking to work through a NAT interface to my local network using a wired connection.  I can ping google.com & local addresses gleaned from my local DNS, and I can telnet in using the 2323 port at my RPi's IP address.

Why do you need NAT? It should "just work" out of the box. For example:

(0:249) :~terry# ping -c 1 spc11e-host
PING spc11e-host.example.com (10.20.30.227): 56 data bytes
64 bytes from 10.20.30.227: icmp_seq=0 ttl=64 time=0.134 ms
--- spc11e-host.example.com ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.134/0.134/0.134/0.000 ms

(0:250) ~terry# ping -c 1 spc11e
PING spc11e.example.com (10.20.30.228): 56 data bytes
64 bytes from 10.20.30.228: icmp_seq=0 ttl=255 time=24.320 ms
--- spc11e.example.com ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 24.320/24.320/24.320/0.000 ms

spc11e-host is the Raspberry Pi 5 host, and spc11e is the emulated 
PDP-11/70 running 2BSD.

All I have in my simh .ini for this is:

set xu enabled
; Force MAC address to be unique (at least on LAN) by roughly corresponding
; with the DECnet address
set xu mac=08:00:2b:00:f9:a5
set xu type=delua
attach xu eth0

And the relevant part of my 2BSD /etc/netstart is:

hostname=spc11e
netmask=255.255.255.0
broadcast=10.20.30.255
default=10.20.30.3
localhost=127.0.0.1

and in 2BSD /etc/hosts:

10.20.30.228    spc11e.example.com spc11e

Malcolm Ray

unread,
Mar 21, 2025, 5:14:02 AM3/21/25
to Richard McDonald, [PiDP-11]
I'm using the 211bsd+ image. In boot.ini, I uncommented the tap, and commented out the nat configuration:

attach xu tap:tap-simh1
;attach xu nat:tcp=2121:10.0.2.15:21,tcp=2323:10.0.2.15:23

Then I had to create the tap. I moved the Pi's IP address to a new bridge, and put eth0 and tap-simh1 under that bridge.

All of this is from a root shell, and from the console, so that I don't saw off the branch I'm sitting on:

apt install bridge-utils
nmcli con add ifname br0 type bridge con-name br0
nmcli con add type bridge-slave ifname eth0 master br0
nmcli con modify br0 bridge.stp no
nmcli con down 'Wired connection 1'
nmcli con up br0
nmcli con mod br0 ipv4.addresses 192.168.100.66/24 ipv4.method manual ipv4.gateway 192.168.100.1 ipv4.dns 192.168.100.3 ipv4.dns-search example.com \
    ipv6.addresses 2001:db8:25:2::42/64 ipv6.method manual ipv6.gateway 2001:db8:25:2::2
nmcli con down br0
nmcli con up br0
nmcli con add type tun ifname tap-simh1 mode tap owner 1000 master br0

Obviously you'll need to adjust this to your own IP addresses and domain.

Then, in BSD:

Edit /etc/hosts to adjust BSD's own address.

Edit /etc/netstart:

hostname=211bsd
netmask=255.255.255.0
broadcast=192.168.100.255
default=192.168.100.1
localhost=127.0.0.1

Edit /etc/resolv.conf, to use your actual nameserver:

nameserver 192.168.100.3
nameserver 1.1.1.1

Optionally, edit /etc/ntp.conf to use a nearer time server (I run one on my network).

Reboot BSD.

This did the trick for me.
--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pidp-11/02b00b20-e7e5-4017-a194-b50a398b4017n%40googlegroups.com.

Richard McDonald

unread,
Mar 26, 2025, 1:16:45 PM3/26/25
to [PiDP-11]
Thank you Sheepless for the exact solution to my problem!!!!  You may well wonder why it took so long to reply...Since I have several Pi's running Bookworm, I took the time to create a shell script to implement the solution.  It seems to work on all my RPi 4/5s running Bookworm.

I have shared it in a public repository on GitHub at https://github.com/RanchoHam/createBridge.  Please check it out and post any problems or fixes preferably on the repository Issues tab.

Cheers,
Rich

Reply all
Reply to author
Forward
0 new messages