[Packet Radio Analyzed]

Special thanks to PA3GSE for additional info.

On this page:

1.1 How to use this article.
1.2 Introduction
2.0 ALOHA
2.1 Packet and CSMA
2.2 DAMA, the solution?
3.0 Layer Congestion
3.1 Collision ?
4.0 Watch your monitor-screen.
5.0 Parameters.
5.1 12 Users: Theoretical example.
5.1.1 Persistance
5.1.2 Frack timer
5.1.3 MaxFrames
5.1.4 PacLen
5.1.5 Acknowledge Timer @T2
5.1.6 Slottime
6.0 References


1.1 How to use this article.

You read it ofourse, until you want to stop hi. As you can see, I haveadded an index to the html version of this file. So no more search jobsin an editor. Just point and click. As easy as that....

1.2 Introduction

In the early days of packet, radio amateurs experimented with methodsto transport digital data using transmitters. During these experimentsHAMs developed AX.25, a protocol outline based on X.25, a protocol whichwas already being used in (large) computer networks interconnected withcables. AX.25 described a system, where data was 'guaranteed' to reach theend. That generaly means that data isn't lost without the user knowingabout it.

Packet Radio spread around the world like the wind, and within years, it growed to be the HAM's mailing network. As the number of users increased,the demand for a better performance increased also. Radio Amateurs arevery social people on voice QSO's, but on packet they hate to wait foreach other. Ofcourse the number of users on a packet frequency can easalybe 10 times the average amount of users of a voice frequency, which ismost probably the point.

Many amateurs think that by increasing the baudrate of a packetmodem thisproblem is cured. Well it's not. In the beginning there will be a slightincrease in performance, but high baudrates bring along other problems,like not being able to make direct long-distance connects.

Recently, I read an article about DAMA by the NORD-LINK group, which catchedmy interest almost immediatly. I discussed this new concept with many friendsand teachers, some of which profesionally involved in packet radio -alike networks.

This way, I gathered quite a lot of information about packet and other typesof networking, and I decided to spread this knowledge, because when I startedout with packet, I didn't know what, how, when, where, and why... hi.

I noticed some HAM's still have this problem. I deducted that by watchingframes go by on my monitor screen, analyzing the approximate settings amateurs apply when connecting with a packet modem.

By writing this article, I hope to get people thinking when they are packeting. This article is far from being perfect, so if you have questions, answers, corrections or interesting supplements to my article,please let me know.

Enjoy reading this (rather large) article.


2.0 ALOHA

The first computersystem where a radio as communication between two pointswas used, was the ALOHA system of the University of Hawaii. The system wasstarted in 1971. This system was the father of all packet-broadcasting systems we know nowerdays.

The ALOHA system was made to interconnect the people at the University ofHawaii, which was spread across 7 buildings on 4 islands, and connect themto the main computersystem on Oahu, without making use of telephone lines,which were at that time expensive and unreliable.

Small FM transmitters were used with a sufficient reach to connect withthe computersystem on Oahu. Later, a repeater was used to increase thetheoretical connectable distance to 500 km.

In the beginning, two frequencies were used, a so called 'uplink' and 'downlink' frequency, seen from the central computer. These frequencies were407.350 Mhz, and 413.475 Mhz, resp. The central computer monitored all communication. Transmission baudrates were 9600bps.

After a few years of experience with the system, the investigators concludedthat 1 frequency would have been more sufficient.

When a station has data to be transmitted, it just transmits it at that moment. This is ALOHA in its purest form. When the central computer receivesa correct frame, it acknowledges it. When a frame isn't acknowledged withina predefined time, the station transmits it again. Different retransmissiontimings have been tried, (between 200 and 1500ms) but the users concludedthat during peak-use, the system experienced extensive collision of packets,which resulted in congestion of the network.

The people at the research department concluded that this problem could beavoided by letting the station listen to the frequency it is planning to transmit on, and letting it avoid collisions by delaying it's transmissionwhen the frequency is in use. This resulted in CSMA.

2.1 Packet and CSMA

