Вы находитесь на странице: 1из 147

Wireless Mobile Networks

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

•Mobile Communications – J. Schiller, Pearson Education – Second Edition


•Wireless Communications and Networks – W. Stallings, Pearson Education
•Ad Hoc Wireless Networks: Architectures and Protocols - C. Siva Ram
Murthy and B. S. Manoj, Pearson Education

•Technical papers – references will be given later


Introduction
• What is different in wireless network?
– Media
– Bandwidth
– Signal strength (path loss and fading)
– Error rate
– MAC
– Mobility
– Security
Wireless networks
• Two types
– Voice network
• Cellular systems (GSM, CDMA etc.)
– Data network
• WiFi, WiMax, HiperLAN etc
• Networks are moving towards an integrated network
– GPRS, 3G/4G, VoLTE …
– Voice+data+video over WiFi
Physical Layer (PHY)
• Binary (digital) data transmitted over airwave
• Requires antenna
• characterized by transmission range, power,
modulation scheme, frequency range
MAC Layer
• How wireless stations share the air medium and
avoid contention to transmit data successfully
• “listen before you speak” or “speak at pre-
determined interval”
• Unique problems
– Hidden node
– Exposed node
Network Layer
• Responsible for facilitating multi-hop communication
• Need to run some routing protocol
• Traditional routing protocols may not work efficiently
• Mobility at IP layer
Transport Layer
• Reliable Transport such as TCP may not work well
in wireless medium
– TCP inherently assumes that packet loss is due to
congestion
– Needs modification for wireless network
802.16

120Mbps

Source: Matt Welsh, Harvard University

CC1000 : 300 – 1000 MHz, 78.6 kbps


WiFi Network
Basic Service Set

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 (4d ) 2 (4fd ) 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 (4d ) 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
4Ae
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

Ground wave propagation (< 2 MHz)


ionosphere

Signal propagation
receiver
transmitter
earth

sky wave propagation (2 - 30MHz)


Signal Propagation
– Line of Sight (> 30 MHz) : emitted waves follow a
straight line of sight
• allows straight communication with
satellites or microwave links on the ground
• used by mobile phone system, satellite
systems
Signal propagation
receiver
transmitter

earth

Line of Sight (LOS) propagation (> 30 MHz)


Propagation Models
• Reflection
• Diffraction
• Scattering
Reflection
• Occurs when electromagnetic wave incidents on an
object with a very large dimension compared to its
wavelength.

λ << 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.

• Inter Symbol Interference (ISI)


Effects of mobility

Channel characteristics change over time and location


 signal paths change
 different delay variations of different signal parts
 different phases of signal parts
 quick changes in the power received (short term fading)

Additional changes in long term


power
 distance to sender fading
 obstacles further away
 slow changes in the average power
received (long term fading)

t
short term fading
Multiplexing

Multiplexing in 4 dimensions channels ki


 space (si) k1 k2 k3 k4 k5 k6
 time (t)
 frequency (f) c
 code (c) t c
t
Goal: multiple use s1
f
of a shared medium s2
f
c
Important: guard spaces needed!
t

s3
f
Frequency multiplex

Separation of the whole spectrum into smaller frequency bands


A channel gets a certain band of the spectrum for the whole time
Advantages:
 no dynamic coordination
necessary
k1 k2 k3 k4 k5 k6
 works also for analog signals
c
f
Disadvantages:
 waste of bandwidth
if the traffic is
distributed unevenly
 inflexible
 guard spaces
t
Time multiplex

A channel gets the whole spectrum for a certain amount of time

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

Combination of both methods


A channel gets a certain frequency band for a certain amount of time
Example: GSM
Advantages:
 better protection against
tapping
 protection against frequency
k1 k2 k3 k4 k5 k6
selective interference
 higher data rates compared to c
code multiplex
f
but: precise coordination
required

t
Code multiplex

Each channel has a unique code


k1 k2 k3 k4 k5 k6
All channels use the same spectrum
at the same time
c
Advantages:
 bandwidth efficient
 no coordination and synchronization
necessary
 good protection against interference and
