Home > Articles > Cisco Network Technology > General Networking > Cisco Networking Academy Connecting Networks Companion Guide: Point-to-Point Connections

Cisco Networking Academy Connecting Networks Companion Guide: Point-to-Point Connections

Chapter Description

This chapter covers the terms, technology, and protocols used in serial connections, introducing the High-Level Data Link Control (HDLC) and Point-to-Point Protocol (PPP).

PPP Operation (3.2)

This section discusses the PPP operations, including the benefits of PPP, LCP, and NCP protocols, and establishing a PPP session.

Benefits of PPP (3.2.1)

PPP has several advantages over its predecessor HDLC. In this section, PPP is introduced along with examining the benefits of PPP.

Introducing PPP (3.2.1.1)

Recall that HDLC is the default serial encapsulation method when connecting two Cisco routers. With an added protocol type field, the Cisco version of HDLC is proprietary. Thus, Cisco HDLC can only work with other Cisco devices. However, when there is a need to connect to a non-Cisco router, PPP encapsulation should be used, as shown in the Figure 3-19.

Figure 3-19

Figure 3-19 What is PPP?

PPP encapsulation has been carefully designed to retain compatibility with most commonly used supporting hardware. PPP encapsulates data frames for transmission over Layer 2 physical links. PPP establishes a direct connection using serial cables, phone lines, trunk lines, cellular telephones, specialized radio links, or fiber-optic links.

PPP contains three main components:

  • HDLC-like framing for transporting multiprotocol packets over point-to-point links.
  • Extensible Link Control Protocol (LCP) for establishing, configuring, and testing the data-link connection.
  • Family of Network Control Protocols (NCPs) for establishing and configuring different network layer protocols. PPP allows the simultaneous use of multiple network layer protocols. Some of the more common NCPs are Internet Protocol (IPv4) Control Protocol, IPv6 Control Protocol, AppleTalk Control Protocol, Novell IPX Control Protocol, Cisco Systems Control Protocol, SNA Control Protocol, and Compression Control Protocol.

Advantages of PPP (3.2.1.2)

PPP originally emerged as an encapsulation protocol for transporting IPv4 traffic over point-to-point links. PPP provides a standard method for transporting multiprotocol packets over point-to-point links.

There are many advantages to using PPP including the fact that it is not proprietary. PPP includes many features not available in HDLC:

  • The link quality management feature, as shown in Figure 3-20, monitors the quality of the link. If too many errors are detected, PPP takes the link down.

    Figure 3-20

    Figure 3-20 Advantages of PPP

  • PPP supports PAP and CHAP authentication. This feature is explained and practiced in a later section.

LCP and NCP (3.2.2)

LCP and NCP are two key components to PPP. An understanding of these two protocols will help you understand and troubleshoot PPP operations.

PPP Layered Architecture (3.2.2.1)

A layered architecture is a logical model, design, or blueprint that aids in communication between interconnecting layers. Figure 3-21 maps the layered architecture of PPP against the Open System Interconnection (OSI) model. PPP and OSI share the same physical layer, but PPP distributes the functions of LCP and NCP differently.

Figure 3-21

Figure 3-21 PPP Layered Architecture

At the physical layer, you can configure PPP on a range of interfaces, including

  • Asynchronous serial, such as leased line services
  • Synchronous serial, such as those that use basic telephone service for modem dialup connections
  • HSSI
  • ISDN

PPP operates across any DTE/DCE interface (RS-232-C, RS-422, RS-423, or V.35). The only absolute requirement imposed by PPP is a full-duplex circuit, either dedicated or switched, that can operate in either an asynchronous or synchronous bit-serial mode, transparent to PPP link layer frames. PPP does not impose any restrictions regarding transmission rate other than those imposed by the particular DTE/DCE interface in use.

Most of the work done by PPP is at the data link and network layers by the LCP and NCPs. The LCP sets up the PPP connection and its parameters, the NCPs handle higher layer protocol configurations, and the LCP terminates the PPP connection.

PPP – Link Control Protocol (LCP) (3.2.2.2)

The LCP functions within the data link layer and has a role in establishing, configuring, and testing the data-link connection. The LCP establishes the point-to-point link. The LCP also negotiates and sets up control options on the WAN data link, which are handled by the NCPs.

