home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 1 / HamRadio.cdr / tcp / tcpip1-2 / newstuff.doc < prev    next >
Encoding:
Text File  |  1989-04-27  |  19.2 KB  |  417 lines

  1. This file contains information on the NET/ROM support and Finger support
  2. which I did not have time to get merged into USERMAN.DOC before Dayton.
  3.  
  4. The NET/ROM information was provided by Dan Frank W9NK, author of the
  5. NET/ROM support for NET.EXE... and the Finger docs were provided by
  6. Mike Horne KA7AXD, author of the finger server.
  7.  
  8. 73 - Bdale, N3EUA
  9.  
  10. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  11.  
  12.    The NET/ROM support for the KA9Q package serves three purposes:
  13.  
  14.     1) Existing NET/ROM networks may be used to send IP traffic.
  15.     2) NET may be used as a NET/ROM packet switch.
  16.     3) NET may be used to communicate with NET/ROM nodes, and its
  17.        mailbox facility can accept connects over the NET/ROM network.
  18. .Nh 2 "Setting up the NET/ROM Interface"
  19. .LP
  20.    No physical interface is completely dedicated to net/rom, which is as
  21. it should be.  You attach all your AX.25 interfaces, of whatever sort.
  22. Then you attach the net/rom pseudo-interface ("attach netrom").  Then
  23. you identify to the net/rom software those interfaces you want to allow
  24. it to use, with the "netrom interface" command.  The format of this
  25. command is:
  26. .LP
  27.     netrom interface ax0 #ipnode 192
  28. .LP
  29. The first argument is the name of the previously attached interface you
  30. want to use.  The second argument is the alias of your node, to be used in
  31. your routing broadcasts.  The alias is never used for anything else (as
  32. you will see!).  The last number is the net/rom quality figure.  This is
  33. used in computing the route qualities; it represents the contribution of
  34. this interface to the overall computation.  For a 1200 baud half-duplex
  35. connection, 192 is the right number.  
  36. .LP
  37.    You need a netrom interface command for every interface you're going
  38. to use with net/rom.
  39. .Nh 2 "Tracing on the NET/ROM Interface"
  40. .LP
  41.    If you want to trace your NET/ROM datagrams, don't try turning
  42. on trace mode for the "netrom" interface.  Nothing will break, but
  43. nothing will happen.  You should trace the individual AX.25 interfaces
  44. instead.
  45. .Nh 2 "Routing Broadcasts"
  46. .LP
  47.    Once you have set up your interfaces, you need to set some timers.
  48. There are two:  the nodes broadcast interval timer, and the obsolescence
  49. timer.  These are set in seconds, like the smtp timer.  You should usually
  50. set them to an hour.  You can set them to something different, if you want.
  51. If your local net/rom nodes broadcast every hour, but you want to do so
  52. every ten minutes, you can say:
  53. .LP
  54.     netrom nodetimer 600
  55.     netrom obsotimer 3600
  56. .LP
  57. Every time the obsotimer kicks, the obsolescence counts for all non-permanent
  58. entries are decremented by one.  When the count for an entry falls below
  59. five, it is no longer broadcast.  When it falls to 0, it is removed.  The
  60. count is initialized at 6.  These will eventually be settable parameters;
  61. you can adjust them now by changing the initializers for the variables
  62. in the source file.
  63. .LP
  64.    When you first come on the air, you can send out nodes broadcasts to
  65. tell the local nodes that you are available.  Use the command:
  66. .LP
  67.     netrom bcnodes ax0
  68. .LP
  69. where ax0 is the interface on which you want to send the broadcast.  Do
  70. this for every interface on which you want to do this.
  71. .LP
  72.    By default, the NET/ROM code does not broadcast the contents of your
  73. routing table.  This is as it should be, since usually we just want to
  74. be the endpoints of communications rather than relaying NET/ROM traffic.
  75. If you want to be a switch station, include the command:
  76. .LP
  77.     netrom verbose yes
  78. .LP
  79. in your autoexec.
  80. .LP
  81.    Sometimes you can hear broadcasts from nodes that can't hear you.  If
  82. your routing table gets filled with these unusable routes, your node will
  83. grind to a halt.  The solution to this is node broadcast filtering, via
  84. the netrom nodefilter command.  There is a filter list, which contains
  85. a list of callsigns and interfaces.  Then there is a filter mode, which
  86. indicates what to do with the list.
  87. .LP
  88.    If the filter mode is "none", no filtering is done.  If it is "accept",
  89. then only broadcasts from the indicated stations on the indicated 
  90. interfaces are accepted.  If it is "reject", then all broadcasts 
  91. except those from the listed stations on the listed interfaces are
  92. accepted.
  93. .LP
  94.    Because the net/rom code cannot at this time recognize unusable
  95. routes and try alternates, I strongly recommend use of the filter
  96. command to restrict broadcast acceptance to those nodes which you
  97. know you can reach.
  98. .Nh 2 "The NET/ROM Routing Table"
  99. .LP
  100.    The next net/rom commands are those used for maintaining
  101. the routing table.  They fall under the "netrom route" subcommand.
  102. "netrom add" adds a permanent entry to the routing table.  Its format
  103. is:
  104. .LP
  105.     netrom route add #foo w9foo ax0 192 w9rly
  106. .LP
  107. This command adds an entry for w9foo, whose alias is #foo, route
  108. quality 192, via w9rly on interface ax0.  Let's talk about what this
  109. means.  w9foo is the *destination* node, the one to whom you want 
  110. the packets routed by the net/rom network.  w9rly is your *neighbor*,
  111. the net/rom node to which you pass the packet to be forwarded.  Since
  112. w9rly may appear on more than one interface (the callsign may be used
  113. by more than one net/rom node on different bands), we specify that 
  114. we are to use ax0 to send the packet.
  115. .LP
  116.    With net/rom, like IP, we don't know exactly what route a packet
  117. will take to its destination.  We only know the name of a neighbor
  118. which has indicated a willingness to forward that packet (of course,
  119. the neighbor may be the destination itself, but that's unlikely in
  120. our application).  Net/rom sends the packet to the neighbor, with a
  121. network header specifying our callsign and that of the ultimate
  122. destination (in this case w9foo).
  123. .LP
  124.    We can use the netrom route add command to establish a digipeater
  125. path to the neighbor.  For example:
  126. .LP
  127.     netrom route add #foo w9foo ax0 192 w9rly wd9igi
  128. .LP
  129. This will cause us to use wd9igi as a digipeater in establishing our
  130. connection to the net/rom node w9rly.
  131. .LP
  132.    To drop the route to w9foo, you would type
  133. .LP
  134.     netrom route drop w9foo w9rly ax0
  135. .LP
  136.    To see the contents of your routing table, you may type
  137. .LP
  138.     netrom route
  139. .LP
  140. and to see the routing entries for an individual station you can type
  141. .LP
  142.     netrom route info <callsign>
  143. .LP
  144. You may not use an alias as an argument to the netrom route info command.
  145. .LP
  146.    I can not stress enough that "route add" and "netrom route add" are two
  147. different commands, with different purposes.  In general, you only need a
  148. "netrom route add" if you need to add a route to a net/rom node via a
  149. digipeater path.  If you find yourself using this command, ask yourself,
  150. "Why am I doing this?"  Many people do not understand that net/rom does
  151. automatic routing (well, sort of :-)).
  152. .Nh 2 "The Importance of the Routing Table"
  153. .LP
  154.    The NET/ROM routing table is analogous to the IP routing table:  if
  155. there is nothing in it, your NET/ROM traffic will not go out.  You must
  156. either manually enter a list of routes (perhaps via your autoexec.net)
  157. or wait to receive routing broadcasts from your neighbors before your
  158. NET/ROM traffic will leave your station.
  159. .LP
  160.    If you go to send packets via NET/ROM and nothing happens, even if
  161. you have trace mode on, make sure that the destination node is in your
  162. NET/ROM routing table.  If sending IP traffic, double check the ARP table
  163. for an appropriate NET/ROM ARP entry for the destination node (see below
  164. for more information on the use of the ARP table).  The ARP table is not
  165. used for NET/ROM transport routing.
  166. .Nh 2 "Interfacing with NET/ROMs Using Your Serial Port"
  167. .LP
  168.    What if you have a net/rom node or nodes, and you'd like to attach
  169. them to your computer via their serial interfaces, and use net as a
  170. packet switch?  It's very easy:  you have to attach those interfaces,
  171. using the "attach asy" command, but specifying type "nrs" instead of
  172. "slip" or "kiss".  "nrs" is the net/rom serial framing protocol, which
  173. is like KISS, but uses different framing characters and has an 8-bit
  174. checksum.
  175. .LP
  176.    When you attach an nrs interface, it can be used for passing IP
  177. datagrams or AX.25 frames over serial lines or modems.  To use it
  178. for net/rom, you have to identify it to the netrom code just like
  179. any other interface, with the "netrom interface" command.
  180. .Nh 2 "The Time to Live Initializer"
  181. .LP
  182.    The "netrom ttl" command allows setting of the time-to-live
  183. initializer for NET/ROM datagrams.  I recommend a value of 16
  184. for most networks.  Use more if you expect to go more than 16 hops.
  185. The default is 64.
  186. .LP
  187.    The purpose of the ttl initializer is to prevent a packet from
  188. getting caught forever in routing loops.  Every router who handles
  189. the packet decrements the ttl field of the network datagram before
  190. sending it on, and when it reaches 0 it is discarded.
  191. .Nh 2 "Using NET/ROM Support for IP"
  192. .LP
  193.    Now you know all the commands, but how do we actually use net/rom
  194. for IP communications?  This takes two steps:
  195. .LP
  196.    Step one:  update the routing table.  In all likelihood, you will
  197. use net/rom to gateway two IP subnets.  So, you'll probably want to
  198. identify a station on each end as a gateway.  Let's say we're on the
  199. Milwaukee subnet, and we want to talk to someone in Madison.  If
  200. we're not the gateway, we just have a routing table entry like this:
  201. .LP
  202.     route add [44.92.0.0]/24 ax0 wg9ate-pc.ampr
  203. .LP
  204. This specifies that wg9ate should get all packets for the 44.92.0.x
  205. subnet via interface ax0.
  206. .LP
  207.    Wg9ate has this routing table entry:
  208. .LP
  209.     route add [44.92.0.0]/24 netrom w9mad-pc.ampr
  210. .LP
  211. (presuming that w9mad is the Madison gateway).  Now, when the IP layer
  212. at wg9ate gets datagrams for Madison, it knows that they have to go via
  213. net/rom to w9mad.  Notice that we don't specify a "real" interface,
  214. like ax1 or nr0, in the route entry.  The net/rom network layer will
  215. pick the right interface based on its net/rom routing tables.
  216. .LP
  217.    We're not done yet, though.  w9mad-pc.ampr is not an ax.25
  218. callsign.  The net/rom send routine called by the IP layer needs
  219. to map from the IP address to an ax.25 address.  It does this via
  220. a manually added arp entry:
  221. .LP
  222.     arp add w9mad-pc.ampr netrom w9mad
  223. .LP
  224. [We kind of fudged by using the arp table for this purpose, since
  225. there is no way to do automatic address resolution for net/rom,
  226. and arp messages are never sent or received for net/rom nodes.
  227. However, the arp table does contain precisely what we have here:
  228. mappings from IP addresses to callsigns, and it saved a lot of
  229. code to do it this way.]
  230. .LP
  231. Notice also that no digipeaters are ever specified in the arp entry
  232. for a net/rom node.  Also, the callsign to which we are mapping
  233. is the final destination of the packet, not the non-destination
  234. neighbor.  That neighbor will be picked based on the net/rom 
  235. routing tables.
  236. .LP
  237.    So, as a summary, let's look at what happens to a packet that
  238. reaches the IP layer on wg9ate, destined for Madison.  The IP
  239. routing code looks the destination IP address up in the table,
  240. and discovers that it should go via net/rom to w9mad-pc.ampr.
  241. So, it passes the packet to the net/rom send routine.  That
  242. routine uses the arp table to translate w9mad-pc's IP address
  243. to the callsign "w9mad".  Then it passes the packet to the
  244. net/rom routing code.  That code checks to see if the destination
  245. callsign (w9mad) is the same as that of any of its assigned
  246. net/rom interfaces.  Since it isn't, it puts a network layer
  247. header (a.k.a. net/rom level 3 header) on it, and looks for
  248. w9mad in its routing tables.  Presumably, it finds an appropriate
  249. neighbor for the packet, and sends in out via ax.25.  The net/rom
  250. network does the job of actually getting the packet to its 
  251. destination.
  252. .LP
  253.    At w9mad, the packet's protocol ID causes it to be sent to
  254. the same net/rom routing code that handled the outgoing packet
  255. from wg9ate (running on a different computer, of course).  Now
  256. the destination callsign matches, so the net/rom network layer
  257. header is stripped off, and packet is passed up to the IP layer.
  258. (Net/rom network headers don't have a protocol ID byte, so 
  259. we just hope for the best.  If a net/rom node addresses a
  260. net/rom transport layer packet to us, it is likely to be dropped
  261. by IP for any of a number of reasons.)
  262. .Nh 2 "The NET/ROM Transport Layer"
  263. .LP
  264.    NET/ROM transport is the protocol used by NET/ROM node to
  265. communicate end-to-end.  When a user attaches to a NET/ROM
  266. via AX.25, and asks for a connect to a node in the NODES list,
  267. his local NET/ROM tries to open a transport connection to
  268. the destination node over the NET/ROM network.  NET/ROM transport
  269. packets are carried in NET/ROM network datagrams, just like
  270. IP datagrams.
  271. .LP
  272.    You shouldn't use NET/ROM transport when connecting to other
  273. TCP/IP stations.  TCP is a much better protocol than NET/ROM
  274. transport, and makes better use of available bandwidth.  Also,
  275. BM and SMTP are more convenient to use than a TCP/IP station's
  276. mailbox facility.  However, for communicating with AX.25 users
  277. via the NET/ROM network, the transport facilities in NET will
  278. work better (and more easily) than the traditional method of
  279. connecting to your local node via AX.25.
  280. .Nh 2 "Connecting via NET/ROM Transport"
  281. .LP
  282.    To connect to the node whose alias is FOO and whose callsign is
  283. W9FOO, you can issue either of the following two commands:
  284. .LP
  285.     netrom connect foo
  286. .LP
  287.     netrom connect w9foo
  288. .LP
  289. If foo:w9foo is in your NET/ROM routing table, your station will
  290. transmit a connect request to the appropriate neighbor used to
  291. reach w9foo.
  292. .LP
  293.    NET/ROM transport sessions are very much like those for AX.25.
  294. You can use the disconnect, reset, kick, upload, and record
  295. commands, and the session command to switch sessions.
  296. .Nh 2 "Displaying the Status of NET/ROM Connections"
  297. .LP
  298.    The command
  299. .LP
  300.     netrom status
  301. .LP
  302. is used to display the status of all NET/ROM connections, which will
  303. include those used in keyboard sessions as well as ones attached to
  304. the mailbox.  For more detailed information on a session, you can
  305. use the address of the NET/ROM control block:
  306. .LP
  307.     netrom status <&nrcb>
  308. .LP
  309. where <&nrcb> is the hex address given in the short form of the command
  310. or in the "session" display.
  311. .Nh 2 "NET/ROM Transport Parameters"
  312. .LP
  313.    The NET/ROM transport parameters may be set with the various 
  314. NET/ROM subcommands.  Their meanings are listed below:
  315. .LP
  316.     acktime:    This is the ack delay timer, similary to ax25 t2.
  317.                 The default is 3000 ms.
  318.  
  319.     choketime:    The time to wait before breaking a send choke condition.
  320.                 Choke is the term for NET/ROM flow control.
  321.  
  322.     irtt:        The initial round trip time guess, used for timer setting.
  323.  
  324.     qlimit:        The maximum length of the receive queue for chat sessions.
  325.                 This is similar to ax25 window.
  326.  
  327.     retries:    Maximum retries on connect, disconnect, and data frames.
  328.  
  329.     window:        Maximum sliding window size, negotiated down at connect
  330.                 time.
  331.  
  332. .Nh 2 "The Mailbox"
  333. .LP
  334.    The AX.25 mailbox also accepts NET/ROM connections.  The "mbox on"
  335. and "mbox off" commands control whether the mailbox is turned on for
  336. NET/ROM as well as AX.25, and the "mbox" command displays current
  337. mailbox connects of both types.
  338. .LP
  339.    Many people have observed that the AX.25 mailbox requires the user
  340. to enter a carriage return to bring up the banner and prompt.  This is
  341. because of certain defects of that protocol when it is used as the
  342. link layer for several different higher level protocols, and is 
  343. unavoidable.  (So stop asking, OK? :-))  The NET/ROM mailbox does
  344. not require the carriage return, and will be activated as soon as
  345. the incoming connection is completed.
  346. .Nh 2 "Where to go for More Information"
  347. .LP
  348.    The paper "Transmission of IP Datagrams over NET/ROM Networks"
  349. appeared in the Seventh ARRL Networking Conference papers, available
  350. from the ARRL.  In it, I describe the more technical details of how
  351. the NET/ROM network support works.
  352. .LP
  353.    If you want to learn about NET/ROM, talk your local NET/ROM or TheNET
  354. operator out of his or her manual.  If you want to learn more, read
  355. the source code.  That's about it for sources, since the NET/ROM
  356. protocols originated in a commercial product.
  357. .Nh 2 "About the Code"
  358. .LP
  359.    There has been a great deal of controversy about TheNET, a no-charge
  360. NET/ROM clone for TNCs.  This is not the place to discuss the truth
  361. of the charges leveled by Software 2000 against its authors, but that
  362. situation requires me to make the following statement:
  363. .LP
  364.    The NET/ROM transport support in NET.EXE was not taken in any way,
  365. shape or form from NET/ROM (whose source I have never seen) or from
  366. TheNET.  The protocol code is based on protocol 6 from Tanenbaum's
  367. excellent book, Computer Networks, as a moderately careful reading
  368. of both should show.  The source code is freely distributed, so
  369. the curious reader should have the opportunity to check this assertion
  370. if he or she so desires.
  371. .LP
  372.    The smoothed round trip time calculation, which is not done in 
  373. "real" NET/ROMs (and should be, by the way -- they'd work a whole
  374. lot better) is adapted from that used by KA9Q in the TCP protocol
  375. in NET.  The dicey business of adapting it to a sliding windows
  376. protocol with selective retransmission was done by me, all alone,
  377. after my cries for help on the tcp-group mailing list went unanswered :-).
  378. .LP
  379.    I have taken the precaution of copyrighting the NET/ROM code in
  380. NET.  It may be freely distributed for non-commercial purposes, in
  381. whole or in part, and may be used in other software packages such
  382. as BBS systems if so desired, so long as the copyright notice is
  383. not removed from the source files, and the program in which it is
  384. used displays "NET/ROM code copyright 1989 by Dan Frank, W9NK"
  385. when it starts up.
  386. .LP
  387.    Any person who wishes to distribute the code, or anything based
  388. on the code, for commercial purposes will find me very reasonable,
  389. but rather insistent about being compensated for the hours I've
  390. spent working on it.
  391. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  392. .Nh 1 "The Finger Server"
  393. .Nh 2 "Finger Support Release Docs"
  394. .LP
  395. UPDATED: August 17, 1988 - KA7AXD
  396. .LP
  397. This ARC file has everything you need to add finger to the alpha.arc sources
  398. that Phil has placed on flash.bellcore.com .  Simply replace the .C and .H
  399. files, as well as the MAKEFILE, from the alpha.arc archive with those in
  400. this archive and away you go!
  401. .LP
  402. I have merged in Dan Frank's (W9NK) NET/ROM enhancements into the code as
  403. well, which included some fixes to the NET/ROM code and the AX.25 Mailbox
  404. feature.  Read the file "readme.dan" for his comments.
  405. .LP
  406. I've made some corrections to fingserv.c and fingcli.c that Gerard (PA0GRI)
  407. has suggested.  These corrections help eliminate the potential for causing
  408. DoubleDos to lock up when using finger.  Thanks, Gerard!  A few other
  409. small changes have been made to provide for more robust code.
  410. .LP
  411. If you have any questions or comments, please direct them to me at one of
  412. the addresses below.
  413. .LP
  414. Enjoy!
  415. .LP
  416. Mike, ka7axd, mhorne@honda.fdi.tek.com
  417.