tapping f
Disadvantages:
 lower user data rates
 more complex signal regeneration
Implemented using spread spectrum t
technology
Power Density
Spread Spectrum
(dP/df) dP/df dP/df
spreading with interference
user signal

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

Direct communication within a limited


802.11 LAN
range
 Station (STA):
terminal with access mechanisms to
the wireless medium
STA1
 Independent Basic Service Set
IBSS1 STA3
(IBSS):
group of stations using the same
radio frequency
STA2

IBSS2

STA5

STA4 802.11 LAN


IEEE standard 802.11

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…

• Destination address does not equal destination location


• The media impacts the design
– wireless LANs intended to cover reasonable geographic
distances must be built from basic coverage blocks
• Impact of handling mobile (portable) stations
– Propagation effects
– Mobility management
– power management

48
Difference Between Wired
and Wireless
Ethernet LAN Wireless LAN
B
A B C
A C

• If both A and C sense the channel to be idle at


the same time, they send at the same time.
• Collision can be detected at sender in Ethernet.
49
Wireless PHY
– Medium has neither absolute nor readily
observable boundaries outside which stations are
unable to receive frames
– Are unprotected from outside signals and are
significantly less reliable than wired PHYs
– Have time varying and asymmetric propagation
properties
– Lack full connectivity
• the assumption that every station (STA)
can hear every other STA in invalid
50
Wireless MAC: Motivation
• Can we apply media access methods from fixed
networks?

• 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

– signal strength decreases inversely proportional to the


square of the distance
– sender would apply CS and CD, but the collisions
happen at the receiver
– sender may not “hear” the collision, i.e., CD does not
work
– CS might not work, e.g. if a terminal is “hidden”

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

• A first sends a Request-to-Send (RTS) to B


• On receiving RTS, B responds Clear-to-Send (CTS)
• Hidden node C overhears CTS and keeps quiet
– Transfer duration is included in both RTS and CTS
• Exposed node overhears a RTS but not the CTS
– D’s transmission cannot interfere at B

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)

– DCF with RTS/CTS (optional)


• minimizes hidden terminal problem
– PCF (optional)
• access point polls terminals according to a
list

60
802.11 - Carrier Sensing

• In IEEE 802.11, carrier sensing is performed


– at the air interface (physical carrier sensing), and
– at the MAC layer (virtual carrier sensing)
• Physical carrier sensing
– detects presence of other users by analyzing all
detected packets
– Detects activity in the channel via relative signal
strength from other sources

61
802.11 virtual carrier sensing

• Virtual carrier sensing is done by sending MPDU duration


information in the header of RTS/CTS and data frames

• Channel is busy if either mechanisms indicate it to be


– Duration field indicates the amount of time (in microseconds)
required to complete frame transmission
– Stations in the BSS use the information in the duration field to
adjust their network allocation vector (NAV)

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)

medium busy next frame

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

boe busy boe bor


station4

boe bor boe busy boe bor


station5
t

busy medium not idle (frame, ack etc.) boe elapsed backoff time

packet arrival at MAC bor residual backoff time

67
802.11 - Collision Avoidance

• Collision avoidance: Once channel becomes idle, the


node waits for a randomly chosen duration before
attempting to transmit
– When transmitting a packet, choose a backoff interval
in the range [0,CW]; CW is contention window
– Count down the backoff interval when medium is idle
– Count-down is suspended if medium becomes busy
– When backoff interval reaches 0, transmit RTS

68
DCF Example

B1 = 25 B1 = 5
wait data

data wait
B2 = 20 B2 = 15 B2 = 10

B1 and B2 are backoff intervals


cw = 31 at nodes 1 and 2

69
802.11 - Congestion Control

• Contention window (CW) in DCF: Congestion control


achieved by dynamically choosing CW

• large CW leads to larger backoff intervals


• small CW leads to larger number of collisions

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)

– Upon successful completion data transfer, restore CW


to CWmin

Session:3 Mobile Computing 71


802.11 - Priorities
• defined through different inter frame spaces – mandatory
idle time intervals between the transmission of frames
• SIFS (Short Inter Frame Spacing)
– highest priority, for ACK, CTS, polling response
– SIFSTime and SlotTime are fixed per PHY layer
– (10 s and 20 s respectively in DSSS)