The LCP provides automatic configuration of the interfaces at each end, including

  • Handling varying limits on packet size
  • Detecting common misconfiguration errors
  • Terminating the link
  • Determining when a link is functioning properly or when it is failing

After the link is established, PPP also uses the LCP to agree automatically on encapsulation formats such as authentication, compression, and error detection. Figure 3-21 shows the relationship of LCP to the physical layer and NCP.

PPP – Network Control Protocol (NCP) (3.2.2.3)

PPP permits multiple network layer protocols to operate on the same communications link. For every network layer protocol used, PPP uses a separate NCP, as shown in Figure 3-21. For example, IPv4 uses the IP Control Protocol (IPCP) and IPv6 uses IPv6 Control Protocol (IPv6CP).

NCPs include functional fields containing standardized codes to indicate the network layer protocol that PPP encapsulates. Table 3-3 lists the PPP protocol field numbers. Each NCP manages the specific needs required by its respective network layer protocols. The various NCP components encapsulate and negotiate options for multiple network layer protocols.

Table 3-3 Protocol Fields

Value (in hex)

Protocol Name

8021

Internet Protocol (IPv4) Control Protocol

8057

Internet Protocol Version 6 (IPv6) Control Protocol

8023

OSI Network Layer Control Protocol

8029

Appletalk Control Protocol

802b

Novell IPX Control Protocol

c021

Link Control Protocol

c023

Password Authentication Protocol

c223

Challenge Handshake Authentication Protocol

PPP Frame Structure (3.2.2.4)

A PPP frame consists of six fields. The following descriptions summarize the PPP frame fields illustrated in Figure 3-22:

  • Flag: A single byte that indicates the beginning or end of a frame. The Flag field consists of the binary sequence 01111110. In successive PPP frames, only a single Flag character is used.
  • Address: A single byte that contains the binary sequence 11111111, the standard broadcast address. PPP does not assign individual station addresses.
  • Control: A single byte that contains the binary sequence 00000011, which calls for transmission of user data in an unsequenced frame. This provides a connectionless link service that does require the establishment of data links or links stations. On a point-to-point link, the destination node does not need to be addressed. Therefore, for PPP, the Address field is set to 0xFF, the broadcast address. If both PPP peers agree to perform Address and Control field compression during the LCP negotiation, the Address field is not included.
  • Protocol: Two bytes that identify the protocol encapsulated in the information field of the frame. The 2-byte Protocol field identifies the protocol of the PPP payload. If both PPP peers agree to perform Protocol field compression during LCP negotiation, the Protocol field is 1 byte for the protocol identification in the range 0×00-00 to 0×00-FF. The most up-to-date values of the Protocol field are specified in the most recent Assigned Numbers Request For Comments (RFC).
  • Data: Zero or more bytes that contain the datagram for the protocol specified in the Protocol field. The end of the Information field is found by locating the closing flag sequence and allowing 2 bytes for the FCS field. The default maximum length of the Information field is 1500 bytes. By prior agreement, consenting PPP implementations can use other values for the maximum Information field length.
  • Frame Check Sequence (FCS): Normally 16 bits (2 bytes). By prior agreement, consenting PPP implementations can use a 32-bit (4-byte) FCS for improved error detection. If the receiver’s calculation of the FCS does not match the FCS in the PPP frame, the PPP frame is silently discarded.

    Figure 3-22

    Figure 3-22 PPP Frame Fields

LCPs can negotiate modifications to the standard PPP frame structure. Modified frames, however, are always distinguishable from standard frames.

PPP Sessions (3.2.3)

Understanding PPP session establishment, LCP and NCP are important parts of implementing and troubleshooting PPP. These topics are discussed next.

Establishing a PPP Session (3.2.3.1)

There are three phases of establishing a PPP session, as shown in Figure 3-23:

  • Phase 1: Link establishment and configuration negotiation: Before PPP exchanges any network layer datagrams, such as IP, the LCP must first open the connection and negotiate configuration options. This phase is complete when the receiving router sends a configuration-acknowledgment frame back to the router initiating the connection.
  • Phase 2: Link quality determination (optional): The LCP tests the link to determine whether the link quality is sufficient to bring up network layer protocols. The LCP can delay transmission of network layer protocol information until this phase is complete.
  • Phase 3: Network layer protocol configuration negotiation: After the LCP has finished the link quality determination phase, the appropriate NCP can separately configure the network layer protocols, and bring them up and take them down at any time. If the LCP closes the link, it informs the network layer protocols so that they can take appropriate action.

    Figure 3-23

    Figure 3-23 Establishing a PPP Session

