home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / N / DIP / _DIP.TAR / usr / doc / dip / README < prev    next >
Encoding:
Text File  |  1995-01-13  |  12.8 KB  |  331 lines

  1. IMPORTANT! From now on, the FORMAT OF /ETC/DIPHOSTS file
  2. is CHANGED!! Two new fields are added, they are:
  3.     - local IP address (or hostname)
  4.     - local netmask
  5.  
  6. So from now on, /etc/diphosts will look like:
  7.  
  8. user : password : remote host : local host : netmask : comments : protocol,MTU
  9.  
  10.  
  11. Fields "local host" and "netmask" can be empty, but THEY MUST BE
  12. THERE! Example:
  13.  
  14. fool::makaka:::Silly DIP client:SLIP,296
  15. smart::ass:istant:255.255.0.0:CSLIP,296
  16. great:s/key:ass:istant:255.255.0.0:CSLIP,296
  17.  
  18. Also, please DON'T pester Fred van Kempen with questions about
  19. this version of DIP, OK?
  20.  
  21. Also, please note: my experience shows smaller blocks (i.e.
  22. smaller MTU) work BETTER. You *can* define MTU 1500, but it
  23. won't vouch for your sanity.
  24.  
  25. As of today, DIP compiles and runs on Linux-1.1.68.
  26.  
  27. I somewhat modified this package, adding support for a few
  28. commands:
  29.  
  30. 1. quit - this was needed to prevent DIP from just dropping
  31.    the tty device in some weird state, in case it couldn't
  32.    succeed establishing connection (like, the phone was
  33.    busy).
  34.  
  35. 2. netmask xxx.xxx.xxx.xxx - obviously, if you have some
  36.    specific netmask in mind, you put this into your 
  37.    profile... Otherwise it won't specify "netmask ..." in
  38.    it's "ifconfig" and may G-d help you.
  39.  
  40. 3. default - this tells DIP that it should set up the
  41.    default route to the remote host it made a connection to.
  42.    If this command isn't present in the command file,
  43.    default route won't be set/changed.
  44.  
  45. 4. exit - not really needed, just for the cleanness of the
  46.    script... Instead of just falling through the bottom,
  47.    you can use this command and it will nicely exit
  48.    leaving established [C]SLIP connection intact and
  49.    running. I didn't add the code for this command,
  50.    just spotted it in the source (:-).
  51.  
  52.    Also, Pauline added error code to this command, so "exit 4"
  53.    should return exit status 4... You got the idea, right? (:-)
  54.  
  55. 5. Added "tty_notlocal()" call (provided by Rob Janssen) and
  56.    a few other patches by him (after some verification and
  57.    clean-up).
  58.  
  59. 6. Now DIP server behaves somewhat differently from DIP
  60.    client, and it improves the reliability somewhat. It
  61.    means, there are essentially two "tty_notlocal()"
  62.    thingies in the code, one for user-requested
  63.    hangup, and the other for line drop. 
  64.  
  65. 7. A few patches, by Erik Olson, Neal Becker, Rob Janssen,
  66.    Michael N. Lipp, Joerg Schlaeger, probably some others
  67.    I was too silly to record (and I apologize for that!).
  68.  
  69. 8. This DIP is now S/Key-capable. I'm adding some S/Key sources
  70.    in here, but retrieve the whole package, just to be safe.
  71.    Thanks to Stephen Shortland!
  72.  
  73.    Also, Mike Norman added "SecureId" capability to DIP.
  74.  
  75. 9. IP address can now be assigned either by user login name,
  76.    or by tty line the call came in. If the user login name 
  77.    is "ttyS1", for example... See below for a brief
  78.    explanation/example how to use it.
  79.  
  80. 10. Locking mechanism was changed a little - now it's supposed to
  81.     detect if somebody else holds the lock on the tty line and
  82.     leave it alone in that case. 
  83.  
  84. 11. An option "-l ttySn" was added, so you can specify what DIP
  85.     exactly you want to kill. If you didn't use this flag, DIP
  86.     will kill the last started DIP.
  87.  
  88. 12. Quite a few upgrades by  Bill Reynolds,  Pauline Middelink,
  89.     Paul Cadach...If I missed you, a nice contributor - please
  90.     forgive me! It's not because of lack of appreciation! Also,
  91.     thanks to Daniel Suman for quite a few bug fixes, and help
  92.     debugging the thing.
  93.  
  94.     Oh, Pauline's patches add the ability not to have DIP users
  95.     listed in /etc/passwd file at all, being completely defined
  96.     in /etc/diphosts, a-la taylor UUCP... I don't like it, but 
  97.     if you want it, you get it.
  98.  
  99. 13. Please note, "dial" command in DIP script is slightly different
  100.     now - it "eats" the string the modem responds with to your dial!
  101.     Thus, DON'T expect "CONNECT" after successful dial, not any more.
  102.     Instead - check "$errlevel" value, just like this:
  103.  
  104.     dial 555-1212
  105.     if $errlevel != 1 goto error
  106.  
  107.     Note, that standardly, 
  108.     0 - OK
  109.     1 - CONNECT
  110.     2 - ERROR
  111.     3 - BUSY
  112.     4 - NO CARRIER
  113.  
  114. 14. VARIABLES. Please note, that "$locip" was designed to retrieve
  115.     local IP address (dotted decimal notation), and "$local" was
  116.     designed for host name *or* IP address... It's hoped, that
  117.     when you do "get $locip ..." it will skip over all the
  118.     crap until it hits something that looks like dotted
  119.     decimal notation. Maybe it's not working yet in
  120.     this release, but it's how things are designed
  121.     to work, and thus how they certainly will, at
  122.     some point. Please get back to me, if this
  123.     doesn't work the way I said, or it should. Thanks!
  124.  
  125. 15. Now DIP understands PPP - a major move, thanks to ....
  126.  
  127. 16. Some smarta**es are scared to death, when they see "ifconfig"
  128.     telling them something like:
  129.  
  130. |> sl0       Link encap Serial Line IP  
  131. |>           inet addr 192.67.245.42  P-t-P 192.67.245.1  Mask 255.255.255.0
  132. |>           UP POINTOPOINT RUNNING  MTU 1500  Metric 1
  133. |>           RX packets 1233379 errors 1 dropped 0 overrun 709
  134. |>           TX packets 1513719 errors 0 dropped 1388 overrun 869
  135.  
  136.     Please, there's nothing to be afraid of, don't run for Mylanta
  137.     just yet... Those are *not* overruns reported. 
  138.  
  139. 17. DIP now understands BOOTP protocol (thanks to
  140.     Patrick John Edwards <pje120@cs.usask.ca>. He
  141.     also added the ability to send "break" command.
  142.     I don't have time/desire to update the man page,
  143.     so please excuse me and take a look at the source.
  144.  
  145.     He also added support for "term" protocol and fixed
  146.     one or two bugs in PPP invokation.
  147.  
  148. 18. Please be aware, that [normally] you need "databits 8" and
  149.     "parity n" for SLIP/CSLIP link. But often, in order to
  150.     talk to the SLIP server *during* the login procedure,
  151.     one has to set "databits 7" and "parity e". Make
  152.     sure you have the right setting for the login
  153.     negotiation, and make absolutely sure that
  154.     before "mode CSLIP" or such you have
  155.     returned to the right 8N1 link!!
  156.  
  157. 19. Often, if your server speaks SLIP and you try CSLIP, or
  158.     wise-versa, you'll be able to ping, but nothing else
  159.     (like telnet or ftp) will work. Take care of this!
  160.  
  161.  
  162. TAKE A LOOK at "sample.dip" file - it's there for a purpose. (:-)
  163. SAME IS TRUE for "diphosts".
  164.  
  165. ALSO, PLEASE IGNORE MOST OF THE HOWTO AND SUCH: THEY'RE HOPELESSLY
  166. OUT OF DATE. [Or at least, *were* out of date in September 1994.]
  167.  
  168.  
  169. HOW TO INSTALL DIP.
  170.  
  171. 1. Create a new group "dip" in "/etc/group" and place
  172.    each person you want to allow to dial OUT in that 
  173.    special group.
  174.  
  175. 2. Dial-IN isn't that dangerous, as incomers can't [I think]
  176.    force DIP to do their bidding, nothing more, than is in
  177.    "/etc/diphosts".  Still, check what you put in there!
  178.  
  179. 3. "chown root.dip /usr/sbin/dip"
  180.  
  181. 4. "chmod u=rx,g=x,o= /usr/sbin/dip"
  182.  
  183. 5. Now you can "chmod u+s /usr/sbin/dip"
  184.  
  185.  
  186. I'm not sure Fred will support these changes of mine, nor
  187. can I guarantee I didn't introduce new bugs with my patch.
  188. Use it on your own risk. At least it works for me, for
  189. Compressed SLIP with MTU 296 and a LOT of remote X11
  190. and FTPing and so on.
  191.  
  192. Oh, as a matter of fact, I did introduce one bug - with
  193. password checking. I think it's fixed in 3.3.7l release
  194. but you're encouraged to check it and get back to me.
  195.  
  196. Enjoy!
  197. uri@watson.ibm.com
  198.  
  199. DYNAMIC IP ADDRESS ALLOCATION.
  200.  
  201. Oh, before I forgot: here's how to use dynamic IP address
  202. allocation:
  203.  
  204. DIP-3.3.7-uri supports dynamic IP address allocation. That means
  205. in uri-speak, that IP addresses are allocated for tty lines, not
  206. for users (or rather, that you can have at the same time *BOTH*
  207. per-user IP address allocation and per-line IP addr allocation).
  208. So the IP address you get, dynamically depends on what line you
  209. happen to catch (:-).
  210.  
  211.  
  212. How does it work? Simply by the way you configure your DIP server,
  213. via "/etc/diphosts" file. 
  214.  
  215. 1. First put there all the entries for per-user IP addr allocation
  216.    and remember, that these are NOT getting "dynamic" IP, these
  217.    are privilleged enough to have their own static IP addresses.
  218.    Of course, you may have no such entries, or your whole file
  219.    may contain them (then you'll hardly have anybody left to be
  220.    "dynamically allocated" :-).
  221.  
  222. 2. Then put in all the entries for per-line IP allocation. Thus, if
  223.    you have two incoming tty lines (two modems) and want to have
  224.    two IP addresses for them, you'd put in a user "/dev/ttyS1"
  225.    and "/dev/ttyS2"... DIP-3.3.7d and up will allow you to
  226.    put in "ttyS1" and "ttyS2" (without that slash :-).
  227.  
  228. 3. Don't forget to put in all the info 
  229.     - local_host  (what your server looks like for those incomers)
  230.       and for your own sake - try to make this local_host DIFFERENT
  231.           from your Ethernet/Token Ring/FDDI/whatever other IPs your
  232.        host may have;
  233.     - remote_host (what IP address you grace them with);
  234.     - netmask     (rather useful)
  235.     - of course, protocol (SLIP, CSLIP) and MTU. But that's trivial...
  236.  
  237. 4. You're all set. Now you add those users who are supposed to be allowed
  238.    to dial in, into your "/etc/passwd" (well, the standard procedure - I'm
  239.    sure you know how to do that, and if not, you aren't qualified to run a
  240.    SLIP server :-), and put "/usr/sbin/diplogin" as a shell for them.
  241.  
  242. 5. Example: user "fred" should be allowed to DIP in, and should get line-based
  243.    IP address. There are only two modems, for example, thus at most two lines
  244.    incoming.
  245.  
  246.    The user name/login name is "fred", the "ttyS1" line should have server IP
  247.    address 43.65.86.23 and remote end should get IP address "3.4.5.6",and the
  248.    "ttyS2" line should be server "43.65.86.33" and it's remote end should
  249.    get "4.5.6.7" IP addr. 
  250.  
  251.    Then "/etc/passwd" will have an entry:
  252.  
  253.         fred:*:1976:96:Inbound SLIP:/tmp:/usr/sbin/diplogin
  254.  
  255.     And in the "/etc/diphosts" the last two entries will be:
  256.  
  257.   ttyS1::3.4.5.6:43.65.86.23:255.255.255.0:Modem 1 incoming SLIP entry:CSLIP,296
  258.   ttyS2::4.5.6.7:43.65.86.33:255.255.255.0:Modem 2 incoming SLIP entry:CSLIP,296    
  259.  
  260. 6. Same as previous example, but we add user "pete", that has static IP 
  261.    address "9.8.7.6" and server address "43.65.86.43" - then:
  262.  
  263.    In "/etc/passwd" will be:
  264.  
  265.         fred:*:1976:96:Inbound SLIP:/tmp:/usr/sbin/diplogin
  266.         pete:*:1976:96:Inbound SLIP:/tmp:/usr/sbin/diplogin
  267.  
  268.    And in "/etc/diphosts" we'll have:
  269.  
  270.   pete::9.8.7.6:43.65.86.43:255.255.255.0:Pete's personal entry:CSLIP,296
  271.   ttyS1::3.4.5.6:43.65.86.23:255.255.255.0:Modem 1 incoming SLIP entry:CSLIP,296
  272.   ttyS2::4.5.6.7:43.65.86.33:255.255.255.0:Modem 2 incoming SLIP entry:CSLIP,296    
  273.  
  274.  
  275.  
  276. #if 0
  277.  
  278. This is the last version of DIP using the "/etc/diphosts" file.
  279. It has been updated to use the "databits" serial patches, the
  280. "speed" setting bugfix, Jim Seagrave's "echo" and "init" adds,
  281. and Paul Mossip's "dynamic address" patches, as sent to me by
  282. Jeff Uphoff.  Here is his README:
  283.  
  284. -----------------------------------------------------------------------------
  285. For those of us that have our SLIP IP addresses assigned dynamically,
  286. here is a patch for dip that will trap the address when the remote
  287. host 'displays' it.  (This is an option--those that don't want this
  288. need not enable it.)
  289.  
  290. The meat of this patch was written by Paul Mossip (mossip@vizlab.rutgers.edu)
  291. Someone mentioned the existance of his patch, so I emailed him requesting
  292. a copy and he anonymously ftp'd it into my linux box.  
  293.  
  294. I have been using it heavily for several days now, and it works
  295. beautifully.  Bravo to the author!  (And many thanks)
  296.  
  297. I extended his patch a slight bit; whenever I initiated a slip connection,
  298. dip executed a 'route' command that assigned the remote machine's IP
  299. address as both my Destination net/address and my Gateway address.
  300. My connection would not function unless I deleted that route and created
  301. a new one specifying my Destination net/address as 'default'.
  302. I have added 'default' to the set of commands that dip accepts--
  303. if you use it, your Destination net/address will be set to 'default',
  304. if you don't use it, dip sets up the route as it did before.  (This
  305. command, like the ones that Paul added, can either be entered in
  306. dip's command mode, or read in from a script file.)
  307.  
  308. The abilites that Paul's patch added to dip allowed me to totally
  309. automate my SLIP connections, with the exception of the routing change.
  310. This patch has taken the last step; everything is done from a script
  311. file and I haven't had a problem with the address assignment trapping once.
  312.  
  313. Those that have to deal with dynamically assigned IP address will
  314. find this very useful.
  315.  
  316. Thanks once again to Paul Mossip--he put all of the real work into
  317. this patch.
  318. -----------------------------------------------------------------------------
  319.  
  320. The next release of DIP will use a much more powerful scripting
  321. language (derived from the Minicom communications package), and
  322. it will use the "/etc/diptab" "termcap"-like database for its
  323. client hosts.  This will allow for a much more flexible setup
  324. of hosts, and it will allow me to implement a Dynamic Address
  325. Server for DIP, making it usable as a "real" SLIP/PPP dialin
  326. server.
  327.  
  328. Fred, 07/20/93
  329.  
  330. #endif
  331.