WIP: Set up documentation for Layer 1 and Layer 2 #4
|
@ -118,7 +118,7 @@ The filter is applied to the whole symbol sequence of the burst. The same filter
|
|||
|
||||
== Layer 2: Link Layer
|
||||
|
||||
The Hamnet70 link layer is designed to ensure reliable communication between a central station (digipeater) and several clients, while making efficient use of the available airtime. To accomplish this, it uses several technologies, including variable-length addressing and Go-Back-N retransmission.
|
||||
The Hamnet70 link layer is designed to ensure reliable communication between a central station (digipeater) and several clients, while making efficient use of the available airtime. To accomplish this, it uses several technologies, including variable-length addressing and automatic repetition of packets that could not be decoded.
|
||||
|
||||
=== Node Addresses
|
||||
|
||||
|
@ -189,6 +189,22 @@ The total Link Layer Header length is therefore at least 6 byte and at most 18 b
|
|||
|
||||
The length of the source and destination addresses is encoded as follows: `00` = 16 bit, `01` = 32 bit, `10` = 48 bit, `11` = 64 bit.
|
||||
|
||||
=== Automatic Packet Repetition
|
||||
|
||||
Lost packets are automatically repeated in Hamnet70. As the system is also designed for high throughput, it uses the Go-Back-N algorithm to handle this. The algorithm is described in this section.
|
||||
|
||||
Both the digipeater and the client send two sequence numbers with each packet.
|
||||
|
||||
The _TX sequence number_ is the number of the current packet. It uniquely identifies that packet at the time it is transmitted. The _TX sequence number_ is incremented (with overflow) with each new packet that is sent.
|
||||
|
||||
The _RX sequence number_ is the packet number the sending station expects to see next from the other side. It is incremented when a packet with this expected sequence number is decoded successfully. Received packets with other sequence numbers than the expected one must be dropped.
|
||||
|
||||
Example: The two stations A and B just connected and expect to see sequence number 0 from each other. Station A transmits a burst with three packets: P0, P1, P2. Station B decodes packet P0 and increases the expected number to 1. P1 is not decoded due to noise and therefore lost. P2 is again decoded, but is dropped because its sequence number is 2 and not the expected 1. In its transmission cycle, station B tells station A that it expects P1 next. Station A therefore _goes back to_ P1 in its transmission queue and starts transmitting all packets after P1 again.
|
||||
|
||||
As the sequence numbers in Hamnet70 have 4 bits, up to 15 packets can be transmitted in a burst before the numbers become ambiguous.
|
||||
|
||||
Due to the long possible bursts, this system can achieve high throughput if there is low packet loss. However, it can also become very slow if many packets are lost because all packets after the first error have to be repeated. Therefore it might be a good idea to adjust the burst length depending on the packet loss and send smaller bursts if only few packets go through.
|
||||
|
||||
=== Ideas
|
||||
|
||||
To be defined:
|
||||
|
|
Loading…
Reference in a new issue