XRPi Home

Documentation Index
Alphabetic Index

XRPi Documentation - Miscellaneous

L2 Fragmentation

Name

L2FRAG -- AX25 Layer 2 Fragmentation.

Description

Data originated by XRPi is always packaged into the correct sized frames for the underlying link. For AX25, this size is specified by PACLEN, which defines the largest payload of an information-bearing frame.

However XRPi has no control over the size of NetRom datagrams originated at other systems, which may be larger than the PACLEN of the AX25 L2 link onto which they are to be routed.

In order to cope with this situation, XRPi includes a layer 2 fragmentation scheme, which (if enabled) breaks the datagram into two or more PACLEN (or smaller) chunks. This scheme is only used for connected-mode AX25 (LAPB). It supersedes an earlier NetRom-specific fragmentation scheme which appears to be no longer used.

A fragmented datagram is indicated by the presence of a 2-byte PID (Protocol Identifier) field in place of the usual single-byte field. The first byte has the decimal value 8, indicating that a second PID byte follows. The second byte indicates how many segments (up to 127) remain to be sent. The first segment is indicated by the value 128, and the last segment by 0, i.e. no fragments left.

Whether or not XRPi uses fragmentation is controlled by bit 4 of CFLAGS (decimal 16). If this bit is set, XRPi will fragment outgoing datagrams if necessary. If the flag is not set, datagrams will be sent unfragmented. This flag should only be set if the peer is known to be capable (xNOS systems usually are).

If a fragmented datagram is received from a peer, that peer is assumed to be capable of fragmentation, and XRPi will enable fragmentation (and re-assembly of received fragments) regardless of the setting of bit 4 of CFLAGS.

Compatible Systems

XRouter, XR32, XRPi and xNOS are known to be compatible with this scheme. The status of others such as BPQ32, PE1CHL Net etc. are unknown at this time. Reports would be appreciated.

See also

CFLAGS(7) -- Connection Control Flags
L3FRAG(9) -- NetRom Layer 3 Fragmentation.
PACLEN(2) -- AX25 Max Packet Length.