ACN-Lecture-2 - WordPress.com

Download Report

Transcript ACN-Lecture-2 - WordPress.com

ERROR AND FLOW CONTROL IN
TCP/IP
1
Lecture: 2
Instructor Mazhar Hussain
FLOW CONTROL
•
•
•
•
•
•
Flow control coordinates the amount of data that can be sent
before receiving acknowledgement
It is one of the most important functions of data link layer.
Flow control is a set of procedures that tells the sender how
much data it can transmit before it must wait for an
acknowledgement from the receiver.
Receiver has a limited speed at which it can process incoming
data and a limited amount of memory in which to store
incoming data.
Receiver must inform the sender before the limits are reached
and request that the transmitter to send fewer frames or stop
temporarily.
Since the rate of processing is often slower than the rate of
transmission, receiver has a block of memory (buffer) for
storing incoming data until they are processed.
2
ERROR CONTROL
•
•
•
Error control includes both error detection and
error correction.
It allows the receiver to inform the sender if a frame
is lost or damaged during transmission and
coordinates the retransmission of those frames by
the sender.
Error control in the data link layer is based on
automatic repeat request (ARQ). Whenever an error
is detected, specified frames are retransmitted.
3
ERROR AND FLOW CONTROL MECHANISMS
Stop-and-Wait
 Go-Back-N ARQ
 Selective-Repeat ARQ

4
STOP-ANDWAIT







Sender keeps a copy of the last frame
until it receives an acknowledgement.
For identification, both data frames
and acknowledgements (ACK) frames
are numbered alternatively 0 and 1.
Sender has a control variable (S) that
holds the number of the recently sent
frame. (0 or 1)
Receiver has a control variable ® that
holds the number of the next frame
expected (0 or 1).
Sender starts a timer when it sends a
frame. If an ACK is not received
within a allocated time period, the
sender assumes that the frame was
lost or damaged and resends it
Receiver send only positive ACK if the
5
frame is intact.
ACK number always defines the
number of the next expected frame
STOP-AND-WAIT ARQ, LOST ACK FRAME
When a receiver
receives a damaged
frame, it discards it
and keeps its value
of R.
 After the timer at
the sender expires,
another copy of
frame 1 is sent.

6
STOP-AND-WAIT, LOST ACK
FRAME
•
•
•
If the sender
receives a damaged
ACK, it discards it.
When the timer of
the sender expires,
the sender
retransmits frame
1.
Receiver has
already received
frame 1 and
expecting to receive
frame 0 (R=0).
Therefore it
discards the second
copy of frame 1.
7
STOP-AND-WAIT, DELAYED ACK
FRAME
•
•
•
•
The ACK can be
delayed at the
receiver or due to
some problem
It is received after the
timer for frame 0 has
expired.
Sender retransmitted
a copy of frame 0.
However, R =1 means
receiver expects to
see frame 1. Receiver
discards the duplicate
frame 0.
Sender receives 2
ACKs, it discards the
second ACK.
8
PIGGYBACKING
•
•
•
•
•
A method to
combine a data
frame with ACK.
Station A and B
both have data to
send.
Instead of sending
separately, station
A sends a data
frame that includes
an ACK.
Station B does the
same thing.
Piggybacking saves
bandwidth.
9
DISADVANTAGE OF STOP-AND-WAIT
•
•
•
•
In stop-and-wait, at any point in time, there is
only one frame that is sent and waiting to be
acknowledged.
This is not a good use of transmission medium.
To improve efficiency, multiple frames should be
in transition while waiting for ACK.
Two protocol use the above concept,
Go-Back-N ARQ
– Selective Repeat ARQ
–
10
GO-BACK-N ARQ
We can send up to W frames before worrying
about ACKs.
 We keep a copy of these frames until the ACKs
arrive.
 This procedure requires additional features to be
added to Stop-and-Wait ARQ.

