CN 2
CN 2
CN 2
By,
Prof. Pradnya K. Bachhav
Syllabus
Introduction, functions.
Design Issues: Services to Network Layer, Framing.
ARQ strategies: Error detection and correction, Parity Bits,
Hamming Codes (11/12-bits) and CRC.
Flow Control Protocols: Unrestricted Simplex, Stop and Wa
it, Sliding Window Protocol.
WAN Connectivity: PPP and HDLC.
MAC Sub layer: Multiple Access Protocols: Pure and Slotte
d ALOHA, CSMA, WDMA, CSMA/CD, CSMA/CA, Binary E
xponential Back-off algorithm,
Introduction to Ethernet IEEE 802.3, IEEE 802.11 a/b/g/n, I
EEE 802.15 and IEEE 802.16 Standards.
Outline
Introduction, functions
ARQ Strategies: Error Detection & Correction, Parity bits, Hamming Code & CRC
Flow Control Protocols: Unrestricted Simplex, Stop and Wait, Sliding Window Protocol
MAC Sub layer: Multiple Access Protocols: Pure and Slotted ALOHA
This layer basically deals with frame formation, flow control, error
control, addressing and link management
The data communication circuits have only a finite data rate and there
is non-zero propagation delay between the instant a bit is sent and the
instant at which it is received
Introduction & Functions of DLL
These limitations affect the efficiency of data transfer
The data link layer protocols used for communication take care of all these
problems
Data link layer is the second layer in OSI reference model. It is above the
physical layer.
As it is the second layer, it receives services from the physical layer and
provides services to the network layer.
Outline
Introduction, functions
ARQ Strategies: Error Detection & Correction, Parity bits, Hamming Code & CRC
Flow Control Protocols: Unrestricted Simplex, Stop and Wait, Sliding Window Protocol
MAC Sub layer: Multiple Access Protocols: Pure and Slotted ALOHA
The data link layer is supposed to carry out many specified functions.
The principle service is transferring data from the network layer on sending
machine to the network layer on destination machine. This transfer always
takes place via the DLL
2. Frame Synchronization
The source machine sends data in the form of blocks called frames to the
destination machine.
The starting and ending of each frame should be identified so that the frames
can be recognized by the destination machine.
Data Link Layer Functions
3. Flow Control
The source machine must not send data frames at a rate faster than the
capacity of destination machine to accept them.
4. Error Control
The errors introduced during transmission from source to destination
machines must be detected and corrected at the destination machine.
5. Addressing
When many machines are connected together (LAN), the identity of the
individual machines must be specified while transmitting the data frames.
This is known as addressing,
Data Link Layer Functions
7. Link Management
The communication link between the source and destination is required to be
initiated, maintained and finally terminated for effective exchange of data.
Introduction, functions
ARQ Strategies: Error Detection & Correction, Parity bits, Hamming Code & CRC
Flow Control Protocols: Unrestricted Simplex, Stop and Wait, Sliding Window Protocol
MAC Sub layer: Multiple Access Protocols: Pure and Slotted ALOHA
Subtopics:
Network layer is the layer above the data link layer in the OSI model. So it is
supposed to provide services to the network layer
The main service to be provided is to transfer data from the network layer on
the sending machine to the network layer of the receiving machine.
The actual path followed by the data from sending machine to destination is
shown in Fig.(b) which is via all the layers below the network layer, then the
physical medium, then layers 1, 2, 3 of receiving machine.
In this type of service, the destination machine does not send back any
acknowledgement after receiving frames
So this service is suitable only if the error rate is low. It is suitable for
real time traffic such as speech. This type of service is highly unreliable.
2. Error control
3. Flow control
2. Acknowledged connectionless service
This is the next step to improve reliability. In this service, there are no
connections established for data transfer but for each frame received,
the receiver sends an acknowledgement to the sender.
This is the most sophisticated one. The source and destination machines
establish a connection before transferring the data.
A specific number is given to each frame being sent and the data link layer
guarantees that each transmitted frame is received
All the frames are guaranteed to be received in the same order as the order of
transmission. Each received frame will be acknowledged individually by the
destination machine.
The data transfer takes place by following three distinct phases given below:
1. Connection is established.
Data-link layer takes the packets from the Network Layer and encapsulates them
into frames. If the frame size becomes too large, then the packet may be divided
into small sized frames. Smaller sized frames makes flow control and error control
more efficient.
Then, it sends each frame bit-by-bit on the hardware. At receiver’s end, data link
layer picks up signals from hardware and assembles them into frames.
Framing
The bits to be transmitted is first broken into discrete frames at the data link layer.
In order to guarantee that the bit stream is error free, the checksum of each frame
is computed.
When a frame is received, the data link there, re-computes the checksum.
If it is different from the checksum present in the frame, then the data link layer
knows that an error has occurred.
It then discards the bad frame and sends back a request for retransmission.
Breaking the bit stream into frames is called as framing. One way of doing it is by
inserting time gaps between frames as shown in Fig.
But practically this framing technique does not work satisfactorily, because
networks generally do not make any guarantees about the timing. So some other
methods are derived.
Parts of a Frame
1. Character count.
frame.
does not have a means (in this algorithm) how to correct it.
Framing (1)
Abyte stream. (a)Without errors. (b)With one error.
Flag Bytes with Byte Stuffing Framing Method
⚫ This methods gets around the boundary detection of the frame by
having each appended by the frame start and frame end with
special bytes.
⚫ If they are the same (beginning and ending byte in the frame) they
byte (e.g., picture, data stream, etc.) the convention that can be
used is to have escape character inserted just before the “FLAG”
character.
Framing (2)
⚫ This method is only applicable to networks in which the encoding on the physical
medium contains some redundancy.
⚫ For example, some LANs encode 1 bit of data by using 2 physical bits.
⚫ Normally, a 1 bit is a high-low pair and a 0 bit is a low-high pair.
⚫ 11 or 00 are not used for data but are used for delimiting frames in some
protocols.
⚫ In this method Bit 1 is encoded into high-low (10) pair and Bit 0 is encoded into
low-high (01) pair shown in fig.
FLOW AND ERROR CONTROL
⚫ After solving the marking of the frame with start and end the data
⚫ Ensuring that all frames are delivered to the network layer at the
⚫ Another important design issue that occurs in the data link layer
amount of data that the sender can send before waiting for
acknowledgment.
⚫ To solve this problem feedback-based flow control and rate-based
Introduction, functions
Design Issues: Services to Network Layer, Framing, Error & Flow Control
ARQ Strategies: Error Detection & Correction, Parity bits, Hamming Code & CRC
Flow Control Protocols: Unrestricted Simplex, Stop and Wait, Sliding Window Protocol
MAC Sub layer: Multiple Access Protocols: Pure and Slotted ALOHA
1. The receiver receives 011. It is a valid codeword. The receiver extracts the
dataword 01 from it.
2. The codeword is corrupted during transmission, and 111 is received. This is
not a valid codeword and is discarded.
3. The codeword is corrupted during transmission, and 000 is received. This is a
valid codeword. The receiver incorrectly extracts the dataword 00. Two
corrupted bits have made the error undetectable.
Note
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.
Hamming Distance
Note
Note
Solution
This code guarantees the detection of up to three errors
(s = 3), but it can correct up to one error. In other words,
if this code is used for error correction, part of its
capability is wasted. Error correction codes need to have
an odd minimum distance (3, 5, 7, . . . ).
LINEAR BLOCK CODES
Note
• In this matrix of bits, a parity bit (odd or even) is calculated for each column.
It means 32 bits data plus 8 redundant bits are transmitted to receiver.
• Whenever data reaches at the destination, receiver uses LRC to detect error
in data.
LRC Advantage
1. LRC is used to detect burst errors.
E.g. Suppose 32 bit data plus LRC that was being transmitted is hit by a burst error
of length 5 and some bits are corrupted as shown below
2. The LRC received by the destination does not match with newly corrupted LRC.
The destination comes to know that the data is erroneous, so it discards the data.
LRC Disadvantage
1. The main problem with LRC is that, it is not able to detect error if two bits in
a data unit are damaged and two bits in exactly the same position in other
data unit are also damaged.
E.g. If data 110011 010101 is changed to 010010110100
2. In this example 1st and 6th bit in one data unit is changed. Also the 1st and 6th bit
in second unit is changed.
Vertical Redundancy Check (VRC)or Parity Check
(6) Data along with parity bit is then transmitted across the network. In this case,
11001111 will be transmitted.
(7) At the destination, this data is passed to parity checker at the destination. The
number of 1s in data is counted by parity checker.
(8) If the number of 1s count out to be odd, e.g. 5 or 7 then destination will come
to know that there is some error in the data. The receiver then rejects such an
erroneous data unit.
VRC Advantage & Disadvantage
Advantages:
1. VRC can detect all single bit error.
2. It can also detect burst errors but only in those cases where number of bits
changed is odd, i.e. 1, 3, 5, 7,.. etc.
Disadvantages:
1. The major disadvantage of using this method for error detection is that it is not
able to detect burst error if the number of bits changed is even, i.e. 2, 4, 6,
..etc.
Example: If the original data is 11001111. After adding VRC, data unit that will be
transmitted is 11001111. Suppose on the way 2 bits are changed as 01011111.
When this data will reach the destination, parity checker will count number of 1s in
data and that comes out to be even i.e. 8. So, in this case, parity is not changed, it
is still even. Destination will assume that there is no error in data even though data
is erroneous.
Drawbacks of 2D Parity Check
1. If two bits in one data unit are corrupted and two bits exactly or be the
same position in another data unit is also corrupted, then 2D Parity
checker will not be able to detect the error.
2. This technique cannot be used to detect the 4-bit errors or more in
some cases.
Drawbacks of 2D Parity Check-E.g.
Drawbacks of 2D Parity Check-E.g.
Hamming Code SPPU- May16, 5 Marks
95
Hamming Code SPPU- May16, 5 Marks
Bit Number 11 10 9 8 7 6 5 4 3 2 1
Bit Value 1 0 1 R4 1 0 0 R3 1 R2 R1
Hamming Code SPPU- May16, 5 Marks
• r2 is the parity bit for all data bits in positions whose binary representation
includes a 1 in the position 2 from right except 2 (3, 6, 7, 10, 11 and so on)
check two and skip two method
• r3 is the parity bit for all data bits in positions whose binary representation
includes a 1 in the position 3 from right except 4 (5-7, 12-15, 20-23 and so on)
check four and skip four method
Hamming Code SPPU- May16, 5 Marks
11 10 9 8 7 6 5 4 3 2 1
1 0 1 0 1 0 0 1 1 1 0
• Once the redundant bits are embedded within the message, this is
sent to the user.
Hamming Code Example-1
11 10 9 8 7 6 5 4 3 2 1
1 1 1 0 1 0 = 0
11 10 9 8 7 6 5 4 3 2 1
1 0 1 1 1 1 = 1
11 10 9 8 7 6 5 4 3 2 1
1 1 0 1 = 1
11 10 9 8 7 6 5 4 3 2 1
1 0 1 0 = 0
Hamming Code Example-1
• The bits give the binary number as 0110 whose decimal representation is
6.
• Thus, the bit number 6 contains an error & to correct the error the 6th bit
is flipped from 1 to 0.
Hamming Code Example-2
• First, we need to detect whether there are any errors in this received
hamming code.
Hamming Code Example
• Step 1: For checking parity bit P1, use check one and skip
one method, which means, starting from P1 and then skip P2,
take D3 then skip P4 then take D5, and then skip D6 and take
D7, this way we will have the following bits,
• Step 2: Check for P2 but while checking for P2, we will use
check two and skip two method, which will give us the following
data bits. But remember since we are checking for P2, so we
have to start our count from P2 (P1 should not be considered).
• Step 3: Check for P4 but while checking for P4, we will use
check four and skip four method, which will give us the
following data bits. But remember since we are checking for P4,
so we have started our count from P4(P1 & P2 should not be
considered).
• As we can observe that the number of 1's are odd, then we will
write the value of P4 = 1. This means the error is there.
• So, from the above parity analysis, P1 & P4 are not equal to 0,
so we can clearly say that the received hamming code has
errors.
Hamming Code Example- Error Correction
• We get E = 5, which states that the error is in the fifth data bit.
To correct it, just invert the fifth data bit.
• For example, the number 21 in binary 10101, can be wrapped into 4 bits by
adding leftmost bit to remaining 4 bits as 0101+1 = 0110 or 6.
All words including the checksum are added using one's complement addition.
• Cyclic codes are special linear block codes with one extra property, if a
• CRC are also known as a Polynomial Code, based on treating bit strings
It should not divide xt+1, for t between 2 and n-1 (n - length of codeword) so all
isolated double errors can be detected.
It should have the factor x+1 to be able to detect all odd-numbered errors.
Cyclic Redundancy Code (CRC)
Standard Generator Polynomials
Cyclic Redundancy Code (CRC)
CRC encoder and decoder
Cyclic Redundancy Code (CRC)
• In the encoder, the dataword has k bits (4 here); the codeword has n bits
(7 here).
• The quotient of the division is discarded and the remainder (r2 r1 r0) is
appended to the dataword to create the codeword.
Cyclic Redundancy Code (CRC)
• 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
• If the syndrome bits are all 0s, the 4 leftmost bits of the codeword are
accepted as the dataword (interpreted as no error); otherwise, the 4 bits
are discarded (error).
Cyclic Redundancy Code (CRC)
Division in CRC encoder
Cyclic Redundancy Code (CRC)
• The encoder takes the dataword and augments it with n-k number of 0s, then divides
the augmented dataword by the divisor.
• The process of modulo-2 binary division is the same as the division process for decimal
numbers.
• But, in this case addition and subtraction are the same using the XOR operation.
• In each step, a copy of the divisor is XORed with the 4 bits of the dividend.
• The result of the XOR operation (remainder) is 3 bits (in this case), which is used for the
next step after 1 extra bit is pulled down to make it 4 bits long.
• In this type of division if the leftmost bit of the dividend (or the part used in each step) is
0, the step cannot use the regular divisor; we need to use an all-0s divisor.
• When there are no bits left to pull down, we have a result. The 3-bit remainder forms the
check bits (r2, r1, and r0).
• If the syndrome is all 0s, there is no error; the dataword is separated fro
m the received codeword and accepted.
• The left hand figure shows the value of syndrome when no error has occ
urred; the syndrome is 000.
• The right-hand part of the figure shows the case in which there is one si
ngle error & syndrome is not all 0s (it is 011).
CRC Example-1
CRC Example-2
CRC Example-3
CRC Example-4
Outline
Introduction, functions
Design Issues: Services to Network Layer, Framing, Error & Flow Control
ARQ Strategies: Error Detection & Correction, Parity bits, Hamming Code & CRC
Flow Control Protocols: Unrestricted Simplex, Stop and Wait, Sliding Window Protocol
MAC Sub layer: Multiple Access Protocols: Pure and Slotted ALOHA
Stop-and-wait
Sliding window
Stop-and-Wait
Meaning : In the Stop-and-wait method, the sender waits for an
acknowledgement after every frame it sends.
When acknowledgement is received, then only next frame is sent. The
process of alternately sending and waiting of a frame continues until the
sender transmits the EOT (End of transmission) frame.
Advantages
The Stop-and-wait method is simple as each frame is checked and
acknowledged before the next, frame is sent.
Disadvantages
Stop-and-wait technique is inefficient to use as each frame must travel
across all the way to the receiver and an acknowledgement travels all
the way before the next frame is sent
Each frame sent and received uses the entire time needed to traverse
the link.
Moreover, if two devices are distance apart, a lot of time is wasted
waiting for ACKs that leads to increase in total transmission time.
Sliding Window
• The Sliding Window is a method of flow control in which a sender can transmit the several
frames before getting an acknowledgement.
• In Sliding Window Control, multiple frames can be sent one after another due to which capacity
of the communication channel can be utilized efficiently.
• A single ACK acknowledge multiple frames.
• Sliding Window refers to imaginary boxes at both the sender and receiver end.
• The window can hold the frames at either end, and it provides the upper limit on the number of
frames that can be transmitted before the acknowledgement.
• Frames can be acknowledged even when the window is not completely filled.
• The window has a specific size in which they are numbered as modulo-n means that they are
numbered from 0 to n-1.
• Example : if n = 8, the frames are numbered from 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1
• The size of the window is represented as n-1. Therefore, maximum n-1 frames can be sent be
fore acknowledgement.
• When the receiver sends the ACK, it includes the number of the next frame that it wants to
receive.
• Example : To acknowledge the string of frames ending with frame number 4, the receiver will
send the ACK containing the number 5.
• When the sender sees the ACK with the number 5, it gets know that the frames from 0
through 4 have been received.
Sliding Window
(A) Sender Window:
• At the beginning of a transmission, the sender window contains n-1 frames, and
when they are sent out, the left boundary moves inward, shrinking the size of the
window.
• Example : if the size of the window is w if three frames are sent out, then the
number of frames left out in the sender window is w-3. Shown in Fig
• Once the ACK has arrived, then the sender window expands to the number
which will be equal to the number of frames acknowledged by ACK.
• Example : The size of the window is 7, and if frames 0 through 4 have been
sent out and no acknowledgement has arrived, then the sender window contains
only two frames, i.e., 5 and 6.
• Now, if ACK has arrived with a number 4 which means that 0 through 3 frames
have arrived undamaged and the sender window is expanded to include the next
four frames. Therefore, the sender window contains six frames (5,6,7,0,1,2)
Sliding Window
(B) Sender Window:
• At the beginning of transmission, the receiver window does not contain n frames, but
it contains n-1 spaces for frames shown in Fig. When the new frame arrives, the size
of the window shrinks.
• It has no error and flow control. In this protocol, data frames travel in unidirectional
way-from one sender to one receiver shown in Fig
• Sender keeps transmitting data and the receiver keeps receiving data
• Works with the assumption that buffer space available is infinite
• Another assumption is that, the transmission channel is noise free, so there won 't be
any change in data or loss of frames. Because of these unrealistic assumptions, this
protocol is also called 'utopia'
Unrestricted Simplex Protocol
• Once the frame is received at receiver, it will remove the header from frame and
• As we can see, there are no sequence numbers for the data as well as no
• In the previous protocol, the unrealistic assumption that was made was the receiver's
buffer had infinite space. Because of this the receiver will never get flooded. However,
this assumption is not practically possible.
• If the sender sends data at a high rate the receiver might get flooded. For dealing with
this problem the simplex stop and wait protocol is developed. In this protocol, Flow
control is added. Shown in Fig
Stop and Wait Protocol
• In this protocol, the sender sends only one frame at a time and then waits for an
• Once the acknowledgement has been received by the sender then it sends the next
frame again.
• If sender receives NAK (negative ack) frame then it transmits the same frame again.
• In this protocol, we need half duplex link because channel is busy at a time for sending
and receiving.
Stop and Wait Protocol
Advantages:
1. Accuracy
Disadvantages:
1. Inefficient
Simplex Protocol
Piggybacking
Stop-and-Wait Automatic Repeat Request (ARQ)
Go-Back-N ARQ
Selective Repeat ARQ
Simplex Protocol
(II) Working: Sender A sends a data frame or packet with sequence number 0.
Receiver B, after receiving data frame, sends an acknowledgement with sequence
number 1 (sequence number of next expected data frame or packet). There is only
one bit sequence number that implies that both sender and receiver have buffer for
one frame or packet only.
(i) Time Out: Sender sends the data and starts the timer. If the acknowledgement is
not received within the specified amount of time then the sender thinks that da
ta is lost and retransmits the data.
(ii) Sequence Number (Data-ACK):
• Since an ack frame can also be
corrupted and lost it needs sequence
numbers and redundancy bits.
• One field is adds to data and ack
frame to hold the sequence number
respectively.
• In stop and wait ARQ, we use
sequence number as 0,1, 0,1,0,1 etc
• It means if data frame 0 has arrived
safe and sound then receiver sends
an ack frame with sequence no. 1
(means frame 1 is expected next).
• If frame 1 has arrived safely then
receiver sends and ack
• frame 0 (means frame 0 expect).
Stop and Wait ARQ
(I) Inefficient
a. Stop and wait ARQ uses half duplex link. Therefore entire
bandwidth is used only for sending and receiving at a time.
b. If higher bandwidth and long delay appears then link
utilization is minimum and capacity of the link is waste. Thus, this
methods is inefficient
(II) No Pipelining
a. In this protocol, we need to wait for a frame to reach the
destination and be acknowledged before next frame can be used.
b. That is no pipelining is used. Thus, waiting time increased
GO-Back-n ARQ
Introduction, functions
Design Issues: Services to Network Layer, Framing, Error & Flow Control
ARQ Strategies: Error Detection & Correction, Parity bits, Hamming Code & CRC
Flow Control Protocols: Unrestricted Simplex, Stop and Wait, Sliding Window Protocol
MAC Sub layer: Multiple Access Protocols: Pure and Slotted ALOHA
11.157
Figure Normal response mode
11.158
Figure Asynchronous balanced mode
11.159
Figure HDLCframes
11.160
Figure Control field format for the different frame types
11.161
POINT-TO-POINT PROTOCOL
11.162
Figure PPP frame format
11.163
Note
11.164
Figure Transition phases
11.165
Outline
Introduction, functions
Design Issues: Services to Network Layer, Framing, Error & Flow Control
ARQ Strategies: Error Detection & Correction, Parity bits, Hamming Code & CRC
Flow Control Protocols: Unrestricted Simplex, Stop and Wait, Sliding Window Protocol
MAC Sub layer: Multiple Access Protocols: Pure and Slotted ALOHA
(a)Carrier Sense: Stations can tell if the channel is in use before trying to use it.
(b)No Carrier Sense: Stations cannot sense the channel before trying to use it.
7
Multiple Access Protocols
ALOHA
Carrier Sense Multiple Access Protocols
Collision-Free Protocols
Limited-Contention Protocols
Wavelength Division Multiple Access
12.171
Taxonomy of Multiple-Access Protocols
ALOHA Network
Frames in Pure ALOHA
ALOHA Protocol
Example
⚫ When K= 1, TB {0ms,2ms}
⚫ When K= 2, TB {0ms,2ms,4ms,6ms}
ALOHA: Vulnerable Time
Example
Solution
Average frame transmission time Tfr is 200 bits/200 kbps or 1 ms. The
vulnerable time is 2 × 1 ms = 2 ms. This means no station should
send later than 1 ms before this station starts transmission and no
station should start sending during the one 1-ms period that this station
is sending.
ALOHA: Throughput
S = G × e−2G
12.181
Slotted ALOHA
Slotted ALOHA: Vulnerable Time
Slotted ALOHA: Throughput
⚫ The throughput for Slotted ALOHA is
S = G × e−G
Introduction, functions
Design Issues: Services to Network Layer, Framing, Error & Flow Control
ARQ Strategies: Error Detection & Correction, Parity bits, Hamming Code & CRC
Flow Control Protocols: Unrestricted Simplex, Stop and Wait, Sliding Window Protocol
MAC Sub layer: Multiple Access Protocols: Pure and Slotted ALOHA
Solution
The frame transmission time is Tfr = 2 × 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 ×
51.2 μs = 512 bits or 64 bytes. This is actually the minimum size of
the frame for Standard Ethernet.
12.196
Figure Energy level during transmission, idleness, or collision
CSMA/CD: Flow Diagram
CSMA/CA
⚫ Carrier Sense Multiple Access with Collision Avoidance
⚫ Used in a network where collision cannot be detected
⚫ E.g., wireless LAN
Introduction, functions
Design Issues: Services to Network Layer, Framing, Error & Flow Control
ARQ Strategies: Error Detection & Correction, Parity bits, Hamming Code & CRC
Flow Control Protocols: Unrestricted Simplex, Stop and Wait, Sliding Window Protocol
MAC Sub layer: Multiple Access Protocols: Pure and Slotted ALOHA
{0,1}.
⚫ This set is called the contention window. If the sources collide again because
they picked the same integer, the contention window size is doubled and it
becomes {0,1,2,3}.
⚫ Now the sources involved in the second collision randomly pick an integer
from the set {0,1,2,3} and wait that number of slot times before trying again.
⚫ Before they try to transmit, they listen to the channel and transmit only if the
channel is idle. This causes the source which picked the smallest integer in
the contention window to succeed in transmitting its frame.
Binary Exponential Back -off algorithm,
•After a collision, time is divided into discrete slot ,the slot time
has been set to 512bits i.e. round trip propagation time on the
other.
•After the first collision each station waits either 0 or 1 time slot.
•If both station picks the same random number they collide
again.
•After the second collision each one can picks either 0,1,2 or 3 at
random.
•In general after ith collision a random number between 0 and 2i-
1 is chosen.
•Maximum 16 collision are allowed after that it reports as failure
Outline
Introduction, functions
Design Issues: Services to Network Layer, Framing, Error & Flow Control
ARQ Strategies: Error Detection & Correction, Parity bits, Hamming Code & CRC
Flow Control Protocols: Unrestricted Simplex, Stop and Wait, Sliding Window Protocol
MAC Sub layer: Multiple Access Protocols: Pure and Slotted ALOHA
4. Data Field
⚫ Up to 1500 bytes.
⚫ Minimum frame length – valid frames must be at
least 64 bytes long – from destination address to
checksum.
⚫ If data portion is less than 46 bytes the Pad field is
used to
fill out the frame to the minimum size.
⚫ Minimum filed length is also serves one very
important role – prevents the sender to complete
transmission before the first bit arrives at the
destination.
Fast Ethernet
⚫ After the standard for Fast Ethernet was adopted the work for
yet even faster standard started: Gigabit Ethernet
⚫ Goals:
⚫ Increase performance ten fold over Fast Ethernet.
⚫ Maintain compatibility with both Classical and Fast
Ethernet.
⚫ Unacknowledged datagram service with both unicast and
broadcast.
⚫ Use the same 48-bit addressing scheme already in use,
⚫ Maintain the same frame format including minimum and
maximum
sizes.
Gigabit Ethernet (3)
• Limitations because of
physical, hard-wired
infrastructure
• Flexibility
• Portability
• Mobility
• Ease of Installation
LAN Vs WLAN
Infrastructure
based
WLAN
types/Categories
Ad-hoc
Wireless LANs network Types (Categ
ories)
66 Networks:Wireless LANs
Wireless LAN Applications
Medical
Professionals(Healthcares)
Conducting everyday business
Education
Centers
IEEE 802.11 Wireless LAN Standard
IEEE developed the first intern
ationally recognized wireless L
AN standard – IEEE 802.11 in
1997
A B C
⚫ Hidden terminals
⚫ Aand C cannot hear each other.
⚫ Asends to B, C cannot receiveA.
⚫ C wants to send to B, C senses a“free” medium (CS fails)
⚫ Collision occurs at B.
⚫ Acannot receive the collision (CD fails).
⚫ Ais “hidden” for C.
WLAN Problem : exposed terminal problem.
WLAN Problem- Solution
MAC Layer
IEEE 802.11 Medium Access Control
Access
Security control
Reliable Data Delivery
Loss of frames due to
• noise, interference, and propagation effects
CSMA/CA
Polling DIFS
RTS/CTS PIFS
SIFS
CSMA/CD vs. CSMA/CA
RTS
A B C
CTS CTS
⚫ ToDS:
When bit is set indicate that destination frame is for DS
⚫ FromDS:
When bit is set indicate frame coming from DS
Frame Control field
⚫ Retry:
Set in case of retransmission frame
⚫ More fragments:
Set when frame is followed by other fragment
⚫ Power Management
bit set when station go Power Save mode (PS)
⚫ More Data:
When set means that AP have more buffered data for a station in Power
Save mode
Frame Control field
⚫ WEP:
When set indicate that in the Frame Body field there
are datas need to processed by WEP algorithm.
⚫ Order:
When set indicate restrictions for transmission
IEEE 802.11 standards
IEEE802.11 b
IEEE 802.11 a
IEEE 802.11 g
IEEE 802.11 n
IEEE 802.11 ac
IEEE 802.11 ad
IEEE 802.11 b
Frequency = 2.4 GHz (ISM band)
Scheme = DSSS
Mbps,11Mbps)
IEEE802.11 b
• lowest cost;
Pros o • signal range is good and
not easily obstructed
f 802.1
1b
• slowest maximum
speed;
• home appliances may
Cons interfere on the
unregulated frequency
of 802. band
11b
IEEE 802.11 standards
IEEE802.11 b
IEEE802.11 a
IEEE 802.11 g
IEEE 802.11 n
IEEE 802.11 ac
IEEE 802.11 ad
IEEE802.11 a
Frequency = 5 GHz
Maximum Speed = 54
Mbps
Range = about 35
meters(Varies)
Encoding Scheme =
OFDM
IEEE802.11 a-
Orthogonal Frequency Division Multiplexing(OFDM
)
Less interference
•Fewer products using the frequency
• 2.4 GHz band shared by cordless phones, microwave
ovens, Bluetooth, and WLANs
IEEE 802.11a Disadvantages
Standards and Interoperability
• Standard not accepted worldwide
• Not compatible or interoperable with 802.11b
Legal issues
• License-free spectrum in 5 GHz band not available worldwide
Market
• There is limited interest for 5 GHz adoption
Cost
• 2.4 GHz will still has >40% cost advantage
Power consumption
• Higher data rates and increased signal require more power
• OFDM is less power-efficient than DSSS
IEEE 802.11a Applications
Building-to-building connections
IEEE802.11 b
IEEE802.11 a
IEEE802.11 g
IEEE 802.11 n
IEEE 802.11 ac
IEEE 802.11 ad
IEEE 802.11 g
Frequency= 2.4 GHz
Pros Cons
appliances may
signal range is
interfere on the
good and not unregulated
easily obstructed signal frequency
802.11g Advantages
Provides higher speeds and higher capacity requirements for
applicatio
ns
IEEE802.11 b
IEEE802.11 a
IEEE802.11 g
IEEE802.11 n
IEEE 802.11 ac
IEEE 802.11 ad
IEEE 802.11 n
meters(Varies) Encoding
Scheme = OFDM
IEEE 802.11 n
Multiple Input Multiple Output(MIMO)
In radio, Multiple-input and
Multiple-output is used of
multiple antennas at both the
transmitter and receiver to improve
communicationperformance.
IEEE 802.11 n- Pros & Cons
Pros Cons
fastest maximum speed and
best signal range; standard is not yet finalized;
IEEE802.11 b
IEEE802.11 a
IEEE802.11 g
IEEE802.11 n
IEEE802.11 ac
IEEE 802.11 ad
273
IEEE 802.11ac
Frequency = 5 GHz
Modulation = OFDM
Modulation- 256-QAM
IEEE802.11 b
IEEE802.11 a
IEEE802.11 g
IEEE802.11 n
IEEE802.11 ac
IEEE802.11 ad
IEEE 802.11 ad
Frequency = 60GHz
Speed = 7Gbps
Modulation = OFDM
Comparison between Differen
t IEEE 802.11 Standards
Bluetooth Architecture
Two piconets can be connected to form a scatternet.
Bluetooth Architecture(2)
289
Packet Header
54 bits
Purpose
⚫ Addressing (3) Max 7 active slaves
⚫ Packet type (4) 16 packet types (some unused)
⚫ Flow control (1)
⚫ 1-bitARQ (1) Broadcast packets are not ACKed
⚫ Sequencing (1) For filtering retransmitted packets
⚫ HEC (8) Verify header integrity
290
WIMAX / IEEE 802.16
Wimax networks refer to broadband wireless networks that are
based on the IEEE 802.16 standard, which ensures compatibility
and interoperability between broadband wireless access
equipment .
Channel Bandwidths 20,25 and 28 MHz 1.5 and 20 MHZ Same as 802.16d
THE 802.16 PROTOCOL STACK
THE 802.16 PHYSICAL LAYER
Encoding/decoding of
signals
Preamble
generation/removal Bit
transmission/reception
signals Modulation
THE 802.16 MAC LAYER
Security Autentication,
sublayer Key Exchange,
Privacy (encrypt.)
802.16 Frame Structure