0% found this document useful (0 votes)
21 views182 pages

Unit 2

Subject: Computer Network security notes

Uploaded by

Pradnya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views182 pages

Unit 2

Subject: Computer Network security notes

Uploaded by

Pradnya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 182

Chapter-2

Link Layer Communication

10/1/2021
Review Topics
• Erro Detection and Correction Techniques
• Framing
• Flow and Error Control
• HDLC
• P2P protocol

10/1/2021
Error Detection and Correction Techniques
• Types of Errors:
• Whenever bits flow from one point to another, they are subject to
unpredictable changes because of interference.
• This interference can change the shape of the signal.
• In single-bit error,a 0 is changed to 1 or a 1 to a 0.
• In a burst error, multiple bits (2 or more) in data unit have changed
from 1 to 0 or from 0 to 1.

10/1/2021
Error Detection and Correction Techniques
• Redundancy: Central concept in detecting and correcting errors is
redundancy. The redundant bits are added by sender and removed by
receiver. Their presence allows receiver to detect or correct corrupted bits.
• Detection Versus Correction:
• The correction of errors is more difficult than the detection.
• In error correction, we need to know the exact number of bits that are
corrupted and more importantly, their location in the message.
• For example imagine receiver’s difficulty in finding 10 errors in a
data unit of 1000 bits.
• Forward Error Correction Versus Retransmission:
• Forward error correction is the process in which receiver tries to
guess the message by using redundant bits. This is possible if number of
errors is small.
• Correction by retransmission is a technique in which the receiver
detects the occurrence of an error and asks the sender to resend the
message.
4

10/1/2021
Error Detection and Correction Techniques
• Coding: Redundancy is achieved through various coding schemes.
Popular coding scheme is Block coding.

• Modular Arithmetic: In modulo-N arithmetic, we use only the


integers in the range 0 to N−1, inclusive.
• In Modulo-2 arithmetic, the modulus N is 2. We can use only 0 and 1. In
this arithmetic we use the XOR operation for both addition and subtraction.

10/1/2021
Error Detection and Correction Techniques
• BLOCK Coding: In block coding, we divide our message into blocks,
each of ‘k’ bits, called datawords. We add ‘r’ redundant bits to each block
to make the length n = k + r. The resulting ‘n’ bit blocks are called
codewords.

• Example: The 4B/5B block coding is a good example of this type of


coding. In this coding scheme, k = 4 and n = 5. We have 2k = 16
datawords and 2n = 32 codewords. 16 out of 32 codewords are used for
message transfer and the rest are either used for other purposes or unused.

10/1/2021
Error Detection and Correction Techniques
• Error Detection: how can errors be detected by using block coding? If
the following two conditions are met, the receiver can detect a change in the
original codeword.
• The receiver has (or can find) a list of codewords.
• The original codeword has changed to an invalid one.

10/1/2021
Error Detection and Correction Techniques
• Example: let us assume that k=2 and n=3, following Table-1 shows the
list of datawords and codewords.
• The receiver receives 011. It is valid codeword. Receiver extracts the
dataword 01 from it.
• The codeword is corrupted during transmission and 111 is received
(leftmost bit is corrupted). This is not a valid codeword and is discarded.
• The codeword is corrupted during transmission and 000 is received (right 2
bits are corrupted). This is a valid codeword. Receiver incorrectly extracts
the dataword 00. Two corrupted bits have made the error unacceptable.
• An error-detecting code can detect only the types of errors for which it
is designed; other types of errors may remain undetected.

10/1/2021
Error Detection and Correction Techniques
• Error Correction: in error correction the receiver needs to find or
guess the original codeword sent.
• Idea is same as error detection but the checker functions are much more
complex.

• Example: Let us add more redundant bits to previous Example to see if


the receiver can correct an error without knowing what was actually sent.
We add 3 redundant bits to the 2-bit dataword to make 5-bit codewords.
Following Table-2 shows the datawords and codewords.
9

10/1/2021
Error Detection and Correction Techniques
• Example: Assume the dataword is 01. The sender creates the codeword 01011.
The codeword is corrupted during transmission, and 01001 is received. First, the
receiver finds that the received codeword is not in the table. This means an error has
occurred. The receiver, assuming that there is only 1 bit corrupted, uses following
strategy to guess the correct dataword.
1. Comparing the received codeword with the first codeword in the table (01001
versus 00000), the receiver decides that the first codeword is not the one that was
sent because there are two different bits.
2. By the same reasoning, original codeword cannot be the 3rd or 4th one in the table.
3. The original codeword must be the second one in the table because this is the only
one that differs from the received codeword by 1 bit. The receiver replaces 01001
with 01011 and consults the table to find the dataword 01.

10

10/1/2021
Error Detection and Correction Techniques
• Hamming Distance: central concept in coding for error control is the idea of
the Hamming distance.
• The Hamming distance between two words is the number of differences between
corresponding bits. We can show the Hamming distance between two words x
and y as d(x, y).
• Example: let us find the Hamming distance between two pairs of words.
1. The Hamming distance d(000, 011) is 2 because

2. The Hamming distance d(10101, 11110) is 3 because

• The minimum Hamming distance is the smallest Hamming distance between all
possible pairs in a set of words.
• Find the minimum Hamming distance of the coding scheme in Table-1.
• Solution: We first find all Hamming distances.

• The dmin in this case is 2

11

10/1/2021
Error Detection and Correction Techniques
• Find the minimum Hamming distance of the coding scheme in Table-2.
• Solution: We first find all Hamming distances.

• The dmin in this case is 3.


• To guarantee the detection of up to ‘s’ errors in all cases, the minimum Hamming
distance in a block code must be dmin = s + 1.
• Example: The minimum Hamming distance for first code scheme (Table-1) is
2. This code guarantees detection of only a single error. For example, if the third
codeword (101) is sent and one error occurs, the received codeword does not match
any valid codeword. If two errors occur, however, the received codeword may
match a valid codeword and the errors are not detected.
• Example: in second block code scheme (Table-2) has dmin = 3. This code can
detect up to two errors. Again, we see that when any of the valid codewords is
sent, two errors create a codeword which is not in the table of valid codewords.
The receiver cannot be fooled.
• However, some combinations of three errors change a valid codeword to another
valid codeword. The receiver accepts the received codeword and the errors are
undetected. 12

10/1/2021
Error Detection and Correction Techniques
• Linear Block Codes: almost all codes used today belongs to a subset
called linear block codes .
• A linear block code is a code in which the exclusive OR (addition
modulo-2) of two valid codewords creates another valid
codeword.
• Example: Let us see if the two codes we defined in Table-1 and
Table-2 belong to the class of linear block codes.
1. The scheme in Table-1 is a linear block code because the result of
XORing of any codeword with any other codeword is a valid
codeword. For example, the XORing of the second and third
codewords creates the fourth one.
2. The scheme in Table-2 is also a linear block code. We can create all
four codewords by XORing of any two other codewords.

13

10/1/2021
Error Detection and Correction Techniques
• Minimum Distance for Linear Block Codes:
• Example: In our first code (Table-1), the numbers of 1s in the nonzero
codewords are 2, 2, and 2. So the minimum Hamming distance is dmin = 2. In
our second code (Table-2), the numbers of 1s in the nonzero codewords are 3, 3,
and 4. So in this code we have dmin = 3.
• A Simple Parity-Check Code: A simple parity-check code is a single-bit
error-detecting code in which n = k + 1 with dmin = 2.
• Even parity ensures that a codeword has an even number of 1’s and
• Odd parity ensures that there are an odd number of 1’s in the codeword.
• Table shows Simple Parity-Check code C(5, 4)

14

10/1/2021
Error Detection and Correction Techniques
• Encoder and Decoder for Simple Parity-CheckCode:
• Following figure shows a structure of an Encoder (sender) and Decoder (receiver).
• The Encoder uses a generator that takes a copy of a 4-bit dataword (a0, a1, a2 and
a3) and generates a parity bit r0.
• The dataword and the Parity bit creates 5-bit codeword.
• By adding 4-bits of the dataword (modulo-2); the result is parity bit. In other
word, if number of 1s is even, the result is 0; if the number of 1s is odd, the result
is 1. In both cases, total number of 1s in the codeword is even.

15

10/1/2021
Error Detection and Correction Techniques
• Example - Simple Parity-Check Code:
• Let us look at some transmission scenarios. Assume the sender sends the dataword
1011. The codeword created from this dataword is 10111, which is sent to the
receiver. Weexamine five cases:
1. No error occurs; the received codeword is 10111. The syndrome is 0. The
dataword 1011 is created.
2. One single-bit error changes a1. The received codeword is 10011. The syndrome
is 1. No dataword is created.
3. One single-bit error changes r0. The received codeword is 10110. The syndrome
is 1. No dataword is created.
4. An error changes r0 and a3. The received codeword is 00110. The syndrome is 0.
The dataword 0011 is created at the receiver. Note that here the dataword is
wrongly created due to the syndrome value.
5. Three bits-a3, a2, and a1 are changed by errors. The received codeword is 01011.
The syndrome is 1. The dataword is not created. This shows that the simple
parity check, guaranteed to detect one single error, can also find any odd
number of errors.
• Note: A simple parity-check code can detect an odd number of errors.

16

10/1/2021
Error Detection and Correction Techniques
• Two-dimensional Parity-check code:
• A better approach is the 2-diamnsional parity–check, in this the dataword is
organized in a table. Figure-a shows the dataword to be sent, five 7-bit bytes, are
put in separate row. For each row and each column, 1parity-check bit is calculated.
The whole table is then sent to the receiver, which finds the syndrome for each row
and column. As figure shows the 2-dimensional parity-check can detect up to three
errors that occurs any where in the table. However, errors affecting 4-bits may not
be detected.