11
SEQUENCE NUMBERS
•
•
•
•
•
Frames from a sender are numbered
sequentially.
We need to set a limit since we need to include
the sequence number of each frame in the
header.
If the header of the frame allows m bits for
sequence number, the sequence numbers range
from 0 to 2 m – 1. for m = 3, sequence numbers
are: 1, 2, 3, 4, 5, 6, 7.
We can repeat the sequence number.
Sequence numbers are:
0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, …
12
SENDER SLIDING WINDOW
• At the sending site, to
hold the outstanding
frames until they are
acknowledged, we use
the concept of a window.
• The size of the window is
at most 2m -1 where m is
the number of bits for
the sequence number.
• Size of the window can
be variable, e.g. TCP.
• The window slides to
include new unsent
frames when the correct
ACKs are received
13
RECEIVER SLIDING WINDOW
• Size of the window at
the receiving site is
always 1 in this
protocol.
• Receiver is always
looking for a specific
frame to arrive in a
specific order.
• Any frame arriving out
of order is discarded
and needs to be resent.
• Receiver window slides
as shown in fig.
Receiver is waiting for
frame 0 in part a.
14
CONTROL VARIABLES
•
•
•
•
•
Sender has 3 variables: S, SF, and SL
S holds the sequence number of recently sent frame
SF holds the sequence number of the first frame
SL holds the sequence number of the last frame
Receiver only has the one variable, R, that holds the sequence
number of the frame it expects to receive. If the seq. no. is the
same as the value of R, the frame is accepted, otherwise rejected.
15
ACKNOWLEDGEMENT






