Home > Articles

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Configure PPP (3.3)

This section describes the configuration of PPP. Basic PPP configuration is discussed along with optional PPP features and PPP authentication.

Configure PPP (3.3.1)

Basic PPP configuration commands are discussed next along with PPP compression, PPP quality link monitoring, and PPP Multilink.

PPP Configuration Options (3.3.1.1)

In the previous section, configurable LCP options were introduced to meet specific WAN connection requirements. PPP may include the following LCP options:

  • Authentication: Peer routers exchange authentication messages. Two authentication choices are Password Authentication Protocol (PAP) and Challenge Handshake Authentication Protocol (CHAP).
  • Compression: Increases the effective throughput on PPP connections by reducing the amount of data in the frame that must travel across the link. The protocol decompresses the frame at its destination. Two compression protocols available in Cisco routers are Stacker and Predictor.
  • Error detection: Identifies fault conditions. The Quality and Magic Number options help ensure a reliable, loop-free data link. The Magic Number field helps in detecting links that are in a looped-back condition. Until the Magic-Number Configuration Option has been successfully negotiated, the Magic-Number must be transmitted as zero. Magic numbers are generated randomly at each end of the connection.
  • PPP Callback: PPP callback is used to enhance security. With this LCP option, a Cisco router can act as a callback client or a callback server. The client makes the initial call, requests that the server call it back, and terminates its initial call. The callback router answers the initial call and makes the return call to the client based on its configuration statements. The command is ppp callback [accept | request].
  • Multilink: This alternative provides load balancing over the router interfaces that PPP uses. Multilink PPP, also referred to as MP, MPPP, MLP, or Multilink, provides a method for spreading traffic across multiple physical WAN links while providing packet fragmentation and reassembly, proper sequencing, multivendor interoperability, and load balancing on inbound and outbound traffic.

When options are configured, a corresponding field value is inserted into the LCP option field, shown in Table 3-5.

Table 3-5 Configurable Options Field Codes

Option Name

Option Type

Option Length

Description

Authentication Protocol

3

5 or 6

This field indicates the authentication protocol, either PAP or CHAP.

Protocol Compression

7

2

A flag indicating that the PPP protocol ID be compressed to a single octet when the 2-byte protocol field is in the range of 0x00-00 to 0x00-FF.

Address and Control Field Compression

8

2

A flag indicating that the PPP Address field (always set to 0xFF) and the PPP Control field (always set to 0x03) be removed from the PPP header.

Magic Number (Error Detection)

5

6

This is a random number chosen to distinguish a peer and detect looped back lines.

Callback

13 or 0x0D

3

A 1-octet indicator of how callback is to be determined.

PPP Basic Configuration Command (3.3.1.2)

Basic PPP configuration is very straightforward. After PPP is configured on an interface the network administrator can then apply one or more PPP options.

Enabling PPP on an Interface

To set PPP as the encapsulation method used by a serial interface, use the encapsulation ppp interface configuration command.

The following example enables PPP encapsulation on interface serial 0/0/0:

R3# configure terminal

R3(config)# interface serial 0/0/0

R3(config-if)# encapsulation ppp

The encapsulation ppp interface command has no arguments. Remember that if PPP is not configured on a Cisco router, the default encapsulation for serial interfaces is HDLC.

Figure 3-31 and the listing that follows, shows that routers R1 and R2 have been configured with both an IPv4 and an IPv6 address on the serial interfaces. PPP is a Layer 2 encapsulation that supports various Layer 3 protocols including IPv4 and IPv6.

Figure 3-31

Figure 3-31 PPP Basic Configuration

Partial running-config for R1

hostname R1

!

interface Serial 0/0/0

 ip address 10.0.1.1 255.255.255.252

 ipv6 address 2001:db8:cafe:1::1/64

 encapsulation ppp

Parital running-config for R2

hostname R2

!

interface Serial 0/0/0

 ip address 10.0.1.2 255.255.255.252

 ipv6 address 2001:db8:cafe:1::2/64

 encapsulation ppp

PPP Compression Commands (3.3.1.3)

Point-to-point software compression on serial interfaces can be configured after PPP encapsulation is enabled. Because this option invokes a software compression process, it can affect system performance. If the traffic already consists of compressed files, such as .zip, .tar, or .mpeg, do not use this option. The command syntax for the compress command is

Router(config-if)# compress [ predictor | stac ]
  • predictor (optional): Specifies that a predictor compression algorithm will be used
  • stac (optional): Specifies that a Stacker (LZS) compression algorithm will be used