72
802.11 – Priorities (contd.)

• PIFS (PCF IFS)


– medium priority, for time-bounded service using PCF
– PIFSTime = SIFSTime + SlotTime
• DIFS (DCF IFS)
– lowest priority, for asynchronous data service
– DCF-IFS (DIFS):
DIFSTime = SIFSTime + 2 x SlotTime

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

Session:3 Mobile Computing 78


802.11 - PCF I

t0 t1
SuperFrame

medium busy PIFS SIFS SIFS


D1 D2
point
coordinator SIFS SIFS
U1 U2
wireless
stations
stations‘ NAV
NAV

t0 = time when the superframe should have started


t1 = time when it actually started due to contention in the prev period

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

t2 = time when CFP actually finished


t3 = initial planned CFP (but PCF finished polling earlier than expected)

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

 Host movement frequent


 Topology change frequent
82
Why is Routing Different in MANET??
 Host mobility
 link failure/repair due to mobility may have different
characteristics than those due to other causes
 Rate of link failure/repair may be high when nodes move fast
 Dynamic topology
 link failure/repair due to mobility
 Distributed Environment
 Bandwidth constraint
 Energy constraint
Routing: Design Considerations
 Mobility
 Highly Dynamic Topology due to movement of nodes
 Ongoing sessions suffer frequent path breaks
 Even though wired network protocols find alternate paths when
a path breaks, the convergence is slow
 Bandwidth constraint
 Limited bandwidth imposes constraint on routing protocols to
maintain topological information
 Due to frequent changes in topology the control overhead of
keeping the topology current could be very high
Routing: Design Considerations
 Error prone shared broadcast radio channel
 Wireless links have time varying characteristics in terms of link
capacity and link error rate
 So routing protocol may need to interact with MAC layer to
find alternate routes through better quality links
 Energy constraint
 Limited battery power requires that the nodes do not spend too
much resources on routing overhead

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)

< destination IP address, destination sequence number,


hopcount >

 seq number generated by dst node is even number and


seq number generated for a distance of ∞ is odd number
91
DSDV Route Maintenance
 When a node receives new routing info
 It compares the seq number
 If it is newer (seq_no > than what is currently in the routing
table), it replaces the current info
 The metric for routes received in the routing info is
incremented by 1

 Newly recorded routes are marked for immediate


advertisement
 Routes which only got a more recent sequence number may
be scheduled for advertisement at a later time
DSDV: Route Maintenance
 When a link breaks (because of mobility)
 (may be detected by layer-2 or inferred by layer-3 when no broadcast
of routing table is received from the neighbor for a while)
 infinity (∞) is assigned as metric to that link
 any route for which the next hop node is the node which
gave rise to broken link is assigned ∞ as metric and a new
seq number
 (this is the only time when a node other than the destination
assigns sequence number)
 When a node receives infinity metric and it has a route with
higher sequence number of finite metric, then it triggers an
update to propagate the new route
93
DSDV Example
MH3
MH5
MH4

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

MH2 MH2 1 S128_ MH2 T001_MH4 MH2 1 S128_ MH2

MH3 MH2 2 S564_ MH3 T001_MH4 MH3 2 S564_ MH3

MH4 MH4 0 S710_ MH4 T001_MH4 MH4 0 S710_ MH4

MH5 MH6 2 S392_ MH5 T002_MH4 MH5 2 S392_ MH5

MH6 MH6 1 S076_ MH6 T001_MH4 MH6 1 S076_ MH6

MH7 MH6 2 S128_MH7 T002_MH4 MH7 2 S128_MH7

MH8 MH6 3 S050_MH8 T002_MH4 MH8 3 S050_MH8


DSDV Example...
Destinatio Next Metric Seq.No. Install Time Destinatio Metric Sequence No.
n Hop n
MH1 MH6 3 S516_ MH1 T810_MH4 MH4 0 S820_ MH4

MH2 MH2 1 S238_ MH2 T001_MH4 MH1 3 S516_ MH1

