-->
Previous Table of Contents Next


The dip command stands for dialup IP connections, that is, a TCP/IP connection between your Linux system and some other system. The connection is made over a serial line (and presumably a phone line and modem) instead of the traditional Ethernet or other TCP/IP connection. On top of the serial line connection, dip implements one of a number of serial-line Internet protocols, including SLIP, CSLIP (Compressed SLIP), and PPP.

Thus, without a direct hard-wired network link, you can establish an IP (network) link over a phone line. This is very useful for connecting to an Internet service provider. The way this works is that all data going between the two computers is sent over the serial line. At each end, the data is converted into network packets and sent to the appropriate programs. To most programs on either end, there is no real difference between this type of link and a direct network connection, except that serial-line links are typically much slower than direct network connections.

You can use dip for both incoming and outgoing dialup links.

When you dial out with dip, you can configure a chat script to set up a link to your remote system. The chat script contains things like which serial port to use, the system (host) to connect to, what speed to set the modem, the protocol (e.g., PPP, SLIP, etc.), and so on.

You can also use dip to manage incoming connections. Users then login normally over a serial link, but the “shell” launched on login is not bash or csh, but diplogin.

In this case, you can set up a program called diplogin as the “shell” to execute for a particular user in the /etc/passwd file. (Normally, diplogin is a link to dip with the -i option to set dip into input mode. Upon login, dip looks up the user’s name in the /etc/diphosts file. Each entry in this file is a lot like the system password file, /etc/passwd. For each user, you can have an extra external dial-in password to add an extra level of security—a useful thing in the wild atmosphere of the Internet.

Upon successful login, dip sets up a network connection between the dial-in line and your Linux system, using the protocol specified in the /etc/diphosts file for the given user who logged in. Normally, this is CLSIP, SLIP, or PPP.


NOTE:  Dip also supports dynamic IP address allocation. See the online documentation for more on this.

Because dialup Internet connections are so individualistic (we’ve dealt collectively with both static and dynamically allocated addresses), we’re going to leave it up to you to configure dip. You’ll want to read carefully through the online-manual pages for dip, as they contain plenty of examples. They also contain example scripts, which you can adapt to automatically log you on a remote connection.

To help make the first connection, it’s very handy to run dip in test mode. To run it, use the following command line:


     gilbert:/$ dip -t



     dip>

The -t option tells dip to accept interactive commands. You can use these interactive commands to find out more information about what steps work and what steps don’t while you’re debugging a dip connection.

Unfortunately, there is no really easy way to set up dip. You can find out more about dip and its configuration options by looking in the /usr/doc/dip directory.

Linux’s PPP Tools

We recommend that you use the PPP protocol instead of SLIP for many reasons, some technical and some not; basically, it’s easier to set up PPP connections when you’re using dynamically assigned IP addresses.

Not that it’s that simple to set up a PPP connection. The trouble with the Linux world is that it lacks a simple tool like Trumpet Winsock to automate dialup connections to the Internet, which is why you need to slog through descriptions like the one here.

In addition to the dip program, Linux supports a suite of PPP-only applications. The dip program supports the PPP protocol, along with SLIP and CLSIP. The PPP suite of applications only supports PPP. Of these PPP-only tools, the pppd command acts as the PPP daemon and sits in the background awaiting PPP connections.

The ppp-on command brings up a connection. The ppp-off command brings it down. As with dip, there’s a lot of configuration to do. This is one area of Linux that could really use some improvement. You can find out more about Linux’s PPP tools by looking in the /usr/doc/ppp directory.


NOTE:  Confusing as it sounds, the dip program supports the PPP protocol, but not the separate PPP suite of commands. Nor do the PPP commands support dip. That is, you can’t really mix and match dip with ppp-on, ppp-off, and pppd.

In addition to the slip and ppp suites, you can run diald, short for Dial Daemon. Diald maintains a pseudo-networking connection for your phone line, even if the phone line is not actively connected to the Internet. This capability allows you to only tie up your phone line when needed, because diald automatically reconnects when needed and hangs up when a connection is no longer necessary.


ON THE CD-ROMS:  Diald is on the second CD-ROM.


Previous Table of Contents Next