The Joy (and Agony) of SLIP
Have you ever wanted to connect your computer to a network? Perhaps you have two computers that you want to run Mosaic, ftp, or X11 between? Do you want to let your friends experience the full power of your magnificent new Linux box? SLIP is one way you can do all these things.
by Warren Baird
SLIP (Serial Line Internet Protocol) is a protocol that allows you to make a TCP/IP connection over a serial line. TCP/IP stands for Transmission Control Protocol/Internet Protocol, and is the protocol used on the Internet and on most local ethernets. Many common Unix programs (like X11, Mosaic, gopher, IRC, talk, telnet and ftp) use TCP/IP to communicate. If you want to use programs like this to talk to the rest of the world over the Internet, or if you want to connect two (or more) local machines, SLIP is a good option.
There are actually two variants of SLIP: normal SLIP, and CSLIP (which stands for Compressed SLIP). CSLIP compresses various TCP/IP headers to give a higher throughput on a serial line. (Note: CSLIP doesn't compress the data that is being transmitted, just the headers added by TCP/IP.) Unfortunately not all systems support it. Even with CSLIP, the throughput on a serial line is quite low compared to ethernet and other Local Area Networks (LANs). It's possible to run high bandwidth applications like Mosaic and xv over a SLIP link, but the response times may be quite low.
One of the most common uses of SLIP is to connect to a commercial Internet provider. There are many companies that provide full access to the Internet by allowing you to make a SLIP connection using a modem.
Another use of SLIP is to connect two or more machines using a null-modem cable. Since SLIP is implemented for many different platforms, you can connect your Linux box to many different types of systems. For example, I have an Amiga 2000 connected to my 386 running Linux 1.0.8.
If you are really ambitious, you can even set up your Linux box as a SLIP server. You could do this to give your friends access to your machine, or as part of a BBS setup.
Configuring something like SLIP under Unix is always very dependent on the flavor and version of Unix that you are running. The details given here are for the Slackware 1.2.0 (Linux 1.0.8) distribution. The exact details may vary somewhat with other versions of Linux and other distributions.
There is a whole host (no pun intended) of files that control the behavior of a Unix system, and a number of them need to be modified to set up SLIP.
Looking up host names: /etc/hosts, /etc/resolv.conf, and /etc/host.conf
The /etc/hosts file maps hostnames (for example acme.gadgets.com) to IP addresses (for example 220.127.116.11). If you are using SLIP to connect two local machines, your /etc/hosts file only needs to contain the hostnames and IP addresses of your two machines. If you are connected to a larger network, but talk to only a few sites, you can put their names and IP addresses in your /etc/hosts file.
If you are connecting to many hosts (or using a program like Mosaic that connects to many hosts), you'll need to tell your system who it should ask to find IP addresses for unknown hostnames. There are systems called nameservers that will lookup an IP address for a given hostname. The /etc/resolv.conf file tells your system which nameserver(s) to use. It also tells your system what your domain name is. The domain name is your full hostname with the machine name removed—for example, if your hostname is acme.gadgets.com, your domain name would be gadgets.com.
If your domain name is gadgets.com, and you have a nameserver at the IP address 18.104.22.168, your /etc/resolve.conf file could read:
domain gadgets.com nameserver 22.214.171.124
It's possible to list multiple nameservers in a resolve.conf file. The /etc/host.conf file tells the system what order it should use to lookup hostnames. Normally this file contains
order hosts,bind multi on
which tells the system to check the /etc/hosts file first, and then to try any nameservers it knows about.
The names of the Internet startup files vary even between different Linux distributions. On most Linux systems the files used are /etc/rc.d/rc.inet1 and /etc/rc.d/rc.inet2. Whichever startup file is used, there are a number of daemons that must be running for any TCP/IP program to work. The NET-2 HOWTO describes which daemons are available, and what they do. Minimally, you need to have the inetd daemon running. The inetd daemon coordinates the startup of many other TCP/IP daemons.
Additionally, if you are setting up a permanent link to another computer over a dedicated line, you may want to actually initialize the SLIP link in the startup files.
|HPC Cluster Grant Accepting Applications!||Jan 28, 2015|
|Sharing Admin Privileges for Many Hosts Securely||Jan 28, 2015|
|Red Hat Enterprise Linux 7.1 beta available on IBM Power Platform||Jan 23, 2015|
|Designing with Linux||Jan 22, 2015|
|Wondershaper—QOS in a Pinch||Jan 21, 2015|
|Ideal Backups with zbackup||Jan 19, 2015|
- Designing with Linux
- Red Hat Enterprise Linux 7.1 beta available on IBM Power Platform
- Wondershaper—QOS in a Pinch
- Internet of Things Blows Away CES, and it May Be Hunting for YOU Next
- Ideal Backups with zbackup
- HPC Cluster Grant Accepting Applications!
- Sharing Admin Privileges for Many Hosts Securely
- Slow System? iotop Is Your Friend
- Hats Off to Mozilla
- diff -u: What's New in Kernel Development
Editorial Advisory Panel
Thank you to our 2014 Editorial Advisors!
- Jeff Parent
- Brad Baillio
- Nick Baronian
- Steve Case
- Chadalavada Kalyana
- Caleb Cullen
- Keir Davis
- Michael Eager
- Nick Faltys
- Dennis Frey
- Philip Jacob
- Jay Kruizenga
- Steve Marquez
- Dave McAllister
- Craig Oda
- Mike Roberts
- Chris Stark
- Patrick Swartz
- David Lynch
- Alicia Gibb
- Thomas Quinlan
- Carson McDonald
- Kristen Shoemaker
- Charnell Luchich
- James Walker
- Victor Gregorio
- Hari Boukis
- Brian Conner
- David Lane