---
name: "axattach"
section: "8"
platform: "linux"
package: "ax25-util"
version: "0.28.0"
release: "Debian 1.2 (Rex)"
platforms: ["linux"]
url: "https://new.carta.tech/axattach"
---

# axattach(8)

Attach an AX.25 Packet Radio Interface

## NAME

axattach - Attach an AX.25 Packet Radio Interface

## SYNOPSIS

**axattach** \[-c *command***\] \[-s** *speed***\]** *device callsign*

## DESCRIPTION

**Axattach** is used to connect an AX.25 packet radio interface to the operating system networking facilities. The interface must be set to communicate using the **KISS** protocol.

Once attached, the interface may be used to communicate using the AX.25 protocol with the **call(1)** and **axl(8)** commands, and other tools. The interface may also be further configured for communications using the TCP/IP protocol suite. The **axattach** command does not exit unless it is terminated, thus it should be run in the background. Terminating **axattach** will make the packet radio interface unavailable for communications until **axattach** is started again.

The *callsign* argument is the Amateur Radio callsign to be used to identify transmissions. An optional *extension* in the form of a hyphen followed by a integer between 0 and 15 may be appended to the callsign. The extension is used to disambiguate multiple stations running under the same Amateur Radio callsign. If no extension is given, the default extension of 0 will be used.

Once attached, the interface is associated with a networking interface name that provides access to the **SLIP** protocol (from which **KISS** was derived). This interface name is of the form *sl***n**, where **n** is a small integer. This interface name is necessary if you wish to further configure the interface for TCP/IP communications using **ifconfig(8)** and **route(8).** The **-c** option of **axattach,** explained below, provides a simple way to pass this interface name to other programs.

## OPTIONS

- **-c** *command*

  As soon as the interface is attached, pass an arbitrary command to the shell with parameter substitution. This is generally used to run **ifconfig(8)** and **route(8)** to further configure the interface for use with TCP/IP. *Command* should be surrounded by quotes so that the shell will not break it into separate arguments or interpret its contents. Parameters may be substituted within the command by using these "%" tokens:

  - **%i**

    The networking interface name, of the form *sl***n**.

  - **%d**

    The hardware device name, of the form */dev/cua***n**, or */dev/pi***n**, or */dev/scc***n**.

  - **%c**

    The callsign with optional extension, exactly as it was given on the command line.

  - **%s**

    The serial communications speed, as given on the command line.

- **-s** *speed*

  The serial communications speed to be used to communicate with the interface.

## EXAMPLE

This is how **axattach** is used to configure station **AB6YM:**

The /etc/rc.local file runs this command:\

```
/usr/sbin/axattach -s 19200 -c "/etc/ax25/port1.conf %i" /dev/cua1 AB6YM &
```

This attaches a packet radio Terminal Node Controller connected to the serial interface */dev/cua1,* operating at a serial communications rate of 19,200 Baud. The callsign AB6YM, with the default extension of 0, will be used to identify transmissions. The command "/etc/ax25/port1.conf", a shell script that continues to configure the interface for use with TCP/IP, will be run once the interface is attached. The "%i" parameter, passed with the command, will be translated to *sl***n** and passed as an argument to the shell script.

The shell script /etc/ax25/port1.conf runs these commands:\

```
interface=$1	# This will be sln.
# Configure the network interface for TCP/IP.
/sbin/ifconfig $interface 44.4.32.136 netmask 255.255.0.0 broadcast 44.4.255.255 arp mtu 216
# Add a route to use this interface.
/sbin/route add 44.4.32.136 dev $interface
# Add routes for some local gateways
/sbin/route add -net 44.4.0.0 gw 44.4.32.136
exit 0
```

Once this is done, the interface may be used to communicate using both AX.25 and TCP/IP protocols.

## FILES

- */dev/cua***n**, */dev/pi***n**, */dev/scc***n**

  A serial interface connecting to a packet radio Terminal Node Controller using the **KISS** protocol, or a device-driver interface to a packet radio modem that emulates serial **KISS** communications.

## SEE ALSO

**call(1)** **beacon(1)** **listen(1)** **mheard(1)** **axl(8)** **ifconfig(8)** **route(8)**

## DIAGNOSTICS

## BUGS

## AUTHOR

Alan Cox GW4PTS \<A.Cox@swansea.ac.uk\>\
 Bruce Perens AB6YM \<Bruce@Pixar.com\> added the **-c** option and this manual page.