MH3 MH2 2 S674_ MH3 T001_MH4 MH2 1 S238_ MH2

MH4 MH4 0 S820_ MH4 T001_MH4 MH3 2 S674_ MH3

MH5 MH6 2 S502_ MH5 T002_MH4 MH5 2 S502_ MH5

MH6 MH6 1 S186_ MH6 T001_MH4 MH6 1 S186_ MH6

MH7 MH6 2 S238_MH7 T002_MH4 MH7 2 S238_MH7

MH8 MH6 3 S160_MH8 T002_MH4 MH8 3 S160_MH8

Routing table at MH4 (after MH1 moves) MH4’s advertised table


(updated)
DSDV: Advantages/ Disadvantages
 Routes available to all destinations
 Less latency in route set up
 Updates are propagated throughout the network
 Updates due to broken link (due to mobility) can lead to heavy
control traffic
 Even a small network with high mobility or large network with
low mobility can choke the network
 In order to get information about a particular destination
node, a node has to wait for a table update msg initiated by
the same destination node
 This delay would result in stale routing information

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

101 Session: 5 Mobile Computing


Optimized Link State Routing (OLSR)
 Nodes C and E are multipoint relays of node A
 Nodes C and E forward information received from A

B F J

A E H
C K
G
D

Node that has broadcast state information from A


102 Session: 5 Mobile Computing
OLSR:
 For exchanging link state routing information, a node only
lists its connections to those neighbors that have selected it as
an MPR. That set of neighbors is termed the MPR Selectors.
 Advatages / Disadvantages
 Since each node maintains a route to every other node in the
network, path setup delay is low
 By reducing the size of the control packets the control overhead
is reduced and by reducing the number of links that are used for
forwarding, the link advertisements are limited
 Processing at nodes to compute the MPR algorithm consumes
more memory and processing power
Dynamic Source Routing (DSR)
 Reactive routing protocol, routes are discovered when
required
 DSR is a source routing protocol;
 Source routing: entire path to destination supplied by source in
packet header
 Utilizes extension header following standard IP header to carry
protocol information (route to destination, etc.)
 instead of being forwarded hop by hop, data packets contain
strict source routes that specify each node along the path to
the destination.
DSR Protocol Activities
 Route discovery
 Undertaken when source needs a route to a
destination
 Route maintenance
 Detect network topology changes
 Used when link breaks, rendering specified path
unusable
 Routing
Dynamic Source Routing (DSR)
 Source S initiates a route discovery by flooding Route Request
(RREQ)
 Each node appends its own identifier while forwarding RREQ
 Destination D on receiving the first RREQ, sends a Route
Reply (RREP)
 RREP sent on route obtained by reversing the route appended in
RREQ (RREP is source routed)
 RREP includes the route from S to D, on which RREQ was
received by D
 Destination D replies to other RREQ messages received from
the same source (provides S with multiple paths)
 S routes data using “source route” mechanism

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

Represents a node that has received RREQ for D from S


108
Source: Vaidya
Route Discovery in DSR
Y
Broadcast transmission

[S] Z
S E
F
B
C M L
J
A G
H D
K
I N

Represents transmission of RREQ


[X,Y] Represents list of identifiers appended to RREQ
109
Route Discovery in DSR
Y

Z
S [S,E]
E
F
B
C M L
J
A [S,C] G
H D
K
I N

• Node H receives packet RREQ from two neighbors:


potential for collision
110
Route Discovery in DSR
Y

Z
S E
F [S,E,F]
B
C M L
J
A G
H D
[S,C,G] K
I N

• Node C receives RREQ from G and H, but does not forward


it again, because node C has already forwarded RREQ once
(request id field of RREQ is useful here)
111
Route Discovery in DSR
Y

Z
S E
F [S,E,F,J]
B
C M L
J
A G
H D
K
I [S,C,G,K] N

• Nodes J and K both broadcast RREQ to node D


• Since nodes J and K are hidden from each other, their
transmissions may collide
112
Route Discovery in DSR
Y

Z
S E
[S,E,F,J,M]
F
B
C M L
J
A G
H D
K
I N

