Download presentation
Presentation is loading. Please wait.
1
Error and Flow Control in TCP/IP
Lecture: 2 Instructor Mazhar Hussain
2
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.
3
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.
4
Error and Flow Control Mechanisms
Stop-and-Wait Go-Back-N ARQ Selective-Repeat ARQ
5
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 frame is intact. ACK number always defines the number of the next expected frame Stop-and-Wait
6
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.
7
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.
8
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.
9
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.
10
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
11
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.
12
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, …
13
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
14
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.
15
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.
16
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.
17
Go-Back-N ARQ, normal operation
The sender keeps track of the outstanding frames and updates the variables and windows as the ACKs arrive.
18
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. (go back to 2)
19
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
20
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 the next cycle-an error
21
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.
22
Selective Repeat ARQ, lost frame
Frames 0 and 1 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 range of the window.
23
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.
24
Smart phones and Mobile Phone Technology An Introduction
25
What are we talking about??
The world is flat! Bringing people together.....? Changing the way things work.
26
"Text messages are like little sugar rushes of contact, postcards from the people's cyberspace, the real reason God gave us thumbs and the capacity for language"
27
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? Motorola DynaTAC 8000X made commercially available: 2 lbs, $3,500 Motorola MicroTac Lite the lightest phone: $1,000
28
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 IBM developed first smartphone, Simon
29
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 , social networking websites) - Organization Uses: calendar, finance manager, address book, storage for data
30
Uses cont. - Hospital Uses: used to view image (x-ray, MRI, etc).
- 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.
31
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.
32
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)
33
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
34
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.
35
Cellular Network Basics
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 MHz frequency bands Cell phones operate in this frequency range (note the logarithmic scale)
36
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).
37
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
38
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 networks and will provide voice, data and multimedia service to subscribers
39
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 reused by another transmitter
40
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 each subband is used within one cell of the cluster in heavy traffic zones cells are smaller, while in isolated zones cells are larger
41
Network cells (2)
42
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; low- powered transmitters and receivers are used to avoid interference with cells in another clusters picocell – covers areas such as building or a tunnel
43
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
44
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 - each subscriber is assigned a time slot to send/receive a data burst; is used in digital systems Code Division Multiple Access - each subscriber is assigned a code which is used to multiply the signal sent or received by the subscriber
45
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
46
Cellular services voice communication Short Messaging Service (SMS)
Multimedia Messaging Service (MMS) Global Positioning System (GPS) Wireless Application Protocol (WAP) – to access the Internet
47
$ “Simplified” view of 3G Mobile switching center:
Analog to digital NodeB & Base Station Controller: Converts RF to wired Serving GPRS Support Node: Move IP packets to/from radio network Gateway GPRS Support Node: Route to/from the Interet $
48
Cellular network components
49
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 with other networks like PSTN through fiber optics, microwave or copper cable
50
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 subscriber battery, usually Li-ion, the power unit of the phone
51
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 receive or make calls
52
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
53
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 between the caller and the receiver
54
Global System for Mobile Communication (GSM)
55
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, MHz, 1900 MHz GSM provides voice and data services
56
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)
57
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.: 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
58
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
59
GSM architecture
60
Base Station Subsystem (BSS)
61
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 near the MSC and containing information identifying cell phones
62
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
63
Bibliography "The Benefits of Cell Phones." Cell Phone and Wireless Service Plan Buying Guide (2008) 20 Sep "Mobile Phone Exposure Causes Brain Damage in Rats." EHP: Environmental Health Perspectives "Excessive Mobile Phone Use Affects Sleep In teens, Study Finds." Science Daily "Is Txt Mightier Than the Word." BBCNews. "7 Disadvantages of Cell Phones." ControlYourImpact
64
Questions/Comments?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.