NOSintro – TCP/IP over Packet Radio

An Introduction to the KA9Q Network Operating System

by Ian Wade, G3NRW

Chapter 26: AX.25 ROUTING

 

Routing is to do with how NOS forwards packets from one station to another. The rules for forwarding packets are contained in routing tables — in general, these tables specify the next station "down the line" to which packets will go on their way to their eventual destination.

NOS provides three separate levels of routing, and thus three separate routing tables:

AX.25 routing

Internet Protocol (IP) routing

NET/ROM routing

 

In this chapter we look in detail at AX.25 routing.

 

AX.25 Routing

AX.25 routing is perhaps the easiest of the three levels to understand, as you’re probably familiar with it already, under its more common name: digipeating.

To set up the AX.25 routing table, all you need to do is include the ax25 route add command for each of your neighbours who is accessible via one or more digipeaters.

So, for the scenario in Fig 26-1, Bob needs the following commands in autoexec.nos:

ax25 route add AX9PAT AX9DGA AX9DGB
ax25 route add NS9PAM-5 AX9DGC

Note that there is no letter v (for via) in these commands.

If Bob wants to make an ordinary AX.25 connection to Pat, he simply gives the command:

net> connect tnc0 AX9PAT

and NOS will automatically make the connection via the digipeaters AX9DGA and AX9DGB.

 

Fig 26-1: The AX.25 routing table specifies digipeater paths.

In the second routing table entry, NS9PAM-5 is the AX.25 callsign of the NOS station ns9pam. Bob could make an ordinary AX.25 connection via AX9DGC to Pam if he really wanted to, using connect tnc0 NS9PAM-5 (but because Pam is running NOS, Bob is much more likely to use telnet ns9pam).

These two entries are permanent entries in the AX.25 routing table. They will remain there indefinitely unless you forcibly remove them (e.g. with the command ax25 route drop AX9PAT).

Another way of adding permanent entries to the table is to include the digipeater routing in the connect command:

net> connect tnc0 AX9ZZZ AX9DGA

(N.B. Some versions of NOS don’t allow you to include digipeaters in the connect command in this way; in that case you are forced to use ax25 route add to specify the digipeater chain).

In addition to permanent entries, it’s also possible that temporary entries will find their way into the AX.25 routing table. These appear automatically if someone connects to you via a digipeater path (but if you already have an entry for that station in the table, the incoming connection will not change what you entered).

To find out the current status of the AX.25 routing table, use the ax25 route command:

net> ax25 route

Target Type Mode Digipeaters
AX9PAT Local VC AX9DGA AX9DGB
NS9PAM-5 Local IF AX9DGC
AX9XYZ Auto IF AX9DGA

The first two entries are Local entries, corresponding to the permanent routes which Bob added to the table. The third entry appeared automatically when AX9XYZ connected to Bob via AX9DGA.

 

AX.25 Mode

In NOS it’s possible to specify the mode for transmitting Level 2 AX.25 frames. For ordinary AX.25 connections — not using TCP/IP — the mode needs to be vc (virtual circuit). That is, when you connect to another AX.25 station, each information frame is numbered (from 0 through 7) to allow stations to check for missing or duplicate frames, and flow control is handled with RR (Receive Ready) frames.

With TCP/IP traffic however, there is no need to number each level 2 frame, because TCP/IP packets have their own numbering scheme. Likewise, there is no need to handle flow control at level 2, because the TCP/IP protocols do this at higher levels.

Because of this, the use of AX.25 virtual circuit mode for TCP/IP traffic is an overkill (and in fact leads to excessive and unnecessary level 2 traffic).

Instead, it’s normal to use datagram mode at level 2 for TCP/IP traffic. This means that information is transmitted in UI (Unnumbered Information) frames, without frame sequence numbers, and there is no flow control at level 2. If a level 2 frame is lost in transit, the higher level protocols detect this and request re-transmission. Similarly, if the receiving station needs to impose flow control, it is the higher level protocols which handle this.

So, as most of our NOS traffic will be via TCP/IP rather than ordinary AX.25 connections, it’s usual to set the default mode to datagram, in autoexec.nos:

mode tnc0 datagram

This won’t do for ordinary AX.25 connections, however, which need to run in virtual circuit mode. So for each station with whom you normally connect in AX.25 mode, you need to add an ax25 route mode command. Thus Bob will have the following additional commands in his autoexec.nos:

ax25 route mode AX9PAT vc
ax25 route mode AX9DGA vc
ax25 route mode AX9DGB vc
ax25 route mode AX9DGC vc

Back to Contents Page

Back to NOSintro Main Page.


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