home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / aux / 4373 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  4.9 KB

  1. Path: sparky!uunet!stanford.edu!apple!afsg!zapped.afsg.apple.com!user
  2. From: ron@afsg.apple.com (Ron Flax)
  3. Newsgroups: comp.unix.aux
  4. Subject: Re: SLIP help requested (and fix!)
  5. Message-ID: <ron-181292083352@zapped.afsg.apple.com>
  6. Date: 18 Dec 92 14:41:09 GMT
  7. References: <1992Dec12.181057.2604@deadzone.princeton.edu> <1321@jagubox.gsfc.nasa.gov> <1992Dec14.182430.26013@tvnews.tv.tek.com> <1992Dec15.053648.9062@noao.edu>
  8. Sender: news@afsg.apple.com
  9. Followup-To: comp.unix.aux
  10. Organization: Apple Computer, Inc.
  11. Lines: 85
  12.  
  13. In article <1992Dec15.053648.9062@noao.edu>, tody@noao.edu (Doug Tody)
  14. wrote:
  15. > In article <1992Dec14.182430.26013@tvnews.tv.tek.com>, jasons@snoboy.tv.tek.com (Jason Scheck) writes:
  16. > > I recently purchased a fast modem, and have been using slip under A/UX
  17. > > 3.0 to connect to our network at work.  Everything works fine under
  18. > > native Unix; I can telnet, rcp, ftp, etc.  I don't have an Ethernet card.
  19. > > 
  20. > > However, all MacTCP clients can only connect through the loopback
  21. > > address; I can't get at any other hosts on the network (the clients
  22. > > sit spinning until they eventually time out).  Should I expect this to
  23. > > work?  Does MacTCP need to be configured separately?  The manuals that
  24. > > come with A/UX don't seem to have anything to say about MacTCP.
  25. > > 
  26. > > Jason Scheck
  27. > > jasons@tv.tv.tek.com
  28. > This sounds like a problem I ran into myself a while back.  Networking via
  29. > SLIP would work fine under A/UX but the connects would time out under the
  30. > finder.  The fix turned out to be to bring up "network" in the control
  31. > panel, and select EtherTalk instead of AppleTalk.  Unfortunately, this
  32. > disables the Appletalk network so my laser printer is unusable when I do
  33. > this, but it does enable use of MacTCP.
  34.  
  35. I'm not sure why this would have any useful effect.  MacTCP, under A/UX, is
  36. really just a passthru to the underlying UNIX TCP/IP mechanism.  You cannot
  37. configure MacTCP independant of the UNIX TCP/IP setup.  In fact, MacTCP
  38. simply inherets the basic characteristics of the UNIX TCP/IP configuration.
  39.  This is where the problems arise with respect to SLIP and MacTCP under
  40. A/UX.  The MacTCP passthru code uses a priority system to determine which
  41. IP interface to use for MacTCP based IP connections.
  42.  
  43. The code scans all of the IP interfaces that are of type AF_INET and have
  44. the IFF_UP flag bits set, and it caches the IP address, broadcast address
  45. (if one exists since only ethernet devices will have one), and netmask of
  46. each one it finds.  The code then checks through this list in the following
  47. order: 1) is there an interface with a broadcast address set, 2) is there a
  48. point-to-point address set, and 3) is there a loopback address set.  If [1]
  49. is encountered then the code returns that device as the interface to use.
  50. This is why if you have an ethernet card installed and configured, MacTCP
  51. configures itself with the address of that device.. even though you
  52. probably want the address of the SLIP device. 
  53.  
  54. There is another problem, the devices are searched in the order in which
  55. they occur in the ifreq linked list.  If the loopback device is in the list
  56. before the SLIP interface, then it will be configured instead of the SLIP
  57. device.
  58.  
  59. There is one other problem... there is a bug in the way the MacTCP code
  60. figures out its own IP address.  *Even* if you were able to have it select
  61. the proper device, it uses a libc routine (get_myaddress) which botches up
  62. the local address since it doesn't compares the ifr_name (or interface name
  63. like: "sl0", or  "ao0") to the one that gets configured in the code
  64. described above.  In fact, most of the time it just uses either the address
  65. of the 1st Ethernet device encountered, or the address of the loopback
  66. device.
  67.  
  68. Here's what I've done to fix things.  1) I've modified the IP interface
  69. selection code to first try to use a "user specified" device, and 2) if
  70. that fails, use the old method of determining which interface to use. [
  71. This way if the config file is botched or missing things still work as they
  72. did before!!], and 3) I've compiled in my own get_myaddress() code that
  73. does the right thing and compares the ifr_name of the device with the name
  74. we have actually selected for configuration.  The config file is
  75. /etc/mactcp.conf and simply has one line in it which is the name of the
  76. interface you would like MacTCP to use.  
  77.  
  78. Also of note:  if you have more than one Ethernet device, you can use this
  79. code to pick which one MacTCP uses.
  80.  
  81. Where can you get this fix, which by the way is completely unsupported!?  [
  82. Although I've been using it for months now without problems... :-) ]
  83.  
  84. Anonymous FTP to afsg.apple.com (192.1.34.2), look in ~ftp/pub for the
  85. file:
  86. Patches.MacTCP.tar.Z (remember BINARY transfer this file!)
  87.  
  88. NOTE: Please read the README file which is in the archive, before you
  89. unpack the entire archive.  Otherwise the archive could wipe out the old
  90. versions of your Patch files.
  91.  
  92. --
  93. Ron Flax
  94. ron@afsg.apple.com
  95. Apple Computer, Inc.
  96.