+ All Categories
Home > Documents > Iap 06 point to point protocol (ppp)

Iap 06 point to point protocol (ppp)

Date post: 14-May-2015
Category:
Upload: abdur-rehman-muhammadi
View: 297 times
Download: 6 times
Share this document with a friend
Popular Tags:
36
1 University of education township campus lahore, Pakistan Lecture 06 NCP, PPP Frame Format, Internet Architecture and Protocols, University of education township campus, lahore Internet Architecture and Protocols
Transcript
Page 1: Iap 06   point to point protocol (ppp)

1

University of education township campus lahore, Pakistan

Lecture 06

NCP, PPP Frame Format,

Internet Architecture and Protocols, University of education township campus, lahore

Internet Architecture and Protocols

Page 2: Iap 06   point to point protocol (ppp)

2Internet Architecture and Protocols, University of education township campus, lahore

3. Network Control Protocol

• NCP allows the encapsulation of data coming from the network layer protocols into PPP frame

• PPP is designed to allow simultaneous use of multiple network layer protocols

• PPP provides a way to negotiate network layer options independent to the network layer protocol to be used

Page 3: Iap 06   point to point protocol (ppp)

3Internet Architecture and Protocols, University of education township campus, lahore

Network Control Protocol (NCP)

• After the link is established and authentication (if any) is successful, the connection goes to the networking state.

• In this state, PPP uses another protocol called Network Control Protocol (NCP).

• NCP is a set of control protocols to allow the encapsulation of data coming from network layer protocols into PPP frame.

• PPP requires two parties to negotiate not only at the data link layer, but also at the network layer.

• Before user data can be sent, a connection must be established at this level.

• The set of packets that establish and terminate a network layer connection for IP packets is called IP control protocol (IPCP).

Page 4: Iap 06   point to point protocol (ppp)

4Internet Architecture and Protocols, University of education township campus, lahore

Layering PPP Elements

PPP- A data link protocol with network layer services

Page 5: Iap 06   point to point protocol (ppp)

5Internet Architecture and Protocols, University of education township campus, lahore

Page 6: Iap 06   point to point protocol (ppp)

6Internet Architecture and Protocols, University of education township campus, lahore

PPP Frame Format

Page 7: Iap 06   point to point protocol (ppp)

7Internet Architecture and Protocols, University of education township campus, lahore

PPP Frame Format (1)• Flag

– One byte field– It identifies the start and end of the PPP frame– Contains the binary sequence: 0111 1110

• Data– Maximum 1500 bytes– Contains the datagrams for protocol specified

in the protocol field

• FCS (Frame check sequence)– 2 byte or 4 byte field – Used for error detection using CRC code

Page 8: Iap 06   point to point protocol (ppp)

8Internet Architecture and Protocols, University of education township campus, lahore

PPP Frame Format (2)• Address

– One byte field– As the PPP is used for point-to-point

connections, not for multipoint connections like LANs, it does not assign individual station addresses

– Uses the standard broadcast address value to avoid data link layer addressing (MAC)

– It uses the fixed binary sequence: 1111 1111

• Control– One byte field– It specifies that there is no flow and error

control– It uses the fixed binary sequence: 0000 0011

Page 9: Iap 06   point to point protocol (ppp)

9Internet Architecture and Protocols, University of education township campus, lahore

PPP Frame Format (3)• Protocol (Two byte field)

– It tells the PPP receiver the upper layer protocol to which the received encapsulated data belongs

– Whether the PPP frame carries user data or other information. Codes are defined to identify different protocols

Protocol Field Code

Protocol Description

C02116 LCP

C02316 PAP (for authentication)

C22316 CHAP (for authentication)

802116 NCPIPCP (IP Datagram for Data)

Page 10: Iap 06   point to point protocol (ppp)

10Internet Architecture and Protocols, University of education township campus, lahore

PPP Stack• The value of protocol field defines the PPP

Protocol stack– Although PPP is a data-link layer protocol, PPP

uses a stack of other protocols to establish the links, to authenticate the parties involved and to carry the network layer data