The most common problem of all types of networks is deciding when, and howa user should transmit it's data. In Packet radio, we use CSMA, that meansCarier Sense Multiple Acces. There are different types of CSMA:

  1. 1 persistent CSMA
    With this protocol, the transmitter will send immediatly when it senses that the frequency is not being used. Disadvantage of this system is many collisions, because of the delay between the decision to send, and the actual transmission (modem latency). The frequency can easily be congested.
  2. non persistent CSMA
    Now, the modem will not transmit immediatly. It waits a certain amound of time before transmitting it's data, thus giving other modems the chance to send their frames also. This protocol will react on a retry as if it were a collision, but on AX.25 this is not a big problem. Advantages of this system are a greater amount of users possible on a frequency, and a better throughput.
  3. P persistent CSMA
    This is the kind of CSMA we are currently using. With this protocol, you can influence the chance of your modem transmitting in a certain 'time slot', by a parameter called 'persistance'. The advantage of this system is that the persistence of the modems can be adjusted to the number of users on a channel. (Unfortunatly nobody does.) With many users, you want your modem to be less persistent, to prevent package collisions, and increasing the thoughput. The most ideal situation occurs when every user on the frequency has a persistancy of: p=1/users+1.

    In this formula is an extra user calculated because the theoretical througput of a frequency is higher than the actual throughput.

    (NOTE: in modern TNC's, and TFPCX drivers, this persistence should be multiplied by 255.)

As you can see, p persistent CSMA works perfectly on a cable-network, whereevery user can hear all the other users. Unfortunatly, on Packet Radio, HAM'sworking on the same frequency can't always hear eachother. This results inALOHA-like collisions, because a modems can decide to transmit, because it thinks the frequency is not being used, while actually another modem is transmitting its frame.

This problem is amplified by the behaviour of the amateur, who thinks thatwhat he can't hear, can't bother him. By 'adjusting' his squelch (turning itup a far as possible), he creates more and more collisions, which where thereason to turn up the squelch in the first place. And then there are HAM'sworking with beams. If you want frames to collide, this is the ultimatesolution. With a beam, you can't hear the packet modem that's located behindit, and that packetmodem can't hear you, because your transmission is aimedin a complete different direction. Result: Collisions all over (hi).

[Beam vs. Vertical]

BBS: Just some BBS with a sufficient installation to hear both users.
User 1: This is a station with a beam, of which the effective working area is drawn.
User 2: This station uses a 'normal' vertical antenna, as we can see by the working area.
NOTE: Within their working areas, the modems/stations are assumed to be perfect.

We can see an every-day situation shown in the drawing above. User 1 hears the BBS perfecty, and User 2 hears the BBS also. Unfortunatly, User 1 and 2can't hear eachother, which causes collisions. in this situation, it is clearto see, that User 1 has decided to use a beam, because of the distance to theBBS. This drawing shows just 1 common situation, but in real life, there canbe over 20 stations on 1 frequency, making the problem even bigger.

3.0 Layer Congestion

If the accumulated amount of bytes sent by the stations on the currentfrequency exceeds the maximum throughput of that frequency, the channelis 'congested'. The performance on the channel decreases, and the staionsbegin to resend their frames, thus making the situation only worse.

Congestion usually amplifies itself in most network situations, althoughthese congestions are often the result of RNR's, like on a LAN. On AX.25,congestion is nearly always the reslut of an excesive amount of users ona frequency, all wanting to be the next to transmit.

In the following graph we can see what happens when the channel is congested.(the graph assumes a packet modem to be flawless, with 0 tx-delay etc.)

[Frequency Efficiency]

As we can see, a network can never reach its theoretical maximum throughput,but it can come real close to it. When there are two users on 1 frequency,they can reach the 'desired throughput', as displayed in the graph. Nearlyevery frame sent is acknowledged.

With a congestion, the efficiency literaly 'colapses', because the transmitter keeps sending frames, which are rarely acknowledged, due to theconstantly increasing collisions.

We can see that the Congested Throughput can be written as:

                                 -G                        S = G * e
When G equals 1:
maximum throughput is achieved (marked with * in the graph).
When G is less:
throughput is less, due to lack of sent frames. Between two frames, the channel is not used, thus decreasing efficiency.
When G is more:
the channel is (severly) congested, because of many collisions.

3.1 Collision ?

A collision happens when two (or more) modems start to send frames at thesame time, thereby damaging each other's frames. So it has nothing to dowith bad driving, but with bad parameters, bad antenna's, and so on.


4.0 Watch your monitor-screen.

When you look at the frames in the monitor window of your packet program,you can see that there is often a lot of 'overhead'. That is info whichis not typed in by the user, but is used to maintain the connection.

Here's a short description of those frames:

Unnumbered frames:
SABM (Set Asynchronus Balanced Mode)
This frame is used to get two packet stations in the same mode. In X.25, the stations are indeed Asynchronus, but in AX.25, this makes no sense, and therefore async. isn't part of the protocol. An SABM frame serves as a 'connect request'. The receiving station will send a UA- if it accepts the connect, and a DM- if it refuses the connect request.
DISC (DISConnect)
This frame is sent when a connection is terminated. The receiving station will send an UA- frame as fast as possible. When this is received by the sender of the DM-, the disconnect is complete.
FRMR (FRaMe Reject)
This frame should normally not occur in a connection. It means, that e received package couldn't be decoded, and the fault can't be corrected by resending the frame. The frame contains 3 bytes with an error message. These frames are often the result of two stations with the same SSID, working at the same frequency. FRMR frames result in a disconnect.
UA (Unnumbered Acknowledge)
The UA- frame is used to confirm a SABM or DISC frame. The connect or disconnect is only carried out after sendout of this frame.
DM (Disconnect Mode)
This frame is sent when frames are addressed to a station, while the two stations aren't connected to each other. DM is also used to answer SABM's, to indicate the station is busy.
UI (Unnumbered Information)
UI frames can contain commands and messages, and are being used to transmit un-protocolled messages, like a beacon.
Numbered frames:
RR (Receive Ready)
This frame is sent to indicate that the station is ready to receive another frame. It is also used to acknowledge an I frame. When a RR is used to acknowledge an I frame, it indicates this by reporting the number of the I frame it acknowledges. In packet radio, you can see these frames very often. They are used to 'poll' if the other station is still there. However, they result in many collisions. This can be avoided with proper timer adjustments.
RNR (Receiver Not Ready)
This frame is sent to indicate that the receiving station is busy, and not ready to receive frames at this moment. This is also known as a 'choke' frame, sent when i.e. the buffer of the TNC is full. Normally this frame isn't sent very often, unless in situations an upload is done to a system with only a Floppy-Disk-Drive, where the modem is faster than the drive.
REJ (REJect)
A reject frame is sent to indicate the transmitting station that it should send it's I frame again. With much QRM on a channel, these frames can be seen very often. To limit the chance of frames being received incorrectly, one should set its frame-length to a minimum, like 64 bytes. The chance of interferance with short frames is noticably smaller, so less REJ frames are sent. This way, there will be less overhead, and the throughput will increase. The sending station will restart sending frames from the one that went wrong, so you can imagine maxframe=7 will in this case only make life harder.


5.0 Parameters.

As discussed before, in p persistent CSMA, ther persistancy should be adjusted to the number of users on the channel. (p formula above)People often think to simple about the parameters, and the effect theywill have on the overal channel performance. Maybe your connection willgo allright, but other users may experience many collisions, and evendisconnects after excessive retries. Please experiment not just alone,but communicate with other users on the frequency!

5.1 12 Users: Theoretical example.

In the following example, we will look at a group of 12 users on a frequency.All users can hear eachother, and users are randomly connected to otherusers, so there are approximatly 12 connections. We will assume that thisis a very socially thinking group, and the will all have the same parameters.

Different theoretical and practical experiments were done to study thissituation. Your situation may be significantly different, so please experiment with parameters as much as possible, the are zillions of combinations, it's up to you to find the right one.

With approximately 12 users on a channel, following parameters should be aplied (only most important parameters discussed here)

5.1.1 Persistance

This is the easy parameter. from P=1/users+1 we can calculate: p=1/13.Multiplaying this by 255 for most modems, results in a persistance of 20.

5.1.2 Frack timer

This timer decides if a 'time slot' has passed with a missed opertunatyto send a frame. A fast timer results in many collisions, because aftera number of virtual timeslots, the modem is forced to send by this timer.

With 12 users, this timer can be set to 4, with less users, the timer maybe decreased to even 2. Be carefull with this though, the result of thistimer to the channel performance is very complex. It can be calculated,but I won't bother you with a boring algebraic calculation now.

5.1.3 MaxFrames

The maximum of outstanding frames is dependant of the number of collisionsand QRM on the channel. Best way to monitor this is by counting the REJ frames of the other station. The more REJ frames, the less frames you shouldkeep outstanding. In our example, calculation proved the throughput to be 67.5%, which is rather high in comparison to real life. When calculatingthis same example using the DAMA protocol, throughput was about 75%, a significant improvement.

The maximum number of outstanding frames in this example came out to be 4.(taking the paclen would be 128)

5.1.4 PacLen

In our example, we first assumed QRM to be 0, so a paclen of 256 was suggested. However, this would not reflect the real world situation.

Statistically, a packet of 128 bytes has a chance of 68.3% to reach thereceiver without errors. This is acceptable, beacuase the overhead is minimal at this point. Increasing paclen would increase the REJ frames, anddecreasing the paclen would increase the PID overhead.

5.1.5 Acknowledge Timer @T2

As soon as a packet is received, an acknowledge frame is sent out withinthe time limit of T2. By making T2 1.4 seconds, throughput was maximum inour example. Therfore, I recommend this timer to be set at 2 sec. in our experiment.

5.1.6 Slottime

When a modem decides NOT to send data, due to the persistance, or if a carrier from another modem is detected, it waits a certain amount of timebefore it 'reconsiders' it's decision. The time between these decisions iscalled the slottime, and by decreasing this time, the modem becomes moreagressive, because the number of tries increase, so the chance of transmission by the modem, adjusted by 'p', is greater. This results inmore collisions.

This timer is also used to compensate the 'decision-latency' of a modem. Thatis the time between the modem decides to transmit, and actually starts transmitting. The slottime parameter is often called 'wait' or 'Dwait'.An acceptable value is 3.


6.0 References

The following books were used in creating this article:
Computer Networks by Andrew S. Tanenbaum (translated to dutch)
Prentice Hall / Academic service
Packet Radio by Wolf-Dieter Roth (dutch)
de muiderkring
Datacomm sheets by A.W. Habermann
school material at the HogeSchool Haarlem.
Control Systems Engineering By Norman S. Nise
The Benjamin/Cummings publishing company inc.
Furthermore, numerous experiments were done, driving the local HAM's crazy (hi). For these experiments, two different types of modems were used,namely the BayCom modem, and the TNC2-NL. The software used to communicatewith these modems varied from a terminal program to Eskay Packet 9.00.

HTML version created at 19 March 1997 Article re-posted on 17 April 2000


bye!