17

10/1/2021
Error Detection and Correction Techniques
• Two-dimensional Parity-check code:

18

10/1/2021
Error Detection and Correction Techniques
• Hamming Codes:
• All Hamming codes discussed have dmin = 3 (2 bit error detection and single bit
error correction). A codeword consists of n bits of which k are data bits and r are
check bits. Let m = r, then we have: n = 2m -1 and k = n-m.
• For Example: if m=3, then n=7 and k=4. This is a Hamming code C(7, 4) with
dmin=3. Following table shows the datawords and codewords for this code.

19

10/1/2021
Error Detection and Correction Techniques
• Hamming Codes:
• Following figure shows structure of the Encoder & Decoder for a Hamming code.
• Calculates Parity bits at the transmitter
• Modulo 2 arithmetic:
• r0 = a2 + a1 + a0
• r1 = a3 + a2 + a1
• r2 = a1 + a0 + a3
• Calculates Syndrome at
the receiver
• s0 = b2 + b1 +b0+q0
• s1 = b3 + b2 +b1+q1
• s2 = b1 + b0 +b3+q2
• Logical decision made by the correction logic analyzer of decoder:

20

10/1/2021
Error Detection and Correction Techniques
• Hamming Codes – Example: Let us trace the path of three datawords from
the sender to the destination:
1. The dataword 0100 becomes the codeword 0100011. The codeword 0100011 is
received. The syndrome is 000, the final dataword is 0100.
2. The dataword 0111 becomes the codeword 0111001. The received codeword is:
0011001. The syndrome is 011. After flipping b2 (changing the 0 to 1), the final
dataword is 0111.
3. The dataword 1101 becomes the codeword 1101000. The received codeword is
0001000 (2 errors). The syndrome is 101. After flipping b0, we get 0000, the
wrong dataword. This shows that our code cannot correct two errors.
• Hamming Codes – Example: We need a dataword of at least 7 bits.
Calculate values of k and n that satisfy this requirement.
• Solution: We need to make k=n−m greater than or equal to 7, or 2m −1−m ≥ 7.
1. If we set m=3, the result is n=23−1=7 and k=7−3, or 4, which is < 7 (which is not
acceptable).
2. If we set m=4, then n=24−1=15 and k=15−4=11, which satisfies the condition
k>7. So the code is: C(15, 11).

21

10/1/2021
Error Detection and Correction Techniques
• Hamming Codes – Burst Errors Handling:
• Burst errors are very common, particularly in wireless environments
where a fade will affect a group of bits in transit. The length of the
burst is dependent on the duration of the fade.
• One way to counter burst errors, is to break up a transmission into
shorter words and create a block (one word per row), then have a
parity check per word.
• The words are then sent column by column. When a burst error
occurs, it will affect 1 bit in several words as the transmission is read
back into the block format and each word is checked individually.
• Note: when a burst error of size 4 corrupts the frame, only 1 bit
from each codeword is corrupted. The corrupted bit in each
codeword can then easily be corrected at the receiver.

22

10/1/2021
Error Detection and Correction Techniques
• Hamming Codes – Burst Errors Handling:

23

10/1/2021
Error Detection and Correction Techniques
• Cyclic Codes:
• Cyclic codes are special linear block codes with one extra property.
• In a cyclic code, if a codeword is cyclically shifted (rotated), the
result is another codeword.
• For example, if 1011000 is a codeword and we cyclically left-shift,
then 0110001 is also a codeword.
• In this case, if we have bits in first word a0 to a6 and the bits in the
second word b0 to b6, then we can shift the bits by using the
following method:
• b1 = a0 , b2 = a1 , b3 = a2 , b4 = a3 , b5 = a4 , b6 = a5 , b0 = a6
• Cyclic Redundancy Check (CRC): a category of cyclic codes
called the Cyclic Redundancy Check (CRC) that is used in
networks such as LANs and WANs.

24

10/1/2021
Error Detection and Correction Techniques
• Cyclic Codes: Table shows an example of a CRC code with C(7, 4).
We can see both the linear and cyclic properties of this code.

25

10/1/2021
Error Detection and Correction Techniques
• Cyclic Codes: Figure: CRC Encoder and Decoder

26

10/1/2021
Error Detection and Correction Techniques
• Cyclic Codes: Figure: CRC Encoder and Decoder
• In Encoder, the dataword has k bits (4); the codeword has n bits (7). The
size of the dataword is augmented by adding n-k (3 bits) 0s to the right-
hand side of the word. The n-bit result is fed into the generator.
• The generator uses a divisor of size n-k+1 (4 bits), predefined and agreed
upon. The generator divides the augmented dataword by the divisor
(modulo-2 division).
• The quotient of the division is discarded; the remainder (r2 rl r0) is
appended to the dataword to create the codeword.
• The decoder receives the possibly corrupted codeword. A copy of all n
bits is fed to the checker which is a replica of the generator. The
remainder produced by the checker is a syndrome of n-k (3 bits), which is
fed to the decision logic analyzer.
• The analyzer has a simple function. If the syndrome bits are all as 0s, the 4
leftmost bits of the codeword are accepted as the dataword (interpreted
as no error); otherwise, the 4 bits are discarded (error).

27

10/1/2021
Error Detection and Correction Techniques
• Cyclic Codes: Figure: Division in CRC Encoder

28

10/1/2021
Error Detection and Correction Techniques
• Cyclic Codes: Figure: Division in CRC Decoder for two cases

29

10/1/2021
Error Detection and Correction Techniques
• Cyclic Codes: Using Polynomials
• A pattern of 0s and 1s can be represented as a Polynomial with coefficients of 0 & 1.
• The power of each term shows the position of the bit; the coefficient shows the value
of the bit.
• Degree of a Polynomials: the degree of a polynomial is the highest power in the
polynomial, for example: the degree of a polynomial x6+x+1 is 6.
• Degree of a polynomial is 1 less than the number of bits in the pattern (7 bits).
• Following figure shows how polynomial is used to represent a binary word.

30

10/1/2021
Error Detection and Correction Techniques
• Addition or subtraction of a Polynomials: done by adding or subtracting the
coefficients of terms of same power. For example
• (x5+x4+x2 ) + (x6+x4+x2)= (x6+x5+x4+x4+x2+x2)= (x6+x5)
• Multiplying or Dividing terms: for multiplying a term by another term, we just add
the powers. For example: x3 x x4=x7.
• For dividing , we just subtract the power of the second term from the power of first.
For example: x5 / x2 = x3.
• Multiplying two polynomials: (x5+x3+x2+x)(x2+x+1)
• = x7+x6+x5+x5+x4+x3+x4+x3+x2+x3+x2+x = x7+x6+x3+x.
• Dividing One Polynomial byAnother:
• It is same as the binary division, we divide the first term of dividend by the first term
of the divisor and get the first term of quotient.
• We multiply the term in the quotient by the divisor and subtract the result from the
dividend.
• We repeat the process until the dividend degree is less than the divisor degree.
• Shifting of bits: following shows shifting of bits to the left and to the right.
• Shifting left 3 bits: 10011 becomes 10011000, x4+x+1 becomes x7+x4+x3
• Shifting right 3 bits: 10011 becomes 10, x4+x+1 becomes x
31

10/1/2021
Error Detection and Correction Techniques
• Cyclic Code Encoder using Polynomials: figure shows CRC division using
polynomials.
• The dataword 1001 is represented as x3+1. The divisor 1011 is represented as
x3+x+1. To find the augmented dataword, we have left shifted the dataword 3 bits
(multiplying by x3), the result is x6+x3.
• Division is straightforward, divide first term of the dividend, x6 by the first term of
the divisor x3. Then first term of the quotient is x3 (x6/x3).
• Then multiply x3 by the divisor and subtract the result from the dividend. The result
is x4, with a degree greater than divisor’s degree, we continue to divide until the
degree of the reminder is less than the degree of divisor.

32

10/1/2021
Error Detection and Correction Techniques
• Advantages of Cyclic Codes:
• Cyclic codes have a very good performance in detecting single-bit errors,
double errors, an odd number of errors, and burst errors.
• They can easily be implemented in hardware and software.
• They are especially fast when implemented in hardware.
• This has made cyclic codes a good candidate for many networks.
• Following are some Standard Polynomials

33

10/1/2021
Error Detection and Correction Techniques
• Checksum:
• Last error detection method is Checksum. It is used in the internet by several
protocols although not at the data link layer.
• Like linear and cyclic code, the checksum code based on the concept of redundancy.
• Idea (Concept):
• Suppose our data is a list of five 4-bit numbers that we want to send to a
destination. In addition to sending these numbers, we send the sum of the numbers.
For example, if the set of numbers is (7, 11, 12, 0, 6), we send (7, 11, 12, 0, 6, 36),
where 36 is the sum of the original numbers. The receiver adds the five numbers
and compares the result with the sum. If the two are the same, the receiver
assumes no error, accepts the five numbers, and discards the sum. Otherwise,
there is an error somewhere and the data are not accepted.
• Example 1: We can make the job of the receiver easier if we send the negative
(complement) of the sum, called the checksum. In this case, we send (7, 11, 12, 0,
6, −36). The receiver can add all the numbers received (including the
checksum). If the result is 0, it assumes no error; otherwise, there is an error.

34

