Link layer packet radio transmissions are send in small blocks of data, called frames. Each frame is made up of several smaller groups, called fields.
Figure : AX.25 Frame Format
Figure 2 depicts the structure of the AX.25 frame. The frame format is as follows:
- Flag (1 octet): as in HDLC, the flag field is used to delimit frames, it occurs at both the beginning and end of each frame, and has the value of 7E hex or 01111110. This sequence is not allowed to occur anywhere else inside a complete frame.
- Address (14 to 70 octets): explained below.
- Control (1 octet): as in HDLC, the control field is used to identify the type of frame being passed and control several attributes of the level 2 connection.
- Protocol Identifier (1 octet): specifies what kind of network layer (layer 3) protocol, if any, is in use.
- Information (up to 256 octets): as in HDLC, the information field is used to convey user data from one end of the link to the other. Any information in the I field shall be passed along the link transparently, except for the zero-bit insertion (see below) necessary to prevent flags from accidentally appearing in the Information field.
- Frame Check Sequence (2 octets): as in HDLC, the frame check sequence is calculated by both the sender and receiver of a frame. It is used to insure that the frame was not corrupted by the medium used to get the frame from the sender to the receiver. It shall be calculated in accordance with ISO 3390 Recommendations.
- Flag (1 octet): as in HDLC.
There are two differences between the AX.25 frame format and that of HDLC: the Protocol Identifier (PID) field and the address field. The PID field is used to designate the layer 3 protocol that is using the AX.25 link protocol. This would allow multiple users of the link layer protocol. The most important difference between AX.25 and HDLC is the addressing technique. In HDLC, there two possible configurations: a point-to-point link with two stations, and a multi-drop link with one primary and multiple secondaries. In either case, a single address is not sufficient in a packet-radio network for two reasons:
- Since the network is a peer, distributed network, both the source and destination stations should be identified; neither is unique. For flow control, error control, and sequence numbering, both addresses are needed.
- If repeaters are involved, these repeaters must be specified. In particular, it is the responsibility of the transmitting station to specify the repeater or repeaters that must be used to get from source to destination.
The AX.25 address field is from 14 to 70 octets long, depending on whether and how many repeaters are used between a particular source-destination pair. If the sending and receiving stations are in the same cluster (within range of each other), then it is only necessary to specify the source and destination station addresses. Each is specified using 7 octets, which contains a callsign of up to 7 characters. If a frame is to go through a repeater, an additional address subfield is appended to the end of the address field. For more comprehensive discussion about how to encode the AX.25 address field