WAMPES Reference Manual

Version 960528

Dieter Deyke, DK5SG/N0PRA
deyke@fc.hp.com


Table of Contents

  1. Credits
  2. The /tcp/net Program
    1. Startup
    2. Environment variables
  3. Console modes
  4. Commands
    1. <cr>
    2. !
    3. ?
    4. arp
    5. asystat
    6. attach
    7. ax25
    8. axip
    9. bye
    10. close
    11. connect
    12. delete
    13. disconnect
    14. domain
    15. echo
    16. eol
    17. escape
    18. exit
    19. finger
    20. fkey
    21. flexnet
    22. ftp
    23. hostname
    24. icmp
    25. ifconfig
    26. ip
    27. ipfilter
    28. kick
    29. log
    30. login
    31. memory
    32. mkdir
    33. netrom
    34. nrstat
    35. param
    36. ping
    37. ps
    38. record
    39. remote
    40. rename
    41. repeat
    42. reset
    43. rip
    44. rmdir
    45. route
    46. session
    47. shell
    48. smtp
    49. sntp
    50. source
    51. start
    52. status
    53. stop
    54. tcp
    55. telnet
    56. topt
    57. trace
    58. udp
    59. upload
  5. FTP Subcommands
    1. abort
    2. append
    3. ascii
    4. binary
    5. bye
    6. cd
    7. cdup
    8. delete
    9. dir
    10. get
    11. image
    12. ls
    13. mkdir
    14. modtime
    15. nlist
    16. password
    17. put
    18. pwd
    19. quit
    20. quote
    21. recv
    22. reget
    23. restart
    24. rhelp
    25. rmdir
    26. send
    27. size
    28. system
    29. type
    30. user
  6. Setting Paclen, Maxframe, MTU, MSS and Window
    1. AX.25 Parameters
      1. Paclen
      2. Maxframe
    2. IP and TCP Parameters
      1. MTU
      2. MSS
      3. Window
    3. Discussion
      1. IP Fragmentation vs AX.25 Segmentation
      2. Setting Paclen
      3. Setting Maxframe
      4. Setting MTU
      5. Setting MSS
      6. Setting Window
    4. Summary

1. Credits

This manual is based in part on publications authored by
Phil Karn, KA9Q
Bdale Garbee, N3EUA
Gerard van der Grinten, PA0GRI

2. The /tcp/net Program

The executable file /tcp/net (further called WAMPES) provides Internet (TCP/IP), NET/ROM and AX.25 facilities. Because it has an internal multi-tasking system, WAMPES can act simultaneously as a client, a server and a packet switch for all three sets of protocols. That is, while a local user accesses remote services, the system can also provide those same services to remote users while also switching IP, NET/ROM and AX.25 packets and frames between other client and server nodes.

The keyboard and display is used by the local operator to control both host and gateway level functions, for which a number of commands are provided.

2.1 Startup

/tcp/net [-g] [-v] [startup file]
When WAMPES is executed without arguments, it attempts to open the file /tcp/net.rc. If it exists, it is read and executed as though its contents were typed on the console as commands. This feature is useful for configuring network addresses, attaching communication interfaces, and starting the various services.

The following command-line options are accepted:

-g
The -g option causes WAMPES to run in debug mode. In debug mode, WAMPES will NOT:
-v
The -v option allows the user to view command execution during the startup of WAMPES. It echoes the commands read from the startup file before they are executed. This is a nice help if WAMPES stops (hangs) during initialization.
After all command-line options, the name of an alternate startup file may be specified. This file is then opened and read instead of /tcp/net.rc.

2.2 Environment variables

The following environment variables are read by WAMPES:
TZ
The TZ variable should be set to the local timezone. Default is TZ=MEZ-1MESZ. This is used in various time stamps.

3. Console modes

The console may be in one of two modes: command mode or converse mode. In command mode the prompt hostname> is displayed and any of the commands described in the Commands chapter may be entered. In converse mode keyboard input is processed according to the current session.

Sessions come in many types: Telnet, FTP, AX25, Finger, and NETROM.

In a Telnet, AX25, or NETROM session keyboard input is sent to the remote system, and any output from the remote system is displayed on the console. In a FTP session keyboard input has to consist of known local commands (see the FTP Subcommands chapter). A Finger session is used to peek at a remote system for its users (and what they are doing on some UNIX systems).

The keyboard also has cooked and raw states. In cooked state input is line-at-a-time. The user may use the editing keys described below to edit the line. Hitting either Return or Linefeed passes the complete line to the application. In raw mode each character is immediately passed to the application as it is typed. The keyboard is always in cooked state in command mode. It is also cooked in converse mode on an AX25, FTP, or NETROM session. In a Telnet session it depends on whether the remote end has issued (and the local end has accepted) the Telnet WILL ECHO option (see the echo command).

To escape back to command mode the user must enter the escape character, which is by default Control-] (0x1d, ASCII GS). Note that this is distinct from the ASCII character of the same name. The escape character can be changed (see the escape command). Setting the escape character to an unreachable code renders a system inescapable and the user hung in a session.

The following editing keys are available:

Control-A
Home
Shift-LeftArrow
Move cursor to start of line.

Escape b
Move cursor backward one word.

Control-B
LeftArrow
Move cursor backward one character.

Control-F
RightArrow
Move cursor forward one character.

Escape f
Move cursor forward one word.

Control-E
Shift-Home
Shift-RightArrow
Move cursor to end of line.

Control-W
Escape Backspace
Escape DEL
Delete previous word.

Control-H
Backspace
DEL
Delete previous character.

Escape d
Delete current word.

Control-D
DeleteChar
Delete current character.

Control-K
ClearLine
Delete from cursor to end of line.

Control-U
Control-X
DeleteLine
Delete entire line.

Control-V
Escape next character. Editing characters can be entered in a command line or in a search string if preceded by a Control-V. Control-V removes the next character's editing features (if any).

Control-L
Linefeed and print line.

Control-P
Prev
UpArrow
Fetch previous command. Each time Control-P is entered, the next previous command in the history list is accessed.

Control-N
Next
DownArrow
Fetch next command. Each time Control-N is entered, the next command in the history list is accessed.

Control-Rstring
Search the history list for a previous command line containing string. string is terminated by a Return or Linefeed.

Control-J
Control-M
Enter
Return
Append Return+Linefeed, then execute line.

Control-T
Execute line without appending Return+Linefeed to it.

4. Commands

This section describes the commands recognized in command mode, or within a startup file such as net.rc. These are given in the following notation:
command
command parameter
command subcommand parameter
command [optional_parameter]
command a|b
Many commands take subcommands or parameters, which may 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 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. Optional parameters are shown enclosed in [brackets], and a parameter shown as parameter should be replaced with an actual value or string. For example, the notation hostid denotes an actual host or gateway, which may be specified in one of two ways: as a numeric IP address in dotted decimal notation (eg. 44.0.0.1), or as a symbolic name stored in the domain name database.

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.

FTP subcommands (eg. put, get, dir, etc) are recognized only in converse mode with the appropriate FTP session, they are not recognized in command mode (see the FTP Subcommands chapter).

A word beginning with # causes that word and all the following characters on the same line to be ignored.

4.1 <cr>

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, WAMPES remains in command mode.

4.2 ! shell_command_line

An alias for the shell command.

4.3 ?

Display a brief summary of top-level commands.

4.4 arp [subcommand]

Without an argument, display the Address Resolution Protocol table that maps IP addresses to their subnet (link) addresses. For each IP address entry the subnet type (eg. ax25, netrom), link address, and time to expiration is shown. If the link address is currently unknown, the number of IP datagrams awaiting resolution is also shown.

4.4.1 arp add hostid ax25|netrom link_addr

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.

4.4.2 arp drop hostid ax25|netrom

Remove the specified entry from the ARP table.

4.4.3 arp flush

Drop all automatically created entries from the ARP table, permanent entries are not affected.

4.4.4 arp publish hostid ax25|netrom link_addr

The arp publish command is similar to the arp add command, but WAMPES will also respond to any ARP request it sees on the network that seeks the specified address. This is commonly referred to as "proxy arp", and is considered a fairly dangerous tool. The basic idea is that if you have two machines, one on the air with a TNC, and one connected to the first with a slip link, you might want the first machine to publish it's own AX.25 address as the right answer for ARP queries addressing the second machine. This way, the rest of the world doesn't know the second machine isn't really on the air. Use this feature with great care.

4.5 asystat [interface ...]

Display statistics on the specified or all attached asynchronous communications interfaces. The display for each interface consists of three lines:

4.6 attach type [type specific options]

Configure and attach an interface to the system. The details are highly interface type dependent.

4.6.1 attach asy 0 0 encapsulation name 0 mtu speed

Configure and attach an asynchronous communications interface to the system. See the ifconfig encapsulation command for the list of available encapsulations. name specifies the name of the interface, and is also used to open the interface device file in the directory /dev. mtu is the Maximum Transmission Unit size, in bytes. Datagrams larger than this limit will be fragmented at the IP layer into smaller pieces. For AX.25 UI frames, this limits the size of the information field. For AX.25 I frames, however, the ax25 paclen parameter is also relevant. If the datagram or fragment is still larger than paclen, it is also fragmented at the AX.25 level (as opposed to the IP level) before transmission. See the Setting Paclen, Maxframe, MTU, MSS and Window chapter for more information. speed is the transmission speed in bits per second (eg. 9600).

If any I/O error is encountered reading or writing the interface device file, the interface will be marked DOWN. Use the param name Up command to re-enable the interface.

4.6.2 attach asy ip-addr port encapsulation name 0 mtu speed

