Documente Academic
Documente Profesional
Documente Cultură
Networks
By.
P. Victer Paul
Dear,
We planned to share our eBooks and project/seminar contents
for free to all needed friends like u.. To get to know about more
free computerscience ebooks and technology advancements in
computer science. Please visit....
http://free-computerscience-ebooks.blogspot.com/
http://recent-computer-technology.blogspot.com/
http://computertechnologiesebooks.blogspot.com/
Infrastructure
(Wired line)
Radio tower
Desktop computer
Radio tower
Laptop computer
Pen computer
Ad-hoc Networks
• Infrastructurless (ad-hoc) network or
MANET (Mobile Ad-hoc NETwork)
PDA
PDA
Laptop computer
Laptop computer
Pen computer
Classification of Ad-hoc
Networks
– Single hop – – Multi hop – some nodes are far
nodes are in their and cannot communicate
reach area and directly. The traffic has to be
can communicate forwarded by other intermediate
nodes.
directly
Ad-hoc Networks
• Characteristics of an ad-hoc network
– Collection of mobile nodes forming a
temporary network
– Network topology changes frequently and
unpredictably
– No centralized administration or standard
support services
– Each host is an independent router
– Hosts use wireless RF transceivers as
network interface
– Number of nodes 10 to 100 or at most
1000
Ad-hoc Networks
• Why we need ad-hoc networks?
– Setting up of fixed access points and backbone
infrastructure is not always viable
• Infrastructure may not be present in a disaster area
or war zone
• Infrastructure may not be practical for short-range
radios; Bluetooth (range ~ 10m)
– Do not need backbone infrastructure support
• Are easy to deploy
• Useful when infrastructure is absent, destroyed or
impractical
Ad-hoc Networks
• Example applications of ad hoc networks:
– emergency search-and-rescue operations,
– meetings or conventions in which persons
wish to quickly share information,
– data acquisition operations in inhospitable
terrain,
– local area networks in the future.
Ad-hoc Networks
Mobile Ad Hoc Networking is a
multi-layer problem ! - Security
- Service Discovery
- Location-dependent
Application Layer Application
- TCP
- Quality of Service Transport Layer
- Routing
Network Layer - Addressing
- Location Management
Physical/Link Layer
- Power Control
- Multiuser Detection
- Channel Access
Problems with Routing
1 2
A B C
Dest. Next Metric … Dest. Next Metric … Dest. Next Metric …
A A 0 A A 1 A B 3
B B 1 B B 0 B B 2
C B 3 C C 2 C C 0
DSDV
Distance Vector Updates
B broadcasts the new routing
information to his neighbors
Routing table
is updated (A, 1) (A, 1)
(B, 0) (B, 0)
(C, 1) (C, 1)
1 1
A B C
Dest. Next Metric … Dest. Next Metric … Dest. Next Metric …
A A 0 A A 1 A B 3 2
B B 1 B B 0 B B 1
C B 3 2 C C 1 C C 0
DSDV
Distance
Vector – broadcasts to
update
New Node tables of C, B, A
with new entry for D
joins the
network (A, 1)
(B, 0)
(A, 2)
(B, 1)
(C, 1) (C, 0)
(D, 2) (D, 1) (D, 0)
1 1 1
A B C D
Dest. Next Metric … Dest. Next Metric … Dest. Next Metric …
A A 0 A A 1 A B 2
B B 1 B B 0 B B 1
C B 2 C C 1 C C 0
D B 3 D C 2 D D 1
DSDV
1 1 1
A B C D
Dest. Next Metric … Dest. Dest. Next Metric …
Next Metric …
… … … c … … …
D B 3 … … … D B
D
1
D C 2
DSDV
Distance Vector - Loops
(D, 2) (D, 2)
1 1 1
A B C D
Dest. Next Metric … Dest. Next Metric … Dest. Next Metric …
… … … … … … … … …
D B 3 D C 2 D B 3
DSDV
Distance vector - Count to Infinity
(D,5)
(D,4) (D,4)
(D,3)
(D,2) (D,2)
1 1 1
A B C D
Dest. Next Metric … Dest. Dest. Next Metric …
Next Metric …
… … … c … … …
D B 3, 5, … … … … D B 3, 5, …
D C 2, 4, 6…
DSDV
• Traditional Distance Vector are not
suited for ad-hoc networks!
– Loops
• Bandwidth reduction in network
• Unnecessary work for loop nodes
– Count to Infinity
• Very slow adaptation to topology
changes.
DSDV Tables
A B C
Dest. Next Metric Seq Dest. Next Metric Seq Dest. Next Metric Seq.
A A 0 A-550 A A 1 A-550 A B 1 A-550
B B 1 B-100 B B 0 B-100 B B 2 B-100
C B 2 C-588 C C 2 C-588 C C 0 C-588
DSDV
DSDV Route Advertisement
B increases Seq.Nr from 100 -> 102
B broadcasts routing information
to Neighbors A, C including
destination sequence numbers
(A, 1, A-550) (A, 1, A-550)
(B, 0, B-102) (B, 0, B-102)
(C, 1, C-588) (C, 1, C-588)
A B C
Dest. Next Metric Seq Dest. Next Metric Seq Dest. Next Metric Seq.
A A 0 A-550 A A 1 A-550 A B 2 A-550
B B 1 B-102 B B 0 B-102 B B 1 B-102
C B 2 C-588 C C 1 C-588 C C 0 C-588
DSDV
• DSDV Respond to topology changes
– Immediate advertisements
• Information on new routes, broken Links,
metric change is immediately propagated to
neighbors.
– Full/Incremental Update:
• Full Update: Send all routing information from
own table.
• Incremental Update: Send only entries that
has changed. (Make it fit into one single
packet)
DSDV
When new node joins the network
2. Insert entry for D with
sequence number D-000.
Then immediately broadcast
1. D broadcast for first time
own table.
Send Sequence number D-000.
(D, 0, D-000)
A B C D
Dest. Next Metric Seq. Dest. Next Metric Seq. Dest. Next Metric Seq.
A A 0 A-550 A A 1 A-550 A B 2 A-550
B B 1 B-102 B B 0 B-102 B B 1 B-102
C B 2 C-590 C C 1 C-590 C C 0 C-590
D D 1 D-000
DSDV
3. C increases its sequence
(New node (cont.) number to C-592 then
broadcasts its new table.
4. B gets this new
information and updates its
table…….
(A, 2, A-550) (A, 2, A-550)
(B, 1, B-102) (B, 1, B-102)
……… (C, 0, C-592) (C, 0, C-592)
……… (D, 1, D-000) (D, 1, D-000)
A B C D
Dest. Next Metric Seq. Dest. Next Metric Seq. Dest. Next Metric Seq.
A A 0 A-550 A A 1 A-550 A B 2 A-550
B B 1 B-102 B B 0 B-102 B B 1 B-102
C B 2 C-590 C C 1 C-592 C C 0 C-592
D C 2 D-000 D D 1 D-000
DSDV
No loops, no count
to infinity
2. B does its broadcast 1. Node C detects broken Link:
-> no affect on C (C knows that B has -> Increase Seq. Nr. by 1
stale information because C has higher (only case where not the
seq. number for destination D) destination sets the sequence
-> no loop -> no count to infinity number -> odd number)
1
A B C D
Dest. Next Metric Seq. Dest. Dest. Next Metric Seq.
Next Metric Seq.
… … … c … … …
D B 3 D-100 … … … D D D-101
D C 2 D-100
DSDV
Immediate Advertisement
3. Immediate 2. Immediate propagation
propagation C to B:
B to A: (update information has higher
(update information has Seq. Nr. -> replace table entry)
higher Seq. Nr. ->
1. Node C detects broken link:
replace table entry)
-> Increase Seq. Nr. by 1
(only case where not the
(D, , D-101) (D, , D-101) destination sets the sequence
number -> odd number)
A B C D
Dest. Next Metric Seq. Dest. Dest. Next Metric Seq.
Next Metric Seq.
… … … ... c … … …
D B 4 D-100
3 … … … ... D B
D 1 D-100
D B D-101 D C 3 D-100
2 D D D-101
D C D-101
DSDV
• Advantages
– Simple (almost like Distance Vector)
– Loop free through destination seq. numbers
– No latency caused by route discovery
• Disadvantages
– No sleeping nodes
– Bi-directional links required
– Overhead: most routing information never
used
– Scalability is a major problem
CGSR
• CSGR
(Clusterhead
Gateway Switch
Routing)
– Similar to DSDV
– Based on concept
of clusters and
cluster heads
– Routing is done
via the cluster
heads and
gateways
CGSR
• Problems with CGSR
– More time is spend in selection of cluster heads
and gateways
– Has a hierarchy.
– Distributed cluster selection algorithm is used to
select cluster head
• Cluster head is bottleneck.
• Least cluster change(LCC) algorithm- cluster
heads only change when two cluster heads
come into contact.
• Each node maintains
• cluster member table-stores destination cluster
head for each node, regularly braodcasted using
DSDV protocol
• Routing Table- next hop
• Updates are required for both tables
Wireless Routing Protocol (WRP)
• A path-finding algorithm
• Utilizes information regarding the length and the
predecessor-to-dest in the shortest path to each
destination
• Eliminates the “Count to Infinity” Problem and converges
faster
• An Update message is sent after processing updates
from neighbors or a change in link to a neighbor is
detected
• Each route update from neighbor k causes route entries
of other neighbors that use k to be re-computed
The Algorithm
Route cache
... 4
6
RREQ(1,5,{1,2})
RREQ(1,5,{1}) RREQ(1,5,{1,2})
2
Source
1 Route cache 3
...
Route cache
Route cache
... (3,5) > {3,6,5}
...
DSR
Routecache
... 4
6
RREP(5,1,{1,
2,4,5})
RREP(5,1,{
1,2,4,5}) RREP(3,1,{1,
2,3,6,5})
2
Sourc
e 1 Routecache 3
(2,1) > {2,1}
(2,4) > {2,4} Routecache
Routecache ...
(3,1) > {3,2,1}
(1,5) > {1,2,4,5},
(3,2) > {3,2}
{1,2,3,6,5}
(3,5) > {3,6,5}
...
...
DSR
• Route maintenance
– Whenever a node transmits a data packet, a
route reply or a route error, it must verify that
the next hop correctly receives the packet.
– If not, the node must send a route error to the
node responsible for generating this route
header.
– The source restarts the route discovery
DSR
• Advantages
– Do not exchange routing update periodically,
so overhead transmission is greatly reduced
– Can refer to cache for the new route when link
fails.
• Disadvantages
– Scalability problem: High route discovery
latency for large network.
– High mobility problem: although the packet
dropped may not be substantial, the overhead
traffic will increase a lot.
AODV
• Pure on-demand routing protocol
– A node does not perform route discovery or
maintenance until it needs a route to another node or
it offers its services as an intermediate node
– Nodes that are not on active paths do not maintain
routing information and do not participate in routing
table exchanges
• Uses a broadcast route discovery mechanism
• Uses hop-by-hop routing
– Routes are based on dynamic table entries
maintained at intermediate nodes
– Similar to Dynamic Source Routing (DSR), but DSR
uses source routing
AODV concepts
• Local HELLO messages are used to determine
local connectivity
– Can reduce response time to routing requests
– Can trigger updates when necessary
• Sequence numbers are assigned to routes and
routing table entries
– Used to supersede stale cached routing entries
• Every node maintains two counters
– Node sequence number
– Broadcast ID
AODV Route Request
• Initiated when a node wants to
communicate with another node, but does
not have a route to that node
• Source node broadcasts a route request
(RREQ) packet to its neighbors
type flags resvd hopcnt
broadcast_id
dest_addr
dest_sequence_#
source_addr
source_sequence_#
AODV Route Request
• Sequence numbers
– Source sequence indicates “freshness” of reverse route to the
source
– Destination sequence number indicates freshness of route to the
destination
• Every neighbor receives the RREQ and either …
– Returns a route reply (RREP) packet, or
– Forwards the RREQ to its neighbors
• (source_addr, broadcast_id) uniquely identifies the
RREQ
– broadcast_id is incremented for every RREQ packet sent
– Receivers can identify and discard duplicate RREQ packets
AODV Route Request
• If a node cannot respond to the RREQ
– The node increments the hop count
– The node saves information to implement a reverse
path set up (AODV assumes symmetrical links)
• Neighbor that sent this RREQ packet
• Destination IP address
• Source IP address
• Broadcast ID
• Source node’s sequence number
• Expiration time for reverse path entry (to enable garbage
collection)
AODV Example (1)
4
1 6
5 7
3
2
5 7
3
2
5 7
3
2
• Nodes 2 and 4 verify that this is a new RREQ
and that the source_sequence_# is not stale
with respect to the reverse route to Node 1
• Nodes 2 and 4 forward the RREQ
– Update source_sequence_# for Node 1
– Increment hop_cnt in the RREQ packet
4
1 6
5 7
3
2
5 7
3
2
5 7
3
2
5 7
3
2 Route Maintenance
AODV
5 7
3
2 7
• Route Accumulation :
– Provide reverse path from discovery node to
source node
– May employ global caching to reduce query
packet length
• Query Detection/Control :
– Intermediate nodes update a Detected Queries
Table[Query Source, ID]
• Route Maintenance may be reactive or proactive
STAR
• The approach used in the STAR protocol is
inbetween these two approaches.
• The idea is to maintain a source tree at each
node which connects the node to all the
destinations through loop-free tree branches.
• The aim is not to emphasize the determination of
shortest paths, rather find paths which are
reasonable with respect to some metric.
• This is called the Least Overhead Routing
Approach (LORA).
• DSDV uses the Optimum Routing Approach
(ORA) which requires frequent exchange of
routing table updates.
• In the LORA approach, route optimality is
sacrificed in favour of lower number of overhead
messages.
• In the STAR protocol, the LORA approach is
used and the exchange of source trees among
the nodes is infrequent. Also, a source tree is
much lighter compared to a routing table.
• In STAR, the topology of a network is modelled
as a directed graph G=(V,E), where V is the set
of nodes and E is the set of edges connecting
the nodes.
• A link level protocol is assumed that keeps track
of neighbourhood information through exchange
of hello messages.
• Each router maintains a source tree that is a tree
connecting the router to all destinations that are
known to the router.
• A router knows its adjacent links, i.e., the next-
hop neighbours in its source tree.
• A router also knows the source trees reported by
its neighbours.
• The collection of a router´s own source tree and
the source trees reported by its neighbours
forms a partial topology graph for the router
Maintaining source trees
• A router computes its source tree by running
Dijkstra´s shortest path algorithm on its partial
topology graph.
• A router updates its source tree whenever there
are significant changes in the partial topology
graph when a neighbour moves away (link
failure), or a neighbour communicates a new
source tree.
• The updates are done according to the order the
communications are received.
What Needs to be Communicated
• Link deletions need not be communicated as the
deletion of a link to reach a given destination is
implicit with the addition of a new link to reach
the same destination.
• The only case a router needs to explicitly inform
its neighbours about link deletion is when a
deletion causes the router to lose paths to one
or more destinations.
• The basic update unit used to communicate
changes to source trees is the link state update
(LSU).
Sequence Numbers
• When a router receives an LSU, it can determine
whether the LSU contains more recent link-state
information by comparing the sequence number
of the new LSU with the sequence number of
the link stored locally.
• Each router erases a link from its partial
topology graph if the link is not adjacent to the
router and is not present in the source trees
reported by any of its neighbours.
Exchanging Update Messages
• We only discuss how STAR protocol can be
implemented for supporting the Least
Overhead Routing Approach (LORA). It is
possible to implement STAR to support
Optimal Routing Approach (ORA).
• The LORA approach is more important
since it reduces overheads considerably.
• The ORA approach can be supported
simply by exchanging source trees
whenever a router detects a change in its
When to Exchange Update
Messages
• A router running STAR protocol to support
LORA reports updates to its source tree in
the event of :
– Unreachable destinations
– New destinations
– The possiblity of permanent routing loops
– Cost of paths exceeding a given threshold
New Destination
• Router i sends a source-tree update to its
neighbours when it finds a new destination
or any of its neighbours reports a new
destination.
• A router can learn about a new neighbour
through link level support and this triggers
a source-tree update.
• This update message is also necessary
when a node joins the network for the first
time.
• STAR performs ORA table driven based
routing to construct source trees
• LORA table driven routing can be used to
selectively perform updates.