JNOS COMMANDS MANUAL (Document ID: JN-CMD1.11) JNOS release 1.11 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. COPYRIGHTS AND TRADEMARKS; Unix is a Registered Trademark of AT&T. NET.EXE program (C) Copyright 1992 by Phil R. Karn, KA9Q. JNOS is based on work (C) Copyright 1991 by Phil R. Karn, KA9Q, and other contributors. JNOS (C) Copyright 1994 by Johan K. Reinalda, WG7J MS-DOS is a registered trademark of Microsoft, Inc. NET/ROM software (C) Copyright 1987 Software 2000, Inc. NET/ROM is a trademark of Software 2000, Inc. OS/2 is a registered trademark of International Business Machines, Inc. Windows 3.0, Windows 3.1, Windows NT, and Microsoft Word are all registered trademarks of Microsoft, Inc. TABLE OF CONTENTS; COPYRIGHTS AND TRADEMARKS TABLE OF CONTENTS INTRODUCTION TERMINOLOGY STARTING JNOS STATUS DISPLAY SYSTEM COMMANDS ! # ? abort [] arp asystat at attach attended [off | on] axui [][digipeater string]] ax25 bbs bulletin callserver2 [ ] comm <"text-string"> connect [] convers delete dialer domain DOS Environmental Variables dump [range] echo [accept|refuse] edit [] eol {standard | null] errors [ON | off] etelnet [] loginid password ettylink exit [] expire finger [...] Fkey Ftp [] gate help or ? history [] hop TABLE OF CONTENTS (CONT'D) hostname [] http icmp ifconfig [] index [] info ip lock [password "] log [on|off] look [user | socket#] (/) ( lzw 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 rewrite
rip rlogin rmdir route [] rspf session [] shell [cmd [args]] skick TABLE OF CONTENTS (CONT'D) smtp socket [] source split start status [on | off] stop tail taillog tcp telnet term trace [ [off | ] ttylink []126 udp status 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 Information Files 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 N5KNX (previously the WG7J) distribution compile (uses distconf.h). Information about commands for other modules which are not included in the "standard" N5KNX compile may be found via online help (if command helpfiles were installed on disk) or in the readme.now file. 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 are welcome and should be sent to: James P. Dugal, N5KNX P. O. Box 44844 Lafayette, LA 70504 U.S.A. email: jpd@usl.edu (or N5KNX@K5ARH.#LFT.LA.USA.NA) or for the documentation only: Bob Fahnestock, WH6IO 156 Ardmore Way Benicia, CA 94510 email: rvf@tdl.com or wh6io@benicia.ampr.org (or packet WH6IO@WH6IO#NCA.CA.USA.NA) Corrections (and comments) to the documentation must include the following information: 1) Document ID (See the Title Page) 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 convert into appropriate text. *DO NOT* send a copy of the whole document with revisions scattered throughout. Send the corrections to WH6IO at one of the addresses on the preceding page. If it comes to the Street Address, please ensure you send it on floppy disk, IBM format. The documents have been prepared using Microsoft Word Version 6.0. Submittals using MS Word 4.0 , 5.0, or 6.0 format, WordPerfect, plain ASCII text, and other word processor formats are easily handled. TERMINOLOGY; Here are some of the abbreviations and terminology used throughout this manual. 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, or 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, or 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 which can be exercised 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 -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 configuration 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 in and available.) : Default is EMS 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 # -t : trace the 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-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 -fnos.cfg 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 the default session manager to , with options -Tmgr:o : set the default trace session manager to , with options STATUS DISPLAY; JNOS now has a (up to) 3-line status display which shows: On the first line: 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. The 2nd line shows: the users connected to the bbs. A status symbol in front means one of the following: 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... Eg: BBS: *w0rli johan #ka7ehk !n7ifj (lines 1 and 2 are the 'system' window) On the 3rd line is 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. The following section contains the comprehensive set of commands for JNOS. ; Entering a carriage return (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. !; 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. ?; 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 ax25 | netrom or arp add ether | ax25 | netrom | arcnet | Add a permanent entry to the table. It will not time out as will an automatically created entry, but must be removed with the 'arp drop' command. arp add 44.26.0.19 ax25 wg7j-2 port1 arp drop ax25 | netrom or arp drop ether | ax25 | netrom | arcnet Delete a permanent entry from the arp table. arp delete 44.26.0.19 ax25 port1 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. Default for each interface is off. # Set arp eavesdrop on interface port1 arp eaves port1 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. 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. 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!) arp publish 44.26.1.19 ax25 wg7j-2 port1 arp sort [ON | off] Sorts the arp display. asystat; Display statistics on attached asynchronous communications interfaces (8250 or 16550A), if any. 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). The "asystat" command for UNIX JNOS is somewhat different from the DOS version. 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. at; The 'at' command is used to provide automatic starting of other JNOS commands at predetermined times. at This form displays each scheduled at command and its id number, so that 'at kill n' can be used (see below). at time time takes the form yymmddhhmm (specific date/time) hhmm (next occurrence of this time) whhmm (next occurrence of this time on specified weekday. 0=Sun,1=Mon, ..., 6=Sat) mm (mm mins after next hour) now+hhmm (offset from present time) is any legal JNOS command. Multiple word commands must be enclosed in double quotes (" "). Commands which invoke the DOS shell must include '!' or shell as the first word in order for JNOS to recognize that an external command is to be invoked. If the external command requires the command processor, then "/c" may be given as the second word. Example: "! /c x.bat>> e:foo". To automatically reissue the at command when the timer matures, append a "+" character to the string. Example: at 0130 "! cleanup+" Example: at now+0100 "ax25 flush+" Example: at 0600 "writeall \"Il est 6h00 GMT\"+" at k [...] This form of the 'at' command kills (i.e., deletes) jobs ... attach; attach