Chapter 2 PPP
CCNA Exploration 4.0
Please purchase a personal license.
Introduction
H c vi n m ng Bach Khoa - Website: www.bkacad.com
Serial Point-to-Point Links
H c vi n m ng Bach Khoa - Website: www.bkacad.com
Introducing Serial Communications
Computers make use of relatively short parallel connections between
interior components, but use a serial bus to convert signals for most external communications.
H c vi n m ng Bach Khoa - Website: www.bkacad.com 4
Introducing Serial Communications
In a parallel connection, it is wrong to assume that the 8 bits leaving the sender at the same time arrive at the receiver at the same time. Rather, some of the bits get there later than others. This is known as clock skew.
H c vi n m ng Bach Khoa - Website: www.bkacad.com
Introducing Serial Communications
Parallel wires are physically bundled in a parallel cable, and signals can imprint themselves on each other. The possibility of crosstalk across the wires requires more processing, especially at higher frequencies.
H c vi n m ng Bach Khoa - Website: www.bkacad.com
Introducing Serial Communications
Serial Communication Standards All long-haul communications and most computer networks use serial connections, because the cost of cable and synchronization difficulties make parallel connections impractical. The most significant advantage is simpler wiring. Also, serial cables can be longer than parallel cables, because there is much less interaction (crosstalk) among the conductors in the cable.
H c vi n m ng Bach Khoa - Website: www.bkacad.com 7
Introducing Serial Communications
H c vi n m ng Bach Khoa - Website: www.bkacad.com
TDM
Time Division Multiplexing Bell Laboratories invented time-division multiplexing (TDM) to maximize the amount of voice traffic carried over a medium. TDM divides the bandwidth of a single link into separate channels or time slots. TDM transmits two or more channels over the same link by allocating a different time interval (time slot) for the transmission of each channel.
H c vi n m ng Bach Khoa - Website: www.bkacad.com 9
TDM
Statistical Time Division Multiplexing (STDM) STDM uses a variable time slot length allowing channels to compete for any free slot space. It employs a buffer memory that temporarily stores the data during periods of peak traffic. STDM does not waste high-speed line time with inactive channels using this scheme.
H c vi n m ng Bach Khoa - Website: www.bkacad.com 10
TDM Examples
H c vi n m ng Bach Khoa - Website: www.bkacad.com
11
TDM Examples
H c vi n m ng Bach Khoa - Website: www.bkacad.com
12
Demarcation Point
H c vi n m ng Bach Khoa - Website: www.bkacad.com
13
DTE-DCE
The CPE, which is generally a router, is the DTE. The DTE could also
be a terminal, computer, printer, or fax machine if they connect directly to the service provider network. The DCE, commonly a modem or CSU/DSU, is the device used to convert the user data from the DTE into a form acceptable to the WAN service provider transmission link. This signal is received at the remote DCE, which decodes the signal back into a sequence of bits. The remote DCE then signals this sequence to the remote DTE.
H c vi n m ng Bach Khoa - Website: www.bkacad.com 14
Cable Standards
The DTE/DCE interface for a particular standard defines the following specifications: Mechanical/physical - Number of pins and connector type Electrical - Defines voltage levels for 0 and 1 Functional - Specifies the functions that are performed by assigning meanings to each of the signaling lines in the interface Procedural - Specifies the sequence of events for transmitting data
H c vi n m ng Bach Khoa - Website: www.bkacad.com 15
Cable Standards
H c vi n m ng Bach Khoa - Website: www.bkacad.com
16
Cable Standards
H c vi n m ng Bach Khoa - Website: www.bkacad.com
17
Parallel to Serial Conversion
Your PC also has a Universal Asynchronous Receiver/Transmitter (UART) chip on the motherboard. Since the data in your PC flows along parallel circuits, the UART chip converts the groups of bits in parallel to a serial stream of bits. To work faster, a UART chip has buffers so it can cache data coming from the system bus while it processes data going out the serial port. The UART is the DTE agent of your PC and communicates with the modem or other serial device, which, in accordance with the RS-232C standard, has a complementary interface called the DCE interface.
H c vi n m ng Bach Khoa - Website: www.bkacad.com 18
HDLC Encapsulation
HDLC - The default encapsulation type on point-to-point connections,
dedicated links, and circuit-switched connections when the link uses two Cisco devices. HDLC is now the basis for synchronous PPP used by many servers to connect to a WAN, most commonly the Internet.
H c vi n m ng Bach Khoa - Website: www.bkacad.com 19
HDLC Encapsulation
H c vi n m ng Bach Khoa - Website: www.bkacad.com
20
Configuring HDLC Encapsulation
Cisco HDLC is the default encapsulation method used by Cisco
devices on synchronous serial lines. You use Cisco HDLC as a point-to-point protocol on leased lines between two Cisco devices. If you are connecting to a non-Cisco device, use synchronous PPP.
H c vi n m ng Bach Khoa - Website: www.bkacad.com 21
Troubleshooting a Serial Interface
You can identify any of the following five possible problem states in the interface status line: 1. Serial x is down, line protocol is down 2. Serial x is up, line protocol is down 3. Serial x is up, line protocol is up (looped) 4. Serial x is up, line protocol is down (disabled) 5. Serial x is administratively down, line protocol is down
H c vi n m ng Bach Khoa - Website: www.bkacad.com 22
Troubleshooting a Serial Interface
H c vi n m ng Bach Khoa - Website: www.bkacad.com
23
Troubleshooting a Serial Interface
The command syntax varies, depending on the platform. Cisco 7000
series routers use a cBus controller card for connecting serial links. With these routers, use the show controllers cbus command.
H c vi n m ng Bach Khoa - Website: www.bkacad.com 24
Troubleshooting a Serial Interface
H c vi n m ng Bach Khoa - Website: www.bkacad.com
25
Troubleshooting a Serial Interface
H c vi n m ng Bach Khoa - Website: www.bkacad.com
26
Troubleshooting a Serial Interface
H c vi n m ng Bach Khoa - Website: www.bkacad.com
27
Troubleshooting a Serial Interface
H c vi n m ng Bach Khoa - Website: www.bkacad.com
28
Troubleshooting a Serial Interface
Activity 2.1.7.3
H c vi n m ng Bach Khoa - Website: www.bkacad.com
29
Troubleshooting a Serial Interface
Activity 2.1.7.3
H c vi n m ng Bach Khoa - Website: www.bkacad.com
30
Troubleshooting a Serial Interface
Activity 2.1.7.3
H c vi n m ng Bach Khoa - Website: www.bkacad.com
31
Troubleshooting a Serial Interface
Activity 2.1.7.3
H c vi n m ng Bach Khoa - Website: www.bkacad.com
32
PPP Concepts
H c vi n m ng Bach Khoa - Website: www.bkacad.com
33
Introducing PPP
What is PPP? Cisco HDLC is the default serial encapsulation method when you connect two Cisco routers. When you need to connect to a non-Cisco router, you should use PPP encapsulation. PPP establishes a direct connection using serial cables, phone lines, trunk lines, cellular telephones, specialized radio links, or fiber-optic links. There are many features not available in HDLC: The link quality management feature monitors the quality of the link. If too many errors are detected, PPP takes the link down. PPP supports PAP and CHAP authentication. This feature is explained and practiced in a later section.
PPP contains 3 main components: 1. 2. HDLC protocol for encapsulating datagrams over point-to-point links. Extensible Link Control Protocol (LCP) to establish, configure, and test the data link connection. Family of Network Control Protocols (NCPs) for establishing and configuring different network layer protocols.
34
3.
H c vi n m ng Bach Khoa - Website: www.bkacad.com
PPP Layered Architecture
At the physical layer, you can configure PPP on a range of interfaces, including: Asynchronous serial Synchronous serial HSSI ISDN
H c vi n m ng Bach Khoa - Website: www.bkacad.com 35
PPP Architecture - Link Control Protocol Layer
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 PPP also uses the LCP to agree automatically on encapsulation formats (authentication, compression, error detection) as soon as the link is established.
H c vi n m ng Bach Khoa - Website: www.bkacad.com 36
PPP Architecture - Network Control Protocol Layer
H c vi n m ng Bach Khoa - Website: www.bkacad.com
37
PPP Frame Structure
H c vi n m ng Bach Khoa - Website: www.bkacad.com
38
Establishing a PPP Session
Phase 1: Link establishment and configuration negotiation Phase 2: Link quality determination (optional) Phase 3: Network layer protocol configuration negotiation
H c vi n m ng Bach Khoa - Website: www.bkacad.com 39
Extra: PPP Session Establishment (Detail)
1. Link establishment - (LCPs) 2. Authentication - Optional (LCPs) 3. Link quality determination - Optional (LCPs) 4. Network layer protocol configuration (NCPs) 5. Link termination (LCPs)
H c vi n m ng Bach Khoa - Website: www.bkacad.com 40
Establishing a Link with LCP
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)
H c vi n m ng Bach Khoa - Website: www.bkacad.com 41
Establishing a Link with LCP
H c vi n m ng Bach Khoa - Website: www.bkacad.com
42
LCP Packet
H c vi n m ng Bach Khoa - Website: www.bkacad.com
43
LCP Packet
H c vi n m ng Bach Khoa - Website: www.bkacad.com
44
PPP Configuration Options
PPP can be configured to support various functions including: 1. Authentication using either PAP or CHAP 2. Compression using either Stacker or Predictor 3. Multilink which combines two or more channels to increase the WAN bandwidth
H c vi n m ng Bach Khoa - Website: www.bkacad.com 45
PPP Configuration Options
H c vi n m ng Bach Khoa - Website: www.bkacad.com
46
NCP Explained
H c vi n m ng Bach Khoa - Website: www.bkacad.com
47
NCP Explained
Activity 2.2.6.2
H c vi n m ng Bach Khoa - Website: www.bkacad.com
48
NCP Explained
Activity 2.2.6.2
H c vi n m ng Bach Khoa - Website: www.bkacad.com
49
NCP Explained
Activity 2.2.6.2
H c vi n m ng Bach Khoa - Website: www.bkacad.com
50
Configuring PPP
H c vi n m ng Bach Khoa - Website: www.bkacad.com
51
PPP Configuration Options
PPP may include the following LCP options: Authentication Compression Error Detection Multilink PPP Callback
H c vi n m ng Bach Khoa - Website: www.bkacad.com 52
PPP Configuration Commands
H c vi n m ng Bach Khoa - Website: www.bkacad.com
53
PPP Configuration Commands
Example 1: Enabling PPP on an Interface
R3#configure terminal R3(config)#interface serial 0/0 R3(config-if)#encapsulation ppp Example 2: Compression R3(config)#interface serial 0/0 R3(config-if)#encapsulation ppp R3(config-if)#compress [predictor | stac] Example 3: Link Quality Monitoring R3(config)#interface serial 0/0 R3(config-if)#encapsulation ppp R3(config-if)#ppp quality 80 Example 4: Load Balancing Across Links Router(config)#interface serial 0/0 Router(config-if)#encapsulation ppp Router(config-if)#ppp multilink
H c vi n m ng Bach Khoa - Website: www.bkacad.com 54
Extra: More Information on Compression
Cisco supports these types of compression: Predictor-Determines whether the data is already compressed. If so, the data is just sent-no time is wasted trying to compress already compressed data. Stacker-A Lempel-Ziv (LZ)-based compression algorithm looks at the data, and sends each data type only once with information about where the type occurs within the data stream. The receiving side uses this information to reassemble the data stream. MPPC-This protocol (RFC 2118) allows Cisco routers to exchange compressed data with Microsoft clients. MPPC uses an LZ-based compression algorithm. TCP header compression-This type of compression is used to compress the TCP headers.
H c vi n m ng Bach Khoa - Website: www.bkacad.com
55
Extra: More Information on Compression
Important notes on compression:
The highest compression ratio is usually reached with highly compressible text files. Already compressed files such as JPEG graphics or MPEG files, or files that were compressed with software such as PKZIP or StuffIt, are only compressed 1:1, or even less. Trying to compress already compressed data can take longer than transferring the data without compression. Compressing data can cause performance degradation because it is software, not hardware compression. Compression can be CPU or memory intensive. Predictor is more memory intensive and less CPU intensive, whereas Stacker and MPPC are more CPU intensive and less memory intensive. Memory intensive means that an extra memory allowance is required.
H c vi n m ng Bach Khoa - Website: www.bkacad.com
56
Extra: Enable Link Quality Monitoring (LQM)
Link Quality Monitoring (LQM) is available on all serial interfaces running
PPP. LQM will monitor the link quality, and if the quality drops below a configured percentage, the router shuts down the link. The percentages are calculated for both the incoming and outgoing directions. The outgoing quality is calculated by comparing the total number of packets and bytes sent with 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 with the total number of packets and bytes sent by the destination peer. When LQM is enabled, Link Quality Reports (LQRs) are sent, in place of keepalives, every keepalive period. All incoming keepalives are responded to properly. If LQM is not configured, keepalives are sent every keepalive period and all incoming LQRs are responded to with an LQR. LQR is specified in RFC 1989, PPP Link Quality Monitoring, by William A. Simpson of Computer Systems Consulting Services.
H c vi n m ng Bach Khoa - Website: www.bkacad.com
57
Verifying a Serial PPP Encapsulation Configuration
H c vi n m ng Bach Khoa - Website: www.bkacad.com
58
Troubleshooting PPP Encapsulation
H c vi n m ng Bach Khoa - Website: www.bkacad.com
59
Troubleshooting PPP Encapsulation
H c vi n m ng Bach Khoa - Website: www.bkacad.com
60
Troubleshooting PPP Encapsulation
H c vi n m ng Bach Khoa - Website: www.bkacad.com
61
Troubleshooting PPP Encapsulation
H c vi n m ng Bach Khoa - Website: www.bkacad.com
62
Configuring PPP with Authentication
H c vi n m ng Bach Khoa - Website: www.bkacad.com
63
PPP Authentication Protocols
The authentication phase of a PPP session is optional. If used, you can
authenticate the peer after the LCP establishes the link and choose the authentication protocol. If it is used, authentication takes place before the network layer protocol configuration phase begins.
H c vi n m ng Bach Khoa - Website: www.bkacad.com
64
Password Authentication Protocol (PAP)
H c vi n m ng Bach Khoa - Website: www.bkacad.com
65
Challenge Handshake Authentication Protocol (CHAP)
Initiating CHAP
Responding CHAP
Completing CHAP
H c vi n m ng Bach Khoa - Website: www.bkacad.com
66
PPP Encapsulation and Authentication Process
H c vi n m ng Bach Khoa - Website: www.bkacad.com
67
H c vi n m ng Bach Khoa - Website: www.bkacad.com
68
Configuring PPP with Authentication
H c vi n m ng Bach Khoa - Website: www.bkacad.com
69
H c vi n m ng Bach Khoa - Website: www.bkacad.com
70
Example: Configuring PAP
172.25.3.0/24 Serial
DTE .2/S0
hostname SantaCruz username HQ password HQpass
DCE .1/S0
hostname HQ username SantaCruz password SantaCruzpass interface Serial0 ip address 172.25.3.1 255.255.255.0 encapsulation ppp ppp authentication pap ppp pap sent-username HQ password HQpass
interface Serial0 ip address 172.25.3.2 255.255.255.0 encapsulation ppp ppp authentication pap ppp pap sent-username SantaCruz password SantaCruzpass
Notes: - sent-username and password must match remote username and password. - Passwords are case-sensitive, but usernames are not. - Hostnames are not involved.
H c vi n m ng Bach Khoa - Website: www.bkacad.com 71
Extra: One-way PAP authentication
(config)# hostname RA (config)# interface serial 0 encapsulation ppp ppp pap sent-username RA-X password CISCO-X
(config)# hostname RB (config)# username RA-X password CISCO-X (config)# interface serial 0 encapsulation ppp ppp authentication pap
H c vi n m ng Bach Khoa - Website: www.bkacad.com 72
Extra: Two-way PAP authentication
(config)# hostname RA (config)# username RB-X password CISCO-B (config)# interface serial 0 encapsulation ppp ppp authentication pap ppp pap sent-username RA-X password CISCO-A (config)# hostname RB (config)# username RA-X password CISCO-A (config)# interface serial 0 encapsulation ppp ppp authentication pap ppp pap sent-username RB-X password CISCO-B
H c vi n m ng Bach Khoa - Website: www.bkacad.com 73
Example: Configuring CHAP
172.25.3.0/24 Serial
DTE .2/S0
DCE .1/S0
hostname SantaCruz username HQ password boardwalk ppp chap hostname SantaCruz (optional) interface Serial0 ip address 172.25.3.2 255.255.255.0 encapsulation ppp ppp authentication chap
hostname HQ username SantaCruz password boardwalk ppp chap hostname HQ (optional) interface Serial0 ip address 172.25.3.1 255.255.255.0 encapsulation ppp ppp authentication chap
Notes: - Hostnames are involved unless the ppp chap hostname command is used, and must match remote routers username command (not case-sensitive). - Passwords are case-sensitive and must match
H c vi n m ng Bach Khoa - Website: www.bkacad.com 74
Extra: One-way CHAP authentication
(config)# hostname RA-X (config)# username RB password CISCO (config)# interface serial 0 encapsulation ppp OR (config)# hostname RA (config)# interface serial 0 encapsulation ppp ppp chap hostname RA-X ppp chap password CISCO (config)# hostname RB (config)# username RA-X password CISCO (config)# interface serial 0 encapsulation ppp ppp authentication chap
H c vi n m ng Bach Khoa - Website: www.bkacad.com 75
Troubleshooting a PPP Configuration with Authentication
In the last line, the code = 4 means a failure has occurred. Other code values are as follows: 1 = Challenge 2 = Response 3 = Success 4 = Failure
H c vi n m ng Bach Khoa - Website: www.bkacad.com 76
Extra: Configuring PPP Multilink (MLP)
Router(config)#interface serial 0/0 Router(config-if)#encapsulation ppp Router(config-if)#ppp multilink
In some environments, it may be necessary to bundle multiple serial
links to act as single link with aggregated bandwidth. Multilink PPP provides load balancing over the router interfaces that PPP uses.
H c vi n m ng Bach Khoa - Website: www.bkacad.com
77
Extra: Configuring PPP Multilink
hostname SantaCruz multilink Virtual-Template 1 interface loopback 0 ip address 192.168.1.1 255.255.255.0 interface Virtual-Template1 ip unnumbered loopback0 ppp multilink interface Serial0 no ip address encapsulation ppp ppp multilink interface Serial1 no ip address encapsulation ppp ppp multilink interface Serial2 no ip address encapsulation ppp ppp multilink
hostname HQ multilink Virtual-Template 1 interface loopback 0 ip address 192.168.1.2 255.255.255.0 interface Virtual-Template1 ip unnumbered loopback0 ppp multilink interface Serial0 no ip address encapsulation ppp ppp multilink interface Serial1 no ip address encapsulation ppp ppp multilink interface Serial2 no ip address encapsulation ppp ppp multilink
78
H c vi n m ng Bach Khoa - Website: www.bkacad.com
Extra: Configuring PPP Multilink
(config)# interface Multilink 1 ip address 1.2.3.4 255.255.255.0 ppp multilink (config)# interface Serial 0/0 no ip address encapsulation ppp ppp multilink ppp multilink group 1 (config)# interface Serial 0/1 no ip address encapsulation ppp ppp multilink ppp multilink group 1
H c vi n m ng Bach Khoa - Website: www.bkacad.com 79
Labs
H c vi n m ng Bach Khoa - Website: www.bkacad.com
80
Summary
H c vi n m ng Bach Khoa - Website: www.bkacad.com
81