The link remains configured for communications until explicit LCP or NCP frames close the link, or until some external event occurs such as an inactivity timer expiring, or an administrator intervening.

The LCP can terminate the link at any time. This is usually done when one of the routers requests termination, but can happen because of a physical event, such as the loss of a carrier or the expiration of an idle-period timer.

LCP Operation (3.2.3.2)

LCP operation includes provisions for link establishment, link maintenance, and link termination. LCP operation uses three classes of LCP frames to accomplish the work of each of the LCP phases:

  • Link-establishment frames establish and configure a link (Configure-Request, Configure-Ack, Configure-Nak, and Configure-Reject).
  • Link-maintenance frames manage and debug a link (Code-Reject, Protocol-Reject, Echo-Request, Echo-Reply, and Discard-Request).
  • Link-termination frames terminate a link (Terminate-Request and Terminate-Ack).
Link Establishment

Link establishment is the first phase of LCP operation, as seen in Figure 3-24. This phase must complete successfully, before any network layer packets can be exchanged. During link establishment, the LCP opens the connection and negotiates the configuration parameters. The link establishment process starts with the initiating device sending a Configure-Request frame to the responder. The Configure-Request frame includes a variable number of configuration options needed to set up on the link.

Figure 3-24

Figure 3-24 PPP Link Establishment

The initiator includes the options for how it wants the link created, including protocol or authentication parameters. The responder processes the request:

  • If the options are not acceptable or not recognized, the responder sends a Configure-Nak or Configure-Reject message. If this occurs and the negotiation fails, the initiator must restart the process with new options.
  • If the options are acceptable, the responder responds with a Configure-Ack message and the process moves on to the authentication stage. The operation of the link is handed over to the NCP.

When NCP has completed all necessary configurations, including validating authentication if configured, the line is available for data transfer. During the exchange of data, LCP transitions into link maintenance.

Link Maintenance

During link maintenance, LCP can use messages to provide feedback and test the link, as shown in Figure 3-25.

  • Echo-Request, Echo-Reply, and Discard-Request: These frames can be used for testing the link.
  • Code-Reject and Protocol-Reject: These frame types provide feedback when one device receives an invalid frame due to either an unrecognized LCP code (LCP frame type) or a bad protocol identifier. For example, if an uninterpretable packet is received from the peer, a Code-Reject packet is sent in response. The sending device will resend the packet.

    Figure 3-25

    Figure 3-25 PPP Link Maintenance

Link Termination

After the transfer of data at the network layer completes, the LCP terminates the link, as shown in Figure 3-26. NCP only terminates the network layer and NCP link. The link remains open until the LCP terminates it. If the LCP terminates the link before NCP, the NCP session is also terminated.

Figure 3-26

Figure 3-26 PPP Link Termination

PPP can terminate the link at any time. This might happen because of the loss of the carrier, authentication failure, link quality failure, the expiration of an idle-period timer, or the administrative closing of the link. The LCP closes the link by exchanging Terminate packets. The device initiating the shutdown sends a Terminate-Request message. The other device replies with a Terminate-Ack. A termination request indicates that the device sending it needs to close the link. When the link is closing, PPP informs the network layer protocols so that they may take appropriate action.

LCP Packet (3.2.3.3)

Figure 3-27 shows the fields in an LCP packet:

  • Code: The Code field is 1 byte in length and identifies the type of LCP packet.
  • Identifier: The Identifier field is 1 byte in length and is used to match packet requests and replies.
  • Length: The Length field is 2 bytes in length and indicates the total length (including all fields) of the LCP packet.
  • Data: The Data field is 0 or more bytes as indicated by the length field. The format of this field is determined by the code.

    Figure 3-27

    Figure 3-27 LCP Packet Codes

Each LCP packet is a single LCP message consisting of an LCP Code field identifying the type of LCP packet, an identifier field so that requests and replies can be matched, and a Length field indicating the size of the LCP packet and LCP packet type-specific data.

Each LCP packet has a specific function in the exchange of configuration information depending on its packet type. The Code field of the LCP packet identifies the packet type according to Table 3-4.

Table 3-4 LCP Packet Fields

LCP Code

