Notes on Klos PPP ----------------- Klos PPP is a Novell ODI driver for use over a PPP link. It is capable of emulating an Ethernet (class 1) packet driver, using IPSTUB.EXE. There are various versions of Klos PPP floating around under various names; the current official version is obtainable by ftp or WWW from Klos' site: ftp://ftp.klos.com/ http://www.klos.com/ I do not have a license to distribute Klos's driver, so I can't put a copy on my site; you will have to get it from them. You will probably want to get PPPSHARE and not PPPDEMO (the exception is if your provider uses CHAP authentication - see below). PPPDEMO is time-limited to 15 minutes of connect time and doesn't add a whole lot of features. Klos PPP requires DOS 3.3 or later. Klos PPP really runs best on a 386 or above with a modem having a 16550AN UART (it isn't the most efficient program in the world). You are likely to have varying degrees of trouble with modems having an 8250 or 16450 UART, or with an older machine. The trouble is in getting it set up, though; once you get it working, it is quite reliable. You can use the program FIND_COM.EXE, included with Klos, to find out what kind of UART your modem has. 8250 UART's probably will not work with Klos at any speed in any machine. I tried using an old 2400-baud modem with an 8250 in my 1000TL (8MHz 286XT). PPP.EXE failed to detect the modem the first time. If I typed "PPP" again, the modem would be detected, and PPPMENU would dial it, but it never connected. According to the Bobcat documentation, nobody has ever gotten a modem with an 8250 UART to work with Klos PPP. In fact, I seem to recall Michael Klos telling me once that an 8250 would not work, but I don't have his email any more. Modems with 16450 UART's may work somewhat, but you probably won't be able to use them at their full rated speed. I have a 14400-baud modem, and FIND_COM detects the modem serial port as a 16450. (The modem has the Rockwell chipset and has the equivalent of an FIFO for incoming data only, but it is transparent to software.) Theoretically, the optimal baud rate (DTE rate) for a 14400-baud modem with V.42bis data compression is 57600 (i.e., 4 times the DCE rate of 14400 - with MNP 5 data compression, the optimal DTE rate is 2 times the DCE rate). Klos PPP would not run at that rate with that modem, however. In a 386DX/33, I was able to set the baud rate to 38400, ignoring the warning from PPP.EXE about how rates above 19200 were not recommended for serial ports without FIFO's (i.e., 16450 UART's). I subsequently took the modem out of the 386 and moved it over to my 1000TL. In the TL, the highest baud rate possible is 19200, but 14400 works better. Since I can't go above 14400 in the 286 anyway, I just disabled data compression in the modem init string. So anyway, the rate you can get using Klos PPP with a 16450 UART depends on the speed of your machine. The Bobcat documentation states that a 16450 will not work at all in an 8088. If the rate is too high, PPPMENU will lock up the machine during dialing. Note that the DTE rate (the rate you set in PPPMENU) should not be less than the DCE rate (the modem's connect speed), so if you have, say, a 28800 modem and you can only go 14400, you need to adjust the modem's init string so that it will connect at 14400 (and disable data compression as well). If you have a 16550AN UART on your modem's serial port, then most likely you can set the baud rate to the optimum for your setup (see above), at least if you don't have a really fast modem with data compression and a really slow computer. Certainly you should try it in any case. You can reduce it if you get a lockup. The author of Bobcat reports that he has Klos PPP working in an 8088 with a 14400-baud modem having a 16550AN UART. Your modem should have hardware error correction and flow control. If Klos PPP does not work with your modem, try Etherppp; it is more tolerant of old hardware. Some programs work better with Etherppp, but most work better with Klos PPP. DosLynx will not work very well at all with Etherppp, but it works reasonably well with Klos. One nice feature about Klos PPP is that parts of it can be loaded high, if you have DOS 5.0 or later and at least a 386, or if you have an older computer with an LIM 4 EMS card that provides upper memory blocks. This can give you a lot more space to run Internet applications in than with Etherppp loaded low. Etherppp can be loaded high as well, but it takes up a hefty chunk of RAM, so loading high is easier with Klos' modular architecture. The documentation for Klos PPP is nearly nonexistent. (The full retail version of Klos PPP might come with documentation and support.) First off, do not attempt to follow the instructions that come with Klos PPP. You can't just type: LSL PPP IPSTUB PPPMENU PPPWAT DOSLYNX.CFG DOSLYNX and have it work. LSL.COM, PPP.EXE, and IPSTUB.EXE will not run properly until NET.CFG has been created - so the first thing you need to do is run PPPMENU.EXE to create that file (it is a very bad idea to try to edit NET.CFG by hand). In all the following, you should be in the directory where you installed PPPSHARE. So type PPPMENU. You will see the word "Current" highlighted at the top left. Hit . It will say, "Enter NET.CFG File Name". The default is NET.CFG. Hit to accept the default. It asks if you want to create the file. Say "Yes". A box saying "Configure Menu" will appear on the screen, with items "Port", "Modem", "Scripting", "LCP Parameters", "IP Parameters", "IPX Parameters", and "Authentication". You will go down the list and configure them all. Each one leads to another menu of configuration items. In a menu, you use the and keys to highlight the item you want to change, then press to select the item. Use to retract a menu or exit an item after configuring it (try first with items). Highlight "Port" on the "Configure Menu" and press to select it. The items in this menu are "I/O Port", "Interrupt", "Baud Rate", "Flow Control", "Open Type", "Listen", "Connection Type", and "Frame Type". Select "I/O Port" to tell Klos PPP where your modem is. If your modem is on a standard COM port, select the port; otherwise, select "Special" and enter the hexadecimal port address. When done, press to save the I/O port and get back to the "Port Menu". If you don't know where your modem is (you should really have this information written down somewhere), you can use the FIND_COM.EXE program that comes with Klos to find out. If you have your modem on a standard port, you don't need to mess with "Interrupt" since it was set when you selected the I/O port. If not, or if your modem is using a nonstandard interrupt, select the interrupt number from the list and press . Next select "Baud Rate" and choose the baud rate for your modem. For newer modems with data compression, you probably want to choose a rate 2-4 times higher than the modem's rated rate. For example, with a 14.4k modem using data compression, select 38400 or 57600. If necessary, you can reduce the rate later to not less than the connect speed. With a 14.4k modem in my 386, 38400 works fine, but so does 19200, it just isn't as fast. See above for more information on selecting a baud rate. If you set the rate too high, your machine may lock up when you try to connect; if that happens, you will have to reboot and come back here to set a lower rate. In any event, press to get back to the menu when you've set the rate. The choices for "Flow Control" are "Hardware", "Software", "Both", and "None". "Hardware" is probably required; if necessary, you will need to set your modem's init string later to enable hardware flow control. For "Open Type", set it to "Active". "Listen" controls whether the modem should answer the phone when someone calls in. I'm assuming you want to call out instead, so set that to "Don't Answer". For "Connection Type", there are 5 choices, of which I have found only 2 to be useful: "Modem" and "Modem - Auto Dial" (Michael Klos says that "Demand Dial" is useful as well, but I can't tell the difference between that and "Modem"). If you set this to "Modem - Auto Dial", PPP.EXE will automatically dial the modem and log on for you using the script you will create later. If you set it to "Modem", you will have to run PPPMENU again to dial the modem. It is probably a good idea to set this to "Modem" to begin with, so you can see any error messages that might be generated at connect time. Later, when everything is working, you can set it to "Modem - Auto Dial" for easier connecting. If you absolutely cannot write a script, set it to "Modem" and you will be able to log in manually via a terminal screen through PPPMENU. "Frame Type" should be set to "PPP". IPSTUB.EXE will convert the PPP packets to Ethernet packets. Press to retract the "Port Menu", then select "Modem" to pop up the "Modem Menu". The items in this menu are "Phone Number", "Modem Name", "Command Strings", and "Timers/Counters". For "Phone Number", enter the phone number you call to reach your provider's machine. "Modem Name" can be left blank. I can't tell what it's supposed to be for. Selecting "Command Strings" pops up another menu. The items here are "Initialization String 1", "Initialization String 2", "Initialization String 3", "Dialing Prefix", "Answer String", and "Hang-up String". These are commands that PPPMENU or PPP.EXE will send to your modem. For "Initialization String 1", enter your modem's init string. For me, this is "ATZ" (no quotes) since I have already set up my modem's NVRAM to enable error correction and data compression, to hang up when DTR is dropped (&D2), and to cause DCD to follow the true state (&C1). If you don't know what init string to use, the "AT&F" should be okay on newer modems. "Initialization String 2" and "Initialization String 3" should be set to null strings (erase whatever's there), unless you have a really long init string and your modem can't take it all at once. I find it is helpful to turn the sound up on the modem (L3) so I can hear what's going on. If you find later that you can't connect at your modem's full rated speed, you can change the init string to disable data compression and/or force a lower-speed connection. "Dialing Prefix" is "ATDT" by default. Set it to "ATDP" if you don't have touch-tone phone service (most people do nowadays). "Answer String" is the command to make the modem pick up the phone. "ATA" is standard for Hayes-compatible modems, so leave it alone. It will never be used anyway unless you set "Listen" to "Auto Answer" before, which you shouldn't have. "Hang-up String" is the string to hang up the modem. "ATH0" is the default and should always work, though "ATH" might be the correct string on older modems. It appears that the "Hang-up String" is only used by PPPMENU.EXE; PPP.EXE, when you unload it, seems to hang up the modem by dropping DTR. Since normally you will end the call by unloading the PPP driver, the hangup string you put in here won't be used much. If for some reason you can't configure your modem to hang up when DTR is dropped, you might have to run PPPMENU to hang up your call using the string you enter here. Back in the "Modem Menu", "Timers/Counters", when selected, pops up another menu. The items in this menu are "Dial Retries", "Connection Time Out", "Pause Time", and "Inactivity Time". The number you give for "Dial Retries" is the number of times that PPP.EXE will try to reach your provider's number if their phone is busy, if you selected "Modem - Auto Dial" for the "Connection Type" before, or the number of times that PPPMENU will try if you selected "Modem" and dial with that program. "Connection Time Out" is the amount of time in seconds that PPPMENU or PPP.EXE will allow to set up the PPP connection after reaching your provider's machine. The default timeout of 90 seconds is ample, and you shouldn't need to change this. "Pause Time" is the amount of time in seconds that PPP.EXE or PPPMENU will pause between attempts to call your provider if their line is busy. The default is 5 seconds; you can make it longer if you like. "Inactivity Time" is the amount of time that Klos PPP will allow to pass with no traffic through your modem connection before it disconnects you. The default is 5 minutes. Marc was mystified for a while at how he was being cut off every so often until he found this. You might want to make this longer. Most providers have their own inactivity timer and will cut you off from their end after a while if you don't do anything. Retract the "Modem Menu" to get back to the "Configure Menu". The next item is "Scripting". This is where you set up the login script for your provider. There are 8 possible lines of script, "Script1" through "Script8". For each line, there is a string to be expected from the provider's machine, a string to respond with, and a timeout period in seconds in the event the provider's machine doesn't give the expected string. I got the information for my provider by looking at the login script for their Windows software; another way to find out would be to simply call them with a normal communications program and see what you get. It is a good idea not to include the first letter or two in the expected string, since there may be noise or whatnot and it may be missed. Anyway, for me, the "Expected String" for "Script1" should be set to "ogin:" (without the quotes). The "Script Response" was my username. "Does this response need a carriage return?" it will ask. It does. The script timeout should be set to 10 seconds or longer. For "Script2", I set the "Expected String" to "ssword:". Set the "Script Response" to the assigned password. It needs a carriage return. The timeout should be 10 seconds again. For "Script3" on Agate, I set the "Expected String" to "beginning...." and set the "Script Response" to nothing (i.e., leave it blank). It did *not* need a carriage return. Basically I was just waiting for the "Expected String" to arrive before beginning PPP negotiation, and not sending anything back. The default timeout of 5 seconds worked fine. I left the rest of the scripts blank, since at that point I was connected. Once you have set the scripts, the carriage returns you specified will appear as "\r" in the "Script Response" strings, in case you need to go back and change the script later. Back in the "Configure Menu", the next item is "LCP Parameters". Select it to pop up the "LCP Configuration Menu". This menu has 5 items: "Maximum Receive Unit", "Async-Control Map", "Magic Number", "Protocol Compression", and "Address/Control Compression". If your provider can't help you with these, you will just have to guess and try different settings. I'll give the settings I used. "Maximum Receive Unit", as I understand it, is the size of the biggest packet your PPP client will agree to receive from the gateway. LSL.EXE will use this setting when allocating buffers for the PPP link. Klos recommends leaving it at the default of 1500 bytes. Some DOS programs have their own "mss=" settings, and this MRU should probably be no smaller than any of those. Smaller packets help over a noisy phone line, but it is better to set mss in the apps rather than setting MRU real small here. "Async-Control Map", again as I understand it (I'm no real expert), is a bitmap of control characters that need to be escaped during transmission from the provider's machine to yours. The default value is all zeroes, i.e., "00000000", and that should be fine. If you had set "Flow Control" to "Software" before, you would have to use a bitmap that caused the XON and XOFF characters to be escaped (000A0000). Software flow control probably won't work, though, and you should not have selected it. The pppd man page in Linux recommends an asyncmap of 20000000 if you are going to be using telnet, 200A0000 if using telnet and software flow control, and FFFFFFFF if using rlogin. FFFFFFFF is the safest (and slowest) choice, but as I said, 00000000 shouldn't cause any trouble for most people. "Magic Number" is "a mechanism to detect self looped connections," Michael Klos says. The default here is different in different versions of Klos PPP. Again according to Mr. Klos, "it should be as randomly selected as possible and unique to the individual if at all possible." Leaving it at the default whatever that happens to be seems to work for me. I set "Protocol Compression" to "On", and set "Address/Control Compression" to "On" as well (my provider advertised "CPPP," where the "C" stood for compression). It probably doesn't matter much, but you might try turning these off if you can't connect. Back to "Configure Menu" again to select "IP Parameters", which pops up the "IP Configuration Menu". This menu has 3 items: "Enable/Disable IP", "Header Compression", and "IP Address". For "Enable/Disable IP" you obviously want to "Enable IP" (Internet Protocol) if you want to get on the Internet. "Header Compression" didn't seem to make any difference for me, so I just left it at "Disable". VJ header compression is generally used with SLIP, not PPP. For "IP Address", you can enter your IP address if you have a statically allocated address. It is okay to leave it at the default of "000.000.000.000", though; the gateway knows your IP address and will tell PPP.EXE what it is. The next item in the "Configure Menu" is "IPX Parameters". IPX is the protocol suite for Novell networks. Since you are connecting to the Internet rather than a Novell LAN, there is no reason to configure that stuff. At any rate, select "IPX Parameters" to pop up the "IPX Configuration Menu" and verify that IPX is disabled. The last item in the "Configure Menu" is "Authentication". Select it to pop up the "Authentication Menu". I set it to "None" - my provider authenticated me using the username and password I gave in the login scripts before. If your provider uses PAP for authentication instead, you need to give your username and password here. If your provider uses CHAP for authentication, you can't use PPPSHARE, which doesn't support CHAP. (PPPDEMO supports CHAP, and if you have to use it you will probably want to buy the full version of Klos PPP to get around the time limit. Try PPPDEMO first, though, to make sure their software will work on your machine; it is set up the same as PPPSHARE.) You're done (whew!). Press to exit the "Configure Menu". You will be asked if you want to "Save Changes?". Select "Save and Write NET.CFG", then press to exit PPPMENU. "Exit PPP Connect?" it says. "Yes", you say, "very much" ;). Now you see whether it works. Enter the following commands at the DOS command line, while you are in the directory where you installed PPPSHARE: LSL PPP IPSTUB If you followed the recommendation above and set "Connection Type" to "Modem", you're not connected yet, and the modem is not dialing. (If you didn't and set it to "Modem - Auto Dial", it should be dialing and you will know soon if you got the settings right.) You need to type PPPMENU now to dial the modem. After you press to get rid of the nag message, the bottom of the screen will be filled with a lot of obscure junk: "Overrrun Errors", "Framing Errors", "LCP State", etc. Michael Klos assures me that this is useful information, that for example "Overrun Errors" indicate that the modem is too fast and you need a 16550AN UART to go at the speed you're trying to use, that "Framing Errors" indicate line noise, and that "LCP State" indicates whether you got the PAP name and password right. I'm afraid that most of it is Greek to me, however. The "Main Menu" will be displayed. This menu has 5 items: "Connect", "Status Displays", "Terminal Mode", "Hang-Up", and "Exit". Highlight "Connect" and press . A new box will appear labelled "Profile List", and "Current" will be highlighted. From here you have two useful choices: you can press F1 to go back and edit NET.CFG again, or you can press and try to connect. (It is also possible to press to enter a new "profile" if you have more than one modem or something, or to delete a "profile" - but you probably don't need to know that.) Sometimes changes you make via F1 from here don't take effect until you unload and reload IPSTUB, PPP, and LSL (or until you reboot). Right now you want to press to try to connect. Messages will appear in the box: "Initializing modem", etc. If Klos PPP is going to work, you should get connected pretty quick unless the phone line is busy. If it seems to get stuck, you can select "Hang-Up" to hang up the modem using the string you gave before. If you suspect your scripts are wrong and want to try logging on manually, select "Terminal Mode" to get a terminal screen where you can interact with the gateway directly. Selecting "Status Displays" gives a different set of obscure information on the bottom of the screen (it is a 3-way toggle - select it 3 times and you're back to the first set of technical info). (Sometimes if you select "Status Displays" to change the display before dialing, Klos will connect where it wouldn't otherwise - the display of incoming interrupts is apparently a real CPU burner. The first status display has the most useful information, though.) If all goes well, the message "LCP Open" will appear at the top right, followed soon thereafter by "IP Open". Once "IP Open" appears, you're connected, and you can select "Exit" from the menu. It asks for confirmation. Say "Yes". At that point you can run whatever DOS Internet programs you have configured. The Klos documentation says that you should now use PPPWAT.EXE to modify DOSLYNX.CFG (you need to have created the file before, using the documentation that comes with DosLynx). If your provider uses dynamic IP address assignment (a different IP address each time), you can use PPPWAT to modify the WATTCP.CFG (or equivalent) of any application that uses the Waterloo TCP/IP stack. I don't recommend that, though; DOSLYNX.CFG and/or WATTCP.CFG should be edited by hand, and running PPPWAT will only screw things up. There is no BOOTP or RARP support. Michael Klos once told me that RARP would be included in a future version (which it may be by now). Once you're tolerably sure that Klos PPP is working right, you can go back into PPPMENU (without loading LSL, PPP, or IPSTUB) and edit NET.CFG to change the "Connection Type" to "Modem - Auto Dial". (If Klos PPP is not working right, you also run PPPMENU without loading the drivers to change NET.CFG.) Once you do that, you won't need to run PPPMENU any more; PPP.EXE will automatically dial the modem and log you in when you load it. Of course, you will want to automate the process of logging in, so assuming you have PPPSHARE installed in directory c:\pppshare, you could make a batch file like this: ----------- example PPPOPEN.BAT file for Klos PPP ------------ @echo off rem PPPOPEN.BAT - Opens PPP connection using Klos PPP. rem Change to the drive and directory where Klos PPP is installed. c: cd \pppshare rem Load the 3 required TSR's. The modem will start dialing after rem PPP.EXE is loaded. Precede the lines for ppp and ipstub with rem "lh " to load them high. Omit " > nul" if you want to see the rem commands' output. lsl > nul ppp > nul ipstub > nul rem Tell the user what's going on. echo Waiting for PPP connection, press control-C to abort. echo (You will need to run PPPCLOSE.BAT after halting the batch job echo to halt dialing and unload the drivers if you abort.) rem Break needs to be on so that control-C will be seen. This is where rem it helps to have the modem's volume turned up so you can hear whether rem you're getting carrier or not (i.e., busy signal or dead phone line). rem If connection is successful, or if PPP.EXE did not load for some rem reason, we'll turn break back off down below. If this batch file is rem aborted, PPPCLOSE.BAT will turn break off. break on rem Test the status of PPP negotiations repeatedly until success (or rem until the user hits control-C to halt the batch file). PPPSTATE.EXE rem returns: rem errorlevel 0 if LCP negotiation succeeds (connection is open) rem errorlevel 1 if LCP is not established yet rem errorlevel 2 if PPP.EXE is not loaded :test pppstate > nul if errorlevel 2 goto error if errorlevel 1 goto test goto success rem Error - PPP.EXE didn't load. :error echo PPP.EXE failed to load, connection not established. goto done rem Connection successful. :success echo PPP connection established. goto done rem Change (back?) to the root directory on drive C:, and turn break rem back off. :done break off cd \ ----------- end example -------------------------------------- PPP.EXE and IPSTUB.EXE can be loaded high if you have UMB's available. Precede each command with "lh ", as indicated. PPPSTATE.EXE will not detect a busy signal, dead phone line, or wrong number, so it is good if you have the modem's volume turned up so you can verify that you are in fact getting connected. When you're done, you need to break the PPP connection and hang up the phone. You might do that with a batch file like this: ----------- example PPPCLOSE.BAT file for Klos PPP ----------- @echo off rem PPPCLOSE.BAT - Closes PPP connection for Klos PPP. rem Turn break off in case it was left on by PPPOPEN.BAT. break off rem Change to the drive and directory where Klos PPP is installed. c: cd \pppshare rem Unload the drivers in reverse order. If you want to see the output, rem omit " > nul" from these lines. ipstub u > nul ppp u > nul lsl u > nul rem Change (back?) to the root directory. cd \ rem Tell the user what happened. echo PPP connection closed. ----------- end example -------------------------------------- This will break the connection and unload the 3 TSR's, assuming you have your modem set up to hang up when DTR is dropped. Otherwise, you will probably need to run PPPMENU and select "Hang-up" from the menu to hang up the modem before you unload the drivers. It is also possible that PPP.EXE will refuse to unload on some machines. In that case, you can either (1) do a hard reboot to break the connection and unload the driver; or (2) use PPPMENU to break the connection and leave PPP.EXE resident.