Configure and attach a UNIX TCP connection based interface to the system. This is very similar to the asynchronous communications interface described above, but instead of talking directly to a hardware device file, this interface type will open a UNIX TCP connection to ip-addr and port. The primary use of this interface type is to talk to some TNC which is connected to the system via the LAN. ip-addr is the destination IP address, and has to be specified as one hexadecimal number. For example, 127.0.0.1 has to be given as 7f000001. port is the numeric destination TCP port address. See the ifconfig encapsulation command for the list of available encapsulations. name specifies the name of the interface. mtu is the Maximum Transmission Unit size, in bytes. Datagrams larger than this limit will be fragmented at the IP layer into smaller pieces. For AX.25 UI frames, this limits the size of the information field. For AX.25 I frames, however, the ax25 paclen parameter is also relevant. If the datagram or fragment is still larger than paclen, it is also fragmented at the AX.25 level (as opposed to the IP level) before transmission. See the Setting Paclen, Maxframe, MTU, MSS and Window chapter for more information. speed must be specified, but is not used.

If any I/O error is encountered reading or writing the UNIX TCP connection, the interface will be marked DOWN. Use the param name Up command to re-enable the interface.

4.6.3 attach axip [name [ip|udp [port]]]

This creates an AX.25 frame encapsulator for transmission of AX.25 frames over the UNIX's networking system. The interface will be named name, or axip if name is not specified. The default encapsulation will use IP protocol 93, but it is possible to use UDP instead. If port is specified that IP protocol number or UDP port number will be used instead of 93. See also RFC1226 and the axip command.

4.6.4 attach ipip [name [ip|udp [port]]]

This creates an IP frame encapsulator for transmission of IP frames over the UNIX's networking system. The interface will be named name, or ipip if name is not specified. The default encapsulation will use IP protocol 4, but it is possible to use UDP instead. If port is specified that IP protocol number or UDP port number will be used instead of 4.

4.6.5 attach netrom

This creates an IP frame encapsulator for transmission of IP frames over the NET/ROM transport. The interface will be named netrom.

4.6.6 attach ni name ip-addr [netmask]

This creates an IP point-to-point link between WAMPES and UNIX, by creating a new interface named name on the WAMPES side, and by creating a new interface named ni? with IP address ip-addr and netmask netmask on the UNIX side. It also establishes a UNIX routing table entry directing traffic for WAMPES to the newly created interface. ip-addr and netmask have to be specified as numeric IP addresses in dotted decimal notation (eg. 44.0.0.1), or as symbolic names stored in the domain name database. netmask defaults to 255.0.0.0 if not specified. Example:
attach ni ni dk5sg-u # ip to host ip

Currently attach ni is available on HP-UX systems only.

4.7 ax25 subcommand

These commands control the AX.25 service.

4.7.1 ax25 blimit [limit]

Display or set the AX.25 retransmission backoff limit. Normally each successive AX.25 retransmission is delayed by a factor of 1.25 compared to the previous interval, this is called exponential backoff. When the number of retries reaches the blimit setting the backoff is held at its current value, and is not increased anymore. Note that this is applicable only to actual AX.25 connections, UI frames will never be retransmitted by the AX.25 layer. The default is 16.

4.7.2 ax25 destlist [interface]

Display the AX.25 "destination" list. Each address seen in the destination field of an AX.25 frame is displayed (most recent first), along with the time since it was last referenced. The time since the same address was last seen in the source field of an AX.25 frame on the same interface is also shown. If the address has never been seen in the source field of a frame, then this field is left blank. (This indicates that the destination is either a multicast address or a "hidden station".) If interface is given, only the list for that interface is displayed.

4.7.3 ax25 digipeat [0|1|2]

Display or set the digipeat mode. The default is 2. MORE TO BE WRITTEN.

4.7.4 ax25 flush

Clear the AX.25 "heard" and "destination" lists (see ax25 heard and ax25 destlist).

4.7.5 ax25 heard [interface]

Display the AX.25 "heard" list. For each interface that is configured to use AX.25, a list of all addresses heard through that interface is shown, along with a count of the number of packets heard from each station and the interval, in days:hr:min:sec format, since each station was last heard. The list is sorted in most-recently-heard order. The local station appears first in the listing, the packet count actually reflects the number of packets transmitted. This count will be correct whether or not the modem monitors its own transmissions. If interface is given, only the list for that interface is displayed.

4.7.6 ax25 ignoretos [on|off]

If ax25 ignoretos is off, IP frames will be encapsulated in AX.25 UI frames (datagram mode) if For all other cases I frames (virtual circuit mode) will be used. If ax25 ignoretos is on, the IP type-of-service field will be ignored in the decision whether to use UI or I frames. The default is off (TOS is not ignored).

4.7.7 ax25 jumpstart ax25_addr [on|off]

The default is off. MORE TO BE WRITTEN.

4.7.8 ax25 kick axcb_addr

If there is unacknowledged data on the send queue of the specified AX.25 control block, this command forces an immediate retransmission. The control block address can be found with the ax25 status command.

4.7.9 ax25 maxframe [count]

Display or set the maximum number of frames that will be allowed to remain unacknowledged at any time on AX.25 connections. This number cannot be greater than 7. Note that the maximum outstanding frame count only works with virtual connections, UI frames are not affected. The default is 7 frames. See the Setting Paclen, Maxframe, MTU, MSS and Window chapter for more information.

4.7.10 ax25 mycall [ax25_addr]

Display or set the default local AX.25 address. The standard format is used, eg. KA9Q-0 or WB6RQN-5. This command must be given before any attach commands using AX.25 mode are given.

4.7.11 ax25 paclen [size]

Limit the size of I-fields on new AX.25 connections. If IP datagrams or fragments larger than this are transmitted, they will be transparently fragmented at the AX.25 level, sent as a series of I frames, and reassembled back into a complete IP datagram or fragment at the other end of the link. To have any effect on IP datagrams, this parameter should be less than or equal to the MTU of the associated interface. The default is 256 bytes. See the Setting Paclen, Maxframe, MTU, MSS and Window chapter for more information.

4.7.12 ax25 pthresh [size]

Display or set the poll threshold to be used for new AX.25 Version 2 connections. The poll threshold controls retransmission behavior as follows. If the oldest unacknowledged I frame size is less than the poll threshold, it will be sent with the poll (P) bit set if a timeout occurs. If the oldest unacknowledged I frame size is equal to or greater than the threshold, then a RR or RNR frame, as appropriate, with the poll bit set will be sent if a timeout occurs.

The idea behind the poll threshold is that the extra time needed to send a "small" I frame instead of a supervisory frame when polling after a timeout is small, and since there is a good chance the I frame will have to be sent anyway (i.e., if it were lost previously) then you might as well send it as the poll. But if the I frame is large, send a supervisory (RR/RNR) poll instead to determine first if retransmitting the oldest unacknowledged I frame is necessary, the timeout might have been caused by a lost acknowledgement. This is obviously a tradeoff, so experiment with the poll threshold setting. The default is 64 bytes.

4.7.13 ax25 reset axcb_addr

Delete the AX.25 control block at the specified address. The control block address can be found with the ax25 status command.

4.7.14 ax25 retry [count]

Limit the number of successive unsuccessful transmission attempts on new AX.25 connections. If this limit is exceeded, the connection is abandoned and all queued data is deleted. A count of 0 allows unlimited transmission attempts. The default is 10 tries.

4.7.15 ax25 route [stat]

Display the AX.25 routing table that specifies the interface and digipeaters to be used in reaching a given station. MORE TO BE WRITTEN.
4.7.15.1 ax25 route add [permanent] interface default|ax25_addr [digipeater ...]
Add an entry to the AX.25 routing table. An automatic ax25 route add is executed if digipeaters are specified in an AX.25 connect command, or if a connection is received from a remote station. Such automatic routing table entries won't override locally created permanent entries, however. MORE TO BE WRITTEN.
4.7.15.2 ax25 route list [ax25_addr ...]
TO BE WRITTEN.

4.7.16 ax25 status [axcb_addr]

Without an argument, display a one-line summary of each AX.25 control block. If the address of a particular control block is specified, the contents of that control block are shown in more detail.

4.7.17 ax25 t1 [milliseconds]

Display or set the AX.25 retransmission timer. The default is 5000 milliseconds (5 seconds). MORE TO BE WRITTEN.

4.7.18 ax25 t2 [milliseconds]

Display or set the AX.25 acknowledge delay timer. The default is 300 milliseconds (0.3 seconds). MORE TO BE WRITTEN.

4.7.19 ax25 t3 [milliseconds]

Display or set the AX.25 idle poll timer. The default is 900000 milliseconds (15 minutes). MORE TO BE WRITTEN.

4.7.20 ax25 t4 [milliseconds]

Display or set the AX.25 busy timer. The default is 60000 milliseconds (1 minute). MORE TO BE WRITTEN.

4.7.21 ax25 t5 [milliseconds]

Display or set the AX.25 idle disconnect timer. The default is 3600000 milliseconds (60 minutes). MORE TO BE WRITTEN.

4.7.22 ax25 version [1|2]

Display or set the version of the AX.25 protocol to attempt to use on new connections. The default is 2 (the version that uses the poll/final bits).

4.7.23 ax25 window [size]

Set the number of bytes that can be pending on an AX.25 receive queue beyond which I frames will be answered with RNR (Receiver Not Ready) responses. This presently applies only to suspended interactive AX.25 sessions, since incoming I frames containing network (IP, NET/ROM) packets are always processed immediately and are not placed on the receive queue. However, when an AX.25 connection carries both interactive and network packet traffic, a RNR generated because of backlogged interactive traffic will also stop network packet traffic. The default is 2048 bytes.

4.8 axip subcommand

TO BE WRITTEN.

4.8.1 axip route

TO BE WRITTEN.
4.8.1.1 axip route add ax25_addr hostid
TO BE WRITTEN.
4.8.1.2 axip route drop ax25_addr
TO BE WRITTEN.

4.9 bye

TO BE WRITTEN.

