NOSintro – TCP/IP over Packet Radio

An Introduction to the KA9Q Network Operating System

by Ian Wade, G3NRW



In this chapter we take a fresh look at some of the protocols which you are probably already using, such as AX.25 and NET/ROM, and then explain how TCP/IP and the AMPRnet ride on top of them.


Protocol Stacks

Present-day networking design usually follows the OSI model, the so-called 7-layer protocol stack (the left half of Fig 7-1). This isn’t the place to go into detail on the functions of each layer in the stack; suffice to say here that it’s convenient to break down the stack into two parts. The lower part contains the Physical, Data Link and Network layers, and the upper part contains the remaining four layers.

The essential difference between the two sets of layers is that the lower layers are basically network-dependent, whereas the upper layers are virtually independent of the underlying network.

However, the TCP/IP world which NOS supports was well established long before the OSI model became accepted. The TCP/IP stack is shown in the right half of Fig 7-1, and from this we can see the approximate correspondence between the two models.

The reason for showing both of these stacks here is that some of the protocols which NOS supports (such as KISS, AX.25 and NET/ROM) best fit the OSI model, whereas the Internet protocols best fit the TCP/IP model. Predictably, this mixture of old and new protocols has caused many headaches for the software developers who squeezed them all into one package. To the purist the result is a mess, but to the pragmatist it works, and that’s what counts!

So let’s merge the protocols which NOS supports into one diagram (Fig 7-2). It looks pretty complicated now, but if we take it piece by piece it won’t be too painful. Let’s start at the bottom.

Fig 7-1: The OSI and TCP/IP Protocol Stacks


The Physical Layer

The physical layer is concerned with the physical connections to the network. NOS provides support for three main types of connection:


packet radio terminal node controllers

local area network adapters


The connection between the PC and a modem can be a simple 3-wire cable (TD, RD and ground), but is much more likely to include all the modem control lines, such as RTS, CTS and so on.

Fig 7-2: NOS Protocols

The connection between the PC and a tnc can also be a 3-wire cable, as the KISS protocol which NOS uses when running TCP/IP does not support flow control. However, some versions of NOS do support hardware flow control, so it would make sense to have a cable with all the modem control lines present anyway.

The LAN adapter can be any of a wide range of commonly available Ethernet or token ring adapters. We will see shortly that NOS allows you to install one or more of the public domain Clarkson drivers which support these adapters.


NOS Drivers and Interfaces

For each of the I/O controllers and the uarts in your system you will need to define a DOS I/O address and an IRQ vector number. For example, for the COM1 port, the uart uses I/O address 0x3f8 and IRQ 4. These numbers appear as parameters in NOS attach commands which run when you start NOS. For example:

attach asy 0x3f8 4 ax25 tnc0 2048 256 4800

We’ll look in detail later at what all the parameters mean, but two of them are relevant here. The parameter asy is the name of the NOS asynchronous driver, and the parameter tnc0 is the NOS interface name for the driver. NOS driver names like asy are fixed, but you can choose any meaningful names for the interfaces. (In this book we use the name tnc0 for the tnc interface, but other documentation which you may have seen uses the names ax0 or pk0 instead).

Interface names are used in many commands. For example, if you want to trace packets passing through the tnc, you can give the command trace tnc0 211, or if you want to chat with AX9SAM using AX.25 you can give the command connect tnc0 AX9SAM. Similarly, if you use the interface name tel0 for the modem port, you can run a dialer script with a command like dialer tel0 /scripts/dialbob.scr.


Data Link Layer

The Data Link layer is concerned with protocols which encapsulate packets into frames in readiness for transmitting them (and also, of course, for decapsulating received packets). When sending and receiving data over a telephone line, the most common protocol is SLIP, but the PPP point-to-point protocol is nowadays gaining in popularity.

For the packet radio network, you will almost certainly be using the AX.25 protocol at this level, with the AX.25 packets being enveloped in KISS frames for the tnc. The AX.25 driver is fully compatible with the AX.25 Level 2 Version 2 specification, so you can use it not only for NOS but also for ordinary AX.25 connections if you want to.

An added feature of NOS is the ability to talk directly to a serial port, without encapsulating the data in any way. This is useful if you want to send commands to the tnc in native cmd: mode, or to set up or interrogate a modem.

NOS provides three commands to do this:

tip allows interactive access to a serial port via the keyboard and screen;

comm lets you send previously prepared strings from a file to a serial port;

dialer lets you control a serial port with scripts containing modem control commands, time delays and tests for expected responses.


For LAN adapters you can use external drivers compatible with the FTP Inc packet interface. As the drivers are not part of NOS, you load them into memory before starting NOS. You can get suitable drivers from the FT/TCP package available from FTP Inc, or more probably you will use one of the public domain Clarkson drivers. Appendix 1 gives the details.


The "Workhorse" Protocols

Working our way up Fig 7-2, we now come to the "workhorse" protocols which do the hard work of transferring information between systems. These include TCP, IP, UDP, ICMP, NET/ROM and others. As already mentioned in Chapter 4, think of these protocols as the "engine" of the NOS system. We are not particularly interested at the moment in exactly what they do or how they work; all we need to know now is where they fit into the overall picture.

The Network Services

The services shown at the top of Fig 7-2 (tip, ftp, telnet etc) form the interface between NOS and the user. You can give commands like ftp ns9bob from the keyboard and see responses on the screen, or you can include the commands in script files if you want to run them repeatedly (in a similar way to *.BAT files in DOS). You can also give many of the commands from your built-in NOS BBS.


The Session Manager

The Session Manager is the part of NOS which pulls everything together. You give commands to the Session Manager, which then either executes them immediately, or starts new sessions to handle them. With the Session Manager you can monitor what is happening within NOS at any time, start and stop network services, abort data transfers, run command scripts, trace network packets, change interface configurations and so on.





Fig 7-3: The Protocol ID (PID) code in the AX.25 frame specifies the type of packet. When the PID = cc (hex), it is an IP packet, and the IP Protocol code then specifies the higher level protocol. (All codes shown here in hexadecimal).

Back to Contents Page

Back to NOSintro Main Page.

[Copyright 1992-2009 Dowermain Ltd. All Rights Reserved. This page last modified: 21 May 2009]