– Three sets of protocols are defined to make PPP a powerful protocol.• Link Control Protocol (LCP)• Authentication Protocols (PAP, CHAP)• Network Control Protocol (NCP)

Page 11: Iap 06   point to point protocol (ppp)

11Internet Architecture and Protocols, University of education township campus, lahore

PPP Frame Format (4)• Protocol …

– It indicates the protocol encapsulated in the data field of PPP frame e.g.

• LCP– When PPP is carrying a LCP packet, it is either in

establishing or terminating state– No user data is exchanged during this state

• Authentication protocol– These protocols are used for authentication– No user data is exchanged during this state

• NCP– It allows network layer data encapsulation into PPP

frames– User data is exchanged during this state

– Thus PPP is a multi-protocol framing method suitable for use over modems

Page 12: Iap 06   point to point protocol (ppp)

12Internet Architecture and Protocols, University of education township campus, lahore

General Operation of PPP• Let us see how the three components of

PPP fit together i.e.– Encapsulation– LCP– NCP

Page 13: Iap 06   point to point protocol (ppp)

13Internet Architecture and Protocols, University of education township campus, lahore

PPP – A scenario

Page 14: Iap 06   point to point protocol (ppp)

14Internet Architecture and Protocols, University of education township campus, lahore

A typical Scenario (1)A typical scenario of a home user calling an

ISP1. P.C calls the ISP router via modem2. After receiving the answer, the physical

connection is established between two modems

3. PC sends the router a series of LCP packets in the data portion of PPP frames to configure and (optionally) test the data link connection

4. These LCP packets and their responses select the PPP parameters to be used

5. Then a series of NCP packets are used to configure network layer .

6. NCP frames are used to choose and configure one or more network layer protocols

Page 15: Iap 06   point to point protocol (ppp)

15Internet Architecture and Protocols, University of education township campus, lahore

A typical Scenario … (2)7. Typically, a PC wants to run a TCP/IP protocol

stack, so it needs an IP address8. ISPs keep a block of IP addresses to be

assigned dynamically to each newly attached PC for the duration of its login session

9. The NCP for IP assigns the IP address10. At this point the PC is now an Internet host

and can send and receive IP packets11. The link will remain configure for

communication until explicit LCP or NCP frames close the link or some external event (inactivity timer expires etc.)

Page 16: Iap 06   point to point protocol (ppp)

16Internet Architecture and Protocols, University of education township campus, lahore

A typical Scenario … (3)12. When the user is finished, the NCP tears

down the network layer connection, and frees up the IP address

13. Then LCP shut down the data link layer connection

14. Finally the computer tell the modem to hang-up the phone, releasing the physical connection.

Page 17: Iap 06   point to point protocol (ppp)

17Internet Architecture and Protocols, University of education township campus, lahore

Simplified PPP Phase Diagram

Page 18: Iap 06   point to point protocol (ppp)

18Internet Architecture and Protocols, University of education township campus, lahore

PPP Features/Services• Main services of PPP include:

– Encapsulation/Framing– Error Detection and Correction– Support Multiple Network Layer Protocols– Authentication– Link Establishment, Termination, and

Maintenance

Page 19: Iap 06   point to point protocol (ppp)

19Internet Architecture and Protocols, University of education township campus, lahore

PPP Services…• Encapsulation/Framing

– The PPP protocol take a network layer packet and

– Encapsulate it within the PPP data link layer frame such that the receiver will be able to identify the start and end of the both data link frame and network layer packet within the frame.

• Link Establishment, Termination, and Maintenance– PPP defines how two devices can negotiate the

establishment of a link, the exchange of data, and termination of a link.

Page 20: Iap 06   point to point protocol (ppp)

20Internet Architecture and Protocols, University of education township campus, lahore

PPP Services…• Error Detection and Correction

– All data link protocols like PPP and HDLC perform error detection.

– All these protocols use a field in the trailer usually called frame check sequence (FCS),

– FCS verifies whether bit errors occurred during transmission of the frame, if so frame is discarded.

