TCP/IP runs over a wide variety of physical media. The media can be Ethernet cables, as in your local Ethernet, or telephone circuits, as in a wide area network. In the first half of this chapter, we used ifconfig to configure a local Ethernet interface. In this section, we use other commands to configure a network interface to use a telephone circuit.
Almost all data communication takes place via serial interfaces. A serial interface is just an interface that sends the data as a series of bits over a single wire, as opposed to a parallel interface that sends the data bits in parallel over several wires simultaneously. This description of a serial interface would fit almost any communications interface (including Ethernet itself), but the term is usually applied to an interface that connects to a telephone circuit via a modem or similar device. Likewise, a telephone circuit is often called a serial line.
In the TCP/IP world, serial lines are used to create wide area networks (WANs). Unfortunately, TCP/IP has not always had a standard physical layer protocol for serial lines. Because of the lack of a standard, network designers were forced to use a single brand of routers within their WANs to ensure successful physical layer communication. The growth of TCP/IP WANs led to a strong interest in standardizing serial-line communications to provide vendor independence.
Other forces that increased interest in serial line communications were the advent of small affordable systems that run TCP/IP and the advent of high-speed, dial-up modems that provide "reasonable" TCP/IP performance. When the ARPANET was formed, computers were very expensive and dial-up modems were very slow. At that time, if you could afford a computer, you could afford a leased telephone line. In recent years, however, it has become possible to own a UNIX system at home. In this new environment, there is an increasing demand for services that allow TCP/IP access over low-cost, dial-up serial lines.
These two forces - the need for standardized wide area communications and the need for dial-up TCP/IP access - have led to the creation of two serial-line protocols: Serial Line IP (SLIP) and Point-to-Point Protocol (PPP). 
 Dial-up modems are usually asynchronous. Both PPP and SLIP support asynchronous, dial-up service as well as synchronous leased-line service.
Serial Line IP was created first. It is a minimal protocol that allows isolated hosts to link via TCP/IP over the telephone network. The SLIP protocol defines a simple mechanism for framing datagrams for transmission across serial lines. SLIP sends the datagram across the serial line as a series of bytes, and it uses special characters to mark when a series of bytes should be grouped together as a datagram. SLIP defines two special characters for this purpose:
The SLIP END character, a single byte with the decimal value 192, is the character that marks the end of a datagram. When the receiving SLIP encounters the END character, it knows that it has a complete datagram that can be sent up to IP.
The SLIP ESC character, a single byte with the decimal value of 219, is used to "escape" the SLIP control characters. If the sending SLIP encounters a byte value equivalent to either a SLIP END character or a SLIP ESC character in the datagram it is sending, it converts that character to a sequence of two characters. The two-character sequences are ESC 220 for the END character, and ESC 221 for the ESC character itself.  When the receiving SLIP encounters these two-byte sequences, it converts them back to single-byte values. This procedure prevents the receiving SLIP from incorrectly interpreting a data byte as the end of the datagram.
 Here ESC refers to the SLIP escape character, not the ASCII escape character.
SLIP is described in RFC 1055, A Nonstandard for Transmission of IP Datagrams Over Serial Lines: SLIP. As the name of the RFC makes clear, SLIP is not an Internet standard. The RFC does not propose a standard; it documents an existing protocol. The RFC identifies the deficiencies in SLIP, which fall into two categories:
The SLIP protocol does not define any link control information that could be used to dynamically control the characteristics of a connection. Therefore, SLIP systems must assume certain link characteristics. Because of this limitation, SLIP can only be used when both hosts know each other's address, and only when IP datagrams are being transmitted.
SLIP does not compensate for noisy, low-speed telephone lines. The protocol does not provide error correction or data compression.
To address SLIP's weaknesses, Point-to-Point Protocol (PPP) was developed as an Internet standard. At this writing, there are several RFCs that document Point-to-Point Protocol.  Two key documents are: RFC 1548, The Point-to-Point Protocol (PPP), and RFC 1172, The Point-to-Point Protocol (PPP) Initial Configuration Options.
 If you want to make sure you have the very latest version of a standard, obtain the latest list of RFCs as described in Chapter 13, Internet Information Resources .
PPP addresses the weaknesses of SLIP with a three-layered protocol:
The Data Link Layer Protocol used by PPP is a slightly modified version of High-level Data Link Control (HDLC). PPP modifies HDLC by adding a Protocol field that allows PPP to pass traffic for multiple Network Layer protocols. HDLC is an international standard protocol for reliably sending data over synchronous, serial communications lines. PPP also uses a proposed international standard for transmitting HDLC over asynchronous lines; so PPP can guarantee reliable delivery over any type of serial line.
The Link Control Protocol (LCP) provides control information for the serial link. It is used to establish the connection, negotiate configuration parameters, check link quality, and close the connection. LCP was developed specifically for PPP.
The Network Control protocols are individual protocols that provide configuration and control information for the Network Layer protocols. Remember, PPP is designed to pass data for a wide variety of network protocols. NCP allows PPP to be customized to do just that. Each network protocol (DECNET, IP, OSI, etc.) has its own Network Control protocol. The Network Control protocol defined in RFCs 1331 and 1332 is the Internet Control Protocol (IPCP), which supports Internet Protocol.
Point-to-Point Protocol (PPP) is the best TCP/IP serial protocol. PPP is preferred because it is an Internet standard, which ensures interoperability between systems from a wide variety of vendors. It has more features than SLIP, and is more robust. These benefits make PPP the best choice as a non-proprietary protocol for connecting routers over serial lines and for connecting in remote computers via dial-up lines.
However, sometimes your choice is limited. SLIP was the first widely available serial protocol for IP, and some older dial-up servers support SLIP only. PPP and SLIP do not interoperate; they are completely different protocols. So if your terminal servers only have SLIP, the remote hosts that connect through these servers must also have SLIP. Because of its installed base, SLIP will continue to be used for the foreseeable future.
So which protocol should you use? When you are designing a new serial-line service, use PPP. However, you may be forced to also support SLIP. SLIP is sometimes the only serial protocol available for a specific piece of hardware. Simply put, use PPP where you can and SLIP where you must.
Linux systems include both SLIP and PPP. However, on some other UNIX systems such as Solaris, PPP is included and SLIP is not. The only time you should consider using SLIP is when it comes as part of the operating system. Avoid downloading SLIP source code and porting it on to your system. Use PPP instead. If you have old terminal servers that support only SLIP and new computers that support only PPP, it's time to upgrade the old terminal server.