IRTT-SERVER(1)

๐Ÿ“ฆ
version 0.9.1 ยท 2 versions
, in fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

๐Ÿ’– IRTT-SERVER(1) ๐Ÿ’–

okay bestie, welcome to the IRTT Manual โ€” this is the page for irtt-server, aka the Isochronous Round-Trip Time Server. sit down, grab a boba, we're doing networking ๐Ÿง‹โœจ


โœจ NAME โœจ

irtt-server โ€” Isochronous Round-Trip Time Server ๐Ÿ•ฐ๏ธ๐Ÿ’ซ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

irtt server [args]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

irtt server is, and I cannot stress this enough, the server for irtt(1). that's the whole vibe. it's the one that sits there and serves. main character energy fr fr ๐Ÿ‘‘


๐Ÿ’… OPTIONS ๐Ÿ’…

  • -b addresses โ€” bind addresses, default ":2112". it's a comma separated list, and each one can be:
    • :port โ€” unspecified address with port. โš ๏ธ use with care, bestie, that's the wild-west option
    • host โ€” host with the default port 2112, see Host formats below
    • host:port โ€” host with a specified port, see Host formats below
    • %iface โ€” all addresses on interface iface with default port 2112
    • %iface:port โ€” all addresses on interface iface with port
Note: iface strings may contain * to match multiple interfaces โœจ
  • -d duration โ€” max test duration, or 0 for no maximum (default 0s, see Duration units below)
  • -i interval โ€” min send interval, or 0 for no minimum (default 10ms, see Duration units below)
  • -l length โ€” max packet length (default 0), or 0 for no maximum. heads up: numbers less than the size of the required headers will cause test packets to be dropped ๐Ÿ’€
  • --hmac=key โ€” add HMAC with key (0x for hex) to all packets. this gives you:
    • dropping of all packets without a correct HMAC ๐Ÿšฎ
    • protection for the server against unauthorized discovery and use ๐Ÿ”’
  • --syslog=uri โ€” log events to syslog (default: don't use syslog). URI format is protocol://host:port/tag. examples:
    • local: โ€” log to local syslog, default tag irtt
    • local:/irttsrv โ€” log to local syslog, tag irttsrv
    • udp://logsrv:514/irttsrv โ€” UDP to logsrv:514, tag irttsrv
    • tcp://logsrv:8514/ โ€” TCP to logsrv:8514, default tag irtt
Note: not available on Windows, Plan 9 or Google Native Client ๐Ÿ˜ญ
  • --timeout=duration โ€” timeout for closing connections if no requests received on a connection (default 1m0s, see Duration units below). 0 means no timeout โ€” and bestie, that is not recommended, especially on public servers. max client interval will be restricted to timeout/4 โณ
  • --pburst=# โ€” packet burst allowed before enforcing minimum interval (default 5)
  • --fill=fill โ€” payload fill if not requested (default pattern:69727474). possible values:
    • none โ€” echo client payload. insecure on public servers ๐Ÿ™ˆ
    • rand โ€” use random bytes from Go's math.rand ๐ŸŽฒ
    • pattern:XX โ€” use repeating pattern of hex (default 69727474)
  • --allow-fills=fills โ€” comma separated patterns of fill requests to allow (default rand). see options for --fill. notes:
    • patterns may contain * for matching โœจ
    • allowing non-random fills is insecure on public servers
    • use --allow-fills="" to disallow all fill requests
  • --tstamp=modes โ€” timestamp modes to allow (default dual). possible values:
    • none โ€” don't allow any timestamps
    • single โ€” allow a single timestamp (send, receive or midpoint)
    • dual โ€” allow dual timestamps
  • --no-dscp โ€” don't allow setting dscp (default false)
  • --set-src-ip โ€” set source IP address on all outgoing packets from listeners on unspecified IP addresses. use for more reliable reply routing, but ngl it increases per-packet heap allocations ๐Ÿ˜ฌ
  • --thread โ€” lock request handling goroutines to OS threads ๐Ÿงต
  • -h โ€” show help ๐Ÿ†˜
  • -v โ€” show version ๐Ÿท๏ธ

๐ŸŽ€ Host formats ๐ŸŽ€

hosts may be either hostnames (for IPv4 or IPv6) or IP addresses. IPv6 addresses must be surrounded by brackets and may include a zone after the % character. examples, bestie:

  • IPv4 IP โ€” 192.168.1.10
  • IPv6 IP โ€” [2001:db8:8f::2/32]
  • IPv4/6 hostname โ€” localhost
Note: IPv6 addresses must be quoted in most shells ๐Ÿ’…

โฑ๏ธ Duration units โฑ๏ธ

durations are a sequence of decimal numbers, each with optional fraction, and unit suffix, like "300ms", "1m30s" or "2.5m". and the iconic part: sanity not enforced ๐Ÿ˜Œโœจ

  • h โ€” hours
  • m โ€” minutes
  • s โ€” seconds
  • ms โ€” milliseconds
  • ns โ€” nanoseconds

๐Ÿ”’ SECURITY ๐Ÿ”’

running an IRTT server that's open to the outside world requires some additional attention, no cap. for starters, the command line flags should be used to, at a minimum:

  • restrict the duration (-d), interval (-i) and length (-l) of tests, particularly for public servers
  • set an HMAC key (--hmac) for private servers to prevent unauthorized discovery and use ๐Ÿ”

in addition, there are various systemd(1) options available for securing services. the irtt.service file included with the distribution sets some commonly used options, but should not be considered exhaustive.

to secure a server for public use, additional steps may be taken that are outside of the scope of this documentation, including but not limited to:

  • installing irtt in an unprivileged container ๐Ÿ“ฆ
  • setting up an iptables firewall (only UDP port 2112 must be open) ๐Ÿ”ฅ
  • setting up a chroot jail ๐Ÿฐ

it should be noted that there are no known security vulnerabilities in the Go language at this time, and the steps above, in particular the chroot jail, may or may not serve to enhance security in any way. Go-based servers are generally regarded as safe because of Go's high-level language constructs for memory management, and at this time IRTT makes no use of Go's unsafe (https://golang.org/pkg/unsafe/) package. ๐Ÿ›ก๏ธ


๐Ÿšฆ EXIT STATUS ๐Ÿšฆ

irtt server exits with one of the following status codes:

  • 0 โ€” Success ๐ŸŽ‰
  • 1 โ€” Runtime error ๐Ÿ˜ญ
  • 2 โ€” Command line error ๐Ÿคฆ
  • 3 โ€” Two interrupt signals received ๐Ÿ’€๐Ÿ’€

๐ŸŒˆ EXAMPLES ๐ŸŒˆ

  • $ irtt server

starts the server and listens on all addresses (unspecified address) โœจ

  • $ irtt server -d 30s -i 20ms -l 256 --fill=rand --allow-fills=""

starts the server and listens on all addresses, setting the maximum test duration to 30 seconds, minimum interval to 20 ms, and maximum packet length to 256 bytes. disallows fill requests and forces all return packets to be filled with random data. ๐ŸŽฒ

  • $ irtt server -b 192.168.100.11:64381 --hmac=secret

starts the server and binds to IPv4 address 192.168.100.11, port 64381. requires a valid HMAC on all packets with the key secret, otherwise packets are dropped. ๐Ÿšฎ๐Ÿ”‘


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€


and that's the whole page bestie, you ate that ๐Ÿฝ๏ธ๐Ÿ’… this was v0.9.0, dated February 11, 2018 โ€” yeah it's an oldie but she's still iconic, mwah ๐Ÿซถ๐Ÿ’–

๐Ÿ“ฆ where this page comes from