To configure compression over PPP, enter the following commands:

R2(config)# interface serial 0/0/0

R2(config-if)# encapsulation ppp

R2(config-if)# compress [ predictor | stac ]

The following example shows predictor compression used between R1 and R2:

Partial running-config for R1

hostname R1

!

interface Serial 0/0/0

 ip address 10.0.1.1 255.255.255.252

 ipv6 address 2001:db8:cafe:1::1/64

 encapsulation ppp

 compress predictor

Partial running-config for R2

hostname R2

!

interface Serial 0/0/0

 ip address 10.0.1.2 255.255.255.252

 ipv6 address 2001:db8:cafe:1::2/64

 encapsulation ppp

 compress predictor

PPP Link Quality Monitoring Command (3.3.1.4)

Recall that LCP provides an optional link quality determination phase. In this phase, LCP tests the link to determine whether the link quality is sufficient to use Layer 3 protocols. The ppp quality percentage command ensures that the link meets the quality requirement set; otherwise, the link closes down. The command syntax for the ppp quality command is

Router(config-if)# ppp quality percentage

  • percentage: Specifies the link quality threshold. Range is 1 to 100.

The percentages are calculated for both incoming and outgoing directions. The outgoing quality is calculated by comparing the total number of packets and bytes sent to the total number of packets and bytes received by the destination node. The incoming quality is calculated by comparing the total number of packets and bytes received to the total number of packets and bytes sent by the destination node.

If the link quality percentage is not maintained, the link is deemed to be of poor quality and is taken down. Link Quality Monitoring (LQM) implements a time lag so that the link does not bounce up and down.

The following configuration example monitors the data dropped on the link and avoids frame looping:

R2(config)# interface serial 0/0/0

R2(config-if)# encapsulation ppp

R2(config-if)# ppp quality 80

Use the no ppp quality command to disable LQM. The following example shows link quality being used between R1 and R2:

Partial running-config for R1

hostname R1

!

interface Serial 0/0/0

 ip address 10.0.1.1 255.255.255.252

 ipv6 address 2001:db8:cafe:1::1/64

 encapsulation ppp

 ppp quality 80

Partial running-config for R2

hostname R2

!

interface Serial 0/0/0

 ip address 10.0.1.2 255.255.255.252

 ipv6 address 2001:db8:cafe:1::2/64

 encapsulation ppp

 ppp quality 80

PPP Multilink Commands (3.3.1.5)

Multilink PPP (also referred to as MP, MPPP, MLP, or Multilink) provides a method for spreading traffic across multiple physical WAN links, as shown in Figure 3-32. Multilink PPP also provides packet fragmentation and reassembly, proper sequencing, multivendor interoperability, and load balancing on inbound and outbound traffic.

Figure 3-32

Figure 3-32 PPP Multilink

MPPP allows packets to be fragmented and sends these fragments simultaneously over multiple point-to-point links to the same remote address. The multiple physical links come up in response to a user-defined load threshold. MPPP can measure the load on just inbound traffic, or on just outbound traffic, but not on the combined load of both inbound and outbound traffic.

Configuring MPPP requires two steps.

Step 1. Create a multilink bundle.

  • The interface multilink number command creates the multilink interface.
  • In interface configuration mode, an IP address is assigned to the multilink interface. In this example, both IPv4 and IPv6 addresses are configured on routers R3 and R4.
  • The interface is enabled for multilink PPP.
  • The interface is assigned a multilink group number.

Step 2. Assign interfaces to the multilink bundle. Each interface that is part of the multilink group:

  • Is enabled for PPP encapsulation.
  • Is enabled for multilink PPP.
  • Is bound to the multilink bundle using the multilink group number configured in Step 1.

The following example shows multilink PPP configured between R3 and R4:

Partial running-config for R3

hostname R3

!

interface Multilink 1

 ip address 10.0.1.1 255.255.255.252

 ipv6 address 2001:db8:cafe:1::1/64

 ppp multilink

 ppp multilink group 1

!

interface Serial 0/1/0

 no ip address

 encapsulation ppp

 ppp multilink

 ppp multilink group 1

!

interface Serial 0/1/1

 no ip address

 encapsulation ppp

 ppp multilink

 ppp multilink group 1

Partial running-config for R4

hostname R4

!

interface Multilink 1

 ip address 10.0.1.2 255.255.255.252

 ipv6 address 2001:db8:cafe:1::2/64

 ppp multilink

 ppp multilink group 1

