Overview of Wireless Network
Overview of Wireless Network
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
The Electromagnetic Spectrum
• The Electromagnetic waves can bebroadcast efficiently and received by theantenna (of the appropriate size) of thereceiver some distance away
The Electromagnetic Spectrum
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)
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
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
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
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
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
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
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.
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
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)
Data Communication
Microwave
Figure 7.21 Unidirectional antennas
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
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
Data Communication
Infrared
Ranges from 300 GHz to 400 GHz
Used for short range communication
High frequency
Cannot penetrate walls
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
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
Lightwave Transmission
Convection currents can interfere with laser communication systems.A bidirectional system with two lasers is pictured here.
Data Communication
Switching Techniques
Switched Network
Circuit-Switched Network
Datagram Networks
Virtual-Circuit Network
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)
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
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
Data Communication
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)
Data Communication
Circuit-Switched Network
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
Data Communication
Example
Data Communication
Transmission phases
Setup phase
A dedicated circuit needs to be established
So create dedicated channel by sending a request
Data Communication
Transmission phases
Data transfer phase
Teardown phase
Signal is sent to each switch to release resources
Data Communication
Delay
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
Data Communication
Datagram Networks
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.
Data Communication
Delay
Total Delay = 3T + 3t+ w1+ w2
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
Data Communication
Virtual-Circuit Network
Data Communication
Addressing
Global addressing
Source and destination needs unique addresses
Virtual-circuit identifier
Data Communication
Transmission phases
Setup phase
A switch creates an entry for a virtual circuit.
Request
acknowledgment
Data Communication
Setup
Data Communication
Acknowledgment
Data Communication
Data transfer and teardown phases
After sending all frames, a special frame is send to end the connection
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.
Data Communication
Delay
Total delay = 3T + 3ζ+ setup delay + teardown delay
Components of a Wireless Network
• A wireless network has only three basic components
– Transceivers,
– Access Points (AP) and
– wireless routers
47
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
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
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
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
Data Communication
Data Link Layer Design Issues
OVERVIEW
FRAMING
FLOW AND ERROR CONTROL
PROTOCOLS
NOISELESS CHANNELS
NOISY CHANNELS
HDLC
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.
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:
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.
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.
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
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
11.59
Figure A frame in a character-oriented protocol
11.60
Figure Byte stuffing and unstuffing
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
11.62
Figure A frame in a bit-oriented protocol
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
11.64
Figure Bit stuffing and unstuffing
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).
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
11.67
Figure 11.5 Taxonomy of protocols discussed in this chapter
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.
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.
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
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.
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:
11.73
Figure The design of the simplest protocol with no flow or error control
11.74
Figure Flow diagram simplest protocol
11.75
Figure Design of Stop-and-Wait Protocol
11.76
Figure Flow diagram for stop and wait Protocol
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:
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
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.
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.
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.
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.
11.83
Design of the Stop-and-Wait ARQ Protocol
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
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).
11.86
Figure Flow diagram for Stop and Wait ARQ
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
11.88
Figure 11.14 Design of Go-Back-N ARQ
11.89
Figure 11.16 Flow diagram for Example 11.6
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
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)
11.92
Figure 11.17 Flow diagram for Example 11.7
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
11.94
Figure 11.18 Send window for Selective Repeat ARQ
11.95
Figure 11.19 Receive window for Selective Repeat ARQ
11.96
Figure 11.20 Design of Selective Repeat ARQ
Multiple Access Layer
Data Communication
12.98
Figure Data link layer divided into two functionality-oriented sublayers
Data Communication
Media Sharing
Static Channel Allocation
Dynamic Channel Allocation
FDM TDM SchedulingRandom Access
12.100
Figure Taxonomy of multiple-access protocols discussed in this chapter
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:
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.
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.
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
12.105
Figure Frames in a pure ALOHA network
12.106
Figure Vulnerable time for pure ALOHA protocol
12.107
Figure Frames in a slotted ALOHA network
12.108
Figure Vulnerable time for slotted ALOHA protocol
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.
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
12.111
Figure Behavior of three persistence methods
12.112
Figure Flow diagram for three persistence methods
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.
12.114
Figure Collision of the first bit in CSMA/CD
12.115
Figure Collision and abortion in CSMA/CD
12.116
Figure Energy level during transmission, idleness, or collision
12.117
Figure Timing in CSMA/CA
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.
Data Communication
References
BehrouzA. Forouzan , “Data Communications and Networking”, 4rdEdition, Chapter 11,12, 2007
http://www.cs.science.cmu.ac.th/person/ekkarat/datacomm/