JNOS 2.0f COMMANDS MANUAL Document ID: JN-CMD2.0f (rev 1.0 - first draft) JNOS release 2.0f by Maiko Langelaar / VE4KLM based on the JNOS release 1.11 COMMANDS MANUAL by Robert Fahnestock / WH6IO and James P. Dugal / N5KNX A derivative of the JNOS Commands Manual by Johan K. Reinalda and Douglas E. Thompson based in part on the NOS Reference Manual by Phil Karn / KA9Q and Gerard van der Grinten / PA0GRI DISCLAIMER The authors make no guarantees, explicit or implied, about the functionality or any other aspect of this product. Refer to the manuals provided by the manufacturer of your equipment for installation procedures. Table of Contents Table of Contents Introduction Terminology Starting JNOS Status Display System Commands or ! # ? abort [] arp aprs aprsc asystat asyconfig at attach attended [off | on] axui [][digipeater string]] ax25 bbs bulletin callserver [ ] cd close cls comm <"text-string"> connect [] convers copy disconnect dir delete detach dialer domain dump [range] echo [accept|refuse] edit [] eol {standard | null] escape errors [ON | off] etelnet [] loginid password ettylink exit [] expire finger [...] fkey ftp [] ftype ftpclzw ftpslzw ftpmaxservers ftptdisc Table of Contents (continued) gate help hfdd history [] hop hostname [] http icmp ifconfig [] index [] info ip kick lock [password "] log [on|off] look [user | socket#] (/) ( lzw lzwlink mailmsg [" mbox [] memory mkdir mode [vc | datagram] more [...] motd ["message"] netrom nntp nrstat oldbid param [] pause ping [] [ [incflag>]]] popmail prompt [on|OFF] ps pwd rarp rdate record [off | ] remark remote rename repeat [milliseconds] command reset rewrite
rip rlogin rmdir route [] rspf session [] sessmgr shell [cmd [args]] skick Table of Contents (continued) smtp socket [] source split start status [on | off] stop tail taillog tcp telnet term trace [ [off | ] ttylink []126 third-party tip strace udp status upload write writeall ? Bibliography APPENDIX A JNOS MAILBOX USER COMMANDS APPENDIX B FTPUSERS PERMISSIONS APPENDIX C FORWARD.BBS APPENDIX D OF PACLEN, MSS, MTU and more APPENDIX E DOS Environmental Variables APPENDIX F SAMPLE REWRITE FILE Introduction This document addresses the JNOS command set. This manual is current as of the version indicated on the title page. Prior versions of commands or commands which have been deleted are not included. Also, this document addresses only the commands that are available in the VE4KLM distribution of JNOS 2.0. The official website for JNOS 2.0 is as follows : http://www.langelaar.net/projects/jnos2 The user interface for JNOS is very similar to most of the well-known BBS programs. This is to provide an easy transition for users. The user interface in the JNOS program is commonly called the 'mailbox' or bbs. These terms will be used interchangeably throughout this document when describing commands. This Commands Manual contains the commands and their descriptions for using and operating a JNOS tcp/ip and ax.25 packet switch, BBS, and network node. Also contained in this manual is information about the FORWARD.BBS, REWRITE, ALIAS, and USERS files used in a JNOS installation. Questions, remarks and suggestions about JNOS and/or it's documentation are welcome and should be sent to : Maiko Langelaar, VE4KLM 268 Doran Bay, Winnipeg, MB Canada, R2Y 1H5 Email : maiko@pcs.mb.ca Corrections (and comments) to the documentation must include the following : 1) Document ID – See the title page of your COMMANDS MANUAL 2) Page Number 3) Text as it exists This does not have to be the complete text. But it must be enough to ensure unambiguous identification of the area under discussion. 4) Text as it is proposed to be OR an explanation of the problem which I will then convert into the appropriate text. DO NOT send a copy of the whole document with revisions scattered throughout. Please send any corrections to VE4KLM by email or the above address. This particular document was created using Microsoft Word XP (2002). Terminology This section probably needs a bit of an overhaul, since the original documents were written back in the 1980’s. Here are some of the abbreviations and terminology used throughout this manual. You might find some of these humorous. HOSTNAME is the tcp/ip name of a computer or packet system. INTERNET is a worldwide high speed computer network. It has thousands of computers at schools, companies, and amateur packet radio systems connected to it. MTU is short for Maximum Transmission Unit, is the maximum data size in one packet. Most often the data referred to by MTU is the transported data, i.e. data frame in a network connection. With tcp/ip, the size of the tcp/ip frame inside the ax.25 packet is the MTU; with net/rom, the size of the data inside the netrom packet is the MTU. NRS is short for Net/Rom Serial protocol, is what TNCs with Net/Rom or TheNet eproms talk on the serial port. NODE and MAILBOX are terms used interchangeably for the user interface when connected to the system. PACLEN, or packet length, is most often used to refer to data size in a link packet. The data in an ax.25 packet can be up to paclen bytes. PORT or INTERFACE means the physical connection to a radio or other system (i.e., radio port or serial interface). These two terms are used interchangeably. RFCs, or Requests For Comment, are standard papers used on Internet to discuss and propose new networking protocols and other related topics. RSPF, or Radio Shortest Path First, is a tcp/ip routing protocol especially targeted at radio environments. RTT, or Round Trip Time, indicates the time needed for data to be sent and acknowledged. SLIP, or Serial Line IP, is a way to send IP frames over a serial port without using ax.25 or ethernet to carry the data. You can use SLIP to connect to PCs or Unix systems also running SLIP, and interchange tcp/ip data. PPP, or point-to-point protocol, is an alternative to SLIP, that has the advantage of automatically configuring IP addresses, compression, and MTU. Starting JNOS There are several command line options available when starting JNOS. These commands are used to set environment variables, select configuration and autoexec files, and other functions. Options should be separated by tabs or spaces. If there is an option argument, there should NOT be any whitespace between the option and the argument. The only option not preceded by '-' is the alternate startup file. -a Maximum number of AXIP + AXUDP interfaces. This option is available in JNOS 2.0 only, not previous versions. -b Use direct video for the screen output. -c# Set the number of COLUMNS on the screen to #. -drootdir Set the root directory for the configuration file path. This is overwritten by the file specified in the -f option config file. -e Pause after each error line in autoexec.nos -fnos.cfg Set JNOS config file and path names as indicated in the 'nos.cfg' file. This overrides the -d option. -gn Set trace colors, when tracing to console (ANSI.SYS needed): n=0 => none (default) n=1 => tailor to gray-scale monitor n=2 => tailor to color monitor -i always re-index mail files at startup -I never re-index mail files at startup (instead, test at 1st access) -l Do NOT delete .lck files in the mail and news subdirectories -mn Set the default screen swap mode. n = 0 Use EMS (If compiled and available.) The default is that EMS is available n = 2 Use memory. Default if NO EMS available. n = 3 Use a temporary disk file -n No trace session -r# Set the number of ROWS on the screen to # -R Maximum number of IP routes that can have dynamic gateways. This option is available in JNOS 2.0 only, not previous versions. -t trace ‘autoexec.nos’ file. You will be asked before each if you want to execute it - 'y' accepts, anything else skips the line. -u# Set the number of status lines, valid values are 0 to 3. -v Verbose. Print each line from autoexec.nos before parsing. -wf+b Set foreground/background colors for system status default: white on magenta -xf+b Set foreground/background colors for session status default: white on blue -yf+b Set foreground/background colors for 'main' window. default: the system colors when JNOS starts (most often lightgray on black) -zf+b Set foreground/background colors for 'split' window default: white on green 0=black 1=blue 2=green 3=cyan 4=red 5=magenta 6=brown 7=white/gray autoexec.new Name of the startup file. Default is 'autoexec.nos' or as set with the ‘-fnos.cfg’ option. UNIX additions to the command-line arguments : -C allow core files to be created following certain errors -D disallow the interval timer...testing vestige from 1.09 JNOS -Smgr:o Set default session manager to , with options -Tmgr:o Set default trace session manager to , with options Status Display JNOS has a (up to) 3-line status display which shows: first line The time, heap and core free memory, number of connections to the different servers, then a list of active sessions, where sessions with data waiting are blinking. second line The users connected to the bbs, each having a status symbol in front, meaning : none - user is idle * - user is a bbs @ - user is in sysop mode ! - user has gatewayed out # - user is reading or sending mail = - user is transferring data (up/download) ^ - user is in convers or sysop-chat mode ? - use is in none of the above, but not idle... For example: BBS: *w0rli johan #ka7ehk !n7ifj The first two lines are known as the ‘system’ window. third line The 3rd line shows data depending on the current session. Always displayed are the current session number and type. If the sessions are network connections, displayed are remote connection name, tx-queue (bytes for tcp, packets for ax.25), and state of the connection. It then shows the retry timer, with current time left, and initial value. In 'repeat', 'more' or 'look' sessions, the 3rd line show the command, filename or user/socket for the session. The number of status lines displayed can be set with the '-uX' commands line option. '-u0' turns it off. Default is '-u3' Note - if tracing is enabled, this will 'bleed' through the status window. This is NOT a bug, but is inherent to the way tracing works in JNOS. (It would take a major rewrite to fix.) The status window will be rebuilt about twice a second to overcome this. System Commands This section describes the commands recognized. Syntax is : command command literal_parameter command subcommand command [] command a | b Many commands take subcommands, parameters, or both, which may in turn be optional or required. In general, if a required subcommand or parameter is omitted, an error message will summarize the available subcommands or required parameters. (Giving a '?' in place of the subcommand will also generate the message. This method is useful when the command word alone is a valid command.) If a command takes an optional value parameter, issuing the command without the parameter generally displays the current value of the variable. (Exceptions to this rule are noted in the individual command descriptions.) Two or more parameters separated by vertical bar(s) '|' denote a choice between the specified values. When one of the choices is default, that choice will be in UPPERCASE. Optional parameters are shown enclosed in [brackets]. Parameters enclosed in should be replaced with actual values or strings. The generic notation for number values is , and for string values, it is . For example, the notation means the actual host or gateway callsign or id. Numerical defaults are explicitly stated as such, e.g., "Default = 7." All commands and many subcommands may be abbreviated. You only need type enough of a command's name to distinguish it from others that begin with the same series of letters. Parameters, however, must be typed in full. All commands are printed in bold (if you have the version of this document that supports fancy formatting), and most commands have an example following the textual description of the commands. Here now follows a comprehensive set of commands for JNOS. or The ENTER key (or carriage return) on an empty line - while in command mode puts you in converse mode with the current session. If there is no current session, JNOS remains in command mode and reissues the 'jnos>' prompt. ! is an alias for the shell command. # Commands starting with the hash mark (#) are ignored. The hash mark is mainly useful for comments in the autoexec.nos. ? is the same as the 'help' command. abort [] Abort a FTP get, put or dir operation in progress. If issued without an argument, the current session is aborted. This command works only on FTP sessions. When receiving a file, abort simply resets the data connection; the next incoming data packet will generate a TCP RST (reset) response to clear the remote server. When sending a file, abort sends a premature end-of-file. Note that in both cases abort will leave a partial copy of the file on the destination machine, which must be removed manually if it is unwanted. arp Display the Address Resolution Protocol table that maps IP addresses to their subnet (link) addresses on subnetworks capable of broadcasting. For each IP address entry the subnet type (e.g., AX.25), subnet address and time to expiration is shown. If the link address is currently unknown, the number of IP datagrams awaiting resolution is also shown. arp add ether | ax25 | netrom |arcnet | mac Used to add a permanent entry to the ARP table. It will not time out as will an automatically created entry, but must be removed with the 'arp drop' command. For example : arp add 44.135.124.19 ax25 ve4wws-9 vhf arp drop ether | ax25 | netrom |arcnet | mac Used to delete a permanent entry from the arp table. For example : arp delete 44.135.124.19 ax25 vhf arp eaves [] [on | off] Display or set the 'arp eavesdrop' function per interface. If set, all arp replies overheard on the interface will be logged in the arp table. This speeds up arp discovery, but might build a huge arp table taking up lots of memory. The default for each interface is off. For example : arp eaves vhf on arp flush Drop all automatically-created entries in the ARP table - permanent entries are not affected. arp maxq [n] Display or set the maximum number of packets to be buffered waiting for an arp resolution to finish. Default = 5. For example : arp maxq 5 arp poll [] [on | off] Display or set the 'arp keepalive polling' per interface. If set, when an arp entry expires, a query will be sent for the address. This keeps the arp table fresh, but possibly retains many unneeded entries. For example : arp poll port1 on arp publish ax25 | netrom This command is similar to the 'arp add' command, but the system will also respond to any ARP request it sees on the network that seeks the specified address. Use this feature with great care ! For example : arp publish 44.26.1.19 ax25 wg7j-2 port1 arp sort [on | off] Sorts the arp display. aprs (only in JNOS 2.0 and patched 1.11f systems) The ‘aprs’ command is used to configure and manage NOSaprs. NOSaprs is an APRS server / internet gateway integrated into JNOS itself. Those that are already running JNOS internet gateways can easily start to support their local APRS community by simply adding another radio port for 144.390 if they want and getting a JNOS binary that has the NOSaprs module compiled into it. NOSaprs has it's very own (detailed) user manual. aprsc (only in JNOS 2.0 and patched 1.11f systems) Starts up a basic APRS messaging client, allowing the sysop or any logged in mailbox user to exchange APRS messages with other APRS stations, either locally on an RF port, or via the APRS Internet System. Refer to the NOSaprs user manual for complete details. asystat (DOS version) Display statistics on attached asynchronous communications interfaces (8250 or 16550A), if any. For example: tnc: [NS16550A] [trigger 0xc0] [rlsd line control] 19200 bps [@ 3f8,4] RX: 929462 int, 3683653 chr, 0 hw over, 6 hw hi, 17210 fifo TO, 0 sw over, 126 sw hi TX: 946381 int, 7400204 chr, 0 q, 79401 MS int, 40 THRE TO tnc2: [NS16550A] [trigger 0xc0] 9600 bps [@ 2f8,3] RX: 722895 int, 2865467 chr, 0 hw over, 8 hw hi, 13075 fifo TO, 0 sw over, 248 sw hi TX: 246420 int, 1889156 chr, 0 q, 1 MS int, 16 THRE TO The display for each port consists of three lines. The first line gives the port label and the configuration flags; these indicate whether the port is a 16550A chip, the trigger character if any, whether CTS flow control is enabled, whether RLSD (carrier detect) line control is enabled, the speed in bits per second, and the port address and IRQ number in hexadecimal. (Receiving the trigger character causes the driver to signal upper layer software that data is ready; it is automatically set to the appropriate frame end character for SLIP, PPP and NRS lines.) The second line of the status display shows receiver (RX) event counts: the total number of receive interrupts, received characters, receiver overruns (lost characters) and the receiver high water mark. The high water mark is the maximum number of characters ever read from the device during a single interrupt. This is useful for monitoring system interrupt latency margins as it shows how close the port hardware has come to overflowing due to the inability of the CPU to respond to a receiver interrupt in time. 8250 chips have no FIFO, so the high water mark cannot go higher than 2 before overruns occur. The 16550A chip, however, has a 16-byte receive FIFO which the software programs to interrupt the CPU when the FIFO is one-quarter full. The high water mark should typically be 4 or 5 when a 16550A is used; higher values indicate that the CPU has at least once been slow to respond to a receiver interrupt. When the 16550A is used, a count of FIFO timeouts is also displayed on the RX status line. These are generated automatically by the 16550A when three character intervals go by with more than 0 but less than 4 characters in the FIFO. Since the characters that make up a SLIP or NRS frame are normally sent at full line speed, this count will usually be a lower bound on the number of frames received on the port, as only the last fragment of a frame generally results in a timeout (and then only when the frame is not a multiple of 4 bytes long.) Finally, the software fifo overruns and high water mark are displayed. These indicate whether the parameter on the attach command needs to be adjusted (see the Attach Commands chapter). The third line shows transmit (TX) statistics, including a total count of transmit interrupts, transmitted characters, the length of the transmit queue in bytes, the number of status interrupts, and the number of THRE timeouts. The status interrupt count will be zero unless CTS flow control or RLSD line control has been enabled. The THRE timeout is a stopgap measure to catch lost transmit interrupts, which seem to happen when there is a lot of activity (ideally, this will be zero). asystat (linux version) The asystat command for the linux version of JNOS is somewhat different from the DOS version. For example: 144.99: cua0, 9600 bps, packet size 255, RTS/CTS disabled, carrier disabled RX: ints 2 chars 73 puts 2 rxqueue 5 qlen 0 ovq 0 block 0 buf 1024 TX: ints 1 chars 57 gets 0 txqueue 2 qlen 0 ovq 0 block 0 linux: ttype, 38400 bps, non-blocking, RTS/CTS disabled, carrier disabled RX: ints 0 chars 0 puts 0 rxqueue 2 qlen 0 ovq 0 block 0 buf 1024 TX: ints 0 chars 0 gets 0 txqueue 2 qlen 0 ovq 0 block 0 ints is the number of times pwait() returned control to the rx or tx task, indicating that select() detected pending data on input or a packet became available for output. chars is the number of characters read/written. puts number of times received data was placed in the packet Hopper. gets number of times data was taken out of the send queue and written to the device. rxqueue is described in the asyconfig command helpfile. txqueue is described in the asyconfig command helpfile. qlen is the instantaneous queue size (number of packets). ovq is the number of times queue flow control (described in asyconfig) was triggered. block is the number of times read/write tried to block (in the case of reads, the number of times it tried to block after data was claimed to be available). buf is the current receive buffer size, as specified in the attach statement or the "asyconfig" command. asyconfig The 'asyconfig' command allows the sysop to configure the size of the receive and transmit queues for a particular async interface, as well as the size of the input I/O buffer for an async interface. asyconfig rxqueue [# of messages] asyconfig txqueue [# of messages] asyconfig bufsize [# of bytes] If you do not specify the 4th parameter, then JNOS will simply display the value currently in affect. By default, the max number of messages on a queue is 1, and the maximum buffer size for an async interface will be the 'bufsize' argument specified in the original attach command. You can also display statistics for a particular async interface. asyconfig status The format of the output display is identical to the 'asystat' command. at The 'at' command is used to provide automatic starting of other JNOS commands at predetermined times. Think of it as the NOS version of the unix/linux crontab. Without any arguments, ‘at’ displays each scheduled ‘at’ command and its id number, so that 'at kill n' can be used (see further below). at