10/1/2021
Error Detection and Correction Techniques
• Checksum:
• One’s Compliment
• Example: How can we represent the number 21 in one’s complement arithmetic
using only four bits?
• Solution: The number 21 in binary is 10101 (it needs five bits). We can wrap the
leftmost bit and add it to the four rightmost bits. We have (0101 + 1) = 0110 or 6.
• Example: How can we represent the number − 6 in one’s complement arithmetic
using only four bits?
• Solution: In one’s complement arithmetic, the negative or complement of a
number is found by inverting all bits. Positive 6 is 0110; negative 6 is 1001. If we
consider only unsigned numbers, this is 9. In other words, the complement of 6 is 9.
Another way to find the complement of a number in one’s complement arithmetic
is to subtract the number from 2n − 1 (16 − 1 in this case).

35

10/1/2021
Error Detection and Correction Techniques
• Checksum:
• Example: Let us redo Example 1 using one’s complement arithmetic. Following
Figure shows the process at the sender and at the receiver. The sender initializes
the checksum to 0 and adds all data items and the checksum (the checksum is
considered as one data item and is shown in color). The result is 36. However, 36
cannot be expressed in 4 bits. The extra two bits are wrapped and added with
the sum to create the wrapped sum value 6. In the figure, we have shown the
details in binary. The sum is then complemented, resulting in the checksum value
9 (15 − 6 = 9). The sender now sends six data items to the receiver including the
checksum 9.
• The receiver follows the same procedure as the sender. It adds all data items
(including the checksum); the result is 45. The sum is wrapped and becomes 15.
The wrapped sum is complemented and becomes 0. Since the value of the
checksum is 0, this means that the data is not corrupted. The receiver drops the
checksum and keeps the other data items. If the checksum is not zero, the entire
packet is dropped.

36

10/1/2021
Error Detection and Correction Techniques
• Checksum:

37

10/1/2021
Error Detection and Correction Techniques
• Internet Checksum:
• Traditionally, the internet has been using a 16-bit checksum. The sender
calculates the checksum by following these steps
1. The message is divided into 16-bit words.
2. The value of the checksum word is set to 0.
3. All words including the checksum are added using one’s
complement addition.
4. The sum is complemented and becomes the checksum.
5. The checksum is sent with the data.
• The receiver uses the following steps for error detection
1. The message (including checksum) is divided into 16-bit words.
2. All words are added using one’s compliment addition.
3. The sum is complimented and becomes the new checksum.
4. If the value of the checksum is 0, the message is accepted;
otherwise, it is rejected.

38

10/1/2021
Link Layer Communication

39
Review Topics
• Error Detection and Correction Techniques
• Framing
• Flow and Error Control
• HDLC
• P2P protocol

40
Framing
• Data transmission in the physical layer means moving bits in the
form of a signal from the source to the destination. The physical
layer provides bit synchronization to ensure that the sender and
receiver use the same bit durations and timing.
• The data link layer, on the other hand, needs to pack bits into
frames, so that each frame is distinguishable from another.
• Although the whole message could be packed in one frame, that is
not normally done. One reason is that a frame can be very large,
which makes flow and error control very inefficient.
• When a message is carried in one very large frame, even a single-bit
error would require the retransmission of the whole message.
• When a message is divided into smaller frames, a single-bit error
affects only that small frame.

41
Framing
• Fixed-Size Framing: in fixed-size framing, no need to define the
boundaries of the frames; the size itself can be used as a delimiter. An
example of this type of framing is the ATM wide-area network, which uses
frames of fixed size called as cells (53 bytes).
• Variable-Size Framing: in variable-size framing, we need a way to define
the end of the frame and the beginning of the next. Historically, two
approaches were used for this purpose: a character-oriented and a bit-
oriented approach.
• Character-Oriented Protocols:
• In character-oriented protocol, data to be carried are 8-bit characters
from a coding system such as ASCII. Header and trailer also consist of
multiples of 8 bits.
• To separate one frame from the next, an 8-bit (1-byte) flag is added at the
beginning and the end of a frame.

42
Framing
• Character-Oriented Protocols:
• Character-oriented framing was popular when only text was exchanged.
Now, however, we send other types of information such as graphs, audio,
and video. Any pattern used for the flag could also be part of the
information. If this happens, the receiver, when it encounters this pattern in
the middle of the data, thinks it has reached the end of the frame.
• To fix this problem, a byte-stuffing strategy added to character-oriented
framing.
• Byte stuffing is the process of adding 1 extra byte (escape) whenever there
is a flag or escape character in the text.

43
Framing
• Problem with Character-oriented protocols is the universal coding systems in use
today, such as Unicode, have 16-bit and 32-bit characters that conflict with 8-bit
characters. Hence we can say that in general, the tendency is moving toward the
bit-oriented protocols.
• Bit-Oriented Protocols
• In a bit-oriented protocol, the data section of a frame is a sequence of bits to be
interpreted by the upper layer as text, graphic, audio, video, and so on.
• However, in addition to header and trailer, we still need a delimiter to separate one
frame from the other. Most protocols use a special 8-bit pattern flag 01111110 as the
delimiter to define the beginning and the end of the frame.
• Flag can create the same type of problem we saw in the byte-oriented protocols.
• If the flag pattern appears in the data, we need to inform the receiver that this is not
the end of the frame. We do this by stuffing 1 bit (instead of 1 byte) to prevent the
pattern from looking like a flag. The strategy is called bit stuffing.

44
Framing
• Bit-Oriented Protocols
• Bit stuffing is the process of adding one extra 0 bit whenever sender encounters
five consecutive 1s after a 0 in the data, so that the receiver does not mistake the
pattern 0111110for a flag (01111110).

45
Flow Control and Flow Control
• The most important responsibilities of the data link layer are flow control
and error control. Collectively, these functions are known as data link
control.
• Flow Control: The flow of data must not be allowed to overwhelm the
receiver.
• Flow control refers to a set of procedures used to restrict the amount of
data that the sender can send before waiting for acknowledgment.
• Error Control: error control is both error detection and error
correction.
• It allows the receiver to inform the sender of any frames lost or damaged
in transmission and coordinates the retransmission of those frames by the
sender.
• Error control is often implemented simply: Any time an error is detected
in an exchange, specified frames are retransmitted automatically. This
process is called as Automatic Repeat Request (ARQ).
• Error control in the data link layer is based on Automatic Repeat
Request, which is the retransmission of data.
46
Protocols
• Data link layer can combine framing, flow control, and error
control to achieve the delivery of data from one node to another.
• The protocols are normally implemented in software.
• Two types of protocols
• Protocols used for noiseless (error-free) channels.
• Protocols used for noisy (error-creating) channels.

47
Noiseless Channel Protocols: Simplest
• Noiseless means an ideal channel in which no frames are lost,
duplicated, or corrupted. We have two protocols for this type of channel.
• There is no need for flow control in this scheme.
• The DLL at the sender site gets data from its network layer, makes a frame
out of the data, and sends it.
• The DLL at the receiver site receives a frame from its physical layer,
extracts data from the frame, and delivers the data to its network layer.
Figure shows the design.

48
Noiseless Channel Protocols: Simplest
• Following Figure shows an example of communication using this protocol.
It is very simple. The sender sends a sequence of frames without even
thinking about the receiver. To send three frames, three events occur at
the sender site and three events at the receiver site.

49
Noiseless Channel Protocols: Stop and Wait
• The protocol is called the Stop-and-Wait Protocol because the sender sends
one frame, stops until it receives confirmation from the receiver (okay to go
ahead), and then sends the next frame. We add flow control to our
previous protocol.
• Design: At any time, there is either one data frame on the forward channel
or one ACK frame on the reverse channel. Therefore need a half-duplex
link.

50
Noiseless Channel Protocols: Stop and Wait
• Following Figure shows an example of communication using this protocol.
It is still very simple. The sender sends one frame and waits for feedback
from the receiver. When the ACK arrives, the sender sends the next frame.
Note that sending two frames in the protocol involves the sender in four
events and the receiver in two events.

51
Noisy Channel: Stop-and-Wait ARQ
• Although the Stop-and-Wait Protocol gives us an idea of how to add flow
control to its predecessor, noiseless channels are nonexistent. We discuss
three protocols in this section that provides error control.
• To detect and correct corrupted frames, we need to add redundancy bits to
our data frame. When the frame arrives at the receiver site, it is checked and
if it is corrupted, it is silently discarded.
• Lost frames are more difficult to handle than corrupted ones. In our
previous protocols, there was no way to identify a frame. The received
frame could be the correct one, or a duplicate, or a frame out of order. The
solution is to number the frames. When the receiver receives a data frame
that is out of order, this means that frames were either lost or duplicated.
• Error correction in Stop-and-Wait ARQ is done by keeping a copy of
the sent frame and retransmitting of the frame when the timer expires.
• Stop-and-Wait ARQ, uses Sequence numbers (modulo-2 arithmetic) to
number the frames and Acknowledgment number (modulo-2
arithmetic), is the sequence number of the next frame expected.

52
Noisy Channel: Stop-and-Wait ARQ
• Design:
• The sending device keeps a copy of the last frame transmitted until it
receives an acknowledgment for that frame.
• A data frames uses a seqNo; and ACK frame uses an ackNo.
• Sender has a control variable, called as Sn (sender, next frame to send),
that holds the sequence number for the next frame to be send (0 or 1).
• The receiver has a control variable, called as Rn (for receiver, next frame
expected), that holds the number of the next frame expected.
• When a frame is sent, the value of Sn is incremented (modulo-2), which
means if it is 0, it becomes 1 and vice versa.
• When a frame is received, the value of Rn is incremented (modulo-2),
which means if it is 0, it becomes 1 and vice versa.
• Three events can happen at the sende site; one event can happen at the
receiver site. Variable Sn points to the slot that matches the sequence
number of the frame that has been sent, but not acknowledged; Rn
points to the slot that matches the sequence number of the expected
frame.
53
Noisy Channel: Stop-and-Wait ARQ
• Following figure shows Design of the Stop-and-Wait ARQ Protocol.

