home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff225.lzh / AmigaTCP / userman.doc < prev    next >
Text File  |  1989-06-24  |  198KB  |  4,753 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                       The KA9Q Internet Software Package
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.                              Preliminary Version
  28.  
  29.                                January 20, 1988
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.                                       by
  43.  
  44.                              Bdale Garbee, N3EUA
  45.  
  46.                              using material from
  47.  
  48.                                Phil Karn, KA9Q
  49.                              Brian Lloyd, WB6RQN
  50.  
  51.                        and suggestions from many others
  52.  
  53.  
  54.           Copyright 1988 by Bdale Garbee, Phil Karn and Brian Lloyd.
  55.                              All Rights Reserved.
  56.  
  57.                   This Document may be reproduced in whole
  58.                  or in part for any non-commercial purpose,
  59.                    as long as credit is given the authors.
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                                     - 2 -
  71.  
  72.  
  73. _1.  _B_a_c_k_g_r_o_u_n_d _a_n_d _O_v_e_r_v_i_e_w
  74.  
  75. _1._1.  _W_h_a_t'_s _T_C_P/_I_P _A_l_l _A_b_o_u_t?
  76.  
  77. Charles Hedrick of RUTGERS, the State University of New Jersey, has written  a
  78. very important document... a description of the "world of TCP/IP" that manages
  79. to be both a reasonable introduction for the non-technical or mildly technical
  80. individual,  and an excellent starting point for anyone interested in learning
  81. more about  the  family  of  networking  protocols  commonly  referred  to  as
  82. "TCP/IP".
  83.  
  84. The only difficulty with this document for those who are trying to learn  more
  85. about TCP/IP in the Amateur Radio "Packet" environment, is that the experience
  86. Mr. Hedrick works from is almost entirely with the wired  networks  common  in
  87. universities  and  businesses,  where  various  computer systems are networked
  88. together using some form of wire (usually coaxial cable  as  in  Ethernet,  or
  89. fiber optic cabling as in Pronet).
  90.  
  91. The individual who is familiar with radio transmission will  easily  recognize
  92. differences  between  the  wired environment and the on-air environment.  This
  93. does not mean that the protocols are unfit for use on the air, it simply means
  94. that  we  need to be careful when *implementing* the protocols in software for
  95. use on the radio that we don't make assumptions that aren't valid on the  air!
  96. In  particular,  wired  networks allow the assumption that every host can hear
  97. every other host on the wire... quite unlike the  situation  in  radio,  where
  98. one-way propagation paths are often the norm.
  99.  
  100. Mr. Hedrick mentions several protocols that can "ride on top of" IP,  such  as
  101. Sun's Network File System, NFS.  Some of the applications that he talks about,
  102. including NFS, while wonderful on wired networks,  are  somewhat  unreasonable
  103. for  packet  radio  until or unless we have *much* higher speed modems.  Wired
  104. networks can easily run at 10 million bits per  second,  while  packet  ranges
  105. from  300  bits  per second on HF, to perhaps 56 thousand bits per second with
  106. the WA4DSY modems on UHF.  Therefore, some of the protocols such as  NFS  that
  107. like  to eat lots of network bandwith won't be as neat on current packet radio
  108. as they are on current wired networks, but they certainly provides a  dramatic
  109. improvement in potential services for the "next generation" of packet radio.
  110.  
  111. The KA9Q Internet Package is currently the most common  TCP/IP  implementation
  112. (if  not the only one!) in use on Amateur Packet Radio.  The software supports
  113. the IBM PC and clones, the Apple Macintosh, the Commodore Amiga, and both  BSD
  114. and  System 5 Unix variants.  The package provides IP, ICMP, TCP, UDP, and ARP
  115. as basic services, and implements the  FTP,  Telnet,  and  SMTP  protocols  as
  116. applications.   The  package also includes a separate mail user interface pro-
  117. gram by N3EUA called BM, and software from WA3PXX  for  forwarding  PBBS  mail
  118. over  TCP.   An  associated  set  of software packages provide replacement ROM
  119. firmware for several TNC's, allowing them to be  used  with  the  KA9Q  TCP/IP
  120. Package.   At least two commercial manufacturers, AEA and Kantronics, now sup-
  121. port the KISS protocol in their TNC's, making them usable with TCP/IP.
  122.  
  123. Charles Hedrick's excellent introduction to TCP/IP can be found  in  the  same
  124. place  you found this document, named TUTORIAL.DOC. If you're new to all this,
  125. go find and read that before you get too wound up in the bits...
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                                     - 3 -
  137.  
  138.  
  139. _1._2.  _W_h_a_t'_s _I_n _t_h_e _K_A_9_Q _P_a_c_k_a_g_e
  140.  
  141. This is an overview of the various modules making up the  KA9Q  Amateur  Radio
  142. Internet  Protocol  package. Each section first describes the protocol that is
  143. supported, followed by a description of the implementation.
  144.  
  145. _1._2._1.  _S_u_b_n_e_t _L_a_y_e_r
  146.  
  147. _1._2._1._1.  _S_t_a_n_d_a_r_d _1_0 _m_e_g_a_b_i_t _E_t_h_e_r_n_e_t
  148.  
  149. The driver provided is for the 3-Com 3C500 (IE) controller for the PC.   Tight
  150. assembler  loops  are  used  instead of DMA for copying data in and out of the
  151. controller's buffer; this seems fast enough.  Only the receiver  is  interrupt
  152. driven; incoming packets are placed on a queue which is then emptied at a more
  153. leisurely pace by the  main  loop  code.   Since  Ethernet  is  so  fast,  the
  154. transmitter  routine  busy-waits  for completion. The IE controller has only a
  155. single buffer which is shared between receive and transmit. Packets  occasion-
  156. ally  get  lost  under heavy load, especially when several TCP connections are
  157. active at once and/or the TCP receive window sizes are  larger  than  the  MSS
  158. values.  This  is  very  hard to fix without going to a newer, more reasonably
  159. designed controller.
  160.  
  161. _1._2._1._2.  _S_e_r_i_a_l _L_i_n_e _I_P (_S_L_I_P)
  162.  
  163. SLIP is a very simple technique for sending Internet Datagrams across ordinary
  164. asynchronous  lines  (e.g., modems). Its only function is to delimit datagrams
  165. with framing characters, which are "byte stuffed" for transparency.  No  error
  166. checking  is  provided;  the  checksums  that  are part of IP, TCP and UDP are
  167. relied on for this.  SLIP is popular on UNIX systems that support  TCP/IP,  so
  168. this  represented  the easiest way to get my package up and talking with other
  169. Internet sites.  It also allows the use of existing AX.25 TNCs without modify-
  170. ing  the  latter,  although  this  is should only be done as a stopgap measure
  171. until an HDLC link level driver can be integrated directly into the package.
  172.  
  173. _1._2._1._3.  _A_X._2_5/_K_I_S_S _T_N_C
  174.  
  175. Sends and receives IP and  ARP  datagrams  encapsulated  in  AX.25  Unnumbered
  176. Information (UI) frames. This allows an unlimited number of simultaneous users
  177. on the local radio channel, since there are no connections at link level.  The
  178. special AX.25 Level 3 Protocol ID values of hex CC (IP) and CD (ARP) are used.
  179.  
  180. With the 871225.0 release, support has also been added  for  encapsulating  IP
  181. datagrams  in  "normal"  AX.25 connected-mode packets.  This was a natural by-
  182. product of adding full AX.25 level 2 session support to the package.
  183.  
  184. This mode of operation requires that the TNC run special "KISS TNC" code. Ver-
  185. sions  for  the TNC-2, TNC-1, and VADCG/ASHBY boards are included in this dis-
  186. tribution.  Some manufacturers, including AEA and Kantronics, are adding  sup-
  187. port  for  KISS  into  their commercial TNC products.  Note that this style of
  188. operation is NOT compatible with a "stock" TNC carrying SLIP format  datagrams
  189. in connected mode.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                                     - 4 -
  203.  
  204.  
  205. _1._2._1._4.  _A_X._2_5/_P_A_C_C_O_M_M _P_C-_1_0_0 _I_n_t_e_r_f_a_c_e (_N_O_T _Y_E_T _W_O_R_K_I_N_G)
  206.  
  207. The PC-100 is an I/O adapter card for the PC containing a  Zilog  8530  Serial
  208. Communications  Controller and two AMD 7910 World Chip modems.  The encapsula-
  209. tion method is identical to (and compatible with) the AX.25/KISS TNC interface
  210. driver.
  211.  
  212. _1._2._1._5.  _A_X._2_5/_E_a_g_l_e _I_n_t_e_r_f_a_c_e
  213.  
  214. There is a card available at some swapfests made  by  Eagle  Computer  Company
  215. that implements two ports using the Zilog 8530.  External modems are required.
  216. This driver is very similar to (and may eventually be merged with) the  PC-100
  217. driver.
  218.  
  219. _1._2._1._6.  _A_d_d_r_e_s_s _R_e_s_o_l_u_t_i_o_n _P_r_o_t_o_c_o_l (_A_R_P)
  220.  
  221. ARP is used for the automatic mapping  of  IP  addresses  to  link  or  subnet
  222. addresses.  While  originally  designed for the specific task of mapping IP to
  223. Ethernet addresses, the protocol is general enough to be used on any  link  or
  224. subnet that supports a broadcast facility.  ARP is described in ARPA RFC-826.
  225.  
  226. Both Ethernet and AX.25 format addresses are currently supported.  Instead  of
  227. discarding  a packet when an ARP request is sent, this implementation holds it
  228. on a queue for a limited time, pending a response to the request.
  229.  
  230. _1._2._2.  _I_n_t_e_r_n_e_t _l_a_y_e_r
  231.  
  232. _1._2._2._1.  _I_n_t_e_r_n_e_t _P_r_o_t_o_c_o_l (_I_P)
  233.  
  234. IP is the universal network-level datagram protocol of the ARPA  Internet.  It
  235. corresponds  roughly to level 3 of the ISO Reference Model (ISORM). (Actually,
  236. IP belongs to the 3B internetwork sublayer if you follow the  amoeboid  proli-
  237. feration  of  ISO  sublayers).  Routines are provided to generate, receive and
  238. route (i.e., packet switch) IP datagrams. IP is specified in ARPA RFC-791  and
  239. MIL-STD-1777.
  240.  
  241. IP datagram fragmentation and reassembly is fully implemented. The IP  options
  242. Loose  Source  Routing,  Strict Source Routing and Record Route are supported;
  243. Stream ID, Security and Timestamp are ignored. (Few, if any,  IP  options  are
  244. used  extensively  in  the  ARPA  Internet).  The IP module includes a routing
  245. (packet switching) facility; currently this consists of a table  containing  a
  246. list  of  host-specific  destinations along with a "default" entry that may be
  247. used when the desired destination is not found in the table.  No  protocol  is
  248. yet provided to actually manage the table; currently it must be done manually,
  249. either locally or remotely.  NB! "Networks" (in the  ARPA  Class-A/B/C  sense)
  250. are  not  yet understood, in that all entries in the routing table (except for
  251. the default entry) must be host-specific.  This will be fixed  in  the  future
  252. with a "generalized subnetting" scheme that will allow each entry in the table
  253. to have an arbitrary, variable length "subnet mask."
  254.  
  255. _1._2._2._2.  _I_n_t_e_r_n_e_t _C_o_n_t_r_o_l _M_e_s_s_a_g_e _P_r_o_t_o_c_o_l (_I_C_M_P)
  256.  
  257. ICMP is the error reporting adjunct to IP. It appears as a pseudo-protocol  on
  258. top  of  IP,  but  is  actually  considered  to be part of IP. The IP routines
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                                     - 5 -
  269.  
  270.  
  271. automatically generate ICMP messages whenever an error occurs in the  process-
  272. ing  of  IP datagrams; incoming ICMP messages are passed up to the originating
  273. end-to-end protocol for appropriate action. ICMP is specified in ARPA RFC-792.
  274.  
  275. This ICMP supports all options except ICMP Timestamps.
  276.  
  277. _1._2._3.  _H_o_s_t-_H_o_s_t _L_a_y_e_r
  278.  
  279. _1._2._3._1.  _T_r_a_n_s_m_i_s_s_i_o_n _C_o_n_t_r_o_l _P_r_o_t_o_c_o_l (_T_C_P)
  280.  
  281. TCP provides a reliable, sequenced "virtual circuit" or  "connection-oriented"
  282. service  atop IP on an end-to-end basis. It corresponds to the Transport layer
  283. (level 4) of the OSI model.  Since a single TCP module supports multiple  con-
  284. nections  through  the use of port numbers, it also provides Session (level 5)
  285. functionality without the need for a distinct layer. (Or it makes the  session
  286. layer  unnecessary, depending on your point of view). TCP is specified in ARPA
  287. RFC-793 and MIL-STD-1778.
  288.  
  289. The implementation supports an arbitrary number of  simultaneous  connections,
  290. limited  only  by  memory  space  for control blocks. An "upcall" mechanism is
  291. available to notify the user of three events: connection state change, receive
  292. data  available  and transmit buffer space available. The Maximum Segment Size
  293. option is understood and used when it is received, and a  global  variable  is
  294. used  for generating MSS in outgoing segments. There is currently no provision
  295. for sending URGent data.  The latest recommendations on  "tinygram"  avoidance
  296. (Nagle, ARPA RFC-896) are implemented and work quite well.
  297.  
  298. _1._2._3._2.  _U_s_e_r _D_a_t_a_g_r_a_m _P_r_o_t_o_c_o_l (_U_D_P)
  299.  
  300. UDP provides only a simple, unguaranteed "datagram" or  "connectionless"  ser-
  301. vice,  adding only checksums and port multiplexing to the raw service provided
  302. by IP. As an alternative to TCP, UDP also sits at  level  4  (and  5)  of  the
  303. ISORM. UDP is specified in ARPA RFC-768.
  304.  
  305. The implementation supports the creation of queues on local sockets. An upcall
  306. mechanism  similar  to  that used in TCP notifies the user when datagrams have
  307. arrived.
  308.  
  309. _1._2._4.  _A_p_p_l_i_c_a_t_i_o_n _L_a_y_e_r
  310.  
  311. _1._2._4._1.  _F_i_l_e _T_r_a_n_s_f_e_r _P_r_o_t_o_c_o_l (_F_T_P)
  312.  
  313. FTP is for transfer of binary or text files between hosts. FTP  uses  two  TCP
  314. connections  -  one for exchanging commands and responses in the form of ASCII
  315. strings, and the other for the actual data transfers. FTP is defined  in  ARPA
  316. RFC-959.
  317.  
  318. FTP is implemented in two parts, a server half and a client half.  The  server
  319. half supports multiple simultaneous remote users, although at the moment there
  320. is no access control; anyone may access, delete or overwrite any file  on  the
  321. machine.  The client half is invoked by the "ftp" command.
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.                                     - 6 -
  335.  
  336.  
  337. _1._2._4._2.  _R_e_m_o_t_e _l_o_g_i_n _p_r_o_t_o_c_o_l (_T_e_l_n_e_t)
  338.  
  339. Telnet is for logging into remote systems  and  negotiating  various  options,
  340. such  as remote vs local echoing. Telnet itself is documented in ARPA RFC-854,
  341. with the many options defined in other RFCs.
  342.  
  343. The client half supports the ECHO and TRANSMIT-BINARY options; it  is  invoked
  344. by  the "telnet" command. A telnet "server" has been written, but since MS-DOS
  345. isn't a timesharing system it is used for  keyboard-to-keyboard  conversations
  346. instead.  An incoming connect request to the local Telnet port creates a local
  347. Telnet session and notifies the local user. He may then select the new session
  348. and carry out a conversation with the remote initiator.
  349.  
  350. _1._2._4._3.  _S_i_m_p_l_e _M_a_i_l _T_r_a_n_s_f_e_r _P_r_o_t_o_c_o_l (_S_M_T_P)
  351.  
  352. As the name implies, is used for  the  transfer  of  electronic  mail  between
  353. hosts.  SMTP commands and responses are strings of ASCII characters resembling
  354. those used by FTP. SMTP uses a single TCP connection for both control and  the
  355. actual mail messages.  SMTP is described in ARPA RFC-821; headers in mail mes-
  356. sages are described in RFC-822.
  357.  
  358. A simple version server (receiver) is implemented;  it  accepts  mail  from  a
  359. remote sender and appends it to a mailbox. Mail forwarding, which accounts for
  360. much of the complexity in other mail  servers,  is  not  implemented.  A  mail
  361. client  ("user  agent")  for composing and sending messages developed by Bdale
  362. Garbee, N3EUA, and others is included.  It is called 'BM', and  is  documented
  363. elsewhere.
  364.  
  365. _1._2._5.  _S_e_s_s_i_o_n _c_o_n_t_r_o_l
  366.  
  367. The user may manage several simultaneous Telnet and  FTP  client  invocations.
  368. Only  one client session is "active" at any one time, but the user may quickly
  369. switch between them. Terminal output arriving for an inactive session is  held
  370. until  that  session  is again made active.  (Note that this is in addition to
  371. the multiple server sessions which go on automatically  "in  the  background",
  372. i.e., without operator intervention).
  373.  
  374. The Internet package has been tested with and works  under  DoubleDos  4.0  by
  375. SoftLogic  Solutions,  allowing  the  system to be simultaneously "on the net"
  376. while executing conventional MS-DOS commands.  The net program uses  the  spe-
  377. cial  DoubleDos  function  call 0EEH to relinquish the processor when it isn't
  378. needed; this speeds up the task running in the other partition.  This function
  379. is a "no-op" when DoubleDos isn't active.
  380.  
  381. _2.  _A_d_m_i_n_i_s_t_r_i_v_i_a
  382.  
  383. _2._1.  _W_h_a_t _a_n "_I_P _A_d_d_r_e_s_s" _i_s _a_n_d _H_o_w _t_o _G_e_t _O_n_e
  384.  
  385. IP Addresses are 32 bit numbers that uniquely identify  a  given  machine  (or
  386. "host") running the TCP/IP protocol suite.  All of the possible 32 bit numbers
  387. are coordinated by an entity known as the Network Information Center, or  NIC.
  388. Amateur Radio operators are fortunate in that a "Class A Subnet" consisting of
  389. 24 bits of address, in the range 44.X.X.X, has  been  reserved  for  our  use.
  390. Brian  Kantor,  WB6CYT  of  San  Diego,  CA,  now  serves  as  the  top  level
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                                     - 7 -
  401.  
  402.  
  403. administrator of the 44.X.X.X address space, and assigns blocks  of  addresses
  404. to regional coordinators from around the world.
  405.  
  406. You need to have a unique address before you can link in with the rest of  the
  407. networked world.
  408.  
  409. <insert info on how to get address>
  410.  
  411. _2._2.  _O_b_t_a_i_n_i_n_g _S_o_f_t_w_a_r_e _U_p_d_a_t_e_s
  412.  
  413. The KA9Q Internet software package  is  still  evolving  and  growing.   As  a
  414. result,  we  occasionally  issue  updates to the software that fix bugs and/or
  415. update functionality.  Announcements are always made to the USENET news  group
  416. rec.ham-radio.packet,  and  in  the bulletins on N3EUA's telephone BBS system.
  417. They usually also show up on Compuserve within a day or two.  There  is  never
  418. any charge for the software.  A small charge may exist for copying floppies if
  419. you want the bits on disk, and of course you'll have to pay the long  distance
  420. if you grab the bits over the phone!
  421.  
  422. If several people are running the software in  your  area,  get  together  and
  423. decide on one person to get the new bits, then copy it around.  We won't mind.
  424.  
  425. _2._2._1.  _F_r_o_m _N_3_E_U_A'_s _P_h_o_n_e _B_B_S
  426.  
  427. The HIP Shack phone BBS, running Opus software, is reachable as  Fidonet  node
  428. 128/19,  303/495-2061.   The  BBS  supports  300,  1200  and  2400 baud, is up
  429. 24hrs/day, and is configured to allow first-time users  more  than  sufficient
  430. time to download the entire package in one phone call at 1200 baud.
  431.  
  432. The BBS is always the first place  that  the  software  is  available.   Beta-
  433. release executables for the PC can also occasionally be found here.  You down-
  434. load and use these at your own risk!  (Known as the "you get what you pay for"
  435. principle).
  436.  
  437. _2._2._2.  _F_r_o_m _N_3_E_U_A'_s _U_n_i_x _M_a_c_h_i_n_e
  438.  
  439. For those running Unix machines with UUCP capability, there  is  an  anonymous
  440. UUCP  login on winfree, N3EUA's BSD Unix machine, that can be used to download
  441. the software.  This machine is up 24hrs/day, but only has one modem,  and  the
  442. modem stays fairly busy.  A typical L.sys entry might be:
  443.  
  444.         winfree Any ACU 2400 1-303-495-0492 ogin: Uanon word: notFTP
  445.  
  446.  
  447. Start by transferring the file /usr/spool/uucppublic/pub/README for a list  of
  448. the files available, and current release notes.
  449.  
  450. _2._2._3.  _V_i_a _F_T_P _o_n _t_h_e _I_n_t_e_r_n_e_t
  451.  
  452. The current revision of the software is available on  SIMTEL20.ARPA  within  a
  453. few  days  of  each  release.   The  files  usually  reside  in  the directory
  454. PD:<MSDOS.PACKET>.  Questions on the files on  Simtel20  can  be  directed  to
  455. W8SDZ@SIMTEL20.ARPA.  Anonymous FTP's are allowed.
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.                                     - 8 -
  467.  
  468.  
  469. Beta-releases are often available on the machine LOUIE.UDEL.EDU, in the direc-
  470. tory  tree rooted at pub/ka9q.  Anonymous FTP's are allowed, but unless you're
  471. working on the software, the bits on louie can be "dangerous", as  they  often
  472. include  incompletely implemented features, and can have serious bugs.  Caveat
  473. Emptor.
  474.  
  475. _2._2._4.  _O_n _P_C _F_l_o_p_p_i_e_s
  476.  
  477. The Tucson Amateur Packet Radio association (TAPR) now provides floppy  copies
  478. of  the  software  on  360k PC floppies, and can provide KISS ROMs for various
  479. TNC's, at a nominal charge for duplication and  shipping.   Contact  TAPR  for
  480. more information.
  481.  
  482. _2._2._5.  _O_n _N_a_t_i_v_e _M_e_d_i_a _f_o_r _O_t_h_e_r _M_a_c_h_i_n_e_s
  483.  
  484. Copies of the software for the Macintosh and Amiga are best obtained by  down-
  485. loading  from  an  online  source, or by copying a friend's disk.  If all else
  486. fails, Mikel Matthews (the author of the Mac/Amiga port) is willing to make  a
  487. small number of copies on native media for the Mac and/or Amiga.  Mikel can be
  488. reached via UUCP mail at ...uiucdcs!addamax!mikel.
  489.  
  490. _3.  _I_n_s_t_a_l_l_a_t_i_o_n _o_f _t_h_e _S_o_f_t_w_a_r_e
  491.  
  492. Installing the KA9Q Internet Package on your computer is not very hard, but if
  493. you  haven't  tried  to do it before, it can be a bit confusing.  The greatest
  494. efforts made so far towards making the process simple and understandable  have
  495. been  made  by  Brian  Lloyd,  WB6RQN.  Much of this installation section is a
  496. direct copy of portions of his HOWTO.DOC document.  Information about  instal-
  497. lation  on  machines  other  than  the  IBM clone family has come from various
  498. sources.
  499.  
  500. _3._1.  _C_o_n_f_i_g_u_r_i_n_g _Y_o_u_r _T_N_C _f_o_r _N_e_t_w_o_r_k _O_p_e_r_a_t_i_o_n:
  501.  
  502. If you are using this software in a University or other wired-network environ-
  503. ment, you may want to skip past the TNC installation section.  All Hams should
  504. keep reading!
  505.  
  506. There are now several choices for TNCs to be  used  with  the  TCP/IP  network
  507. code.  Versions of the Keep It Simple Stupid TNC interface software (KISS) are
  508. available for the TNC-1, the TNC-2, the VADCG board and  clones  (Ashby),  the
  509. Kantronics  family  of  TNCs,  and  the  AEA TNCs. Following are the different
  510. setup/configuration modes for the different TNCs.
  511.  
  512. _3._1._1.  _T_N_C-_1 _o_r _H_e_a_t_h _H_D-_4_0_4_0
  513.  
  514. The firmware for the TNC-1 is available in either a downloadable version or  a
  515. stand  alone  version.   I  will  describe  only the stand alone version here.
  516. Locate the ROM labeled E000 and remove it.  Insert the KISS PROM in its  place
  517. making  sure  that you orient the prom in the same direction (failure to do so
  518. will result in smoked PROM).  Connect your TNC-1 to  your  computer  using  an
  519. RS-232 cable.  A cable that passes the signals from pins 2, 3, and 7 is suffi-
  520. cient.
  521.  
  522. Since the TNC-1 has no switches for setting the baud rate to the computer  the
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.                                     - 9 -
  533.  
  534.  
  535. firmware has been "hard wired" to 4800 baud.  See the documentation that comes
  536. with the TNC-1 version of KISS for instructions on how to patch the .HEX  file
  537. for other baud rates.
  538.  
  539. _3._1._2.  _T_N_C-_2 _a_n_d _C_l_o_n_e_s
  540.  
  541. First step is to prepare  your  TNC-2  for  use  with  TCP/IP.   The  standard
  542. firmware for the TNC-2 is not very computer friendly and, as such, is not very
  543. useful when it comes time to make your computer speak  with  other  computers.
  544. To  that  end Mike Chepponis, K3MC, wrote the KISS (Keep It Simple Stupid) TNC
  545. code.  There are two ROM versions for the TNC-2. The first is contained  in  a
  546. type  2764  or  27C64  EPROM.  This version contains the KISS code in it.  The
  547. second version is contained in a type 27256 or 27C256 EPROM and contains  both
  548. the standard TAPR 1.1.3 TNC code and a loader that will permit you to download
  549. the KISS code into the TNC.  Check the EPROM you have received  and  determine
  550. which  type  you have.  If you are burning your own EPROMs you probably do not
  551. need these instructions.
  552.  
  553. Open up your TNC and locate the ROM.  It is in the socket labeled "U23." Using
  554. a  small  nail file or screwdriver gently pry up the existing EPROM. Carefully
  555. press the new EPROM into place being sure that the orientation  is  the  same.
  556. If  you  are  installing  the 2764 type of EPROM you will need to make a small
  557. modification to the TNC.  There is a location on  the  board  just  above  the
  558. first RAM socket labeled JMP-6.  Turn the board over and cut the trace joining
  559. the two pads.  Solder a two-pin jumper header in place.   When  using  a  type
  560. 2764  the  jumper  at  JMP-6 should be removed and installed when a type 27256
  561. EPROM is being used.  That should complete the hardware part of the  installa-
  562. tion.  As an alternative you may choose to burn the KISS code into a 27256 and
  563. not bother with jumpers.
  564.  
  565. Attach your TNC to your PC using an RS-232C cable.  You can use the same cable
  566. that you were using to connect your PC to your TNC.  If you are doing this for
  567. the first time and are not sure about your cabling, a cable with just pins  2,
  568. 3, and 7 passed through is sufficient.  Some PCs like to see the signals Clear
  569. To Send (CTS, pin 5), Data Set Ready (DSR, pin 6),  and  Data  Carrier  Detect
  570. (DCD,  pin  8) asserted.  You can set this up by jumpering pin 4 to 5, and pin
  571. 20 to pins 6 and 8 at the female DB-25 connector that goes to the PC.
  572.  
  573. Now to verify that the TNC still works.  Apply power to the TNC  and  turn  it
  574. on.   The  STA,  CON,  and  PWR LEDs should come on and the STA and CON lights
  575. should go out again about 1 second later.  If you have  the  type  2764  EPROM
  576. with  the  KISS  code  in it one or both of the STA and CON LEDs will begin to
  577. flash.  If the CON LED flashes you have 8Kb of RAM in the TNC.  If the STA LED
  578. flashes  you have 16Kb of RAM.  If both LEDs flash you have 32 Kb of RAM.  The
  579. flashing of the LEDs verifies the proper operation of the TNC.
  580.  
  581. If you got the combined loader and TAPR version EPROM, checkout is a  slightly
  582. different  process.   You  can  test  your TNC-2 using two methods.  The first
  583. method is to connect your TNC to a terminal program and send the character 'h'
  584. or  'H'  to  the  TNC.  The result should be the standard TNC startup message.
  585. Exit from the 1.1.3 mode of operation by issuing the reset command to the TNC.
  586. The second method involves downloading the KISS code to the TNC.  Use the mode
  587. command to set the baud rate of the comm port to the  proper  value,  e.g.  it
  588. matches  the  DIP  switch  setting  on  the back of the TNC, and copy the file
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.                                     - 10 -
  599.  
  600.  
  601. tnc2kiss.hex to the appropriate comm port.   The  following  command  sequence
  602. will serve to download the KISS code to the TNC:
  603.  
  604.         mode com1:4800
  605.         copy tnc2kiss.hex com1:
  606.  
  607. If the download was successful (it takes about one minute) the STA and/or  CON
  608. LEDs will begin flashing as described in the previous paragraph.  If the down-
  609. load is not successful check the cable from computer to TNC,  check  the  baud
  610. rate  on the TNC, and check to ensure that the computer is indeed sending data
  611. to the TNC.  Once this is done the TNC is ready to use with the NET program.
  612.  
  613.      NOTE: running KISS causes the stored parameters  in  the  TNC,  i.e.
  614.      MYCALL,  NEWMODE,  TXDELAY,  etc.,  to be destroyed.  Every time you
  615.      shift from KISS to TAPR modes you MUST reset the parameters.
  616.  
  617.  
  618. _3._1._3.  _A_E_A _P_K-_2_3_2, _P_K-_8_7, _o_r _n_e_w _H_e_a_t_h _T_N_C (_P_K-_2_3_2 _c_l_o_n_e)
  619.  
  620. If you have one of these boxes, congratulations!  You do not  have  to  change
  621. PROMS!   KISS  is already installed as a standard feature if you have a recent
  622. release of the firmware, 4-MAR-87 or later for the  PK-232,  or  21-JAN-87  or
  623. later for the PK-87, you have KISS in your TNC already.  To make it work first
  624. ensure that your computer can communicate with  the  TNC  in  standard  packet
  625. mode.   This  will  ensure  that the computer, TNC, cabling, and radio are all
  626. operating properly.
  627.  
  628. [Please note that one of the commands "PACKET" is not valid on the  PK-87  and
  629. will only elicit a "Huh?" response.  Please note that comments have been added
  630. to the commands.  Do not type the information following  the  double  dash  or
  631. type the double dash itself.]
  632.  
  633. Here is the sequence of commands that will turn on the KISS mode for  the  AEA
  634. products:
  635.  
  636.         AWLEN 8         -- ensure it can speak 8 bit data
  637.         PARITY 0        -- no parity
  638.         RESTART         -- warm reset; make the previous commands take effect
  639.         PACKET          -- PK-232 or Heath only
  640.         TONE 3          -- PK-87 only
  641.         START 0         -- start, stop, xon, xoff, xflow to disable software
  642.         STOP 0             flow cont
  643.         XON 0
  644.         XOFF 0
  645.         XFLOW off
  646.         CONMODE trans   -- pass through all characters
  647.         HPOLL off       -- disable host polling
  648.         KISS on         -- enable KISS version of host mode
  649.         RAWHDLC on      -- turn off AX25L2 (the protocol is now handled by the PC)
  650.         PPERSIST on     -- turn off DWAIT and enable p-persistence
  651.         HOST on         -- start KISS running
  652.  
  653.  
  654. The PK-87 or the PK-232 will remain in the KISS mode until you  send  a  break
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.                                     - 11 -
  665.  
  666.  
  667. (~200ms of spacing) or until you send the command character three times (^C ^C
  668. ^C) in quick succession.  Beware!  Some terminal emulators  (like  YAPP)  will
  669. send  a  break  signal  when you exit from them.  That will undo your work and
  670. cause all manner of confusion.  The terminal program  PROCOMM  seems  to  work
  671. just  fine.  The TNC may also be switched back to ordinary AX.25 mode by issu-
  672. ing the following command from within NET.EXE:
  673.  
  674.         param ax0 255
  675.  
  676.  
  677. _3._1._4.  _K_a_n_t_r_o_n_i_c_s
  678.  
  679. Kantronics has recently begun to offer KISS on their products.  It is the sim-
  680. plest of the commercial implementations of KISS to configure and use.
  681.  
  682. First setup and operate your KAM, KPC-II, or KPC-4 for standard packet  opera-
  683. tion.  This will ensure that the computer, TNC, cabling, and radio are operat-
  684. ing properly.  Use your terminal program to send the following commands:
  685.  
  686.         ABAUD 4800      -- set the baud rate to whatever you will be using when
  687.                            net is running (set by the attach command)
  688.         DWAIT 0         -- disable DWAIT
  689.         PERSIST 50      -- enable persistence and set it to about 20%
  690.         SLOTTIME 16     -- set the slot time to 160 ms
  691.         KISS ON         -- Enable KISS mode at the next reset
  692.         PERM            -- make the above command permanent so that KISS
  693.                            will be entered whenever the TNC is powered up
  694.         RESET           -- start KISS
  695.  
  696.  
  697. If you wish to have the the TNC revert back to ordinary AX.25 mode  of  opera-
  698. tion  you  should  omit the PERM command from the above sequence. That way the
  699. TNC will revert back to ordinary AX.25 mode when  the  power  is  removed  and
  700. restored  to  the TNC.  The TNC may be switched back to ordinary AX.25 mode by
  701. issuing the command:
  702.  
  703.         param ax0 255
  704.  
  705.  
  706. This command will work even if the PERM command has been used to make KISS the
  707. default mode of operation.
  708.  
  709. _3._2.  _I_n_s_t_a_l_l_a_t_i_o_n _o_f _N_E_T._E_X_E _o_n _a_n _I_B_M _P_C _o_r _C_l_o_n_e
  710.  
  711. Create a directory called EXE and set that  as  the  default  directory.   Use
  712. PKXARC  to  extract the files from EXE.ARC into the new directory.  Should you
  713. not have PKXARC already, run the program PKX35A35.EXE provided with  the  dis-
  714. tribution.  This program will create the extraction utility and its documenta-
  715. tion.
  716.  
  717. There are two programs that make up the network software:  NET.EXE  (the  net-
  718. working code) and BM.EXE (the mail program).  Copy these programs from the EXE
  719. directory to the place on your hard disk where you keep command programs.   If
  720. you  are  running on a floppy based system you should create a bootable floppy
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.                                     - 12 -
  731.  
  732.  
  733. and copy these programs to the floppy.
  734.  
  735. Test to make sure that everything is there by executing  the  programs.   Type
  736. the command "net" and, if the installation of the network code was successful,
  737. the message "KA9Q internet protocol package" and the prompt "net>" will appear
  738. on  the screen.  This means that the network code is running and awaiting com-
  739. mands.
  740.  
  741. Exit from the net code with the command "exit." Now run the command "bm."  The
  742. screen  should  display  the message "Bdale's Messy-DOS Mailer" and the prompt
  743. "Brian"> will appear (this prompt or something like it is a  function  of  the
  744. content  of  the  bm.rc configuration file).  If all this has occurred, all is
  745. well so far.  If you do not get this response from bm, do  not  be  concerned.
  746. Try again after you have configured bm in the following steps.
  747.  
  748. _3._2._1.  _I_n_s_t_a_l_l_i_n_g _t_h_e _M_a_i_l _D_i_r_e_c_t_o_r_i_e_s _u_s_e_d _b_y _B_M
  749.  
  750. First step is to configure the mailer (BM).  To make BM work properly you must
  751. create the following directories on your disk:
  752.  
  753.         //spool
  754.         //spool//mail
  755.         //spool//mqueue
  756.  
  757.  
  758. Copy the file SEQUENCE.SEQ to the /spool/mqueue  directory.   Copy  the  files
  759. HOSTS.NET  and  BM.RC to the root directory of the default drive used when net
  760. is running.  If you are on a floppy based system you need to  put  BM.RC  with
  761. NET.EXE,  BM.EXE,  AUTOEXEC.NET,  HOSTS.NET,  and AUTOEXEC.BAT in the root (/)
  762. directory (more on AUTOEXEC.NET later).
  763.  
  764. _3._2._2.  _H_O_S_T_S._N_E_T
  765.  
  766. You will need to edit the file HOSTS.NET to know about all  the  systems  with
  767. which  you  will  exchange mail.  This is how net will translate the name into
  768. the IP address.  Here is an example of some  of  the  entries  I  have  in  my
  769. machine for other local TCP/IP stations:
  770.  
  771.         44.96.0.2       wb2sef.ampr
  772.         44.96.0.16      n8fjb.ampr
  773.         44.96.0.17      ka3lyq.ampr Roel
  774.  
  775.  
  776. All this does is translate the symbolic name to the IP  address,  e.g.  WB2SEF
  777. gets  translated  to  44.96.0.2  so that IP can route it to the proper network
  778. node.  This saves you from having to remember lots of numbers.  You  may  note
  779. that  the  last  entry has two aliases, either of which may be used to specify
  780. the IP address 44.96.0.17.  There is essentially no limit  to  the  number  of
  781. aliases  that  may  be listed for a single IP address.  Just be sure that they
  782. are all on one line.
  783.  
  784. _3._2._3.  _B_M._R_C
  785.  
  786. Next edit the file BM.RC.  This file lets the mail  system  know  about  local
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.                                     - 13 -
  797.  
  798.  
  799. host name, user name, and editor name.  Here are some example entries:
  800.  
  801.         host wb6rqn.ampr
  802.         user brian
  803.         edit emacs
  804.  
  805.  
  806. The edit entry should contain the name of your favorite editor, such as  edlin
  807. (edlin is not your favorite editor?).  This editor will be used to construct a
  808. mail message when you invoke that function of bm.  You may use any DOS  compa-
  809. tible  editor just so long as it has the capability to prepare ascii files (be
  810. careful if you specify a word processor -- some word processors embed  special
  811. characters in the file).
  812.  
  813. Later on you can read the documents BM.DOC and SMTP.DOC to get  more  informa-
  814. tion.  You at least have enough info to get your mailer running now.
  815.  
  816. _3._2._4.  _F_T_P_U_S_E_R_S
  817.  
  818. Now you need to possibly modify the /FTPUSERS file to permit users to send and
  819. receive  files  from  your system.  The FTPUSERS file contains the information
  820. about users in the following format:
  821.  
  822.         user password /directory permission-code
  823.  
  824.  
  825. The 'user' entry is the user's name, 'password' is the password for that user,
  826. '/directory'  is  the directory to which the user will have access (all of the
  827. subdirectories too), and permission-code is a number  between  0  and  7  that
  828. defines what the user may do.
  829.  
  830. The permission-code is a bit-map where the three least significant  bits  each
  831. have a specific meaning.  Here is a table:
  832.  
  833.         1 - read and directory access
  834.         2 - create access
  835.         4 - overwrite and delete access
  836.  
  837.  
  838. The protection bits are added together to  create  the  permission-code.   For
  839. example  3  (1+2)  permit  the user to read files and create new files but not
  840. overwrite or delete and existing file.  A permission-code of 7  (1+2+4)  would
  841. permit full access.  Here are some examples:
  842.  
  843.         guest * /public 3
  844.         brian xyzzy / 7
  845.  
  846.  
  847. In these examples guest may log in with any password and  may  copy  files  or
  848. create  new  files  in the directory /public while user brian must log in with
  849. password xyzzy but will be granted full access, e.g. read,  write,  overwrite,
  850. and delete, to all files in the system.
  851.  
  852. If you are running in a radio-based environment  I  would  not  give  out  the
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.                                     - 14 -
  863.  
  864.  
  865. latter  user/password  combination  because it will give anyone access to your
  866. entire disk.  Also remember that the user/password combination  are  broadcast
  867. in-the-clear  for anyone to read (if they have trace turned on). It is wise to
  868. segregate your radio-link users in a separate directory tree  and  not  permit
  869. delete or overwrite access.  That should prevent malicious mischief.
  870.  
  871. _3._2._5.  _C_o_n_f_i_g_u_r_i_n_g _N_E_T _a_n_d _t_h_e _A_U_T_O_E_X_E_C._N_E_T _f_i_l_e:
  872.  
  873. Now you need to configure and run NET.  Configuring NET to  run  may  be  per-
  874. formed manually every time you start up NET.EXE but that gets old pretty fast.
  875. There are usually many commands that must be typed the same way every time net
  876. is  started.   Fortunately  Phil thought of this and provided the AUTOEXEC.NET
  877. file.  The intention here is to place all the commands that you always execute
  878. in  a  file to be read and executed by NET.EXE whenever you start up.  To this
  879. end you will want to edit the file  AUTOEXEC.NET  prior  to  running  NET.EXE.
  880. Just use a text editor to enter the commands into the file AUTOEXEC.NET as you
  881. would type them at the "net>" prompt.
  882.  
  883. _3._2._5._1.  _S_e_t_t_i_n_g _t_h_e _I_P _a_d_d_r_e_s_s:
  884.  
  885. When NET.EXE first starts up you need to tell it about many things,  i.e  what
  886. comm  ports  you  have,  what your IP address is, what your host name is, what
  887. other systems you will communicate with, what services you  wish  to  provide,
  888. etc.   The  first  thing  to do is to tell net who we are with the ip address,
  889. hostname, and ax25 mycall commands.  Enter your ip address in  dotted  decimal
  890. notation or give the symbolic name from your HOSTS.NET file.  Here is an exam-
  891. ple:
  892.  
  893.         ip address [44.96.0.1]
  894.  
  895.  
  896. The selection of an address is very important.  If you are going to be part of
  897. a network you must have a unique address.  Talk to the person in your area who
  898. is responsible for coordinating addresses.  If you  are  not  a  part  of  the
  899. Internet  and  are  just  using  this with your own computers, pick any unique
  900. address that suits you.
  901.  
  902.      NOTE:  Throughout this document names and IP  addresses  are  inter-
  903.      changeable.   Net differentiates between the two by requiring you to
  904.      enclose IP addresses in square brackets [].
  905.  
  906.  
  907. _3._2._5._2.  _H_o_s_t_n_a_m_e:
  908.  
  909. The hostname command is used  to  set  the  name  of  your  system.   This  is
  910. displayed  when someone initiates an FTP session with your system.  Again here
  911. is an example:
  912.  
  913.         hostname wb6rqn.ampr
  914.  
  915.  
  916. This corresponds to my system in my local domain.  For the purposes of amateur
  917. packet  radio your call sign followed by "ampr" (amateur packet radio network)
  918. is probably sufficient.
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.                                     - 15 -
  929.  
  930.  
  931. _3._2._5._3.  _A_X_2_5 _M_y_c_a_l_l (_p_a_c_k_e_t _r_a_d_i_o _o_n_l_y):
  932.  
  933. Since I also run net on the air  (amateur  packet  radio  networking)  I  must
  934. specify my amateur call sign with the ax25 mycall command.  Again, here is the
  935. entry from my AUTOEXEC.NET file:
  936.  
  937.         ax25 mycall WB6RQN-0
  938.  
  939.  
  940. The call sign is entered in the same form that is used with the standard  TAPR
  941. TNC software, e.g. the call sign is followed by the SSID field.
  942.  
  943. If you are going to run TCP/IP on the air using  the  ax25  driver  (described
  944. below  with  the  attach command) the ax25 mycall entry MUST precede the first
  945. attach command that uses the ax25 driver.   Otherwise  there  is  no  required
  946. order for these commands.
  947.  
  948. _3._2._5._4.  _A_t_t_a_c_h _c_o_m_m_a_n_d
  949.  
  950. The attach command tells net about your comm ports and in what mode the  ports
  951. will  operate.   Currently four types of comm hardware are supported: standard
  952. PC async comm adapters, the HAPN TNC board for  the  PC,  the  Eagle  RS-232/2
  953. card,  and  the  3Com  Ethernet controller.  Each of these devices has its own
  954. version of the attach command.  Here  is  the  attach  command  for  an  async
  955. adapter  card  acting as COM1:.  You would use this to attach your pc to a TNC
  956. running the KISS code:
  957.  
  958.         attach asy 0x3f8 4 ax25 ax0 1024 256 4800
  959.  
  960.  
  961. This means attach an asynchronous adapter whose port address is 3F8 hex  using
  962. interrupt  line  4  (both  standard  for com1:), as an ax25 device (KISS TNC),
  963. using a buffer size of 1024 and  a  maximum  transmission  unit  (the  largest
  964. packet you are allowed to send) of 256 bytes, running at 4800 baud.  The media
  965. name for this device will be ax0, a name that will be used in the route,  con-
  966. nect,  and  param  commands  to  refer  to this comm port.  This is probably a
  967. pretty good place to start.  If you also wish to use COM2  instead  of  or  in
  968. addition to COM1 you would add the line:
  969.  
  970.         attach asy 0x2f8 3 ax25 ax1 1024 256 4800
  971.  
  972.  
  973. If you are instead going to use COM2 to connect with another PC using  a  hard
  974. wired  connection  (some  of  us  do have multiple PC's) you might want to use
  975. COM2: to connect to the other PC.  We would want to use SLIP to do this so the
  976. attach command would be:
  977.  
  978.         attach asy 0x2f8 3 slip sl0 1024 576 4800
  979.  
  980.  
  981.      NOTE:  IBM-PCs and clones all use I/O port address 0x3f8 and  inter-
  982.      rupt  request  line  4 for COM1 and port address 0x2f8 and interrupt
  983.      request line 3 for COM2.  There are other comm cards that  implement
  984.      COM3,  COM4,  etc.,  but  these  cards  may  use  non-standard  port
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.                                     - 16 -
  995.  
  996.  
  997.      addresses and interrupt request lines for these  ports.   Check  the
  998.      documentation that came with your comm card if you are trying to use
  999.      COM3 or higher.
  1000.  
  1001. If you have an HAPN TNC card for your PC you will want to enter the  following
  1002. attach command:
  1003.  
  1004.         attach hapn 0x3f8 4 ax25 h0 1024 256 csma
  1005.  
  1006.  
  1007. This tells net to use an HAPN board with the port address 3F8h  and  interrupt
  1008. request  line  4.   The  speed  of the board is determined by the board so the
  1009. software has no control over that function.  The  last  parameter,  listed  as
  1010. operation.
  1011.  
  1012. Recently the Eagle RS-232/2 card  has  become  available  at  very  reasonable
  1013. prices.   This two-channel card generates HDLC frames directly and may be con-
  1014. nected to a modem for direct packet radio operation without a TNC. Normally it
  1015. would be connected to a Bell-202-type half-duplex asynchronous modem.
  1016.  
  1017. The attach command for the Eagle board is almost  identical  to  that  of  the
  1018. standard async comm card.  Here is an example:
  1019.  
  1020.         attach eagle 0x300 5 ax25 eg0 2048 256 1200
  1021.  
  1022.  
  1023. Two items must be as shown in the example: the mode must always be  ax25  (not
  1024. SLIP)  and  the  media  name must begin with 'eg' and end with a single digit.
  1025. The first Eagle card must be called eg0 and the second must be called eg1.
  1026.  
  1027. The Eagle card is hard wired for a base address of 0x300 and IRQ5.  The use of
  1028. IRQ5  conflicts  with  the  disk  controller on the PC/XT (no problem with the
  1029. PC/AT).  If you wish to use the Eagle card with a PC/XT or compatible you will
  1030. need  to locate the trace from pin 3 of the 74LS125 (U12) to B23 (IRQ5) on the
  1031. edge connector.  Cut this trace at the edge connector and  reroute  it  to  B4
  1032. (IRQ2)  on the edge connector.  This will eliminate the conflict and allow you
  1033. to use IRQ2.
  1034.  
  1035. If you happen to have more than one PC you may wish to connect them  using  an
  1036. Ethernet.   The  net  software supports the 3Com 3C500 or 3C501 boards for the
  1037. PC.  The command to attach this board is:
  1038.  
  1039.         attach 3c500 0x300 3 arpa ec0 5 1500
  1040.  
  1041.  
  1042. This tells net that there is a 3Com 3C500 board  at  I/O  address  300h  using
  1043. interrupt  request  line  3  with the media name ec0.  Net should reserve five
  1044. buffers and the largest Ethernet packet may be 1500 bytes long.
  1045.  
  1046. A word about the selection of the value for  the  maximum  transmission  unit.
  1047. For standard TNCs and radios 256 is probably the largest value you should use.
  1048. This ensures compatibility with the rest of the AX.25  community  and  ensures
  1049. that you are legal if you are operating unattended (part 97 of the FCC regula-
  1050. tions specifically  mentions  the  AX.25  protocol  in  permitting  unattended
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.                                     - 17 -
  1061.  
  1062.  
  1063. digital  operation above 50 MHz).  The smallest value you may use is 64.  Per-
  1064. formance improves with larger values IF you can get  them  to  the  other  end
  1065. without  errors.   I suggest you stick with 256 until you can run some experi-
  1066. ments of your own.  If you have a good transmission path and all the  stations
  1067. and  gateways are attended, feel free to use larger values.  It will result in
  1068. improved performance (see the discussion of the mss and window parameters).
  1069.  
  1070. _3._2._5._5.  _P_a_r_a_m _c_o_m_m_a_n_d:
  1071.  
  1072. If you are using a TNC running the KISS code (you  probably  are  if  you  are
  1073. operating  amateur  packet  radio)  you will need to set the parameters in the
  1074. TNC.  This is accomplished with the param command.
  1075.  
  1076. There are five settable parameters in the kiss code.  They are:
  1077.  
  1078. 1.   Transmitter keyup delay (TXD).  This is how long the TNC will wait  after
  1079.      keying the transmitter prior to beginning to send data.  The proper value
  1080.      for this parameter is dependent on your configuration.  This value is  in
  1081.      10's  of  milliseconds.   Acceptable  values  range  from 0 (0 ms) to 255
  1082.      (2,550 ms or 2.55 seconds).
  1083.  
  1084. 2.   Persistence (p).  This is the probability that  the  TNC  will  key  your
  1085.      transmitter  if  a slot is found empty (the channel is free).  Acceptable
  1086.      values range from 0 (p = (0+1)/256 = 0.4%) to 255 (p = 255+1/256 = 100%).
  1087.      The  default  value is 63 (25%).  The optimum value is somewhere close to
  1088.      1/n where n is the number of users on the channel.
  1089.  
  1090. 3.   Slot time (ts).  This is how long that the TNC will wait between  samples
  1091.      of  the  channel.  Acceptable values range from 0 (0 ms) to 255 (2,550 ms
  1092.      or 2.55 seconds).
  1093.  
  1094. 4.   Tail timer (tt).  This is how long the  TNC  will  keep  the  transmitter
  1095.      keyed  after  the  last  character  has been transferred to the HDLC con-
  1096.      troller.  This has become an outdated command since most of the TNCs  now
  1097.      set this value automatically based on data rate.
  1098.  
  1099. 5.   Full Duplex.  A zero value (the default value) means operate the  TNC  in
  1100.      half-duplex  CSMA  mode  (listen  before you transmit).  A non-zero value
  1101.      means transmit whenever there is data to send.
  1102.  
  1103. Let us assume that on the channel associated with ax0 that I have a radio that
  1104. requires  a  transmit  keyup  delay  of  200  ms, I want persistence to be 20%
  1105. (p=0.2), and I want the slot time to be 160 ms.  These are the values that  we
  1106. use  in the DC area and make us "good neighbors" who do not "hog" the channel.
  1107. I would enter the following commands:
  1108.  
  1109.         param ax0 1 20
  1110.         param ax0 2 51
  1111.         param ax0 3 16
  1112.  
  1113.  
  1114. Note that the parameters are now specified as decimal values.
  1115.  
  1116.      NOTE: The 'param' command will be used  for  issuing  other  device-
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.                                     - 18 -
  1127.  
  1128.  
  1129.      dependent  commands  as  the need arises.  Right now it is used only
  1130.      for setting the parameters for kiss TNCs and the speed of  SLIP  and
  1131.      AX25  links.  Other versions of the 'param' command will be added as
  1132.      the need arises.
  1133.  
  1134. If you are dealing with a SLIP link (you used the entry slip instead  of  ax25
  1135. in  the  attach  command)  the param command is used to change the speed (baud
  1136. rate) for the line.  If you wanted to change the speed  of  your  second  slip
  1137. link to 4800 baud you would enter:
  1138.  
  1139.         param sl1 4800
  1140.  
  1141.  
  1142. _3._2._5._6.  _a_x_2_5 _d_i_g_i_p_e_a_t _c_o_m_m_a_n_d (_p_a_c_k_e_t _r_a_d_i_o _o_n_l_y):
  1143.  
  1144. If you are currently an active digipeater in your area you can also make  your
  1145. system  continue  to  be  a  digipeater for those poor souls unlucky enough to
  1146. still be running ordinary AX.25.  The command for this is:
  1147.  
  1148.         ax25 digipeat on
  1149.  
  1150.  
  1151. _3._2._5._7.  _M_a_i_l _G_a_t_e_w_a_y:
  1152.  
  1153. The mail subsystem (SMTP) needs to know where to send mail should the destina-
  1154. tion be unknown to the sending system.  This is handled by the gateway command
  1155. as follows:
  1156.  
  1157.         smtp gateway wa3pxx
  1158.         - or -
  1159.         smtp gateway [44.96.0.13]
  1160.  
  1161.  
  1162. Should you try to send mail to a host that is not in your HOSTS.NET  file  the
  1163. mailer will route the mail to the system specified in the gateway entry.  This
  1164. presumes that the gateway system is smart enough to figure  out  to  whom  the
  1165. mail  is addressed so that the mail can be forwarded.  At this time the mailer
  1166. in NET.EXE is not "smart" enough to act as a mail forwarding node.  This field
  1167. is only here should you be lucky enough to have another computer accessible to
  1168. you with a smart SMTP mailer or another host that acts as a gateway to another
  1169. network.   Any UNIX 4.2 or 4.3 BSD system has such a mailer.  A PC running the
  1170. WA3PXX BBS gateway also will serve.
  1171.  
  1172. For packet radio enthusiasts another use for the gateway command  is  to  send
  1173. mail  on  to  your  local  BBS  gateway station.  Bob Gibson, WA3PXX, has con-
  1174. structed a gateway program that will permit the  transfer  of  mail  from  the
  1175. WA7MBL  BBS  to  SMTP  and back again.  By having your local BBS run DoubleDos
  1176. with the WA7MBL BBS in one partition and NET in the other  you  can  automati-
  1177. cally move mail between the two domains.
  1178.  
  1179. _3._2._5._8.  _C_o_n_s_t_r_u_c_t_i_o_n _o_f _R_o_u_t_i_n_g _T_a_b_l_e_s:
  1180.  
  1181. Now you need to construct the routing table.  This table is used by the IP  to
  1182. determine  how  to  forward your packets.  Each entry consists of two or three
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.                                     - 19 -
  1193.  
  1194.  
  1195. parts, the IP address of the destination, the link upon which it is to be for-
  1196. warded,  and  the  IP address of the next station in line if there can be more
  1197. than one IP address on the link (used if the mode is ax25 and not used if  the
  1198. mode is slip).  Here are three sample entries, one for a station more than one
  1199. hop away via ax25 to be forwarded by 44.96.0.7, one for station one  hop  away
  1200. on ax25, and one for a station on the other side of a slip link:
  1201.  
  1202.         route add [44.96.0.5] ax0 [44.96.0.7]
  1203.         route add [44.96.0.2] ax0
  1204.         route add [44.96.0.12] sl0
  1205.         route add n3ja ax0
  1206.  
  1207.  
  1208. The first string following the command  'route  add'  is  the  destination  IP
  1209. address.   The  second  field, i.e. ax0 or sl0, is the media and must match up
  1210. with one of your previous attach commands.  The last field is the next station
  1211. in the path if the destination is more than one hop away.  This is an optional
  1212. field and only needs to be used if the media is a broadcast media such as Eth-
  1213. ernet or AX.25 and the destination is more than one hop away.
  1214.  
  1215. Note that the address may be specified as  either  an  IP  address  in  dotted
  1216. decimal notation or it may be a symbolic address from your hosts.net file.  If
  1217. you choose the latter technique you must enter the symbolic address  precisely
  1218. as it was entered in the hosts.net file, e.g.  upper and lower case characters
  1219. in the name are significant.
  1220.  
  1221. If you are using an Eagle RS-232/2 board your  media  is  named  eg0  or  eg1.
  1222. There  is  still a problem because there are two ports on the board.  In order
  1223. to solve this problem you will need to add the letters 'a' or 'b' to the media
  1224. name.   For  instance, if you have a single Eagle card your media names become
  1225. 'eg0a' and 'eg0b' for the A and B ports of the card  respectively.   Remember,
  1226. take  the  media  name from the attach command and append either A or B to the
  1227. end of the name to select the appropriate port.  Here are some examples:
  1228.  
  1229.         route add [44.96.0.22] eg0a
  1230.         route add aj9x eg0b wb3ffv
  1231.  
  1232.  
  1233. There are two other special types of route entries; the default  entry  and  a
  1234. cluster entry.  Here is a default entry:
  1235.  
  1236.         route add default ax0 [44.96.0.99]
  1237.  
  1238.  
  1239. This means that if the address does not match any entry in your  table,  route
  1240. the  packet to 44.96.0.99 via ax0.  Hopefully the switch at 44.96.0.99 will be
  1241. able to forward the packet to its destination.  This generally works  well  if
  1242. you  are  merely an end node (a leaf) in the network and all your traffic goes
  1243. to a single gateway.
  1244.  
  1245. _3._2._5._8._1.  _C_l_u_s_t_e_r _R_o_u_t_i_n_g _a_n_d _i_t_s _A_s_s_o_c_i_a_t_e_d _C_o_n_c_e_p_t_s:
  1246.  
  1247. The other option for routing is cluster routing.  It allows you to send blocks
  1248. of  addresses  in  a  certain direction.  This is useful if all the users in a
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.                                     - 20 -
  1259.  
  1260.  
  1261. given area have some common part to their IP addresses.  Here is  an  explana-
  1262. tion of cluster routing and addresses in general.
  1263.  
  1264. The IP address is thirty-two (32) bits long.  It is generally  represented  as
  1265. four 8-bit numbers, with each number being written in decimal form.  For exam-
  1266. ple, my IP address is 44.96.0.1.  This number can be represented as the  hexa-
  1267. decimal  value 2C600001 or 00101100011000000000000000000001 in binary.  We can
  1268. break this out as follows:
  1269.  
  1270.         decimal           44        96         0         1
  1271.         hexadecimal       2C        60        00        01
  1272.         binary         00101100  01100000  00000000  00000001
  1273.  
  1274.  
  1275. Normally when you make an entry in the routing table, all bits of the  address
  1276. are  significant,  e.g.  an exact match is needed for the address to be recog-
  1277. nized.  On the other end there is the  default  route  in  which  any  address
  1278. matches.
  1279.  
  1280. Cluster routing falls somewhere between these two extremes.   Cluster  routing
  1281. allows  you  to specify how much of the address is to be considered valid.  In
  1282. order to determine how many bits in  the  address  are  valid  you  enter  the
  1283. address in a special format:
  1284.  
  1285.         route add [44.96.0.64]/26 ax0
  1286.  
  1287.  
  1288. This means that only the first 26 bits of the address  are  to  be  considered
  1289. significant.   This  is  a  form  of  wild card for the address.  Here is that
  1290. address in binary to show the mapping:
  1291.  
  1292.         00101100  01100000  00000000  01??????
  1293.  
  1294.  
  1295. The question marks in the above address show the least  significant  six  bits
  1296. being  "wild,"  or  matching  any corresponding bits in the address.  Here are
  1297. some examples:
  1298.  
  1299.         44.96.0.67     00101100  01100000  00000000  01000111  (a match)
  1300.         44.96.0.89     00101100  01100000  00000000  01011001  (a match)
  1301.         44.96.0.01     00101100  01100000  00000000  00000001  (no match)
  1302.  
  1303.  
  1304. This works because the routing process in the net code  will,  when  presented
  1305. with  an  address, search for an exactly matching entry.  Failing to find that
  1306. it will then look for an address that matches on the most significant 31 bits,
  1307. then  30  bits, and so on.  If presented with the address 44.96.0.67 IP would,
  1308. after 6 tries, match the address to the example given above.
  1309.  
  1310. By judiciously assigning addresses we can make the address aid us  in  routing
  1311. the  packets.   The  users within a LAN should have something in common in the
  1312. high order part of the address so that we can use a single entry in the  rout-
  1313. ing  table  to make things go in the proper direction.  Here in the Washington
  1314. DC area all addresses begin with 44.96.0.  This identifies this  general  area
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.                                     - 21 -
  1325.  
  1326.  
  1327. and may be used to provide routing to us.  Once the packet arrives in our gen-
  1328. eral area cluster routing is then used to further route  the  packets  to  the
  1329. appropriate  area.  In DC and the parts of Maryland immediately surrounding DC
  1330. the low order byte ranges from 0 to 63.  Northern Virginia users  get  numbers
  1331. in  the range of 64 to 127.  The Baltimore users get 128 to 191 while the Har-
  1332. risburg, PA, users get 192 to 255.  The idea being that we can use the top two
  1333. bits in the low order byte of the address to identify LANs within the address.
  1334. That way the bits in the high order part of the address will get you into  the
  1335. general area, the next part of the address will get you to the proper LAN, and
  1336. the least significant bits will get you to the proper host or user.
  1337.  
  1338. _3._2._5._9.  _R_o_u_t_i_n_g _L_o_o_p_s _a_n_d _t_h_e _T_i_m_e _T_o _L_i_v_e (_T_T_L) _C_o_m_m_a_n_d:
  1339.  
  1340. It is quite possible (and likely!) to make  errors  when  setting  up  routing
  1341. tables  that  will cause a routing loop to occur (a routing loop is a circular
  1342. path that never reaches the intended destination).  Imagine what would  happen
  1343. if two stations had their default routing pointing at each other like this:
  1344.  
  1345.         host 1 (44.96.0.1): route add default ax0 [44.96.0.2]
  1346.         host 2 (44.96.0.2); route add default ax0 [44.96.0.1]
  1347.  
  1348.  
  1349. In this case a packet that got routed using the  default  route  would  bounce
  1350. back  and forth between the two stations forever.  There is a command that can
  1351. prevent this from going on forever: the Time-To-Live (ttl) command.  Every  IP
  1352. packet  has a ttl field in it that is decremented by 1 at every hop.  When the
  1353. ttl field reaches zero and the packet is not at the destination the packet  is
  1354. discarded and an ICMP message explaining the fact is sent to the sending host.
  1355. Normally net sets the ttl field to 255.  If you know that no host is more than
  1356. 5 hops away you might issue the following command:
  1357.  
  1358.         ip ttl 5
  1359.  
  1360.  
  1361. This means that all packets from your host/station are sent with ttl set to an
  1362. initial  value  of  5.   These  packets  will now be discarded if they haven't
  1363. reached their destination after 5 hops.  This limits the traffic in  the  net-
  1364. work should somebody inadvertently create a routing loop.
  1365.  
  1366. _3._2._6.  _U_s_i_n_g _D_i_g_i_p_e_a_t_e_r_s _a_n_d _t_h_e _A_R_P _A_d_d _C_o_m_m_a_n_d (_p_a_c_k_e_t _r_a_d_i_o _o_n_l_y):
  1367.  
  1368. Since there may not be many TCP users in your area you may need to use a digi-
  1369. peater  (or  two) to reach the other users in your area.  This is now possible
  1370. by adding entries to the ARP (Address Resolution Protocol) tables.  ARP serves
  1371. to map IP addresses into Ethernet or AX25 address, whichever is appropriate to
  1372. the media in use.  ARP  normally  does  its  work  automatically  by  directly
  1373. conversing  with  the other station but it cannot do that if the other station
  1374. is reachable only via a digipeater. In that case you must "hard-wire"  an  ARP
  1375. table entry with the ARP ADD command.
  1376.  
  1377. Before you can use the ARP ADD command you must know the  path  to  the  other
  1378. station.   Let us assume that the station with whom you wish to communicate is
  1379. WA4OIE (Other Internet Experimenter) whose address  is  44.96.0.247,  but  the
  1380. only path available is via WB3PID (Poor Inefficient Digipeater).  In this case
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.                                     - 22 -
  1391.  
  1392.  
  1393. you will use the following ARP ADD command:
  1394.  
  1395.         arp add [44.96.0.247] ax25 wa4oie wb3pid
  1396.         - or -
  1397.         arp add wa4oie ax25 wa4oie wb3pid
  1398.  
  1399.  
  1400. From this point on packets sent over an AX25 link to address 44.96.0.247  will
  1401. use  the  AX25  destination  address of WA4OIE with an intermediate digipeater
  1402. address of WB3PBD.  If you need to use more than one digipeater it is  permis-
  1403. sible.   Just  place  the call signs of the digipeaters sequentially following
  1404. the destination AX.25 address.
  1405.  
  1406. _3._2._7.  _W_i_n_d_o_w _a_n_d _M_a_x_i_m_u_m _S_e_g_m_e_n_t _S_i_z_e_s:
  1407.  
  1408. The next information we want to include is some information  used  by  TCP  to
  1409. determine  how much data it can send at one time and how much data may be out-
  1410. standing before it stops to wait for an ack from the other end.  Here are  the
  1411. example values:
  1412.  
  1413.         tcp mss 216
  1414.         tcp window 648
  1415.  
  1416.  
  1417. The parameter mss stands for maximum segment size and represents  the  largest
  1418. single  segment  that  TCP  will send.  Mss should be set as a function of the
  1419. quality of the link over which you are running.  Relatively  error-free  links
  1420. should  use  larger values of mss.  If you are running on amateur packet radio
  1421. and wish to operate unattended you should probably limit this value to 216 (an
  1422. mss of 216 will cause you to send AX.25 packets that are 256 bytes long.
  1423.  
  1424. The net program now compares the mss value and the mtu  values  given  in  the
  1425. attach command for the media being used.  Since TCP and IP each have a 20 byte
  1426. header (a total of 40 bytes), an mss of 216 corresponds to an mtu of 256.   If
  1427. you  are using mixed mtu's, i.e. 256 for AX.25, 1500 for Ethernet, and 576 for
  1428. SLIP, set the mss to correspond to the largest mtu you are using and  let  net
  1429. adjust the mss downward for the media that are using smaller values for mtu.
  1430.  
  1431. The 'window' parameter is how many bytes may be outstanding at  any  one  time
  1432. before  you  wait for an ack.  If you have a pretty good link you can increase
  1433. the value of mss.  If window is larger than mss TCP will run as a sliding win-
  1434. dow  protocol, e.g.  continue to send packets while waiting for ACKs on previ-
  1435. ously sent packets.  Since TCP uses selective reject (resend ONLY  those  seg-
  1436. ments that were damaged or lost) this is not a very expensive proposition.  In
  1437. any case window should always be a multiple of mss to prevent the transmission
  1438. of small packets every once in a while.
  1439.  
  1440. If you are running on a radio channel at 1200 baud remember that a  1024  byte
  1441. transmission  will  take  seven seconds, a time that can make you unpopular if
  1442. you have to share the frequency with AX.25 TNCs that cannot adapt to the  high
  1443. channel  utilization.   In  those cases it is probably better to reduce window
  1444. and/or mss values.  The above values will make you fit in reasonably with your
  1445. other AX.25 neighbors.  Remember that the efficiency of large packets and long
  1446. transmissions are probably not worth having your neighbors so angry that  they
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.                                     - 23 -
  1457.  
  1458.  
  1459. tie a rope between your coax and the bumper of a pickup truck so that they can
  1460. non-surgically remove your station from your shack.
  1461.  
  1462. One last point before we move on; the mss and window values that you set  will
  1463. be the ones that your TCP will ask the OTHER station to use.  When the session
  1464. is initially set up the two TCPs will exchange mss and  window  values.   This
  1465. permits stations to automatically adjust to the capabilities of the other sta-
  1466. tion.  For this reason it is best to get everyone in your LAN to use the  same
  1467. values.
  1468.  
  1469. _3._2._8.  _S_t_a_r_t_i_n_g _t_h_e _S_e_r_v_e_r_s:
  1470.  
  1471. Next you need to decide what services you will provide to other users  in  the
  1472. network.   You  must  start the servers or others won't be able to make use of
  1473. your system for mail or file transfers.  You will simply be a switch for other
  1474. users  (in  fact, for a switch on a hill that may be just what you want).  You
  1475. will still be able to initiate file transfers or telnet sessions  but  no  one
  1476. will  be  able to initiate one with you.  Should you fail to start the servers
  1477. anyone trying to access those services on your machine  will  just  receive  a
  1478. "Closed, (reset)" message.  For the sake of consistency you will probably want
  1479. to use the start command to enable the following services:
  1480.  
  1481.         start telnet
  1482.         start ftp
  1483.         start smtp
  1484.         start echo
  1485.         start discard
  1486.  
  1487.  
  1488. Telnet is the terminal-to-host and terminal-to-terminal mode, ftp is the  file
  1489. transfer  protocol,  smtp  is the mail system (simple mail transfer protocol),
  1490. and echo is the echo server (it just sends back any  packets  it  receives  --
  1491. good for finding out if a switch is out there and running). The discard server
  1492. simply throws away anything it receives.  The echo  and  discard  servers  are
  1493. generally used for testing a link.
  1494.  
  1495. _3._3.  _R_u_n_n_i_n_g _t_h_e _n_e_t_w_o_r_k _p_r_o_g_r_a_m _N_E_T._E_X_E
  1496.  
  1497. Start the networking program running by issuing the command "net."  You should
  1498. be rewarded by having the "net>" prompt appear on your screen. If you prepared
  1499. AUTOEXEC.NET as described in the previous section then you don't need to issue
  1500. any configuration commands.  If you have not set up AUTOEXEC.NET you will want
  1501. to read that section of the manual prior to proceeding with this section.
  1502.  
  1503. _3._3._1.  _O_p_e_r_a_t_i_n_g _M_o_d_e_s:
  1504.  
  1505. Net provides two modes of operation: command and session.  In the command mode
  1506. you  are  interacting  with the command interpreter to permit you to establish
  1507. sessions, retrieve status information, establish new  routing  table  entries,
  1508. etc.   Please  consider  the  commands  you  were  required  to  enter  in the
  1509. AUTOEXEC.NET file.  All of those commands were directed at the command  inter-
  1510. preter.   You  can  tell  that  the NET.EXE command interpreter is waiting for
  1511. input because it will present this prompt:
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.                                     - 24 -
  1523.  
  1524.  
  1525.  
  1526.         net>
  1527.  
  1528.  
  1529. The session mode is unique to the session with which you wish to  communicate.
  1530. TELNET  (terminal-to-host and terminal-to-terminal) and FTP (the File Transfer
  1531. Protocol) are the two types of sessions with which you may interact  and  each
  1532. has its own sets of commands and operating modes.
  1533.  
  1534. Before you get too carried away with trying things it is probably a good  idea
  1535. to  read  at  least  as  far as the discussion on multiple sessions. That will
  1536. explain how to start and use TELNET and FTP as well as how  to  keep  straight
  1537. all the activity from multiple users.
  1538.  
  1539. _3._3._2.  _R_u_n_n_i_n_g _T_E_L_N_E_T:
  1540.  
  1541. TELNET is used to provide terminal mode access to a host computer  system  but
  1542. may  also be used to have a terminal-to-terminal "chat" with another operator.
  1543. There are three commands directly associated  with  the  TELNET  service:  the
  1544. 'telnet', the 'eol', and the 'echo' commands.  ,NH 4 The 'telnet' command:
  1545.  
  1546. The 'telnet' command is used to establish a TELNET session with a  remote  TCP
  1547. socket,  usually  the  TELNET  server on a remote host.  To establish a TELNET
  1548. session you would issue the 'telnet' command as follows:
  1549.  
  1550.         telnet wb2sef
  1551.         telnet [44.96.0.2]
  1552.  
  1553.  
  1554. Both of these commands would establish a TELNET session with the TELNET server
  1555. at  WB2SEF  because  WB2SEF  is  defined  in  HOSTS.NET  as having the address
  1556. 44.96.0.2.  Note that we merely specified that we wished to establish a TELNET
  1557. session  and  the TELNET client then connected us with the TELNET server which
  1558. resides at TCP port address 23.  There is an extended syntax for the  'telnet'
  1559. command  that will let you specify the port number at the remote host to which
  1560. you wish to be connected.  Here is an example of the extended syntax:
  1561.  
  1562.         telnet [44.96.0.2] 7
  1563.         telnet wb2sef 9
  1564.  
  1565.  
  1566. In the first example TELNET is being asked to establish a  session  with  port
  1567. number  7, the echo server, at the host whose address is 44.96.0.2. The second
  1568. example also is a request to connect to the host whose  address  is  44.96.0.2
  1569. but  this  time  the  connection  is  to be made to port number 9, the discard
  1570. server.  These two ports are regularly used for test purposes, the echo server
  1571. echoing  back  everything it receives and the discard server discarding every-
  1572. thing it receives but returning a proper acknowledgement.
  1573.  
  1574. Once you have issued the 'telnet' command you will see the message "SYN  sent"
  1575. followed  a  short time later by the message "Established" (assuming that your
  1576. destination was reachable).  At this point you would be in communication  with
  1577. the  TELNET server on the other end.  If the remote host is a timesharing com-
  1578. puter (possibly running UNIX) you would very shortly be presented with a login
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.                                     - 25 -
  1589.  
  1590.  
  1591. screen.  You may consider your keyboard and screen to be directly connected to
  1592. the remote computer at this point.
  1593.  
  1594. On the other hand maybe you were attempting to  establish  a  connection  with
  1595. another  computer  running  the  net  code.   In  that  case  you  would be in
  1596. keyboard-to-screen communication with the operator at the remote host  (assum-
  1597. ing  that  he/she  selected  the new session as the current session; a subject
  1598. that will be discussed later).  Whatever you type will  appear  on  the  other
  1599. screen and vice-versa.
  1600.  
  1601. _3._3._2._1.  _T_h_e _E_C_H_O _C_o_m_m_a_n_d
  1602.  
  1603. In addition to the 'telnet' command there are the 'eol' and  'echo'  commands.
  1604. The  'echo'  command  determines  what the TELNET client will do if the remote
  1605. host offers to echo characters (what we would consider full duplex).  Here  is
  1606. the command syntax:
  1607.  
  1608.         echo accept    [the default value]
  1609.         echo reject
  1610.  
  1611.  
  1612. If the remote host is a timesharing computer you probably want it to echo your
  1613. characters back to you rather than let your local TELNET client echo the char-
  1614. acters.  This  permits  you  to  use  sophisticated  screen-oriented  programs
  1615. without  having  your  local echoing disrupt the screen display.  On the other
  1616. hand you may prefer to reject echoing in the case of a very slow network where
  1617. having  what you type appear on the screen several seconds later could be very
  1618. annoying.  Please note that the setting of this parameter has no  effect  when
  1619. entering a TELNET session with another copy of NET since NET always refuses to
  1620. echo characters.
  1621.  
  1622. _3._3._2._2.  _T_h_e _E_O_L _C_o_m_m_a_n_d
  1623.  
  1624. The 'eol' command is also used  to  adjust  the  keyboard  functionality  when
  1625. remote  echoing  has  been  negotiated.   It is used to select the appropriate
  1626. end-of-line character to be sent when the  operator  presses  the  <ENTER>  or
  1627. <RETURN> key.  Here are examples of the two options:
  1628.  
  1629.         eol standard         [the default value]
  1630.         eol unix
  1631.  
  1632.  
  1633. Should you set 'eol' to 'unix' and remote echoing is  negotiated  by  the  two
  1634. systems,  the  <RETURN>  or <ENTER> key will send an ASCII line feed character
  1635. rather than the carriage return character.  Normally this will not  be  needed
  1636. but  some UNIX system demand this.  Should the remote host not respond to your
  1637. <RETURN> key you might want to try this option.
  1638.  
  1639. To exit back to the command prompt from within a telnet session press the  F10
  1640. key.   The  'net>' prompt will appear.  This does not close the TELNET session
  1641. but merely suspends it.  Incoming data addressed to your TELNET  session  will
  1642. be  saved  until you re-enter the session (see the discussion of changing ses-
  1643. sions that follows later).
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.                                     - 26 -
  1655.  
  1656.  
  1657. The last item of interest to the TELNET user is how to terminate a TELNET ses-
  1658. sion.   That  is  accomplished with the 'close' command.  To close the session
  1659. simply press the F10 key to return to the command prompt and enter the 'close'
  1660. command.  You should be rewarded with the sequence of messages:
  1661.  
  1662.         FIN wait 1
  1663.         FIN wait 2
  1664.         Time wait    [followed by a delay period of about 30 seconds]
  1665.         Closed (Normal)
  1666.  
  1667.  
  1668. _3._3._3.  _F_i_l_e _T_r_a_n_s_f_e_r (_F_T_P):
  1669.  
  1670. The File Transfer Protocol (FTP) permits you to send  and  receive  both  text
  1671. (ASCII)  and  binary (image) files.  The FTP application accepts many commands
  1672. that will permit you to create files, delete files,  change  directories,  and
  1673. copy files.  This section will guide you through the most used FTP commands.
  1674.  
  1675. _3._3._3._1.  _E_s_t_a_b_l_i_s_h_i_n_g _a _S_e_s_s_i_o_n:
  1676.  
  1677. To establish an FTP session with a remote host you use the 'ftp' command.   To
  1678. establish  an  FTP  session  with WB2SEF I would use one of the following com-
  1679. mands:
  1680.  
  1681.         ftp wb2sef
  1682.         ftp [44.96.0.2]
  1683.  
  1684.  
  1685. Both commands do the same thing because of the  information  contained  in  my
  1686. HOSTS.NET  file.   After  issuing  one of the above commands you would see the
  1687. usual 'SYN sent' and 'Established' messages.  You would then be greeted  by  a
  1688. message from the remote FTP server that looked something like this:
  1689.  
  1690.         220 wb2sef.ampr FTP version 871225.5 ready at Tue Jan 19 17:57:23 1987
  1691.  
  1692.  
  1693. This message tells you that the remote FTP is ready to  accept  commands  from
  1694. you.   FTP gives you no prompt so at this point you must understand that after
  1695. issuing a command you will be notified of  the  command's  completion  but  no
  1696. further prompting for messages will occur.  One thing to note is that when FTP
  1697. sends you a message it will always be  prefixed  with  a  three-digit  number.
  1698. This  is for the benefit of computer programs that may be driving the FTP sys-
  1699. tem.  The number is for the benefit of the computer and the text  is  for  the
  1700. benefit of the user.
  1701.  
  1702. The first thing you will need to do is to log in to the remote host with  your
  1703. user  ID and your password.  Unless you have been given a specific user ID and
  1704. password by someone at the remote host you will probably log in with the guest
  1705. user ID and password.  You will send the 'user' and Here is an example:
  1706.  
  1707.         user guest
  1708.         331 Enter PASS command
  1709.         pass xyzzy
  1710.         230 Logged in
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.                                     - 27 -
  1721.  
  1722.  
  1723. This exchange presumes that your user ID is "guest" and that your password  is
  1724. "xyzzy."   If  the  user  ID does not require a password you may or may not be
  1725. prompted for the password.  NET always prompts for  the  password  whether  it
  1726. needs  it  or  not.  If the remote host is running NET and has in its FTPUSERS
  1727. file an entry that uses an asterisk (*) for the password, any password will be
  1728. accepted.
  1729.  
  1730. If you enter either an invalid user ID or an invalid password the  remote  FTP
  1731. will return the following message:
  1732.  
  1733.         550 Permission denied
  1734.  
  1735.  
  1736. Simply reenter the 'user' and 'pass' commands with the proper values  and  you
  1737. will  be  logged in.  You may also enter new 'user' and 'pass' commands at any
  1738. time to change your user ID and hence your permissions as far  as  the  remote
  1739. host is concerned.
  1740.  
  1741. _3._3._4.  _M_a_n_i_p_u_l_a_t_i_n_g _D_i_r_e_c_t_o_r_i_e_s _o_n _t_h_e _R_e_m_o_t_e _H_o_s_t:
  1742.  
  1743. When you log into the remote host you will be set in "your" directory  (I  put
  1744. the  word your in quotes because many people may be using that directory since
  1745. many people may be allowed to log in concurrently with the same user ID).  You
  1746. can get a directory listing of files within that directory with the 'dir' com-
  1747. mand (just like DOS).  What you will receive back from the remote host will be
  1748. a  standard  DOS directory listing.  If you would prefer a short listing, e.g.
  1749. only the names of the files, you can use the 'ls' command.  Both commands will
  1750. accept wild cards so the following commands are all valid:
  1751.  
  1752.         dir
  1753.         ls *.*
  1754.         dir *.com
  1755.         ls test*.dat
  1756.  
  1757.  
  1758. After issuing the command you will see the  following  sequence  of  responses
  1759. from the remote host:
  1760.  
  1761.         200 Port command okay
  1762.         150 Opening data connection for LIST /public
  1763.         Your directory listing will be displayed here
  1764.         Get complete, nnnn bytes received
  1765.         226 File sent OK
  1766.  
  1767.  
  1768. The end of the "150 Opening data connection ..." response will differ  depend-
  1769. ing  on  the  directory  request  you made.  If you used the 'dir' command you
  1770. would see the word "LIST."  If you used the 'ls' command  you  would  see  the
  1771. word  "NLST."   What  followed  the  "LIST" or "NLST" would be the name of the
  1772. directory you are listing.
  1773.  
  1774. In addition to listing directories you can change the directory and query  for
  1775. the  current directory.  Let us assume that for your user ID (guest) your root
  1776. directory is /public.  Let us also assume that in public you  would  find  the
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.                                     - 28 -
  1787.  
  1788.  
  1789. three  subdirectories tcp, games, and utils. When you log in your directory is
  1790. set to /public.  Now you issue one of the following commands:
  1791.  
  1792.         cd tcp
  1793.         cd /public/tcp
  1794.  
  1795.  
  1796. The result would be the same since you were already in directory /public.  FTP
  1797. would then send you the response:
  1798.  
  1799.         257 "/public/tcp" is current directory
  1800.  
  1801.  
  1802. You may use the 'cd' command to change directory  to  any  subdirectory  below
  1803. your  home  directory  in the same way that the DOS cd command will also allow
  1804. you change directories.
  1805.  
  1806. If you are not sure what directory you are in you may  use  the  'pwd'  (print
  1807. working directory) command.  If we were to issue the command:
  1808.  
  1809.         pwd
  1810.  
  1811.  
  1812. the remote FTP would then respond:
  1813.  
  1814.         257 "/public/tcp" is current directory
  1815.  
  1816.  
  1817. as if you had just changed directories.
  1818.  
  1819. Now we get down to the meat of the matter: sending and receiving files.  Prior
  1820. to  doing  a  file transfer you need to tell FTP what type of transfer to use.
  1821. You have two choices: ASCII (text files) or Image (binary files).   To  select
  1822. what type of transfer to do you use the
  1823.  
  1824.         type i
  1825.         type a
  1826.  
  1827.  
  1828. The former will set all subsequent transfers to image mode for sending  binary
  1829. files.  The latter will set all subsequent transfers to ASCII mode for sending
  1830. or receiving text files.  If you use the 'type' command by itself like:
  1831.  
  1832.         type
  1833.  
  1834.  
  1835. FTP will respond with  either  the  word  "Image"  or  "Ascii,"  whichever  is
  1836. appropriate.   If  you  do  not  specify  a  type of transfer FTP will use the
  1837. default value "ASCII."
  1838.  
  1839. Files transferred with type set to ASCII  will  have  their  newline  sequence
  1840. translated  to  that expected by the remote host.  Files transferred with type
  1841. set to image will have no translation performed at all.  All bytes in the file
  1842. will be transferred with no changes whatsoever.
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.                                     - 29 -
  1853.  
  1854.  
  1855. Once you select the type of transfer you desire you may then send  or  receive
  1856. files.   The  'put'  and  'get'  commands  are  used to send and receive files
  1857. respectively.  Let us assume that I have a file on my  system  in  my  current
  1858. directory  called  "foo" and I want to transfer it to the remote host and have
  1859. it placed in my current directory there.  To do this I would use the following
  1860. command:
  1861.  
  1862.         put foo
  1863.  
  1864.  
  1865. FTP would then transfer file "foo" from the local to the  remote  system.  You
  1866. would know the status of the transfer from the following sequence of messages:
  1867.  
  1868.         200 Port command okay
  1869.         150 Opening data connection for STOR foo
  1870.         Put complete, nnn bytes sent
  1871.         226 File received OK
  1872.  
  1873.  
  1874. Now let us fetch file "bar" from the remote system.  Here is your command  the
  1875. the responses from FTP:
  1876.  
  1877.         get bar
  1878.         200 Port command okay
  1879.         150 Opening data connection for RETR bar
  1880.         Get complete, nnn bytes received
  1881.         226 File sent OK
  1882.  
  1883.  
  1884. Now it may not be convenient to have the file retain its file name when it  is
  1885. copied.  Perhaps there is already a file with the same name at the destination
  1886. and you do not wish to, or may not be permitted to, overwrite  the  file.   In
  1887. that  case  you would add the destination file name to the get or the put com-
  1888. mand as follows:
  1889.  
  1890.         put foo bar
  1891.         get /public/tcp/herfile herfile
  1892.  
  1893.  
  1894. In the first example the local file "foo" would be copied to file "bar" on the
  1895. remote  system.  In the second example the file "/public/tcp/herfile" would be
  1896. copied to "herfile" on the remote system.  The reason for doing it this way in
  1897. the   second   example  is  to  avoid  having  FTP  try  to  create  the  file
  1898. "/public/tcp/herfile" on the remote end.  Perhaps there is no directory "/pub-
  1899. lic"  or "/public/tcp" or perhaps you are in an FTP session with a system that
  1900. has completely different file naming conventions (remember  that  you  may  be
  1901. communicating with systems other than PC's).
  1902.  
  1903. It is also possible to get a file and type it to your CRT  directly.   If  you
  1904. want  to  get the file to your screen use "con" as the name of the destination
  1905. file.  Here is an example that will fetch file "foo" and send it to the CRT:
  1906.  
  1907.         get foo con
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.                                     - 30 -
  1919.  
  1920.  
  1921. You may at some point want to terminate a transfer that is currently  in  pro-
  1922. gress.   The 'abort' command is used for this.  There are no parameters on the
  1923. abort command.  Just type 'abort' and the current transfer will be aborted.
  1924.  
  1925. The last command of interest to FTP users is the dele command.  The dele  com-
  1926. mand  is  used to delete a file on the remote system.  Here is an example that
  1927. will delete the file foo on the remote system:
  1928.  
  1929.         dele foo
  1930.  
  1931.  
  1932. Remember that in order to use the  dele  command  you  must  have  delete  and
  1933. overwrite permission on the remote system.
  1934.  
  1935. When done using FTP use the command 'quit.'  'Quit' will get you the following
  1936. message sequence:
  1937.  
  1938.         221 Goodbye!
  1939.         Close wait
  1940.         Last ACK
  1941.         Closed (Normal)
  1942.  
  1943.  
  1944. All of this indicates  that  FTP  has  properly  terminated  the  session  and
  1945. returned  you  to  the command interpreter.  Alternatively, you can just close
  1946. the session by hitting F10 and typing "close".
  1947.  
  1948. _3._3._5.  _M_u_l_t_i_p_l_e _S_e_s_s_i_o_n_s:
  1949.  
  1950. One of the many advantages of NET is that it permits you to establish  several
  1951. sessions  concurrently.  For instance, you could establish an FTP session with
  1952. a host and then switch back to the command interpreter so that you could start
  1953. another  session.   The  nice thing about this is that it in no way interferes
  1954. with any sessions that are already running.  Your  FTP  session  continues  to
  1955. transfer  data  even  while you enter into a TELNET session with the same or a
  1956. different host.  Any screen output that arrives for a session that is not  the
  1957. currently  selected  session will be held until you again select that session.
  1958. This prevents you from losing any output while you interact with another  ses-
  1959. sion or with the command interpreter.
  1960.  
  1961. As mentioned, in order to start a new session (or issue any other type of com-
  1962. mand  for  that  matter) you must be interacting with the command interpreter.
  1963. To get to the command prompt you need only press  F10.  Once  at  the  command
  1964. prompt  you  can  examine  or select a new session using the 'session' command
  1965. (abbreviated 'se').
  1966.  
  1967. The session command when used by itself will  give  you  a  list  of  all  the
  1968. currently open session.  Here are two examples:
  1969.  
  1970.         session
  1971.         se
  1972.  
  1973.  
  1974. The result will be a display similar to the following:
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.                                     - 31 -
  1985.  
  1986.  
  1987.  
  1988.          #  &CB  Type    Rcv-Q  State        Remote socket
  1989.          0  c7a8 Telnet      0  Established  w3fws:23
  1990.         *1  c434 FTP         0  Established  44.96.0.13:21
  1991.  
  1992.  
  1993. The first field (#) is the session number.  The asterisk  (*)  identifies  the
  1994. current  session.   CB is the protocol control block associated with this ses-
  1995. sion (these are explained in detail as part of the tcp status and ax25  status
  1996. commands later in this document).  The Type field identifies the session as an
  1997. FTP, a TELNET, or an AX.25 connected mode  (TNC)  session.   The  state  field
  1998. indicates  the  state of the "connection" as far as this session is concerned.
  1999. A value of SYN Sent indicates that the "connection" is in the process of being
  2000. constructed.   A  value  of  Established  indicates  that the "connection" and
  2001. therefore the session is open and ready to transfer  information.   Values  of
  2002. FIN  Wait  1,  FIN  Wait 2, or Time Wait indicate that the connection is being
  2003. closed.  The last field, Remote Socket, identifies the host and port with whom
  2004. the session was initiated.
  2005.  
  2006. Once you start a session it becomes your current session unless you  close  it
  2007. or switch to another session.  To get back to a session from the 'net>' prompt
  2008. all you need to do is press the <RETURN> or <ENTER> key.  If you  happened  to
  2009. close  the  current  session  there  will be no current session.  In that case
  2010. pressing <RETURN> or <ENTER> will have no effect.  You will need to explicitly
  2011. select a new session with the session command.
  2012.  
  2013. If you follow the session command with a number, the session command will make
  2014. the session whose number was specified, the current session and then turn con-
  2015. trol of the keyboard and screen over to that session.  Here are two examples:
  2016.  
  2017.         session 0
  2018.         se 0
  2019.  
  2020.  
  2021. Both of these examples change the current session to session 0.  At that point
  2022. you will be interacting with the desired session.
  2023.  
  2024. As mentioned in the section on the 'telnet' command you close a  session  with
  2025. the  close  command.  If the session you wish to close is not the current ses-
  2026. sion you need to issue the command 'close n' where n is the number of the ses-
  2027. sion you wish to close.
  2028.  
  2029. Last of all you may need to abort a session or an open socket.  This may occur
  2030. when you have a session with another host and that host goes away for whatever
  2031. reason (power failure, hardware failure, link failure, etc.).   In  that  case
  2032. you  must resort to the 'reset' command.  The without having to go through the
  2033. normal closing sequence.  There are two forms. The first  is  the  command  or
  2034. 'ax25  reset'  followed  by  the  address  of  TCP  or AX.25 control block, as
  2035. appropriate.  Here are several examples:
  2036.  
  2037.         tcp reset c7a8
  2038.         reset 0
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.                                     - 32 -
  2051.  
  2052.  
  2053. Either command would force TCP to close the socket associated with the session
  2054. with  44.96.0.13 and hence close that session.  It would give no indication to
  2055. the other end that the socket had been closed.  The only indication  that  the
  2056. other  end  would receive would be to receive a reset instead of an ACK packet
  2057. the next time the remote end sent a packet of data.
  2058.  
  2059. _3._3._6.  _S_t_a_t_u_s _M_o_n_i_t_o_r_i_n_g _a_n_d _O_t_h_e_r _C_o_m_m_a_n_d_s:
  2060.  
  2061. There are quite a few commands in NET.EXE.  Many of  them  were  explained  in
  2062. conjunction  with  the installation instructions and, in fact, have little use
  2063. beyond initialization.  Commands in this category include:
  2064.  
  2065.         ip address------setting your IP address
  2066.         ax25 mycall-----setting your AX.25 link address
  2067.         ip ttl----------initial time-to-live field for IP packets
  2068.         attach----------starting a driver for a particular hardware device
  2069.         tcp mss---------setting the maximum size for a TCP segment (packet)
  2070.         tcp window------setting the maximum number of un-acked bytes
  2071.         ax25 digipeat---enable/disable AX.25 digipeating
  2072.         hostname--------set the name for your system (used by FTP)
  2073.  
  2074.  
  2075. On the other hand there are quite a few commands that you will be using exten-
  2076. sively.  Let's start by covering the status commands.
  2077.  
  2078. _3._3._6._1.  _G_e_t_t_i_n_g _S_t_a_t_u_s _I_n_f_o_r_m_a_t_i_o_n:
  2079.  
  2080. _3._3._6._1._1.  _i_p _s_t_a_t_u_s
  2081.  
  2082. The first of the status commands is 'ip status' and may be abbreviated  'ips'.
  2083. This  returns  information  about  the  status  of IP packets that have passed
  2084. through your system: e.g. originated, received, or passed through  (switched).
  2085. The format for the ip status response looks like this:
  2086.  
  2087.         total 973 runt 0 len err 0 vers err 0 chksum err 5 badproto 0
  2088.  
  2089.  
  2090. The 'total' field (973 in this case) identifies the  number  of  IP  datagrams
  2091. that  have passed through your system.  The next field, 'runt', identifies the
  2092. number of packets that were below minimum acceptable size.  'Len err'  identi-
  2093. fies  the number of packets with length errors.  'Vers err' identifies packets
  2094. that came from a system running a version of IP that is incompatible with  the
  2095. one  that  you are running (unlikely to occur unless the Internet adopts a new
  2096. standard for IP).  'Chksum err' is the number of packets that arrived  with  a
  2097. checksum  error  on the IP header (these packets will be discarded because the
  2098. system has no way of knowing if any of the information is valid).   'Badproto'
  2099. identifies the number of packets that arrived with the protocol identifier set
  2100. to an upper layer protocol (ULP) that is not either ICMP, TCP or UDP (the only
  2101. three ULP's currently supported in NET.EXE).
  2102.  
  2103. Of all these possible errors you are likely to see only the runt, len err, and
  2104. chksum  err  fields increment.  Version and bad protocol errors can only occur
  2105. if you are communicating with a system that supports a different version or  a
  2106. different set of ULP's.  This is unlikely to happen.
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.                                     - 33 -
  2117.  
  2118.  
  2119. _3._3._6._1._2.  _t_c_p _s_t_a_t_u_s
  2120.  
  2121. Another often used command is the tcp status command.  tcp  status  returns  a
  2122. great  deal  of  information  on the current status of your TCP "connections."
  2123. Upon entering the command 'tcp status' (abbreviated 't  s')  the  system  will
  2124. print  a  General status on the TCP activity and an abbreviated display on the
  2125. status of each TCP session.  The top line looks like this:
  2126.  
  2127.         Conout 5 Conin 17 Reset out 2 Runt 0 Checksum err 1 bdcsts 0
  2128.  
  2129.  
  2130. at your system while 'conin' is the number of incoming "connections" that have
  2131. been  made  with  your  system.  'Reset out' is the number of resets that were
  2132. sent to remote systems (this would happen if a remote system attempted to send
  2133. data  to  a  socket  that had been closed).  The 'Runt' field is the number of
  2134. undersized packets that were received.  The 'Checksum err' field is the number
  2135. of  TCP segments that were discarded because the segment failed the TCP check-
  2136. sum check (IP checksums only the packet header while TCP  applies  a  checksum
  2137. test  to  the  entire TCP segment including header).  The last field indicates
  2138. the number of broadcast messages that have been received.
  2139.  
  2140. Following the header line a table is presented,  one  line  per  socket.   The
  2141. headings appear as follows:
  2142.  
  2143.         &TCB  Rcv-Q  Snd-Q   Local Socket      Remote Socket   State
  2144.  
  2145.         f784    17      0    44.96.0.1:1001    44.96.0.2:23    Established
  2146.         eb30     0      0    44.96.0.1:23      0.0.0.0:0       Listen (S)
  2147.  
  2148.  
  2149. In the above example there are two open sockets.  The first,  associated  with
  2150. the TCP Control Block (TCB) at address f784, is a TELNET (terminal-to-terminal
  2151. or terminal-to-host) session with the system whose address is 44.96.0.2.   The
  2152. second  socket, described by the TCB at location eb30, is a passive ("server")
  2153. open that exists to  accept  incoming  TELNET  connections.  Now  for  a  more
  2154. comprehensive description of the fields.
  2155.  
  2156. The TCB is the TCP control block.  The number, in hex, is the address  of  the
  2157. TCB  in  memory and serves to identify a particular open socket.  Rcv-Q is the
  2158. number of octets (8-bit things that we normally call  bytes)  that  have  been
  2159. received  and are waiting to be processed (this is one way to tell if you have
  2160. received information from another station if you are involved in more than one
  2161. TELNET or FTP session).
  2162.  
  2163. The next two fields, Local Socket and Remote Socket, make up  the  identifica-
  2164. tion of the connection as far as TCP is concerned.  The first part of a socket
  2165. number is the IP address.  The second part of the socket number, the part fol-
  2166. lowing  the colon, is the port number.  There are many "standard" port numbers
  2167. in use.  Here are some of the more common:
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.                                     - 34 -
  2183.  
  2184.  
  2185.  
  2186.         Port    Application
  2187.  
  2188.          7     Echo server
  2189.          9     Discard server
  2190.         20     FTP server data port
  2191.         21     FTP server command port
  2192.         23     TELNET server
  2193.         25     SMTP server
  2194.  
  2195.  
  2196. You may see other port numbers used such as 1001, 1002, etc.  These  are  tem-
  2197. porary  ports that are used to form a unique connection (TCP identifies a con-
  2198. nection by combining the remote and local socket address in order to guarantee
  2199. uniqueness).
  2200.  
  2201. Since no two systems have the same network address the  combination  of  local
  2202. socket (address + port) and remote socket forms a unique combination.  This is
  2203. how the TCP on both ends of a "connection" identifies that connection.
  2204.  
  2205. It is possible to get even more information about a specific socket by  adding
  2206. the TCB address to the end of the tcp status command like this:
  2207.  
  2208.         tcb status f784
  2209.  
  2210.  
  2211. This will return the detailed TCP status information about the socket that  is
  2212. described by the TCB at address f784 (you get this address from the tcp status
  2213. command without a parameter).  Here is the sample format:
  2214.  
  2215. Local: 44.96.0.1:1001 Remote: 44.96.0.2:23 State: Established
  2216.       Init Seq   Unack     Next      WL1      WL2  Wind   MSS Queue   Total
  2217. Send:  328b740 328b741  328b741 dffde2e1  328b741   864   216     0       0
  2218. Recv: dffde2e0         dffde4e1                    1024           0     512
  2219. Retry 0 Timer stopped Smoothed round trip time  5500 ms
  2220.  
  2221.  
  2222. The 'Init Seq', 'Unack', 'Next', 'WL1', and 'WL2' fields have to do with TCP's
  2223. internal  flow control and sequence numbering mechanisms.  Continuous monitor-
  2224. ing of these fields gives you a good idea of the performance of the network in
  2225. terms  of  the  number  of packets lost.  The 'Wind' field shows the number of
  2226. bytes that the receiver is  ready  to  accept,  as  of  the  last  TCP  packet
  2227. received.   The  'effective  window' (the number of bytes that the transmitter
  2228. may send) is the 'Wind' value reduced by the number of bytes  "in  the  pipe",
  2229. that  is,  already sent but not yet acknowledged. This is found by subtracting
  2230. the 'Unack' value from the 'Next' value.
  2231.  
  2232. TCP often defers transmitting when it theoretically could, i.e., when there is
  2233. data  on  the  send  queue and a non-zero effective window.  This is done when
  2234. there is already data "in the pipe" but there is not enough new data to fill a
  2235. maximum  size  packet.   In this case, TCP waits for an acknowledgment for the
  2236. data already sent before sending more. This results in a stream of a few rela-
  2237. tively  large  packets instead of many small packets ("tinygrams"), for a con-
  2238. siderable efficiency improvement.
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.                                     - 35 -
  2249.  
  2250.  
  2251.      NOTE: A good understanding of sliding window protocols  is  required
  2252.      to  make use of the information presented in these particular fields
  2253.      and a complete explanation is beyond the  scope  of  this  document.
  2254.      See  RFC-793  or  MIL-1778  for more details on the specific sliding
  2255.      window algorithms  used  in  TCP,  and  RFC-896  for  the  "tinygram
  2256.      avoidance" transmission strategy.
  2257.  
  2258. The 'MSS' field displays the maximum segment size; the maximum number of bytes
  2259. that may be sent as a single TCP segment (packet).
  2260.  
  2261. Both the maximum window size and MSS are "negotiated" by the TCPs  running  in
  2262. the  two  communicating  system.   Essentially  this  means  that the two ends
  2263. "agree" on the best values to use for these parameters.  When you set a  value
  2264. for window size and a value for MSS in your machine, those values are communi-
  2265. cated to the remote end when a socket is opened.  That allows the  remote  end
  2266. to  know  how  much  information you are prepared to accept and to prevent the
  2267. remote end from sending you too much information.  Remember,  the  values  for
  2268. window  and  MSS that you set on your system will be the values that the other
  2269. station will use when sending to you.  Also remember that the two ends may set
  2270. different values and still work effectively.
  2271.  
  2272. As an aside, you are permitted to change the value of MSS or WINDOW while  the
  2273. net  program is running.  On the other hand, changing the value of MSS or WIN-
  2274. DOW after a socket has been opened will have no effect on any  currently  open
  2275. sockets.   Open sockets will continue to use the value for MSS that they nego-
  2276. tiated when the socket was opened.  The changed values will be used  when  TCP
  2277. opens a new socket.
  2278.  
  2279. The Queue field indicates how many bytes of data are waiting at  a  particular
  2280. socket.   In  the  case  of  the send queue this field indicates the number of
  2281. bytes transmitted but not yet acknowledged.  During SMTP and FTP  sessions  it
  2282. is not unusual to see this value equal to the window size.  In the case of the
  2283. receive queue the value indicates the number of bytes that have been  received
  2284. but have not been "picked-up" by the application.
  2285.  
  2286. The Total field indicates the number of  bytes  that  have  been  received  or
  2287. transmitted on a socket since the socket was opened.  This information is very
  2288. useful during an FTP session because it will tell  you  the  total  number  of
  2289. bytes transferred on the file (FTP opens a new data socket for every transfer,
  2290. closing the socket when the transfer is complete).  If you know  the  size  of
  2291. the  file  ahead of time you can use this information to determine how much of
  2292. the file has reached the receiving end -- nice information to know when  doing
  2293. a long file transfer over a slow or unreliable link.
  2294.  
  2295. The next field is the retry counter.  If a segment is not acknowledged  within
  2296. an  appropriate period TCP will retransmit that segment because it will assume
  2297. that the segment was lost somewhere in the network.  Each time it  retransmits
  2298. a  segment  the  'Retry'  counter  is incremented.  TCP never gives up sending
  2299. data.  It does 'back off' and send segments less and less frequently in  order
  2300. to reduce network loading.
  2301.  
  2302. The next field is the 'Timer' field.  It displays the status of the timer  for
  2303. this  particular  socket.  If TCP is waiting for an acknowledgement to an out-
  2304. standing segment there will be a time displayed in this field.  If  there  are
  2305.  
  2306.  
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.                                     - 36 -
  2315.  
  2316.  
  2317. no outstanding segments the word "stopped" will indicate that the timer is not
  2318. running.
  2319.  
  2320. The last field, 'round trip time', is a very interesting piece of information.
  2321. It is the amount of time that TCP has determined that it takes for an outgoing
  2322. segment to arrive at its destination and for its  acknowledgement  to  return.
  2323. This  value  is  used to determine the proper setting for the retry timer thus
  2324. allowing TCP to adapt to the changing conditions of the underlying network and
  2325. to prevent the network from being flooded by unnecessary retransmissions.
  2326.  
  2327. The tcp status command is probably the most-used command in the  net  program.
  2328. Don't  be afraid of it, use it!  You may not understand all the fields but you
  2329. will quickly pick up what is important and what  you  can  ignore.  Experiment
  2330. with  it so that you understand it better.  It is a key to pinpointing network
  2331. performance problems.
  2332.  
  2333. _3._3._6._2.  _u_d_p _s_t_a_t_u_s
  2334.  
  2335. The next status command of interest is 'udp status,' used for  getting  status
  2336. information  about  information  that  has been received for the User Datagram
  2337. Protocol (UDP) ULP.  This command may be abbreviated 'u.' When an  application
  2338. makes  use of the UDP transport service it opens a UDP socket.  The udp status
  2339. command will display the status of the transport service and of  each  of  the
  2340. open sockets.  Here is an example of the output of a udp status command:
  2341.  
  2342.         sent 51 rcvd 50 bdcsts 0 cksum err 0 Unknown Socket 9
  2343.         &UCB  Rcv-Q  Local Socket
  2344.  
  2345.         ff38    293  44.96.0.1:3
  2346.  
  2347.  
  2348. In this example the 'sent' and 'rcvd' fields indicate how many  UDP  datagrams
  2349. have  been  sent and received respectively.  The 'bdcsts' field identifies the
  2350. number of broadcast datagrams that have been received.  The 'cksum err'  field
  2351. indicates  how  many  datagrams  have been received with errors while the that
  2352. were addressed to unknown (unopened) sockets.
  2353.  
  2354. Following the general information is the specific information about all of the
  2355. currently  open sockets.  Each open socket is identified by the address of its
  2356. UDP Control Block (&UCB).  Following that is the number  of  bytes  that  have
  2357. been  received and placed on the receive queue (Rcv-Q).  Last comes the actual
  2358. socket identifier consisting of the IP  address  concatenated  with  the  port
  2359. number.
  2360.  
  2361. _3._3._7.  _A_X._2_5 _c_o_n_n_e_c_t_e_d _m_o_d_e _o_p_e_r_a_t_i_o_n:
  2362.  
  2363. In addition to the TCP/IP mode of operation this new version  of  NET.EXE  now
  2364. supports  fully  connected  AX.25 (TNC-to-TNC) operation for talking to BBS'es
  2365. and your buddies without TCP/IP.  When NET.EXE is  running  you  are  free  to
  2366. establish  both  TCP and AX.25 sessions.  When you make an AX.25 connection it
  2367. will be treated like a TELNET session.  You can use  the  session  command  to
  2368. switch between sessions at will.  This prevents the output from one AX.25 ses-
  2369. sion from interfering with other sessions.  To make a connection you  use  the
  2370. connect  command  which  is very similar to the TNC's connect command with the
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.                                     - 37 -
  2381.  
  2382.  
  2383. exception of the addition of a channel identifier.  Here are some examples:
  2384.  
  2385.         connect ax1 wa3pxx
  2386.         connect ax2 n4qq k3af-10
  2387.  
  2388.  
  2389. The first command starts a connection to  wa3pxx  directly  over  the  channel
  2390. labeled  ax1  (see the attach command).  The second example establishes a con-
  2391. nection to n4qq via the k3af-10 digipeater on channel ax2.   To disconnect you
  2392. use either the disconnect command or the close command.
  2393.  
  2394. The other commands for AX.25 are very familiar to a user of a TNC.  Here is  a
  2395. list of commands and a brief description of their meanings:
  2396.  
  2397.         ax25 digipeat [on|off]          turn digipeating on or off
  2398.  
  2399.         ax25 maxframe [n]               set the maximum number of outstanding
  2400.                                         frames (packets) to n where n is between
  2401.                                         1 and 7 inclusive.
  2402.  
  2403.         ax25 mycall [<call>]            Set the call sign for AX.25 frames
  2404.  
  2405.         ax25 paclen [n]                 Set the maximum size of an AX.25 I-field
  2406.  
  2407.         ax25 status                     Display a status much like tcp status.
  2408.                                         If you follow it with an ACB address it
  2409.                                         will display detailed info about a
  2410.                                         particular connection.
  2411.  
  2412.         ax25 t1 [n]                     Displays or sets the value of the
  2413.                                         retransmission timer (FRACK).  The value
  2414.                                         is in seconds.
  2415.  
  2416.         ax25 t2 [n]                     Displays or sets the value of the
  2417.                                         ack delay timer (RESPTIME) in seconds.
  2418.  
  2419.         ax25 t3 [n]                     Displays or sets the value of
  2420.                                         "keep alive" timer (CHECK) in seconds.
  2421.  
  2422.         ax25 window [n]                 Displays or sets the number of bytes
  2423.                                         that may be on the AX.25 receive queue
  2424.                                         before the host begins sending RNR
  2425.                                         frames.
  2426.  
  2427.  
  2428. _3._4.  _U_s_i_n_g _c_o_n_n_e_c_t_e_d _m_o_d_e _A_X._2_5 _f_o_r _m_o_v_i_n_g _I_P _d_a_t_a_g_r_a_m_s:
  2429.  
  2430. Since connected mode AX.25 is now supported these connections may be used  for
  2431. both  host-to-TNC (chatting with your TNC-only equipped buddy or with the BBS)
  2432. and for connected mode IP channels.  With IP you have your choice  of  "uncon-
  2433. nected"  or  "connected"  packets.  The command that controls this is the mode
  2434. command.  The mode command allows you to select which style of connection will
  2435. be used on a particular interface.  Here are two examples:
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.                                     - 38 -
  2447.  
  2448.  
  2449.  
  2450.         mode ax0 vc
  2451.         mode ax1 datagram
  2452.  
  2453.  
  2454. In the first example the interface named ax0 will use "connected" mode  AX.25.
  2455. This  can  improve  the link reliability and hence throughput when the link is
  2456. somewhat marginal.  The second example causes your IP datagrams to be sent  in
  2457. UI frames (unproto or beacon packets).  This is the mode of choice on reliable
  2458. links where very few packets are lost. It  reduces  overhead  so  packets  are
  2459. transferred more rapidly.
  2460.  
  2461. _3._5.  _T_r_a_c_i_n_g _a_n_d _M_o_n_i_t_o_r_i_n_g:
  2462.  
  2463. NET.EXE has the most comprehensive and informative  tracing  features  I  have
  2464. seen  in any software package for packet radio.  The trace function understand
  2465. AX.25, IP, TCP, and NET/ROM.
  2466.  
  2467. Tracing is enabled for each interface individually.  You have  the  choice  of
  2468. tracing incoming packets, outgoing packets, or both.  The format for the trace
  2469. command is:
  2470.  
  2471.         trace <interface> TIO
  2472.  
  2473.  
  2474. where <interface> is the name of the interface to be traced, T  is  the  trace
  2475. mode,  I  is  for incoming packets, and O is for outgoing packets. T, I, and O
  2476. are digits.  The following table gives the values for T and their meanings:
  2477.  
  2478.         0       Trace headers only.  Do not display the data.
  2479.  
  2480.         1       Trace headers and data.  Display the data as ASCII, 64
  2481.                 characters to a line.
  2482.  
  2483.         2       Trace headers and data.  Display the entire packet as Hex and
  2484.                 ASCII with 16 bytes displayed per line.
  2485.  
  2486.  
  2487. The values for I and O are either 1 or 0 depending on whether or not you  want
  2488. the  respective  incoming  or  outgoing  packets traced or not.  Here are some
  2489. examples:
  2490.  
  2491.         trace ax0 010
  2492.         trace ax1 111
  2493.         trace ax0 201
  2494.  
  2495.  
  2496. In the first example incoming packets on interface ax0 will  be  traced.  Only
  2497. the headers will be displayed.  The second example show both incoming and out-
  2498. going packets on ax1 being traced.  Data in the packets will be  displayed  as
  2499. 64  ASCII  characters  on a line.  The last example will display a hex dump of
  2500. all packets being transmitted on ax0.
  2501.  
  2502. I recommend using trace liberally.  You will learn a lot  about  packet  radio
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.                                     - 39 -
  2513.  
  2514.  
  2515. when  you can see what is being sent and to whom.  The trace display separates
  2516. the different headers at the different layers.  Trace will display  the  link,
  2517. network, and transport layer headers separately so you can see their relation-
  2518. ship.
  2519.  
  2520. _3._6.  _R_u_n_n_i_n_g _N_E_T _a_n_d _B_M _C_o_n_c_u_r_r_e_n_t_l_y
  2521.  
  2522. In order to get the greatest use out of NET it is important to have it running
  2523. all the time.  The problem with that is that DOS is not a multitasking operat-
  2524. ing system.  It is very frustrating to have to start and stop NET  every  time
  2525. you want to do something else.  There are solutions: DoubleDos and DesqView.
  2526.  
  2527. The DoubleDos and DesqView packages from SoftLogic  Solutions  and  Microsoft,
  2528. respectively,  solve  this  problem. They permit you to split your memory into
  2529. two partitions (or more, for DesqView) and allow each program to operate as if
  2530. it  had its own PC.  Phil Karn wrote NET with these "multitaskers" in mind and
  2531. even included the necessary code in NET so that it can effectively reside with
  2532. other  programs  without performance penalties to either NET or the other pro-
  2533. grams.  This will also allow you to send and receive mail with BM while NET is
  2534. still  running.   That  way  you will not have to exit from NET every time you
  2535. want to prepare a mail message or read mail that has arrived.
  2536.  
  2537. The first step in using NET with DoubleDOS is to install  DoubleDOS  according
  2538. to  the  instructions.   Part  of  installing  DoubleDOS is to modify the file
  2539. /DDCONFIG.SYS  for  your  environment.   Many  things  can   be   changed   in
  2540. DDCONFIG.SYS  but  two  are  important to NET: size and program to load in the
  2541. bottom partition.  When you edit DDCONFIG.SYS you  will  find  a  field  named
  2542. 'bottom  size'  and  a  field  named  'bottom program.'  If you want NET to be
  2543. started  automatically  when  you  start  DoubleDOS  enter  the  following  in
  2544. DDCONFIG.SYS:
  2545.  
  2546.         bottom program = /NET.EXE
  2547.  
  2548.  
  2549. DoubleDOS will normally split the available memory in half.  This is  not  the
  2550. best  solution  because we know how much memory NET needs and we can then make
  2551. sure that all of the rest of the available memory is available for  the  other
  2552. partition.   NET  itself needs about 150 Kb of memory.  In addition, NET needs
  2553. COMMAND.COM also loaded in its partition.  For this reason you  will  probably
  2554. want to allocate about 175 Kb to the bottom partition where NET will run.
  2555.  
  2556. Let us assume that you want to have both DoubleDOS and  NET  start  when  your
  2557. system  boots (just what you want after a power hit).  Add the following entry
  2558. to your AUTOEXEC.BAT file:
  2559.  
  2560.         /doubledos
  2561.  
  2562.  
  2563. That will cause DoubleDOS to start and DoubleDOS will automatically start NET.
  2564.  
  2565. _3._7.  _I_n_s_t_a_l_l_a_t_i_o_n _o_n _a _C_o_m_m_o_d_o_r_e _A_m_i_g_a
  2566.  
  2567. < not written yet >
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.                                     - 40 -
  2579.  
  2580.  
  2581. _3._8.  _I_n_s_t_a_l_l_a_t_i_o_n _o_n _a_n _A_p_p_l_e _M_a_c_i_n_t_o_s_h
  2582.  
  2583. < not written yet >
  2584.  
  2585. _3._9.  _I_n_s_t_a_l_l_a_t_i_o_n _u_n_d_e_r _U_n_i_x
  2586.  
  2587. < not written yet >
  2588.  
  2589. _4.  _O_p_e_r_a_t_i_o_n_a_l _R_e_f_e_r_e_n_c_e
  2590.  
  2591. _4._1.  _T_h_e _N_E_T._E_X_E _P_r_o_g_r_a_m
  2592.  
  2593. The executable file "net.exe" provides both client and server Internet facili-
  2594. ties.   It  implements  the  various ARPA protocols as both a host and gateway
  2595. (i.e., it acts as an end-user node as well as an IP packet switch for  transit
  2596. traffic).   The  keyboard and display is used by the local operator to control
  2597. both host and gateway level functions, for which a number of commands are pro-
  2598. vided.
  2599.  
  2600. _4._1._1.  _S_t_a_r_t_u_p
  2601.  
  2602. When net.exe is executed without arguments,  it  attempts  to  open  the  file
  2603. "autoexec.net"  in  the root directory of the current drive.  If it exists, it
  2604. is read and executed as though its contents were typed on the console as  com-
  2605. mands.  This feature is useful for setting the local IP address and host name,
  2606. initializing the IP routing table, and starting the various Internet services.
  2607. If  net.exe  is  invoked  with  an  argument, it is taken to be the name of an
  2608. alternate startup file; it is read instead of autoexec.net.
  2609.  
  2610. _4._1._2.  _C_o_n_s_o_l_e _m_o_d_e
  2611.  
  2612. The console may be in one of two modes: command mode  and  converse  mode.  In
  2613. command mode, the prompt "net>" is displayed and any of the commands described
  2614. in the next section may be entered.  In converse mode, keyboard input is  pro-
  2615. cessed  according  to the "current session", which may be either a Telnet, FTP
  2616. or AX.25 connection.  In a telnet or AX.25 session, keyboard input is sent  to
  2617. the  remote  system  and any output from the remote system is displayed on the
  2618. console.  In an FTP session, keyboard input is first examined to see if it  is
  2619. a  known  local  command; if so it is executed locally.  If not, it is "passed
  2620. through" to the remote FTP server.   (See  the  section  titled  "FTP  Subcom-
  2621. mands").
  2622.  
  2623. The keyboard also has "cooked" and "raw" states.  In cooked  state,  input  is
  2624. line-at-a-time;  the user may use the line editing characters ^U, ^R and back-
  2625. space to erase the line, redisplay the line  and  erase  the  last  character,
  2626. respectively.   Hitting either return or line feed passes the complete line up
  2627. to the application.  In raw mode, each character is immediately passed to  the
  2628. application as it is typed.  The keyboard is always in cooked state in command
  2629. mode. It is also cooked in converse mode on an AX25 or FTP session.  In a Tel-
  2630. net session it depends on whether the remote end has issued (and the local end
  2631. has accepted) the Telnet "WILL ECHO" option.  (See the "echo" command).
  2632.  
  2633. On the IBM-PC, the user may escape back to command mode  by  hitting  the  F10
  2634. key.   On  other systems, the user must enter the "escape" character, which is
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.                                     - 41 -
  2645.  
  2646.  
  2647. by default control-] (hex 1d, ASCII GS). (Note that this is distinct from  the
  2648. ASCII  character  of  the same name). The escape character can be changed (see
  2649. the "escape" command).
  2650.  
  2651. _4._1._3.  _C_o_m_m_a_n_d_s
  2652.  
  2653. This section describes each of the commands recognized while in command  mode.
  2654. Note  that  certain  FTP subcommands, e.g., put, get, dir, etc, are recognized
  2655. only in converse mode with the appropriate FTP session; they  are  not  recog-
  2656. nized  while in command mode.  The notation "<hostid>" denotes a host or gate-
  2657. way, which may be specified in one of two ways: as a symbolic name  listed  in
  2658. the  file  "/hosts.net", or as a numeric IP address in dotted decimal notation
  2659. enclosed by brackets, e.g., [44.0.0.1]. When domain server support  is  added,
  2660. ARPA-style  domain  names  (e.g., ka9q.ampr) will also be accepted if a domain
  2661. server is available on the network to resolve them into IP addresses.
  2662.  
  2663. _4._1._3._1.  <_c_r>
  2664.  
  2665. Entering a carriage return (empty line) while in command mode puts you in con-
  2666. verse  mode  with  the  current  session.  If there is no current session, net
  2667. remains in command mode.
  2668.  
  2669. _4._1._3._2.  !
  2670.  
  2671. An alias for the "shell" command.
  2672.  
  2673. _4._1._3._3.  #
  2674.  
  2675. Commands starting with the hash mark (#) are ignored. This  is  mainly  useful
  2676. for comments in the autoexec.net file.
  2677.  
  2678. _4._1._3._4.  _a_r_p
  2679.  
  2680. Displays the Address Resolution Protocol table that maps IP addresses to their
  2681. subnet  (link)  addresses on subnetworks capable of broadcasting.  For each IP
  2682. address entry the subnet type (e.g., Ethernet, AX.25), subnet address and time
  2683. to  expiration  is shown. If the link address is currently unknown, the number
  2684. of IP datagrams awaiting resolution is also shown.
  2685.  
  2686. _4._1._3._5.  _a_t_t_a_c_h <_h_w _t_y_p_e> <_I/_O _a_d_d_r_e_s_s>  <_v_e_c_t_o_r>  <_m_o_d_e>  <_l_a_b_e_l>  <_b_u_f_s_i_z_e>
  2687. <_m_t_u> [<_s_p_e_e_d>]
  2688.  
  2689. Configure and attach a hardware interface to the system.
  2690.  
  2691. a.  <hw type> represents the kind of I/O device that is being  attached.   The
  2692. following types are supported:
  2693.  
  2694. 3c500   3Com 3C500 or 3C501 Ethernet interface
  2695. asy     Standard PC asynchronous interface using the National 8250
  2696. hapn    Hamilton Amateur Packet Network adapter board (Intel 8273)
  2697. eagle   Eagle Computer card (Zilog 8530)
  2698. pc100   PACCOMM PC-100 (Zilog 8530)
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.                                     - 42 -
  2711.  
  2712.  
  2713. These last two interfaces are still under development; driver code included in
  2714. this package may or may not work.
  2715.  
  2716. B. <I/O address> is the base address of the control registers for the device.
  2717.  
  2718. C. <vector> is the interrupt vector number.  Both the address and  the  vector
  2719. must  be in hexadecimal. (You may put "0x" in front of these two values if you
  2720. wish, but note that they will be interpreted in hex even if you don't use it).
  2721.  
  2722. D.  <mode> controls how IP datagrams are to be encapsulated  in  the  device's
  2723. link level protocol; i.e., it selects among several link protocols that may be
  2724. available.  The choices here depend on the interface; at  present,  the  3c500
  2725. interface only supports mode "arpa", which uses standard ARPA-style encapsula-
  2726. tion.  (In the future, "802" may mean "use 802.3-style  encapsulation").   Two
  2727. modes for the "asy" device are currently supported:
  2728.  
  2729. slip    Encapsulates IP datagrams directly in SLIP frames without a link
  2730.         header. This is for operation on point-to-point lines and is compatible
  2731.         with 4.2BSD UNIX SLIP).
  2732.  
  2733. ax25    Similar to slip, except that an AX.25 header and a KISS TNC
  2734.         control header are added to the front of the datagram before SLIP
  2735.         encoding.  Either UI (connectionless) or I (connection-oriented) AX.25
  2736.         frames can be used; see the "mode" command for details.
  2737.  
  2738.  
  2739. The Address Resolution Protocol (ARP) maps IP to Ethernet addresses on  Ether-
  2740. net  controllers  and  to  AX.25  addresses on "asy" lines operating in "ax25"
  2741. mode.
  2742.  
  2743. E. <label> gives the name by which the interface will be known to the  various
  2744. commands, such as "connect", "route" and "trace".
  2745.  
  2746. F. For asynchronous ports, <bufsize> specifies the size of the ring buffer  in
  2747. bytes  to be statically allocated to the receiver; incoming bursts larger than
  2748. this may (but not necessarily) cause data to be lost.  For Ethernet, <bufsize>
  2749. specifies  how many PACKETS may be queued on the receive queue at one time; if
  2750. this limit is exceeded, further received packets will be discarded.   This  is
  2751. useful  to  prevent  the system from running out of memory should another node
  2752. suddenly develop a case of diarrhea.
  2753.  
  2754. G.  <mtu> is the Maximum Transmission Unit size, in bytes.   Datagrams  larger
  2755. than  this  limit  will be fragmented at the IP layer into smaller pieces. For
  2756. AX.25 UI frames, this limits the size of the information field.  For  AX.25  I
  2757. frames,  however, the ax25 paclen parameter is also relevant.  If the datagram
  2758. or fragment is still larger than paclen, it is also fragmented  at  the  AX.25
  2759. level  (as  opposed  to  the  IP  level)  before transmission.  (See the "ax25
  2760. paclen" command for further information).
  2761.  
  2762. H. <speed> is needed only for an "asy" line; the controller will  be  initial-
  2763. ized to the given speed.
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.                                     - 43 -
  2777.  
  2778.  
  2779.  
  2780. Examples:
  2781.  
  2782. # Attach a 3Com Ethernet controller using the standard 3Com address and
  2783. # vector (i.e., as it comes out of the box) to use ARPA-standard encapsulation.
  2784. # The receive queue is limited to 5 packets, and outgoing packets larger
  2785. # than 1500 bytes will be fragmented
  2786. attach 3c500 0x300 3 arpa ec0 5 1500
  2787.  
  2788. # Attach the PC asynch card normally known as "com1" (the first controller)
  2789. # to operate in point-to-point slip mode at 9600 baud, calling it "sl0".
  2790. # A 1024 byte receiver ring buffer is allocated. Outgoing packets larger
  2791. # than 256 bytes are fragmented.
  2792. attach asy 0x3f8 4 slip sl0 1024 256 9600
  2793.  
  2794. # Attach the secondary PC asynch card ("com2") to operate in AX.25 mode
  2795. # with an MTU of 576 bytes at 9600 baud with a KISS TNC, calling it "ax0".
  2796. # By default, IP datagrams are sent in UI frames
  2797. attach asy 0x2f8 3 ax25 ax0 1024 576 9600
  2798.  
  2799.  
  2800.  
  2801. (Note that you cannot use the second asynch controller  ("com2")  and  a  3Com
  2802. Ethernet  card with standard addressing at the same time because they both use
  2803. interrupt vector 3).
  2804.  
  2805. ax25 digipeat [on|off] Controls whether AX.25 packets addressed to  this  sta-
  2806. tion as a digipeater will be repeated.
  2807.  
  2808. ax25 maxframe [<val]>] Establishes the maximum number of frames that  will  be
  2809. allowed  to  remain  unacknowledged at one time on new AX.25 connections. This
  2810. number cannot be greater than 7.
  2811.  
  2812. ax25 mycall [<call>] Display or set the local  AX.25  address.   The  standard
  2813. format  is  used,  e.g., KA9Q-0 or WB6RQN-5. This command must be given before
  2814. any attach command using AX.25 mode are given.
  2815.  
  2816. ax25 paclen [<val>] Limits the size of  I-fields  on  new  AX.25  connections.
  2817. Note  that if IP datagrams or fragments larger than this are transmitted, they
  2818. will be transparently fragmented at the AX.25 level, sent as  a  series  of  I
  2819. frames,  and  reassembled  back into a complete IP datagram or fragment at the
  2820. other end of the link. This parameter should be less than the MTU of the asso-
  2821. ciated interface.
  2822.  
  2823. ax25 reset <axcb> Deletes the AX.25 connection control block at the  specified
  2824. address.
  2825.  
  2826. ax25 retry [<val>] Limits the number of successive unsuccessful retransmission
  2827. attempts  on  new  AX.25  connections.  If  this  limit  is exceeded, link re-
  2828. establishment is attempted. If this fails "retry" times, then  the  connection
  2829. is abandoned and all queued data is deleted.
  2830.  
  2831. ax25 status [<axcb>] Without an argument, displays a one-line summary of  each
  2832. AX.25  control  block.   If  the  address  of  a  particular  control block is
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.                                     - 44 -
  2843.  
  2844.  
  2845. specified, the contents of that control block are dumped in more detail.  Note
  2846. that the send queue units are frames, while the receive queue units are bytes.
  2847.  
  2848. ax25 t1 [<val>] ax25 t2 [<val>] ax25 t3  [<val>]  Display  or  set  the  AX.25
  2849. timers  to  be used for new connections. T1 is the retransmission timer, T2 is
  2850. the acknowledgement delay timer and T3 is the idle "keep alive" timer.  Values
  2851. are in seconds.
  2852.  
  2853. ax25 window [<val>] Sets the number of bytes that can be pending on  an  AX.25
  2854. receive  queue  beyond  which I frames will be answered with RNR (Receiver Not
  2855. Ready) responses.  This presently applies only to suspended interactive  AX.25
  2856. sessions, since incoming IP datagrams are always processed immediately and not
  2857. allowed to remain on the receive queue.
  2858.  
  2859. cd [<dirname>] Change the current working directory, and display the new  set-
  2860. ting.   Without  an argument, cd simply displays the current directory without
  2861. change.  The "pwd" command is an alias for "cd"
  2862.  
  2863. close [<session #>] On an AX.25 session, this command initiates a  disconnect.
  2864. On a FTP or Telnet session, this command sends a FIN (i.e., initiates a close)
  2865. on the session's TCP connection.  This is an alternative to asking the  remote
  2866. server  to  initiate a close ("QUIT" to FTP, or the logout command appropriate
  2867. for the remote system in the case of Telnet).  When either FTP or Telnet  sees
  2868. the  incoming  half  of  a  TCP connection close, it automatically responds by
  2869. closing the outgoing half of the connection.  Close is more graceful than  the
  2870. "reset"  command,  in  that  it  is  less  likely to leave the remote TCP in a
  2871. "half-open" state.
  2872.  
  2873. connect <interface> <callsign> [<digipeater> ... ] Initiates a "vanilla" AX.25
  2874. session  to  the  specified  call  sign using the specified interface. Up to 7
  2875. optional digipeaters may be given; note that the word  "via"  is  NOT  needed.
  2876. Data sent on this session goes out in conventional AX.25 packets with no upper
  2877. layer protocol.  The de-facto presentation standard format is  used,  in  that
  2878. each packet holds one line of text, terminated by a carriage return.  A single
  2879. AX.25 connection may be used for both  terminal-to-terminal  and  IP  traffic,
  2880. with  the two types of data being automatically separated by their AX.25 Level
  2881. 3 Protocol IDs.
  2882.  
  2883. dir [<dirname>] List the contents of the specified directory on  the  console.
  2884. If no argument is given, the current directory is listed.
  2885.  
  2886. disconnect [<session #>] An alias for the "close" command (for the benefit  of
  2887. AX.25 users).
  2888.  
  2889. echo [accept|refuse] Displays or changes the flag controlling client  Telnet's
  2890. response to a remote WILL ECHO offer.
  2891.  
  2892. The Telnet presentation protocol specifies that in the absence of a negotiated
  2893. agreement  to  the  contrary, neither end echoes data received from the other.
  2894. In this mode, a Telnet client session echoes keyboard input locally and  noth-
  2895. ing  is  actually sent until a carriage return is typed. Local line editing is
  2896. also performed: backspace deletes the last character  typed,  while  control-U
  2897. deletes the entire line.
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.                                     - 45 -
  2909.  
  2910.  
  2911. When communicating from keyboard to keyboard the standard local echo  mode  is
  2912. used,  so the setting of this parameter has no effect. However, many timeshar-
  2913. ing systems (e.g., UNIX) prefer to do their own echoing of typed input.  (This
  2914. makes screen editors work right, among other things). Such systems send a Tel-
  2915. net WILL ECHO offer immediately upon receiving an incoming  Telnet  connection
  2916. request. If "echo accept" is in effect, a client Telnet session will automati-
  2917. cally return a DO ECHO response. In this mode, local echoing  and  editing  is
  2918. turned  off  and  each  key  stroke  is sent immediately (subject to the Nagle
  2919. tinygram algorithm in TCP).  While this mode is just fine across an  Ethernet,
  2920. it  is  clearly  inefficient  and  painful across slow paths like packet radio
  2921. channels. Specifying "echo refuse" causes an incoming WILL ECHO  offer  to  be
  2922. answered with a DONT ECHO; the client Telnet session remains in the local echo
  2923. mode.  Sessions already in the remote echo mode are unaffected. (Note:  Berke-
  2924. ley  Unix has a bug in that it will still echo input even after the client has
  2925. refused the WILL ECHO offer. To get  around  this  problem,  enter  the  "stty
  2926. -echo" command to the shell once you have logged in.)
  2927.  
  2928. _4._1._3._6.  _e_o_l [_u_n_i_x|_s_t_a_n_d_a_r_d]
  2929.  
  2930. Displays or changes Telnet's end-of-line behavior when in  remote  echo  mode.
  2931. In  standard  mode, each key is sent as-is. In unix mode, carriage returns are
  2932. translated to line feeds.  This command is not necessary with  all  UNIX  sys-
  2933. tems;  use  it only  when  you  find that a particular system responds to line
  2934. feeds but not carriage returns.  Only Sun UNIX release 3.2  seems  to  exhibit
  2935. this behavior; later releases are fixed.
  2936.  
  2937. _4._1._3._7.  _e_s_c_a_p_e <_c_h_a_r>
  2938.  
  2939. Without arguments, displays the current command-mode escape character in  hex.
  2940. If  given  an  argument, the first character becomes the new escape character.
  2941. (This command is not provided on the IBM-PC; on the PC,  the  escape  char  is
  2942. always F10.)
  2943.  
  2944. _4._1._3._8.  _e_t_h_e_r_s_t_a_t
  2945.  
  2946. Display 3-Com Ethernet controller statistics (if configured).
  2947.  
  2948. _4._1._3._9.  _e_x_i_t
  2949.  
  2950. Exit the "net" program and return to MS-DOS (or CP/M).
  2951.  
  2952. _4._1._3._1_0.  _f_t_p <_h_o_s_t_i_d>
  2953.  
  2954. Open an FTP control channel to the specified remote host  and  enter  converse
  2955. mode  on  the  new  session.   Responses  from the remote server are displayed
  2956. directly on the screen.
  2957.  
  2958. _4._1._3._1_1.  _h_e_l_p
  2959.  
  2960. Display a brief summary of top-level commands.
  2961.  
  2962. _4._1._3._1_2.  _h_o_s_t_n_a_m_e [<_n_a_m_e>]
  2963.  
  2964. Displays or sets the local host's name (an ASCII string such as "ka9q-pc", NOT
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.                                     - 46 -
  2975.  
  2976.  
  2977. an IP address).  Currently this is used only in the greeting messages from the
  2978. SMTP (mail) and FTP (file transfer) servers.
  2979.  
  2980. _4._1._3._1_3.  _l_o_g [_s_t_o_p | <_f_i_l_e>]
  2981.  
  2982. Without arguments, indicates whether server  sessions  are  being  logged.  If
  2983. "stop" is given as the argument, logging is terminated (the servers themselves
  2984. are unaffected). If a file name is given as an argument,  server  session  log
  2985. entries will be appended to it.
  2986.  
  2987. _4._1._3._1_4.  _i_p _a_d_d_r_e_s_s [<_h_o_s_t_i_d>]
  2988.  
  2989. Displays or sets the local IP address.
  2990.  
  2991. _4._1._3._1_5.  _i_p _s_t_a_t_u_s
  2992.  
  2993. Displays Internet Protocol (IP) statistics, such as total  packet  counts  and
  2994. error  counters of various types.  Also displays statistics about the Internet
  2995. Control Message Protocol (ICMP), including the number of ICMP messages of each
  2996. type sent or received.
  2997.  
  2998. _4._1._3._1_6.  _i_p _t_t_l [<_v_a_l>]
  2999.  
  3000. Displays or sets the default time-to-live value placed  in  each  outgoing  IP
  3001. datagram.  This  limits the number of switch hops the datagram will be allowed
  3002. to take. The idea is to bound the lifetime of  the  packet  should  it  become
  3003. caught  in a routing loop, so make the value somewhat larger than the diameter
  3004. of the network.
  3005.  
  3006. _4._1._3._1_7.  _m_e_m_s_t_a_t
  3007.  
  3008. Displays the internal free memory list in the storage allocator.
  3009.  
  3010. _4._1._3._1_8.  _m_o_d_e <_i_n_t_e_r_f_a_c_e> [_v_c|_d_a_t_a_g_r_a_m]
  3011.  
  3012. Controls the default transmission mode on the specified  AX.25  interface.  In
  3013. "datagram"  mode, IP packets are encapsulated in AX.25 UI frames and transmit-
  3014. ted without any other link level  mechanisms,  such  as  connections  or  ack-
  3015. nowledgements.
  3016.  
  3017. In "vc" (virtual circuit) mode, IP packets are encapsulated in AX.25 I  frames
  3018. and  are acknowledged at the link level according to the AX.25 protocol.  Link
  3019. level connections are opened if necessary.  With the  proper  setting  of  the
  3020. AX.25  T2  (acknowledgement  delay)  timer, AX.25 acknowledgements can be pig-
  3021. gybacked on I frames carrying other IP datagrams (e.g., TCP level acknowledge-
  3022. ments),  thereby  eliminating  the  extra overhead ordinarily incurred by link
  3023. level acknowledgments.
  3024.  
  3025. In both modes, ARP is used to map IP to AX.25 addresses.  The defaults can  be
  3026. overridden  with  the  type-of-service (TOS) bits in the IP header. Turning on
  3027. the "reliability" bit causes I frames to be used, while turning  on  the  "low
  3028. delay"  bit  uses UI frames.  (The effect of turning on both bits is undefined
  3029. and subject to change).
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.                                     - 47 -
  3041.  
  3042.  
  3043. In both modes, IP-level fragmentation is done if the datagram is  larger  than
  3044. the  interface  MTU.  In virtual circuit mode, however, the resulting datagram
  3045. (or fragments) is further fragmented at the AX.25 layer if it  (or  they)  are
  3046. still  larger  than  the  AX.25  "paclen"  parameter.  In AX.25 fragmentation,
  3047. datagrams are broken into several I frames and reassembled  at  the  receiving
  3048. end before being passed to IP. This is preferable to IP fragmentation whenever
  3049. possible because of decreased overhead (the IP header isn't repeated  in  each
  3050. fragment) and increased robustness (a lost fragment is immediately retransmit-
  3051. ted by the link layer).
  3052.  
  3053. _4._1._3._1_9.  _p_a_r_a_m <_i_n_t_e_r_f_a_c_e> [_p_a_r_a_m ...]
  3054.  
  3055. Param invokes a device-specific control routine.  On  a  KISS  TNC  interface,
  3056. this  sends  control  packets  to the TNC.  Data bytes are treated as decimal.
  3057. For example, "param ax0 1 255" will set the keyup timer (type field  =  1)  on
  3058. the  KISS  TNC  configured  as ax0 to 2.55 seconds (255 x .01 sec).  On a SLIP
  3059. interface, the param command allows the baud rate to be  read  (without  argu-
  3060. ments)  or  set.  The implementation of this command for the various interface
  3061. drivers is incomplete and subject to change.
  3062.  
  3063. _4._1._3._2_0.  _p_w_d [<_d_i_r_n_a_m_e>]
  3064.  
  3065. An alias for the cd command.
  3066.  
  3067. _4._1._3._2_1.  _r_e_c_o_r_d [<_f_i_l_e_n_a_m_e>|_o_f_f]
  3068.  
  3069. Opens <filename> and appends to it all data received on the  current  session.
  3070. Data sent on the current session is also written into the file except for Tel-
  3071. net sessions in remote echo mode.  The command "record  off"  stops  recording
  3072. and closes the file. This command is not supported for FTP sessions.
  3073.  
  3074. _4._1._3._2_2.  _r_e_s_e_t [<_s_e_s_s_i_o_n>]
  3075.  
  3076. If an argument is given, force a local reset (deletion) of the AX.25 (AXCB) or
  3077. TCP  Control  Block  (TCB) belonging to the specified session. The argument is
  3078. first checked for validity.  If no argument is given, the current session,  if
  3079. any,  is  used.   This  command  should be used with caution since it does not
  3080. inform the remote end that the connection no longer exists.  (In TCP  a  reset
  3081. (RST)  message will be automatically generated should the remote TCP send any-
  3082. thing after a local reset has been done.  In AX.25 the DM message  performs  a
  3083. similar  role.   Both  are used to get rid of a lingering half-open connection
  3084. after a remote system has crashed.)
  3085.  
  3086. _4._1._3._2_3.  _r_o_u_t_e
  3087.  
  3088. route  add  <dest   hostid>[/bits]|default   <interface>   [<gateway   hostid>
  3089. [<metric>]] route drop <dest hostid>
  3090.  
  3091. With no arguments, "route" displays the IP routing table. "route add" adds  an
  3092. entry  to  the  routing  table,  while "route drop" deletes an existing entry.
  3093. "route add" requires at least two more arguments, the host id  of  the  target
  3094. destination and the local name of the interface to which its packets should be
  3095. sent.  If the destination is not local, the gateway's host id should  also  be
  3096. specified.  (If  the interface is a point-to-point link, then <gateway hostid>
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.                                     - 48 -
  3107.  
  3108.  
  3109. may be omitted even if the target is non-local because this field is only used
  3110. to  determine the gateway's link level address, if any.  If the destination is
  3111. directly reachable, <gateway hostid> is also unnecessary since the destination
  3112. address is used to determine the interface link address).
  3113.  
  3114. The optional "/bits" suffix to the destination  host  id  specifies  how  many
  3115. leading  bits  in  the host id are to be considered significant in the routing
  3116. comparisons.  If not specified, 32 bits (i.e., full significance) is  assumed.
  3117. With  this  option,  a  single routing table entry may refer to many hosts all
  3118. sharing a common bit string prefix in their IP addresses.  For  example,  ARPA
  3119. Class  A, B and C networks would use suffixes of /8, /16 and /24 respectively;
  3120. the command
  3121.  
  3122.         route add [44]/8 sl0 [44.64.0.2]
  3123.  
  3124.  
  3125. causes any IP addresses beginning with "44" in the first 8 bits to  be  routed
  3126. to [44.64.0.2]; the remaining 24 bits are "don't-cares".
  3127.  
  3128. When an IP address to be routed matches more than one  entry  in  the  routing
  3129. table,  the  entry  with  largest "bits" parameter (i.e., the "best" match) is
  3130. used. This allows individual hosts or blocks of hosts to be  exceptions  to  a
  3131. more general rule for a larger block of hosts.
  3132.  
  3133. The special destination "default" is used to route datagrams to addresses  not
  3134. in  the  routing table; it is equivalent to specifying a /bits suffix of /0 to
  3135. any destination hostid.  Care must be taken with  default  entries  since  two
  3136. nodes  with  default entries pointing at each other will route packets to unk-
  3137. nown addresses back and forth in a loop until their time-to-live (TTL)  fields
  3138. expire.   (Routing  loops for specific addresses can also be created, but this
  3139. is less likely to occur accidentally).
  3140.  
  3141. "route drop" deletes an entry from the table. If  a  packet  arrives  for  the
  3142. deleted address and a default route is in effect, it will be used.
  3143.  
  3144. Here are some examples of using the route command:
  3145.  
  3146.         # Route datagrams to IP address 44.0.0.3 to SLIP line #0.
  3147.         # No gateway is needed because SLIP is point-to point.
  3148.         route add [44.0.0.3] sl0
  3149.  
  3150.         # Route all default traffic to the gateway on the local Ethernet
  3151.         # with IP address [44.0.0.1]
  3152.         route add default ec0 [44.0.0.1]
  3153.  
  3154.         # The local Ethernet has an ARPA Class-C address assignment;
  3155.         # route all IP addresses beginning with 192.4.8 to it
  3156.         route add [192.4.8]/24 ec0
  3157.  
  3158.         # The station with IP address [44.0.0.10] is on the local AX.25 channel
  3159.         route add [44.0.0.10] ax0
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.                                     - 49 -
  3173.  
  3174.  
  3175. _4._1._3._2_4.  _s_e_s_s_i_o_n [<_s_e_s_s_i_o_n #>]
  3176.  
  3177. Without arguments, displays the list of current  sessions,  including  session
  3178. number,  remote  TCP or AX.25 address and the address of the TCP or AX.25 con-
  3179. trol block.  An asterisk (*) is shown next to the "current" session;  entering
  3180. <cr>  at this point will put you in converse mode with that session.  Entering
  3181. a session number as an argument to the session command will put  you  in  con-
  3182. verse  mode  with  that session.  If the telnet server is enabled, the user is
  3183. notified of  an  incoming  request  and  a  session  number  is  automatically
  3184. assigned.   The user may then select the session normally to converse with the
  3185. remote user as though the session had been locally initiated.
  3186.  
  3187. _4._1._3._2_5.  _s_h_e_l_l
  3188.  
  3189. Suspends "net" and executes a sub shell ("command  processor"  under  MS-DOS).
  3190. When  the  sub  shell  exits, net resumes (under MS-DOS, enter the "exit" com-
  3191. mand). Note that background activity (FTP  servers,  etc)  is  also  suspended
  3192. while the subshell executes.
  3193.  
  3194. _4._1._3._2_6.  _s_m_t_p _g_a_t_e_w_a_y [<_h_o_s_t_i_d>]
  3195.  
  3196. Displays or sets the host to be used as a "smart" mail relay. Any mail sent to
  3197. a  hostid  not  in the host table will instead be sent to the gateway for for-
  3198. warding.
  3199.  
  3200. _4._1._3._2_7.  _s_m_t_p _k_i_c_k
  3201.  
  3202. Run through the outgoing mail queue and attempt to deliver any  pending  mail.
  3203. This  command is periodically invoked by a timer whenever net is running; this
  3204. command allows the user to "kick" the mail system manually.
  3205.  
  3206. _4._1._3._2_8.  _s_m_t_p _m_a_x_c_l_i_e_n_t_s [<_v_a_l>]
  3207.  
  3208. Displays or sets the maximum number of  simultaneous  outgoing  SMTP  sessions
  3209. that  will be allowed. The default is 10; reduce it if network congestion is a
  3210. problem.
  3211.  
  3212. _4._1._3._2_9.  _s_m_t_p _t_i_m_e_r [<_v_a_l>]
  3213.  
  3214. Displays or sets the interval, in seconds, between scans of the outbound  mail
  3215. queue. For example, "smtp timer 600" will cause the system to check for outgo-
  3216. ing mail every 10 minutes and attempt to deliver anything it finds, subject of
  3217. course to the "maxclients" limit. Setting a value of zero disables queue scan-
  3218. ning altogether, note that this is the default!  This value is recommended for
  3219. stand  alone  IP gateways that never handle mail, since it saves wear and tear
  3220. on the floppy disk drive.
  3221.  
  3222. _4._1._3._3_0.  _s_m_t_p _t_r_a_c_e [<_v_a_l>]
  3223.  
  3224. Displays or sets the trace flag in the SMTP  client,  allowing  you  to  watch
  3225. SMTP's  conversations  as it delivers mail.  Zero (the default) disables trac-
  3226. ing.
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.                                     - 50 -
  3239.  
  3240.  
  3241. _4._1._3._3_1.  _s_t_a_r_t _f_t_p|_s_m_t_p|_t_e_l_n_e_t|_d_i_s_c_a_r_d|_e_c_h_o
  3242.  
  3243. Starts the specified Internet server, allowing remote connection requests.
  3244.  
  3245. _4._1._3._3_2.  _s_t_o_p _f_t_p|_s_m_t_p|_t_e_l_n_e_t|_d_i_s_c_a_r_d|_e_c_h_o
  3246.  
  3247. Stops the specified Internet server,  rejecting  any  further  remote  connect
  3248. requests. Existing connections are allow to complete normally.
  3249.  
  3250. _4._1._3._3_3.  _t_c_p _i_r_t_t [<_v_a_l>]
  3251.  
  3252. Display or set the intial round trip time estimate, in seconds, to be used for
  3253. new TCP connections until they can measure and adapt to the actual value.  The
  3254. default is 5 seconds.  Increasing this when operating over slow channels  will
  3255. avoid the flurry of retransmissions that would otherwise occur as the smoothed
  3256. estimate settles down at the correct value. Note that this command  should  be
  3257. given  before  servers  are started in order for it to have effect on incoming
  3258. connections.
  3259.  
  3260. _4._1._3._3_4.  _t_c_p _k_i_c_k <_t_c_b__a_d_d_r>
  3261.  
  3262. If there is data on the send queue of the specified tcb, this  command  forces
  3263. an immediate retransmission.
  3264.  
  3265. _4._1._3._3_5.  _t_c_p _m_s_s [<_s_i_z_e>]
  3266.  
  3267. Display or set the TCP Maximum Segment Size in bytes that will be sent on  all
  3268. outgoing  TCP  connect  request (SYN segments).  This tells the remote end the
  3269. size of the largest segment (packet) it may send. Changing  MSS  affects  only
  3270. future connections; existing connections are unaffected.
  3271.  
  3272. _4._1._3._3_6.  _t_c_p _r_e_s_e_t <_t_c_b__a_d_d_r>
  3273.  
  3274. Deletes the TCP control block at the specified address.
  3275.  
  3276. _4._1._3._3_7.  _t_c_p _r_t_t <_t_c_b__a_d_d_r> <_r_t_t_v_a_l>
  3277.  
  3278. Replaces the automatically computed round trip time in the specified tcb  with
  3279. the  rttval in milliseconds.  This command is useful to speed up recovery from
  3280. a series of lost packets since it provides a manual bypass around  the  normal
  3281. backoff retransmission timing mechanisms.
  3282.  
  3283. _4._1._3._3_8.  _t_c_p _s_t_a_t_u_s [<_t_c_b__a_d_d_r>]
  3284.  
  3285. Without arguments, displays several TCP-level statistics, plus  a  summary  of
  3286. all  existing  TCP  connections, including TCB address, send and receive queue
  3287. sizes, local and remote sockets, and connection state. If <tcb_addr> is speci-
  3288. fied,  a  more detailed dump of the specified TCB is generated, including send
  3289. and receive sequence numbers and timer information.
  3290.  
  3291. _4._1._3._3_9.  _t_c_p _w_i_n_d_o_w [<_v_a_l>]
  3292.  
  3293. Displays or sets the default receive window size in bytes to be  used  by  TCP
  3294. when creating new connections. Existing connections are unaffected.
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.                                     - 51 -
  3305.  
  3306.  
  3307. _4._1._3._4_0.  _t_e_l_n_e_t <_h_o_s_t_i_d>
  3308.  
  3309. Creates a Telnet session to the specified host and enters converse mode.
  3310.  
  3311. _4._1._3._4_1.  _t_r_a_c_e [<_i_n_t_e_r_f_a_c_e> [<_f_l_a_g_s>]]
  3312.  
  3313. Controls packet tracing by the interface drivers. Specific bits enable tracing
  3314. of  the various interfaces and the amount of information produced.  Tracing is
  3315. controlled on a per-interface basis; without arguments, trace gives a list  of
  3316. all  defined  interfaces and their tracing status.  Output can be limited to a
  3317. single interface by specifying it, and the control  flags  can  be  change  by
  3318. specifying  them as well. The flags are given as a hexadecimal number which is
  3319. interpreted as follows:
  3320.  
  3321.         TIO
  3322.         |||--- Enable tracing of output packets if 1, disable if 0
  3323.         ||---- Enable tracing of input packets if 1, disable if 0
  3324.         |----- Controls type of tracing:
  3325.                 0 - Protocol headers are decoded, but data is not displayed
  3326.                 1 - Protocol headers are decoded, and data (but not the
  3327.                     headers themselves) are displayed as ASCII characters,
  3328.                     64 characters/line. Unprintable characters are displayed
  3329.                     as periods.
  3330.                 2 - Protocol headers are decoded, and the entire packet
  3331.                     (headers AND data) is also displayed in hexadecimal
  3332.                     and ASCII, 16 characters per line.
  3333.  
  3334.  
  3335. _4._1._3._4_2.  _u_d_p _s_t_a_t_u_s
  3336.  
  3337. Displays the status of all UDP receive queues.
  3338.  
  3339. _4._1._3._4_3.  _u_p_l_o_a_d [<_f_i_l_e_n_a_m_e>]
  3340.  
  3341. Opens <filename> and sends it on the current session as though it  were  typed
  3342. on the terminal. Valid only on AX.25 and Telnet sessions.
  3343.  
  3344. _4._1._3._4_4.  ?
  3345.  
  3346. Same as the "help" command.
  3347.  
  3348. _4._1._4.  _F_T_P _S_u_b_c_o_m_m_a_n_d_s
  3349.  
  3350. When in converse mode with an FTP server, everything typed on the  console  is
  3351. first  examined  to  see if it is a locally-known command. If not, the line is
  3352. passed intact to the remote server on the control channel. If it is one of the
  3353. following commands, however, it is executed locally. (Note that this generally
  3354. involves other commands being sent to the remote server on the  control  chan-
  3355. nel.)   When  actively  transferring  a  file,  the only acceptable command is
  3356. "abort"; all other commands will result in an error message.
  3357.  
  3358. _4._1._4._1.  _a_b_o_r_t
  3359.  
  3360. Aborts a get, put or dir operation in progress. When receiving a  file,  abort
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.                                     - 52 -
  3371.  
  3372.  
  3373. simply resets the data connection; the next incoming data packet will generate
  3374. a TCP RST (reset) in response which will clear the remote server.  When  send-
  3375. ing a file, abort sends a premature end-of-file. Note that in both cases abort
  3376. will leave a partial copy of the file on the destination machine,  which  must
  3377. be  removed manually if it is unwanted. Abort is valid only when a transfer is
  3378. in progress.
  3379.  
  3380. _4._1._4._2.  _d_i_r [<_f_i_l_e>|<_d_i_r_e_c_t_o_r_y> [<_l_o_c_a_l _f_i_l_e>]]
  3381.  
  3382. Without arguments, "dir" requests that a full directory listing of the  remote
  3383. server's current directory be sent to the terminal.  If one argument is given,
  3384. this is passed along in the LIST command; this can be a specific file or  sub-
  3385. directory  that  is meaningful to the remote file system. If two arguments are
  3386. given, the second is taken as the local file into which the directory  listing
  3387. should  be  put  (instead  of being sent to the console).  The PORT command is
  3388. used before the LIST command is sent.
  3389.  
  3390. _4._1._4._3.  _g_e_t <_r_e_m_o_t_e _f_i_l_e> [<_l_o_c_a_l _f_i_l_e>]
  3391.  
  3392. Asks the remote server to send the file specified in the first argument.   The
  3393. second  argument, if given, will be the name of the file on the local machine;
  3394. otherwise it will have the same name as on the remote machine.  The  PORT  and
  3395. RETR commands are sent on the control channel.
  3396.  
  3397. _4._1._4._4.  _l_s [<_f_i_l_e>|<_d_i_r_e_c_t_o_r_y> [<_l_o_c_a_l _f_i_l_e>]]
  3398.  
  3399. ls is identical to the "dir" command except that the "NLST" command is sent to
  3400. the  server  instead  of  the  "LIST"  command. This results in an abbreviated
  3401. directory listing, i.e., one showing only the file  names  themselves  without
  3402. any other information.
  3403.  
  3404. _4._1._4._5.  _m_k_d_i_r <_r_e_m_o_t_e _d_i_r_e_c_t_o_r_y>
  3405.  
  3406. Creates a directory on the remote machine.
  3407.  
  3408. _4._1._4._6.  _p_u_t <_l_o_c_a_l _f_i_l_e> [<_r_e_m_o_t_e _f_i_l_e>]
  3409.  
  3410. Asks the remote server to accept data, creating the file named  in  the  first
  3411. argument.  The  second argument, if given, will be the name of the file on the
  3412. remote machine; otherwise it will have the same name as on the local  machine.
  3413. The PORT and STOR commands are sent on the control channel.
  3414.  
  3415. _4._1._4._7.  _r_m_d_i_r <_r_e_m_o_t_e _d_i_r_e_c_t_o_r_y>
  3416.  
  3417. Deletes a directory on the remote machine.
  3418.  
  3419. _4._1._4._8.  _t_y_p_e [_a | _i | _l <_b_y_t_e_s_i_z_e>]
  3420.  
  3421. Tells both the local client and remote server the type of file that is  to  be
  3422. transferred.  The default is 'a', which means ASCII (i.e., a text file).  Type
  3423. 'i' means "image", i.e., binary.  In ASCII mode, files  are  sent  as  varying
  3424. length  lines  of  text  in ASCII separated by cr/lf sequences; in IMAGE mode,
  3425. files are sent exactly as they appear in the file system.  ASCII  mode  should
  3426. be  used whenever transferring text between dissimilar systems (e.g., UNIX and
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.                                     - 53 -
  3437.  
  3438.  
  3439. MS-DOS) because of their different end-of-line and/or end-of-file conventions.
  3440. When exchanging text files between machines of the same type, either mode will
  3441. work but IMAGE mode may be somewhat faster.  Naturally,  when  exchanging  raw
  3442. binary  files (executables, compressed archives, etc) IMAGE mode must be used.
  3443. Type 'l' (logical byte size) is used when exchanging binary files with  remote
  3444. servers  having  oddball  word sizes (e.g., DECSYSTEM-10s and 20s). Locally it
  3445. works exactly like IMAGE, except that it notifies the remote system how  large
  3446. the  byte size is. <bytesize> is typically 8.  The type command sets the local
  3447. transfer mode and generates the TYPE command on the control channel.
  3448.  
  3449. _4._1._5.  _F_T_P _s_e_r_v_e_r _c_o_n_f_i_g_u_r_a_t_i_o_n
  3450.  
  3451. Since MS-DOS was designed as a single-user operating system,  it  provides  no
  3452. access  control;  all files can be read, written or deleted by the local user.
  3453. It is usually undesirable to give such open access to a system to remote  net-
  3454. work  users.  The FTP server therefore provides its own access control mechan-
  3455. ism.
  3456.  
  3457. The file "/ftpusers" is used to control remote FTP access.  The default is  NO
  3458. access;  if  this  file  does  not  exist, the FTP server will be unusable.  A
  3459. remote user must first "log in" to the system with the USER and PASS commands,
  3460. giving  a  valid  name  and password listed in /ftpusers, before he or she can
  3461. transfer files.
  3462.  
  3463. Each entry in /ftpusers consists of a single line of the form
  3464.  
  3465.         username password /path permissions
  3466.  
  3467.  
  3468. There must be exactly four fields, and there must be exactly one space between
  3469. each  field.   Comments  may  be added after the last field. Comment lines are
  3470. begun with "#" in column one.
  3471.  
  3472. a. "username" is the user's login name.
  3473.  
  3474. b.  "password" is the required password.  Note  that  this  is  in  plaintext;
  3475. therefore  it  is  not a good idea to give general read permission to the root
  3476. directory.  A password of "*" (a single asterisk) means that any  password  is
  3477. acceptable.
  3478.  
  3479. c.  "/path" is the allowable prefix on accessible files.  Before any  file  or
  3480. directory  operation,  the current directory and the user- specified file name
  3481. are joined to form an absolute path name in "canonical"  form  (i.e.,  a  full
  3482. path  name  starting  at  the root, with "./" and "../" references, as well as
  3483. redundant /'s, recognized and removed). The result MUST begin with the  allow-
  3484. able  path  prefix;  if  not, the operation is denied.  NB! Under MS-DOS, this
  3485. field must use backslashes ("/"), NOT forward slashes ("/").  This field  must
  3486. always begin with a "/", i.e., at the root directory.
  3487.  
  3488. d.  "permissions" is a decimal number granting permission for read, create and
  3489. write  operations.   If the low order bit (0x1) is set, the user is allowed to
  3490. read a file subject to the path name prefix  restriction.   If  the  next  bit
  3491. (0x2)  is  set,  the  user  is  allowed  to  create  a new file if it does not
  3492. overwrite an existing file.  If the third  bit  (0x4)  is  set,  the  user  is
  3493.  
  3494.  
  3495.  
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.                                     - 54 -
  3503.  
  3504.  
  3505. allowed  to  write a file even if it overwrites an existing file, and in addi-
  3506. tion he may delete files.  Again, all operations are allowed  subject  to  the
  3507. path name prefix restrictions. Permissions may be combined by adding bits, for
  3508. example, 0x3 (= 0x2 + 0x1) means that the user is given read and  create  per-
  3509. mission, but not overwrite/delete permission.
  3510.  
  3511. For example, suppose /ftpusers on machine "pc.ka9q.ampr" contains the line
  3512.  
  3513.         friendly test /testdir 7
  3514.  
  3515.  
  3516. A session using this account would look like this:
  3517.  
  3518.         net> ftp pc.ka9q.ampr
  3519.         SYN Sent
  3520.         Established
  3521.         250 pc.ka9q.ampr FTP version 871225.5 ready at Wed Jan 20 16:27:18 1988
  3522.         user friendly
  3523.         331 Enter PASS command
  3524.         pass test
  3525.         230 Logged in
  3526.  
  3527.  
  3528. The user now has read, write, overwrite and delete  privileges  for  any  file
  3529. under /testdir; he may not access any other files.
  3530.  
  3531. Here are some more sample entries in /ftpusers:
  3532.  
  3533.  
  3534.         karn foobar / 7         # User "karn" with password "foobar" may read,
  3535.                                 # write, overwrite and delete any file on the
  3536.                                 # system.
  3537.  
  3538.         guest bletch /g/bogus 3 # User "guest" with password "bletch" may read
  3539.                                 # any file under /g/bogus and its subdirectories,
  3540.                                 # and may create a new file as long as it does
  3541.                                 # not overwrite an existing file. He may NOT
  3542.                                 # delete any files.
  3543.  
  3544.         anonymous * /public 1   # User "anonymous" (any password) may read files
  3545.                                 # under /public and its subdirectories; he may
  3546.                                 # not create, overwrite or delete any files.
  3547.  
  3548.  
  3549. I recommend this last entry as a standard convention for keeping a  repository
  3550. of  downloadable  files;  in  particular, the username "anonymous" is an esta-
  3551. blished ARPA convention.
  3552.  
  3553. _4._2.  _T_h_e _B_M._E_X_E _M_a_i_l _U_s_e_r _I_n_t_e_r_f_a_c_e _P_r_o_g_r_a_m
  3554.  
  3555. Many thanks to Gerard PA0GRI who is primarily responsible for the addition  of
  3556. features  to  version  2,  and  to Dave Trulli NN2Z who is responsible for the
  3557. changes and additions making up version 3.
  3558.  
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.                                     - 55 -
  3569.  
  3570.  
  3571. _4._2._1.  _C_o_n_f_i_g_u_r_i_n_g _t_h_e _S_M_T_P _E_n_v_i_r_o_n_m_e_n_t
  3572.  
  3573. As supplied, the SMTP server and client make assumptions about the disk  space
  3574. available to them.  In particular, the file handling portion of the client and
  3575. server will need to be modified heavily if used on any operating system  other
  3576. than PC-Dos or MS-Dos.  Sorry.
  3577.  
  3578. To achieve minimum functionality, you should  create  directories  /spool/mail
  3579. and  /spool/mqueue  on  the default disk used when running net.exe... the mail
  3580. directory is used by the server for storing incoming mail, the  mqueue  direc-
  3581. tory  is  where  the  client  looks  to find outbound messages that need to be
  3582. delivered.
  3583.  
  3584. There is one command in net.exe that relates to the SMTP client operation.  It
  3585. is  'smtp'.   Issuing this command will cause the client to attempt to deliver
  3586. mail immediately.  Normally, the client will fire up 15mins after the  end  of
  3587. the previous invocation to try and process outbound mail.  The smtp command is
  3588. primarily a debugging tool, and should be used as such.
  3589.  
  3590. _4._2._1._1.  _F_i_l_e _F_o_r_m_a_t_s
  3591.  
  3592. Incoming mail for users on the current host gets placed in 'mailbox' files  in
  3593. the  /spool/mail  directory.   The  name of the file is based on the user name
  3594. given by the sending SMTP agent.  These are simple text files, with  new  mes-
  3595. sages  appended to the end.  If a mailbox file does not exist, the server will
  3596. create it automagically.  Messages in the files are in RFC822 format, with new
  3597. messages  appended  to  the  end.   The first line of each message will always
  3598. start with the token 'Received:', quotes not included.  This line is added  by
  3599. the  server  to  indicate  the date and time the message was received, and the
  3600. host it was received from.
  3601.  
  3602. Outgoing mail messages consist of two files each in the  /spool/mqueue  direc-
  3603. tory.   The  names  of  the  two  files  will be of the form <integer>.WRK and
  3604. <integer>.TXT, where integer is the sequence number of the message relative to
  3605. this  machine.   The  file  sequence.seq  in the mqueue directory contains the
  3606. current sequence number for reference by the mail user  interface.   The  .TXT
  3607. file contains the data portion of the SMTP transaction, in full RFC822 format.
  3608. The .WRK file consists of 3 lines, as follows:
  3609.  
  3610. o+    the hostname of the destination system
  3611.  
  3612. o+    the full sender address, in user@host format.
  3613.  
  3614. o+    the full destination address, in user@host format.
  3615.  
  3616. The mailer does not yet support multiple recipients; when it  does,  the  .wrk
  3617. file  format  will contain extra destination address lines, one for each addi-
  3618. tional recipient.
  3619.  
  3620. _4._2._1._2.  _B_u_g_s _a_n_d _L_i_m_i_t_a_t_i_o_n_s:
  3621.  
  3622. The SMTP server does not allow forwarding.  In a perfect world, forwarding  is
  3623. a  crock.   Since  we do not live in a perfect world, some specialized forward
  3624. capability will probably be added eventually... though we'd like to avoid  it!
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.                                     - 56 -
  3635.  
  3636.  
  3637. Better  to  just  put  a  bsd4.X system on the air and let Sendmail handle the
  3638. grody work!  :-)
  3639.  
  3640. The SMTP client only understands a single destination address in the TO  line.
  3641. This  is  a  legal minimal implementation of the standard, but will eventually
  3642. change.  Note that the format of the .WRK file will change when this does,  of
  3643. necessity.
  3644.  
  3645. Error returns from the remote server are not properly handled. The mailer will
  3646. keep  trying  to  deliver  the  mail  each time the smtp command is issued (or
  3647. invoked automatically by the timer).  There is as yet no mechanism for "bounc-
  3648. ing" mail back to the sender when it cannot be sent.
  3649.  
  3650. The smtp client (mail sender) code in net.exe now tries to connect to all des-
  3651. tination  hosts  simultaneously.  If  there  is  a lot of mail in the outbound
  3652. queue, this may cause problems. In particular, try using the FILES=  parameter
  3653. in the MS-DOS config.sys file to allow net.exe to have more than the default 8
  3654. files open at once.
  3655.  
  3656. _4._2._1._3.  _F_o_r _M_o_r_e _I_n_f_o_r_m_a_t_i_o_n
  3657.  
  3658. The SMTP specification is RFC821.  The Format for text messages (including the
  3659. headers) is in RFC822.  RFC819 discusses hostname naming conventions, particu-
  3660. larly domain naming.
  3661.  
  3662. _4._2._2.  _B_M _S_e_t_u_p
  3663.  
  3664. In order to make use of BM, you must first follow  the  installation  instruc-
  3665. tions in the file SMTP.DOC to provide minimal SMTP support.  Then, you should:
  3666.  
  3667. o+    copy the files BM.RC and HOSTS.NET to the root directory of  the  default
  3668.      drive used when NET.EXE is running.
  3669.  
  3670. o+    edit HOSTS.NET to reflect the hosts you will  exchange  mail  with.   the
  3671.      format of each line of this file is:
  3672.  
  3673.              IP_address <tab> hostname <newline>
  3674.  
  3675.      The IP address should be of the form 0.0.0.0, and the hostname can be any
  3676.      token you wish to use to represent that host.  In particular, it does NOT
  3677.      need to be the full legal name of the host.
  3678.  
  3679. o+    edit the file /BM.RC to correctly identify your hostname,  username,  and
  3680.      the IP address of the system you wish to punt mail to when you don't know
  3681.      the correct IP address.  The format lines in this file is:
  3682.  
  3683.              token <space> value <newline>
  3684.  
  3685.      where the currently defined tokens are 'host' for this system's hostname,
  3686.      'user'  for  your  username, and 'gate' for the ip address of the nearest
  3687.      'smart mailer'.  More on this below.  Additional tokens exist for setting
  3688.      your local timezone, and mailbox directory, and editor to be used in mes-
  3689.      sage creation.
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.                                     - 57 -
  3701.  
  3702.  
  3703. _4._2._3.  _O_p_e_r_a_t_i_o_n
  3704.  
  3705. BM is designed to serve as the mail  user-interface  for  users  of  the  KA9Q
  3706. internetworking  software package.  The purpose of BM is to provide a full set
  3707. of electronic mail services to the  user.   These  include  sending  messages,
  3708. listing and reading received messages, and so forth.
  3709.  
  3710. BM reads mailbox files created by the SMTP server in NET.EXE, which are stored
  3711. in  a  directory  (usually  /spool/mail)  that is specified in the config file
  3712. /bm.rc.  Incoming mail is stored by the server in mailbox files, one per user-
  3713. name.   These  mailbox  files  may  also  be  referred to as "notefiles".  The
  3714. default mailbox to read is specified with the  'user'  option  in  the  /bm.rc
  3715. file.  This username is also used on all outgoing messages.
  3716.  
  3717. The /bm.rc file also defines a timezone stamp, which in conjunction  with  the
  3718. DOS date and time is used to provide the required RFC822 Date: header.
  3719.  
  3720. Commands are generally one character long and followed by a space, and parame-
  3721. ter if needed:
  3722.  
  3723. s  Send a message.  The user is prompted for a destination  address  and  sub-
  3724.    ject.   BM then creates appropriate RFC822 headers in a temporary file, and
  3725.    either invokes the user's favorite editor (specified with the 'edit' param-
  3726.    eter  in  /bm.rc)  to  enter the message text, or uses a simple/stupid text
  3727.    entry routine if no editor is defined.  Note that if you are using an  edi-
  3728.    tor,  you  should start by jumping to the end of the file.  RFC822 requires
  3729.    that the headers be first and be separated from the text of a message by at
  3730.    least one blank line.
  3731.  
  3732.    In this release, Phil KA9Q has modified BM slightly to  be  more  like  the
  3733.    Berkeley  Unix  mail program.  When the message entry routine first starts,
  3734.    you will be in the silly text editor.  If you want to use  your  editor  on
  3735.    the  message, type '~e<ret>'... not obvious to most folks, but very obvious
  3736.    to 4bsd fans... [sigh].
  3737.  
  3738. t  Transmits an already  created  file  as  a  message.   RFC822  headers  are
  3739.    prepended.   This is useful if you don't have an editor that will work with
  3740.    the 's' command.
  3741.  
  3742.    *** NOTE ***  RFC822 only allows 7bit data.  If you want to send a
  3743.                  binary file, use BSQ, or UUENCODE, or something similar
  3744.             to convert  it  to  a  text  file  first!   Better  yet,  use
  3745.    FTP...
  3746.  
  3747. r  Read all messages in the current notefile.
  3748.  
  3749. u  Updates you with new messages in  the  notefile,  shows  them  to  you  and
  3750.    updates  the  read  marker to the last one read.  If no new mes- sages came
  3751.    in, you will be notified.
  3752.  
  3753. f  Forward a message to someone else.  A temporary copy is made of the message
  3754.    specified and that is handed over to the send message routine, which treats
  3755.    it as a file ala the 't' command.
  3756.  
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.                                     - 58 -
  3767.  
  3768.  
  3769. d  Delete a message.  Parameter is the message number.  If the number  of  the
  3770.    to  be  deleted  message  is  higher than the last read message an "are you
  3771.    sure" message is printed. 'Y' or 'y' will delete it...
  3772.  
  3773. h  Displays message headers, a message number, received date,  from  whom  and
  3774.    the  subject fields on an single line.  An star is put in front of the last
  3775.    read message.
  3776.  
  3777. p   Sets the printer on or off so messages  to  the  screen  also  go  to  the
  3778.    printer.  ** This will be implemented in a future release. **
  3779.  
  3780. l  Lists the file names of messages waiting to be sent that are in  the  queue
  3781.    directory, usually /spool/mqueue.  Primarily useful for debugging.
  3782.  
  3783. n  Shows the notefiles in the mail directory, the location of which is  speci-
  3784.    fied  by  the 'smtp' parameter in the /bm.rc file.  If this command is fol-
  3785.    lowed with a parameter, the current notefile will be changed to the  speci-
  3786.    fied  notefile.  If it does not exist you will be notified if you try some-
  3787.    thing with it.
  3788.  
  3789. #  Substitute # with a number (1..whatever) and it will show you  the  message
  3790.    in  the current active notefile with that number. If the message is the one
  3791.    next to the last read one the * will be moved.
  3792.  
  3793. ?  Prints a short command summary to the screen.
  3794.  
  3795. q  Quit.
  3796.  
  3797. The program's prompt will always show the current notefile name.
  3798.  
  3799. _4._2._4.  _A_d_d_i_t_i_o_n_a_l _I_n_f_o_r_m_a_t_i_o_n
  3800.  
  3801. BM will prompt you for a To: address.  This should be in the  form  user@host,
  3802. where  user  will be the name of the mailbox file on the destination KA9Q sys-
  3803. tem, or the username of the intended recipient on other SMTP-equipped systems.
  3804. The host field should exactly match a host token in the HOSTS.NET file.  If it
  3805. does not, the SMTP client in NET.EXE will insert the IP address of the nearest
  3806. "smart  mail  agent"  in  the  work file instead of the destination IP address
  3807. (since it is unknown).  The rationale behind this is that many  SMTP  equipped
  3808. systems include the ability to forward mail that is not addressed to them.  If
  3809. you have a system of this type nearby, you may be able to "punt" mail to  them
  3810. for handling.
  3811.  
  3812. Note that if there is such a smart mailer  on  a  system  near  you,  you  can
  3813. replace  the simple 'user' field with a full address that the smart mailer can
  3814. understand, since BM will scan from the  right  taking  everything  after  the
  3815. rightmost  '@'  to  be  the  host token, and will not mangle the address.  For
  3816. example, from my PC clone I can easily mail to:
  3817.  
  3818.         bellcore!karn@winfree            (to get to Phil, KA9Q)
  3819.  
  3820.  
  3821. where winfree is my Unix system, which talks to system bellcore via UUCP.   BM
  3822. really  doesn't  care what you put for an address as long as there is a system
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.                                     - 59 -
  3833.  
  3834.  
  3835. within range that it can punt to when it doesn't  understand  what  you  mean.
  3836. Note that this implies you should be extra careful when typing addresses!
  3837.  
  3838. Read the SMTP.DOC file for specification of the queue and mailbox  files,  and
  3839. limitations of the SMTP client that affect BM's capabilities.
  3840.  
  3841. _5.  _A_p_p_e_n_d_i_c_e_s
  3842.  
  3843. _5._1.  _T_e_c_h_n_i_c_a_l _I_n_f_o_r_m_a_t_i_o_n _f_o_r _C_l_i_e_n_t/_S_e_r_v_e_r _D_e_v_e_l_o_p_e_r_s
  3844.  
  3845. This section describes the "guts" of the Internet package for the  benefit  of
  3846. programmers  who  wish  to  write their own applications, or adapt the code to
  3847. different hardware environments.
  3848.  
  3849. The code as distributed includes both the functions of an IP packet switch and
  3850. an  end-host  system,  including several servers. The implementation is highly
  3851. modular, however. For example, if one wants to build a dedicated packet switch
  3852. without  any  local applications, the various applications and the TCP and UDP
  3853. modules may easily be omitted to save space.
  3854.  
  3855. The package allows multiple simultaneous applications, each supporting  multi-
  3856. ple  simultaneous  users,  each using TCP and/or UDP. The only limit is memory
  3857. space, which is getting quite tight on the 820; the C compiler for the IBM  PC
  3858. seems  to  generate  much more compact code (typically 1/2 as large as for the
  3859. Z-80) so the PC seems more promising as a large-scale server.
  3860.  
  3861. _5._1._1.  _D_a_t_a _S_t_r_u_c_t_u_r_e_s
  3862.  
  3863. To increase portability, the pseudo-types "int16" and "int32" are used to mean
  3864. an  unsigned  16-bit integer and a signed 32-bit integer, respectively.  Ordi-
  3865. narily these types are defined in machdep.h to be "unsigned int" and "long".
  3866.  
  3867. The various modules pass data in chained structures  called  mbufs,  with  the
  3868. following format:
  3869.  
  3870. struct mbuf {
  3871.         struct mbuf *next;      /* Links mbufs belonging to single packets */
  3872.         struct mbuf *anext;     /* Links packets on queues */
  3873.         char *data;             /* Pointer to start of actual data in buffer */
  3874.         int16 cnt;              /* Length of data in buffer */
  3875. };
  3876.  
  3877.  
  3878. Although somewhat cumbersome to work with, mbufs make  it  possible  to  avoid
  3879. memory-to-memory copies that limit performance. For example, when user data is
  3880. transmitted it must first traverse several protocol layers before reaching the
  3881. transmitter hardware. With mbufs, each layer adds its protocol header by allo-
  3882. cating an mbuf and linking it to the head of the mbuf "chain" given it by  the
  3883. higher layer, thus avoiding several copy operations.
  3884.  
  3885. A number of primitives operating on mbufs are available in mbuf.c.   The  user
  3886. may  create,  fill,  empty  and  free  mbufs  himself  with the alloc_mbuf and
  3887. free_mbuf primitives, or at the cost of a single memory-to-memory copy  he  he
  3888. may use the more convenient qdata() and dqdata() primitives.
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.                                     - 60 -
  3899.  
  3900.  
  3901. _5._1._2.  _T_i_m_e_r _S_e_r_v_i_c_e_s
  3902.  
  3903. TCP and IP require timers. A timer package  is  included,  so  the  user  must
  3904. arrange to call the single entry point "tick" on a regular basis. The constant
  3905. MSPTICK in timer.h should be defined as the interval  between  ticks  in  mil-
  3906. liseconds. One second resolution is adequate. Since it can trigger a consider-
  3907. able amount of activity, including upcalls to user level, "tick" should not be
  3908. called  from  an  interrupt handler. A clock interrupt should set a flag which
  3909. will then cause "tick" to be called at user level.
  3910.  
  3911. _5._1._3.  _I_n_t_e_r_n_e_t _T_y_p_e-_o_f-_S_e_r_v_i_c_e
  3912.  
  3913. One of the features of the Internet  is  the  ability  to  specify  precedence
  3914. (i.e.,  priority)  on  a per-datagram basis. There are 8 levels of precedence,
  3915. with the bottom 6 defined by the DoD as Routine, Priority,  Immediate,  Flash,
  3916. Flash  Override  and  CRITICAL.  (Two  more are available for internal network
  3917. functions). For amateur use we can use the lower  four  as  Routine,  Welfare,
  3918. Priority  and  Emergency. Three more bits specify class of service, indicating
  3919. that especially high reliability, high throughput or low delay is  needed  for
  3920. this connection. Constants for this field are defined in internet.h.
  3921.  
  3922. _5._1._4.  _T_h_e _I_n_t_e_r_n_e_t _P_r_o_t_o_c_o_l _I_m_p_l_e_m_e_n_t_a_t_i_o_n
  3923.  
  3924. While the user does not ordinarily see this level directly,  it  is  described
  3925. here  for sake of completeness. Readers interested only in the interfaces seen
  3926. by the applications programmer should skip to the TCP and UDP sections.
  3927.  
  3928. The IP implementation consists of three major functions: ip_route, ip_send and
  3929. ip_recv.
  3930.  
  3931. _5._1._5.  _I_P _G_a_t_e_w_a_y (_P_a_c_k_e_t _R_o_u_t_e_r) _S_u_p_p_o_r_t
  3932.  
  3933. The first, ip_route, is the IP packet switch. It takes a  single  argument,  a
  3934. pointer to the mbuf containing the IP datagram:
  3935.  
  3936.         void
  3937.         ip_route(bp,rxbroadcast)
  3938.         struct mbuf *bp;        /* Datagram pointer */
  3939.         int rxbroadcast;        /* Don't forward */
  3940.  
  3941.  
  3942. All IP datagrams, coming or going, pass through this  function.  After  option
  3943. processing,  if  any,  the  datagram's destination address is extracted. If it
  3944. corresponds to the local host, it is "kicked upstairs" to the upper half of IP
  3945. and  thence to the appropriate protocol module. Otherwise, an internal routing
  3946. table consulted to determine where the  datagram  should  be  forwarded.   The
  3947. routing  table  uses  hashing  keyed on IP destination addresses, called "tar-
  3948. gets". If the target address is not  found,  a  special  "default"  entry,  if
  3949. available,  is used. If a default entry is not available either, an ICMP "Des-
  3950. tination Unreachable" message containing the offending IP header  is  returned
  3951. to the sender.
  3952.  
  3953. The "rxbroadcast" flag is used to prevent forwarding of broadcast  packets,  a
  3954. practice which might otherwise result in spectacular routing loops. Any subnet
  3955.  
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.                                     - 61 -
  3965.  
  3966.  
  3967. interface driver receiving a packet addressed to the broadcast address  within
  3968. that  subnet  MUST  set  this flag.  All other packets (including locally ori-
  3969. ginated packets) should have "rxbroadcast" set to zero.
  3970.  
  3971. ip_route ignores the IP destination address in broadcast packets, passing them
  3972. up  to the appropriate higher level protocol which is also made aware of their
  3973. broadcast nature. (TCP and ICMP ignore them; only UDP can accept them).
  3974.  
  3975. Entries are added to the IP routing table with the rt_add function:
  3976.  
  3977. int
  3978. rt_add(target,gateway,metric,interface)
  3979. int32 target;                   /* IP address of target */
  3980. int32 gateway;                  /* IP addr of gateway to reach this target */
  3981. int metric;                     /* "cost" metric, for routing decisions */
  3982. struct interface *interface;    /* device interface structure */
  3983.  
  3984.  
  3985. "target" is the IP address of the destination; it becomes the hash  index  key
  3986. for subsequent packet destination address lookups. If target == 0, the default
  3987. entry is modified. "metric" is simply stored in the table; it is available for
  3988. routing  cost  calculations  when  an  automatic  routing protocol is written.
  3989. "interface" is the address of a control structure for the particular device to
  3990. which  the  datagram  should  be sent; it is defined in the section "IP Inter-
  3991. faces".
  3992.  
  3993. rt_add returns 0 on success, -1 on failure (e.g., out of memory).
  3994.  
  3995. To remove an entry from the routing table, only the  target  address  need  be
  3996. specified to the rt_drop call:
  3997.  
  3998.         int
  3999.         rt_drop(target)
  4000.         int32 target;
  4001.  
  4002.  
  4003. rt_drop returns 0 on success, -1 if the target could not be found.
  4004.  
  4005. _5._1._6.  _I_P _I_n_t_e_r_f_a_c_e_s
  4006.  
  4007. Every lower level interface used to transmit IP datagrams must have an "inter-
  4008. face" structure, defined as follows:
  4009.  
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.                                     - 62 -
  4031.  
  4032.  
  4033.  
  4034. /* Interface control structure */
  4035. struct interface {
  4036.         struct interface *next; /* Linked list pointer */
  4037.         char *name;             /* Ascii string with interface name */
  4038.         int16 mtu;              /* Maximum transmission unit size */
  4039.         int (*send)();          /* Routine to call to send datagram */
  4040.         int (*output)();        /* Routine to call to send raw packet */
  4041.         int (*recv)();          /* Routine to kick to process input */
  4042.         int (*stop)();          /* Routine to call before detaching */
  4043.         int16 dev;              /* Subdevice number to pass to send */
  4044.         int16 flags;            /* State of interface */
  4045. #define IF_ACTIVE       0x01
  4046. #define IF_BROADCAST    0x04    /* Interface is capable of broadcasting */
  4047. };
  4048.  
  4049.  
  4050. Part of the interface structure is for the private use of the  device  driver.
  4051. "dev"  is  used to distinguish between one of several identical devices (e.g.,
  4052. serial links or radio channels) that might share the same send routine.
  4053.  
  4054. A pointer to this structure kept in the  routing  table.  Two  fields  in  the
  4055. interface  structure  are  examined by ip_route: "mtu" and "send". The maximum
  4056. transmission unit size represents the largest datagram that  this  device  can
  4057. handle; ip_route will do IP-level fragmentation as required to meet this limit
  4058. before calling "send", the function to  queue  datagrams  on  this  interface.
  4059. "send" is called as follows:
  4060.  
  4061. (*send)(bp,interface,gateway,precedence,delay,throughput,reliability)
  4062. struct mbuf *bp;                /* Pointer to datagram */
  4063. struct interface *interface;    /* Interface structure */
  4064. int32 gateway;                  /* IP address of gateway */
  4065. char precedence;                /* TOS bits from IP header */
  4066. char delay;
  4067. char throughput;
  4068. char reliability;
  4069.  
  4070.  
  4071. The "interface" and "gateway" arguments are kept  in  the  routing  table  and
  4072. passed on each call to the send routine. The interface pointer is passed again
  4073. because several interfaces might share the same output driver  (e.g.,  several
  4074. identical  physical channels).  "gateway" is the IP address of the neighboring
  4075. IP gateway on the other end of the link; if a link-level address is  required,
  4076. the  send  routine  must  map  this address either dynamically (e.g., with the
  4077. Address Resolution Protocol, ARP) or with a static lookup table.  If the  link
  4078. is  point-to-point, link-level addresses are unnecessary, and the send routine
  4079. can therefore ignore the gateway address.
  4080.  
  4081. The Internet Type-of-Service (TOS) bits are passed to the interface driver  as
  4082. separate arguments. If tradeoffs exist within the subnet between these various
  4083. classes of service, the driver may use these arguments to control them  (e.g.,
  4084. optional use of link level acknowledgments, priority queuing, etc.)
  4085.  
  4086. It is expected that the send routine will put a link level header on the front
  4087.  
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.                                     - 63 -
  4097.  
  4098.  
  4099. of  the  packet, add it an internal output queue, start output (if not already
  4100. active) and return. It must NOT busy-wait for completion (unless it is a  very
  4101. fast device, e.g., Ethernet) since that blocks the entire system.
  4102.  
  4103. Any interface that uses ARP must also provide an "output"  routine.  It  is  a
  4104. lower  level  entry  point that allows the caller to specify the fields in the
  4105. link header. ARP uses it to broadcast a request for a given IP address. It may
  4106. be  the  same  routine used internally by the driver to send IP datagrams once
  4107. the link level fields have been determined. It is called as follows:
  4108.  
  4109. (*output)(interface,dest,src,type,bp)
  4110. struct interface *interface;    /* Pointer to interface structure */
  4111. char dest[];                    /* Link level destination address */
  4112. char src[];                     /* Link level source address */
  4113. int16 type;                     /* Protocol type field for link level */
  4114. struct mbuf *bp;                /* Data field (IP datagram) */
  4115.  
  4116.  
  4117. _5._1._7.  _I_P _H_o_s_t _S_u_p_p_o_r_t
  4118.  
  4119. All of the modules described thus far are required in  all  systems.  However,
  4120. the  routines  that  follow  are  necessary  only  if the system is to support
  4121. higher-level applications. In a stand alone IP gateway (packet switch) without
  4122. servers  or clients, the following modules (IP user level, TCP and UDP) may be
  4123. omitted to allow additional space for buffering; define the flag  GWONLY  when
  4124. compiling iproute.c to avoid referencing the user level half of IP.
  4125.  
  4126. The following function is called by iproute() whenever a datagram arrives that
  4127. is addressed to the local system.
  4128.  
  4129. void
  4130. ip_recv(bp,rxbroadcast)
  4131. struct mbuf *bp;                /* Datagram */
  4132. char rxbroadcast;               /* Incoming broadcast */
  4133.  
  4134.  
  4135. ip_recv reassembles IP datagram fragments, if necessary, and calls  the  input
  4136. function  of  the  next  layer  protocol (e.g., tcp_input, udp_input) with the
  4137. appropriate arguments, as follows:
  4138.  
  4139. (*protrecv)(bp,protocol,source,dest,tos,length,rxbroadcast);
  4140. struct mbuf *bp;        /* Pointer to packet minus IP header */
  4141. char protocol;          /* IP protocol ID */
  4142. int32 source;           /* IP address of sender */
  4143. int32 dest;             /* IP address of destination (i.e,. us) */
  4144. char tos;               /* IP type-of-service field in datagram */
  4145. int16 length;           /* Length of datagram minus IP header */
  4146. char rxbroadcast;       /* Incoming broadcast */
  4147.  
  4148.  
  4149. The list of protocols is contained in a  switch()  statement  in  the  ip_recv
  4150. function. If the protocol is unsupported, an ICMP Protocol Unreachable message
  4151. is returned to the sender unless the packet came in as a broadcast.
  4152.  
  4153.  
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.                                     - 64 -
  4163.  
  4164.  
  4165. Higher level protocols such as TCP and UDP use the ip_send routine to generate
  4166. IP datagrams. The arguments to ip_send correspond directly to fields in the IP
  4167. header, which is generated and put in front of the user's  data  before  being
  4168. handed to ip_route:
  4169.  
  4170. ip_send(source,dest,protocol,tos,ttl,bp,length,id,df)
  4171. int32 source;           /* source address */
  4172. int32 dest;             /* Destination address */
  4173. char protocol;          /* Protocol */
  4174. char tos;               /* Type of service */
  4175. char ttl;               /* Time-to-live */
  4176. struct mbuf *bp;        /* Data portion of datagram */
  4177. int16 length;           /* Optional length of data portion */
  4178. int16 id;               /* Optional identification */
  4179. char df;                /* Don't-fragment flag */
  4180.  
  4181.  
  4182. This interface is modeled very closely after the example given on page  32  of
  4183. RFC-791.  Zeros  may be passed for id or ttl, and system defaults will be pro-
  4184. vided. If zero is passed for length, it will be calculated automatically.
  4185.  
  4186. _5._1._8.  _T_h_e _T_r_a_n_s_m_i_s_s_i_o_n _C_o_n_t_r_o_l _P_r_o_t_o_c_o_l (_T_C_P)
  4187.  
  4188. A TCP connection is uniquely identified by  the  concatenation  of  local  and
  4189. remote  "sockets".  In  turn,  a  socket  consists of a host address (a 32-bit
  4190. integer) and a TCP port (a 16-bit integer), defined by the C structure
  4191.  
  4192. struct socket {
  4193.         long address;   /* 32-bit IP address */
  4194.         short port;     /*16-bit TCP port */
  4195. };
  4196.  
  4197.  
  4198. It is therefore possible to have several simultaneous but distinct connections
  4199. to  the  same  port on a given machine, as long as the remote sockets are dis-
  4200. tinct. Port numbers are assigned either through mutual agreement, or more com-
  4201. monly  when  a  "standard" service is involved, as a "well known port" number.
  4202. For example,  to  obtain  standard  remote  login  service  using  the  TELNET
  4203. presentation-layer  protocol,  by  convention you initiate a connection to TCP
  4204. port 23; to send mail using the Simple Mail Transfer Protocol (SMTP) you  con-
  4205. nect  to  port 25. ARPA maintains port number lists and periodically publishes
  4206. them; the latest revision is RFC-960,  "Assigned  Numbers".   They  will  also
  4207. assign  port  numbers  to  a new application on request if it appears to be of
  4208. general interest.
  4209.  
  4210. TCP connections are best modeled as a pair  of  one-way  paths  (one  in  each
  4211. direction) rather than single full-duplex paths. A TCP "close" really means "I
  4212. have no more data to send". Station A may close its path to station B  leaving
  4213. the  reverse  path  from  B  to A unaffected; B may continue to send data to A
  4214. indefinitely until it too closes its half of the  connection.   Even  after  a
  4215. user initiates a close, TCP continues to retransmit any unacknowledged data if
  4216. necessary to ensure that it reaches the other end. This is known as  "graceful
  4217. close" and greatly simplifies certain applications such as FTP.
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.                                     - 65 -
  4229.  
  4230.  
  4231. This package is written as a "module" intended to be compiled and linked  with
  4232. the application(s) so that they can be run as one program on the same machine.
  4233. This greatly simplifies the user/TCP interface, which becomes just  a  set  of
  4234. internal  subroutine  calls on a single machine. The internal TCP state (e.g.,
  4235. the address  of  the  remote  station)  is  easily  accessed.  Reliability  is
  4236. improved,  since  any  hardware  failure  that  kills TCP will likely take its
  4237. applications with it anyway. Only IP datagrams flow out of the machine  across
  4238. hardware  interfaces  (such  as asynch RS-232 ports or whatever else is avail-
  4239. able) so hardware flow control or  complicated  host/front-end  protocols  are
  4240. unnecessary.
  4241.  
  4242. The TCP supports five basic operations on a  connection:  open_tcp,  send_tcp,
  4243. receive_tcp, close_tcp and del_tcp. A sixth, state_tcp, is provided mainly for
  4244. debugging. Since this TCP module cannot assume the presence of a  sleep/wakeup
  4245. facility from the underlying operating system, functions that would ordinarily
  4246. block (e.g., recv_tcp when no data is available) instead set net_error to  the
  4247. constant  EWOULDBLK  and  immediately return -1.  Asynchronous notification of
  4248. events such as data arrival  can  be  obtained  through  the  upcall  facility
  4249. described earlier.
  4250.  
  4251. Each TCP function is summarized in the following section  in  the  form  of  C
  4252. declarations and descriptions of each argument.
  4253.  
  4254. int net_error;
  4255.  
  4256.  
  4257. This global variable stores the specific cause of an error from one of the TCP
  4258. or UDP functions. All functions returning integers (i.e., all except open_tcp)
  4259. return -1 in the event of an error, and net_error should be examined to deter-
  4260. mine  the  cause.  The  possible errors are defined as constants in the header
  4261. file netuser.h.
  4262.  
  4263. /* Open a TCP connection */
  4264. struct tcb *
  4265. open_tcp(lsocket,fsocket,mode,window,r_upcall,t_upcall,s_upcall,tos,user)
  4266. struct socket *lsocket; /* Local socket */
  4267. struct socket *fsocket; /* Remote socket */
  4268. int mode;               /* Active/passive/server */
  4269. int16 window;           /* Receive window (and send buffer) sizes */
  4270. void (*r_upcall)();     /* Function to call when data arrives */
  4271. void (*t_upcall)();     /* Function to call when ok to send more data */
  4272. void (*s_upcall)();     /* Function to call when connection state changes */
  4273. char tos;               /* Internet Type-of-Service */
  4274. int *user;              /* Pointer for convenience of user */
  4275.  
  4276.  
  4277. "lsocket" and "fsocket" are pointers to the local and foreign sockets, respec-
  4278. tively.
  4279.  
  4280. "mode" may take on three  values,  all  defined  in  net.user.h.  If  mode  is
  4281. TCP_PASSIVE, no packets are sent, but a TCP control block is created that will
  4282. accept a subsequent active open from another TCP. If a specific foreign socket
  4283. is  passed  to  a  passive  open, then connect requests from any other foreign
  4284. socket will be rejected. If the foreign socket fields are set to zero,  or  if
  4285.  
  4286.  
  4287.  
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.                                     - 66 -
  4295.  
  4296.  
  4297. fsocket  is  NULLSOCK,  then  connect requests from any foreign socket will be
  4298. accepted.  If mode is TCP_ACTIVE, TCP will initiate a connection to  a  remote
  4299. socket  that must already have been created in the LISTEN state by its client.
  4300. The foreign socket must be completely specified in an active open.  When  mode
  4301. is TCP_SERVER, open_tcp behaves as though TCP_PASSIVE was given except that an
  4302. internal "clone" flag is set. When a connection request comes in, a fresh copy
  4303. of  the  TCP  control  block  is created and the original is left intact. This
  4304. allows multiple sessions to exist simultaneously;  if  TCP_PASSIVE  were  used
  4305. instead only the first connect request would be accepted.
  4306.  
  4307. "r_upcall", "t_upcall" and  "s_upcall"  provide  optional  upcall  or  pseudo-
  4308. interrupt  mechanisms  useful  when running in a non operating system environ-
  4309. ment.  Each of the three arguments, if non-NULL, is taken as the address of  a
  4310. user-supplied function to call when receive data arrives, transmit queue space
  4311. becomes available, or the connection state changes. The  three  functions  are
  4312. called with the following arguments:
  4313.  
  4314. (*r_upcall)(tcb,count); /* count == number of bytes in receive queue */
  4315. (*t_upcall)(tcb,avail); /* avail == space available in send queue */
  4316. (*s_upcall)(tcb,oldstate,newstate);
  4317.  
  4318.  
  4319.      Note: whenever a single event invokes more than one upcall the order
  4320.      in  which  the upcalls are made is not strictly defined. In general,
  4321.      though, the Principle of Least Astonishment is followed.  E.g., when
  4322.      entering  the  ESTABLISHED state, the state change upcall is invoked
  4323.      first, followed by the transmit upcall.  When  an  incoming  segment
  4324.      contains  both  data  and  FIN, the receive upcall is invoked first,
  4325.      followed by the state change to CLOSE_WAIT state.  In this case, the
  4326.      user may interpret this state change as a "end of file" indicator.
  4327.  
  4328. "tos" is the Internet type-of-service field. This parameter is passed along to
  4329. IP  and is included in every datagram. The actual precedence value used is the
  4330. higher of the two specified in the corresponding pair of open_tcp calls.
  4331.  
  4332. open_tcp returns a pointer to an internal Transmission  Control  Block  (tcb).
  4333. This "magic cookie" must be passed back as the first argument to all other TCP
  4334. calls. In event of error, the NULL pointer (0) is returned  and  net_error  is
  4335. set to the reason for the error.
  4336.  
  4337. The only limit on the number of TCBs that may exist at  any  time  (i.e.,  the
  4338. number  of  simultaneous  connections)  is  the  amount  of free memory on the
  4339. machine. Each TCB on a 16-bit processor currently takes up  111  bytes;  addi-
  4340. tional  memory  is consumed and freed dynamically as needed to buffer send and
  4341. receive data. Deleting a TCB (see the del_tcp() call) reclaims its space.
  4342.  
  4343. /* Send data on a TCP connection */
  4344. int
  4345. send_tcp(tcb,bp)
  4346. struct tcb *tcb;        /* TCB pointer */
  4347. struct mbuf *bp;        /* Pointer to user's data mbufs */
  4348.  
  4349.  
  4350. "tcb" is the pointer returned by the  open_tcp()  call.  "bp"  points  to  the
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.                                     - 67 -
  4361.  
  4362.  
  4363. user's  mbuf  with  data  to be sent. After being passed to send_tcp, the user
  4364. must no longer access the data buffer. TCP uses positive acknowledgments  with
  4365. retransmission  to  ensure in-order delivery, but this is largely invisible to
  4366. the user. Once the remote TCP has acknowledged the data, the  buffer  will  be
  4367. freed automatically.
  4368.  
  4369. TCP does not enforce a limit in the number of bytes that  may  be  queued  for
  4370. transmission,  but  it  is  recommended that the application not send any more
  4371. than the amount passed as "cnt" in the transmitter upcall.  The  package  uses
  4372. shared,  dynamically allocated buffers, and it is entirely possible for a mis-
  4373. behaving user task to run the system out of buffers.
  4374.  
  4375. /* Receive data on a TCP connection */
  4376. int
  4377. recv_tcp(tcb,bp,cnt)
  4378. struct tcb *tcb;
  4379. struct mbuf **bp;
  4380. int16 cnt;
  4381.  
  4382.  
  4383. recv_tcp() passes back through bp a pointer to an mbuf  chain  containing  any
  4384. available  receive  data, up to a maximum of "cnt" bytes. The actual number of
  4385. bytes received (the lesser of "cnt" and the  number  pending  on  the  receive
  4386. queue) is returned. If no data is available, net_error is set to EWOULDBLK and
  4387. -1 is returned; the r_upcall mechanism may be  used  to  determine  when  data
  4388. arrives.  (Technical  note: "r_upcall" is called whenever a PUSH or FIN bit is
  4389. seen in an incoming segment, or if the receive  window  fills.  It  is  called
  4390. before  an  ACK  is  sent back to the remote TCP, in order to give the user an
  4391. opportunity to piggyback any data in response.)
  4392.  
  4393. When the remote TCP closes its half of the connection and all  prior  incoming
  4394. data  has  been  read by the local user, subsequent calls to recv_tcp return 0
  4395. rather than -1 as an "end of transmission"  indicator.  Note  that  the  local
  4396. application  is  notified  of  a  remote close (i.e., end-of-file) by a state-
  4397. change upcall with the new state being CLOSE_WAIT; if  the  local  application
  4398. has  closed  first,  a  remote  close is indicated by a state-change upcall to
  4399. either CLOSING or TIME_WAIT state. (CLOSING state is used only  when  the  two
  4400. ends close simultaneously and their FINs cross in the mail).
  4401.  
  4402. /* Close a TCP connection */
  4403. close_tcp(tcb)
  4404. struct tcb *tcb;
  4405.  
  4406.  
  4407. This tells TCP that the local user has no more  data  to  send.  However,  the
  4408. remote TCP may continue to send data indefinitely to the local user, until the
  4409. remote user also does a close_tcp.  An attempt to send data after a  close_tcp
  4410. is an error.
  4411.  
  4412. /* Delete a TCP connection */
  4413. del_tcp(tcb)
  4414. struct tcb *tcb;
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.                                     - 68 -
  4427.  
  4428.  
  4429. When the connection has been closed in both connections and all incoming  data
  4430. has been read, this call is made to cause TCP to reclaim the space taken up by
  4431. the TCP control block. Any incoming data remaining unread is lost.
  4432.  
  4433. /* Dump a TCP connection state */
  4434. state_tcp(tcb)
  4435. struct tcb *tcb;
  4436.  
  4437.  
  4438. This debugging call prints an ASCII-format dump of the TCP connection state on
  4439. the  terminal.  You need a copy of the TCP specification (ARPA RFC 793 or MIL-
  4440. STD-1778) to interpret most of the numbers.
  4441.  
  4442. _5._1._9.  _T_h_e _U_s_e_r _D_a_t_a_g_r_a_m _P_r_o_t_o_c_o_l (_U_D_P)
  4443.  
  4444. UDP is available for simple applications not needing the services of  a  reli-
  4445. able  protocol  like TCP.  A minimum of overhead is placed on top of the "raw"
  4446. IP datagram service, consisting only of port numbers and a  checksum  covering
  4447. the UDP header and user data. Four functions are available to the UDP user.
  4448.  
  4449. /* Create a UDP control block for lsocket, so that we can queue
  4450.  * incoming datagrams.
  4451.  */
  4452. int
  4453. open_udp(lsocket,r_upcall)
  4454. struct socket *lsocket;
  4455. void (*r_upcall)();
  4456.  
  4457.  
  4458. open_udp creates a queue to accept incoming datagrams (regardless  of  source)
  4459. addressed  to "lsocket". "r_upcall" is an optional upcall mechanism to provide
  4460. the address of a function to be called as follows whenever a datagram arrives:
  4461.  
  4462. (*r_upcall)(lsocket,rcvcnt);
  4463. struct socket *lsocket;         /* Pointer to local socket */
  4464. int rcvcnt;                     /* Count of datagrams pending on queue */
  4465.  
  4466. /* Send a UDP datagram */
  4467. int
  4468. send_udp(lsocket,fsocket,tos,ttl,bp,length,id,df)
  4469. struct socket *lsocket;         /* Source socket */
  4470. struct socket *fsocket;         /* Destination socket */
  4471. char tos;                       /* Type-of-service for IP */
  4472. char ttl;                       /* Time-to-live for IP */
  4473. struct mbuf *bp;                /* Data field, if any */
  4474. int16 length;                   /* Length of data field */
  4475. int16 id;                       /* Optional ID field for IP */
  4476. char df;                        /* Don't Fragment flag for IP */
  4477.  
  4478.  
  4479. The parameters passed to send_udp  are  simply  stuffed  in  the  UDP  and  IP
  4480. headers, and the datagram is sent on its way.
  4481.  
  4482.  
  4483.  
  4484.  
  4485.  
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.                                     - 69 -
  4493.  
  4494.  
  4495.  
  4496. /* Accept a waiting datagram, if available. Returns length of datagram */
  4497. int
  4498. recv_udp(lsocket,fsocket,bp)
  4499. struct socket *lsocket;         /* Local socket to receive on */
  4500. struct socket *fsocket;         /* Place to stash incoming socket */
  4501. struct mbuf **bp;               /* Place to stash data packet */
  4502.  
  4503.  
  4504. The "lsocket" pointer indicates the  socket  the  user  wishes  to  receive  a
  4505. datagram  on (a queue must have been created previously with the open_udp rou-
  4506. tine). "fsocket" is taken as the address of a socket structure to be overwrit-
  4507. ten  with  the  foreign  socket associated with the datagram being read; bp is
  4508. overwritten with a pointer to the data portion (if any) of the datagram  being
  4509. received.
  4510.  
  4511. /* Delete a UDP control block */
  4512. int
  4513. del_udp(lsocket)
  4514. struct socket *lsocket;
  4515.  
  4516.  
  4517. This function destroys any unread datagrams on a queue, and reclaims the space
  4518. taken by the queue descriptor.
  4519.  
  4520. _5._2.  _T_h_e _K_I_S_S _H_o_s_t _t_o _T_N_C _P_r_o_t_o_c_o_l
  4521.  
  4522. _5._2._1.  _T_h_e _P_r_o_t_o_c_o_l _S_p_e_c_i_f_i_c_a_t_i_o_n
  4523.  
  4524. _5._2._1._1.  _I_n_t_r_o_d_u_c_t_i_o_n
  4525.  
  4526. The purpose of the "Raw" (aka "KISS") TNC is to facilitate the use of  amateur
  4527. packet  radio  controllers  (TNCs)  with  host  computers, particularly in the
  4528. development of experimental protocols and multi-user servers (e.g.,  "bulletin
  4529. boards").
  4530.  
  4531. Current TNC software was written with human users in mind; unfortunately, com-
  4532. mands  and  responses  well suited for human use are ill-adapted for host com-
  4533. puter use, and vice versa. This is especially true for multi-user servers such
  4534. as  bulletin boards which must multiplex data from several network connections
  4535. across the single host/TNC link.  In addition, experimentation with  new  link
  4536. level  protocols  is greatly hampered because there may very well be no way at
  4537. all to generate or receive frames in the desired format without  reprogramming
  4538. the TNC.
  4539.  
  4540. The Raw TNC solves these problems by eliminating as much as possible from  the
  4541. TNC software, giving the attached host complete control over and access to the
  4542. contents of the HDLC frames transmitted and received over the air.  The  AX.25
  4543. protocol is removed entirely from the TNC, as are all command interpreters and
  4544. the like.  The TNC simply converts between synchronous  HDLC,  spoken  on  the
  4545. half  duplex radio channel, and a special asynchronous, full duplex frame for-
  4546. mat spoken on the host/TNC link.  Every frame received on  the  HDLC  link  is
  4547. passed intact to the host once it has been translated to the asynchronous for-
  4548. mat; likewise, asynchronous frames from the host are transmitted on the  radio
  4549.  
  4550.  
  4551.  
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.                                     - 70 -
  4559.  
  4560.  
  4561. channel once they have been converted to HDLC format.
  4562.  
  4563. Of course, this means that the bulk of AX.25 (or another protocol) must now be
  4564. implemented  on  the host system. This is acceptable, however, considering the
  4565. greatly increased flexibility and reduced overall complexity that  comes  from
  4566. allowing  the  protocol to reside on the same machine with the applications to
  4567. which it is closely coupled.
  4568.  
  4569. _5._2._1._2.  _A_s_y_n_c_h_r_o_n_o_u_s _f_r_a_m_e _f_o_r_m_a_t
  4570.  
  4571. The "asynchronous packet protocol" spoken between the host  and  TNC  is  very
  4572. simple,  since its only function is delimiting frames. Each frame is both pre-
  4573. ceded and followed by a special FEND (frame end) character,  analogous  to  an
  4574. HDLC flag.  No CRC or checksum is provided.
  4575.  
  4576. The reason for both preceding and ending frames with FENDs is to improve  per-
  4577. formance  when there is noise on the asynch line. The FEND at the beginning of
  4578. a frame serves to "flush out" any accumulated garbage into  a  separate  frame
  4579. (which will be discarded by the upper layer protocol) instead of prepending it
  4580. to an otherwise good frame.  As with back-to-back  FLAGs  in  HDLC,  two  FEND
  4581. characters in a row should not be interpreted as delimiting an empty frame.
  4582.  
  4583. _5._2._1._2._1.  _T_r_a_n_s_p_a_r_e_n_c_y
  4584.  
  4585. Frames are sent in 8-bit binary; if an FEND ever appears in the  data,  it  is
  4586. translated  into  the  two  byte sequence FESC TFEND (frame escape, transposed
  4587. frame end).  Likewise, if the FESC character ever appears in the user data, it
  4588. is  replaced  with  the two character sequence FESC TFESC (frame escape, tran-
  4589. sposed frame escape).
  4590.  
  4591. As characters arrive at the receiver, they are appended to a buffer containing
  4592. the  current  frame.  Receiving  a  FEND  marks  the end of the current frame.
  4593. Receipt of a FESC puts the receiver into  "escaped  mode",  which  causes  the
  4594. receiver to translate a following TFESC or TFEND back to FESC or FEND, respec-
  4595. tively, before adding it to the  receive  buffer  and  leaving  escaped  mode.
  4596. (Receipt  of  any character other than TFESC or TFEND while in escaped mode is
  4597. an error; no action is taken and frame assembly continues.  A  TFEND  or  TESC
  4598. received while not in escaped mode is treated as an ordinary data character.)
  4599.  
  4600. This procedure may seem somewhat complicated, but it is easy to implement  and
  4601. recovers  quickly from errors. In particular, the FEND character is never sent
  4602. over the channel except as an actual  end-of-frame  indication.  This  ensures
  4603. that  any  intact frame (properly delimited by FEND characters) will always be
  4604. received properly regardless of the starting state of the receiver or  corrup-
  4605. tion of the preceding frame.
  4606.  
  4607. The special characters are:
  4608.  
  4609.         FEND    (frame end)                     300 (octal)
  4610.         FESC    (frame escape)                  333 (octal)
  4611.         TFEND   (transposed frame end)          334 (octal)
  4612.         TFESC   (transposed frame escape)       335 (octal)
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.                                     - 71 -
  4625.  
  4626.  
  4627. (ARPA Internet hackers will recognize this protocol as identical  to  SLIP,  a
  4628. popular method for sending IP datagrams across ordinary dialup modems).
  4629.  
  4630. _5._2._1._3.  _C_o_n_t_r_o_l _o_f _t_h_e _R_a_w _T_N_C
  4631.  
  4632. Each asynchronous data frame sent to the TNC is  converted  back  into  "pure"
  4633. form  and queued for transmission as a separate HDLC frame.  Although removing
  4634. the human interface and the AX.25 protocol from the TNC  makes  most  existing
  4635. TNC  commands unnecessary (i.e., they become host functions), the TNC is still
  4636. responsible for keying the transmitter's  PTT  line  and  deferring  to  other
  4637. activity  on the radio channel. It is therefore necessary to allow the host to
  4638. control a few TNC parameters, namely  the  transmitter  keyup  delay  and  the
  4639. transmitter persistence variables.
  4640.  
  4641. It is therefore necessary to distinguish between command and  data  frames  on
  4642. the  host/TNC  link. This is done by defining the first byte of each asynchro-
  4643. nous frame between host and TNC as a "type" indicator.   The  following  types
  4644. are defined in frames to the TNC:
  4645.  
  4646. Type    Function        Comments
  4647. 0       Data frame      Rest of frame is data to be sent on the HDLC channel
  4648. 1       TXDELAY         Second byte is transmitter keyup delay in 10 ms units
  4649. 2       P               Second byte of frame is persistence parameter, p:
  4650.                         0: p = (0+1)/256, 255: p = (255+1)/256 = 1.0
  4651. 3       SLOTTIME        Second byte of frame is slot interval in 10 ms units
  4652. 4       TXtail          Second byte of frame is time to hold up the TX after
  4653.                         the FCS has been sent (the time allowed to send the
  4654.                         HDLC flag character; should be at least 2 for 1200 bps
  4655.                         operation).  In 10 ms units.
  4656.  
  4657.  
  4658. The following types are defined in frames to the host:
  4659.  
  4660. Type    Function        Comments
  4661. 0       Data frame      Rest of frame is data from the HDLC channel
  4662.  
  4663.  
  4664. (No other types are defined; in particular, there is  no  provision  for  ack-
  4665. nowledging data or command frames sent to the TNC.)
  4666.  
  4667. _5._2._1._4.  _P_e_r_s_i_s_t_e_n_c_e
  4668.  
  4669. The P and SLOTTIME parameters are used to implement  true  p-persistent  CSMA.
  4670. This works as follows:
  4671.  
  4672. Whenever the host has queued data for transmission, the TNC begins  monitoring
  4673. the  carrier detect signal from the modem. It waits indefinitely for this sig-
  4674. nal to go inactive. Once the channel is clear,  the  TNC  generates  a  random
  4675. number  between  0 and 255. If this number is less than or equal to P, the TNC
  4676. asserts the transmitter PTT line, waits .01 * TXDELAY seconds,  and  transmits
  4677. all  frames  in its queue. The TNC then releases PTT and goes back to the idle
  4678. state.  If the random number is greater than  P, the  TNC  delays  signal  has
  4679. gone  active  in the meantime, the TNC again waits for it to clear before con-
  4680. tinuing).  Note  that  P=255  means  always  transmit  as  soon  as  possible,
  4681.  
  4682.  
  4683.  
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.                                     - 72 -
  4691.  
  4692.  
  4693. regardless of the random number.
  4694.  
  4695. The result is that the  TNC  waits  for  an  exponentially-distributed  random
  4696. interval  after  sensing  that the channel has gone clear before attempting to
  4697. transmit. The idea here is that with proper tuning of  the  parameters  P  and
  4698. SLOTTIME,  several  stations with traffic to send are much less likely to col-
  4699. lide with each other when they simultaneously see the channel go clear.
  4700.  
  4701. _5._2._2.  _T_h_e _T_N_C-_2 _I_m_p_l_e_m_e_n_t_a_t_i_o_n
  4702.  
  4703. See the files included in the TNC-2 KISS Distribution.
  4704.  
  4705. _5._2._3.  _T_h_e _T_N_C-_1 _I_m_p_l_e_m_e_n_t_a_t_i_o_n
  4706.  
  4707. See the files included in the TNC-1 KISS Distribution.
  4708.  
  4709. _5._2._4.  _T_h_e _V_A_D_C_G/_A_S_H_B_Y _I_m_p_l_e_m_e_n_t_a_t_i_o_n
  4710.  
  4711. See the files included in the VADCG/ASHBY KISS Distribution.
  4712.  
  4713. _5._2._5.  _T_h_e _A_E_A _I_m_p_l_e_m_e_n_t_a_t_i_o_n
  4714.  
  4715. All PK-232 units with WEFAX, and PC-87 units of a similar vintage, are capable
  4716. of KISS operation.  See the installation instructions earlier in this document
  4717. for more information.
  4718.  
  4719. _5._2._6.  _T_h_e _K_a_n_t_r_o_n_i_c_s _I_m_p_l_e_m_e_n_t_a_t_i_o_n
  4720.  
  4721. See your Kantronics TNC Documentation.
  4722.  
  4723. _5._3.  _T_h_e _E_x_p_e_r_i_m_e_n_t_a_l _D_E_S _P_a_c_k_a_g_e
  4724.  
  4725. Documentation is included in the DES package.
  4726.  
  4727.  
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.  
  4749.  
  4750.  
  4751.  
  4752.  
  4753.