Subject: revised SLIP instructions Newsgroups: comp.os.linux.misc Here's a revision of my SLIP instructions, for 0.99pl12 through 1.0. These are instructions for configuration SLIP, for 0.99pl10 through pl12 with the net2 utilities. At the end there is a list of common problems and solutions. First, a note on where to get the utilities: The original version of this was done with very old binaries. However by the time you read this, Linux 1.0 should be out, with a new set of network binaries. I'll try to indicate the differences for different versions. But there's really no good reason to use old software. Many bugs have been fixed recently. There should be no problem finding a current kernel. Both tsx-11.mit.edu and sunsite.unc.edu should have at least 0.99pl15. However the utilities can be somewhat of a problem. I'm hoping that a whole new set of utilities will be released for 1.0. However at the moment they are available only in source form, on ftp.funet.fi, in /pub/OS/Linux/PEOPLE/Linus/net-sources. In order to simplify things, I've put some of the key utilities on athos.rutgers.edu, in /pub/linux: dip, route, and trf.tar.Z. (trf.tar.Z contains telnet, rlogin, and ftp). It's important to have current versions of dip and route. telnet, rlogin, and ftp aren't particularly critical to getting SLIP started. I've included them just because they're the most important utilities, and I don't have space for everything. I've also included a kernel, though it may not be suitable for your machine. It has no SCSI support, and only supports WD80x3 Ethernet. It's based on the final 1.0, with a couple of minor TCP fixes that didn't quite make it into the release, but should be in the first patch. It's call kernel-1.0. Note by the way that the new network utilities are intended to be used with a fairly recent libc. I'm using 4.5.19. I've seen reports of problems with newer libc's, but I'm not sure that they were using this version of the utilities. The old distribution is on tsx-11.mit.edu, in /pub/linux/packages/net/net-2/binaries. There are some newer programs in /pub/linux/packages/net/new-net-2. However even those are very out of date compared to the set that is to be released with 1.0. >b) Is their any easy config guide for NET-2 ? I down load the binaries > (base+ext+std) from tsx-11 and base has alot symbolic links pointing > to /conf/xxxx which does not exist ??? This depends upon the programs you want to use. For the set I use (which is just the more common ones), all I seem to need is host.conf and resolv.conf. Many users will also want /etc/hosts. The rest of them are files for specific services or specific options of services, which you may not need in a simple SLIP environment. (E.g. exports is for running an NFS server, not very likely over SLIP.) The way I have it set up is with the following files on /etc: hosts: a single line listing my host only (seems to be needed by dip): 128.6.200.2 foo.rutgers.edu foo Obviously you'll use your own IP address and host name. You give the IP address, the full hostname, and the abbreviation (i.e. just the part up to the first dot). In the case of SLIP, it's possible that you won't know your IP address until you dial. Often it is assigned dynamically at that point. In that case you don't have a real hostname. There's probably a name associated with the SLIP line, but it's probably something like foo-slip-201-555-1212.rutgers.edu, and of course it will be different each time. In this case you seem to need to set a fake hostname, e.g. your last name, with the hostname command. Otherwise X gets confused. But I do not recommend putting this name in /etc/hosts. Indeed I don't have an /etc/hosts at all. If you use the loopback network, you'll probably want an entry 127.0.0.1 localhost In that case you might give your fake hostname as an alias, e.g. 127.0.0.1 localhost foo The hostname you use won't matter unless you use services that cause you to pass a hostname to the other end, e.g. mail, news, and the Berkeley r commands. For simple telnet and ftp it doesn't matter. (I always call my machine hedrick.rutgers.edu, but I'm not using any fancy services.) If you need to use services that depend upon a hostname, you'll need to arrange a real entry in your host table. Talk to your network managers. host.conf: one line specifying the order in which to use the hosts file and the resolver. I suggest order hosts bind resolv.conf: your domain and nameserver. For Rutgers this would be domain rutgers.edu nameserver 128.6.4.4 The domain is what you want to be tacked onto the end of host names you type if you don't say otherwise. E.g. if domain is set to rutgers.edu, and you say "telnet foo", you'll get foo.rutgers.edu. You can of course always specify a full name and override that default. The nameserver is the address of a machine that will provide name service for you. You'll want to pick the nearest name server to the system you dial into. Your systems support staff should be able to help you here. One approach would be to look at /etc/resolv.conf on a system at your site. You should be able to use whatever nameserver is listed there. 128.6.4.4 will actually work from elsewhere, but it's considered unfriendly to do name lookups across the network. (I'd say it's OK to use for testing purposes, but you should find a server at your site.) To start up SLIP: 1) dial using kermit or some other program. Get SLIP turned on. (I can't help with that. It depends upon the system you're using.) 2) run dip. E.g. dip -t get $remote 1.2.3.4 in old versions: remote 1.2.3.4 port tty65 speed 19200 get $mtu 192 in old versions: mtu 192 mode CSLIP or mode SLIP. old versions only support SLIP Instead of 1.2.3.4, use the IP address of the system you have dialed. Not the address it assigns for your machine, but the address of the terminal server or Unix box that is running SLIP for you. for tty65 use the name of the tty line on your machine (probably something like ttys0) for 19200 use whatever speed your modem is set for You must use SLIP or CSLIP, depending upon whether or not the system you are talking to supports header compression. If so, use CSLIP, if not use SLIP. The way you select between SLIP and CSLIP depends upon the age of the kernel and dip: For older kernels and dip, you must select when you build the kernel. In the "make config" dialog, you're asked whether to use CSLIP or not. To change between SLIP and CSLIP, you must change kernels. For newer kernels, you still specify CSLIP when you build the kernel. However that simply acts as a default. If you are using a new version of dip and a new kernel, the mode you select in dip will override the default built into the kernel. Note that the $ is an actual dollar sign. If you're doing this in a script, you'll have to quote the $, since the shell takes that specially. If you have a permanent IP address, you will have an entry for your system in /etc/hosts. dip will look up the local hostname and use that address automatically. If the address is dynamically allocated by the SLIP server, you'll have to arrange to tell dip what your address is. The simplest way is to use bootp. At the moment you'll need a copy of dip from athos.rutgers.edu:/pub/linux. With it, use the commands dip -t port tty65 speed 19200 get $mtu 192 bootp mode CSLIP or mode SLIP If you're using an older version of dip, you must arrange to tell dip your IP address, either by writing a dialup script for DIP that looks at what the SLIP server prints out, finds the IP address from some message it prints, and then uses the command "get $locip xx.xx.xx.xx" Alternatively, you can arrange to make an entry in /etc/hosts before running dip. (Note that you'll have to update this entry every time you dialup, since your IP address will be different each time.) It starts out by looking up the local hostname. If the entry for it in /etc/hosts is correct, then things will work. 4) dip will exit. "ps agx" should show that it is still running. Now /etc/route add default dev sl0 /usr/etc/inetd This assumes that you're using a kernel that's at least 0.99pl15, and the version of route that goes with it. If your route doesn't recognize the "dev" option, try /etc/route add default gw 1.2.3.4 where 1.2.3.4 is the same address you used above. Run inetd only if you want incoming services. For initial testing, I wouldn't use it. (Note that in newer setups, route may be in /sbin and inetd in /usr/sbin) 5) now try some tests, e.g. ping 1.2.3.4 or telnet 1.2.3.4 Now try it with a hostname ping foo or telnet foo ----------------- Here's a list of common problems and solutions: 1) connections open, but no data flows. For this problem to apply, it must apply for all destination hosts, and no data must flow at all. In this case, the most likely alternative is that your system disagrees with the system you're talking to about whether to use CSLIP. To fix this, you must change the setting on either your system or the SLIP router. The ideal situation is to enable header compression on both. But if you can't control the other end, you may have to disable CSLIP on Linux. See the previous section for how to do that. Note that header compression makes a major difference to responsiveness of the system. I would not be interested in SLIP without header compression. Echo delay is just too painful. You might want to consider kermit or term if your SLIP router doesn't understand header compression. (On the other hand, header compression is widely available, so I'd think you should be able to enable it on the SLIP router.) 2) connnections open, data flows, but wherever I try to send more than a few lines of output, the connection hangs. This is probably a disagreement about "MTU" (maximum packet size). The mtu that you specify to dip should agree with the MTU of the system at the other end. If it's larger, you can have this problem. It's common for SLIP implementations to be limited to MTU of 1006. So if you're using an MTU of 1500, that could be the problem. Try lowering your mtu. Reasonable values to try are 512 and 192. 3) Things work erratically. Connections open, but eventually hang. Timeouts shown in netstat -o are long. Typically you'll have more trouble with hosts on the Internet than with local hosts. As Linux has moved from 0.99pl10 (the first version in which SLIP worked at all) to pre-1.0, we've been fixing bugs that would cause this sort of trouble. Thus if you're seeing trouble, it's always best to get the newest kernel. 4) I'm not sure what the exact symptoms for this one would be, but they might be similar to 2 or 3. I.e. some things would work, but there would be erratic failures or hangs. - flow control must be set up properly between the computer and modem. Thus is true at both ends. (Of course flow control is only one possible problem in modem setup. You also need to make sure that the modem and line speeds match, etc.) In general if you're using a simple v.32 modem, you may be able to do without flow control. However if your modem does error control, compression or speed-matching, then you'll need to talk to it at a higher speed than the data is actually transferred at, and depend upon flow control to throttle the data. At any rate, the modem and computer must agree. - the only flow control that is practical for SLIP is hardware flow control. Flow control using ^S/^Q (XOFF/XON) is not practical. The most common kind of hardware flow control is RTS/CTS, so called because it uses the RTS and CTS lines to handle flow control. The version of "dip" I have seems to set RTS/CTS flow control all the time (which is certainly appropriate). In that case, you'd want to make sure that the modem used with your Linux system has RTS/CTS flow control enabled. 5) I get "no route to host" or "network unreachable", or something similar. Probably you don't have a default route. by default dip sets up a route to the SLIP router, but nothing else. Try "netstat -n -r". Here is the correct display under pre-1.0: Kernel routing table Destination net/address Gateway address Flags RefCnt Use Iface default * UN 0 8055 sl0 128.6.4.54 128.6.4.54 UGH 0 1 sl0 You should have a host route (flags includes "H") to the slip server you're connected to, and a default route that does not include "H" in the flags field. (It doesn't much better whether "G" appears or not -- that depends upon how the routes were set up.) If the default route is missing, Try /etc/route add default dev sl0 This assumes you're using a fairly recent version of route, e.g. the one on ftp.funet.fi in /pub/OS/Linux/PEOPLE/Linus. It is possible to get things to work with older kernels and versions of route, but the possibilities become too confusing to describe here. With 0.99pl15 or later and that version of route, these instructions should work.