• Node D does not forward RREQ, because node D


is the intended target of the route discovery
113
Route Reply in DSR
Y

Z
S RREP [S,E,F,J,D]
E
F
B
C M L
J
A G
H D
K
I N

Represents RREP control message


114
Data Delivery in DSR
Y

DATA [S,E,F,J,D] Z
S E
F
B
C M L
J
A G
H D
K
I N

Packet header size grows with route length


115 Session: 5 Mobile Computing
Route Error (RERR)
Y

RERR [J-D] Z
S E
F
B
C M L
J
A G
H D
K
I N

J sends a route error to S along route J-F-E-S when its


attempt to forward the data packet S (with route SEFJD) on J-
D fails (an ACK mechanism has to be there in packet
forwarding)
116
DSR: Route caching
 Each node caches a new route it learns by any means
 When node S finds route [S,E,F,J,D] to node D, node S also
learns route [S,E,F] to node F
 When node K receives Route Request [S,C,G] destined for node
D, node K learns route [K,G,C,S] to node S
 When node F forwards Route Reply RREP [S,E,F,J,D], node F
learns route [F,J,D] to node D
 When node E forwards Data [S,E,F,J,D] it learns route [E,F,J,D]
to node D
 A node may also overhear Data to learn routes

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

 Packet header size grows with route length due to source


routing
 Flood of route requests may potentially reach all nodes in the
network
 An intermediate node may send Route Reply using a stale
cached route, thus polluting other caches

121
Ad Hoc On-Demand Distance Vector
Routing (AODV)
 DSR includes source routes in packet headers

 Resulting large headers can sometimes degrade performance


 particularly when data contents of a packet are small

 AODV attempts to improve on DSR by maintaining routing


tables at the intermediate nodes, so that data packets do not
have to contain routes

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

Represents a node that has received RREQ for D from S


124
Reverse Path Setup in AODV
Y

Z
S E
F
B
C M L
J
A G
H D
K
I N

Represents links on Reverse Path


125
Forward Path Setup in AODV
Y

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

Represents a link on the forward path


126
AODV Details
 RREQ contains:
 <source addr, source sequence #, broadcast
id, dest addr, dest sequence #, hop count>

 (source addr, broadcast id) uniquely identifies the RREQ msg


 source seq # used to maintain freshness info about the
reverse route to the source
 dest seq # helps to have fresh route (forward path) to the
destination
 broadcast id is incremented whenever source generates a new
RREQ msg.

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

 “Hello” messages are exchanged between neighbors to


detect connectivity

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

 All nodes within hop distance at most d from a node X


are said to be in the routing zone of node X

 All nodes at hop distance exactly d are said to be


peripheral nodes of node X’s routing zone

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

E knows route from E to D,


so route request need not be
Denotes route request forwarded to D from E
141
ZRP
 Advantages
 Combines the best features of proactive and reactive
routing schemes
 Disadvantages
 When there are overlaps in the nodes’ routing zones,
there may be redundant RouteRequests sent out.
These need to be suppressed
 Choosing zone radius is quite tricky

142
LOCATION-AIDED ROUTING
 Utilizes geographical coordinates to direct route request messages to the
previously known location of the destination

 The protocol defines two areas


Expected zone: area in which the destination is most likely to be
discovered
Request zone: is the area in which the route request for the destination
should propagate

 Using location information, it attempt to reduce the number of nodes to


whom route request is propagated
Fig. expected zone.

Fig. Request zone


LAR SCHEME 1
LAR SCHEME 2
 Node S calculates its distance from location (Xd, Yd), denoted as DISTs, and
includes this distance with the route request message.

 The coordinates (Xd,Yd) are also included with the route request.

 if (DISTs)+  > DISTi,


then node i forwards the request to its neighbors.
else i discards the route request.
LAR SCHEME II
LAR Continued..
 The size of the request zone is a trade-off between control overhead
and probability of finding the destination

 Trade-off between latency of route determination and the message


overhead

 RREQ is prevented from flooding the entire network


 Results in a reduction in both bandwidth and processing overhead.

Вам также может понравиться