Configuring Linux AX.25:
The ax25.init File


#!/bin/sh
# ax25.init -- this should be linked into the appropriate rc.d
# directories to start AX.25 services at bootup.  Under Debian, you'd
# copy this to /etc/init.d and link from there.

# You may need to insert some "/bin/sleep 1" commands after setting up
# the interfaces; it depends on the system.  I've excluded them here in
# the interest of clarity

# ax ports are:
#	scc0 -- 145.61 1200 baud (DRSI card)
#	uhf -- KISS TNC for 9600 baud
#	dmascc0 (port 19k2) -- UHF 19.2 repeater
#	axip -- ax/ip gateway

echo Starting AX.25 networking services:

# configure the DRSI card -- reads hardware info from the /etc/z8530.drv file
/sbin/sccinit
/sbin/ifconfig scc0 44.71.36.2 hw ax25 w8apr-13
/sbin/ifconfig scc0 broadcast 44.71.36.63 netmask 255.255.255.192
/sbin/ifconfig scc0 arp mtu 256 up
/sbin/route add -net 44.71.36.0 irtt 6000 scc0

# set up the UHF port -- remember that ifconfig and route use
# axN network device names, not axports port names.  Since kissattach
# takes the IP address from one of its parameters and the hardware callsign 
# comes from axports, we don't need to use ifconfig to set these params for 
# this port

# NOTE: the kissattach syntax has changed.  For systems based on the
# utils-2.1.42a package, use this syntax instead:
# /usr/sbin/kissattach -i 44.71.36.65 /dev/ttyS0 uhf

/usr/sbin/kissattach /dev/ttyS0 uhf 44.71.36.65

# set timers and other params
/usr/sbin/kissparms -p uhf -f no -l 50 -r 32 -s 320 -t 320

# ifconfig the port
/sbin/ifconfig ax0 broadcast 44.71.36.127 netmask 255.255.255.192
/sbin/ifconfig ax0 arp mtu 256 up
/sbin/route add -net 44.71.36.64 irtt 4000 ax0

# configure the Ottawa PI card -- we're using 19.2kbps, internally clocked
#
# The PI card driver used in kernels 2.0.x and older has been replaced
# by the "dmascc" driver.  If you're using an older kernel, here's the 
# syntax to use:
#/usr/sbin/piconfig pi0a speed 19200 txdelay 30 persist 32 slot 30 \
#	squelch 1
/usr/sbin/dmascc_cfg dmascc0 --speed 614400 --nrzi 1 --clocks 0x78 \
        --sqdelay 3 --txdelay 50 --persist 32 --slottime 50 --dma 3

# ifconfig for the PI card; for the old driver, change "dmascc0" to "pi0a"
/sbin/ifconfig dmascc0 44.71.36.130 hw ax25 w8apr-12
/sbin/ifconfig dmascc0 broadcast 44.71.36.255 netmasm 255.255.255.128
/sbin/ifconfig dmascc0 arp mtu 256 up
/sbin/route add -net 44.71.36.128 irtt 1500 mss 216 window 256 dmascc0

# now, use the axsetparms script to copy device params from
# /etc/ax25/parms into /proc/sys/net/ax25
/usr/sbin/axsetparms

# attach the netrom devices
# "netrom" is a dummy; "netbbs" connects to fbb;
# "netnod" connects to Linuxnode
# ip address via "-i" is necessary to keep from hosing the system
/usr/sbin/nrattach -i 44.71.36.1 netrom
/usr/sbin/nrattach -i 44.71.36.1 netbbs
/usr/sbin/nrattach -i 44.71.36.1 netnod

# set up the axip port
/usr/sbin/kissattach -i 44.71.36.1 /dev/ptyqf axip

# set associations so Fred and I can login to node locally
# passwords removed to protect the guilty
/usr/sbin/axparms -assoc ke8tq *******
/usr/sbin/axparms -assoc n8ur *******

# start the daemons
/usr/sbin/ax25d
/usr/sbin/netromd
/usr/sbin/mheardd
/usr/sbin/ax25ipd
/usr/sbin/axdigi &
/var/fbb/xfbb.sh -d &     # we've installed FBB in /var/fbb

Return to Linux AX.25 Configuration