Netrom Tutorial (n2nov)

Charles N2NOV has written a fantastic document with a clear explanation about netrom quality`s and parameters.

Setting NetRom Parameters
I was looking at the old NEDA (NorthEast Digital Association) newsletters from twenty years ago (1999) and want to show you some pertinent NetRom parameters that might help with the bloated (some up to 800) nodes lists that we see from time to time. These started as X1J parameters, but you might find them useful to give you an idea how to tweak your BPQ, Xrouter, *NOS, Flex, etc systems. Each program might use a different naming convention, but reading the details of your documentation will align to NEDA labels. As always, adjustments can be made for a non-standard configurations like full duplex data repeaters, etc. Feel free to discuss the technical points here, but gear the explanation for the newer sysops. The parameters are broken down differently by the type of connection you have with another station (mostly RF-based). Adaption to an AXIP link via wired internet should follow the Dedicated Point-to-Point Link (DPPL).

USER PORT (typical 2 meter port):
No node table is broadcast to keep the channel clear. Do this by setting Initial (Default) Obsolescence at 5 and the Minimum Obsolescence to 6. Since the default is lower than the cutoff, it will never broadcast. 

DPPL (only two backbone users on a dedicated frequency) [or AXIP]:
Your partner station should be a locked route with quality of 203.
Accept incoming nodes from your partner with minimum quality of 63. 
Initial (Default) Obsolescence at Minimum Obsolescence to 3
Nodes Broadcast Interval 900 seconds (15 minutes)
The obsolescence count will start at 5 and decrement by 1 every 15 minute cycle and stop when it hits 3 if there is no refresh from your partner station. This keeps things clean and updated within 30 minutes.

Multiway Backbone with 3 Partners (typically 220 Mhz regional channel):
Your partner station should be a locked route with quality of 203.
Accept incoming nodes from your partner with minimum quality of 63.
Initial (Default) Obsolescence at 5
Minimum Obsolescence to 2
Nodes Broadcast Interval 900 seconds (15 minutes)
The obsolescence count will start at 5 and decrement by 1 every 15 minute cycle and stop when it hits 2 if there is no refresh from your partner station. This keeps things clean and updated within 45 minutes. This allows for occasional transmitter collisions between partners.
NOTE: current practice is to set minimum quality values at 150 or 180 is only to mitigate the effect of mislabeled nodes qualities broadcast to partner systems that get propagated. There are several systems that make all of the nodes in their table higher than they should be. When the network is cleaned out and realigned, then the minimum quality can be adjusted downward.
How are node qualities adjusted when the nodes table is passed around the network from partner to partner?

*** ONLY WHAT IS ON YOUR PHYSICAL BOX OR WIRED LAN SHOULD BE HIGHER THAN 203 ***
Initial partner default quality is  203 (out of 256)  or 203/256
First hop between AXIP partners is  203/256 * 203/256 or 161/256
Second hop between AXIP partners is 161/256 * 203/256 or 128/256
Third hop between AXIP partners is  128/256 * 203/256 or 101/256
Fourth hop between AXIP partners is 101/256 * 203/256 or 80/256
Fifth hop between AXIP partners is  80/256  * 203/256 or 63/256

Let's look at how various stations relate to each other on the NetRom nodes list. First, each station sets their partners at a default value of 203 if on AXIP or DPPL. This is only the value between the two stations talking to each other. Here are some of my forwarding partners and some of their other partners.

Second, let's look at how those next-line stations actually calculate to my station. If my partner is 203/256 (or about 80% reliability) and so is their partner, then the second-level station is not going to be 80% reliability to me. BBGATE:AA6HF-4 is 80% to me on a direct connection, but has to be less when going through LAXNET:N6ROE-3.

By doing the calculation of each level's reliability of 203/256 against the next level,
we get 203/256 x 203/256 (same as 0.79296875 x 0.79296875) or 161/256 (0.628799438476).

If we extend this exercise by multiplying against the next level of 203/256 we get:

Going down level by level we get values of 128 (X), 101 (Y), 80 (Z), etc.
By setting MIN QUALITY you can cut off how many levels (hops) you want to see.
MIN QUAL 161 lets me see all stations closer to me above the level that X is on.
MIN QUAL 128 allows me to see down to the level of X.
MIN QUAL 101 allows me to see down to the level of Y.
MIN QUAL 80  allows me to see down to the level of Z.

NetRom Qualities

One of the things that appears to have puzzled Node ops for decades is understanding of NetRom Qualities. A PDF from NEDA(1) drafted in 1994 shows NetRom calculations based off of years of bench testing various settings for diode matrix based TheNet and X1J-4 nodes. While we’ve migrated off Diode Matrix configurations in favor of PC controlled ones we need to make adjustments due to the pounded/hidden backbone link nodes that aren’t in use via axip/axudp linkage.

First lets understand that in the NEDA found quality table anything over a quality of 203 for neighbor links is a statement that the linked node resides physically on your lan. As found by NEDA 228 is a good link for lan based nodes as it will propagate quality to the next hop as 203.

Here BAUNOD links to RSBYPI and it’s link quality is set to 203:

RSBYPI:N1URO-2} Connected to BAUNOD:ZL2BAU-3
r
BAUNOD:ZL2BAU-3} Routes:
Link Intface Callsign  Qual Nodes Lock  QSO
—- ——- ——— —- —– —-  —
>    ax0     N1URO-2    203    50         1

BBSURO is a neighbor node to RSBYPI 2 hops away thus it should appear with a derated quality of 181 on BAUNOD:

n bbsuro
BAUNOD:ZL2BAU-3} Routes to: BBSURO:N1URO-4
Which Qual Obs Intface Neighbour
—– —- — ——- ———
>      181   6 ax0     N1URO-2
162   6 ax0     SV1CMG-4

Now let’s visit a node 3 hops away which should appear with a quality of

161:

n mfnos
BAUNOD:ZL2BAU-3} Routes to: MFNOS:N1URO-14
Which Qual Obs Intface Neighbour
—– —- — ——- ———
>      198   6 ax0     SP2L-14
193   6 ax0     SV1CMG-4
161   6 ax0     N1URO-2

Yes it is there but as a tertiary route! This is how and why netrom brakes. It’s not the protocol, it’s the sysops. 198 and 193 are a higher quality and suggests something very wrong. It should appear with a
quality of 181 via SP2L-14 however even if that were true it’d be a secondary path which is false in nature. Let’s look at the other two

paths…
First:

MFNOS:N1URO-14        usa    250 6/B    5 0     0         0 %

2LJNOS:SP2L-14 Area: n1uro

While neighbors, link quality of 250 suggests Poland is handing out N1 calls now since the claim is MFNOS physically is on a lan in Poland. The quality shown at BAUNOD should be shown at 181 since it’s 2 hops via SP2L, and SP2L should show 203. The fact that it’s the primary path is correct being 2 hops vs 3 but it’s quality is being falsely raised due to the link quality of 250 used by SP2L. Think about it this way, if the true host is sending OBS (nodes) broadcasts at a quality of 203, how could it logically be possible to be a higher quality elsewhere?

Let’s look at the secondary route:

r
LAMURO:SV1CMG-4} Routes:
Link Intface Callsign  Qual Nodes Lock  QSO
—- ——- ——— —- —– —-  —
>    axudp   GB7COW-5   255   168         0
jnos    SV1CMG-6   255   781         0
>    axip    ZL2BAU-3   255    83         1
>    radio1  SV1HCC-14  255   154         1
>    bpq     SV1CMG-7   255   500         0
axudp   NA7KR-5    255     3         0
>    xnet    SV1CMG-3   255   162         0
axip    SV1UY-12   255     6         0
>    axip    OK2PEN-5   255     3         0
axip    SV1DZI-11  255    62         0
>    tnos    SV1CMG-14  255   187         0
>    axudp   PI1LAP-5   255    34         0
>    fbb     SV1CMG-3    10     0         0

This I don’t at all understand. It appears Greece now is handing out calls from all over the globe since quality is 255! So now the question is, how does a node (MFNOS) which doesn’t link to LAMURO show a priority path to BAUNOD via LAMURO? This is known as hijacking routes. If SP2L was configured for 203, ZL2BAU would then receive MFNOS at a quality LOWER than the 193 received by SV1CMG-4 -= WHICH DOESN’T HAVE A LINK TO MFNOS!!=- so hopefully now you can see how NetRom paths get hijacked.

Since axip/axudp links don’t use backbone/#alias nodes for internlinking, they’re direct, we then adjust our minqual to reflect such so that we avoid:

– hijacking paths
– spew nodes that are not connectable due to excessive hops

To accomplish this via vanilla NetRom (NOT INP3      / Xnet) the following has been tested to be quite valid for nrbroadcast:

min_obs: 4
def_qual: 203
worst_qual 128
verbose 1

If you have a neighbor with X-net based links then set your verbose on all your interfaces to 0 and worst_qual to 202, or if you have a neighbor on the same link interface running link qualities NOT equal to the same mathematical calculations set your verbose to 0 AND raise your worst_qual to 202 to reject falsely raised qualities from infesting your nodes tables.

*Keep in mind this as well; a user on HF (aka: 300 baud) is most likely going to time out off of your node if you have more than a screen worth of CONNECTABLE nodes… and having a nodes table of truly connectable nodes will bring credibility to your system and those end users you may get to visit will appreciate the integrity of your network.

I’ve had some netrom based queries lately so I hope this answers questions others have had. When the protocol is treated properly by sysops it’s not a bad dynamic routing protocol but when the humans abuse it… then it becomes troublesome.

(1) http://n1uro.ampr.org/neda/neda_annual_v005_1994.pdf

Brian n1uro

ax25 start file

Ax25 start file die ik gebruik voor pi1lap/pi8lap/pd2lt
(nog toe te voegen start/stop/status)

#!/bin/sh
# Start AX25/Netrom networking daemons.
# Script written and modified by Niels pd2lt
# Date of last modification: 03-11-2017

### BEGIN INIT INFO
# Provides:       ax25
# Required-Start: $network $remote_fs $syslog
# Required-Stop:  $network $remote_fs $syslog
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description:    AX25 server
### END INIT INFO

set +e   # Don't exit on error status

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/xnet:/usr/local/etc/ax25

DESC="AX25 server"

ENABLED=1

        modprobe mkiss
        modprobe ax25
        modprobe netrom
        modprobe rose


        # Dual port TNC KPC-9612
        mkiss -s 9600 -x 2 /dev/ttyUSB0 > /tmp/unix98
        export PTS0=`more /tmp/unix98 | grep -w /dev | cut -b -11`
        export PTS1=`more /tmp/unix98 | grep -w /dev | cut -b 12-`
        sleep 1
        # Port 1k2 144.850Mhz
        kissattach $PTS0 ax0 > /tmp/ax25-config.tmp
        awk '/device/ { print $7 }' /tmp/ax25-config.tmp > /tmp/ax25-config-tmp
        read Device < /tmp/ax25-config-tmp

        ifconfig $Device 44.137.31.73 netmask 255.255.255.224
        sleep 2
        # Port 9k6 430.950Mhz
        kissattach $PTS1 ax1 > /tmp/ax25-config.tmp
        awk '/device/ { print $7 }' /tmp/ax25-config.tmp > /tmp/ax25-config-tmp
        read Device < /tmp/ax25-config-tmp

        ifconfig $Device 44.137.31.73 netmask 255.255.255.224
        sleep 5

        # attach rose port
        rsattach rose0
        ifconfig rose0 44.137.31.73 netmask 255.255.255.224
        rsparms -call PI1LAP-10

        # link local pi8lap (xnet)
        tmpfile="/tmp/$$.startax2.pts"
        kissnetd -p 2 > "$tmpfile" &
        sleep 2
        attachthem () {
                read PTS1 PTS2
                kissattach -l $PTS1 ax2 44.137.31.73
                ifconfig ax2 44.137.31.73 netmask 255.255.255.224 up
                sleep 1
                sed -i "s,attach sdev3 kiss 3 1 19200 /dev/.*$,attach sdev3 kiss 3 1 19200 $PTS2," /usr/local/xnet/AUTOBOOT.NET
        }

        tail -n 1 $tmpfile | attachthem
        rm $tmpfile
        sleep 3

        # Link local pi1lap-4 (xnet)
        tmpfile="/tmp/$$.startax3.pts"
        kissnetd -p 2 > "$tmpfile" &
        sleep 2
        attachthem () {
                read PTS1 PTS2
                kissattach -l $PTS1 ax3 44.137.31.73
                ifconfig ax3 44.137.31.73 netmask 255.255.255.224 up
                sleep 1
                sed -i "s,attach sdev4 kiss 4 1 19200 /dev/.*$,attach sdev4 kiss 4 1 19200 $PTS2," /usr/local/xnet/AUTOBOOT.NET
        }

        tail -n 1 $tmpfile | attachthem
        rm $tmpfile
        sleep 3

        # create slip link Linux <-> Xnet
        socat -d -d -ly PTY,link=/dev/ttyq1 PTY,link=/dev/ptyq1 &
        sleep 2
                slattach -s 38400 -p slip /dev/ptyq1 &
                sleep 1
                ifconfig sl0 44.137.31.69 netmask 255.255.255.255 pointopoint 44.137.31.70 mtu 236 up
                sleep 1

        # create axudp device
        socat -d -d -ly PTY,link=/dev/ttyq2 PTY,link=/dev/ptyq2 &
        sleep 2
                kissattach -m 256 /dev/ptyq2 ax4 44.137.31.73
                ax25udp -c /etc/ax25/ax25ipd-10093.conf > /tmp/axudp
                ifconfig ax4 44.137.31.73 netmask 255.255.255.224 up
        sleep 1

        # create axip device
        socat -d -d -ly PTY,link=/dev/ttyq3 PTY,link=/dev/ptyq3 &
        sleep 2
                kissattach -m 256 /dev/ptyq3 ax5 44.137.31.73
                ax25ipd -c /etc/ax25/ax25ipd-axip.conf > /tmp/axip
                ifconfig ax5 44.137.31.73 netmask 255.255.255.224 up
        sleep 1

        # create socat device (jnos-uro)
        socat -d -d -ly PTY,link=/dev/ttyq4 PTY,link=/dev/ptyq4 &
        sleep 2
                kissattach -m 256 /dev/ptyq4 ax6 44.137.31.73
                ifconfig ax6 44.137.31.73 netmask 255.255.255.224 up
        sleep 1

        # MFnos running in DOSEmu
        # Set the comport in de file /etc/dosemu/dosemu.comf $_com1 = "dev/ttyq5"
        #socat -d -d -ly PTY,link=/dev/ttyq5 PTY,link=/dev/ptyq5 &
        #       slattach -n -q -p slip -s 38400 /dev/ptyq5 &
        #sleep 2
        # KISS inteface for MFnos / slip
        #       kissattach /dev/ptyq5 ax6 44.137.31.73
        #       kissparms -p ax6 -c 1 -f y -t 10 -s 100 -r 255
        #       axparms -setcall ax6 pi1lap-10
        #
        #       ifconfig ax3 44.88.0.9 netmask 255.255.255.224 up
        #sleep 2

        # create nr0 device (lapuro/pi1lap-5) uronode
                ifconfig nr0 down
                nrattach -i 44.137.31.73 -m 512 nr0
                ifconfig nr0 44.137.31.73 netmask 255.255.255.224 hw netrom PI1LAP-5 up

        # create nr1 device (lapbbs/pi8lap) f6fbb
                ifconfig nr1 down
                nrattach -i 44.137.31.73 -m 512 nr1
                ifconfig nr1 44.137.31.73 netmask 255.255.255.224 hw netrom PI8LAP up

        # create nr2 device (lapdx/pi1lap-4) dxspider
                ifconfig nr2 down
                nrattach -i 44.137.31.73 -m 512 nr2
                ifconfig nr2 44.137.31.73 netmask 255.255.255.224 hw netrom PI1LAP-4 up

        # create nr3 device (lappac/pi1lap-7) fpac
                ifconfig nr3 down
                nrattach -i 44.137.31.73 -m 512 nr3
                ifconfig nr3 44.137.31.73 netmask 255.255.255.224 hw netrom PI1LAP-7 up

        # start xnet
        cd /usr/local/xnet
        rm *.CFG &> /dev/null
        sleep 2
        ./linuxnet < /dev/tty2 > /dev/tty2 2>&1 &
        ./rstatrxd /var/www/cgi-bin/postat/ &> /dev/null &
        sleep 2

        # route
        # Xnet route
        ip route add 44.137.31.70 dev sl0 table 44 src 44.137.31.69
        # Mfnos route to 192.168.1.110
        #route add 44.137.31.75 gw 192.168.1.112

        # beacons
        beacon -c PI1LAP-15 -t 10 -d  ID ax0 "Network node PI1LAP-15 Zeeland, JO11VN" &
        beacon -c PI1LAP-15 -t 10 -d  ID ax1 "Network node PI1LAP-15 Zeeland, JO11VN" &
        beacon -c PI1LAP-15 -t 10 -d  ID ax2 "Network node PI1LAP-15 Zeeland, JO11VN" &
        beacon -c PI1LAP-15 -t 10 -d  ID ax3 "Network node PI1LAP-15 Zeeland, JO11VN" &

        # start ax25 deamons
        /usr/local/sbin/ax25d
        /usr/local/sbin/mheardd
        /usr/local/sbin/ax25rtd
        /usr/local/sbin/flexd
        /usr/local/sbin/netromd -c -i -p 1 -t 15
        fbb -s -a -l /etc/ax25/fbb.log

Netrom link quality

Hier onder een stukje wat ik tegen kwam in het bbs, het gaat over de quality van een netrom link. Geschreven door John G8BPQ.

——————–
Quality isn’t measured. It is assigned by the sysop to a Netrom link,
and calculated by the node for a Netrom route. In this context a link is
the path between two adjacent stations, and a route is a path between
two stations over one or more links.

Quality doesn’t necessarily define how “good” a link is. It is used by
the software to select the route to use when more than one route exists
between two nodes. Desirability would be a better term. While this may
be related to how good the link is it might include other factors (eg
give preference to RF links and only use Internet links as a backup if
the radio link fails). It is expressed as a number between 0 and 255.
When a route is over two links, the route quality is calculated by
multiplying the link qualities together and dividing by 256. So for two
links of quality 192 the route quality is 144.

The “standard” default quality is 192. You might change this if you
had two links between two stations (maybe a UHF trunk link and a VHF
user link). By assigning a higher quality to the UHF link traffic would
be routed over it and would only use the other if the first failed.

The Netrom routing mechanism was designed to be self learning, building
routing tables from broadcasts heard from other nodes. This can work
quite well, but only if you don’t have any one way paths. If you can
hear a node but not connect to it the system simply doesn’t work. It
sounds from what you have said that is is what you are seeing. Unless
you deliberately disable the mechanism, BPQ will try to keep a link open
to each node it hears a routing broadcast from, and remove it from the
tables if the link can’t be established (or fails) but in the meantime
the routing entries will be used and may be passed on to other stations.

With your current configuration you will add to your table any stations
you hear a routing broadcast from with a quality of 192. This is a
reasonable starting point if you can connect to all the stations you can
hear. If not, there are two approaches you can use. You can ignore
routing messages from specific nodes that you know you can’t connect to
by adding a locked route with a link quality of zero, or you can set the
PORT QUALITY parameter below MINQUAL, so that nothing is automatically
added, and lock routes to the stations you know you can connect to with
a link quality of 192. The second option requires more active
management, but is likely to give a more stable network.

I’m not sure if this has directly answered your question, but hopefully
will help you understand the issues more.
73,

John G8BPQ
———————