LCP Packet Type

Description

1

Configure-Request

Sent to open or reset a PPP connection. Configure-Request contains a list of LCP options with changes to default option values.

2

Configure-Ack

Sent when all of the values of all of the LCP options in the last Configure-Request received are recognized and acceptable. When both PPP peers send and receive Configure-Acks, the LCP negotiation is complete.

3

Configure-Nak

Sent when all the LCP options are recognized, but the values of some options are not acceptable. Configure-Nak includes the mismatching options and their acceptable values.

4

Configure-Reject

Set when LCP options are not recognized or not acceptable for negotiation. Configure-Reject includes the unrecognized or non-negotiable options.

5

Terminate-Request

Optionally sent to close the PPP connection.

6

Terminate-Ack

Sent in response to a Terminate-Request.

7

Code-Reject

Sent when the LCP code is unknown. The Code-Request message includes the rejected LCP packet.

8

Protocol-Reject

Sent when the PPP frame contains an unknown Protocol ID. The Protocol-Reject message includes the rejected LCP packet. Protocol-Reject is typically sent by a PPP peer in response to PPP NCP for a LAN protocol not enabled on the PPP peer.

9

Echo-Request

Optionally sent to test PPP connection.

10

Echo-Reply

Sent in response to an Echo-Request. The PPP Echo-Request and Echo-Reply are not related to the ICMP Echo Request and Echo Reply messages.

11

Discard-Request

Optionally sent to exercise the link in the outbound direction.

PPP Configuration Options (3.2.3.4)

PPP can be configured to support various optional functions, as shown in Figure 3-28. These optional functions include

  • Authentication using either PAP or CHAP
  • Compression using either Stacker or Predictor
  • Multilink that combines two or more channels to increase the WAN bandwidth

    Figure 3-28

    Figure 3-28 PPP Configuration Options

To negotiate the use of these PPP options, the LCP link-establishment frames contain option information in the data field of the LCP frame, as shown in Figure 3-29. If a configuration option is not included in an LCP frame, the default value for that configuration option is assumed.

Figure 3-29

Figure 3-29 LCP Option Fields

This phase is complete when a configuration acknowledgment frame has been sent and received.

NCP Explained (3.2.3.5)

After the link has been initiated, the LCP passes control to the appropriate NCP.

NCP Process

Although initially designed for IP packets, PPP can carry data from multiple network layer protocols by using a modular approach in its implementation. PPP’s modular model allows LCP to set up the link and then transfer the details of a network protocol to a specific NCP. Each network protocol has a corresponding NCP and each NCP has a corresponding RFC.

There are NCPs for IPv4, IPv6, IPX, AppleTalk, and many others. NCPs use the same packet format as the LCPs.

After the LCP has configured and authenticated the basic link, the appropriate NCP is invoked to complete the specific configuration of the network layer protocol being used. When the NCP has successfully configured the network layer protocol, the network protocol is in the open state on the established LCP link. At this point, PPP can carry the corresponding network layer protocol packets.

IPCP Example

As an example of how the NCP layer works, the NCP configuration of IPv4, which is the most common Layer 3 protocol, is shown in Figure 3-30. After LCP has established the link, the routers exchange IPCP messages, negotiating options specific to the IPv4 protocol. IPCP is responsible for configuring, enabling, and disabling the IPv4 modules on both ends of the link. IPv6CP is an NCP with the same responsibilities for IPv6.

Figure 3-30

Figure 3-30 PPP NCP Operation

IPCP negotiates two options:

  • Compression: Allows devices to negotiate an algorithm to compress TCP and IP headers and save bandwidth. The Van Jacobson TCP/IP header compression reduces the size of the TCP/IP headers to as few as 3 bytes. This can be a significant improvement on slow serial lines, particularly for interactive traffic.
  • IPv4-Address: Allows the initiating device to specify an IPv4 address to use for routing IP over the PPP link, or to request an IPv4 address for the responder. Prior to the advent of broadband technologies such as DSL and cable modem services, dialup network links commonly used the IPv4 address option.

After the NCP process is complete, the link goes into the open state, and LCP takes over again in a link maintenance phase. Link traffic consists of any possible combination of LCP, NCP, and network layer protocol packets. When data transfer is complete, NCP terminates the protocol link; LCP terminates the PPP connection.

6. Configure PPP (3.3) | Next Section Previous Section