Receiver sends positive ACK if a frame arrived safe and in order.
If the frames are damaged/out of order, receiver is silent and discard
all subsequent frames until it receives the one it is expecting.
The silence of the receiver causes the timer of the unacknowledged
frame to expire.
Then the sender resends all frames, beginning with the one with the
expired timer.
For example, suppose the sender has sent frame 6, but the timer for
frame 3 expires (i.e. frame 3 has not been acknowledged), then the
sender goes back and sends frames 3, 4, 5, 6 again. Thus it is called
Go-Back-N-ARQ
The receiver does not have to acknowledge each frame received, it can
send one cumulative ACK for several frames.
16
GO-BACK-N ARQ, NORMAL OPERATION
• The sender keeps track of the outstanding frames and
updates the variables and windows as the ACKs arrive.
17
GO-BACK-N ARQ, LOST
FRAME
• Frame 2 is lost
• When the
receiver receives
frame 3, it
discards frame 3
as it is expecting
frame 2
(according to
window).
• After the timer
for frame 2
expires at the
sender site, the
sender sends
frame 2 and 3.18
(go back to 2)
GO-BACK-N ARQ, DAMAGED/LOST/DELAYED
ACK
• If an ACK is damaged/lost, we can have two situations:
• If the next ACK arrives before the expiration of any timer,
there is no need for retransmission of frames because
ACKs are cumulative in this protocol.
• If ACK1, ACK2, and ACk3 are lost, ACK4 covers them if it
arrives before the timer expires.
• If ACK4 arrives after time-out, the last frame and all the
frames after that are resent.
• Receiver never resends an ACK.
• A delayed ACK also triggers the resending of frames
19
GO-BACK-N ARQ, SENDER WINDOW
SIZE
• Size of the sender window must be less than 2 m. Size of the
receiver is always 1. If m = 2, window size = 2 m – 1 = 3.
• Fig compares a window size of 3 and 4.
Accepts as
the 1st
frame in
the20
next
cycle-an
error
SELECTIVE REPEAT ARQ, SENDER AND RECEIVER WINDOWS
• Go-Back-N ARQ simplifies the process at the receiver site. Receiver only keeps
track of only one variable, and there is no need to buffer out-of-order frames,
they are simply discarded.
• However, Go-Back-N ARQ protocol is inefficient for noisy link. It bandwidth
inefficient and slows down the transmission.
• In Selective Repeat ARQ, only the damaged frame is resent. More bandwidth
efficient but more complex processing at receiver.
• It defines a negative ACK (NAK) to report the sequence number of a damaged
frame before the timer expires.
21
• Frames 0 and 1
SELECTIVE REPEAT ARQ, LOST FRAME
are accepted
when received
because they
are in the range
specified by the
receiver
window. Same
for frame 3.
• Receiver sends
a NAK2 to show
that frame 2
has not been
received and
then sender
resends only
frame 2 and it is
accepted as it is
in the range22of
the window.
SELECTIVE REPEAT ARQ, SENDER WINDOW SIZE
• Size of the sender and receiver windows must be at most one-half of 2 m. If m =
2, window size should be 2 m /2 = 2. Fig compares a window size of 2 with a
window size of 3. Window size is 3 and all ACKs are lost, sender sends duplicate
of frame 0, window of the receiver expect to receive frame 0 (part of the
window), so accepts frame 0, as the 1st frame of the next cycle – an error.
23
SMART PHONES AND MOBILE PHONE
TECHNOLOGY
AN INTRODUCTION
24
WHAT ARE WE TALKING ABOUT??
•
The world is flat!
•
Bringing people together.....?
•
Changing the way things work.
25
"TEXT MESSAGES ARE LIKE LITTLE SUGAR RUSHES OF
CONTACT, 26
POSTCARDS FROM THE PEOPLE'S CYBERSPACE, THE
REAL REASON GOD GAVE US THUMBS AND THE CAPACITY FOR
LANGUAGE"
HISTORY
- The first official mobile phone
used in Sweden by the Swedish
police in 1946; could make 6
phone calls before car's battery
was drained
- development of first cell phone
(creation of towers/cells at Bell
Labs in 1947
- FCC?
- 1983 Motorola DynaTAC 8000X
made commercially available: 2
lbs, $3,500
- 1991 Motorola MicroTac Lite the
lightest phone: $1,000
27
HISTORY CONT.
- 2nd generation: from the early
1990's
- smaller, better batteries, huge
increase in popularity
- 3rd generation: include 2
Megabits of maximum data rate
indoors and 384 kbits for outdoor
use
- include internet access and
other modern innovations
- 1993 IBM developed first
smartphone, Simon
28
USES
- Smartphones provide portable
use of IT
- Entertainment Uses:
games, music (mp3 player),
books (e-book), and digital
television broadcast
- Social Uses: phone call, text
message, wireless internet
(access to e-mail, social
networking websites)
- Organization Uses: calendar,
finance manager, address book,
storage for data
29
USES CONT.
- Hospital Uses: used to view
image (x-ray, MRI, etc).
means of communication
between nurses and clinicians.
- Museum Uses: audio guide is
provided through cell phones.
- China: mobile learning
provides access to lectures and
test preps.
30
BENEFITS
•
•
•
Mobile technology is key to
keeping in touch in the
modern world.
Text messaging
Smart Phones aren't only
used for communication,
but for organizing
schedules, jotting down
notes, playing music,
games, checking the
weather, and other
applications.
31
BENEFITS CONT.
•
•
Cell Phones
"revolutionized long
distance calling", making it
much more inexpensive for
long distance
communication.
Cell phone logs have also
been helpful in court cases
where they can be used as
evidence.
(You may
also consider this a
disadvantage)
32
CRITICISMS
- negative health affects
(increases resting blood
pressure, reduces production
of melatonin, related to
Altzeimers's Disease, linked to
cancer)
-increased stress level
(fatigue, headache, difficulty in
concentration, disturbance in
sleep)
- effect on children; the
"blackberry father"
- risk in driving
- reduced privacy
- effects on language
33
SUMMARY/OPINION
•
Mobile technology and
smart phones play a major
role in every day life, and
their importance is
expected to continue, and
even increase in the future.
34
CELLULAR NETWORK BASICS


35

There are many types of cellular services; before delving into details,
focus on basics (helps navigate the “acronym soup”)
Cellular network/telephony is a radio-based technology; radio
waves are electromagnetic waves that antennas propagate
Most signals are in the 850 MHz, 900 MHz, 1800 MHz, and 1900
MHz frequency bands
Cell phones operate in this frequency
range (note the logarithmic scale)
EVOLUTION TO CELLULAR NETWORKS –
COMMUNICATION ANYTIME, ANYWHERE





radio communication was invented by Nikola Tesla and Guglielmo
Marconi: in 1893, Nikola Tesla made the first public demonstration of
wireless (radio) telegraphy; Guglielmo Marconi conducted long ditance
(over see) telegraphy 1897
in 1940 the first walkie-talkie was used by the US military
in 1947, John Bardeen and Walter Brattain from AT&T’s Bell Labs
invented the transistor (semiconductor device used to amplify and
switch electronic signals)
AT&T introduced commercial radio comm.: car phone – two way radio
link to the local phone network
in 1979 the first commercial cellular phone service was launched by the
Nordic Mobile Telephone (in Finland, Sweden, Norway, Denmark).
36
CELLULAR NETWORK GENERATIONS
 It
is useful to think of cellular
Network/telephony in terms of generations:
0G: Briefcase-size mobile radio telephones
 1G: Analog cellular telephony
 2G: Digital cellular telephony
 3G: High-speed digital cellular telephony (including
video telephony)
 LTE (4G): IP-based “anytime, anywhere” voice, data,
and multimedia telephony at faster data rates than
3G

37
CELLULAR SYSTEMS GENERATIONS
1G (first generation) – voice-oriented systems based on
analog technology; ex.: Advanced Mobile Phone
Systems (AMPS) and cordless systems
 2G (second generation) - voice-oriented systems based
on digital technology; more efficient and used less
spectrum than 1G; ex.: Global System for Mobile (GSM)
and US Time Division Multiple Access (US-TDMA)
 3G (third generation) – high-speed voice-oriented
systems integrated with data services; ex.: General
Packet Radio Service (GPRS), Code Division Multiple
Access (CDMA)
 4G (fourth generation) –based on Internet protocol 38
networks and will provide voice, data and multimedia
service to subscribers

FREQUENCY REUSE
is a method used by service providers to improve the
efficiency of a cellular network and to serve millions
of subscribers using a limited radio spectrum
 is based on the fact that after a distance a radio
wave gets attenuated and the signal falls bellow a
point where it can no longer be used or cause any
interference
 a transmitter transmitting in a specific frequency
range will have only a limited coverage area
 beyond this coverage area, that frequency can be
39
reused by another transmitter

NETWORK CELLS
the entire network coverage area is divided into cells
based on the principle of frequency reuse
 a cell = basic geographical unit of a cellular network;
is the area around an antenna where a specific
frequency range is used; is represented graphically as
a hexagonal shape, but in reality it is irregular in
shape
 when a subscriber moves to another cell, the antenna
of the new cell takes over the signal transmission
 a cluster is a group of adiacent cells, usually 7 cells; no
frequency reuse is done within a cluster
 the frequency spectrum is divided into subbands and
40
each subband is used within one cell of the cluster
 in heavy traffic zones cells are smaller, while in

NETWORK CELLS (2)
41
TYPES OF CELLS
macrocell – their coverage is large (aprox. 6 miles
in diameter); used in remote areas, high-power
transmitters and receivers are used
 microcell – their coverage is small (half a mile in
diameter) and are used in urban zones; lowpowered transmitters and receivers are used to
avoid interference with cells in another clusters
 picocell – covers areas such as building or a
tunnel

42
OTHER CELLULAR CONCEPTS
handover = moving a call from one zone (from the
transmitter-receiver from one zone) to another
zone due to subscriber’s mobility
 roaming = allowing the subscriber to send/receive
calls outside the service provider’s coverage area

43
MULTIPLE ACCESS SCHEMES
Frequency Division Multiple
Access
- when the subscriber enters
another cell a unique frequency is
assigned to him; used in analog
systems
Time Division Multiple Access
Code Division Multiple Access
- each subscriber is assigned a time
slot to send/receive a data burst; is
used in digital systems
- each subscriber is assigned a
code which is used to multiply the
signal sent or received by the
subscriber
44
THE CONTROL CHANNEL

this channel is used by a cellular phone to
indicate its presence before a frequency/time
slot/code is allocated to him
45
CELLULAR SERVICES
voice communication
 Short Messaging Service (SMS)
 Multimedia Messaging Service (MMS)
 Global Positioning System (GPS)
 Wireless Application Protocol (WAP) – to access
the Internet

46
“SIMPLIFIED” VIEW OF 3G
47
Mobile
switching
NodeB & Base
Station
Serving GPRS Support Node:
Gateway GPRS Support Node:
Controller: center:
Move IP packets to/from radio
Route to/from the Interet
Converts RF Analog
to wiredto digital network
CELLULAR NETWORK COMPONENTS
48
CELLULAR NETWORK COMPONENTS (2)
BTS (Base Transceiver Station) – main component of a
cell and it connects the subscribers to the cellular
network; for transmission/reception of information it
uses several antennas spread across the cell
 BSC (Basic Station Controller) – it is an interface
between BTSs and it is linked to BTSs by cable or
microwave links; it routes calls between BTSs; it is
also connected to the MSC
 MSC (Mobile Switching Center) – the coordinator of a
cellular network, it is connected to several BSCs, it
routes calls between BSCs; links the cellular network
49
with other networks like PSTN through fiber optics,
microwave or copper cable

COMPONENTS OF A CELLULAR PHONE
(MSU – MOBILE SUBSCRIBER UNIT)
radio transceiver – low power radio transmitter and
receiver
 antenna, usually located inside the phone

control circuitry – formats the data sent to and from
the BTS; controls signal transmission and reception
 man-machine interface – consists from a keypad and
a display; is managed by the control circuitry
 Subscriber Identity Module (SIM) – integrated
circuit card that stores the identity information of
50
subscriber
 battery, usually Li-ion, the power unit of the phone

SETTING UP A CALL PROCESS
when powered on, the phone does not have a frequency/
time slot/ode assigned to it yet; so it scans for the control
channel of the BTS and picks the strongest signal
 then it sends a message (including its identification
number) to the BTS to indicate its presence
 the BTS sends an acknowledgement message back to the
cell phone
 the phone then registers with the BTS and informs the
BTS of its exact location
 after the phone is registered to the BTS, the BTS
assigns a channel to the phone and the phone is ready
to
51
receive or make calls

MAKING A CALL PROCESS
the subscriber dials the receiver’s number and sends it
to the BTS
 the BTS sends to its BSC the ID, location and number
of the caller and also the number of the receiver
 the BSC forwards this information to its MSC
 the MSC routes the call to the receiver’s MSC which is
then sent to the receiver’s BSC and then to its BTS
 the communication with the receiver’s cell phone is
established

52
RECEIVING A CALL PROCESS
when the receiver’ phone is in an idle state it listens
for the control channel of its BTS
 if there is an incoming call the BSC and BTS sends a
message to the cells in the area where the receiver’s
phone is located
 the phone monitors its message and compares the
number from the message with its own
 if the numbers matches the cell phone sends an
acknowledgement to the BTS
 after authentication, the communication is established
53
between the caller and the receiver

GLOBAL SYSTEM FOR MOBILE
COMMUNICATION (GSM)
54
GSM CHARACTERISTICS
previous standard in cellular communication were
restrictive
 GSM – global digital standard for cellular phones
that offered roaming facility
 first named Groupe Special Mobile and used in
Europe; then usage extended to other continents
 GSM operate in frequency bands: 900MHz, 1800
MHz, 1900 MHz
 GSM provides voice and data services

55
SUBSCRIBER IDENTITY MODULE (SIM)
CARD
SIM – a memory card (integrated circuit) holding
identity information, phone book etc.
 GSM system support SIM cards
 other systems, like CDMA do not support SIM cards,
but have something similar called Re-Usable
Identification Module (RUIM)

56
INTERNATIONAL MOBILE EQUIPMENT
IDENTITY (IMEI) KEY
IMEI – a unique 15 digit number identifying each
phone, is incorporated in the cellular phone by the
manufacturer
 IMEI ex.: 994456245689001
 when a phone tries to access a network, the service
provider verifies its IMEI with a database of stolen
phone numbers; if it is found in the database, the
service provider denies the connection
 the IMEI is located on a white sticker/label under the
battery, but it can also be displayed by typing *#06#
on the phone
57

INTERNATIONAL MOBILE SUBSCRIBER
IDENTITY (IMSI) KEY
IMSI – a 15-digit unique number provided by the
service provider and incorporated in the SIM card
which identifies the subscriber
 IMSI enables a service provider to link a phone
number with a subscriber
 first 3 digits of the IMSI are the country code

58
GSM ARCHITECTURE
59
BASE STATION SUBSYSTEM (BSS)
60
HLR, VLR AND EIR REGISTERS
Home Location Register (HLR) - is a database
maintained by the service provider containing
permanent data about each subscriber (i.e. location,
activity status, account status, call forwarding
preference, caller identification preference)
 Visitor Location Register (VLR) – database that stores
temporary data about a subscriber; it is kept in the
MSC of the of the area the subscriber is located in;
when the subscriber moves to a new area the new
MSC requests this VLR from the HLR of the old MSC
 Equipment Identity Register (EIR) – database located
61
near the MSC and containing information identifying
cell phones

AUTHENTICATION CENTER (AUC)
1st level security mechanism for a GSM cellular
network
 is a database that stores the list of authorized
subscribers of a GSM network
 it is linked to the MSC and checks the identity of each
user trying to connect
 also provides encryption parameters to secure a call
made in the network

62
BIBLIOGRAPHY
1.
2.
3.
4.
5.
"The Benefits of Cell Phones." Cell Phone and Wireless Service Plan Buying Guide
(2008) 20 Sep 2008 http://www.wirelessguide.org/basics/benefits.php.
"Mobile Phone Exposure Causes Brain Damage in Rats." EHP: Environmental
Health Perspectives. 1-29-03. 9-19-08. www.ehponline.org
"Excessive Mobile Phone Use Affects Sleep In teens, Study Finds." Science Daily.
6-9-08. 9-19-08. www.sciencedaily.com
"Is Txt Mightier Than the Word." BBCNews. 3-4-03. 9-19-08.
www.news.bbc.co.news
"7 Disadvantages of Cell Phones." ControlYourImpact. 4-17-08. 9-19-08.
www.controlyourimpact.com
63
QUESTIONS/COMMENTS?
64