– Error recovery is the process that causes retransmission of lost or erred frames.

– PPP can perform error correction but by default it is not enabled.

Page 21: Iap 06   point to point protocol (ppp)

21Internet Architecture and Protocols, University of education township campus, lahore

PPP Services…• Support Multiple Network Layer Protocols

– PPP supports multiple protocol suites like TCP/IP (IP), Novell’s (IPS), Appletalk etc running over same physical link at the same time.

– PPP multiplex different network layer protocols over a single point-to-point connection

• Authentication– PPP defines how two devices can authenticate

each other.– PPP is designed for use over dial-up links where

verification of user identify is necessary.– Authentication means validating the identity of

a user who needs to access a set of resources

Page 22: Iap 06   point to point protocol (ppp)

22Internet Architecture and Protocols, University of education township campus, lahore

Phases of PPP Connection…

• A PPP connection goes through different phases which are shown in transition state.– Idle State– Establishing State– Authenticating State– Networking State– Terminating State

Page 23: Iap 06   point to point protocol (ppp)

23Internet Architecture and Protocols, University of education township campus, lahore

Phases of PPP Connection…

• Idle State– The idle state means that the link is not being used.

There is no active carrier, and the link is quiet.

• Establishing State– When one of the endpoints starts the

communication, the connection goes into establishing state.

– In this state, options are negotiated between two parties. If the negotiation is successful, the system goes to the authenticating state (if authentication is required) or directly to the networking state.

– The Link Control Protocol packets are used for this purpose. Several packets may exchanged during this phase.

Page 24: Iap 06   point to point protocol (ppp)

24Internet Architecture and Protocols, University of education township campus, lahore

Phases of PPP Connection…

• Authenticating State– The authenticating state is optional.– The two endpoints may decide, during the establishing

state, not to go through this state. However, if they decide to proceed with authentication, they send several authentication packets.

– If the result is successful, the connection goes to the networking state; otherwise it goes to the terminating state.

• Networking State– The networking state is heart of the transition states.– When a connection reaches this state, the exchange of

user control and data packets can be started. The connection remains in this state until one of the endpoints wants to terminate the connection.

Page 25: Iap 06   point to point protocol (ppp)

25Internet Architecture and Protocols, University of education township campus, lahore

Phases of PPP Connection…

• Terminating State– When the connection is in the terminating

state, several packets are exchanged between the two endpoints for closing the link.

Page 26: Iap 06   point to point protocol (ppp)

26Internet Architecture and Protocols, University of education township campus, lahore

Data-Link Protocols for Point-to-Point WAN Links

• Popular WAN data-link protocols– Serial Line Internet Protocol (SLIP)– High-Level Data Link Control (HDLC)– Point-to-Point Protocol (PPP)

Page 27: Iap 06   point to point protocol (ppp)

27Internet Architecture and Protocols, University of education township campus, lahore

SLIP vs. PPP• Serial Line

Internet Protocol– Older protocol– Require no

addressing– No authentication– No error checking– Supports only IP– No compression is

supported in original Version

• Point-to-Point Protocol– New protocol– Supports dynamic IP

address assignment– LCP– Error checking– NCP , Carries multiple

protocols: IP, IPX, AppleTalk, NetBIOS

– Inherently supports compression

Page 28: Iap 06   point to point protocol (ppp)

28Internet Architecture and Protocols, University of education township campus, lahore

HDLC vs. PPP• High Level Data

Link Control Protocol– It is both point to

point and multipoint protocol

– It delivers data on synchronous links only

– It provides error detection but does not provide error correction

– It does not have protocol type field, so it does not support multiple protocols

• Point to Point Protocol– It point to point

protocol– It delivers data on

both synchronous and asynchronous links

– It provides both error detection and error correction

– It has a protocol type field so it supports multiple protocols

Page 29: Iap 06   point to point protocol (ppp)

29Internet Architecture and Protocols, University of education township campus, lahore

LCP FeaturesFunction LCP

FeatureDescription

Error detection

Link Quality Monitoring