!

interface Serial 0/0/0

 no ip address

 encapsulation ppp

 ppp multilink

 ppp multilink group 1

!

interface Serial 0/0/1

 no ip address

 encapsulation ppp

 ppp multilink

 ppp multilink group 1

To disable PPP multilink, use the no ppp multilink command.

Verifying PPP Configuration (3.3.1.6)

Use the show interfaces serial command to verify proper configuration of HDLC or PPP encapsulation. Example 3-3 shows a PPP configuration.

Example 3-3 Using show interfaces serial to Verify a PPP Encapsulation

R2#show interfaces serial 0/0/0

Serial0/0/0 is up, line protocol is up

  Hardware is GT96K Serial

  Internet address is 10.0.1.2/30

  MTU 1500 bytes, BW 1544 Kbit/sec, DLY 20000 usec,

     reliability 255/255, txload 1/255, rxload 1/255

  Encapsulation PPP, LCP Open

  Open: IPCP, IPV6CP, CCP, CDPCP,, loopback not set

  Keepalive set (10 sec)

  CRC checking enabled

<Output omitted for brevity>

When you configure HDLC, the output of the show interfaces serial command should display encapsulation HDLC. When PPP is configured, the LCP and NCP states also display. Notice that NCPs IPCP and IPv6CP are open for IPv4 and IPv6 because R1 and R2 were configured with both IPv4 and IPv6 addresses.

Table 3-6 summarizes commands used when verifying PPP.

Table 3-6 Verifying PPP Commands

Command

Description

show interfaces

Displays statistics for all interfaces configured on the router.

show interfaces serial

Displays information about a serial interface.

show ppp multilink

CDisplays information about a PPP multilink interface.

The show ppp multilink command verifies that PPP multilink is enabled on R3, as shown in Example 3-4. The output indicates the interface Multilink 1, the hostnames of both the local and remote endpoints, and the serial interfaces assigned to the multilink bundle.

Example 3-4 Verifying PPP Multilink

R3# show ppp multilink

Multilink1

  Bundle name: R4

  Remote Endpoint Discriminator: [1] R4

  Local Endpoint Discriminator: [1] R3

  Bundle up for 00:01:20, total bandwidth 3088, load 1/255

  Receive buffer limit 24000 bytes, frag timeout 1000 ms

    0/0 fragments/bytes in reassembly list

    0 lost fragments, 0 reordered

    0/0 discarded fragments/bytes, 0 lost received

    0x2 received sequence, 0x2 sent sequence

  Member links: 2 active, 0 inactive (max 255, min not set)

    Se0/1/1, since 00:01:20

    Se0/1/0, since 00:01:06

No inactive multilink interfaces

R3#

PPP Authentication (3.3.2)

PPP authentication protocols and configuration of PPP authentication is discussed in this section.

PPP Authentication Protocols (3.3.2.1)

PPP defines an extensible LCP that allows negotiation of an authentication protocol for authenticating its peer before allowing network layer protocols to transmit over the link. RFC 1334 defines two protocols for authentication, PAP and CHAP, as shown in Figure 3-33.

Figure 3-33

Figure 3-33 PPP Authentication Protocols

PAP is a very basic two-way process. There is no encryption. The username and password are sent in plaintext. If it is accepted, the connection is allowed. CHAP is more secure than PAP. It involves a three-way exchange of a shared secret.

The authentication phase of a PPP session is optional. If used, the peer is authenticated after LCP establishes the link and chooses the authentication protocol. If it is used, authentication takes place before the network layer protocol configuration phase begins.

The authentication options require that the calling side of the link enter authentication information. This helps to ensure that the user has the permission of the network administrator to make the call. Peer routers exchange authentication messages.

Password Authentication Protocol (PAP) (3.3.2.2)

One of the many features of PPP is that it performs Layer 2 authentication in addition to other layers of authentication, encryption, access control, and general security procedures.

Initiating PAP

PAP provides a simple method for a remote node to establish its identity using a two-way handshake. PAP is not interactive. When the ppp authentication pap command is used, the username and password are sent as one LCP data package, rather than the server sending a login prompt and waiting for a response, as shown in Figure 3-34. After PPP completes the link establishment phase, the remote node repeatedly sends a username-password pair across the link until the receiving node acknowledges it or terminates the connection.

Figure 3-34

Figure 3-34 Initiating PAP

Completing PAP