54
Noisy Channel: Stop-and-Wait ARQ
• Following Figure shows an example of Stop-and-Wait ARQ. Frame 0 is sent and
acknowledged. Frame 1 is lost and resent after the time-out. The resent frame 1 is
acknowledged and the timer stops. Frame 0 is sent and acknowledged, but the
acknowledgment is lost. The sender has no idea if the frame or the
acknowledgment is lost, so after the time-out, it resends frame 0, which is
acknowledged.

55
Noisy Channel: Go-Back-N ARQ
• To improve the efficiency of transmission, we must have more than one
frame be outstanding (in transition) to keep the channel busy while the
sender is waiting for acknowledgment. Two protocols that can achieve this
goal.
• The first is called Go-Back-N Automatic Repeat Request. In this protocol
we can send several frames before receiving acknowledgments; we keep a
copy of these frames until the acknowledgments arrive.
• In the Go-Back-N Protocol, the sequence numbers are modulo 2m where m
is the size of the sequence number field in bits.
• For example, if m is 4, the only sequence numbers are 0 through 15.
• Sliding Windows:
• Sender and Receiver need to deal with only part of the possible sequence
numbers.
• The range which is the concern of the sender is called as send sliding
window; and
• The range that is the concern of the receiver is called as receive sliding
window.
56
Noisy Channel: Go-Back-N ARQ
• Window, at any time divides the possible sequence numbers into 4 regions.
• 1st region, defines the sequence numbers belonging to frames that are already
acknowledged. The sender does not worry about these frames and keeps no copies
of them.
• 2nd region, defines the range of sequence numbers belonging to the frames that are
sent and have an unknown status (called as outstanding frames). Sender needs to
wait to find out
however, theif corresponding
these frames have data
been received
packetsor have
were lost.
not yet been
• 3received
rd region,from
defines
thethenetwork
range oflayer.
sequence numbers for frames that can be sent;
• Finally, 4th region defines sequence numbers that cannot be used until
the window slides.
• Send window is an abstract concept defining an imaginary box
of size 2m - 1 with three variables: Sf – first outstanding frame, Sn –
the next frame to be sent and Ssize – send window size.
• Send window can slide one or more slots when a valid
acknowledgment arrives.
• Receive window is an abstract concept defining an imaginary
box of size 1 with one single variable Rn. The window slides when
a correct frame has arrived; sliding occurs one slot at a time.
57
Noisy Channel: Go-Back-N ARQ
• Send Window for Go-Back-N ARQ and Receive Window for Go-Back-NARQ

58
Noisy Channel: Go-Back-N ARQ
• Design: multiple frames can be in transit in the forward direction, and multiple
acknowledgments in the reverse direction. The idea is similar to Stop-and-Wait
ARQ; the difference is that the send window allows us to have as many frames in
transition as there are slots in the send window.

59
Noisy Channel: Go-Back-N ARQ
• In Go-Back-N ARQ, the size of the send window must be less than 2m; the size
of the receiver window is always 1.
• Resending a Frame: When the timer expires, the sender resends all outstanding
frames. For example, suppose the sender has already sent frame 6, but the timer for
frame 3 expires. This means that frame 3 has not been acknowledged; the sender
goes back and sends frames 3, 4, 5, and 6 again. That is why the protocol is called
Go-Back-N ARQ.
• Example: following figure shows what happens when a frame is lost. Frames 0, 1,
2, and 3 are sent. However, frame 1 is lost. The receiver receives frames 2 and 3,
but they are discarded because they are received out of order. The sender receives
no acknowledgment about frames 1, 2, or 3. Its timer finally expires. The sender
sends all outstanding frames (1, 2, and 3) because it does not know what is wrong.
Note that the resending of frames 1, 2, and 3 is the response to one single event.
When the sender is responding to this event, it cannot accept the triggering of
other events. This means that when ACK 2 arrives, the sender is still busy with
sending frame 3. The physical layer must wait until this event is completed and the
data link layer goes back to its sleeping state. We have shown a vertical line to
indicate the delay. It is the same story with ACK 3; but when ACK 3 arrives, the
sender is busy responding to ACK 2. It happens again when ACK 4 arrives. Note
that before the second timer expires, all outstanding frames have been sent and
the timer is stopped.
60
Noisy Channel: Go-Back-N ARQ
• Example

61
Noisy Channel: Selective Repeat ARQ
• Go-Back-N ARQ simplifies the process at the receiver site. The receiver keeps
track of only one variable, and there is no need to buffer out-of-order frames;
they are simply discarded. However, this protocol is very inefficient for a noisy
link. In a noisy link a frame has a higher probability of damage, which means
the resending of multiple frames.
• This resending requires more bandwidth (up) and slows down the transmission.
For noisy links, there is another mechanism that does not resend N frames when
just one frame is damaged; only the damaged frame is resent. This mechanism
is called Selective RepeatARQ.
• It is more efficient for noisy links, but the processing at the receiver is more
complex.
• In Selective Repeat ARQ, the size of the sender and receiver window must
be at most one-half of 2 m. If m=4, then the sequence numbers go from 0 to 15,
but the size of the window is just 8 (at sender as well as receiver).
• As sizes of the send window and receive window are the same, all the frames
in the send window can arrive out of order at receiver and be stored until they
can be delivered. However, the receiver never delivers packets out of order to
the network layer.
62
Noisy Channel: Selective Repeat ARQ
• Send and Receive window for Selective RepeatARQ

63
Noisy Channel: Selective Repeat ARQ
• Design for Selective Repeat ARQ: The handling of the request event is similar to
that of the previous protocol except that one timer is started for each frame sent. The
arrival event is more complicated here. An ACK or a NAK frame may arrive. If a
valid NAK frame arrives, we just resend the corresponding frame. If a valid ACK
arrives, we use a loop to purge the buffers, stop the corresponding timer. The time-
out event is simpler here; only the frame which times out is resent.

64
Noisy Channel: Selective Repeat ARQ
• Example:
• In this example frame 1 is lost. We show how Selective Repeat behaves in this case.
Following figure shows the situation. One main difference is the number of
timers. Here, each frame sent or resent needs a timer, which means that the timers
need to be numbered (0, 1, 2, and 3). The timer for frame 0 starts at the first
request, but stops when the ACK for this frame arrives. The timer for frame 1
starts at the second request, restarts when a NAK arrives, and finally stops when
the last ACK arrives. The other two timers start when the corresponding frames
are sent and stop at the last arrival event.
• At the receiver site we need to distinguish between the acceptance of a frame and
its delivery to the network layer. At the second arrival, frame 2 arrives and is stored
and marked, but it cannot be delivered because frame 1 is missing. At the next
arrival, frame 3 arrives and is marked and stored, but still none of the frames can
be delivered. Only at the last arrival, when finally a copy of frame 1 arrives, can
frames 1, 2, and 3 be delivered to the network layer. There are two conditions for
the delivery of frames to the network layer: First, a set of consecutive frames must
have arrived. Second, the set starts from the beginning of the window.

65
Noisy Channel: Selective Repeat ARQ
• Example:

66
Noisy Channel: Selective Repeat ARQ
• Example:
• Another important point is that a NAK1 is sent after the second arrival, but not
after the third, although both situations look the same. The reason is that the
protocol does not want to crowd the network with unnecessary NAKs and
unnecessary resent frames. A NAK is sent once for each window position.
• The next point is about the ACKs. Notice that only two ACKs are sent here. The
first one acknowledges only the first frame; the second one acknowledges three
frames. In Selective Repeat, ACKs are sent when data are delivered to the network
layer. If the data belonging to n frames are delivered in one shot, only one ACK is
sent for all of them.

67
Review Topics
• Error Detection and Correction Techniques
• Framing
• Flow and Error Control
• HDLC
• P2P protocol

68
High-level Data Link Control (HDLC)
• High-level Data Link Control (HDLC) is a bit-oriented protocol for
communication over point-to-point and multipoint links. It implements the ARQ
mechanisms.
• It supports both half-duplex and full duplex transmission, point to point and
multipoint configuration, as well as switched or non-switched channels. An HDLC
station or site is classified as one of three types.
1. The Primary site: it has control (acts as master) over the channel and transmits
command frames to the secondary sites on the channel. In turn, it receives
response frame from secondary sites. If the link is multipoint, the primary site is
responsible for maintaining a separate session with each secondary site attached to
the link.
2. The Secondary site: it acts as a slave to the primary site. It responds to the
command frame from primary site in the form of responses. It maintains only
one session, that being with primary site. It has no control on the link.
3. The Combined site: it transmits both commands and responses and receives both
commands and responses from another combined site. It maintains a session with
one other combined site.

69
High-level Data Link Control (HDLC)
• At any moment an HDLC Station can be in one of the three logical states:
1. Logically Disconnected state (LDS): prohibits station from transmitting or
receiving information.
2. Initialization state (IS): stations are initialized for data frame transfer.
3. Information transfer state (ITS): allows primary, secondary and combined stations
to transmit or receive user information.
• Stations communicate with each other through one of two modes of operations:
• HDLC Configurations and TransferModes
1. Normal Response Mode (NRM): requires the secondary station to receive explicit
permission from the primary station before transmitting. After receiving the
permission, the secondary station initiates a response transmission which may
contain user data. The transmission may consist of one or more frames while
channel being used by secondary station. After the last frame transmission,
secondary station must again await explicit permission before it can transmit again.
NRM is used for both point-to-point and multiple-point link / configuration.