PPP can take down a link based on the percentage of errors on the link. LQM exchanges statistics about lost packets versus sent packets in each direction. When compared to packets and bytes sent, this yields a percentage of erred traffic. The percentage of loss that causes a link to be down is enabled and defined by a configuration setting

Page 30: Iap 06   point to point protocol (ppp)

30Internet Architecture and Protocols, University of education township campus, lahore

LCP Features…

Multilink support

Multilink PPP Fragments of packets are load-balanced across multiple links

Authentication

PAP and CHAP

Exchanges names and passwords so that device can verify the identity of the device on the other end of the link.

Looped link detection

Magic numbers

Using different magic numbers, routers send messages to each other. If you receive your own magic number, the link is looped. A configuration setting determines whether the link should be taken down when looped

Page 31: Iap 06   point to point protocol (ppp)

31Internet Architecture and Protocols, University of education township campus, lahore

PPP Automatic Login • PPP provides two methods with which logins can

be automated – – PAP (Password Authentication Protocol)– CHAP (Challenge-Handshake Authentication Protocol).

• Both provide the means for your system to automatically send your login userid/password information to the remote system.

Page 32: Iap 06   point to point protocol (ppp)

32Internet Architecture and Protocols, University of education township campus, lahore

PPP LCP Configuration Options

Feature How It Operates Protocol

Authentication PAP

CHAPPerform Challenge Handshake

Require a password

CompressionCompress data at source; reproduce data at destination

Stacker orPredictor

Error Detection

Avoid frame looping

Monitor data dropped on link

Multilink Load balancing across multiple links

Multilink Protocol (MP)

Quality

Magic Number

Page 33: Iap 06   point to point protocol (ppp)

34Internet Architecture and Protocols, University of education township campus, lahore

Sample pap/chap configuration

PSTN/ISDN

hostname RouterAusername RouterB password a11ppp encapsulation

ppp authentication pap

hostname RouterBusername RouterA password a11ppp encapsulation

ppp authentication pap

“RouterA, mustmat”

Accept

RouterA RouterB

Page 34: Iap 06   point to point protocol (ppp)

35Internet Architecture and Protocols, University of education township campus, lahore

hostname RouterA hostname RouterBusername RouterB password a11 username RouterA password a11interface serial o Interface serial oip address10.0.1.1 255.255.255.0 ip address10.0.1.2 255.255.255.0encapsulation ppp encapsulation pppppp authentication pap ppp authentication pap

hostname RouterA hostname RouterBusername RouterB password a11 username RouterA password a11interface serial o Interface serial oip address10.0.1.1 255.255.255.0 ip address10.0.1.2 255.255.255.0encapsulation ppp encapsulation pppppp authentication pap ppp authentication pap

Sample pap/chap configuration

Page 35: Iap 06   point to point protocol (ppp)

36Internet Architecture and Protocols, University of education township campus, lahore

Verifying PPPP1R1#show interfaces s1Serial1 is up, line protocol is upHardware is HD64570Internet address is 10.1.1.2/24MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255Encapsulation PPP, loopback not set, keepalive set (10 sec)LCP OpenOpen: IPCP, CDP, ATALKCP, IPXCPLast input 00:00:04, output 00:00:00, output hang neverLast clearing of "show interface" counters neverInput queue: 0/75/0 (size/max/drops); Total output drops: 0Queueing strategy: weighted fairOutput queue: 0/64/0 (size/threshold/drops) Conversations 0/4 (active/max active) Reserved Conversations 0/0 (allocated/max allocated)5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec 51938 packets input, 1634908 bytes, 0 no buffer

--More--

Page 36: Iap 06   point to point protocol (ppp)

37Internet Architecture and Protocols, University of education township campus, lahore

Putting it all together• The most significant advantage PPP can offer is

the automatic login and configuration negotiation at the start of connection

• With these features, your PPP software only needs to know your login userid/password and the telephone number of your service provider.

• The software can then dial-up into your service provider and figure out everything else on its own.

• At this present point in time, PPP is generally not as widely available as SLIP. It should gain more acceptance in the time to come


Recommended