Академический Документы
Профессиональный Документы
Культура Документы
Prasanna Shete
KJSCE
Prerequisite
• Basic Computer Networks
–Sound knowledge in traditional MAC protocols
–IP routing protocols
–concepts in TCP
• Basics of Mobile Communication
Outline
• Basics of Wireless Transmission
• Wireless MAC Protocols
• Wireless LANs
• Mobile Network Layer
• Mobile Transport Layer
• Mobile Ad hoc Networks
References
• Emerging Wireless Technologies and the Future Mobile
Internet- D Raychaudhuri & Mario Gerla, Cambridge University Press
120Mbps
Access Point
Wireline network
g
Access Point
WiFi Network
• 802.11b Uses 2.4 GHz ISM band, DSSS PHY and data
rate up to 11 Mbps
• 802.11a : uses 5 GHz band, OFDM PHY and data rate
up to 54Mbps
• 802.11g uses 2.4 GHz ISM Band, OFDM PHY and
data rate of 54 Mbps
• 802.11e uses 2.4 GHz ISM Band, attempts to support
QoS
• Newer stds: 802.11n, ac- high data rates (hundreds of
Mbps), MIMO
Signal Propagation
• Transmission range:
receiver receives signal with
an error rate low enough to
be able to communicate
• Detection range: transmitted
power is high enough to
detect the transmitter, but sender
high error rate forbids
communication transmission
• Interference range: sender
interferes with other detection
transmissions by adding to interference
the noise
Friis Free Space loss
• Transmitted signal attenuates over distance because it is spread
over larger and larger area (should be used when Tx and Rx
have a clear unobstructed line of sight)
– known as free space loss and for isotropic antennas
Pt (4d ) 2 (4fd ) 2
r 2 c2
Pt = power at the transmitting antenna
Pr = power at the receiving antenna
λ = carrier wavelength
d = propagation distance between the antennas
c = speed of light
Free Space loss
– For other antennas
Pt (4d ) 2 (d ) 2
P r Gr Gt 2
Ar At
Gt = Gain of transmitting antenna
Gr = Gain of receiving antenna
At = effective area of transmitting antenna
Ar = effective area of receiving antenna
Since
4Ae
G 2
Far-field
• Friis free space loss is not valid for d =0
• The Friis free space loss is only valid for values
of d which are in the far field of the transmitter
• Far-field or Fraunhofer region of a transmitter is
defined as the region beyond the far-field
distance df , defined as
2D 2
df
Where D =largest linear dimension of the antenna
λ = wavelength of the carrier
df >> D
df >> λ
Ground Reflection (Two-ray) model
• Free space model may not be accurate when there
is signal also being received after reflection from the
ground.
Tx Elos
Rx
Ei
ht
Er
hr
d
Signal Propagation
• Radio waves exhibit three fundamental propagation
behavior
– Ground wave (< 2 MHz) : waves with low frequency follow
earth’s surface
• can propagate long distances
• Used for submarine communication or AM radio
– Sky wave (2-30 MHz) : waves reflect at the ionosphere and
bounce back and forth between ionosphere and earth ,
travelling around the world
• Used by international broadcast and amateur radio
Signal propagation
receiver
transmitter
earth
Signal propagation
receiver
transmitter
earth
earth
λ << D
Diffraction
• Occurs when radio path between tx and rx is
obstructed by surface that has sharp irregularities.
• The waves bend around the sharp edges
λ≈D
Scattering
• Occurs when wave travels through medium
consisting of object with dimensions much smaller
compared to its wavelength
λ >> D
Multipath propagation
Signal can take many different paths between sender and receiver due to
reflection, scattering, diffraction
multipath
LOS pulses pulses
signal at sender
signal at receiver
Time dispersion: signal is dispersed over time
interference with “neighbor” symbols, Inter Symbol Interference (ISI)
The signal reaches a receiver directly and phase shifted
distorted signal depending on the phases of the different parts
Effect of Multipath Propagation
• Multiple copies of the signal may arrive with different
phases. If the phases add destructively, the signal
level reduces relative to noise.
t
short term fading
Multiplexing
s3
f
Frequency multiplex
Advantages:
only one carrier in the
medium at any time
throughput high even k1 k2 k3 k4 k5 k6
for many users
c
Disadvantages: f
precise
synchronization
necessary
t
Time and frequency multiplex
t
Code multiplex
f f f
sender
dP/df dP/df
despread
apply bandpass filter
user signal
f f
broadband interference
receiver narrowband interference
Direct Sequence Spread Spectrum
• Takes a user bit sequence and performs an XOR with, what
is known as, chipping sequence
• Each user bit duration tb
• chipping sequence has smaller pulses tc
• If chipping sequence is generated properly it may appear as
random noise
– sometimes called pseudo-noise (PN)
• tb/tc is known as the spreading factor
– determines the bandwidth of the resultant signal
• Used by 802.11b
Direct Sequence Spread Spectrum
user data
tb
0 1
XOR
tc
chipping sequence
0 11 01 0 0 1 0 1 0 1
spread signal
0 11 0 1 0 1 0 1 0 1 0
Frequency Hopping Spread Spectrum
• Total available bandwidth is split into many channels of
smaller bandwidth and guard spaces
• Transmitter and receiver stay on one of these channels for a
certain time and then hop to another channel
• Implements FDM and TDM
• Pattern of channel usage : hopping sequence
• Time spent on a particular channel: dwell time
• User data is modulated with this FH sequence on the TX
side and demodulated with this FH sequence on the RX
side
Frequency Hopping Spread Spectrum
• Slow hopping
– Transmitter uses one frequency for several bit period
– systems are cheaper, but are prone to narrow band interference
• Fast hopping
– Transmitter changes frequency several times in one bit period
– Transmitter and receivers have to stay synchronized within smaller
tolerances
– Better immuned to narrow band interference as they stick to one frequency
for a very short period
• Receiver must know the hopping sequence and stay synchronized
with the transmitter
• Used by bluetooth
Frequency hopping spread spectrum
tb
user data
0 1 0 1 1 t
f3
td
f2
slow hopping 3bits/hop
f1
td t
f3
fast hopping 3hops/bit
f2
f1
t
td = dwel time
WLANs
Wireless LANs: Characteristics
• Advantages
– Flexible deployment; Minimal wiring problems
– More robust against disasters
– Airports, conferences, …
• Disadvantages
– Low bandwidth compared to wired networks
– Need to follow wireless spectrum regulations
43
Infrastructure and Adhoc Networks
infrastructure
network
AP: Access Point
AP
AP wired network
AP
ad-hoc network
44
Source: Schiller
802.11 - Architecture of an infrastructure network
Station (STA)
802.11 LAN terminal with access mechanisms
802.x LAN
to the wireless medium and radio
contact to the access point
STA1 Basic Service Set (BSS)
BSS1
group of stations using the same
Access Portal
radio frequency
Point Access Point
Distribution System station integrated into the wireless
LAN and the distribution system
Access
ESS Point Portal
bridge to other (wired) networks
BSS2 Distribution System
interconnection network to form
one logical network (ESS:
Extended Service Set) based
STA2 802.11 LAN STA3 on several BSS
802.11 - Architecture of an ad-hoc network
IBSS2
STA5
fixed
terminal
mobile terminal
infrastructure
network
access point
application application
TCP TCP
IP IP
LLC LLC LLC
802.11 MAC 802.11 MAC 802.3 MAC 802.3 MAC
802.11 PHY 802.11 PHY 802.3 PHY 802.3 PHY
Wireless LANs are different…
48
Difference Between Wired
and Wireless
Ethernet LAN Wireless LAN
B
A B C
A C
• Example CSMA/CD
– Carrier Sense Multiple Access with Collision Detection
– send as soon as the medium is free, listen into the
medium if a collision occurs (original method in IEEE
802.3)
51
Wireless MAC
52
Hidden Terminal Problem
A B C
– A and C cannot hear each other.
– A sends to B, C cannot receive A.
– C wants to send to B, C senses a “free” medium
(CS fails)
– Collision occurs at B.
– A cannot receive the collision (CD fails).
– A is “hidden” for C.
53
Exposed Terminal Problem
D C A B
– A starts sending to B.
– C senses carrier, finds medium in use and has to
wait for A->B to end.
– D is outside the range of A, therefore waiting is not
necessary.
54
Solution for Hidden Terminals
RTS RTS
D A B C
CTS CTS
DATA
55
ISSUES in Wireless MAC
• Mobility of Nodes
– Control information exchanged may become useless
due to mobility
– MAC performance should be satisfactory when
nodes are mobile
• Power consumption
• QoS support
– Criticial for real time applications
Design Goals
• Available bandwidth should be utilized efficiently
• Fair allocation of bandwidth
• Control overhead should be kept low
• Should minimize the effect of hidden and exposed
node
• Should be scalable to large network
• Should have power control mechanisms to manage
energy consumption of the nodes
Classification of MAC protocols
• Contention-free
– TDMA
– FDMA
– Polling
• Contention-based
– MACA (Multiple Access Collision Avoidance)
– MACAW
802.11 - MAC layer
• Traffic services
– Asynchronous Data Service (mandatory) – DCF
– Time-Bounded Service (optional) - PCF
• Access methods
– DCF CSMA/CA (mandatory)
• collision avoidance via randomized back-off
mechanism
• ACK packet for acknowledgements (not for
broadcasts)
59
802.11 access methods
– DCF CSMA/CA (mandatory)
60
802.11 - Carrier Sensing
61
802.11 virtual carrier sensing
62
Special Frames: ACK, RTS, CTS
Acknowledgement
bytes 2 2 6 4
ACK Frame Receiver
Duration CRC
Control Address
Request To Send
bytes 2 2 6 6 4
Frame Receiver Transmitter
RTS Duration CRC
Control Address Address
Clear To Send
bytes 2 2 6 4
Frame Receiver
CTS Duration CRC
Control Address
802.11 – Reliability: ACKs
– When B receives DATA from A, B sends an ACK
– If A fails to receive an ACK, A retransmits the DATA
– Both C and D remain quiet until ACK (to prevent
collision of ACK)
– Expected duration of transmission+ACK is included in
RTS/CTS packets
RTS RTS
D A B C
CTS CTS
DATA
ACK
64
802.11 - CSMA/CA
contention window
DIFS DIFS (randomized back-off
mechanism)
direct access if t
medium is free DIFS slot time
– station ready to send starts sensing the medium
(Carrier Sense based on CCA, Clear Channel
Assessment)
– if the medium is free for the duration of an Inter-Frame
Space (IFS), the station can start sending (IFS
depends on service type)
65
802.11 – CSMA/CA
– if the medium is busy, the station has to wait for a free
IFS, then the station must additionally wait a random
back-off time (collision avoidance, multiple of slot-
time)
– if another station occupies the medium during the
back-off time of the station, the back-off timer stops
(fairness)
66
802.11 –CSMA/CA example
DIFS DIFS DIFS DIFS
boe bor boe bor boe busy
station1
boe busy
station2
busy
station3
busy medium not idle (frame, ack etc.) boe elapsed backoff time
67
802.11 - Collision Avoidance
68
DCF Example
B1 = 25 B1 = 5
wait data
data wait
B2 = 20 B2 = 15 B2 = 10
69
802.11 - Congestion Control
70
Congestion control (contd.)
• Binary Exponential Backoff in DCF:
– When a node fails to receive CTS in response to its
RTS, it increases the contention window
• CW is doubled (up to a bound CWmax)
72
802.11 – Priorities (contd.)
73
802.11 - CSMA/CA II
• station has to wait for DIFS before sending data
• receivers acknowledge at once (after waiting for SIFS) if the packet
was received correctly (CRC)
• automatic retransmission of data packets in case of transmission
errors
DIFS
data
sender
SIFS
ACK
receiver
DIFS
other data
stations t
waiting time contention
74
802.11 –RTS/CTS
DIFS
RTS data
sender
SIFS SIFS
SIFS
CTS ACK
receiver
DIFS
NAV (RTS)
other data
NAV (CTS)
stations
t
defer access
contention
75
802.11 –RTS/CTS
• station can send RTS with reservation parameter after waiting for DIFS
(reservation determines amount of time the data packet needs the
medium)
• acknowledgement via CTS after SIFS by receiver (if ready to receive)
• sender can now send data at once, acknowledgement via ACK
• other stations store medium reservations (NAV) distributed via RTS and
CTS
76
Fragmentation
DIFS
RTS frag1 frag2
sender
SIFS SIFS SIFS
CTS SIFS ACK1 SIFS ACK2
receiver
NAV (RTS)
NAV (CTS)
NAV (frag1) DIFS
other NAV (ACK1) data
stations t
contention
77
802.11 - Point Coordination Function
t0 t1
SuperFrame
79
802.11 - PCF II
t2 t3 t4
PIFS SIFS
D3 D4 CFend
point
coordinator SIFS
U4
wireless
stations
stations‘ NAV
NAV contention free period contention t
period
80
Mobile Ad Hoc Networks (MANETs)
Networks formed by a collection of wireless mobile hosts
Without any pre-existing infrastructure or the aid of any
centralized administration
Are easy to deploy
Useful when infrastructure is absent, destroyed or
impractical
Network characteristics change over time
Routes between nodes may potentially contain multiple hops
Number of hosts in the network
Mobile Ad Hoc Networks (MANET)
Multi-hop wireless links
Data must be routed via intermediate nodes.
“every” node also needs to be a router
no default route available
B
A A
B
86
Design Goals of MANET Routing Protocols
1. Minimal control overhead
routing protocols should send min. no. of control messages needed for operation
size of control packets should be relatively small
2. Minimal processing overhead
lightweight protocol that requires a min of processing; extends the overall battery
lifetime.
3. Multihop routing capability
due to limited transmission range source & destination not in direct xmission
range of each other
4. Dynamic topology maintenance
routes break due to node movement or become unusable due to propagation
effects
5. Loop prevention
loops occur when some nodes along a path selects a next hop to the destination
which also consist a node that occurred earlier in the path
packets may traverse the path multiple times, hence be avoided
Properties of good MANET routing protocols
Must be distributed
Adaptive to frequent topology changes
Must be localized
since global state maintenance involves a huge state propagation
(control) overhead
Convergence should be quick
Loop free and free from stale routes
A B C D
E
88
Categorization of Ad-Hoc Routing Protocols
Proactive protocols
Table driven; traditional distributed shortest-path protocols
route is always available
Example: DSDV, OLSR, WRP
Reactive protocols
Determine route as and when needed
Example: DSR, AODV, TORA
Hybrid protocols
Adaptive; Combination of proactive and reactive protocols
Example : ZRP (zone routing protocol)
Destination-Sequenced Distance
Vector Protocol (DSDV)
Basic Routing Protocol
Based on Bellman ford routing algorithm with some
‘improvement’
Every node maintains a list of all destinations and number
of hops to each destination, in “routing table”
Each entry is marked with a sequence number
Periodically exchange tables with all neighbors to maintain
topology
Two ways to update neighbors:
Full dump
Incremental update
DSDV (Destination-Sequenced DV)
Each entry of the advertised data contains
destination address,
No. of hops required to reach the dst
the seq number of the information received regarding
that dst (the seq number is originated by the dst node and the dst
node id is part of the seq number)
MH8
MH2 MH6
MH7
MH1
MH1
Table 1 shows the forwarding table at node MH4.
MHi: address of each Mobile Host
SNNN_MHi: sequence number (where MHi specifies the
computer/node that created the sequence number
Next hop: the next hop node from MH4 to reach the dest.
Metric: distance of the dest.node from MH4
Install: install time for the entry, helps to determine
when to delete stale routes
Additionally the table contains a column for Flags and
pointers for stable data (not shown)
DSDV Example..
Route Table of MH4 MH4’s advertised table
(before MH1 moves)
Destination Next Metric Seq.No. Install Time Destination Metric Sequence No.
Hop
MH1 MH2 2 S406_ MH1 T001_MH4 MH1 2 S406_ MH1
98
Optimized Link State Routing (OLSR)
Proactive routing protocol
Optimizes the link state protocol
Reducing the number of links that are used for forwarding
the link state advertisements
The overhead of flooding link state information is
reduced by reducing the size of the control packets &
requiring fewer nodes to forward the information
A broadcast from node X is only forwarded by its
multipoint relays (MPRs)
Each node transmits its neighbor list in periodic beacons,
so that all nodes can know their 2-hop neighbors, in order
to choose the multipoint relays
99
OLSR: MPR
MPRs of given node X are its neighbors such that, each two
hop neighbor of given node is one-hop neighbor of at least
one multipoint relay of X.
The MPR set is selected such that when a node broadcasts a
message, the retransmission of that message by the MPR set
will ensure that the message is received by each of its two-
hop neighbors
Whenever a node broadcasts a message, only those neighbors
in its MPR set rebroadcast the message; Other neighbors that
are not in the MPR set process the message, but do not
rebroadcast it
OLSR:Multi Point Relay (MPR) Set
1. MPR(x) = φ
2. MPR(x) = {those nodes which belong to N1(x) and
which are the only neighbors of nodes in N2(x)
3. While there exists some node in N2(x) which is not
covered by MPR(x)
a) For each node in N1(x) which is not in MPR(x),
compute the maximum number of nodes that it covers
among the uncovered nodes in the set N2(x).
b) Add to MPR(x) the node belonging to N1(x) , for which
this number is maximum
Ni(x) = ith hop neighbor of x
B F J
A E H
C K
G
D
106
Dynamic Source Routing (DSR)
RREQ contains
source node id
destination node id
request id
(If the request id was seen earlier, nodes do not retransmit the RREQ )
107
Route Discovery in DSR
Y
Z
S E
F
B
C M L
J
A G
H D
K
I N
[S] Z
S E
F
B
C M L
J
A G
H D
K
I N
Z
S [S,E]
E
F
B
C M L
J
A [S,C] G
H D
K
I N
Z
S E
F [S,E,F]
B
C M L
J
A G
H D
[S,C,G] K
I N
Z
S E
F [S,E,F,J]
B
C M L
J
A G
H D
K
I [S,C,G,K] N
Z
S E
[S,E,F,J,M]
F
B
C M L
J
A G
H D
K
I N
Z
S RREP [S,E,F,J,D]
E
F
B
C M L
J
A G
H D
K
I N
DATA [S,E,F,J,D] Z
S E
F
B
C M L
J
A G
H D
K
I N
RERR [J-D] Z
S E
F
B
C M L
J
A G
H D
K
I N
117
Use of route caching
[S,E,F,J,D]
[E,F,J,D]
S E [F,J,D],[F,E,S]
F [J,F,E,S]
B
C [G,C,S] M L
J
A [C,S] G
H D
[K,G,C,S] K
I RREP N
RREQ
Z
When Z sends a route request for C, node K
sends back a route reply [Z,K,G,C] to Z
using a locally cached route
118
Route caching
Uses:
Finding alternate routes in case original route breaks
Route reply from intermediate nodes
Problems:
Cached routes may become invalid over time and due to host
mobility
Stale caches can adversely affect performance
119
DSR: Advantages
Routes maintained only between nodes who need to
communicate
reduces overhead of route maintenance
Route caching can further reduce route discovery overhead
A single route discovery may yield many routes to the
destination, due to intermediate nodes replying from local
caches
120
DSR: Disadvantages
Latency to discover a route before data can be sent
121
Ad Hoc On-Demand Distance Vector
Routing (AODV)
DSR includes source routes in packet headers
122
AODV
Route Requests (RREQ) are forwarded in a manner similar
to DSR
When a node re-broadcasts a Route Request, it sets up a
reverse path pointing towards the source (stores the info.
about the previous hop)
Route Reply (RREP) travels along the reverse path set-up
when Route Request is forwarded
Forward path is set up when RREP is received from the next
hop node.
123
Route Requests in AODV
Y
Z
S E
F
B
C M L
J
A G
H D
K
I N
Z
S E
F
B
C M L
J
A G
H D
K
I N
Z
S E
F
B
C M L
J
A G
H D
K
I N
Forward links are setup when RREP travels
along the reverse path
127
RREQ Message
When a node receives RREQ msg
It checks the RREQ, if it has not seen the RREQ before
(by checking <src addr, broadcast id>) and if it does not have
a routing entry for the dst addr with dst seq number >=
that carried in RREQ
It broadcasts the msg
sets up a reverse path to the previous hop neighbor
reverse paths have a timeout value
ACTIVE_ROUTE_TIMEOUT
If it has a fresh route to the dst then it unicasts RREP to
the prev. hop neighbor
otherwise the dst node receives the RREQ msg and
responds with a RREP msg
128
RREP message
RREP msg contains:
<source addr, dest addr, dest sequence #, hop cnt,
lifetime>
As RREP msg traverses back to the src, each intermediate node
sets up a forward path.
Nodes which are not along the path determined by RREP will
timeout after ACTIVE_ROUTE_TIMEOUT (3000msec)
Node receiving first RREP forwards it to its prev hop
If it receives further RREP, it updates its routing info and
forwards to prev hop, if RREP has a greater dest seq # or same
dest seq # but with smaller hop count.
source node can begin data transmission as soon as it receives
the first RREP and can later update routing info if it receives
better route
129
Some more details
Each entry of the routing table has a
ACTIVE_ROUTE_TIMEOUT which is reset each time
an entry is used for forwarding a packet
130
Broken links
When a link breaks, the node sends an unsolicited RREP
to all its active upstream neighbors with higher dest seq
# (1 greater than the current) and with infinity as hop
count
This RREP message ultimately reaches the source
If source (or any other intermediate node) wants to
discover a new route, it generates a new RREQ message
with a larger dest seq number.
131
Observations about AODV
The paper does not say why there is a broadcast id and a
source seq #
Perhaps source seq # is for a given dst addr (i.e., the same
source seq number can be used for two different dst addr).
Hence, having a separate broadcast id requires receiver of
RREQ msg to just look at two fields (source addr and broadcast
id). Otherwise, just source seq # (and no broadcast id) would
have sufficed.
132
AODV: Sequence numbers (dest seq #)
To avoid using old/broken routes
To determine which route is newer
To prevent formation of loops
A B C D
133
Source: Vaidya
AODV: Sequence numbers
Assume that A does not know about failure of link C-D
because RREP with higher dest seq # (say 11) is lost
Now C performs a route discovery for D (RREQ with a
higher dest seq # (12))
Node A receives the RREQ (say, via path C-E-A)
Node A will not reply since A’s dest seq number is smaller
than that carried in the RREQ from C.
This prevents a loop (C-E-A-B-C)
If dest seq # was not used, it is easy to see that A would reply
with its route to D and form the loop C-E-A-B-C
134
AODV: Expanding ring search
Each RREQ msg is broadcast to the entire network
For a large network this could be detrimental
To control the scope of broadcast, the src node should
use an expanding ring search technique
Route Requests are initially sent with small Time-to-Live
(TTL) field, to limit their propagation
DSR also includes a similar optimization
If no Route Reply is received, then larger TTL tried
135
AODV: Summary
Routes not included in packet headers
Nodes maintain routing tables containing entries only
for routes that are in active use
At most one next-hop per destination maintained at
each node
Sequence numbers are used to avoid old/broken
routes and prevent routing loops
136
AODV: Advantages & Disadvantages
Routes are established on demand and destination seq
no. is used to find the latest route to the detination.
The connection setup delay is less.
Disadv: Intermediate nodes can lead to inconsistent
routes, if the source seq no is very old and the
intermediate node have the higher, but not the latest dest
seq no, thereby having stale entries.
Multiple route reply packets in response to a single
request packet can lead to heavy control overhead
Periodic beaconing leads to unnecessary Bandwidth
consumption
Zone Routing Protocol (ZRP)
Hybrid protocol; proactive + reactive
Intra-zone routing: Pro-actively maintain state
information for links within a short distance from any
given node
Routes to nodes within short distance are thus maintained
proactively (using, say, link state or distance vector protocol)
Inter-zone routing: Uses a route discovery protocol for
determining routes to far away nodes
Route discovery is similar to DSR with the exception that
route requests are propagated via peripheral nodes
138
ZRP
139
ZRP
Each node maintains the information about routes to all
nodes within its routing zone by exchanging periodic
route updates
If source S and destination D are in the same zone, then
the packet is directly delivered to the destination (the
route is available in the routing database)
Otherwise, S bordercasts the RouteRequest packet to its
peripheral nodes (uses unicast routing to deliver packets
directly to the border nodes)
If any peripheral node finds D in its routing zone, it sends
RouteReply back to S indicating the path.
Otherwise, the node rebordercasts the RouteRequest packet to
its peripheral nodes.
140
ZRP example: Zone Radius = d = 2
S performs route
discovery for D
B
S
A C
D
E
F
142
LOCATION-AIDED ROUTING
Utilizes geographical coordinates to direct route request messages to the
previously known location of the destination
The coordinates (Xd,Yd) are also included with the route request.