Top Banner
Overview of Wireless Network
119

Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Mar 19, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Overview of Wireless Network

Page 2: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Wireless

• There is an opinion that the future holds only two kinds ofcommunication: fiber and wireless. All fixed (i.e., non-mobile) computers, telephones, faxes, and so on will usefiber and all mobile ones will use wireless

• Wireless has advantages when the terrain (mountains,jungles, swamps, etc.) does not allow fiber

Page 3: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

The Electromagnetic Spectrum

• The Electromagnetic waves can bebroadcast efficiently and received by theantenna (of the appropriate size) of thereceiver some distance away

Page 4: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

The Electromagnetic Spectrum

Page 5: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

The Electromagnetic Spectrum

• The radio, microwave, infrared, and visible light portions ofthe spectrum can all be used for transmitting informationby modulating the amplitude, frequency, or phase of thewaves

• Ultraviolet light, X-rays and gamma rays would be evenbetter, due to their higher frequencies but they are hard toproduce and modulate do not propagate well throughbuildings and are dangerous to living things

• Official Names and are based on the wavelengths, so the LF(low frequency) band goes from 1 km to 10 km(approximately 30 kHz to 300 kHz)

Page 6: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

The Electromagnetic Spectrum

• LF, MF, and HF refer to Low, Medium, and Highfrequency, then come VHF, UHF, SHF, EHF, THFcorresponding to Very, Ultra, Super, Extremely, andTremendously … High Frequency bands

• The amount of information that an electromagneticwave can carry is related to its bandwidth (thedifference between the upper and lower frequenciesin a continuous set of frequencies)

• With current technology few bits per Hertz at lowfrequencies can be encoded, but often as many as 8at high frequencies

Page 7: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Bandwidth

• A key characteristic of bandwidth is that a band of agiven width can carry the same amountof information, regardless of where that band islocated in the frequency spectrum

• For example, a 3 kHz band can carry a telephoneconversation whether that band is at baseband (asin a POTS telephone line) or modulated to somehigher frequency

• given the width of a wavelength band, Δλ, we cancompute the corresponding frequency band, Δf, andfrom that the data rate the band can produce

• The wider the band, the higher the data rate

Page 8: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Frequency bands –Spread Spectrum

• Most transmissions use a narrow frequency band (i.e.,Δf/f 1) to get the best reception (many watts/Hz)

• In some cases, a wide band is used, with two variations• 1) Frequency Hopping Spread Spectrum - the

transmitter hops from frequency to frequency hundredsof times per second; popular for military communicationbecause it makes transmissions hard to detect and nextto impossible to jam; also 802.11 and Bluetooth use it

• 2) Direct Sequence Spread Spectrum, which spreadsthe signal over a wide frequency band - dominant withthe third generation mobile phones

Page 9: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Radio waves

Ranging from 3 KHz and 1 GHZ

Omni directional, waves propagated in alldirections

Sender and receiver must not be aligned

Propagate in sky mode

With low frequencies can penetrate walls

The radio wave band is relatively narrow

Page 10: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Radio Transmission

• Radio waves are easy to generate, can travel long distances, and can

penetrate buildings easily, so they are widely used for communication

• At low frequencies, radio waves pass through obstacles well, but the

power falls off sharply with distance from the source.

• At high frequencies, radio waves tend to travel in straight lines and

bounce off obstacles, absorbed by rain

• At all frequencies, radio waves are subject to interference from

motors and other electrical equipment

Page 11: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Radio Transmission

• In the VLF, LF, and MF bands, radio waves followthe ground

• waves can be detected for perhaps 1000 km at thelower frequencies

• Radio waves pass through buildings easily -portable radios work indoors

• Main Problem with using these bands for datacommunication is their low bandwidth

Page 12: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Radio Transmission

(a) In the VLF, LF, and MF bands, radio waves follow thecurvature of the earth.

(b) In the HF band, they bounce off the ionosphere.