4.10 close [session#]

Close the specified session, without an argument, close the current session. On an AX.25 session this command initiates a disconnect. On a FTP or Telnet session this command sends a FIN (i.e., initiates a close) on the session's TCP connection. This is an alternative to asking the remote server to initiate a close (QUIT to FTP, or the logout command appropriate for the remote system in the case of Telnet). When either FTP or Telnet sees the incoming half of a TCP connection close, it automatically responds by closing the outgoing half of the connection. close is more graceful than the reset command, in that it is less likely to leave the remote TCP in a "half-open" state.

4.11 connect ax25_addr [digipeater ...]

Initiate a "vanilla" AX.25 session to the specified ax25_addr. Up to 8 optional digipeaters may be given, note that the word via is NOT needed. Data sent on this session goes out in conventional AX.25 packets with no upper layer protocol. The de-facto presentation standard format is used, in that each packet holds one line of text, terminated by a carriage return. A single AX.25 connection may be used for terminal-to-terminal, IP and NET/ROM traffic, with the three types of data being automatically separated by their AX.25 Protocol IDs.

4.12 delete filename ...

Remove the specified files from the file system.

4.13 disconnect [session#]

An alias for the close command (for the benefit of AX.25 users).

4.14 domain subcommand

These commands control the Domain Name Service (DNS).

4.14.1 domain cache list

Show the current contents of the in-memory cache for resource records.

4.14.2 domain cache flush

Clear the in-memory cache for resource records. This command is executed automatically every 24 hours to remove old cache entries.

4.14.3 domain query name|addr

Attempt to map a host name to an IP address or vice versa using the built-in domain name server.

4.14.4 domain trace [on|off]

Display or set the flag controlling the tracing of domain name server requests and responses. The default is off.

4.14.5 domain usegethostby [on|off]

Display or set the flag controlling the use of the UNIX functions gethostbyname and gethostbyaddr. The default is off. MORE TO BE WRITTEN.

4.15 echo [accept|refuse]

Display or set the flag controlling client Telnet's response to a remote WILL ECHO offer. The default is accept.

The Telnet presentation protocol specifies that in the absence of a negotiated agreement to the contrary, neither end echoes data received from the other. In this mode, a Telnet client session echoes keyboard input locally and nothing is actually sent until a carriage return is typed. Local line editing is also performed, see the Console modes chapter.

When communicating from keyboard to keyboard the standard local echo mode is used, so the setting of this parameter has no effect. However, many timesharing systems (eg. UNIX) prefer to do their own echoing of typed input. (This makes screen editors work right, among other things.) Such systems send a Telnet WILL ECHO offer immediately upon receiving an incoming Telnet connection request. If echo accept is in effect, a client Telnet session will automatically return a DO ECHO response. In this mode, local echoing and editing is turned off and each key stroke is sent immediately (subject to the Nagle tinygram algorithm in TCP). While this mode is just fine across an Ethernet, it is clearly inefficient and painful across slow paths like packet radio channels. Specifying echo refuse causes an incoming WILL ECHO offer to be answered with a DONT ECHO, the client Telnet session remains in the local echo mode. Sessions already in the remote echo mode are unaffected. (Note: Berkeley UNIX has a bug in that it will still echo input even after the client has refused the WILL ECHO offer. To get around this problem, enter the stty -echo command to the shell once you have logged in.)

4.16 eol [standard|null]

Display or set Telnet's end-of-line behavior when in remote echo mode. In standard mode, each key is sent as-is. In null mode, carriage returns are translated to line feeds. This command is not necessary with all UNIX systems, use it only when you find that a particular system responds to line feeds but not carriage returns. Only SunOS release 3.2 seems to exhibit this behavior, later releases are fixed. The default is standard.

4.17 escape [character]

Display or set the current command-mode escape character. To enter a control character from the keyboard it has to be prefixed by Control-V. The default is Control-] (0x1d, ASCII GS).

4.18 exit

Exit (terminate) WAMPES.

4.19 finger [user]@hostid

Issue a network finger request for user user at host hostid. If only @hostid is given, all users on that host are identified.

4.20 fkey key# text

Set the value for a programmable key on the keyboard. To enter a control character from the keyboard it has to be prefixed by Control-V. Text has to be enclosed in double quotes if it contains white space.

4.21 flexnet subcommand

These commands control the FLEXNET service.

4.21.1 flexnet dest [ax25_addr]

Display all known, or the specified, FLEXNET destination, together with the list of neighbors through which the destination can be reached. The number in parentheses after each neighbor is the propagation delay to the destination through this neighbor. The neighbor list is sorted by this delay, the best neighbor (the one which actually will be used) is listed first. The delay is measured in 100 millisecond units, a value of zero is to be taken as infinity.

4.21.2 flexnet destdebug

Display all known FLEXNET destinations, together with the list of all neighbors. Two numbers are printed in parentheses after each neighbor. The Delay value is the propagation delay to the destination through this neighbor. The Last value is the delay our node sent to this neighbor, telling it the propagation delay to the destination through our node. The delays are measured in 100 millisecond units, a value of zero is to be taken as infinity.

4.21.3 flexnet link

Without an argument, display the FLEXNET link table, which contains all known FLEXNET neighbors. The fields are as follows:
Call
The call sign and SSID range of this neighbor.
Remote
The propagation delay to this neighbor as measured by the neighbor.
Local
The propagation delay to this neighbor as measured by the our node.
Smooth
The smoothed, average propagation delay to this neighbor.
P
If this column contains a P, then the link was created manually, and is permanent. A permanent link can only be removed with the flexnet link delete command.
T
The state of the routing token encoded as follows:
N
Our node does not have the token, and did not requested it.
W
Our node does not have the token, but did requested it.
Y
Our node has the token.
State
The state of the AX.25 link to this neighbor.
4.21.3.1 flexnet link add ax25_addr
Add a permanent entry to the FLEXNET link table.
4.21.3.2 flexnet link delete ax25_addr
Remove the specified entry from the FLEXNET link table.

4.21.4 flexnet query ax25_addr

Display the path to the specified FLEXNET destination. Call signs shown in capital letters along the path support the FLEXNET protocol, those in lower-case letters do not.

4.22 ftp hostid [port]

Open a FTP control channel to the specified remote host and enter converse mode on the new session. If port is given that port is used. Default port is 21. Responses from the remote server are displayed directly on the screen. See the FTP Subcommands chapter for descriptions of the commands available in a FTP session.

4.23 hostname [hostname]

Display or set the local host's name. By convention this should be the same as the host's primary domain name. This string is used in greeting messages of various network servers, and in the command line prompt. Note that hostname does NOT set the system's IP address.

If hostname is the same as the name of an attached interface, hostname will be substituted by the canonical host name which corresponds to the IP address of that interface.

4.24 icmp subcommand

These commands control the Internet Control Message Protocol (ICMP) service.

4.24.1 icmp echo [on|off]

Display or set the flag controlling the asynchronous display of ICMP Echo Reply packets. This flag must be on for one-shot pings to work (see the ping command). The default is on.

4.24.2 icmp status

Display statistics about the Internet Control Message Protocol (ICMP), including the number of ICMP messages of each type sent and received.

4.24.3 icmp trace [on|off]

Display or set the flag controlling the display of ICMP error messages. These informational messages are generated by routers in response to routing, protocol or congestion problems. The default is off.

4.25 ifconfig [interface [[subcommand parameter] ...]

Without arguments display the status of all interfaces. When only interface is given, the status of that interface is displayed. Multiple subcommand/parameter pairs can be put on one line.

4.25.1 ifconfig interface broadcast hostid

Set the broadcast address of interface to hostid. This is related to the netmask subcommand. See also the arp command.

4.25.2 ifconfig interface encapsulation encapsulation

Set the encapsulation for interface to encapsulation. Encapsulation may be one of:
none
No encapsulation.
slip
Serial Line Internet Protocol. Encapsulates IP datagrams directly in SLIP frames without a link header. This is for operation on point-to-point lines and is compatible with 4.2BSD UNIX SLIP.
vjslip
Compressed SLIP.
ax25ui, ax25i
Similar to slip, except that an AX.25 header is added to the datagram before SLIP encoding.
kissui, kissi
Similar to slip, except that an AX.25 header and a KISS TNC control header is added to the datagram before SLIP encoding.
netrom
Adds a NET/ROM network header to the datagram.
nrs
Adds an AX.25 header, then encodes the frame using the NET/ROM asynchronous framing technique for communication with a local NET/ROM TNC.
For AX.25 based encapsulations UI frames (datagram mode) will be used if any one of the following conditions is true, otherwise I frames (virtual circuit mode) will be used: The setting of the IP type-of-service field may be ignored by using the ax25 ignoretos command.

4.25.3 ifconfig interface forward interface2

When a forward is defined, all output for interface is redirected to interface2. To remove the forward, set interface2 to interface.

4.25.4 ifconfig interface ipaddress hostid

Set the IP address to hostid for this interface. This might be necessary when a system acts as a gateway. See also the ip address command.

4.25.5 ifconfig interface linkaddress hardware-dependent

Set the hardware dependent address for this interface. For AX.25 this can be the callsign, for ethernet an ethernet address.

4.25.6 ifconfig interface mtu parameter

Set the maximum transfer unit to parameter octeds (bytes). See the Setting Paclen, Maxframe, MTU, MSS and Window chapter for more information.

4.25.7 ifconfig interface netmask address

Set the subnet mask for this interface. The address takes the form of an IP address with 1's in the network and subnet parts of the address, and 0's in the host part of the address. Example:
ifconfig ec0 netmask 0xffffff00
for a class C network (24 bits). This is related to the broadcast subcommand. See also the route command.

4.25.8 ifconfig interface rxbuf size

Set the receive buffer size. This value is currently not used by WAMPES.

4.25.9 ifconfig interface txqlen size

Set the transmit queue limit (maximum number of packets waiting in the transmit queue). If set to 0 the transmit queue is unlimited.

4.26 ip subcommand

These commands control the Internet Protocol (IP) service.

4.26.1 ip address [hostid]

Display or set the default local IP address. This command must be given before an attach command if it is to be used as the default IP address for that interface.

4.26.2 ip rtimer [seconds]

Display or set the IP fragment reassembly timeout. The default is 30 seconds.

4.26.3 ip status

Display Internet Protocol (IP) statistics, such as total packet counts and error counters of various types.

4.26.4 ip ttl [hops]

Display or set the default time-to-live value placed in each outgoing IP datagram. This limits the number of switch hops the datagram will be allowed to take. The idea is to bound the lifetime of the packet should it become caught in a routing loop, so make the value slightly larger than the number of hops across the network you expect to transit packets. The default is 255 hops.

4.27 ipfilter [subcommand]

Without an argument, display the IP filter table, which allows or denies IP packets to be received from or sent to a destination.

The default is to allow IP packets to be received from or sent to any destination. Use the ipfilter allow and ipfilter deny commands to extend the table. Entries listed earlier take precedence over entries listed later.

4.27.1 ipfilter allow|deny hostid[/bits] [to hostid[/bits]]

This command (re)defines the rights for a range of IP addresses. The optional /bits suffix to hostid specifies how many leading bits in hostid are to be considered significant. If not specified, 32 bits (i.e., full significance) is assumed. With this option, a single hostid/bits specification may refer to many hosts all sharing a common bit string prefix in their IP addresses. For example, ARPA Class A, B and C networks would use suffixes of /8, /16 and /24 respectively. The command
ipfilter allow 44/8
causes any IP address beginning with "44" in the first 8 bits to be allowed, the remaining 24 bits are "don't-cares".

If two hostids are specified, those two IP addresses and all IP addresses in between are allowed or denied. For example:

ipfilter allow 44.1.2.0 to 44.1.2.255
is equivalent to
ipfilter allow 44.1.2/24
In case one or both of the hostids has a /bits suffix, the range of IP addresses allowed or denied is from the lowest to the highest IP address. For example:
ipfilter allow 44.1/16 to 44.3/16
is equivalent to
ipfilter allow 44.1.0.0 to 44.3.255.255
The ipfilter command tries to combine multiple allow and deny commands into as few IP filter table entries as possible. Because the table initially allows everything, the first ipfilter command must be deny to have any effect. To only allow certain IP addresses use something like the following command sequence:
ipfilter deny 0/0 # default is deny
ipfilter allow 127.0.0.1 # loopback
ipfilter allow 44.128.4/24
ipfilter allow 44.130/16
ipfilter allow 44.142/16
ipfilter allow 44.143/16
ipfilter allow ke0gb
ipfilter allow winfree.n3eua

4.28 kick [session#]

Kick all control blocks associated with a session. If no argument is given, kick the current session. Performs the same function as the ax25 kick, netrom kick, and tcp kick commands, but is easier to type.

4.29 log [stop|filename]

Display the current log filename or set the filename for logging server sessions. If stop is given as the argument, logging is terminated (the servers themselves are unaffected). If a file name is given as an argument, server session log entries will be appended to it.

4.30 login subcommand

TO BE WRITTEN.

4.30.1 login auto [on|off]

Display or set the flag controlling the automatic login of users. If automatic login is enabled the user name is derived from the incoming AX.25 call, the NET/ROM user name, or the IP host name. If automatic login is disabled the user has to supply the user name at the login: prompt. The default is on.

4.30.2 login create [on|off]

Display or set the flag controlling the automatic creation of user accounts (entries in the system passwd file and home directories) if automatic login is enabled. The default is on.

4.30.3 login defaultuser [username]

Display or set the user name to be used for login if the incoming AX.25 call, the NET/ROM user name, or the IP host name cannot be mapped to a valid user name. If username is set to "" this mapping is disabled. The default is guest.

4.30.4 login gid [gid]

Display or set the group id to be used when creating new user accounts (see login create). The default is 400.

4.30.5 login homedir [homedir]

Display or set the base directory to be used for user home directories when creating new user accounts (see login create).

To avoid huge directories the actual home directory is created in a subdirectory:

homedir/first 3 characters of user name.../user name
Example:

If login homedir is set to /home/radio the home directory for n0pra will be:

/home/radio/n0p.../n0pra
The default is HOME_DIR/funk.

HOME_DIR is defined in /tcp/lib/configure.h and has a value of

depending on the system configuration.

4.30.6 login logfiledir [logfiledir]

Display or set the directory to be used for user log files. If set to "" no logging is done. The default is "".

4.30.7 login maxuid [maxuid]

Display or set the maximum user id to be used when creating new user accounts (see login create). maxuid must be between 1 and 32000. The default is 32000.

4.30.8 login minuid [minuid]

Display or set the minimum user id to be used when creating new user accounts (see login create). minuid must be between 1 and 32000. The default is 400.

4.30.9 login shell [shell]

Display or set the login shell to be used when creating new user accounts (see login create). If set to "" UNIX will choose its own default shell. The default is "".

4.31 memory subcommand

These commands control memory allocation.

4.31.1 memory debug [on|off]

Display or set the flag controlling heap debugging. If heap debugging is turned on, all memory blocks returned by malloc will be filled with the value 0xdd, and all memory blocks freed will be filled with the value 0xbb. This makes it easier to track uninitialized and freed memory reads. The default is off.

4.31.2 memory freelist

Display the number of all currently free memory blocks. Different block sizes (rounded up to the next power of two) are counted separately.

4.31.3 memory merge [on|off]

Display or set the flag controlling the attempt to merge adjacent free memory blocks into bigger blocks. The default is on.

4.31.4 memory sizes

Display the total number (counted since program startup) of all memory allocation requests. Requests for different block sizes (rounded up to the next power of two) are counted separately.

4.31.5 memory status

Display a summary of storage allocator statistics:

4.32 mkdir dirname

Create the specified directory.

4.33 netrom subcommand

These commands control the NET/ROM service.

4.33.1 netrom broadcast [interface ax25_addr [digipeater ...]]

Without an argument, display the NET/ROM broadcast table, which lists all interfaces and destination addresses to be used if the auto-update broadcast interval timer fires (see netrom parms 7). If interface and ax25_addr (and optional digipeaters) are specified, add a new entry to the table. The usual destination address for NET/ROM broadcasts is NODES. Note that there is currently no way to delete an entry from the table (short of restarting WAMPES). Example:
netrom broadcast tnc0 NODES

4.33.2 netrom connect node [user]

Initiate a NETROM session to the specified NET/ROM node. If user is not specified, the value of ax25 mycall will be used as user identification. The de-facto presentation standard format is used, in that each packet holds one line of text, terminated by a carriage return.

4.33.3 netrom ident [ident]

Display or set the NET/ROM ident (also sometimes called "alias"). The ident is only used in outgoing broadcasts, it is NOT possible to connect WAMPES using the ident as destination address.

4.33.4 netrom kick nrcb_addr

If there is unacknowledged data on the send queue of the specified NET/ROM control block, this command forces an immediate retransmission. The control block address can be found with the netrom status command.

4.33.5 netrom links [node [node2 quality [permanent]]]

Display or change the NET/ROM links table, which controls the NET/ROM routing. A link is the direct connection of two nodes, without any intermediate nodes. Without arguments, all known links are shown. If node is given, all known links originating from node are shown. The fields are as follows:
From
The name of the originating node for this link.
To
The name of the destination node for this link.
Level
The level (confidence in the correctness of information) of this link. Levels are coded as follows:
1
information created locally
2
information reported by neighbor
3
information reported by neighbor of neighbor
Quality
The quality of this link.
Age
The age (seconds since last update) of this link. If this field is empty, the link is marked permanent.

If node, node2, and quality are given, a link between node and node2 with quality quality is put into the table, and also marked permanent if so specified.

4.33.6 netrom nodes [node]

Display information about all known, or the specified, NET/ROM node. The fields are as follows:
Node
The official name of this node.
Ident
The ident (alias) of this node.
Neighbor
The neighbor used to reach this node.
Level
The level (confidence in the correctness of information) of this node. Levels are coded as follows:
0
myself
1
neighbor
2
neighbor of neighbor
3
reported by neighbor of neighbor
999
unreachable
Quality
The quality of the path to this node.

4.33.7 netrom parms [parm# [value]]

Display or set NET/ROM parameters. The following parameters are available:

ParmDescriptionMinMaxDfltUsed
1Maximum destination list entries1400400No
2Worst quality for auto-updates02550No
3Channel 0 (HDLC) quality0255192Yes
4Channel 1 (RS232) quality0255255No
5Obsolescence count initializer (0=off)02553Yes
6Obsolescence count min to be broadcast02550No
7Auto-update broadcast interval (sec, 0=off)0655351800Yes
8Network 'time-to-live' initializer125516Yes
9Transport timeout (sec)560060Yes
10Transport maximum tries11275Yes
11Transport acknowledge delay (ms)1600001No
12Transport busy delay (sec)11000180Yes
13Transport requested window size (frames)11278Yes
14Congestion control threshold (frames)11278Yes
15No-activity timeout (sec, 0=off)0655351800Yes
16Persistance025564No
17Slot time (10msec increments)012710No
18Link T1 timeout 'FRACK' (ms)1MAXINT5000Yes
19Link TX window size 'MAXFRAME' (frames)177Yes
20Link maximum tries (0=forever)012710Yes
21Link T2 timeout (ms)1MAXINT1Yes
22Link T3 timeout (ms)0MAXINT900000Yes
23AX.25 digipeating (0=off 1=dumb 2=s&f)022Yes
24Validate callsigns (0=off 1=on)010No
25Station ID beacons (0=off 1=after 2=every)020No
26CQ UI frames (0=off 1=on)010No

4.33.8 netrom reset nrcb_addr

Delete the NET/ROM control block at the specified address. The control block address can be found with the netrom status command.

4.33.9 netrom status [nrcb_addr]

Without an argument, display a one-line summary of each NET/ROM control block. If the address of a particular control block is specified, the contents of that control block are shown in more detail.

4.34 nrstat

Display statistics on all attached NET/ROM serial interfaces.

4.35 param interface [name|number [value]]

Invoke a device-specific control routine. The following parameter names are recognized by the param command, but not all are supported by each device type. Most commands deal only with half-duplex packet radio interfaces.
NameNumberMeaning
Data0 
TxDelay1Transmit keyup delay
Persist2P-persistence
SlotTime3Persistence slot time
TxTail4Transmit done holdup delay
FullDup5Enable/disable full duplex
Hardware6Hardware specific command
TxMute7Experimental transmit mute command
DTR8Control Data Terminal Ready (DTR) signal to modem
RTS9Control Request to Send (RTS) signal to modem
Speed10Line speed
EndDelay11 
Group12 
Idle13 
Min14 
MaxKey15 
Wait16 
Down129Drop modem control lines
Up130Raise modem control lines
Blind131 
Return255Return a KISS TNC to command mode

Depending on the interface type, some parameters can be read back by omitting a new value. This is not possible with KISS TNCs as there are no KISS commands for reading back previously sent parameters.

On a KISS TNC interface, the param command generates and sends control packets to the TNC. Data bytes are treated as decimal. For example,

param ax0 TxDelay 255
will set the keyup timer (type field = 1) on the KISS TNC configured as ax0 to 2.55 seconds (255 x .01 sec). On all asy interfaces (slip, ax25, kiss, nrs) the param interface Speed command allows the baud rate to be read or set.

The implementation of this command for the various interface drivers is incomplete and subject to change.

4.36 ping [subcommand]

Without an argument, display the Ping table, which lists statistics on all active repetitive pings.

4.36.1 ping clear

Stop all active repetitive pings, and clear the Ping table.

4.36.2 ping hostid [packetsize [interval]]

Ping (send ICMP ECHO_REQUEST packets to) the specified host. ECHO_REQUEST datagrams have an IP and ICMP header, followed by a struct timeval, and an arbitrary number of pad bytes used to fill out the packet. Default datagram length is 64 bytes, but this can be changed by specifying packetsize. The minimum value allowed for packetsize is 8 bytes. If packetsize is smaller than 16 bytes, there is not enough room for timing information. In this case the round-trip times are not displayed.

If interval is specified, pings will be repeated at the specified interval (in seconds) until the ping clear command is issued, otherwise a single, "one shot" ping is done. Responses to one-shot pings appear asynchronously on the command screen, while responses from repetitive pings are stored in the Ping table.

4.37 ps

Display all current processes in the system. The fields are as follows:
PID
The process ID (the address of the process control block).
SP
The current value of the process stack pointer.
stksize
The size of the stack allocated to the process, measured in 16 bit words.
maxstk
The apparent peak stack utilization of this process, measured in 16 bit words. This is done in a somewhat heuristic fashion, so the numbers should be treated as approximate. If this number reaches or exceeds the stksize figure, the system is almost certain to crash, and WAMPES should be recompiled to give the process a larger allocation when it is started.
event
The event this process is waiting for, if it is not runnable.
fl
The process status flags. There are two: W (Waiting for event) and S (suspended - not currently used). The W flag indicates that the process is waiting for an event. Note that although there may be several runnable processes at any time (shown in the ps listing as those without the W flag) only one process is actually running at any one instant.
in
Always zero.
out
Always zero.
name
The name of the process.

4.38 record [off|filename]

Append to filename all data received on the current session. Data sent on the current session is also written into the file except for Telnet sessions in remote echo mode. The command record off stops recording and closes the file. If no argument is specified the current status is displayed.

4.39 remote [-p port] [-k key] [-a kickaddr] hostid exit|reset|kick

Send a UDP packet to the specified host commanding it to exit the WAMPES or NOS program, reset the processor, or force a retransmission on TCP connections. For this command to be accepted, the remote system must be running the remote server, and the port number used by the local remote command must match the port number used by the remote server. If the port numbers do not match, or if the remote server is not running on the target system, the command packet is ignored. Even if the command is accepted there is no acknowledgement.

If the -p option is not specified, port 1234 will be used.

The kick command forces a retransmission timeout on all TCP connections that the remote node may have with the local node. If the -a option is used, connections to the specified host are kicked instead. No key is required for the kick subcommand.

The exit subcommand is mainly useful for restarting the WAMPES program on a remote unattended system after a configuration file has been updated. The remote system should invoke the WAMPES program automatically upon booting, preferably from /etc/inittab. For example:

net :23456:respawn:env TZ=MST7MDT /tcp/net

4.39.1 remote -s key

The exit and reset subcommands of remote require a password. The password is set on the server with the -s option, and it is specified to the client with the -k option. If no password is set with the -s option, then the exit and reset subcommands are disabled.

4.40 rename oldfilename newfilename

Rename oldfilename to newfilename.

4.41 repeat [milliseconds] command [arguments ...]

Execute command every milliseconds, or once every second if milliseconds is not specified. Before each iteration the screen is cleared. repeat is terminated if any keyboard input is made, or if command returns an error. Example:
repeat 2000 tcp status
executes "tcp status" every two seconds.

4.42 reset [session#]

Reset the specified session, if no argument is given, reset the current session. This command should be used with caution since it does not reliably inform the remote end that the connection no longer exists. In TCP a reset (RST) message will be automatically generated should the remote TCP send anything after a local reset has been done. In AX.25 the DM message performs a similar role. Both are used to get rid of a lingering half-open connection after a remote system has crashed.

4.43 rip subcommand

These commands control the Routing Information Protocol (RIP) service.

4.43.1 rip accept hostid

Remove the specified host from the RIP filter table, allowing future broadcasts from that host to be accepted.

4.43.2 rip add hostid seconds [flags]

Add an entry to the RIP broadcast table. The IP routing table will be sent to hostid every interval of seconds. If flags is specified as 1, then "split horizon" processing will be performed for this destination. That is, any IP routing table entries pointing to the interface that will be used to send this update will be removed from the update. If split horizon processing is not specified, then all routing table entries except those marked "private" will be sent in each update. Private entries are never sent in RIP packets.

Triggered updates are always done. That is, any change in the routing table that causes a previously reachable destination to become unreachable will trigger an update that advertises the destination with metric 15, defined to mean "infinity".

Note that for RIP packets to be sent properly to a broadcast address, there must exist correct IP routing and ARP table entries that will first steer the broadcast to the correct interface and then place the correct link-level broadcast address in the link-level destination field. If a standard IP broadcast address convention is used (eg. 44.255.255.255), then chances are you already have the necessary IP routing table entry, but unusual subnet or cluster-addressed networks may require special attention. However, an arp add command will be required to translate this address to the appropriate link level broadcast address. For example:

arp add 44.255.255.255 ax25 QST-0
for an AX.25 packet radio channel.

4.43.3 rip drop hostid

Remove an entry from the RIP broadcast table.

4.43.4 rip merge [on|off]

This flag controls an experimental feature for consolidating redundant entries in the IP routing table. When rip merging is enabled, the table is scanned after processing each RIP update. An entry is considered redundant if the target(s) it covers would be routed identically by a less "specific" entry already in the table. That is, the target address(es) specified by the entry in question must also match the target addresses of the less specific entry and the two entries must have the same interface and gateway fields. For example, if the routing table contains
DestLenInterfaceGatewayMetricPTimerUse
1.2.3.432ethernet0128.96.1.21000
1.2.324ethernet0128.96.1.21000

then the first entry would be deleted as redundant since packets sent to 1.2.3.4 will still be routed correctly by the second entry. Note that the relative metrics of the entries are ignored. The default is off.

4.43.5 rip refuse hostid

Refuse to accept RIP updates from the specified host by adding the host to the RIP filter table. It may be later removed with the rip accept command.

4.43.6 rip request hostid

Send a RIP Request packet to the specified host, causing it to reply with a RIP Response packet containing its routing table.

4.43.7 rip status

Display RIP status, including a count of the number of packets sent and received, the number of requests and responses, the number of unknown RIP packet types, and the number of refused RIP updates from hosts in the filter table. A list of the addresses and intervals to which periodic RIP updates are being sent is also shown, along with the contents of the filter table.

4.43.8 rip trace [0|1|2]

This variable controls the tracing of incoming and outgoing RIP packets. Setting it to 0 disables all RIP tracing. A value of 1 causes changes in the routing table to be displayed, while packets that cause no changes cause no output. Setting the variable to 2 produces maximum output, including tracing of RIP packets that cause no change in the routing table. The default is 0.

4.44 rmdir dirname

Remove the specified directory.

4.45 route [subcommand]

Without an argument, display the IP routing table.

4.45.1 route add hostid[/bits]|default interface [gateway_hostid [metric]]

Add a permanent entry to the IP routing table. It will not time out as will an automatically created entry, but must be removed with the route drop command. route add requires at least two more arguments, the hostid of the destination and the name of the interface to which its packets should be sent. If the destination is not local, the gateway's hostid should also be specified. If the interface is a point-to-point link, then gateway_hostid may be omitted even if the target is non-local because this field is only used to determine the gateway's link level address, if any. If the destination is directly reachable, gateway_hostid is also unnecessary since the destination address is used to determine the link address.

The optional /bits suffix to the destination hostid specifies how many leading bits in hostid are to be considered significant in routing comparisons. If not specified, 32 bits (i.e., full significance) is assumed. With this option, a single IP routing table entry may refer to many hosts all sharing a common bit string prefix in their IP addresses. For example, ARPA Class A, B and C networks would use suffixes of /8, /16 and /24 respectively. The command

route add 44/8 sl0 44.64.0.2
causes any IP addresses beginning with "44" in the first 8 bits to be routed via sl0 to 44.64.0.2, the remaining 24 bits are "don't-cares".

When an IP address to be routed matches more than one entry in the IP routing table, the entry with the largest bits parameter (i.e., the "best" match) is used. This allows individual hosts or blocks of hosts to be exceptions to a more general rule for a larger block of hosts.

The special destination default is used to route datagrams to addresses not matched by any other entry in the IP routing table, it is equivalent to specifying a /bits suffix of /0 to any destination hostid. Care must be taken with default entries since two nodes with default entries pointing at each other will route packets to unknown addresses back and forth in a loop until their time-to-live (TTL) fields expire. Routing loops for specific addresses can also be created, but this is less likely to occur accidentally.

There are two built-in interfaces: loopback and encap. Loopback is for internal purposes only. Encap is an IP encapsulator interface. It is used to encapsulate a complete IP datagram into an IP datagram so that it gets "piggy-backed".

Here are some examples of the route command:

# Route datagrams to IP address 44.0.0.3 to SLIP line #0.
# No gateway is needed because SLIP is point-to point.
route add 44.0.0.3 sl0
# The station with IP address 44.0.0.10 is on the local AX.25 channel.
route add 44.0.0.10 ax0
# The local Ethernet has an ARPA Class-C address assignment.
# Route all IP addresses beginning with 192.4.8 to it.
route add 192.4.8/24 ec0
# Route all default traffic to the gateway on the local Ethernet
# with IP address 192.4.8.1.
route add default ec0 192.4.8.1

4.45.2 route addprivate hostid[/bits]|default interface [gateway_hostid [metric]]

This command is identical to route add except that it also marks the new entry as private, it will never be included in outgoing RIP updates.

4.45.3 route drop hostid[/bits]|default

Remove the specified entry from the IP routing table. If a packet arrives for the deleted address and a default route is in effect, it will be used.

4.45.4 route flush

Drop all automatically created entries from the IP routing table, permanent entries are not affected.

4.45.5 route lookup hostid

Display the IP routing table entry which will be used to route to hostid.

4.46 session [session#]

Without arguments, display the list of current sessions, including session number, remote TCP, AX.25, or NET/ROM address and the address of the TCP, AX.25, or NET/ROM control block. An asterisk (*) is shown next to the current session. Entering a session number as an argument to the session command will put you in converse mode with that session.

4.47 shell shell_command_line

Suspend WAMPES and execute a subshell (/bin/sh). When the subshell exits, WAMPES resumes. Background activity (FTP servers, etc) is also suspended while the subshell executes.

4.48 smtp subcommand

These commands control the Simple Message Transport Protocol (SMTP) service (and all other mail delivery clients).

4.48.1 smtp kick [destination]

Run through the outgoing mail queue and attempt to deliver any pending mail. If destination is specified try only to deliver mail to this system. This command allows the user to "kick" the mail system manually. Normally, this command is periodically invoked by a timer whenever WAMPES is running (see smtp timer). MORE TO BE WRITTEN.

4.48.2 smtp list

List the current jobs. MORE TO BE WRITTEN.

4.48.3 smtp maxclients [count]

Display or set the maximum number of simultaneous outgoing mail sessions that will be allowed. The default is 10, reduce it if network congestion is a problem.

4.48.4 smtp timer [seconds]

Display or set the interval between scans of the outbound mail queue. For example, smtp timer 600 will cause the system to check for outgoing mail every 10 minutes and attempt to deliver anything it finds, subject of course to the smtp maxclients limit. Setting a value of zero disables queue scanning altogether, note that this is the default!

4.49 sntp subcommand

These commands control the Simple Network Time Protocol (SNTP) service.

4.49.1 sntp add hostid [interval]

Add hostid to the list of sntp servers. interval specifies the poll interval in seconds (default 3333).

4.49.2 sntp drop hostid

Remove hostid from the list of sntp servers.

4.49.3 sntp status

List the currently configured sntp servers, along with statistics on how many polls and replies have been exchanged with each one, response times, etc.

4.49.4 sntp step_threshold [step_threshold]

Display or set the step threshold (measured in seconds). If the required time adjustment is less than the step threshold, the adjtime system call will be used to slow down or to accelerate the clock, otherwise the clock will be stepped using the settimeofday system call. The default is 1 second.

4.49.5 sntp sys

Display the sntp server configuration.
4.49.5.1 sntp sys leap [leap]
Display or set the sntp server leap indicator. This is a two-bit code warning of an impending leap second to be inserted/deleted in the last minute of the current day, coded as follows:
0
no warning
1
last minute has 61 seconds
2
last minute has 59 seconds)
3
alarm condition (clock not synchronized)
The default is 0.
4.49.5.2 sntp sys precision [precision]
Display or set the sntp server precision. This is an eight-bit signed integer indicating the precision of the local clock, in seconds to the nearest power of two. The values that normally appear in this field range from -6 for mains-frequency clocks to -18 for microsecond clocks found in some workstations. The default is -10.
4.49.5.3 sntp sys refid [refid]
Display or set the sntp server reference identifier. This is identifying the particular reference clock. In the case of stratum 0 (unspecified) or stratum 1 (primary reference), this is a string of up to 4 characters. While not enumerated as part of the NTP specification, the following are representative ASCII identifiers:
StratumCodeMeaning
0asciigeneric time service other than NTP, such as
  ACTS (Automated Computer Time Service),
  TIME (UDP/Time Protocol),
  TSP (TSP UNIX time protocol),
  DTSS (Digital Time Synchronization Service), etc.
1ATOMcalibrated atomic clock
1VLFVLF radio (OMEGA, etc.)
1callsignGeneric radio
1LORCLORAN-C radionavigation system
1GOESGeostationary Operational Environmental Satellite
1GPSGlobal Positioning Service
2addresssecondary reference (four-octet Internet address
  of the NTP server)

The default is UNIX.

4.49.5.4 sntp sys reftime
Display the sntp server reference time.
4.49.5.5 sntp sys rootdelay [rootdelay]
Display or set the sntp server root delay. This is a floating point number indicating the total roundtrip delay to the primary reference source, in seconds. Note that this variable can take on both positive and negative values, depending on the relative time and frequency errors. The values that normally appear in this field range from negative values of a few milliseconds to positive values of several hundred milliseconds. The default is 0.
4.49.5.6 sntp sys rootdispersion [rootdispersion]
Display or set the sntp server root dispersion. This is a floating point number indicating the maximum error relative to the primary reference source, in seconds. The values that normally appear in this field range from zero to several hundred milliseconds. The default is 0.
4.49.5.7 sntp sys stratum [stratum]
Display or set the sntp server stratum. This is a eight-bit integer indicating the stratum level of the local clock, with values defined as follows:
0
unspecified or unavailable
1
primary reference (e.g., radio clock)
2-15
secondary reference (via NTP or SNTP)
16-255
reserved
The default is 1.

4.49.6 sntp trace [on|off]

Display or set the flag controlling sntp tracing. The default is off.

4.50 source filename

Read subsequent commands from filename until EOF, then resume reading commands from the previous stream. This can be used to keep routing statements in a separate file, which can be read at some point in net.rc.

4.51 start server [arguments]

Start the specified server, allowing remote connection requests.

4.51.1 start ax25

Start the AX.25 Login server. See also the ax25 and login commands.

4.51.2 start discard [port]

Start the TCP DISCARD server. Default port is 9. See also RFC863.

4.51.3 start domain [port]

Start the TCP/UDP DOMAIN server. Default port is 53. See also the domain command, RFC1034, and RFC1035.

4.51.4 start echo [port]

Start the TCP ECHO server. Default port is 7. See also RFC862.

4.51.5 start ftp [port]

Start the TCP FTP server. Default port is 21. See also the ftp command.

4.51.6 start tcpgate port [host[:service]]

Start a WAMPES TCP to UNIX TCP gateway. MORE TO BE WRITTEN.

4.51.7 start netrom

Start the NET/ROM Login server. See also the netrom and login commands.

4.51.8 start rip

Start the UDP RIP server on port 520. See also the rip command and RFC1058.

4.51.9 start sntp

Start the UDP SNTP server on port 123. See also the sntp command and RFC1361.

4.51.10 start telnet [port]

Start the TCP TELNET server. Default port is 23. See also the login command.

4.51.11 start time

Start the UDP TIME server on port 37. See also RFC868.

4.51.12 start remote [port]

Start the UDP REMOTE server. Default port is 1234. See also the remote command.

4.52 status

Display a one-line summary of each AX.25, NET/ROM, TCP, and UDP control block.

4.53 stop server

Stop the specified server, rejecting any further remote connect requests. Existing connections are allowed to complete normally. See also the start command.

server has to be one of:

4.54 tcp subcommand

These commands control the Transmission Control Protocol (TCP) service.

4.54.1 tcp irtt [milliseconds]

Display or set the initial round trip time estimate, in milliseconds, to be used for new TCP connections until they can measure and adapt to the actual value. The default is 5000 milliseconds (5 seconds). Increasing this when operating over slow channels will avoid the flurry of retransmissions that would otherwise occur as the smoothed estimate settles down at the correct value. Note that this command should be given before servers are started in order for it to have effect on incoming connections.

TCP also keeps a cache of measured smoothed round trip times (SRTT) and mean deviations (MDEV) for current and recent destinations. Whenever a new TCP connection is opened, the system first looks in this cache. If the destination is found, the cached SRTT and MDEV values are used. If not, the default IRTT value mentioned above is used, along with a MDEV of 0. This feature is fully automatic, and it can improve performance greatly when a series of connections are opened and closed to a given destination (eg. a series of FTP file transfers or directory listings).

4.54.2 tcp irtt hostid milliseconds

Update the SRTT/MDEV cache entry for hostid by simulating a RTT measurement of milliseconds. If there was no previous cache entry for hostid, this will result in a new entry having a SRTT of milliseconds and a MDEV of 0. This command is most useful when executed from a startup file such as net.rc.

4.54.3 tcp kick tcb_addr

If there is unacknowledged data on the send queue of the specified TCP control block, this command forces an immediate retransmission. The control block address can be found with the tcp status command.

4.54.4 tcp mss [size]

Display or set the TCP Maximum Segment Size in bytes that will be sent on all outgoing TCP connect request (SYN segments). This tells the remote end the size of the largest segment (packet) it may send. Changing MSS affects only future connections, existing connections are unaffected. The default is 512 bytes. See the Setting Paclen, Maxframe, MTU, MSS and Window chapter for more information.

4.54.5 tcp reset tcb_addr

Delete the TCP control block at the specified address. The control block address can be found with the tcp status command.

4.54.6 tcp rtt tcb_addr milliseconds

Replaces the automatically computed round trip time in the specified TCP control block with the rtt in milliseconds. This command is useful to speed up recovery from a series of lost packets since it provides a manual bypass around the normal backoff retransmission timing mechanisms.

4.54.7 tcp status [tcb_addr [milliseconds]]

Without arguments, display several TCP-level statistics, plus a summary of all existing TCP connections, including TCP control block address, send and receive queue sizes, local and remote sockets, and connection state. If tcb_addr is specified, a more detailed dump of the specified TCP control block is generated, including send and receive sequence numbers and timer information. If milliseconds is specified, the dump is repeated every milliseconds, until any keyboard input is made.

4.54.8 tcp syndata [on|off]

Display or set the TCP SYN+data piggybacking flag. Some TCP implementations cannot handle SYN+data together. The default is off.

4.54.9 tcp timestamps [on|off]

Display or set the TCP timestamps flag, which controls the use of the TCP ECHO option. The default is off. See also RFC1072.

4.54.10 tcp trace [on|off]

Display or set the TCP trace flag. The default is off.

4.54.11 tcp window [size]

Display or set the default receive window size in bytes to be used by TCP when creating new connections. Existing connections are unaffected. The default is 2048 bytes. See the Setting Paclen, Maxframe, MTU, MSS and Window chapter for more information.

4.54.12 tcp wscale [on|off]

Display or set the TCP wscale flag, which controls the use of the TCP WINDOW SCALE option. The default is off. See also RFC1072.

4.55 telnet hostid [port]

Create a Telnet session to the specified host and enter converse mode. If port is given that port is used. Default port is 23.

4.56 topt [on|off]

Display or set the flag controlling the display of client Telnet's option processing. The default is off.

4.57 trace [interface [flags|subcommand [tracefile]]]

Control packet tracing by the interface drivers. Specific bits in flags enable tracing of the various interfaces and control the amount of information produced. Tracing is controlled on a per-interface basis. Without arguments, trace displays a list of all defined interfaces and their tracing status. Output can be limited to a single interface by specifying it, and the control flags can be changed by specifying them as well. flags is constructed from the logical OR of the following flag bits:
0001
Trace output packets
0010
Trace input packets

0000
Decode headers
0100
Print data (but not headers) in ASCII
0200
Print headers and data in HEX and ASCII

1000
Trace only packets addressed to me, suppress broadcasts
2000
Print all packet bytes (input and output), no interpretation
Instead of defining the trace flags numerically one of the following subcommands may be given:
-ascii
Decode headers only
-broadcast
Disable trace of broadcasts
-hex
Print data (but not headers) in ASCII
-input
Disable input trace
-output
Disable output trace
-raw
Disable raw packet dumps
ascii
Print data (but not headers) in ASCII
broadcast
Enable trace of broadcasts
hex
Print headers and data in HEX and ASCII
input
Enable input trace
off
Turn off all trace output
output
Enable output trace
raw
Enable raw packet dumps
If tracefile is not specified, tracing will be to the console.

4.58 udp subcommand

These commands control the User Datagram Protocol (UDP) service.

4.58.1 udp status

Display several UDP-level statistics, plus a summary of all existing UDP control blocks.

4.59 upload [stop|filename]

Open filename and send it on the current session as though it were typed on the terminal. The command upload stop stops uploading and closes the file. If no argument is specified the current status is displayed.

5. FTP Subcommands

This section describes the commands recognized in converse mode with a FTP session.

All commands 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.

5.1 abort

Abort a file transfer operation in progress. When receiving a file, abort simply resets the data connection. The next incoming data packet will generate a TCP RST (reset) in response which will 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. Abort is valid only when a transfer is in progress.

5.2 append local-file [remote-file]

Copy local-file to the end of remote-file. If remote-file is left unspecified, the local file name is used in naming the remote file.

5.3 ascii

Set the file transfer type to network ASCII. This is the default type. See also the type command.

5.4 binary

Set the file transfer type to BINARY/IMAGE. See also the type command.

5.5 bye

Close the connection to the server host.

5.6 cd remote-directory

Set the working directory on the server host to remote-directory.

5.7 cdup

Set the working directory on the server host to the parent of the current remote working directory.

5.8 delete remote-file

Delete remote-file. remote-file can be an empty directory.

5.9 dir [remote-directory [local-file]]

Write a listing of remote-directory to standard output or optionally to local-file. The listing includes any system-dependent information that the server chooses to include. For example, most UNIX systems produce output from the command ls -l (see also nlist). If neither remote-directory nor local-file is specified, list the remote working directory to standard output.

5.10 get remote-file [local-file]

Copy remote-file to local-file. If local-file is unspecified, ftp uses the specified remote-file name as the local-file name.

5.11 image

Set the file transfer type to BINARY/IMAGE. See also the type command.

5.12 ls [remote-directory [local-file]]

An alias for the dir command.

5.13 mkdir remote-directory

Create remote-directory.

5.14 modtime remote-file

Show the last modification time of remote-file.

5.15 nlist [remote-directory [local-file]]

Write an abbreviated listing of remote-directory to standard output or optionally to local-file. If neither remote-directory nor local-file is specified, list the remote working directory to standard output.

5.16 password password

Supply the password required by a remote system to complete the login procedure. The password command has only to be used if password was not specified with the user command.

5.17 put local-file [remote-file]

Copy local-file to remote-file. If remote-file is unspecified, ftp assigns the local-file name to the remote-file name.

5.18 pwd

Write the name of the remote working directory to standard output.

5.19 quit

An alias for the bye command.

5.20 quote ftp-command

Send ftp-command, verbatim, to the server host.

5.21 recv remote-file [local-file]

An alias for the get command.

5.22 reget remote-file [local-file]

reget acts like get, except that if local-file exists and is smaller than remote-file, local-file is presumed to be a partially transferred copy of remote-file and the transfer is continued from the apparent point of failure. This command is useful when transferring very large files over networks that tend to drop connections.

5.23 restart offset

Restart the immediately following get or put at the indicated offset.

5.24 rhelp [command-name]

Request help from the server host. If command-name is specified, supply it to the server.

5.25 rmdir remote-directory

Delete remote-directory. remote-directory must be an empty directory.

5.26 send local-file [remote-file]

An alias for the put command.

5.27 size remote-file

Show the size of remote-file.

5.28 system

Show the type of operating system running on the remote machine.

5.29 type [a|b|i|l bytesize]

Set the FTP file transfer type to either ASCII (type a), or BINARY/IMAGE (type b or i). The default type is ASCII. In ASCII mode, files are sent as varying length lines of text separated by cr/lf sequences. In BINARY/IMAGE mode, files are sent exactly as they appear in the file system. ASCII mode should be used whenever transferring text between dissimilar systems (e.g., UNIX and MS-DOS) because of their different end-of-line and/or end-of-file conventions. When exchanging text files between machines of the same type, either mode will work, but BINARY/IMAGE mode is usually faster. Naturally, when exchanging raw binary files (executables, compressed archives, etc) BINARY/IMAGE mode must be used. Type l (logical byte size) is used when exchanging binary files with remote servers having oddball word sizes (e.g., DECSYSTEM-10s and 20s). Locally it works exactly like BINARY/IMAGE, except that it notifies the remote system how large the byte size is. bytesize is typically 8.

5.30 user user-name [password]

Log into the server host on the current connection, which must already be open.

6. Setting Paclen, Maxframe, MTU, MSS and Window

Many WAMPES users are confused by these parameters and do not know how to set them properly. This chapter will first review these parameters and then discuss how to choose values for them. Special emphasis is given to avoiding interoperability problems that may appear when communicating with non-WAMPES implementations of AX.25.

6.1 AX.25 Parameters

6.1.1 Paclen

Paclen limits the size of the data field in an AX.25 I frame. This value does NOT include the AX.25 protocol header (source, destination and digipeater addresses).

Since unconnected-mode (datagram) AX.25 uses UI frames, this parameter has no effect in unconnected mode.

The default value of paclen is 256 bytes.

6.1.2 Maxframe

This parameter controls the number of I frames that WAMPES may send on an AX.25 connection before it must stop and wait for an acknowledgement. Since the AX.25/LAPB sequence number field is 3 bits wide, this number cannot be larger than 7.

Since unconnected-mode (datagram) AX.25 uses UI frames that do not have sequence numbers, this parameter does NOT apply to unconnected mode.

The default value of maxframe in WAMPES is 7 frames.

6.2 IP and TCP Parameters

6.2.1 MTU

The MTU (Maximum Transmission Unit) is an interface parameter that limits the size of the largest IP datagram that it may handle. IP datagrams routed to an interface that are larger than its MTU are each split into two or more fragments. Each fragment has its own IP header and is handled by the network as if it were a distinct IP datagram, but when it arrives at the destination it is held by the IP layer until all of the other fragments belonging to the original datagram have arrived. Then they are reassembled back into the complete, original IP datagram. The minimum acceptable interface MTU is 28 bytes: 20 bytes for the IP (fragment) header, plus 8 bytes of data.

There is no default MTU in WAMPES, it must be explicitly specified for each interface as part of the attach command.

6.2.2 MSS

MSS (Maximum Segment Size) is a TCP-level parameter that limits the amount of data that the remote TCP will send in a single TCP packet. MSS values are exchanged in the SYN (connection request) packets that open a TCP connection. In the WAMPES implementation of TCP, the MSS actually used by TCP is further reduced in order to avoid fragmentation at the local IP interface. That is, the local TCP asks IP for the MTU of the interface that will be used to reach the destination. It then subtracts 40 from the MTU value to allow for the overhead of the TCP and IP headers. If the result is less than the MSS received from the remote TCP, it is used instead.

The default value of MSS is 512 bytes.

6.2.3 Window

This is a TCP-level parameter that controls how much data the local TCP will allow the remote TCP to send before it must stop and wait for an acknowledgement. The actual window value used by TCP when deciding how much more data to send is referred to as the effective window. This is the smaller of two values: the window advertised by the remote TCP minus the unacknowledged data in flight, and the congestion window, an automatically computed time-varying estimate of how much data the network can handle.

The default value of Window is 2048 bytes.

6.3 Discussion

6.3.1 IP Fragmentation vs AX.25 Segmentation

IP-level fragmentation often makes it possible to interconnect two dissimilar networks, but it is best avoided whenever possible. One reason is that when a single IP fragment is lost, all other fragments belonging to the same datagram are effectively also lost and the entire datagram must be retransmitted by the source. Even without loss, fragments require the allocation of temporary buffer memory at the destination, and it is never easy to decide how long to wait for missing fragments before giving up and discarding those that have already arrived. A reassembly timer controls this process. In WAMPES it is (re)initialized with the ip rtimer parameter (default 30 seconds) whenever progress is made in reassembling a datagram (i.e., a new fragment is received). It is not necessary that all of the fragments belonging to a datagram arrive within a single timeout interval, only that the interval between fragments be less than the timeout.

Most subnetworks that carry IP have MTUs of 576 bytes or more, so interconnecting them with subnetworks having smaller values can result in considerable fragmentation. For this reason, IP implementors working with links or subnets having unusually small packet size limits are encouraged to use transparent fragmentation, that is, to devise schemes to break up large IP datagrams into a sequence of link or subnet frames that are immediately reassembled on the other end of the link or subnet into the original, whole IP datagram without the use of IP-level fragmentation. Such a scheme is provided in AX.25 Version 2.1. It can break a large IP or NET/ROM datagram into a series of paclen-sized AX.25 segments (not to be confused with TCP segments), one per AX.25 I frame, for transmission and reassemble them into a single datagram at the other end of the link before handing it up to the IP or NET/ROM module. Unfortunately, the segmentation procedure is a new feature in AX.25 and is not yet widely implemented, in fact, WAMPES and NOS are so far the only known implementations. This creates some interoperability problems between WAMPES and non-WAMPES nodes, in particular, standard NET/ROM nodes being used to carry IP datagrams. This problem is discussed further in the section on setting the MTU.

6.3.2 Setting Paclen

The more data you put into an AX.25 I frame, the smaller the AX.25 headers are in relation to the total frame size. In other words, by increasing paclen, you lower the AX.25 protocol overhead. Also, large data packets reduce the overhead of keying up a transmitter, and this can be an important factor with higher speed modems. On the other hand, large frames make bigger targets for noise and interference. Each link has an optimum value of paclen that is best discovered by experiment.

Another thing to remember when setting paclen is that the AX.25 version 2.0 specification limits it to 256 bytes. Although WAMPES can handle much larger values, some other AX.25 implementations (including digipeaters) cannot and this may cause interoperability problems. Even WAMPES may have trouble with certain KISS TNCs because of fixed-size buffers. The original KISS TNC code for the TNC-2 by K3MC can handle frames limited in size only by the RAM in the TNC, but some other KISS TNCs cannot.

One of the drawbacks of AX.25 is that there is no way for one station to tell another how large a packet it is willing to accept. This requires the stations sharing a channel to agree beforehand on a maximum packet size. TCP is different, as we shall see.

6.3.3 Setting Maxframe

For best performance on a half-duplex radio channel, maxframe should always be set to 1. The reasons are explained in the paper Link Level Protocols Revisited by Brian Lloyd and Phil Karn, which appeared in the proceedings of the ARRL 5th Computer Networking Conference in 1986.

6.3.4 Setting MTU

TCP/IP header overhead considerations similar to those of the AX.25 layer when setting paclen apply when choosing an MTU. However, certain subnetwork types have well-established MTUs, and these should always be used unless you know what you're doing: 1500 bytes for Ethernet, and 508 bytes for ARCNET. The MTU for PPP is automatically negotiated, and defaults to 1500. Other subnet types, including SLIP and AX.25, are not as well standardized.

SLIP has no official MTU, but the most common implementation (for BSD UNIX) uses an MTU of 1006 bytes. Although WAMPES has no hard wired limit on the size of a received SLIP frame, this is not true for other systems. Interoperability problems may therefore result if larger MTUs are used in WAMPES.

Choosing an MTU for an AX.25 interface is more complex. When the interface operates in datagram (UI frame) mode, the paclen parameter does not apply. The MTU effectively becomes the paclen of the link. However, as mentioned earlier, large packets sent on AX.25 connections are automatically segmented into I frames no larger than paclen bytes. Unfortunately, as also mentioned earlier, WAMPES and NOS are so far the only known implementations of the new AX.25 segmentation procedure. This is fine as long as all of the NET/ROM nodes along a path are running WAMPES, but since the main reason WAMPES supports NET/ROM is to allow use of existing NET/ROM networks, this is unlikely.

So it is usually important to avoid AX.25 segmentation when running IP over NET/ROM. The way to do this is to make sure that packets larger than paclen are never handed to AX.25. A NET/ROM transport header is 5 bytes long and a NET/ROM network header takes 15 bytes, so 20 bytes must be added to the size of an IP datagram when figuring the size of the AX.25 I frame data field. If paclen is 256, this leaves 236 bytes for the IP datagram. This is the default MTU of the netrom pseudo-interface, so as long as paclen is at least 256 bytes, AX.25 segmentation can't happen. But if smaller values of paclen are used, the netrom MTU must also be reduced with the ifconfig command.

On the other hand, if you're running IP directly on top of AX.25, chances are all of the nodes are running WAMPES and support AX.25 segmentation. In this case there is no reason not to use a larger MTU and let AX.25 segmentation do its thing. If you choose an MTU on the order of 1000-1500 bytes, you can largely avoid IP-level fragmentation and reduce TCP/IP-level header overhead on file transfers to a very low level. And you are still free to pick whatever paclen value is appropriate for the link.

6.3.5 Setting MSS

The setting of this TCP-level parameter is somewhat less critical than the IP and AX.25 level parameters already discussed, mainly because it is automatically lowered according to the MTU of the local interface when a connection is created. Although this is, strictly speaking, a protocol layering violation (TCP is not supposed to have any knowledge of the workings of lower layers) this technique does work well in practice. However, it can be fooled, for example, if a routing change occurs after the connection has been opened and the new local interface has a smaller MTU than the previous one, IP fragmentation may occur in the local system.

The only drawback to setting a large MSS is that it might cause avoidable fragmentation at some other point within the network path if it includes a "bottleneck" subnet with an MTU smaller than that of the local interface. (Unfortunately, there is presently no way to know when this is the case. There is ongoing work within the Internet Engineering Task Force on a "MTU Discovery" procedure to determine the largest datagram that may be sent over a given path without fragmentation, but it is not yet complete.) Also, since the MSS you specify is sent to the remote system, and not all other TCPs do the MSS-lowering procedure yet, this might cause the remote system to generate IP fragments unnecessarily.

On the other hand, a too-small MSS can result in a considerable performance loss, especially when operating over fast LANs and networks that can handle larger packets. So the best value for MSS is probably 40 less than the largest MTU on your system, with the 40-byte margin allowing for the TCP and IP headers. For example, if you have a SLIP interface with a 1006 byte MTU and an Ethernet interface with a 1500 byte MTU, set MSS to 1460 bytes. This allows you to receive maximum-sized Ethernet packets, assuming the path to your system does not have any bottleneck subnets with smaller MTUs.

6.3.6 Setting Window

A sliding window protocol like TCP cannot transfer more than one window's worth of data per round trip time interval. So this TCP-level parameter controls the ability of the remote TCP to keep a long "pipe" full. That is, when operating over a path with many hops, offering a large TCP window will help keep all those hops busy when you're receiving data. On the other hand, offering too large a window can congest the network if it cannot buffer all that data. Fortunately, new algorithms for dynamic controlling the effective TCP flow control window have been developed over the past few years and are now widely deployed. WAMPES includes them, and you can watch them in action with the tcp status tcb_addr command. Look at the cwind (congestion window) value.

In most cases it is safe to set the TCP window to a small integer multiple of the MSS, (eg. 4 times), or larger if necessary to fully utilize a high bandwidth*delay product path. One thing to keep in mind, however, is that advertising a certain TCP window value declares that the system has that much buffer space available for incoming data. WAMPES does not actually preallocate this space, it keeps it in a common pool and may well "overbook" it, exploiting the fact that many TCP connections are idle for long periods and gambling that most applications will read incoming data from an active connection as soon as it arrives, thereby quickly freeing the buffer memory. However, it is possible to run WAMPES out of memory if excessive TCP window sizes are advertised and either the applications go to sleep indefinitely (eg. suspended Telnet sessions) or a lot of out-of-sequence data arrives. It is wise to keep an eye on the amount of available memory and to decrease the TCP window size (or limit the number of simultaneous connections) if it gets too low.

Depending on the channel access method and link level protocol, the use of a window setting that exceeds the MSS may cause an increase in channel collisions. In particular, collisions between data packets and returning acknowledgments during a bulk file transfer may become common. Although this is, strictly speaking, not TCP's fault, it is possible to work around the problem at the TCP level by decreasing the window so that the protocol operates in stop-and-wait mode. This is done by making the window value equal to the MSS.

6.4 Summary

In most cases, the default values provided by WAMPES for each of these parameters will work correctly and give reasonable performance. Only in special circumstances such as operation over a very poor link or experimentation with high speed modems should it be necessary to change them.