70
High-level Data Link Control (HDLC)
• HDLC Configurations and TransferModes
• Stations communicate with each other through one of two modes of operations:
2. Asynchronous Balanced Mode (ABM): (Hybrid configuration) uses combined
stations. The combined station may initiates transmission without receiving the prior
permission from any other combined station. In ABM, the configuration is
balanced. The link is point-to-point, and each station can function as a primary and
a secondary (acting as peers). This is the common mode today.

71
High-level Data Link Control (HDLC)
• Access Technique: Polling (Poll / Select)
• The poll/select method of line discipline works with topologies where one device is
designed as a primary station and the other connected devices are secondary
stations.
• The primary is always the initiator of a session. If the primary wants to receive
data, it asks the secondary stations if they have anything to send; this function is
called Polling.
• If the primary wants to send data, it tells the target secondary to get ready to
receive; this function is called Selecting.

72
High-level Data Link Control (HDLC)
• Polling (Poll mode)
• When the primary is ready to receive data, it must ask (poll) each device in turn if it
has anything to send.
• The secondary can respond with a NAK frame if nothing to send or with a data
frame if it does.
• POLLSEQUENCE
1. POLL: from primary to secondary.
2. DATA: from secondary to primary.
3. ACK DATA: from primary to secondary.
4. EOT: from secondary to primary.
• NEGATIVE RESPONSE TO POLL
1. POLL: from primary to secondary.
2. NAK: from secondary to primary.

73
High-level Data Link Control (HDLC)
• Polling (Select mode)
• The primary controls the link. Therefore the select mode is used whenever the
primary device has something to send.
• Before sending the data, the primary creates and transmits a select (SEL) frame
(which includes the address of the intended secondary station).
• SELECT SEQUENCE
1. SEL: from primary to secondary.
2. ACK: from secondary to primary site (ready for receiving).
3. DATA: from primary to secondary.
4. ACK DATA: from secondary to primary.
5. EOT: from primary to secondary.

74
High-level Data Link Control (HDLC)
• Frames
• HDLC defines three types of frames: Information frames (I-frames), Supervisory
frames (S-frames), and Unnumbered frames (U-frames).
1. I-frames are used to transport user data and control information relating to user
data (piggybacking).
2. S-frames are used only to transport control information.
3. U-frames are reserved for system management. Information carried by U-frames is
intended for managing the link itself.

75
High-level Data Link Control (HDLC)
• Frames: fields
• Flag: it is an 8-bit sequence with the bit pattern 01111110 that identifies both the
beginning and the end of a frame and serves as a synchronization pattern for the
receiver.
• Address: it contains the address of the secondary station. If a primary station
created the frame, it contains a to address. If a secondary creates the frame, it
contains a from address. An address field can be 1 byte or several bytes long,
depending on the needs of the network. One byte can identify up to 128 stations (l
bit is used for another purpose). Large networks require multiple-byte address. If
it is 1 byte, the last bit is 1. If it is more than 1 byte, all bytes except the last one
will end with 0; only the last will end with 1. Ending each intermediate byte with 0
indicates to the receiver that there are more address bytes to come.
• Control: it is a 1 or 2-byte segment of the frame used for flow and error control. The
interpretation of bits in this field depends on the frame type.
• Information: it contains the user's data from the network layer or management
information. Its length can vary from one network to another.
• FCS: frame check sequence (FCS) is the HDLC error detection field. It can contain
either a 2 or 4-byte ITU-T CRC (International Telecommunication Union –
Telecommunication Standardization Sector).
76
High-level Data Link Control (HDLC)
• Frames: Control field
• Control field for I – frames: I-frames are designed to carry user data from the
network layer. In addition, they can include flow and error control information.
The subfields are used to define these functions.
• The first bit is 0, this means the frame is an I-frame.
• The next 3 bits, called N(S), define the sequence number of the frame.; but in the
extension format, in which the control field is 2 bytes, this field is larger. The last 3
bits, called N(R), correspond to the acknowledgment number.
• The single bit between N(S) and N(R) is called the P/F bit. It is a single bit with a
dual purpose. It has meaning only when it is set (bit = 1) and can mean poll or final.
It means poll when the frame is sent by a primary station to a secondary. It means
final when the frame is sent by a secondary to a primary.

77
High-level Data Link Control (HDLC)
• Frames: Control field
• Control field for S – frames: Supervisory frames are used for flow and
error control whenever piggybacking is not possible (e.g., when the station either has
no data of its own to send or needs to send a command or response other than an
acknowledgment).
• S-frames do not have information field.
• If the first 2 bits of the control field is 10, this means the frame is an S-frame.
• The last 3 bits, called N(R), corresponds to the acknowledgment number (ACK)
or negative acknowledgment number (NAK) depending on the type of S-frame.
• The 2 bits called code is used to define the type of S-frame itself, can have four
types of S-frames, as described below:
• 00: Receive ready (RR): This kind of frame acknowledges the receipt of a safe and
sound frame or group of frames, and it announces that the ready to receive
more frames. The value of N(R) field is the acknowledgment number.
• 10: Receive not ready (RNR): This kind of frame acknowledges the receipt of a
frame or group of frames, and it announces that the receiver is busy and cannot
receive more frames. It acts as a kind of congestion control mechanism by asking
the sender to slow down. The value of N(R) is the acknowledgment number.

78
High-level Data Link Control (HDLC)
• Frames: Control field
• 01: Reject (REJ): This is a NAK frame, but not like the one used for Selective
Repeat ARQ. It is a NAK that can be used in Go-Back-N ARQ. The value of N(R)
is the negative acknowledgment number.
• 11: Selective reject (SREJ): This is a NAK frame used in Selective Repeat ARQ.
Note that the HDLC Protocol uses the term selective reject instead of selective
repeat. The value of N(R) is the negative acknowledgment number.
• Control field for U – frames: Unnumbered frames are used to exchange
session management and control information between connected devices.
• U-frame codes are divided into two sections: a 2-bit prefix before the P/F bit and a
3-bit suffix after the P/F bit.
• Together, these two segments (5 bits) can be used to create up to 32 different types
of U-frames. Some of the more common types are shown in following table.

79
High-level Data Link Control (HDLC)
• Frames: Control field
• Control field for U – frames: U-frame control command and response

80
High-level Data Link Control (HDLC)
• Example: following figure shows how U-frames can be used for connection
establishment and connection release. Node A asks for a connection with a SABM
frame; node B gives a positive response with an Unnumbered Acknowledgment
(UA) frame. After these two exchanges, data can be transferred between the two
nodes. After data transfer, node A sends a DISC (disconnect) frame to release the
connection; it is confirmed by node B responding with a UA frame.

81
Point-to-Point Protocol (PPP)
• Although HDLC is a general protocol that can be used for both point-to-point and
multipoint configurations, one of the most common protocols for point-to-point
access is the Point-to-Point Protocol (PPP). PPP is a byte-oriented protocol.
• Today, millions of Internet users who need to connect their home computers to the
server of an ISP uses PPP.
• The majority of these users have a traditional modem; which provides the services of
the physical layer. But to control and manage the transfer of data, there is a need for
a point-to-point protocol at the DLL. PPP is the most common protocol used at DLL.
• PPP provides several services
1. PPP defines the format of the frame to be exchanged between devices.
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 link frame.
4. PPP defines how two devices can authenticate each other.
5. PPP provides multiple network layer services supporting a 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.
82
Point-to-Point Protocol (PPP)
• However to keep PPP simple, following services are missing
1. PPP does not provide flow control. A sender can send several frames one after
another with no concern about overwhelming the receiver.
2. PPP has a very simple mechanism for error control. A CRC field 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.
3. PPP does not provide a sophisticated addressing mechanism to handle frames
in a multipoint configuration.
• PPP frame format
• Flag: A PPP frame starts and ends with a 1-byte flag with the bit pattern 01111110.
Although this pattern is the same as that used in HDLC, there is a big difference.
PPP is a byte-oriented protocol; HDLC is a bit-oriented protocol. The flag is
treated as a byte.
• Address: The address field in this protocol is a constant value and set to 11111111
(broadcast address). During negotiation, the parties may agree to omit this byte.
• Control: This field is set to the constant value 11000000. As PPP does not provide
any flow control. Error control is also limited to error detection. This means that this
field is not needed at all, and again, two parties can agree, during negotiation, to
omit this byte.
83
Point-to-Point Protocol (PPP)
• PPP frame format
• Protocol: . This field defines what is being carried in the data field: either user data
or other information. This field is by default 2 bytes long, but the two parties can
agree to use only 1 byte.
• Payload field: This field carries either the user data or other information. The data
field is a sequence of bytes with the default of a maximum of 1500 bytes; but this
can be changed during negotiation. The data field is byte stuffed if the flag byte
pattern appears in this field.
• FCS: The frame check sequence (FCS) is simply a 2-byte or 4-byte standard CRC.