Page 13: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Radio Transmission

• In the HF and VHF bands, the ground waves tendto be absorbed by the earth. However, the wavesthat reach the ionosphere, a layer of chargedparticles circling the earth at a height of 100 to500 km, are refracted by it and sent back to earth

• Under certain atmospheric conditions, the signalscan bounce several times. Amateur radio operators(hams) use these bands to talk long distance. Themilitary also communicate in the HF and VHFbands

Page 14: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Microwave

Ranges from 1 and 300 GHz

The can be narrowly focused

A pair of antenna can be aligned without

Characteristics

Line-of-sight

Repeaters are needed for long distances

High frequency cannot penetrate walls

Microwave band is relatively wide, therefore wider

subbands can be assigned, (higher data rate)

Page 15: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Microwave

Figure 7.21 Unidirectional antennas

Page 16: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Microwave Transmission

• Above 100 MHz, the waves travel in nearly straight lines and can therefore be narrowly focused

• Concentrating all the energy into a small beam by means of a parabolic antenna (like satellite TV dish) gives a much higher signal-to-noise ratio, but the transmitting and receiving antennas must be accurately aligned with each other

• multiple transmitters lined up in a row can communicate with multiple receivers in a row without interference

Page 17: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Microwave Transmission

• Repeaters are needed periodically• The distance between repeaters goes up very roughly

with the square root of the tower height - for 100-meter-high towers, repeaters can be spaced 80 km apart

• microwaves do not pass through buildings well• The demand for more and more spectrum drives

operators to yet higher frequencies. Bands up to 10 GHz are now in routine use, but at about 4 GHz a new problem sets in: absorption by water - only solution is to shut off links that are being rained on and route around them

Page 18: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Infrared

Ranges from 300 GHz to 400 GHz

Used for short range communication

High frequency

Cannot penetrate walls

Page 19: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Infrared and Millimeter Waves

• Unguided infrared and millimeter waves are widely used for short-range communication

• The remote controls used on televisions, VCRs, and stereos all use infrared communication

• These waves are:

• (+) - relatively directional, cheap, and easy to build

