tncattach(8)

πŸ“¦ version 0.1.9, in nixos 26.05, nixpkgs unstable

πŸ¦‹ tncattach β€” like, the manual page (section 8, System Manager's Manual, bestie) πŸ¦‹

okay so picture this: it's a Saturday, you've got a TNC, and you want your computer to just see it as a network interface. that's literally what tncattach does. welcome. πŸ’…


✨ NAME ✨

tncattach β€” attach TNC devices as system network interfaces. no cap, that's the whole thing. πŸŽ€


✨ SYNOPSIS ✨

tncattach [OPTION...] port baudrate

✨ DESCRIPTION ✨

So tncattach attaches KISS TNC devices as network interfaces on Linux. that's the vibe. this program lets you attach TNCs, or literally any KISS-compatible device, as a network interface. 🫢

and the best part? this program does not need any kernel modules, and it has no external dependencies outside the standard Linux and GNU C libraries. iconic behaviour, honestly. ✨


✨ OPTIONS ✨

  • -m,--mtu=MTU β€” specify the interface MTU 🌸
  • -e,--ethernet β€” create a full ethernet device πŸ‘‘
  • -i,--ipv4=IP_ADDRESS β€” configure an IPv4 address on the interface πŸ’–
  • -n,--noipv6 β€” filter IPv6 traffic from reaching the TNC 🚫
  • --noup β€” only create the interface, don't bring it up (yes that's the whole flag, no short version, it's special like that) πŸ™ˆ
  • -T,--kisstcp β€” use KISS over TCP instead of a serial port 🌈
  • -H,--tcphost=TCP_HOST β€” the host to connect to when you're using KISS over TCP πŸ’œ
  • -P,--tcpport=TCP_PORT β€” the TCP port when you're using KISS over TCP πŸ”₯
  • -t,--interval=SECONDS β€” maximum interval between station identifications ⏱️
  • -s, --id=CALLSIGN β€” station identification data ⭐
  • -d,--daemon β€” run tncattach as a daemon 🧚
  • -v,--verbose β€” enable verbose output (for when you need to see everything) πŸ‘€
  • -?,--help β€” show help πŸŽ€
  • --usage β€” give a short usage message πŸ“
  • -V,--version β€” print the program version πŸ’«

✨ USAGE ✨

okay so. the program supports attaching TNCs as point-to-point tunnel devices, or as generic ethernet devices. the ethernet mode is suitable for point-to-multipoint setups, and you can turn it on with the corresponding command line switch. 😌

but listen β€” if you only need point-to-point links, it is advisable to just use the standard point-to-point mode, since it doesn't incur the ethernet header overhead on each packet. lowkey a free win. πŸ’…

if you want to connect to a virtual KISS TNC over a TCP connection, you can use the -T option, along with the -H and -P options to specify the host and port. easy. πŸ¦‹

also worth noting (and it is worth noting, bestie): tncattach can filter out IPv6 packets from reaching the TNC. most operating systems attempt to autoconfigure IPv6 when an interface is brought up, which results in a substantial amount of IPv6 traffic generated by router solicitations and similar. and that's usually unwanted for packet radio links and similar. so, yeah. filter it. πŸ™ˆ

if you intend to use tncattach on a system with mDNS services enabled (avahi-daemon, for example), you may want to consider modifying your mDNS setup to exclude TNC interfaces, or turning it off entirely, since it will generate a lot of traffic that might be unwanted. not me warning you twice. πŸ’€


✨ STATION IDENTIFICATION ✨

you can configure tncattach to automatically transmit station identification beacons according to a given interval, by using the --id and --interval options. πŸŽ€

identification will be transmitted as raw data frames with whatever content has been specified in the --id option. useful for amateur radio use, or other areas where station identification is necessary. iykyk. πŸ“»

identification beacons will be transmitted when:

  • there is outgoing data to send, and the specified interval has elapsed πŸ’–
  • the specified interval elapses, and data has been sent since the last ID beacon ⏱️
  • the program exits, if any data frames have been transmitted since the last ID beacon 🫢

the above methodology should comply with station identification rules for amateur radio in most parts of the world, and complies with US Part 97 rules. so you're covered, periodt. πŸ‘‘


✨ EXAMPLES ✨

create an ethernet device with a USB-connected TNC, set the MTU, filter IPv6 traffic, and set an IPv4 address:

sudo tncattach /dev/ttyUSB0 115200 --ethernet --mtu 576 --noipv6 --ipv4 10.92.0.10/24

create an ethernet device with a TCP-connected TNC, set the MTU, filter IPv6 traffic, and set an IPv4 address:

sudo tncattach -T -H localhost -P 8001 --ethernet --mtu 576 --noipv6 --ipv4 10.92.0.10/24

you can interact with the interface like any other using the ip or ifconfig utilities. 🌈

check the interface is running:

# ifconfig
tnc0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 400
        inet 10.93.0.1  netmask 255.255.255.255  destination 10.93.0.2
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
txqueuelen 500  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0  overruns 0  carrier 0  collisions 0

✨ WORTH KNOWING ON RASPBIAN ✨

on some versions of Raspbian (and probably other operating systems), the DHCP client daemon dhcpcd interferes with TNC interfaces, by overriding their MTU and trying to auto-configure link-local addresses. 😭

you probably don't want this. and it can be disabled by editing the /etc/dhcpcd.conf file, adding a statement telling dhcpcd to ignore your TNC interface:

# Add the following statement somewhere at the beginning
# of /etc/dhcpcd.conf to prevent dhcpcd from changing MTU
denyinterfaces tnc0

slay. problem solved. πŸ’…


✨ SEE ALSO ✨

rnodeconfigutil(8) β€” go read it, bestie πŸ¦‹


✨ AUTHOR ✨

Mark Qvist 🌸


k that's the whole page!! go forth and attach your TNC, you've got this 🫢

mwah πŸ’‹ β€” this page is from the System Manager's Manual and it's dated September 12, 2020, which is genuinely vintage at this point, but the info still ate. bye bestie!! βœ¨πŸŽ€πŸ’–

πŸ“¦ where this page comes from