84
Point-to-Point Protocol (PPP)
• Byte Stuffing: PPP, is a byte-oriented protocol totally different from HDLC. As a byte-
oriented protocol, the flag in PP is a byte and needs to be escaped whenever
it appears in the data section of the frame. The escape byte is 01111101, which
means that every time the flag like pattern appears in the data, this extra byte
is stuffed to tell the receiver that the next byte is not a flag.
• PPP is a byte-oriented protocol using byte stuffing with the escape byte
01111101.
• PPP Connection Phases (transition phases)
• Dead: In the dead phase the link is not being used. There is no active carrier
(at the physical layer) and the line is quiet.
• Establish: When one of the nodes starts the communication, the connection
goes into this phase. In this phase, options are negotiated between the two
parties. If the negotiation is successful, the system goes to the authentication
• (if required) or directly to the networking phase.
phase
, ,
not to skip this phase, then proceeds with authentication, they exchange
several authentication packets. If exchange is successful, the connection goes
to the networking phase; otherwise, it goes to the termination phase.
85
Point-to-Point Protocol (PPP)
• PPP Connection Phases (transition phases)
• Network: in this phase, negotiation for the network layer protocols takes place. PPP
specifies that two nodes establish a network layer agreement before data at the
network layer can be exchanged. The reason is that PPP supports multiple protocols
at the network layer.
• Open: in this phase, data transfer takes place. When a connection reaches this phase,
the exchange of data packets can be started. The connection remains in this phase
until one of the endpoints wants to terminate the connection.
• Terminate: In the termination phase the connection is terminated. Several packets
are exchanged between the two ends for closing the link.

86
Point-to-Point Protocol (PPP)
• Multiplexing in PPP
• Although PPP is a data link layer protocol, PPP uses another set of other protocols to
establish the link, authenticate the parties involved, and carry the network layer data.
• Three sets of protocols are defined to make PPP powerful: the Link Control
Protocol (LCP), two Authentication Protocols (APs), and several Network
Control Protocols (NCPs).
• At any moment, a PPP frame can carry data from one of these protocols in its data
field, as shown in Figure.

87
Point-to-Point Protocol (PPP)
• Link Control Protocol (LCP)
• LCP is responsible for establishing, maintaining, configuring, and terminating
links. It also provides negotiation mechanisms to set options between the two
endpoints. Both endpoints of the link must reach an agreement about the options
before the link can be established.
• All LCP packets are carried in the payload field of the PPP frame with the
protocol field set to C021 in hexadecimal.

• Code: it defines the type of LCP packet. There are 11 types of packets as shown in
Table.
• ID: it holds a value that matches a request with a reply. One endpoint inserts a value
in this field, which will be copied into the reply packet.
• Length: The length field defines the length of the entire LCP packet.
• Information: contains information, such as options, needed for some LCP packets.
88
Point-to-Point Protocol (PPP)
• Link Control Protocol (LCP): 11 types of packets

• There are three categories of packets.


• The first category, comprising the first four packet types, is used for link
configuration during the establish phase.
• The second category, comprising packet types 5 and 6, is used for link
termination during the termination phase.
• The last five packets are used for link monitoring and debugging.
89
Point-to-Point Protocol (PPP)
• Link Control Protocol (LCP)
• Common Options negotiated between two End points
• Options are inserted in the information field of the configuration packets.
• In this case, the information field is divided into three fields: option type, option
length, and option data.
• Some of the most common options shown in following table.

90
Point-to-Point Protocol (PPP)
• Authentication Protocols (AP)
• Authentication plays a very important role in PPP because PPP is designed for use
over dial-up links where verification of user identity is necessary.
• Authentication means validating the identity of a user who needs to access a set of
resources. PPP has created two protocols for authentication: PAP - Password
Authentication Protocol and CHAP - Challenge Handshake Authentication
Protocol. These protocols are used during the authentication phase.
• PAP – Password Authentication Protocol: is a simple authentication procedure
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.
• Figure shows the three types of packets used by PAP and how they are actually
exchanged.
• When a PPP frame is carrying any PAP packets, the value of the protocol field is
OxC023. The three PAP packets are Authenticate-request, Authenticate-ack, and
Authenticate-nak.

91
Point-to-Point Protocol (PPP)
• Authentication Protocols (AP)
• PAP – Password Authentication Protocol:
1. Authenticate-request: first packet is used by the user to send the user name and
password.
2. Authenticate-ack: second packet is used by the system to allow access.
3. Authenticate-nak: third packet is used by the system to deny access.

92
Point-to-Point Protocol (PPP)
• Authentication Protocols (AP)
• CHAP – Challenge Handshake Authentication Protocol: 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.
• The system sends the user a challenge packet containing a challenge value, usually
a few bytes.
• 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.
• 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. Figure shows the packets and how they are used.
• CHAP packets are encapsulated in the PPP frame with protocol value C223 in hex.
• Four packets used by CHAP: challenge, response, success and failure.

93
Point-to-Point Protocol (PPP)
• Authentication Protocols (AP): CHAP
1. Challenge packet is used by the system to send the challenge value.
2. Response packet is used by the user to return the result of the calculation.
3. Success packet is used by the system to allow access to the system.
4. Failure packet is used by the system to deny access to the system.

94
Point-to-Point Protocol (PPP)
• Network Control Protocols (NCP)
• PPP is a multiple-network layer protocol. It can carry a network layer data packet
from protocols defined by the Internet, OSI, Xerox, DECnet, AppleTalk, Novel,
and so on.
• PPP has defined a specific Network Control Protocol for each network protocol.
• For example, IPCP (Internet Protocol Control Protocol) configures the link for
carrying IP data packets. Xerox CP does the same for the Xerox protocol data
packets, and so on.
• Note that none of the NCP packets carry network layer data; they just configure the
link at the network layer for the incoming data.
• IPCP : This protocol configures the link used to carry IP packets in the Internet. The
format of an IPC packet is shown in Figure.
• Note that the value of the protocol field in hexadecimal is 8021.
• Other protocols: There are other NCP protocols for other network layer protocols.
The OSI Network Layer Control Protocol has a protocol field value of 8023; the
Xerox Control Protocol has a protocol field value of 8025; and so on.
• The value of the code and the format of the packets for these other protocols are the
same as shown in table.

95
Point-to-Point Protocol (PPP)
• Network Control Protocols (NCP)
• IPCP defines seven packets, distinguished by their code values, as shown in table.

96
Point-to-Point Protocol (PPP)
• Multilink PPP
• PPP was originally designed for a single-channel point-to-point physical link. The
availability of multiple channels in a single point-to-point link motivated the
development of Multilink PPP.
• A logical PPP frame is divided into several actual PPP frames. A segment of the
logical frame is carried in the payload of an actual PPP frame, as shown in Figure.
• To show that the actual PPP frame is carrying a fragment of a logical PPP frame, the
protocol field is set to 0x003d. This new development adds complexity. For
example, a sequence number needs to be added to the actual PPP frame to show a
fragment's position in the logical frame.

97
Point-to-Point Protocol (PPP)
• Example:
• Let us go through the phases followed by a network layer packet as it is
transmitted through a PPP connection. Figure shows the steps. For simplicity, we
assume unidirectional movement of data from the user site to the system site (such
as sending an e-mail through an ISP).
• The first two frames show link establishment. We have chosen two options (not
shown in the figure): using PAP for authentication and suppressing the address
control fields. Frames 3 and 4 are for authentication. Frames 5 and 6 establish the
network layer connection using IPCP.
• The next several frames show that some IP packets are encapsulated in the PPP
frame. The system (receiver) may have been running several network layer
protocols, but it knows that the incoming data must be delivered to the IP protocol
because the NCP protocol used before the data transfer was IPCP.
• After data transfer, the user then terminates the data link connection, which is
acknowledged by the system. Of course the user or the system could have chosen
to terminate the network layer IPCP and keep the data link layer running if it
wanted to run another NCP protocol.

98
Point-to-Point Protocol (PPP)
• Example:

99
Point-to-Point Protocol (PPP)
• Example:

10
0
Contents
Channel allocation: Static and Dynamic, Multiple
Access Protocols: Pure and Slotted ALOHA, CSMA,
CSMA/CD, CSMA/CA,

IEEE 802.3 Standards and Frame Formats,

Binary Exponential Back -off algorithm,

Fast Ethernet, Gigabit Ethernet,

IEEE 802.11a/b/g/n and IEEE 802.15 and IEEE


802.16 Standards, Frame formats, WDMA
Multiple Access
Problem: When two or more nodes transmit at the
same time, their frames will collide and the link
bandwidth is wasted during collision .
 How to coordinate the access of multiple
sending/receiving nodes to the shared link???
Solution: We need a protocol to coordinate the
transmission of the active nodes.

These protocols are called Medium or Multiple


Access Control (MAC) Protocols belong to a sub-
layer of the data link layer called MAC (Medium
Access Control)
What is MAC sub-layer ?
The Protocols used to determine who goes next on
multi-access channel belong to sub-layer of DLL called
MAC sub-layer.
The MAC sub-layer is especially important in LANs,
many of which use multi-access channel as the basics
for communication.
What is Channel Allocation Problem?

The central theme of this chapter is how to


allocate a single broadcast channel among
competing users.
These multiplexing schemes are dividing into two
categories: FDM & TDM
Frequency Division Multiplexing

All signals are transmitted at the same time, each using different
frequencies(Analog signaling is used to transmits the signals)
10
Time Division Multiplexing

Sharing of the signal is accomplished by dividing available transmission


time on a medium among users. Digital signaling is used exclusively
Channel Allocation

 Static Channel Allocation in LANs and MANs


 Dynamic Channel Allocation in LANs and MANs
Static Channel Allocation in LANs and MANs

•Frequency Division Multiplexing (FDM) is an example


of static channel allocation where the bandwidth is
divided among a number of N users.
I. If users are less than N spectrum will be wasted.
II. If
users are more than N wants to communicate, those
who have not been assigned a frequency will be denied
permission.
I.If users are constant at N, each user traffic usually
changes dynamically over time.
Dynamic Channel Allocation in LANs and
MANs
1. Station Model: N independent stations, each with
a program or user that generates frames for
transmission. Once a frame is generated, the
station is blocked. Stations are also called
terminals.
2. Single Channel Assumption: A single channel is
available for all communication.