At the receiving node, the username-password is checked by an authentication server that either allows or denies the connection. An accept or reject message is returned to the requester, as shown in Figure 3-35.

Figure 3-35

Figure 3-35 Completing PAP

PAP is not a strong authentication protocol. Using PAP, passwords are sent across the link in plaintext, and there is no protection from playback or repeated trial-and-error attacks. The remote node is in control of the frequency and timing of the login attempts.

Nonetheless, there are times when using PAP can be justified. For example, despite its shortcomings, PAP may be used in the following environments:

  • A large installed base of client applications that do not support CHAP
  • Incompatibilities between different vendor implementations of CHAP
  • Situations where a plaintext password must be available to simulate a login at the remote host

Challenge Handshake Authentication Protocol (CHAP) (3.3.2.3)

After authentication is established with PAP, it does not reauthenticate. This leaves the network vulnerable to attack. Unlike PAP, which only authenticates once, CHAP conducts periodic challenges to make sure that the remote node still has a valid password value. The password value is variable and changes unpredictably while the link exists.

After the PPP link establishment phase is complete, the local router sends a challenge message to the remote node, as shown in Figure 3-36.

Figure 3-36

Figure 3-36 Initiating CHAP

The remote node responds with a value calculated using a one-way hash function, which is typically message digest 5 (MD5) based on the password and challenge message, as shown in Figure 3-37.

Figure 3-37

Figure 3-37 Responding CHAP

The local router checks the response against its own calculation of the expected hash value. If the values match, the initiating node acknowledges the authentication, as shown in Figure 3-38. If the value does not match, the initiating node immediately terminates the connection.

Figure 3-38

Figure 3-38 Completing CHAP

CHAP provides protection against playback attack by using a variable challenge value that is unique and unpredictable. Because the challenge is unique and random, the resulting hash value is also unique and random. The use of repeated challenges limits the time of exposure to any single attack. The local router or a third-party authentication server is in control of the frequency and timing of the challenges.

PPP Encapsulation and Authentication Process (3.3.2.4)

The flowchart in Figure 3-39 can be used to help understand the PPP authentication process when configuring PPP. The flowchart provides a visual example of the logic decisions made by PPP.

Figure 3-39

Figure 3-39 PPP Encapsulation and Authentication Process

For example, if an incoming PPP request requires no authentication, then PPP progresses to the next level. If an incoming PPP request requires authentication, then it can be authenticated using either the local database or a security server. As illustrated in the flowchart, successful authentication progresses to the next level, while an authentication failure disconnects and drops the incoming PPP request.

Follow the steps to view R1 establishing an authenticated PPP CHAP connection with R2.

Step 1. As shown in Figure 3-40, R1 initially negotiates the link connection using LCP with router R2 and the two systems agree to use CHAP authentication during the PPP LCP negotiation.

Figure 3-40

Figure 3-40 Establishing a Link

Step 2. As shown in Figure 3-41, R2 generates an ID and a random number, and sends that and its username as a CHAP challenge packet to R1.

Figure 3-41

Figure 3-41 Sending a CHAP Challenge to R1

Step 3. As shown in Figure 3-42, R1 uses the username of the challenger (R2) and cross references it with its local database to find its associated password. R1 then generates a unique MD5 hash number using the R2’s username, ID, random number and the shared secret password. In this example, the shared secret password is boardwalk.

Figure 3-42

Figure 3-42 R1 Validates R2

Step 4. As shown in Figure 3-43, Router R1 then sends the challenge ID, the hashed value, and its username (R1) to R2.

Figure 3-43

Figure 3-43 R1 Sends the Challenge to R2

Step 5. As shown in Figure 3-44, R2 generates its own hash value using the ID, the shared secret password, and the random number it originally sent to R1.

Figure 3-44

Figure 3-44 R2 Validates R1

Step 6. As shown in Figure 3-45, R2 compares its hash value with the hash value sent by R1. If the values are the same, R2 sends a link established response to R1.

Figure 3-45

Figure 3-45 R2 Establishes the Link

If the authentication failed, a CHAP failure packet is built from the following components:

  • 04 = CHAP failure message type
  • id = copied from the response packet
  • “Authentication failure” or some similar text message, which is meant to be a user-readable explanation

The shared secret password must be identical on R1 and R2.

Configuring PPP Authentication (3.3.2.5)

To specify the order in which the CHAP or PAP protocols are requested on the interface, use the ppp authentication interface configuration command:

