Вы находитесь на странице: 1из 10

10/17/2012

PPP provides several services:


Chapter 12
1. PPP defines the format of the frame to be exchanged between
devices.

Point-to-Point 2. PPP defines how two devices can negotiate the establishment of
the link and the exchange of data.
3. PPP defines how network layer data are encapsulated in the data

Access: link frame.


4. PPP defines how two devices can authenticate each other.
5. PPP provides multiple network layer services supporting a
PPP variety of network layer protocols.
6. PPP provides connections over multiple links.
7. PPP provides network address configuration. This is particularly
useful when a home user needs a temporary network address to
connect to the Internet.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

On the other hand, to keep PPP simple, several services are missing:
12.1 Point-
Point-To-
To-Point Protocol
1. PPP does not provide flow control. A sender can send several
frames one after another with no concern about overwhelming
the receiver.
Frame Format

2. PPP has a very simple mechanism for error control. A CRC field Transition States
is used to detect errors. If the frame is corrupted, it is silently
discarded; the upper-layer protocol needs to take care of the
problem. Lack of error control and sequence numbering may cause
a packet to be received out of order.

3. PPP does not provide a sophisticated addressing mechanism to


handle frames in a multipoint configuration.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

12.1 PPP frame

http://highered.mcgraw-
hill.com/olcweb/cgi/pluginpop.cgi?it=swf::550::450::/sites/d
l/free/0072515848/93776/Fig12_02.swf::Figure%2012.2

Default size maximum 1500 bytes

PPP is a byte-oriented protocol using byte stuffing with the escape byte 01111101.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

1
10/17/2012

12.2 Transition states

12.2 PPP Stack

Link Control Protocol (LCP)

Authentication Protocols

Network Control Protocol (NCP)

Bit Padding

Digital Signals (DS) Services

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

12.3 Protocol stack 12.4 LCP packet encapsulated in a frame

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Table 12.1 LCP packets and their codes


There are three categories of packets.
Code Packet Type Description

0116 Configure-request Contains the list of proposed options and their values The first category, comprising the first four packet types, is used
0216 Configure-ack Accepts all options proposed for link configuration during the establish phase.
0316 Configure-nak Announces that some options are not acceptable
0416 Configure-reject Announces that some options are not recognized The second category, comprising packet types 5 and 6, is used for
0516 Terminate-request Requests to shut down the line link termination during the termination phase.
0616 Terminate-ack Accepts the shut down request
0716 Code-reject Announces an unknown code The last five packets are used for link monitoring and debugging.
0816 Protocol-reject Announces an unknown protocol
0916 Echo-request A type of hello message to check if the other end is alive
0A16 Echo-reply The response to the echo-request message
0B16 Discard-request A request to discard the packet

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

2
10/17/2012

12.5 PAP

Table 12.2 Common options

Option Default

Maximum receive unit 1500

Authentication protocol None

Protocol field compression Off


PAP The Password Authentication Protocol (PAP) is a simple authentication procedure
Address and control field compression Off
with a two-step process:
1. The user who wants to access a system sends an authentication identification
(usually the user name) and a password.
2. The system checks the validity of the identification and password and either accepts
or denies connection.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

12.6 PAP packets


The Challenge Handshake Authentication Protocol (CHAP) is a three-way hand-
shaking authentication protocol that provides greater security than PAP. In this
method, the password is kept secret; it is never sent online.

1. The system sends the user a challenge packet containing a challenge value,
usually a few bytes.

2. The user applies a predefined function that takes the challenge value and the
user's own password and creates a result. The user sends the result in the response
packet to the system.

3. The system does the same. It applies the same function to the password of the
user (known to the system) and the challenge value to create a result. If the result
created is the same as the result sent in the response packet, access is granted;
otherwise, it is denied. CHAP is more secure than PAP, especially if the system
continuously changes the challenge value. Even if the intruder learns the challenge
value and the result, the password is still secret.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

12.7 CHAP

http://highered.mcgraw-
hill.com/olcweb/cgi/pluginpop.cgi?it=swf::550::450::/sites/dl/free/0
072515848/93776/Fig12_07.swf::Figure%2012.7

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

3
10/17/2012

12.8 CHAP packets 12.9 IPCP packet encapsulated in PPP frame

IPCP (Internet Protocol Control Protocol) configures the link for


carrying IP data packets.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Table 12.3 Code value for IPCP packets

Code IPCP Packet

01 Configure-request

02 Configure-ack
http://highered.mcgraw-
hill.com/olcweb/cgi/pluginpop.cgi?it=swf::550::450::/sites/dl/free
03 Configure-nak /0072515848/93776/Fig12_10.swf::Figure%2012.10

04 Configure-reject

05 Terminate-request

06 Terminate-ack

07 Code-reject

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

12.10 An example

* The Point-to-Point Protocol (PPP) was designed to provide a


dedicated line for users who need Internet access via a telephone
line or a cable TV connection.

* A PPP connection goes through these phases: idle, establishing,


authenticating (optional), networking, and terminating.

* At the data link layer, PPP employs a version of HDLC.

* The Link Control Protocol (LCP) is responsible for establishing,


maintaining, configuring, and terminating links.

* Password Authentication Protocol (PAP) and Challenge


Handshake Authentication Protocol (CHAP) are two protocols used
for authentication in PPP.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

4
10/17/2012

* PAP is a two-step process. The user sends authentication Chapter 13


identification and a password. The system determines the validity
of the information sent.

* CHAP is a three-step process. The system sends a value to the


user. The user manipulates the value and sends its result. The
system verifies the result.

* Network Control Protocol (NCP) is a set of protocols to allow