3. Collision Assumption: All collide frame must be


transmitted again later.
Key assumptions
4a. Continuous Time: Frame transmission can
begin at any instant.
4b. Slotted Time: Time is divided into slots. Frame
transmission always begin at the start of a slot.
5a. Carrier Sense: Stations can tell if the channel is
in use before trying to use it.
5b. No Carrier Sense: Stations cannot sense the
channel before trying to use it.
ALOHA Protocol

A A  Developed by Norman
ACK
C C ACK Abramson & his colleagues at
K K
A A
the Univ. of Hawaii in 1970.
ACK
C CACK
K K  Uncoordinated users are
competing for the use of single
shared channel.
The questions in our mind ??
1. When can a station access the medium
(Link)?
2. What can a station do if the medium is busy?
3. How can a station determine the success or
the failure of the transmission?

4. What can a station do if there is an access


conflict?
There are two types of ALOHA
Protocol

They differ with respect with to whether time is divided into


discrete slots into which all frames must fit.

1. Pure ALOHA
does not require global time synchronization.
2. Slotted ALOHA
slotted ALOHA require global time sync.
Pure ALOHA

•Pure ALOHA have made the frames all the same


length because the throughput of ALOHA system
is maximized by having a uniform frame size
rather than by allowing variable length frame
1.Pure ALOHA Collision both frame are destroyed

In pure ALOHA, frames are transmitted at completely arbitrary times.


Vulnerable period for the shaded frame
t be the time req. to send a frame

 In
pure ALOHA station does not listen to the channel
before transmitting.
2. Slotted ALOHA
•Methods for Doubling the capacity of the ALOHA
system.
•Time divided into discrete intervals
›1 interval → 1 frame
•The sending station waits until the beginning of the
next discrete interval.

•Probability of no other traffic is about 0.368 twice that


of pure ALOHA shown in diagram bellow.

117
Pure & Slotted Aloha
maximum efficiency: 1/e

maximum efficiency: 1/2e

Throughput versus offered traffic for


ALOHA network
G - mean of the Poisson prob. of k transmission attempts per frame time
118
Multiple Access Protocols

ALOHA

119 6/7/17
Carrier Sense Multiple Access
•Invented to minimize collisions and increase the
performance
•A station now “follows” the activity of other stations
•Simple rules for a polite human conversation
Listen before talking
If someone else begins talking at the same time as you, stop
talking
•CSMA:
A node should not send if another node is already sending
carrier sensing

•CD (collision detection):


A node should stop transmission if there is interference
collision detection

120
Flow diagram for three persistence methods
increases the chance for collisions

Reduces the
chance of collisions
reduces the
efficiency
Decreases the chance for collisions
Improves efficiency

probability

121
CSMA/CD (Collision Detection)
CSMA (all previous methods) has an inefficiency:
If a collision has occurred, the channel is unstable until

colliding packets have been fully transmitted


CSMA/CD (Carrier Sense Multiple Access with Collision
Detection) overcomes this as follows:
While transmitting, the sender is listening to medium for
collisions.
Sender stops transmission if collision has occurred reducing
channel wastage .

CSMA/CD is Widely used for bus topology LANs (IEEE 802.3,


Ethernet).
CSMA/CD Protocol
 Use one of the CSMA persistence algorithm
(non-persistent, 1-persistent, p-persistent) for
transmission
If a collision is detected by a station during its
transmission then it should do the following:
›Abort transmission and
›Transmit a jam signal (48 bit) to notify other stations of collision
so that they will discard the transmitted frame also to make sure
that the collision signal will stay until detected by the station
›After sending the jam signal, backoff (wait) for a random amount
of time, then
›Transmit the frame again
CSMA/ CD
1.contention,
2.transmission,
3. idle.
Finished transmission

CSMA/CD can be in one of the three states: contention, transmission, or idle.


Compare between all three protocol as well as
pure and slotted ALOHA
Multiple Access Protocols

ALOHA

126 6/7/17
CSMA with Collision Avoidance
CSMA/CA

Binary exponential backoff refers to


an algorithm used to space out
repeated retransmissions of the
same block of data

minimum idle period


between transmission
of Ethernet packets known
as the interframe gap (IFG)

no collisions

127
Binary exponential back off Algorithm
1.When a collision first occurs, send a “Jamming
signal” to prevent further data being sent.
2.Resend a frame after either 0 seconds or 51.2μs,
chosen at random.
3.If that fails, resend the frame after either 0s, 51.2μs,
102.4μs, or 153.6μs.
4.If that still doesn't work, resend the frame after
k · 51.2μs, where k is a random integer between 0
and 23 − 1.
5.In general, after the cth failed attempt, resend the
frame after k · 51.2μs, where k is a random integer
between 0 and 2c − 1.
IEEE 802.3 Standards and Frame Formats
Ethernet is a network protocol that controls
how data is transmitted over a LAN. Technically
it is referred to as the IEEE 802.3 protocol.
 Specified in the family of standards known as
IEEE 802.3, Ethernet was originally developed by
Xerox at Palo Alto Research Center (PARC) in
1976.
Essentially,Ethernet and IEEE 802.3 are the
same standards.
Ethernet and the OSI Model
Ethernet
operates in
two areas of
the OSI model,
the lower half
of the data
link layer,
known as the
MAC sub-layer
and the
physical layer.
1
3
1
Ethernet/IEEE 802.3 MAC Frame
Ethernet Frame Format
 Preamble (56bits): allows the receiver to synchronize with the signal
(sequence of alternating 0s and 1s).
 The Start frame delimiter is a single byte, 10101011, which is a frame
flag, indicating the start of a frame.
 Source and Destination MAC Addresses (48bits each).
 Packet/Ether type (16bits): Ether Type is used to represent the size of
the payload of the Ethernet Frame.
 Data (up to 1500 bytes):- Minimally a frame must contain at least 46
bytes of data.
 Frame must be long enough to detect collision: -CRC (32bit)
1
3
3
Categories of Standard Ethernet
10Base5 Implementation
10Base5 (Thick Ethernet)
›10Mbps
›Base: Baseband transmission
›For Coax medium its length is given in round number to
multiples of 100m
›Its max segment length = 500 m
Signal-regenerating repeaters
Thick Coax
›Advantages: Low attenuation, excellent noise immunity,
superior mechanical strength
›Disadvantages: Bulky, difficult to pull, transceiver boxes too
expensive
1
3
5
10Base5 Implementation
10Base2 Implementation
10Base2 (Thin Ethernet)
›10 Mbps
›185 meter segment length
›Signal-regenerating repeaters
›Transceiver was integrated onto the adapter
›Thin Coax (coax thinner and lighter)
›Advantages: Easier to install, reduced hardware
cost, BNC connectors widely deployed
› lower installation costs.
›Disadvantages: Attenuation not as good, could not
support as many stations due to signal reflection
caused by BNC Tee Connector.
1
3
7
10Base2 Implementation
10Base-T Implementation

10BASE T (Twisted pair Ethernet)


›10 Mbps
›100 meter segment length
›Signal-regenerating repeaters
›Transceiver integrated onto adapter
›Two pairs of UTP
›Hub-and-spoke topology {Hub in the closet}
›Advantages: could be done without pulling new
wires. Each hub amplifies and restores incoming
signal.
1
3
9
10Base-T Implementation

CAT3 Cable
1
4
0
10Base-F Implementation
Features of Ethernet

1-persistent, CSMA-CD
Binary Exponential Backoff.
Manchester encoding.
Features of Ethernet
Operational Description
•Ethernet stations sense the channel.

•When the channel is free the station transmits a frame.


•Stations monitor the ‘ether’ during the transmission.
•If a collision is detected by any station, the
transmission is terminated immediately and a jam signal
is sent.
•Upon collision, stations backoff using a local counter
and then retransmit.
Fast Ethernet (100BASE-T)
How to achieve 100 Mbps capacity
Media
Independent Interface provides three choices.
LLC Data Link
MAC Layer

Convergence Sublayer
Physical
MII Media Independent Interface Layer
Media Dependent Sublayer
Fast Ethernet [IEEE 802.3u]
Three Choices

Figure:- The original fast Ethernet cabling.


Gigabit Ethernet (1000 BASE X)
Provides speeds of 1000 Mbps (i.e., one billion bits per
second capacity) for half-duplex and full-duplex operation.
Uses Ethernet frame format and MAC technology
›CSMA/CD access method with support for one repeater per collision
domain.
›Backward compatible with 10 BASE-T and 100 BASE-T.
Uses 802.3 full-duplex Ethernet technology.
Uses 802.3x flow control.
All Gigabit Ethernet configurations are point-to-point!
What is IEEE 802.11?
A family of wireless LAN (WLAN)
specifications developed by a working group at
the Institute of Electrical and Electronic
Engineers (IEEE)
OR
Standard for wireless local area networks
(wireless LANs) developed in 1990 by IEEE
Intended for home or office use (primarily
indoor)
802.11 standard describes the MAC layer,
while other sub-standards (802.11a, 802.11b)
describe the physical layer.
IEEE 802.11 Standard (Wi-Fi)

Defines standard for WLANs using the following four


technologies
›Frequency Hopping Spread Spectrum (FHSS)
›Direct Sequence Spread Spectrum (DSSS)
›Infrared (IR)
›Orthogonal Frequency Division Multiplexing (OFDM)
Versions: 802.11a, 802.11b, 802.11g, 802.11n,
802.11ac, 802.11ad.
802.11 - Transmission

Most wireless LAN products operate in unlicensed


radio bands
›2.4 GHz is most popular
›Available in most parts of the world
›No need for user licensing

