Development of Complex Curricula for Molecular Bionics and Infobionics Programs within a consortial* framework**
Consortium leader
PETER PAZMANY CATHOLIC UNIVERSITY
Consortium members
SEMMELWEIS UNIVERSITY, DIALOG CAMPUS PUBLISHER
The Project has been realised with the support of the European Union and has been co-financed by the European Social Fund ***
**Molekuláris bionika és Infobionika Szakok tananyagának komplex fejlesztése konzorciumi keretben
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 2
Ad hoc Sensor Networks
Routing protocols
Érzékelő mobilhálózatok
Útvonal választási protokollok
Dr. Levendovszky János
Lecture 6 review
• The goal of medium access control
• Types of wireless networks
• Duplexing techniques
• Multiple Access
• Random Access
• MAC for Wireless Sensor Networks
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 4
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 4
Outline
• Network layer functions
• Routing algorithm requirements and strategies
• Network of networks: Internet
• Routing in traditional networking technologies (Dijkstra, Belman- Ford routing algorithm)
• Routing in Mobile Ad Hoc Networks
• Routing as a quadratic optimization problem
Layered Communication Approaches
3. Network layer: it responsible for all of the aspects of end-to-end (e2e) packet delivery, including routing packets from the source to the destination.
– Challenges: unreliable wireless links (but reliable communication is needed), node mobility (dynamic behaviour), energy awareness, etc.
– Route state dissemination: proactive and reactive or hybrid routing protocols.
– Topology: Single-hop, Multi-hop flat, clustered, multilevel hierarchical networks.
– Multipath routing: reduces the fault tolerance of a routing protocol and it provides better load balancing in the
network. Physical
Data link Network Transport Middleware
Application
Recall from Chapter 1
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 6 2011.11.27.
Network layer protocols
TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 6
Routing Algorithm Requirements
• Correctness
• Simplicity
• Robustness: the ability of the network to deliver packets via some route in the face of localized failures and overloads.
• Stability: it does not “over react” to network changes.
• Fairness: as related to all other users.
• Optimality: as related to some criterion.
• Efficiency: as related to processing overhead.
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 8
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 8
Elements of Routing Techniques
• Performance Criteria
– Number of hops, cost, delay, throughput.
• Decision Time
– Virtual Circuit--at connection establishment.
– Datagram--before packet is placed in outgoing buffer.
• Decision Place
– Each node, central node, originating node.
• Network Information Source
– None, local, adjacent nodes, nodes along the route, or all nodes.
• Network Information Update Timing
– Continuous, periodic, major load change, topology change.
Routing strategies
• Fixed Routing
− A route is selected for each source-destination pair of nodes.
− A central routing directory can then be distributed to the various nodes.
− Routes are not changed unless topology changes.
− Simple (advantage) but inflexible (disadvantage.)
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 10
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 10
Routing strategies (cont’)
• Flooding
A packet is sent out on every outgoing link except the link that it arrived on.− Duplicates must be discarded.
− Hop counter could be used.
− Very robust (advantage.) but high traffic loads are generated (disadvantage.)
Routing strategies (cont’)
• Random Routing
− Simplicity of flooding with much less load.
− Node selects one outgoing path for retransmission of incoming packet.
− An outgoing link is selected at random (based on a probability distribution.)
− Requires no use of network information (advantage.)
− Actual route will not be least-cost or minimum-hop route (disadvantage.)
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 12
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 12
Routing strategies (cont’)
• Adaptive Routing
− These algorithms react to changing conditions of the network, for example failures and congestion.
− Advantages--can improve performance and aid in congestion control.
− Disadvantages--complex, requires extra "overhead" traffic to collect information, and may react too quickly (unstable.)
− Schemes can be characterized by
• Source of Network Information
• Distributed or Centralized Control
Network of netwoks: Internet
• 1957: USSR launched Sputnik; US DoD formed Advanced Research Projects Agency (ARPA)
• 1961: First paper by Len Kleinrock on packet switching theory
• 1964: Paul Baran from RAND on design of packet switching networks
• 1965-1968: ARPANET plan: 3 independent implementation
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 14
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 14
Network of netwoks: Internet (cont’)
• 1969: ARPANET commissioned: 4 nodes, 50kbps
Network of netwoks: Internet (cont’)
• 1970: ALOHAnet, the first packet radio network, developed by Norman Abramson, Univ of Hawaii, becomes operational
• 1973: Bob Kahn poses the Internet problem---how to connect ARPANET, packet radio network, and satellite network
• 1974: Vint Cerf, Bob Kahn publish initial design of TCP (NCP) to connect multiple networks 1978: TCP (NCP) split to TCP/IP, 1983: TCP (NCP) converted to TCP/IP (Jan. 1)
• 1981: BITNET (Because It’s Time NETwork) between CUNY and Yale
• 1986: NSF builds NSFNET as backbone, links 6 supercomputer centers, 56 kbps; this allows an explosion of connections, especially from universities
• 1987: 10,000 hosts
• 1988: NSFNET backbone upgrades to 1.5Mbps
• 1989: 100,000 hosts
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 16
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 16
Network of netwoks: Internet (cont’)
• 1990: ARPANET ceases to exist
• 1991: NSF lifts restrictions on the commercial use of the Net; Berners-Lee of European Organization for Nuclear Research (CERN) released World Wide Web
• 1992: 1 million hosts (RFC 1300: Remembrances of Things Past)
• 1994: NSF reverts back to research network (vBNS); the backbone of the Internet consists of multiple private backbones
• Today: backbones run at 10 Gbps, some updated to 40 Gbps, ~625 mil.
computers in 150 countries
Internet Physical Infrastructure
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 18
Summary of current wireless systems (cont’)
2011.11.27. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 18
Recall from Chapter 1
Graph theoretic approach of routing algorithm
• Point to point routing algorithms (Unicast)
− Dijkstras algorithm (greedy algorithm)
− Bellman-ford algorithm (distributed algorithm)
• Shortest path routing (Least cost algorithm)
− What is a shortest path? Minimum number of hops? Minimum distance?
− There is a weight associated with each link: weight can be a measure of congestion in the link, propagation delay etc.
− Weight of a path is the sum of weight of all links
− Shortest path is the minimum weight path
• Point to multipoint routing (Multicast)
− Flloyd-Warshall algorithm (dynamic programming)
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 20
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 20
Routing in traditional networking technologies
• Given: G{(V,E,d)}, where
− V denotes the vertices,
− E denotes the edges (links between two vertices),
− d denotes the link metrics associated with the edges, it can be additíve (e.g, distance, logCLP, MCD) or bottleneck (e.g. Bandwith, or available energy)
• A path is the sequence of edges leading from a given vertex (source) to another given vertex (destination):
• The optimal path
− in case of additive link metrics:
− in case of bottleneck type link metrics:
( ) ( ) ( )
{ , , , , , , }
i→k
i j j n m k
ℜ = …
opt ( )
,
: min ab
a b ℜ ∈ℜd
ℜ
∑
opt ( )
: max min, ab
a b d
ℜ ∈ℜ
ℜ
Dijkstra’s algorithm
• Goal: find the shortest paths from given source node s to all other nodes by developing paths in order of increasing path length
• The algorithm runs in stages (next slide) each time adding node with next shortest path
• The algorithm terminates when all nodes are processed by
algorithm (in set T)
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 22
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 22
Dijkstra’s algorithm (cont’)
STEP 1: initialization
− T = {s} Set of nodes so far incorporated
− L(n) = w(s, n) for n ≠ s
− initial path costs to neighboring nodes are simply link costs
STEP 2: get next node
− find neighboring node not in T with least-cost path from s
− incorporate node into T
− also incorporate the edge that is incident on that node and a node in T that contributes to the path
STEP 3: update least-cost paths
− L(n) = min[L(n), L(x) + w(x, n)] for all n
∉
T− If latter term is minimum, path from s to n is path from s to x concatenated with edge from x to n
Dijkstra’s algorithm: an example
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 24
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 24
Dijkstra’s algorithm: an example (cont’)
Iter T L(2) Path L(3) Path L(4) Path L(5) Path L(6) Path
1 {1} 2 1–2 5 1-3 1 1–4 ∞ - ∞ -
2 {1,4} 2 1–2 4 1-4-
3
1 1–4 2 1-4–5 ∞ -
3 {1, 2, 4} 2 1–2 4 1-4-
3
1 1–4 2 1-4–5 ∞ -
4 {1, 2, 4, 5}
2 1–2 3 1-4-
5–3
1 1–4 2 1-4–5 4 1-4-5–
6 5 {1, 2, 3,
4, 5}
2 1–2 3 1-4-
5–3
1 1–4 2 1-4–5 4 1-4-5–
6 6 {1, 2, 3,
4, 5, 6}
2 1-2 3 1-4-
5-3
1 1-4 2 1-4–5 4 1-4-5-6
Bellman-Ford algorithm
• Goal: find the shortest paths from given node subject to constraint that paths contain at most one link
• find the shortest paths with a constraint of paths of at most two links
• and so on
• The Bellman optimality criterion: let us assume that we have found an optimal from i to k via j
"
'
r r
r
i j k
• • •
then if r is optimal then r’ and r” are
also optimal
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 26
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 26
Bellman-Ford algorithm (cont’)
STEP 1: initialization
− L0(n) =∞, for all n≠ s
− Lh(s) = 0, for all h
STEP 2: update
− for each successive h ≥ 0
− for each n ≠ s, compute: Lh+1(n)=minj[Lh(j)+w(j,n)]
− connect n with predecessor node j that gives min
− eliminate any connection of n with different predecessor node formed during an earlier iteration
− path from s to n terminates with link from j to n
Bellman-Ford algorithm (cont’)
• Distributed operation:
− Flooding the network with HELLO packets to discover its topology
− Sending ECHO packets to obtain link state information (e.g. by measuring the round-trip delay)
− Setting up the routing table according to Bellman-Ford algorithm
Adress Neighbouring node
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 28
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 28
Bellman-Ford algorithm: an example
Bellman-Ford algorithm: an example (cont’)
h Lh(2) Path Lh(3) Path Lh(4) Path Lh(5) Path Lh(6) Path
0 ∞ - ∞ - ∞ - ∞ - ∞ -
1 2 1-2 5 1-3 1 1-4 ∞ - ∞ -
2 2 1-2 4 1-4-3 1 1-4 2 1-4-5 10 1-3-6
3 2 1-2 3 1-4-5-3 1 1-4 2 1-4-5 4 1-4-5-6
4 2 1-2 3 1-4-5-3 1 1-4 2 1-4-5 4 1-4-5-6
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 30
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 30
Comparison
• Bellman-Ford:
− calculation for node n needs link cost to neighbouring nodes plus total cost to each neighbour from s
− each node can maintain set of costs and paths for every other node
− can exchange information with direct neighbors
− can update costs and paths based on information from neighbors and knowledge of link costs
• Dijstra:
− each node needs complete topology
− must know link costs of all links in network
− must exchange information with all other nodes
Asynchronous Bellman-Ford algorithm
• No notion of global iterations
− each node updates at its own pace
• Asynchronously each node i computes
using last received value dij from neighbor j.
• Asyncrhonously node j sends its estimate to its neighbor i:
− there is an upper bound on the delay of estimate packets (no worry for out of order)
min
( )(
i)
i j N i ij j
d =
∈d + d
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 32
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 32
Asynchronous Bellman-Ford: an example
A
E D
C B
7
8 10
2 1
2
dE
Distance table
from neighbours Computation E’s distance table
A B D A B D
A 0 7 ∞ 10 15 ∞ A:10
B 7 0 ∞ 17 8 ∞ B:8
C ∞ 1 2 ∞ 9 4 C:4
D ∞ ∞ 0 ∞ ∞ 2 D:2
Below is just one step!
The protocol repeats forever!
10 8 2
distance table E sends to its neighbours
Asynchronous Bellman-Ford (cont’)
• Distributed: each node communicates its routing table to its directly-attached neighbors
• Iterative: continues periodically or when link changes, e.g. detects a link failure
• Asynchronous: nodes need not exchange info/iterate in lock step!
• Convergence in finite steps, independent of initial condition if network is connected
• Propagate properties (counting-to-infinity)
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 34
This is called the counting-to-infinity
problem
TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 34
Asynchronous Bellman-Ford (cont’)
• Good news propagate fast
• Bad news propagate slowly
• a set of mobile hosts, each with a transceiver
• no base stations; no fixed network infrastructure
• multi-hop communication
• needs a routing protocol which can handle changing topology
Mobile Ad Hoc Networks (MANET)
Édouard Manet
23 January 1832 – 30 April 1883
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 36
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 36
Single-hop vs. Multi-hop communication
Single-hop ad hoc Multi-hop ad hoc
Single-hop vs. Multi-hop communication (cont’)
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 38
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 38
MANET typical applications
• Personal area networking
− cell phone, laptop, ear phone, wrist watch
• Military environments
− soldiers, tanks, planes
• Civilian environments
− car network
• meeting rooms
− sports stadiums
− boats, small aircraft
• Emergency operations
− search-and-rescue
− policing and fire fighting
• (See more in Chapter 11)
MANET characteristics and challenges
• Characteristics and requirements:
− Distributed operation
− Dynamic network topology
− Fluctuating link capacity
− Low-power devices
• Challenges:
− Broadcast nature of the wireless medium (Hidden terminal problem)
− Packet losses due to transmission errors
− Mobility-induced route changes and packet losses
− Battery constraints
− Potentially frequent network partitions
− Ease of snooping on wireless transmissions (security hazard)
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 40
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 40
MANET routing protocols
Table Driven Routing Protocols
• Proactive protocols
• Continuously evaluate the routes
• Attempt to maintain consistent, up-to-date routing information (when a route is needed, one may be ready immediately)
• When the network topology changes: the protocol responds by propagating updates throughout the network to maintain a consistent view
• Example: DSDV(Destination Sequence Distance Vector)
− C.E. Perkins and P. Bhagwat, “Highly dynamic destination-sequenced distance-vector routing (DSDV) for mobile computers,” ACM SIGCOMM Computer Communication Review, vol. 24, 1994, pp. 234–244.
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 42
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 42
Table Driven Routing Protocols : DSDV
• Based on the Bellman-Ford algorithm
• Each node keeps a routing table to all other nodes based on next- hop routing
• Path discovery through packet caching and header examination.
• Entries have a sequence number.
• Incremental updates possible.
Comparision of Table-Driven Routing Protocols
Parameters DSDV CGSR WRP
Route Complexity O(x = N) O(x = N) O(x = N)
Route Philosophy Flat Hierarchical Flat
Loop Free Yes Yes Yes
Multicast Capability No No No
Required Tables 2 2 4
Freq Of Updated Transmission Periodically and as needed
Periodically Periodically and as needed Updates Transmitted to Neighbors Neighbors and cluster heads Neighbors
Utilize Seq. No / Hello Packets Yes/No Yes/No Yes/Yes
Critical Nodes No Yes(cluster head) No
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 44
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 44
On Demand Routing Protocols
• Reactive protocols
• On-demand style: create routes only when it is desired by the source node
− route discovery: invoke a route-determination procedure
− the procedure is terminated when 1. a route has been found
2. no route is found after all route permutations are examined
• longer delay: sometimes a route may not be ready for use immediately when data packets come
• Example AODV
− C.E. Perkins, E. Belding-Royer, and S. Das, “Ad hoc On-demand Distance Vector (AODV),” Request For Comments (RFC), vol. 3561, 2003.
Comparision of On Demand Routing Protocols
Performance Parameters AODV DSR TORA ABR
Communication Complexity
O(2N) O(2N) O(2N) O(N+y)
Routing / Loop Free Flat / Yes Flat / Yes Flat / Yes Flat / Yes
Multicast Capability Yes No No No
Beaconing Requirements No No No Yes
Multiple Route Possibilities
No Yes Yes No
Route Reconfiguration Erase Route, Notify Source
Erase Route, Notify Source
Link reversal, route repair
Localized broadcast
query Route Maintained in Route table Route cache Route table Route table Routing Metric Fresh and Shortest Shortest Associativity
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 46
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 46
Table Driven vs. On Demand Routing Protocol
Parameters On Demand Table Driven
Availability of Routing Information
Available when needed Always available regardless of need
Routing Philosophy Flat Mostly Flat
Periodic route updates Not Required Yes
Coping with Mobility Using Localized route discovery in ABR
Inform other nodes to achieve consistent routing
tables
Signaling Traffic Generated
Grows with increasing mobility of active nodes
Greater than that of On Demand Routing
QoS Support Few Can Support QoS Mainly Shortest Path as QoS Metric
Routing as a quadratic optimization problem
- Random flow of packets, - Congestions
- Random delays - High utilization
- Given cell loss rate
- Given end-to-end delays (real-time)
??
Analogic optimization algorithms to enforce QoS communication possibly
implemented on analogic computers
Objectives:
Develop traffic management algorithms which can be implemented on analogic computing architectures (i.e., try to reduce routing and switching problems to quadratic optimization).
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 48
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 48
Routing as a quadratic optimization problem (cont’)
• Technological motivation: Even though BF algorithm is running in polynomial time it is slow on present work station, thus substitute it with analogic computations.
• Scientific motivation: Try to provide efficient, suboptimal solutions to NP hard routing problems, such as routing with incomplete information.
• Proposed solution:
Analogic computers
real-time optimization of quadratic forms over a binary space
Routing as a quadratic optimization problem (cont’)
QoS routing
Representation
Quadratic programing
Binary data structure
Algorithm Analogic
computing (HN, CNN)
Binary representation of the optimal path De-representation
Optimal path which
opt { }
1,1
: min 2
∈ − N T − T
y
y y Wy b y
( ) ( )
1
1 sgn
N
l lj j l
i
y k W y k b
=
+ = − −
∑
modN
l = k
Recall from DSP course
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 50
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 50
Binary representation
a
b c
d
e f ( )
0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
G
a b c d e f
=
V
nodes
time
Recall from DSP course
Quadratic programming
• dij is the additive routing measure between node i and node j
• The goal function with constraint of permutation matix (for valid solution):
1
opt 1 , , 1, 2 , , 3 , ,
1 , ,
2 2 2
4 , , 5 , , 6 ,
: min
1 1
k
n i i j n j i n j n n i n j
i j n i j j i n i j j i n
i j i j i j i j i j
i j i j i j
V d V V V V V
V S V E V k
α α α
α α α
−
= + ≠ ≠
+ + +
− + − + −
∑∑∑ ∑ ∑ ∑ ∑ ∑ ∑
∑∑ ∑∑ ∑∑
V V
1 2
nN m nm
V = y
++
{ }1,1 2
min 2
N
T T
∈ − −
y
y Wy b y
2
1
( 1) sgn ( )
N
l lj j l
j
y k W y k b
=
+ = − −
∑
k l = modN
Complexity ≈ O N( 4)
Recall from DSP course
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 52
2011.11.27.. TÁMOP – 4.1.2-08/2/A/KMR-2009-0006 52
Performance analysis
Performace of methods
0.394212381
0.969142857 0.923021667 0.9698
0 0.2 0.4 0.6 0.8 1 1.2
Hopfield - complete - normal - without
noise
Hopfield - complete - with noise
CNN - complete - normal - without
noise
CNN - complete - normal - with noise
Belmann-Ford
method
( , )
( , ) ( , )
method
( , )
( , ) ( , )
( )
u v
b V f V u v R b f
u v
b V f V u v R b f
d
G d
η ∈ ∈ ∈
∈ ∈ ∈
=
∑ ∑ ∑
∑ ∑ ∑
Summary
• The routing protocols belong to the network layer.
• Ultimate objectives: getting connected to the Internet (the last miles in wireless) .
• There four different routing strategies (fixed, flooding, random, adaptive).
• Unicast routing has traditional polynomial-time algorithms (Dijkstra, Bellman- Ford).
• Multihop communications in Mobil Ad Hoc Networks poses several challenges (mobility, QoS, hidden terminal problem, etc.).
• Two approaches for MANET routing (Table Driven and On Demand routing).
• In the case of random metrics due to incomplete information, routing becomes NP hard but by using quadratic programming (HNN and CNN) it can be run in polynimial time.