Jeremy Begg schreef op 13-11-2017 om 14:16:
Hi Wilm,

Thanks for the clarification :-)
I had already worked out the changes to the commands to get the IP setup, but it appears under “stretch” the set of commands in your note are not quite right.
(I realise your example closely matches the SIMH documentation.)

HOWEVER, I am pleased to report success!

I was reading the blog at https://mansfield-devine.com/speculatrix/2016/03/networking-vax-openvms-on-simh-the-raspberry-pi/ and he produces much the same configuration, with one very important difference: in his system, the tap0 interface is assigned an IP address (in addition to br0).  As soon as I did that, it started working!

Perhaps this is specific to raspbian “stretch”?  I notice from several discussion forums that many people are not happy with the networking changes made in this release.

Anyway, thanks for your time.

Regards,

Jeremy Begg


On 13 Nov 2017, at 11:13 PM, Wilm Boerhout <wboerh...@gmail.com <mailto:wboerh...@gmail.com>> wrote:

Jeremy Begg schreef op 13-11-2017 om 13:38:
Hi Wilm,

Thank you for the prompt reply.

On 13 Nov 2017, at 9:43 PM, Wilm Boerhout<wboerh...@gmail.com>  wrote:

Jeremy Begg schreef op 13-11-2017 om 11:03:
Hi,

I am trying to get SIMH up and running on the ethernet interface of a
Raspberry Pi 3.  I have followed the intructions in 0readme_ethernet.txt,
installing the libpcap-dev, bridge-utils and uml-utilities packages before
building SIMH itself.  I just ran 'make vax' and let it go, and the build to
completion.

[snip]

My TUN/TAP and bridge are set up in /etc/rc.local in Raspbian (jessie & 
stretch), as follows:
Are you sure this applies to the machine running the “stretch” release?
The ‘ifconfig’ command on that system (well, on mine, anyway!) doesn’t display 
“inet addr” anywhere in its output, it just has “inet”.
So the various grep commands in your example don’t work.

Thanks

        Jeremy Begg
Oops, my bad. I did not realize that this Pi is the one remaining that still runs jessie. I hate to convert because it doubles as my OpenVPN server.

Anyway, for stretch, the setup is the same, aprt from:

# get current IP params
HOSTIP=`ifconfig $IFACE | grep "inet " | gawk -- '{ print $2 }'`
HOSTNM=`ifconfig $IFACE | grep "inet " | gawk -- '{ print $4 }'`
HOSTBC=`ifconfig $IFACE | grep "inet " | gawk -- '{ print $6 }'`
HOSTGW=`route -n | grep ^0.0.0.0 | gawk -- '{ print $2 }'`

/Wilm

Attached (hopefully is my entire /etc/rc.local for a strechth Pi. This works for me.

Mind you, rc.lcal is not executed until way after the eth0 interface hget an IP address assigned. In my case, it's a static address.

And IPV6 is disabled on all my Pi nodes, I have no use for it in my LAN.

The IP address on the TAP interface is only assigned by the VMS stack, not on the Raspbian host.

I found the networking changes in stretch minimal when compared to jessie. (apart from the persistent interface naming that was quickly withdrawn). This entire setup worked much the same on jessie, apart from some minor changes in ifconfig output :-


/Wilm

# This script is executed at the end of each multiuser runlevel.
# -strectch raspi2-

exec 2> /var/log/rc.local.log   # stderr to logfile
exec 1>&2                       # stdout as well
#set -x                         # set verify :-)

echo "----- /etc/rc.local -----"
date
uptime
echo "_________________________"

# make bridge and add tun/tap
INTERF="eth0"
MACADDR="08:00:2B:02:02:02"

# get current IP params
HOSTIP=`ifconfig $INTERF | grep "inet " | gawk -- '{ print $2 }'`
HOSTNM=`ifconfig $INTERF | grep "inet " | gawk -- '{ print $4 }'`
HOSTBC=`ifconfig $INTERF | grep "inet " | gawk -- '{ print $6 }'`
HOSTGW=`route -n | grep ^0.0.0.0 | gawk -- '{ print $2 }'`

echo Bridging interface $INTERF ...
echo "IPaddr:    $HOSTIP"
echo "Netmask:   $HOSTNM"
echo "Broadcast: $HOSTBC"
echo "Gateway:   $HOSTGW"

# Make tun/tap and bridge to interface
tunctl -t tap0 -u root
ifconfig tap0 up

# Now convert to a bridge and bridge it with the TAP interface
brctl addbr br0
brctl addif br0 $INTERF
brctl setfd br0 0
ifconfig $INTERF 0.0.0.0

# fix bridge MACaddress
ifconfig br0 hw ether $MACADDR

# start bridge
ifconfig br0 $HOSTIP netmask $HOSTNM broadcast $HOSTBC 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
ifconfig tap0 0.0.0.0

# load kernel variables from /etc/sysctl.d 
(https://wiki.debian.org/BridgeNetworkConnections)
/etc/init.d/procps restart

# Start a VAX, Big Mama VAXcluster member
screen -admOL -S vaxclus -t PIVAX1-VS3900 -h 4096 /opt/simh-master/BIN/vax 
/opt/simh-master/VS3900.ini

# wait for NAS...
until [ -e /mnt/nas/pi ]
do
 sleep 1
done

# backup essential files
/mnt/nas/pi/bkup.sh

# report Kernel version
touch "/mnt/nas/pi/$(uname -n)/Kernel version $(uname -r)"

exit 0
_______________________________________________
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to