Most wireless LANs use spread-spectrum radio


›Resistant to interference, secure
IEEE 802.11a

Makes use of 5-GHz of frequency band


Data transmission rates of 6, 9 , 12, 18, 24, 36, 48, 54 Mbps
Maximum. Range = about 35-100 meters(Varies)
Uses orthogonal frequency division multiplexing (OFDM)
More data can travel over a smaller amount of bandwidth
License-free spectrum in 5 GHz band
Not available worldwide. Standard not accepted worldwide.
802.11a Applications

Building-to-building connections
Video, audio conferencing/streaming video,
and audio
Large file transfers, such as engineering
CAD drawings
Faster Web access and browsing
High worker density or high throughput scenarios
›Numerous PCs running graphics-intensive applications
IEEE 802.11b

802.11b offers speeds with a theoretically maximum


rate of 11Mbps at in the 2.4 GHz spectrum band
OR
802.11b operates in 2.4 GHz band
Provides data rates of 5.5 and 11 Mbps
Encoding Scheme = DSSS (direct sequence spread
spectrum)
Each bit in original signal is represented by multiple bits
in the transmitted signal.
IEEE 802.11 Physical Layers
802.11b 802.11a
Modulation Scheme DSSS OFDM

Spectrum (GHz) 2.4 – 2.485 5.15-5.35, 5.725-


5.825
Data Rate (Mbps) 1 – 11 6 - 54
Interference Microwave, Cordless Video, audio
Phones,Bluetooth, conferencing/strea
HomeRF, Light Bulbs! ming video, and
audio
Range 50 Meters 100 Meters
802.11g

802.11g is a high-speed extension to 802.11b


›Compatible with 802.11b
›High speed up to 54 Mbps
›2.4 GHz (vs. 802.11a, 5 GHz)
›Using ODFM Orthogonal Frequency Division
Multiplexing for backward compatibility
802.11g Advantages
Provides higher speeds and higher capacity
requirements for applications
›Wireless Public Access
Compatible with existing 802.11b standard
Leverages Worldwide spectrum availability
in 2.4 GHz
Likely to be less costly than 5 GHz alternatives.
Fast maximum speed, signal range is good, not easily
obstructed.
IEEE 802.11n

The purpose of IEEE 802.11n is to improve


network throughput over the previous standards
IEEE 802.11a and 802.11g with a significant
increase in the maximum net data rate from 54
Mbit/s to 600 Mbit/s.
Bluetooth & IEEE 802.15
What is Bluetooth?

In 1994, the L. M. Ericsson company became interested in


connecting its mobile phones to other devices (e.g., PDAs)
without cables.

Together with four other companies (IBM, Intel, Nokia, and


Toshiba), it formed a SIG (Special Interest Group, i.e.,
consortium) to develop a wireless standard for interconnecting
computing and communication devices and accessories using
short-range, low-power, inexpensive wireless radios.

The project was named Bluetooth.


Overview
The concept behind Bluetooth is to provide a
universal short-range wireless capability.
Using 2.4-GHz band, available globally for
unlicensed users, two Bluetooth devices within 10
m can share up to 720 kbps of capacity.
Bluetooth is intended to support an open-ended
list of applications, including data, audio, graphics
& even video.
Bluetooth Application Areas
Bluetooth provides support for three general application areas
using short-range wireless connectivity.
1.Data and voice access points:- Bluetooth facilitates real-time
voice & data transmission by providing effortless wireless
connection of portable & stationary communications devices.
1.Cable replacement:- Eliminates need for numerous cable
attachments for connection of practically any kind of
communication devices.
1.Ad hoc networking:- Device with Bluetooth radio can
establish instant connection to another Bluetooth radio as soon
as it comes into range.
Bluetooth Standards Documents

 The Bluetooth standards present a formidable bulk – well


over 1500 pages divided into two groups:- core & profile.

 The Core specifications describe the details of the various


layers of Bluetooth protocol architecture, from radio interface
to link control.

 The Profile specifications are concerned with the use of


Bluetooth technology to support various applications.
Protocol Architecture
 Bluetooth is defined as a layered protocol architecture
consisting of core protocols, cable replacement & telephony
control protocols & adopted protocols.
 The Core protocols from a five-layer stack consisting of the
following elements:-
›Bluetooth Radio:- Specifies details of the air interface,
including frequency, the use of frequency hopping,
modulation scheme & transmit power.
›Baseband:- Concern with connection establishment
within piconet, addressing, packet format, timing &
power control.
Diagram:- Bluetooth Protocol Stack
Continue…
›Link manager protocol (LMP):- Responsible for link
setup between Bluetooth devices & ongoing link
management.
 Logical link control & adaptation protocol(L2CAP):- Adapts
upper-layer protocols to the baseband layer. L2CAP provides both
connectionless & connection oriented services.

 Service Discovery Protocol(SDP):- Device information,


services & the characteristics of the services can be queried to
enable the establishment of a connection between two or more
Bluetooth devices.
 Radio Frequency communications(RFCOM):- is the cable
replacement protocol included in the Bluetooth specifiacton.
Usage Models
File transfer
Internet bridge
LAN access
Synchronization
Three-in-one phone
Headset
Cont..

 Bluetooth specifies a telephony control protocol. TCS BIN


(telephony control specification - binary) is bit-oriented protocol
that defines the call control signaling for the establishment of
speech & data calls between Bluetooth devices.

 OBEX:- The object exchange protocol is a session-level


protocol developed by the Infrared data association (IrDA) for
the exchange of objects.

 WAE/ WAP:- Bluetooth incorporates the wireless application


environment & the wireless application protocol into its
architecture.
Piconets and Scatternets
 Bluetooth is designed to operate in an environment of many
users. Up to eight devices can communicate in a small network
called piconet.

 As was mentioned, the basic unit of networking in Bluetooth


is a piconet, consisting of a master & from one to seven active
slave devices.

 The
slave may only communicate with the master & may only
communicate when granted permission by the master.

›Device in one piconet may exist as master or slave in


another piconet. This form a overlapping called
scatternet.
The advantage of piconet/ scatternet scheme is that it allows
many devices to share the same physical area & make efficient
use of the bandwidth.
Broadband Wireless/ WiMax/
802.16
What is WiMAX?

 WiMax, short for Worldwide Interoperability for Microwave


Access is defined in IEEE 802.16 standards & is being promoted
by WiMax Forum.

 Wi-Fi is a local network technology designed to add mobility


to private wired LANs.

 WiMax on the other hand was designed to deliver a metro area


Brodband Wireless Acess (BWA) service.
CONTINUE

The idea behind BWA is to provide a fixed location wireless


Internet access service to compete with cable modems &
Digital Subscriber Line (DSL).

Wi-Fi support transmission range up


to few hundred meters.
Where as WiMax support transmission range up to 30 miles.

Applications of WiMax:-
Fixed location private line service or Hot
Spot Black Haul:- The initial application for WiMax type
technology is a service that provides a traditional dedicated
lines at transmission rates up to 100 Mbps using outdoor
antennas.


Continue

Broadband Wireless Access/ Wireless Digital


Subscriber Line:- Offering data rates between 522
Kbps to 1 Mbps.

Mobile/ Nomadic Users:- Initially WiMax was


conceived as fixed location wireless technology.
However with the use of lower frequencies (2-11) GHz
, & development of IEEE 802.16e Mobile WiMax
Standard the technology could also support mobile
subscriber travelling with the speeds up to 75 Kmph.
The WiMax/ 802.16 Protocol Stack

Figure shows the 802.16 protocol stack


The 802.16 Physical Layer

 TheBroadband wireless needs a lot of spectrum,


and the only place to find it is in the 10-to-66 GHz
range.

 802.16 employs three different modulation


schemes, depending on how far the subscriber
station is from the base station.

 For close-in subscribers, Quadrature Amplitude


Modulation (QAM)-64 is used, with 6 bits/baud. For
medium-distance subscribers, QAM-16 is used, with 4
bits/baud. For distant subscribers, Quadrature Phase
Shift Keying (QPSK) is used, with 2 bits/baud.
The 802.16 transmission environment
Continue

 For
example, for a typical value of 25 MHz worth of
spectrum, QAM-64 gives 150 Mbps, QAM-16 gives 100
Mbps, and QPSK gives 50 Mbps.

The 802.16 Data Link Layer:-


I.Security sub-layer:- At the time a subscriber
connects to a base station, they perform mutual
authentication with RSA public-key cryptography
using X.509 certificates. The payloads themselves are
encrypted using a symmetric-key system, either DES
with cipher block chaining or triple DES with two keys.
AES (Rijndael) is likely to be added soon.
CONTINUE

MAC sub-layer common part:- four classes of


service are defined as follows: All service in 802.16 is
connection-oriented
1. Constant bit rate service:- This services is intended
for transmitting uncompressed voice such as on a T1
channel.
2. Real-time variable bit rate service:- This service is for
compressed multimedia and other soft real-time
applications in which the amount of bandwidth
needed each instant may vary.
3. Non-real-time variable bit rate service:- This service
is for heavy transmissions that are not real time, such
as large file transfers.
4. Best-efforts service:-
Wavelength Division Multiple Access
Protocols (WDMA)
Divide the channel into multiple smaller
channels (wavelength bands).
Allocate channels to users as needed which
allow different transmissions to take place at
the same time.
Usually used in fiber optics LANs.
Each user uses two channels, one small
channels to send control packets and another
wider channel to send data.
Wavelength Division Multiple Access Protocols
(WDMA)
MAC in Wireless LAN
MAC in Wireless LAN
MAC in Wireless LAN

You might also like