Anders,

In your bridge configuration - you have a bridge with tap0 connected but you haven’t added the Ethernet adapter in, so it won’t go beyond an internal bridge. 

If you are running your Hecnet machines on the same host, you will need to add each of their tap adapters into the bridge. If you are running physical hardware on the local Ethernet you will need to add the Ethernet adapter (might be eth0 or ens160 or similar) into the bridge. 

Cheers, Wiz!!

Sent from my iPhone

On 16 May 2024, at 7:36 pm, Johnny Billquist <bqt@softjar.se> wrote:

Anders... I can see that KASKAL:: have connection to the rest of HECnet, so your problem is purely an issue with your PyDECnet talking to your KLH10 nodes.

Two questions: Are the KLH10 instances running on the same host as PyDECnet, or do you have multiple actual machines on which these are running?

Also, you create bridge0, which is what PyDECnet is talking to for local ethernet connections. Are your KLH10 machines connected to that same bridge somehow? Otherwise that would obviously be where the problem might be.
Running as root or not... Can't comment on that, as I haven't played with it.

 Johnny

On 2024-05-16 10:18, Anders Andersson wrote:
pydecnet Q.Q.648Uusedto workfor me in the past,and I HAD three instances of KLH10 running TOPS-20, talking to each and other HECnet nodes with no visible problem.
I have sincemovedafewthings around and I'mno longerabletoget the old configuratinstowork.
"Moved around" essentially means updating theufw firewall settings and
adjusted afew system settings such asthe SSH service parameers. When I
moved thestart script forpydecnetI hadto createasymbolic link to keep
thedecnet/applications/mirror.py script accessible (I uncommentedit in
thehopeof gaining some extradiagnostisthat way. But no, my routerKASKAL
is nolonger visible to my KLH10 hosts.
This is the kaskal.conf file(wheremost lines are ommwns):
# Configuration file
circuit tap-0 Ethernet tap:tap0 --console Plugh --random-address
#circuit tap-1 Ethernet pcap:tap0 --console Plugh --random-address
#circuit eth-1 Ethernet pcap:en1
#circuit bridged-1 Ethernet udp:7101:127.0.0.1:7001 --random
#circuit mul-0 Multinet localhost:7000 --latency 47
#circuit mul-1 Multinet localhost:700:connect
#circuit dmc-0 Multinet --mode=connect --remote-address=hecnet-1-1023.stupi.net --remote-port=7700 --cost=3
circuit dmc-0 Multinet --mode=connect --remote-address=hecnet-1-1023.stupi.net --remote-port=7704 --cost=3
#circuit dmc-0 DDCMP tcp:12345:localhost:32154 --cost 3
#circuit dmc-1 DDCMP udp:12345:localhost:32154 --cost 3
#circuit dmc-2 DDCMP serial:/dev/tty.usbserial-FTVSKM26:19200 --t3 120 --qmax 2
#circuit gre-0 GRE localhost
circuit dmc-1 Multinet --mode=listen -4 --local-port=7700 --cost=2
routing 1.808 --type l2router
node 1.808 KASKAL
node @flogsta.dat
node @nodenames.dat
system --ident "Flogsta HECnet router"
# This replaces the default built-in mirror object which is
# implemented as a Python module within PyDECnet by a functionally
# equivalent one that runs as a subprocess.
object --number 25 --name MIRROR --file decnet/applications/mirror.py
### end of kaskal.conf ###
Aftersetting up the virtual network segment usng theseincantations
brctl addbr bridge0
ifconfig bridge0 192.168.9.78 up
ip tuntap add dev tap0 mode tap
ifconfig tap0 up
brctl addif bridge0 tap0
andstarting the KLH10 instances (if they weren't already running)
the following line is run under sudo:
pydecnet -d --uid decnet --gid 137 -e DEBUG -L logs/decnet.log kaskal.conf http.
conf
This sems to be a relevant portion of thelogfile:
2022-08-25 14:25:13.770: MainThread:  command line: /usr/local/bin/pydecnet -d -
-uid decnet --gid 137 -L logs/decnet.log kaskal.conf http.conf
2022-08-25 14:25:15.446: KASKAL: Logging configuration reloaded
2022-08-25 14:25:15.446: KASKAL: Now running as daemon
2022-08-25 14:25:15.446: KASKAL: Running in  as uid 129, gid 137
2022-08-25 14:25:15.447: KASKAL: Error starting datalink TAP-0
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/decnet-1.0.596-py3.8.egg/decnet/d
atalink.py", line 73, in start
    c.open ()
  File "/usr/local/lib/python3.8/dist-packages/decnet-1.0.596-py3.8.egg/decnet/e
thernet.py", line 220, in open
    ioctl (fd, TUNSETIFF, ifr)
PermissionError: [Errno 1] Operation not permitted
2022-08-25 15:11:26.565: MainThread: Starting DECnet/Python DECnet/Python V1.0-5
96
2022-08-25 15:11:26.565: MainThread:  command line: /usr/local/bin/pydecnet -d -
-uid decnet --gid 137 -L logs/decnet.log kaskal.conf http.conf
2022-08-25 15:11:28.185: KASKAL: Logging configuration reloaded
2022-08-25 15:11:28.185: KASKAL: Now running as daemon
2022-08-25 15:11:28.185: KASKAL: Running in  as uid 129, gid 137
Myguess is that ioctl UNSETIFF  on theethernetinterfacerquirsroottosucceed, but
effctive UID is nowprobably 129 (my DECnet pseudou-user. Anychanceof setting
the interface parameters beforetransfering control to UID 129)? I haven'tlooked
hrough thecodeto findout.
Removing the --uid decnet option however lets pydecnet run as root,and now the
error diagnstics re gonefromthelog file,but still I can'treach KSKAL orany
other HECnetnode frommy local machines:
OPR>ENTER (command subset) NCP
NCP>LOOP NODE KASKAL::
NCP>
20:05:32        NCP
                Request # 92 Accepted
20:05:32        NCP
Request # 92; Loop Node Failed, Mirror connect failed
Remote Node = 1.808 (KASKAL)
 Unlooped count = 25701
NCP>EX
$I DEC
 Local DECNET node: RARITY.  Nodes reachable: 3.
 Accessible DECNET nodes are:   FLUSHY  RARITY RBDASH
$
$INFORMATION (ABOUT) DECNET MIM::
%Node MIM is unreachable
$
So, now Ihavetwo problems. My pydecnet runs as root, which shouldn't betoo
muchof an issue untilIstart experimentingwithcustom DECnetserver scripts on
the outer and more importantly,my configuraton is still dysfunctional,as I
have no connectivity to or via the router.
i intendthe HTTP server to beavailableat http://kaskal.pdcs.org:8036/ though
I'mnot sure my setupisstable enough for it to work allthetime,Ihavea ZTE
broadband routerreporting its IP address to dyndns.One of the KLH10 hosts
should bereachable via "ssh rarity@kaskal.pdcs.org" (without apassord) to a
non-logged-in EXEC where atleast theINFORMATION (ABOUT) DECNET command is
availabe, in case anyonewants to see itscurrent status.
I can aaccess it locally however,and NSP Characteristics lists maybe a thousand
nodes in a table.
So,theremaining issuewill likely require me to dig a little deeper in the pydecnet debugging options, any particular feature I could investigate?
Currently, most recent portion of the log file:
2024-05-15 20:13:34.779: KASKAL: Starting node KASKAL
2024-05-15 20:13:34.779: KASKAL: Starting timer subsystem
2024-05-15 20:13:34.779: KASKAL: Starting datalink layer
2024-05-15 20:13:34.779: KASKAL: Ethernet TAP-0 hardware address is 86-fa-6f-77-4b-56
2024-05-15 20:13:34.780: KASKAL: Started datalink TAP-0
2024-05-15 20:13:34.780: KASKAL: Started datalink DMC-0
2024-05-15 20:13:34.780: KASKAL: Started datalink DMC-1
2024-05-15 20:13:34.780: KASKAL: Starting MOP layer
2024-05-15 20:13:34.780: KASKAL: Starting mop for _TapEth TAP-0
2024-05-15 20:13:34.781: KASKAL: Initialized loop handler for TAP-0
2024-05-15 20:13:34.781: KASKAL: Initialized sysid handler for TAP-0
2024-05-15 20:13:34.781: KASKAL: Started MOP circuit TAP-0
2024-05-15 20:13:34.781: KASKAL: Starting Routing layer
2024-05-15 20:13:34.781: KASKAL: Started Routing circuit TAP-0
2024-05-15 20:13:34.781: KASKAL: Started Routing circuit DMC-0
2024-05-15 20:13:34.782: KASKAL: Started Routing circuit DMC-1
2024-05-15 20:13:34.785: KASKAL: Starting NSP
2024-05-15 20:13:34.785: KASKAL: Starting Session Control
2024-05-15 20:13:34.786: https: Starting https server on port 8443
2024-05-15 20:13:34.787: KASKAL: Starting http server on port 8000
2024-05-15 20:13:35.245: KASKAL: L2 attached state changed to True
2024-05-15 20:13:44.820: KASKAL: Designated router on TAP-0 will be self, 5 second delay
2024-05-15 20:13:49.833: KASKAL: Designated router on TAP-0 is self
Yetwhen I try to talk to KASKAL viathat very virtualetenet it hasTAP-0 on:
NCP>
10:01:59     NCP
        Request # 93 Accepted
10:01:59     NCP
Request # 93; Loop Node Failed, Mirror connect failed
Remote Node = 1.808 (KASKAL)
 Unlooped count = 25701
NCP>
Should I use some other server than mirror.py?
_______________________________________________
HECnet mailing list -- hecnet@lists.dfupdate.se
To unsubscribe send an email to hecnet-leave@lists.dfupdate.se

--
Johnny Billquist                  || "I'm on a bus
                                 ||  on a psychedelic trip
email: bqt@softjar.se             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol
_______________________________________________
HECnet mailing list -- hecnet@lists.dfupdate.se
To unsubscribe send an email to hecnet-leave@lists.dfupdate.se