• (-) - they do not pass through solid objects (but is also a (+) as they don’t interfere with similar systems close by

Page 20: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Lightwave Transmission

• Connect the LANs in two buildings via lasersmounted on their rooftops

• optical signaling using lasers is inherentlyunidirectional, so each building needs its ownlaser and its own photo detector – this approachoffers very high bandwidth and very low cost

• A disadvantage is that laser beams cannotpenetrate rain or thick fog, but they normally workwell on sunny days

Page 21: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Lightwave Transmission

Convection currents can interfere with laser communication systems.A bidirectional system with two lasers is pictured here.

Page 22: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Switching Techniques

Switched Network

Circuit-Switched Network

Datagram Networks

Virtual-Circuit Network

Page 23: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Introduction

In large networks we need some means to allow one-to-one communication between any two nodes.

In LANs this is achieved using one of three methods:

Direct point-to-point connection (mesh)

Via central controller (star)

Connection to common bus in a multipoint configuration (bus/hup)

Page 24: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Introduction

None of the previous works in larger networks with large physical separation or consisting of a large number of computers

The solution is a switching network

Page 25: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Switched Network

Consists of a series of interlinked nodes called switched.

Switches are capable to create temporary connections between two or more devices

Page 26: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Page 27: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Circuit-Switched Network

A circuit-switched network consists of a set of switches connected by physical links.

A connection between two stations is a dedicated path made of one or more links

each connection uses only one dedicated channel on each link

Each link is normally divided into n channels by using FDM or TDM.

The link can be permanent (leased line) or temporary (telephone)

Page 28: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Circuit-Switched Network

Page 29: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Circuit-Switched Network

Switching take place at physical layer

Resources

Such as bandwidth in FDM and time slot in TDM

Switch buffer

Switch processing time

Switch I/O ports

Data transferred are not packetized, continuous flow

No addressing involved during data transfer

Page 30: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Example

Page 31: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Transmission phases

Setup phase

A dedicated circuit needs to be established

So create dedicated channel by sending a request

Page 32: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Transmission phases

Data transfer phase

Teardown phase

Signal is sent to each switch to release resources

Page 33: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Delay

Page 34: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Datagram Networks

Data are transmitted in discrete units called packets

Size of the packet depends on the protocol and network

Packets switched networks are connectionless, hence no resource allocation

Connectionless means the switch does not keep information about the connection state.

Datagram switching is done at network layer

Page 35: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Datagram Networks

Page 36: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Routing table & Destination Add.

A switch in a datagramnetwork uses a routing tablethat is based on thedestination address.

The destination address in theheader of a packet in adatagram network remainsthe same during the entirejourney of the packet.

Page 37: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Delay

Total Delay = 3T + 3t+ w1+ w2

Page 38: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Virtual-Circuit Network

Packets form a single message travel along the same path.

Characteristics

Three phases to transfer data

Resources can be allocated during setup phase

Data are packetized and each packet carries an address in the header

All packets follow the same path

Implemented in data link layer

Page 39: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Virtual-Circuit Network

Page 40: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Addressing

Global addressing

Source and destination needs unique addresses

Virtual-circuit identifier

Page 41: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Transmission phases

Setup phase

A switch creates an entry for a virtual circuit.

Request

acknowledgment

Page 42: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Setup

Page 43: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Acknowledgment

Page 44: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Data transfer and teardown phases

After sending all frames, a special frame is send to end the connection

Page 45: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Efficiency

In virtual-circuit switching, all packets

belonging to the same source and

destination travel the same path;

But the packets may arrive at the destination with different delays if resource allocation is on demand.

Page 46: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Delay

Total delay = 3T + 3ζ+ setup delay + teardown delay

Page 47: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Components of a Wireless Network

• A wireless network has only three basic components

– Transceivers,

– Access Points (AP) and

– wireless routers

47

Page 48: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Access Points

• An access point (AP) is a transceiver that connects to an Ethernet cable

– It bridges the wireless network with the wired network

• Not all wireless networks connect to a wired network

– Most companies have Wireless LANs (WLANs) that connect to their wired network topology

48

Page 49: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Access Points

• With the creation of the wireless Access Point (AP), network users are now able to add devices that access the network with few or no cables.

• An AP normally connects directly to a wired Ethernet connection and the AP then provides wireless connections using radio frequency links for other devices to utilize that wired connection.

• Most APs support the connection of multiple wireless devices to one wired connection.

• Modern APs are built to support a standard for sending and receiving data using, these radio frequencies

49

Page 50: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Wireless Router

• A wireless router includes an access point, a router, and a switch

• A wireless router is a device that performs the functions of a router but also includes the functions of a wireless access point. It is commonly used to provide access to the Internet[note 1] or a computer network. It does not require a wired link, as the connection is made wirelessly, via radio waves

50

Page 51: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Transceiver

• Sensor nodes often make use of ISM band, which gives freeradio, spectrum allocation and global availability.

• The possible choices of wireless transmission media are radiofrequency (RF), optical communication (laser) and infrared.

• Lasers require less energy , but need line-of-sight forcommunication and are sensitive to atmospheric conditions.

• Infrared, like lasers, needs no antenna but it is limited in itsbroadcasting capacity. Radio frequency-based communication isthe most relevant that fits most of the WSN applications.

• WSNs tend to use license-free communication frequencies: 2.4GHz.

• The functionality of both transmitter and receiver are combinedinto a single device known as a transceiver.

51

Page 52: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Data Link Layer Design Issues

OVERVIEW

FRAMING

FLOW AND ERROR CONTROL

PROTOCOLS

NOISELESS CHANNELS

NOISY CHANNELS

HDLC

Page 53: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Overview

The two main functions of the data link layer are data link control and media access control.

Data link control, deals with the design and procedures for communication between two adjacent nodes: node-to-node communication.

Media access control, or how to share the link.

Data link control functions include framing, flow and error control, and software implemented protocols.

Page 54: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.54

FRAMING

The data link layer needs to pack bits into frames, so

that each frame is distinguishable from another. Our

postal system practices a type of framing. The simple

act of inserting a letter into an envelope separates one

piece of information from another; the envelope serves

as the delimiter.

Fixed-Size Framing

Variable-Size Framing

Topics discussed in this section:

Page 55: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

FRAMING

The data link layer, needs to pack bits into frames, so that each frame is distinguishable from another.

Framing in the data link layer separates a message from one source to a destination, or from other messages to other destinations, by adding a sender address and a destination address.

The whole message could be packed in one frame, that is not normally done.

One reason is that a frame can be very large, making flow and error control very inefficient.

Page 56: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Fixed-Size Framing

In fixed-size framing, there is no need for defining 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 cells.

Page 57: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Variable-Size Framing

In variable-size framing, we need a way to define the end of the frame and the beginning of the next.

Two approaches were used for this purpose:

a character-oriented approach

a bit-oriented approach

Page 58: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Variable-Size Framing

Character-Oriented Protocols

Data to be carried are 8-bit characters from a coding system such as ASCII.

The header carries the source and destination addressesand other control information,

The trailer carries error detection or error correctionredundant bits, are also multiples of 8 bits.

To separate one frame from the next, an 8-bit (I-byte) flag is added at the beginning and the end of a frame

Page 59: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.59

Figure A frame in a character-oriented protocol

Page 60: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.60

Figure Byte stuffing and unstuffing

Page 61: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Variable-Size Framing

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.

In addition to headers (and possible trailers), 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.

Bit stuffing

Page 62: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.62

Figure A frame in a bit-oriented protocol

Page 63: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.63

Bit stuffing is the process of adding one extra 0 whenever five consecutive 1s follow a 0 in the data, so

that the receiver does not mistakethe pattern 0111110 for a flag.

Note

Page 64: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.64

Figure Bit stuffing and unstuffing

Page 65: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

FLOW AND ERROR CONTROL

Flow control coordinates the amount of data that can be sent before receiving an acknowledgment and is one of the most important duties of the data link layer.

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.

Any time an error is detected in an exchange, specified frames are retransmitted. This process is called automatic repeat request (ARQ).

Page 66: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

PROTOCOLS

The protocols are normally implemented in software by using one of the common programming languages.

We divide the discussion of protocols into those that can be used for

noiseless (error-free) channels

noisy (error-creating) channels

Page 67: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.67

Figure 11.5 Taxonomy of protocols discussed in this chapter

Page 68: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

NOISELESS CHANNELS

Let us first assume we have an ideal channel in which no frames are lost, duplicated, or corrupted.

We introduce two protocols for this type of channel. The first is a protocol that does not use flow control; the second is the one use flow control.

Page 69: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Simplest Protocol

It is one that has no flow or error control.

It is a unidirectional protocol in which data frames are traveling in only one direction-from the sender to receiver.

We assume that the receiver can immediately handle any frame it receives.

The data link layer of the receiver immediately removes the header from the frame and hands the data

packet to its network layer

The receiver can never be overwhelmed with incoming frames.

Page 70: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Design

The sender site cannot send a frame until its network layer has a data packet to send.

The receiver site cannot deliver a data packet to its network layer until a frame arrives.

If the protocol is implemented as a procedure, we need to introduce the idea of events in the protocol.

The procedure at the sender site is constantly running; there is no action until there is a request from the network layer.

The procedure at the receiver site is also constantly running, but there is no action until notification from the physical layer arrives

Page 71: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Stop-and-Wait Protocol

If data frames arrive at the receiver site faster than they can be processed, the frames must be stored until their use.

To prevent the receiver from becoming overwhelmed with frames, we need to tell the sender to slow down.

In this protocol the sender sends one frame, stops until it receives confirmation from the receiver (okay to go ahead), and then sends the next frame.

Page 72: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.72

NOISELESS CHANNELS

Let us first assume we have an ideal channel in which

no frames are lost, duplicated, or corrupted. We

introduce two protocols for this type of channel.

Simplest Protocol

Stop-and-Wait Protocol

Topics discussed in this section:

Page 73: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.73

Figure The design of the simplest protocol with no flow or error control

Page 74: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.74

Figure Flow diagram simplest protocol

Page 75: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.75

Figure Design of Stop-and-Wait Protocol

Page 76: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.76

Figure Flow diagram for stop and wait Protocol

Page 77: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.77

NOISY CHANNELS

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 use error control.

Stop-and-Wait Automatic Repeat Request

Go-Back-N Automatic Repeat Request

Selective Repeat Automatic Repeat Request

Topics discussed in this section:

Page 78: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.78

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.

Note

Page 79: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

NOISY CHANNELS

Noiseless channels are nonexistent, so we need to add error control to our protocols.

Stop-and-Wait Automatic Repeat Request protocol add a simple error control mechanism to the Stop-and-Wait Protocol.

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.

The detection of errors in this protocol is manifested by the silence of the receiver.

Page 80: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Stop-and-Wait ARQ

Lost frames are more difficult to handle than corruptedones.

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.

Page 81: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Stop-and-Wait ARQ

The completed and lost frames need to be resent in this protocol.

If the receiver does not respond when there is an error, how can the sender know which frame to resend?

To remedy this problem, the sender keeps a copy of the sent frame. At the same time, it starts a timer.

If the timer expires and there is no ACK for the sent frame, the frame is resent, the copy is held, and the timer is restarted.

Page 82: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Stop-and-Wait ARQ

Since an ACK frame can also be corrupted and lost, it too needs redundancy bits and a sequence number.

The ACK frame for this protocol has a sequence numberfield.

Page 83: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.83

Design of the Stop-and-Wait ARQ Protocol

Page 84: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Sequence Numbers

A field is added to the data frame to hold the sequence number of that frame.

The sequence numbers of course can wrap around. For example, if we decide that the field is m bits long, the sequence numbers start from 0, go to 2m - 1, and then are repeated.

Let us reason out the range of sequence numbers we need. Assume we have used x as a sequence number; we only need to use x + 1 after that. There is no need for x + 2

Page 85: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Acknowledgment Numbers

The acknowledgment numbers always announce the sequence number of the next frame expected by the receiver.

For example, if frame 0 has arrived safe and sound, the receiver sends an ACK frame with acknowledgment 1 (meaning frame 1 is expected next).

If frame 1 has arrived safe and sound, the receiver sends an ACK frame with acknowledgment 0 (meaning frame 0 is expected).

Page 86: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.86

Figure Flow diagram for Stop and Wait ARQ

Page 87: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.87

In the Go-Back-N Protocol, the sequence numbers are modulo 2m,

where m is the size of the sequence number field in bits.

Note

Page 88: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.88

Figure 11.14 Design of Go-Back-N ARQ

Page 89: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.89

Figure 11.16 Flow diagram for Example 11.6

Page 90: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.90

Figure 11.17 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.

Example 11.7

Page 91: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.91

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.

Example 11.7 (continued)

Page 92: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.92

Figure 11.17 Flow diagram for Example 11.7

Page 93: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.93

Stop-and-Wait ARQ is a special case of Go-Back-N ARQ in which the size of the send window is 1.

Note

Page 94: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.94

Figure 11.18 Send window for Selective Repeat ARQ

Page 95: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.95

Figure 11.19 Receive window for Selective Repeat ARQ

Page 96: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

11.96

Figure 11.20 Design of Selective Repeat ARQ

Page 97: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Multiple Access Layer

Data Communication

Page 98: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.98

Figure Data link layer divided into two functionality-oriented sublayers

Page 99: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Media Sharing

Static Channel Allocation

Dynamic Channel Allocation

FDM TDM SchedulingRandom Access

Page 100: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.100

Figure Taxonomy of multiple-access protocols discussed in this chapter

Page 101: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.101

RANDOM ACCESS

In random access or contention methods, no station issuperior to another station and none is assigned thecontrol over another. No station permits, or does notpermit, another station to send. At each instance, astation that has data to send uses a procedure definedby the protocol to make a decision on whether or notto send.

ALOHACarrier Sense Multiple AccessCarrier Sense Multiple Access with Collision DetectionCarrier Sense Multiple Access with Collision Avoidance

Topics discussed in this section:

Page 102: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

RANDOM ACCESS

In random access no station is superior to another station and none is assigned the control over another.

At each instance, a station that has data to send uses a procedure defined by the protocol to make a decision on whether or not to send.

This decision depends on the state of the medium (idle or busy)

if more than one station tries to send, there is an access conflict-collision-and the frames will be either destroyed or modified.

Page 103: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

ALOHA

ALOHA, the earliest random access method

The idea is that each station sends a frame whenever it has a frame to send. However, since there is only one channel to share, there is the possibility of collision.

The pure ALOHA protocol relies on acknowledgments from the receiver. When a station sends a frame, it expects the receiver to send an acknowledgment. If the

acknowledgment does not arrive after a time-out period, the station assumes that the frame has been destroyed and resends the frame.

Page 104: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

ALOHA

Pure ALOHA dictates that when the time-out period passes, each station waits a random amount of time before resending its frame.

The randomness will help avoid more collisions. We call this time the back-off time

Page 105: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.105

Figure Frames in a pure ALOHA network

Page 106: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.106

Figure Vulnerable time for pure ALOHA protocol

Page 107: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.107

Figure Frames in a slotted ALOHA network

Page 108: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.108

Figure Vulnerable time for slotted ALOHA protocol

Page 109: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Carrier Sense Multiple Access (CSMA)

To minimize the chance of collision and, therefore, increase the performance, the CSMA method was developed.

The chance of collision can be reduced if a station senses the medium before trying to use it.

CSMA can reduce the possibility of collision, but it cannot eliminate it.

Page 110: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Vulnerable Time for CSMA

The vulnerable time for CSMA is the propagation time Tp

This is the time needed for a signal to propagate from one end of the medium to the other

Page 111: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.111

Figure Behavior of three persistence methods

Page 112: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.112

Figure Flow diagram for three persistence methods

Page 113: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

Carrier Sense Multiple Access with Collision Detection (CSMA/CD)

The CSMA method does not specify the procedure following a collision.

Carrier sense multiple access with collision detection (CSMA/CD) augments the algorithm to handle the collision.

Page 114: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.114

Figure Collision of the first bit in CSMA/CD

Page 115: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.115

Figure Collision and abortion in CSMA/CD

Page 116: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.116

Figure Energy level during transmission, idleness, or collision

Page 117: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.117

Figure Timing in CSMA/CA

Page 118: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

12.118

In CSMA/CA, the IFS can also be used to

define the priority of a station or a frame.

Note

In CSMA/CA, if the station finds the

channel busy, it does not restart the timer of

the contention window;

it stops the timer and restarts it when the

channel becomes idle.

Page 119: Overview of Wireless Network - Mr.Rajiv Bhandari · 2015-07-28 · Packets form a single message travel along the same path. Characteristics Three phases to transfer data Resources

Data Communication

References

BehrouzA. Forouzan , “Data Communications and Networking”, 4rdEdition, Chapter 11,12, 2007

http://www.cs.science.cmu.ac.th/person/ekkarat/datacomm/