Router(config-if)# ppp authentication {chap | chap pap | pap chap | pap} [if needed]
   [list-name | default] [callin]
  • Use the no form of the command to disable this authentication.

Table 3-7 explains the syntax for the ppp authentication interface configuration command.

Table 3-7 PPP Command Syntax

chap

Enables CHAP on serial interface.

pap

Enables PAP on serial interface.

chap pap

Enables both CHAP and PAP on serial interface, and performs CHAP authentication before PAP.

pap chap

Enables both CHAP and PAP on serial interface, and performs PAP authentication before CHAP.

if-needed (Optional)

Used with TACACS and XTACACS. Do not perform CHAP or PAP authentication if the user has already provided authentication. This option is available only on asynchronous interfaces.

list-name (Optional)

Used with AAA/TACACS+. Specifies the name of a list of TACACS+ methods of authentication to use. If no list name is specified, the system uses the default. Lists are created with the aaa authentication ppp command.

default (Optional)

Used with AAA/TACACS+. Created with the aaa authentication ppp command.

Callin

Specifies authentication on incoming (received) calls only.

After you have enabled CHAP or PAP authentication, or both, the local router requires the remote device to prove its identity before allowing data traffic to flow. This is done as follows:

  • PAP authentication requires the remote device to send a name and password to be checked against a matching entry in the local username database or in the remote TACACS/TACACS+ database.
  • CHAP authentication sends a challenge to the remote device. The remote device must encrypt the challenge value with a shared secret and return the encrypted value and its name to the local router in a response message. The local router uses the name of the remote device to look up the appropriate secret in the local username or remote TACACS/TACACS+ database. It uses the looked-up secret to encrypt the original challenge and verify that the encrypted values match.

Either PAP or CHAP or both can be enabled. If both methods are enabled, the first method specified is requested during link negotiation. If the peer suggests using the second method or simply refuses the first method, the second method should be tried. Some remote devices support CHAP only and some PAP only. The order in which you specify the methods is based on your concerns about the ability of the remote device to correctly negotiate the appropriate method as well as your concern about data line security. PAP usernames and passwords are sent as plaintext strings and can be intercepted and reused. CHAP has eliminated most of the known security holes.

Configuring PPP with Authentication (3.3.2.6)

The procedure outlined in the table describes how to configure PPP encapsulation and PAP/CHAP authentication protocols. Correct configuration is essential, because PAP and CHAP use these parameters to authenticate.

Configuring PAP Authentication

Figure 3-46 shows the topology used in an example of a two-way PAP authentication configuration, with the configuration in the following listing. Both routers authenticate and are authenticated, so the PAP authentication commands mirror each other. The PAP username and password that each router sends must match those specified with the username name password password command of the other router.

Figure 3-46

Figure 3-46 Topology for PPP

Partial running-config for R1

hostname R1

username R2 password sameone

!

interface Serial0/0/0

 ip address 10.0.1.1 255.255.255.252

 ipv6 address 2001:DB8:CAFE:1::1/64

 encapsulation ppp

 ppp authentication pap

 ppp pap sent-username R2 password sameone

Partial running-config for R2

hostname R2

username R1 password 0 sameone

!

interface Serial 0/0/0

 ip address 10.0.1.2 255.255.255.252

 ipv6 address 2001:db8:cafe:1::2/64

 encapsulation ppp

 ppp authentication pap

 ppp pap sent-username R2 password sameone

PAP provides a simple method for a remote node to establish its identity using a two-way handshake. This is done only on initial link establishment. The hostname on one router must match the username the other router has configured for PPP. The passwords must also match. Specify the username and password parameters, use the following command: ppp pap sent-username name password password.

Configuring CHAP Authentication

CHAP periodically verifies the identity of the remote node using a three-way handshake. The hostname on one router must match the username the other router has configured. The passwords must also match. This occurs on initial link establishment and can be repeated any time after the link has been established. The following is an example of a CHAP configuration.

Partial running-config for R1

hostname R1

username R2 password sameone

!

interface Serial0/0/0

 ip address 10.0.1.1 255.255.255.252

 ipv6 address 2001:DB8:CAFE:1::1/64

 encapsulation ppp

 ppp authentication chap

Partial running-config for R2

hostname R2

username R1 password 0 sameone

!

interface Serial 0/0/0

 ip address 10.0.1.2 255.255.255.252

 ipv6 address 2001:db8:cafe:1::2/64

 encapsulation ppp

 ppp authentication chap
  • + Share This
  • 🔖 Save To Your Account