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 a strong demand for services that allow TCP/IP access over dial-up modems. Currently, approximately 7% of home users have a high-speed Digital Subscriber Line (DSL) connection or a cable modem. Most DSL and cable modems connect to the host via Ethernet, meaning that no special host configuration is required to use those services. But most home users still use dial-up serial lines. Dial-up serial lines require special protocols and special configurations.
These two forcesthe need for standardized wide area communications and the need for dial-up TCP/IP accessled 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 be used only when both hosts know each other's addresses, 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. There are several RFCs that document Point-to-Point Protocol. Two key documents are RFC 1661, 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 Appendix G.
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 1661 and 1332 is the Internet Control Protocol (IPCP), which supports Internet Protocol.
Point-to-Point Protocol 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 an open protocol for connecting routers over serial lines and for connecting remote computers via dial-up lines.
Some Linux systems include both SLIP and PPP. However, on most Unix systems, such as Solaris, PPP is included and SLIP is not. This is fine, as you should avoid using SLIP and use PPP instead.