Bringing amateur packet radio onto Linux means moving the AX.25 and NET/ROM stack into a kernel whose code you can read and change, instead of relying on the closed firmware of a TNC or a DOS executable that runs on its own. At the ARI section in Pisa of the Italian Amateur Radio Association I moved the station’s whole packet radio system (callsign IZ5AWZ) onto Linux, writing several patches to the kernel, libraries and tools to do so. The result is a node in which every layer — radio link, amateur routing, IP transport — is code that can be inspected and fixed on the same machine.
What amateur packet radio is
Packet radio is packet-based data transmission on the amateur bands. The link-layer protocol is AX.25, derived from HDLC and specified in version 2.0 in October 1984 by TAPR and the ARRL: it defines framing, callsign addressing with SSIDs, numbered frames for connected mode and UI frames for the connectionless one, plus digipeaters that extend range by repetition. On top of AX.25 sits NET/ROM, a network layer that routes between nodes, so that a station reaches a distant destination through a chain of intermediate nodes without working out the whole radio path by hand.
For years the typical station was a TNC (Terminal Node Controller) with its own AX.25 firmware on board, driven from a terminal. The simplification introduced by KISS in 1986 — a specification by Mike Chepponis K3MC and Phil Karn KA9Q — moves the intelligence from the TNC to the computer: in KISS mode the TNC behaves as a modem and hands the host the raw HDLC frames, leaving the computer to handle AX.25 and everything above it. That is the premise that makes it sensible to implement the stack in the operating system rather than in the firmware.
Why Linux
With KISS the question becomes where the AX.25 stack should live. Putting it in the kernel of a free operating system makes it code you can read, compile and fix. This is the work Alan Cox had started in the Linux kernel and that Jonathan Naylor G4KLX carried forward, adding NET/ROM and ROSE and becoming the maintainer of the AX.25 part of the kernel. The stack exposes its own address families — AF_AX25, AF_NETROM, AF_ROSE alongside AF_INET — so that a program can open a socket over radio with the same interface as a TCP/IP socket. Kernel 2.0, released on 9 June 1996, is the base I worked on.
The practical difference from a TNC’s firmware is the ability to intervene. When a remote station with a dialect of a timing or a behaviour at the edge of the specification drops a connection, on closed firmware all you can do is work around the problem from the outside; with the stack in the kernel you read the point where the frame is discarded and fix it there. The patches I wrote sit in three places: in the kernel, on the AX.25/NET/ROM stack and on the glue with the network interface; in the user-space libraries (libax25), which translate callsigns and port parameters for the application programs; and in the tools (ax25-utils), the utilities that attach a KISS line to a network interface and configure the ports. The /etc/ax25/axports file describes each radio port; kissattach creates the ax0 network device over the serial line to the TNC.
The IP-over-radio bridge and the 44/8 network
The point where packet radio meets data networks is carrying IP over AX.25. Amateur radio operators have been assigned, since 1981, a whole block of IP addresses, the class A 44.0.0.0/8 — the network known as AMPRNet — community-administered for experimental packet traffic. With the Linux stack the station becomes an IP host in every respect: it holds an address inside 44/8, runs the ordinary TCP/IP daemons and routes packets by encapsulating them in AX.25 frames — a network interface whose link layer is the radio instead of Ethernet. The model for amateur IP over AX.25 comes from Phil Karn KA9Q’s work on the NOS software; bringing it into the Linux kernel makes it coincide with the system’s network stack rather than with a program of its own.
From here the station does two things. Towards the other radio stations it stays a node of the local packet network, speaks AX.25 and NET/ROM to the area nodes and to the packet clusters — the DX cluster nodes that grew out of Dick Newell AK1A’s PacketCluster in the late 1980s, which distribute in real time the reports of stations on the air. Towards the rest of the IP network, the address inside 44/8 and the kernel stack make it reachable and routable like any other host.
The IP-IP tunnel to Tampa
A radio network is an island: two segments of 44/8 far apart have no direct radio path between them. The standard way to join them is to encapsulate amateur IP inside ordinary IP and let it travel over the public Internet to the far end, where it is unwrapped and put back on the air. The technique is described in RFC 1853, IP in IP Tunneling, of October 1995: an outer IP header prepends its own source and destination addresses — the tunnel endpoints — to the original datagram, which keeps its own. Between the Pisa station and a node in Tampa, Florida, I set up a tunnel of this kind: the 44/8 traffic between the two radio islands travels encapsulated over the ordinary Internet, and at each end becomes an AX.25 packet on the local radio again. To the radio nodes on either side the link is transparent: they see a single amateur network, without knowing that part of the path runs over public IP.
The same IP addressing that makes the tunnel possible opens the links with the city’s research networks. Pisa is the point where the Internet arrived in Italy: on 30 April 1986 the CNUCE-CNR system connected to ARPANET through the Fucino Space Centre and the Roaring Creek station in Pennsylvania, the first Italian node. From that root the Italian research network, GARR, grew, and by the end of 1991 it connected about a hundred sites of CNR, ENEA, INFN and universities. With the ARI station turned into an IP host, the links towards CNUCE and INFN are interconnections between networks that speak the same protocol: an amateur radio island that faces, through IP, the academic and research networks of the same city.
The critical point
The difficulty is not in any single protocol but in keeping three of them standing one above the other over an unreliable medium. Radio is not a cable: there is packet loss, there is the shared channel under contention, there are timings that depend on propagation. AX.25 handles retransmission and windowing, NET/ROM routes above it, IP travels above that again; a wrong parameter at one layer degrades the one above in ways that from the outside look like random faults. Having the stack in the kernel changes the way you diagnose: you observe directly where a frame is discarded or a connection drops, and you fix the code instead of tuning a TNC’s registers blind. This is the technical reason the work consisted of patches and not only of configuration: some behaviours could only be fixed in the source.
Implications
The free stack unifies two worlds that closed firmware kept apart. For the radio amateur, the node is a complete IP host: the ordinary network tools — routing, diagnostics, services — apply just as much over the radio as over Ethernet, because underneath there is the same operating-system stack. For the data network, the radio island becomes a reachable, routable segment, joinable to other islands with a tunnel and to research networks with ordinary IP routing. And the fixes do not stay local: the kernel’s AX.25/NET/ROM/ROSE stack is shared code, and a patch that solves a problem seen in Pisa serves anyone using that code elsewhere.
Limits
The medium remains what it is. The amateur bands in packet work at low speeds — on the order of 1200 and 9600 bits per second — and no amount of software work changes the available bandwidth or the latency of propagation. The IP-IP tunnel makes the link between the islands depend on the public Internet being available between the two ends: when the ordinary path drops, the bridge drops too, and only what is reachable by radio remains. RFC 1853 also notes a limit inherent in encapsulation: an error generated by a router inside the tunnel comes back as an ICMP message to the encapsulator, which often does not have enough data to forward it to the original host, and fault diagnosis on the interior leg is blinder for it. These are constraints of the design, not defects to be fixed: the value of the free stack lies in making them legible and manageable from the same point where the rest of the node is run.
- http://bitsavers.informatik.uni-stuttgart.de/communications/arrl/AX.25_Link-Layer_Protocol_Ver_2.0_198410.pdf
- http://www.ka9q.net/papers/kiss.html
- https://www.rfc-editor.org/rfc/rfc1853
- https://www.originiinternetitalia.it/en/cnuce-2/
- https://www.garr.it/en/who-we-are/history-of-garr-network
Cover image: the premises of the ARI section in Pisa (Associazione Radioamatori Italiani) during a radio activity — personal archive photo.