um-olsr olsr routing protocol in ns2 郭祐暢 695430044

22
UM-OLSR OLSR routing protocol in NS2 郭郭郭 695430044

Post on 20-Dec-2015

237 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

UM-OLSROLSR routing protocol in NS2

郭祐暢695430044

Page 2: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

Outline

Brief overview of OLSR MPR selection algorithm UM-OLSR install Example UM-OLSR code

Page 3: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

Classification

Table drivenSource-Initiated

On demand

DSDV

CGSR

OLSR TBRPF

AODV DSR LMR

TORA

ABR

SSR

Ad Hoc RoutingProtocols

proactive reactive

Page 4: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

Optimized Link State Routing Protocol

Proactive & Table-driven Link State Routing

Each node expands a spanning tree Each node can obtain the whole network topology

Utilizes a technique to reduce message flooding MultiPoint Relaying (MPR)

Page 5: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

Optimized Link State Routing Protocol Each node periodically floods

status of its links Each node re-broadcasts link state

information received from its neighbors

Each node keeps track of link state information received from other nodes

Each node uses above information to determine next hope to each destination

24 retransmissions to diffuse a message up to 3 hops

Retransmission node

Page 6: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

Optimized Link State Routing Protocol Only selected neighbors (MultiPoint

Relays, MPRs) retransmit messages

Select MPRs such that they cover all 2hop neighbors

2-hop neighbors taken from neighbors' HELLO messages

11 retransmission to diffuse a message up to 3 hops

Retransmission node - MPR

Page 7: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

Optimized Link State Routing Protocol Three main modules

Neighbor/link sensing Provide topology information up to two hops MPR selector information notification

(“A select B as A’s MPR” in HELLO message to B) Optimized flooding/forwarding

MPR set to cover all the two hop neighbors MPR selector set: set of nodes that select me as one of their

MPR set OLSR-Messages from MPR selector set are to be forwarded

Link-State messaging and route calculation Topology table Route table

Page 8: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

MPR selection Each node select a set of MPR Selectors Who can be a MPR Selectors of node N ?

one-hop neighbors of N MPR set of Node N (Rules)

Set of MPR’s is able to transmit to all two-hop neighbors Link between node and it’s MPR is bidirectional.

D

N

B

MX

Y

Z

A

Page 9: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

Multipoint Relays (MPR) Every node keeps a table of routes to all known destinatio

n through its MPR nodes

Every node periodically broadcasts list of its MPR Selectors (instead of the whole list of neighbors).

Upon receipt of MPR information each node recalculates and updates routes to each known destination

Page 10: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

MPR selection algorithm Each point u has to select its set of MPR. Goal : Select in the 1-neighborhood of u (N1(u)) a set of nodes as

small as possible which covers the whole 2-neighborhood of u(N2(u)). Step 1: Select nodes of N1(u) which cover isolated points

of N2(u). Step 2: Select among the nodes of N1(u) not selected at the first step, the node which covers the highest

number of points of N2(u) and go on till every

points of N2(u) are covered.

Page 11: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

MPR selection algorithm

First step: Select nodes in N1(u) which cover “isolated points” of N2(u).

u

Page 12: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

MPR selection algorithm

Second step : Consider in N1(u) only points which are not already

selected at the first step NPR1(u) and points in N2(u) which are not covered by the NPR1(u) . While there exists points in N2(u) not covered by the selected MPR, select in N2(u), the node which covers the highest number of non-covered nodes in N2(u).

u

Page 13: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

MPR selection algorithm

Final : MPRs

u

Page 14: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

Installation Download UM-OLSR 0.8.8 from

http://masimum.dif.um.es/?Software:UM-OLSR

Ns2.27 、 2.28 、 2.29 / UM-OLSR 0.8.7 、 0.8.8

Copy um-olsr-0.8.8.tgz to ns-allinone-2.29/ns-2.29/

$ cd ns-allinone-2.29/ns-2.29/

$ tar zxvf um-olsr-0.8.8.tgz

$ ln -s ./um-olsr-0.8.8 ./olsr

$ patch -p1 < olsr/um-olsr_ns-2.29_v0.8.8.patch

$ ./configure

$ make

Page 15: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

Example Download olsr_example.tcl from

http://masimum.dif.um.es/um-olsr/olsr_example.tcl

Page 16: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

OLSR Hello message one hop for

Two hop topology information MPRs

Transmit two hop top topology information By MPRs TC message

Complete Topology Information Shortest Path Tree calculation (Dijkstra) Routing table build

Page 17: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

TC message TC – Topology control message:

Sent periodically. Message might not be sent if there are no updates and sent earlier if there are updates

Contains: MPR Selector Table Sequence number

Each node maintains a Topology Table based on TC messages Routing Tables are calculated based on Topology tables

Page 18: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

Topology Table

Destination address

Destination’s MPR

MPR Selector sequence number

Holding time

MPR Selector in the received TC message

Last-hop node to the destination.

Originator of TC message

Page 19: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

TC message Upon receipt of TC message:

If there exist some entry to the same destination with higher Sequence Number, the TC message is ignored

If there exist some entry to the same destination with lower Sequence Number, the topology entry is removed and the new one is recorded

If the entry is the same as in TC message, the holding time of this entry is refreshed

Page 20: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

Routing Table Each node maintains a routing table to all known destinati

ons in the network Routing table is calculated from Topological Table, taking

the connected pairs Routing table:

Destination address Next Hop address Distance

Routing Table is recalculated after every change in neighborhood table or in topological table

Page 21: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

UM-OLSR File List (Header) OLSR.h

header file for OLSR agent and related classes OLSR_pkt.h

contains all declarations of OLSR packets and messages OLSR_printer.h

includes all printing functions related to OLSR OLSR_repositories.h

defined all data structures needed by an OLSR node OLSR_rtable.h

header file for routing table's related stuff OLSR_state.h

declares and defines internal state of an OLSR node

Page 22: UM-OLSR OLSR routing protocol in NS2 郭祐暢 695430044

UM-OLSR File List OLSR.cc

Implementation of OLSR agent and related classes OLSR_printer.cc

Printing functions used for debugging and tracing are implemented in this file

OLSR_rtable.cc Implementation of our routing table

OLSR_state.cc Implementation of all functions needed for manipulating the interna

l state of an OLSR node