Multiple
the encapsulation of data coming from network layer protocols;
each set is specific for a network layer protocol that requires the
services of PPP.
Access
* Internetwork Protocol Control Protocol (IPCP), an NCP
protocol, establishes and terminates a network layer connection for
IP packets.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Figure 13.1 Multiple-access protocols

13.1 Random Access

MA

CSMA

carrier sense multiple access with collision


CSMA/CD detection

carrier sense multiple access with collision


CSMA/CA avoidance

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Figure 13.2 Evolution of random-access methods Figure 13.3 ALOHA network

ALOHA, the earliest random access method, was developed at


the University of Hawaii in early 1970. It was designed for a
radio (wireless) LAN, but it can be used on any shared
medium.
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

5
10/17/2012

Figure 13.4 Procedure for ALOHA protocol

http://highered.mcgraw-
hill.com/olcweb/cgi/pluginpop.cgi?it=swf::550::450::/sites/dl/free
/0072515848/93777/Fig13_5.swf::Figure%2013.5

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Figure 13.5 Collision in CSMA Figure 13.6 Persistence strategies

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

13.7 CSMA/CD procedure

For CSMA/CD to work, we need a restriction on the frame size.


Before sending the last bit of the frame, the sending station must
detect a collision, if any, and abort the transmission.

This is so because the station, once the entire frame is sent, does
not keep a copy of the frame and does not monitor the line for
collision detection. Therefore, the frame transmission time Tfr
must be at least two times the maximum propagation time Tp.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

6
10/17/2012

Figure 13.8 CSMA/CA procedure

Example 12.5

A network using CSMA/CD has a bandwidth of 10 Mbps. If the


maximum propagation time (including the delays in the devices and
ignoring the time needed to send a jamming signal, as we see later)
is 25.6 µs, what is the minimum size of the frame?

Solution

The frame transmission time is Tfr = 2 x Tp =51.2 µs. This means,


in the worst case, a station needs to transmit for a period of 51.2 µs
to detect the collision. The minimum size of the frame is 10 Mbps x
51.2 µs =512 bits or 64 bytes. This is actually the minimum size of
the frame for Standard Ethernet, as we will see later.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Figure 13.9 Reservation access method

13.2 Control Access

Reservation

Polling

Token Passing

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Figure 13.10 Select Figure 13.11 Poll

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

7
10/17/2012

Figure 13.12 Token-passing network

http://highered.mcgraw-
hill.com/olcweb/cgi/pluginpop.cgi?it=swf::550::450::/sites/dl/free/0
072515848/93777/Fig13_13.swf::Figure%2013.3

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Figure 13.13 Token-passing procedure

13.3 Channelization

FDMA

TDMA

CDMA

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Note::
Note Note::
Note

In FDMA, the bandwidth is divided In TDMA, the bandwidth is just one


into channels. channel that is timeshared.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

8
10/17/2012

Figure 13.14 Chip sequences

Note::
Note

In CDMA, one channel carries all


transmissions simultaneously.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Figure 13.15 Encoding rules Figure 13.16 CDMA multiplexer

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Figure 13.17 CDMA demultiplexer Figure 13.18 W1 and W2N

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

9
10/17/2012

Figure 13.19 Sequence generation


Example 1
Check to see if the second property about orthogonal codes holds
for our CDMA example.

Solution
The inner product of each code by itself is N. This is shown for code C; you
can prove for yourself that it holds true for the other codes.

C . C = [+1, +1, −1, −1] . [+1, +1, −1, −1] = 1 + 1 + 1 + 1 = 4

If two sequences are different, the inner product is 0.

B . C = [+1, −1, +1, −1] . [+1, +1, −1, −1] = 1 − 1 − 1 + 1 = 0

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

Example 2
* Medium access methods can be categorized as random, controlled,
Check to see if the third property about orthogonal codes holds for or channelized.
our CDMA example.
* In the carrier sense multiple-access (CSMA) method, a station
must listen to the medium prior to sending data onto the line.
Solution
* A persistence strategy defines the procedure to follow when a
The inner product of each code by its complement is −N. This is shown for station senses an occupied medium.
code C; you can prove for yourself that it holds true for the other codes.
* Carrier sense multiple access with collision detection (CSMA/CD)
−C ) = [+1, +1, −1, −1] . [−
C . (− [ −1, −1, +1, +1] = − 1 − 1 − 1 − 1 = −4 is CSMA with a postcollision procedure.
The inner product of a code with the complement of another code is 0.
* Carrier sense multiple access with collision avoidance
−C ) = [+1, −1, +1, −1] . [−
B . (− [ −1, −1, +1, +1] = −1 + 1 + 1 − 1 = 0 (CSMA/CA) is CSMA with procedures that avoid a collision.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

* Reservation, polling, and token passing are controlled-access * FDMA, TDMA, and CDMA are channelization methods.
methods.
* In FDMA, the bandwith is divided into bands; each band is
* In the reservation access method, a station reserves a slot for data reserved fro the use of a specific station.
by setting its flag in a reservation frame.
* In TDMA, the bandwidth is not divided into bands; instead the
* In the polling access method, a primary station controls bandwidth is timeshared.
transmissions to and from secondary stations.
* In CDMA, the bandwidth is not divided into bands, yet data
•In the token-passing access method, a station that has control of a from all inputs are transmitted simultaneously.
frame called a token can send data.
* CDMA is based on coding theory and uses sequences of
•Channelization is a multiple-access method in which the available numbers called chips. The sequences are generated using Walsh
bandwidth of a link is shared in time, frequency, or through code, tables.
between stations on a network.

McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2004

10

Вам также может понравиться