smort documentation
TRANSCRIPT
-
8/12/2019 SMORT Documentation
1/66
SMORT- SECURE MULTIPATH ON-DEMAND
ROUTING FOR MOBILE AD HOC NETWORKS
A PROJECT REPORT
Submitted by
PRABHU (20077737)
MANIKANDAN (20087729)
CHOKKANATHAN (2007773)
in partial fulfillment for the award of the degree
of
BACHELOR OF TECHNOLOG!
in
INFORMATION TECHNOLOG!
DEPARTMENT OF INFORMATION TECHNOLOG!
MADRAS INSTITUTE OF TECHNOLOG! CAMPUS
ANNA UNI"ERSIT!# CHENNAI$
APR 20
-
8/12/2019 SMORT Documentation
2/66
ANNA UNI"ERSIT!%% CHENNAI &00 02'
BONAFIDE CERTIFICATE
It is certified that the work contained in this project, titled S*+ - S,.*,
M./+1+ O4-D,45 R.+46 F* M/, A5 H N,+*:;by PRABHU
[2!!!"!#, $A%I&A%'A% [2(!!2)#, *H+&&A%AHA% [2!!!-"# has
been carried o.t .nder /y s.per0ision , in partial f.lfill/ent for the award of the
de1ree of Bachelor of echnolo1y in Infor/ation echnolo1y *ertified f.rther to
the best of /y knowled1e the work reported herein does not for/ part or f.ll of
any other thesis or dissertation on the basis of which a de1ree or award was
conferred on an earlier occasion on this or any other candidate
D*$"$"AIDEHI D*$DHANANJA! KUMAR
HEAD OF THE DEPARTMENT SUPER"ISOR
Professor and Head, Assistant Professor,
'epart/ent of Infor/ation echnolo1y, 'epart/ent of Infor/ation echnolo1y,
$adras Instit.te of echnolo1y, $adras Instit.te of echnolo1y,
Anna Uni0ersity, *hennai 33 Anna Uni0ersity, *hennai 33
-
8/12/2019 SMORT Documentation
3/66
ACKNOWLEDGEMENTS
4e are hi1hly indebted to o.r respectable dean, D*$A$J:,1 S+4/,
-
8/12/2019 SMORT Documentation
4/66
ABSTRACT
Increasing popularity and availability of portable wireless devices, which
constitute mobile ad hoc networks, calls for scalable and secure ad hoc routing
protocols. On-demand routing protocols adapt well with dynamic topologies of ad
hoc networks, because of their lower control overhead and quick response to route
breaks. But, as the size of the network increases, these protocols cease to perform
due to large routing overhead generated while repairing route breaks. e propose
a multipath on-demand routing protocol !"#O$%&, which reduces the routing
overhead incurred in recovering from route breaks, by using secondary paths and
provides security mechanism for such a routing scheme. "#O$% computes fail-
safe multiple paths, which provide all the intermediate nodes on the primary path
with multiple routes !if e'ists& to destination. ('haustive simulations using
)lo#o"im with large networks !*+++ nodes& confirm that "#O$% is scalable, and
performs better even at higher mobility and traffic loads, when compared to the
disoint multipath routing protocol !#$& and ad hoc on-demand distance
vector !/O0& routing protocol.
-
8/12/2019 SMORT Documentation
5/66
LIST OF FIGURES
LIST OF TABLES
T/, N N, P6, N
S,.*+< *,>.*,,4+: ?* SAOD"MAP
2 N++4: .:,5 ?* SAOD"-MAP
ABBRE"IATIONS AND ACRON!MS
F6.*, N$ N, P6, N$
$ T
-
8/12/2019 SMORT Documentation
6/66
A*& Acknowled1e/ent
A+'9 Ad hoc +n de/and 'istance 9ector ro.tin1
:A+'9 :ec.re Ad hoc +n de/and 'istance 9ector ro.tin1
':R 'yna/ic :o.rce Ro.tin1
':'9 'estination :e;.enced 'istance 9ector protocol
-
8/12/2019 SMORT Documentation
7/66
C1+,* % INTRODUCTION
-? +0er0iew
--? +bjecti0e
-2? $anet
-"? 4ireless Ro.tin1 Protocol Basics
-3? ypes of $.ltipath
-@? :ec.rity Analysis
-? hesis +r1aniation
C1+,* 2% LITERATURE SUR"E!
2-? Pro0ably :ec.re +n6'e/and :o.rce Ro.tin1 in
$obile Ad Hoc %etworks
22? A 'istrib.ted Al1orith/ for *on1estion6$ini/ied
$.lti6path ro.tin1 o0er Ad hoc %etworks
2"? Appro5i/ate $ini/./6=ner1y $.lticastin1 in
4ireless Ad Hoc %etworks
23? Adapti0e :ec.re Ro.tin1 in Ad Hoc $obile %etwork
2@? A :ec.re Ro.tin1 Protocol for Ad Hoc %etworks
C1+,* 3% PROPOSED WORK
"-? +bjecti0e
"-- Attacks and 9.lnerabilities in $A%=
"-2 $.ltipath Ro.tin1 Protocols
"2? &ey *onsiderations
"2- Ro.te 'isco0ery Process
"22 :ec.re %ei1hbor Ro.te 'isco0ery Process
""? Al1orith/ I/ple/entation
-
8/12/2019 SMORT Documentation
8/66
"3- he Ad0anced =ncryption :tandard
"32 he :.bByte and In0:.bByte ransfor/ation
"3? :yste/ Architect.re 'ia1ra/
"@? 'ata Clow 'ia1ra/
"? :creen :hots
"!? :a/ple *ode
C1+,* % GLOMOSIM
3-? Introd.ction to Dlo$o:i/
32? Parsec
3"? Abo.t Dlo$o:i/
3"- Dlo$o:i/ Architect.re
3"2 Dlo$o:i/ Eibrary
3"" Dlo$o:i/ APIs
C1+,* '% RESULT AND DISCUSSION
@-? :i/.lation Res.lts
C1+,* &% CONCLUSION AND FUTURE WORK
REFERENCES
APPENDI A
-
8/12/2019 SMORT Documentation
9/66
CHAPTER % INTRODUCTION
INTRODUCTION%
$0 O"ER"IEW
A /obile ad hoc network 7$A%=8 is a syste/ of /obile nodes that
dyna/ically self6or1anie in arbitrary and te/porary network topolo1ies allowin1
-
8/12/2019 SMORT Documentation
10/66
nodes to co//.nicate each other witho.t any pre6e5istin1 co//.nication
infrastr.ct.re here are a n./ber of challen1es tri11ered by the .ni;.e
characteristics of ad hoc wireless networks %ode /obility affects network
topolo1y and /ay inc.r packet lost, path disconnection, network partition and
diffic.lty in reso.rce allocation '.e to the li/ited trans/ission ran1e of $A%=
nodes, /.ltiple hops are .s.ally needed for a node to e5chan1e infor/ation with
any other node in the network
h.s a ro.tin1 is a cr.cial iss.e in desi1nin1 $A%=Accordin1 to the
n./ber of paths that are disco0ered d.rin1 ro.te disco0ery process, the ro.tin1
protocols are di0ided into sin1le6path and /.ltipath $.ltipath ro.tin1 protocols
for wireless ad6hoc networks are dee/ed s.perior o0er con0entional sin1le6path
ad6hoc ro.tin1 protocols as the for/er red.ce end6to6end delay, increase
reliability, pro0ide rob.stness and load6balancin1, and i/pro0e sec.rity:ince
$A%= lacks fi5ed infrastr.ct.re, ad6hoc ro.tin1 sec.rity is challen1in1 and th.s
it is an ob0io.s tar1et for ad0ersaries
$ OBJECTI"E
he $ain +bjecti0e is to Increase reliability, pro0ide rob.stness and load6
balancin1, and i/pro0e sec.rity:ince $A%= lacks fi5ed infrastr.ct.re, ad6hoc
ro.tin1 sec.rity is challen1in1 and th.s it is an ob0io.s tar1et for ad0ersaries he
s.ccess of $A%=s in /any applications de/ands ade;.ate sec.rity /eas.res for
-
8/12/2019 SMORT Documentation
11/66
the ro.tin1 protocols h.s different ad6hoc ro.tin1 protocols /.st be desi1ned for
specific en0iron/ents And a ro.tin1 protocol /ay be considered sec.re if it /eets
the sec.rity re;.ire/ents for its en0iron/ent of .se =ach en0iron/ent differs
1reatly in its sec.rity needs and the opport.nity for predeploy/ent coordination
%or/ally ad hoc networks can be classified into three en0iron/ents? open,
/ana1ed6open and /ana1ed6hostile here are only few e5istin1 sec.rity
approaches to pro0ide sec.rity for /.ltipath $A%= In this paper, we pro0ide a
sec.re /.ltipath $A%= sche/e, which tar1ets an en0iron/ent si/ilar to the
/ana1ed6open en0iron/ent
$2 WIRELESS ROUTING PROTOCOL BASICS
here are se0eral .nicast ro.tin1 al1orith/s that ha0e been de0eloped for
$A%=s that ha0e their own .ni;.e characteristic stren1ths and weaknesses A
detailed description of all these protocols is beyond the scope of this thesis 4e do
describe in detail, howe0er, all protocols that we felt were rele0ant to this work
'ifferent al1orith/s /ay ha0e benefits in different topolo1ies and /otion
scenarios and for different application scales Cor e5a/ple, one protocol /ay work
0ery well for - nodes in a s/all area b.t /ay work poorly 7ca.se e5cessi0e delay
or fail to deli0er or drop /ost packets8 for - nodes in a lar1e area or in certain
/obility conditions
-
8/12/2019 SMORT Documentation
12/66
he si/plest wireless ro.tin1 protocol is called floodin1 and as the na/e i/plies, a
/essa1e is sent by a node to all its nei1hbors who send it o.t to all their nei1hbors
and so on .ntil it reaches the desired destination his is one /ethod known to
1.arantee deli0ery of packets pro0ided at least one path e5ists between any two
nodes It has a 1reat drawback, howe0er, in that it wastes a lot of the li/ited
bandwidth a0ailable, and if all nodes were to flood all other nodes, there wo.ld be
too /.ch interference, ca.sin1 what is known as the Broadcast :tor/ proble/
S+* Ideally, floodin1 sho.ld be a0oided as /.ch as possible or only done
when absol.tely necessary, s.ch as in instances of 0ery hi1h /obility or to set .p
initial ro.tes
$ CLASSIFICATION OF ROUTING PROTOCOLS
$ost protocols can be classified in se0eral ways :o/e are classified as reacti0e or
on6 de/and while others are proacti0e In 1eneral, a proacti0e protocol finds ro.tes
in ad0ance while a reacti0e protocol finds ro.tes to the destination only when it
absol.tely /.st Cor e5a/ple, Ad hoc +n de/and 'istance 9ector ro.tin1
7A+'98 AOD" is an on6de/and protocol since no protocol infor/ation is
trans/itted before an application decides to send data and no data is sent .ntil a
ro.te is for/ed, whereas 'estination :e;.enced 'istance 9ector protocol 7':'98
DSD" is a /ore proacti0e protocol in which ro.tes are disco0ered and stored
e0en before they are needed
-
8/12/2019 SMORT Documentation
13/66
Proacti0e protocols 1enerally 1enerate /.ch /ore traffic than on6de/and
protocols A third 1eneral cate1ory is a hybrid al1orith/ that effecti0ely co/bines
/.ltiple characteristics in a .ni;.e and /eanin1f.l way Cor e5a/ple, the
-
8/12/2019 SMORT Documentation
14/66
U4.+*,5 4,+* ,::% :A+'96$AP sche/e allows network access
only for nodes that ha0e been a.thenticated .sin1 the certificate iss.ed by the
tr.sted a.thority, and only so lon1 as they .se the sa/e IP and $A* addresses
bo.nd by that certificate Packets are discarded for nodes that are not
a.thenticated he tr.sted a.thority is also a sin1le point of fail.re and attack,
howe0er, /.ltiple red.ndant a.thorities /ay be .sed 7e1, as by
-
8/12/2019 SMORT Documentation
15/66
that can detect s.ch a /odification And second, the inter/ediate nodes ens.re the
inte1rity of the /essa1e trans/itted by the ne5t hop node by the .se of local
/onitorin1 /echanis/s he local /onitor /echanis/ can detect so/e of
/isbeha0in1 nodes d.rin1 RR=> forwardin1 process
$& THESIS ORGANIATION
his chapter pro0ides an introd.ction to the reader abo.t the 1eneral do/ain this
thesis pertains to, na/ely, wireless /obile ad hoc networkin1 *hapter 2 e5plains
o.r research objecti0es and /oti0ations for .sin1 *rypto1raphic scenarios and
/.ltipath ro.tin1 *hapter " e5plains i/ple/entation details of the $A%=
co/ponent of o.r A+'9and :A'+9 protocol and o.r si/.lation syste/ 1i0es an
o0er0iew of related work by other a.thors in ad hoc ro.tin1, specifically in
/.ltipath ro.tin1 *hapter 3 presents o.r res.lts, insi1hts and concl.sions *hapter
@ s.11ests directions for f.t.re work and *hapter ( presents o.r concl.sions fro/
this st.dy
-
8/12/2019 SMORT Documentation
16/66
CHAPTER 2% LITERATURE SUR"E!
2$ P*@/< S,.*, O4-D,45 S.*, R.+46 4 M/, A5 H N,+*:
he $ain +bjecti0e is that attacks a1ainst adhoc ro.tin1 protocols can be
s.btle and diffic.lt to disco0er by infor/al reasonin1 abo.t the properties of the
protocolswe de/onstrated this by presentin1 no0el attacks on Ariadne Another
-
8/12/2019 SMORT Documentation
17/66
/essa1e is that it is possible to adopt ri1oro.s techni;.es de0eloped for the
sec.rity analysis of crypto1raphic al1orith/s and protocols, and apply the/ in the
conte5t of ad hoc ro.tin1 protocols in order to 1ain /ore ass.rances abo.t their
sec.rity 4e de/onstrated this by proposin1 a si/.lation based fra/ework for on6
de/and so.rce ro.tin1 protocols that allows .s to 1i0e a precise definition of
ro.tin1 sec.rity, to /odel the operation of a 1i0en ro.tin1 protocol in the presence
of an ad0ersary, and to pro0e 7or fail to pro0e8 that the protocol is sec.re 4e
also proposed a new on6de/and so.rce ro.tin1 protocol, endair, and we
de/onstrated the .sa1e of the proposed fra/ework by pro0in1 that it is sec.re in
o.r /odel
2$2 A D:+*.+,5 A/6*+ ?* C46,:+4-M4,5
M./+-1+ *.+46 @,* A5 N,+*:
4e propose a distrib.ted al1orith/ for con1estion /ini/ied /.lti6path ro.tin1
By deco/posin1 the con1estion opti/iation process into a se;.ence of /ini/./
cost ro.tin1 proble/s, and applyin1 the Bell/an6Cord distrib.ted al1orith/ to end
each /ini/./6cost ro.te, we show that the distrib.ted sol.tion yields a close
appro5i/ation to its centralied co.nterpart :i/.lation res.lts for 0ideo strea/in1
o0er an ad hoc network confir/ that the difference in the recei0ed 0ideo ;.ality
between the centralied and distrib.ted sche/es is less than @ dB with
properly chosen rate incre/ents
2$3 A11*+, M4.-E4,*6< M./+:+46 4
W*,/,:: A5 H N,+*:
-
8/12/2019 SMORT Documentation
18/66
As /obile nodes are battery6operated, an i/portant iss.e in s.ch a network is to
/ini/ie the total power cons./ption for each operation $.lticast is one of
f.nda/ental operations in any /odern teleco//.nication network incl.din1
wireless ad hoc networks Di0en a /.lticast re;.est consistin1 of a so.rce node
and a set of destination nodes, the proble/ is to b.ild a /ini/./6ener1y /.lticast
tree for the re;.est s.ch that the total trans/ission power cons./ption in the tree
is /ini/ied :ince the proble/ in a sy//etric wireless ad hoc network is %P6
co/plete, we instead de0ise an appro5i/ation al1orith/ with pro0able
appro5i/ation 1.arantee
2$ A51+@, S,.*, R.+46 4 A5 H M/, N,+*
:ec.re ro.tin1 in ad hoc network is a da.ntin1 task beca.se of so/e contradictions
between the nat.re of the network and the associated applications It has 0ario.s
types of e5istin1 ro.tin1 protocols ha0e been e5tensi0ely st.died with a 0iew to
findin1 sec.rity 0.lnerabilities It is followed by hi1hli1htin1 /ajor sec.rity
attacks on ad hoc on6de/and distance60ector 7A+'98 ro.tin1 protocol which is on
the 0er1e of bein1 the defa.lt ro.tin1 standard for ad hoc network Both the
sec.rity re;.ire/ent of applications and li/itations of the /obile nodes ha0e been
caref.lly considered in order to desi1n a feasible sol.tion to co.nter possible
attacks he .ni;.eness of the proposed sol.tion lies with the fact that it ens.res
sec.rity as needed by the application which sa0es both ener1y and power he
proposition is act.ally a /odification of A+'9 protocol he sol.tion .ses se0eral
sec.rity /od.les which ha0e been well desi1ned prior to the f.nctionin1 of the
protocol
2$' A S,.*, R.+46 P*+/ ?* A5 H N,+*:
-
8/12/2019 SMORT Documentation
19/66
A 1ood sec.re ro.tin1 al1orith/ pre0ents each of the e5ploits is presented it /.st
ens.re that no node can pre0ent s.ccessf.l ro.te disco0ery and /aintenance
between any other nodes other than by non6participation In s./, all sec.re ad hoc
ro.tin1 protocols /.st satisfy the followin1 re;.ire/ents to ens.re that path
disco0ery fro/ so.rce to destination f.nctions correctly in the presence of
/alicio.s ad0ersaries ?7 -8 Ro.te si1nalin1 cannot be spoofedG 728 Cabricated
ro.tin1 /essa1es cannot be injected into the networkG 7"8 Ro.tin1 /essa1es cannot
be altered in transit, e5cept accordin1 to the nor/al f.nctionality of the ro.tin1
protocolG 738 Ro.tin1 loops cannot be for/ed thro.1h /alicio.s actionG 7@8 Ro.tes
cannot be redirected fro/ the shortest path by /alicio.s action78 Una.thoried
nodes sho.ld be e5cl.ded fro/ ro.te co/p.tation and disco0ery 7!8 he network
topolo1y /.st not be e5posed neither to ad0ersaries nor to a.thoried nodes by the
ro.tin1 /essa1es
-
8/12/2019 SMORT Documentation
20/66
CHAPTER 3% PROPOSED WORK
3$ OBJECTI"E
-
8/12/2019 SMORT Documentation
21/66
In this Project, 4e propose a /.ltipath ro.tin1 sche/e for /obile adhoc
network in order to di/inish the effect of fre;.ent co//.nication fail.res he
/ain intention is not only to lower fre;.encies of costly ro.te disco0eries so it can
keep end6to6end connection for lon1er ti/e b.t also to .se labeled /.ltiple
alternati0e paths for efficient traffic distrib.tion a/on1 these paths
he proposed /.ltipath ro.tin1 protocol for $A%= is a /odification of
sin1le6path A+'9 protocol his sche/e is basically intended for hi1hly dyna/ic
ad6hoc networks in which co//.nication fail.res occ.r fre;.ently and desi1ned
to co/p.te not only node6disjoint paths b.t also fail6safe paths %ode6disjoint path
does not ha0e any nodes in co//on, e5cept the so.rce and destination,
4hereas fail6safe is a path between so.rce and destination if it bypasses at least
one inter/ediate node on the pri/ary path h.s fail6safe path is different fro/
node6disjoint and link6disjoint paths, in the sense that fail6safe path can ha0e both
nodes and links in co//on %ode6disjoint and failsafe paths are shown in Ci1.re
- :o the co/bination of node6disjoint and fail6safe paths allows the co/p.tation
of /ore alternati0e paths than in node6disjoint or link6disjoint /.ltipath ro.tin1s
h.s the proposed sche/e is na/ed as A+'9 with $.ltiple Alternati0e Paths
7A+'96$AP8
he /ain feat.res of A+'96$AP sche/e are path acc./.lation, selecti0e
RR=> forwardin1 sche/e, /.ltiple alternati0e path disco0ery, and path label
settin1
3$$ A++: 45 "./4,*/+,: 4 MANET
-
8/12/2019 SMORT Documentation
22/66
%./ero.s attacks are possible on ad6hoc ro.tin1 protocols he attacks
presented below are briefly disc.ssed in ad6hoc ro.tin1 protocols
Attacks .sin1 /odification? redirection by chan1in1 the ro.te se;.ence
n./ber, redirection with /odified hop co.nt, deto.r attack, black/ail
attack
Attacks .sin1 i/personation? $an6in6the6$iddle attack, in0isible node
attack, sybil attackG
Attacks .sin1 fabrication? Calsifyin1 ro.te error /essa1es, ro.te cache
poisonin1G reso.rce cons./ption attack, r.shin1 attack, black hole attacks,
and 1ray hole attacksG
Replay Attacks? 4or/ attack and t.nnelin1G
'enial of :er0ice 7'o:8? cons./ption of scarce reso.rces, destr.ction or
alteration of confi1.ration infor/ation
:i/ilarly 0.lnerabilities /ay affect the ro.te disco0ery process of $.ltipath
ro.tin1 protocols, allowin1 /alicio.s nodes to control the ro.tin1 paths hese
0.lnerabilities incl.de the racin1 pheno/enon, i/personation and $an6in the6
$iddle attacks ca.sed by in0isible nodes $.ltipath ro.tin1 protocols are resilient
to 'o: attacks and /ay protect network a0ailability fro/ /alicio.s nodes
3$$2 M./+1+ R.+46 P*+/:
4e briefly present related works to /.ltipath ro.tin1 :o/e /.ltipath ro.tin1
protocols ha0e been proposed for wireless ad hoc networks 4ell6known /.ltipath
ro.tin1 protocols based on A+'9 ro.tin1 protocol are %'$R A+'9$, A+'96
BR, and A+$'9 :$+R .ses the idea of fail6safe alternate path to deter/ine
/.ltiple paths :e0eral sol.tions for sec.re ad6hoc ro.tin1 s.ch as ARA%,
-
8/12/2019 SMORT Documentation
23/66
:A+'9, and ARIA'%= ha0e been proposed $ost of these protocols are
desi1ned for sin1le6path ro.tin1 protocols :o/e of sec.rity sche/es for wireless
ad6hoc ro.tin1 protocols are :RP, :ec$R and B.r/esters approach which are
desi1ned for /.ltipath ro.tin1 sec.rity :ec.re Ro.tin1 Protocol 7:RP8 for /obile
ad6hoc networks is a sec.rity sche/e for /.ltipath ro.tin1 :RP .ses end6to6end
sy//etric crypto1raphy in order to protect the inte1rity of the ro.te disco0ery
h.s, it is 0ery efficient and protects fro/ se0eral attacks of /alicio.s nodes +ne
of proble/s in :RP is that it has no defense a1ainst an in0isible node attack
B.r/esters approach [-)# for sec.re /.ltipath ro.tin1 is based on the Cord6
C.lkerson $a5Clow al1orith/ his protocol satisfies the sec.rity re;.ire/ents of
/.ltipath ro.tin1 as well as co/pleteness, ie, it disco0ers all e5istin1 paths
bo.nded by a E field Howe0er, the propa1ation of the ro.te re;.est ;.ery is
not efficient, in co/p.tation and space costs C.rther/ore, the .se of di1ital
si1nat.res by the inter/ediate nodes of each ro.te re;.est /essa1e costs both in
delay and processin1 power
he :ec.re $.ltipath Ro.tin1 7:ec$R8 protocol, which pro0ides protection
a1ainst 'o: attacks fro/ a bo.nded n./ber of collaboratin1 /alicio.s nodes
:ec$R disco0ers the co/plete set of the e5istin1 non6cyclic, node6disjoint paths
between a so.rce and a tar1et node, for a 1i0en /a5i/./ hop distance +.r
Approach for $.ltipath $A%= 4e propose a /.ltipath ro.tin1 sche/e for
/obile adhoc network in order to di/inish the effect of fre;.ent co//.nication
fail.res he /ain intention is not only to lower fre;.encies of costly ro.te
disco0eries so it can keep end6to6end connection for lon1er ti/e b.t also to .se
labeled /.ltiple alternati0e paths for efficient traffic distrib.tion a/on1 these
paths he proposed /.ltipath ro.tin1 protocol for $A%= is a /odification of
-
8/12/2019 SMORT Documentation
24/66
sin1le6path A+'9 protocol his sche/e is basically intended for hi1hly dyna/ic
ad6hoc networks in which co//.nication fail.res occ.r fre;.ently and desi1ned
to co/p.te not only node6disjoint paths b.t also fail6safe paths %ode6disjoint path
does not ha0e any nodes in co//on, e5cept the so.rce and destination, whereas
fail6safe is a path between so.rce and destination if it bypasses at least one
inter/ediate node on the pri/ary path h.s fail6safe path is different fro/ node6
disjoint and link6disjoint paths, in the sense that fail6safe path can ha0e both nodes
and links in co//on %ode6disjoint and failsafe paths are shown in Ci1.re - :o
the co/bination of node6disjoint and fail6safe paths allows the co/p.tation of
/ore alternati0e paths than in node6disjoint or link6disjoint /.ltipath ro.tin1s
h.s the proposed sche/e is na/ed as A+'9 with $.ltiple Alternati0e Paths
7A+'96$AP8
In A+'96$AP sche/e, each $A%= node keeps and /aintains tables
ro.tin1 table, and nei1hbor node table As in A+'9, there are three control
/essa1es are ro.te re;.est 7RR=>8, ro.te reply 7RR=P8 and ro.te error 7R=RR8
RR=> and RR=P packet str.ct.res of the A+'9$AP sche/e are sa/e as those
of A+'9, e5cept presence of path acc./.lation list of the ro.te path in the for/er
and path acc./.lation list and path type in the latter
-
8/12/2019 SMORT Documentation
25/66
T/, $ S,.*+< *,>.*,,4+: ?* SAOD"MAP
3$2 K,< C4:5,*+4:
3$2$ R.+, D:@,*< P*,::
A+'96$AP sche/e has two basic phases ro.te disco0ery and ro.te
/aintenance A so.rce node : initiates ro.te disco0ery process, when it wants to
co//.nicate to a destination ', for which it does not ha0e a 0alid ro.te heso.rce node : inserts last known destination se;.ence n./ber, address of the
destination, RR=> I', its own address and se;.ence n./ber into a RR=> packet
and broadcasts itRR=> I' is incre/ented e0ery ti/e when the so.rce node
initiates a RR=> In this way, the broadcast I' and address of the so.rce node
for/ .ni;.e identifier for the RR=> 4hen a node recei0es a RR=>, it checks to
deter/ine whether it has recei0ed a RR=> with the sa/e so.rce and RR=> I' If
a node recei0es a RR=> for the first ti/e, it searches for a re0erse ro.te to the
so.rce If no re0erse ro.te, then create one Inter/ediate nodes are not allowed
to send RR=Ps back to the so.rce e0en when they ha0e ro.te infor/ation to the
destination his is essential to find desired /.ltiple paths at the destination
-
8/12/2019 SMORT Documentation
26/66
C.rther, when RR=> is forward by inter/ediate nodes in the network, each node
appends its address to it Path acc./.lation d.rin1 ro.te disco0ery is shown in
Ci1.re 2he path infor/ation not only ens.res to send RR=P to the so.rce b.t
also enables to set path label at the destinationA+'96$AP allows inter/ediate
nodes to forward d.plicate RR=> packets if only satisfies followin1 two criteria?
1 hop cnt$$(2i J hop cntprev$$(2
1 nn$$(2i 3J nnprev$$(2
T/, 2$ N++4: .:,5 ?* SAOD"-MAP
4here hop cnt is n./ber of hops fro/ the so.rce to the c.rrent node handlin1
the re;.estG and nn is nei1hbor node his selecti0e RR=> forwardin1 sche/e ispreferred in order to disco0er desired /.ltiple alternati0e paths In this sche/e, the
destination is responsible for disco0erin1 pri/ary path, node disjoint paths and
fail6safe paths fro/ all the recei0ed ro.tes as well as definin1 the path labels
4hen recei0in1 the first RR=>, the destination records the ro.te path of RR=>
and sets it with path label - hen after copyin1 ro.te path of RR=> to a RR=P
packet, the destination node sends RR=P to : .sin1 path infor/ation in it Hence
the inter/ediate nodes can forward this packet .sin1 path infor/ation in RR=P
4hen the destination recei0es a d.plicate RR=>, it will co/pare ro.te path of
RR=> to that of the ro.tin1 table If only so.rce and destination nodes are sa/e, a
path is said to be a node6disjoint path and the destination deter/ines it as path label
-
8/12/2019 SMORT Documentation
27/66
If at least one of inter/ediate nodes in the ro.te path in the ro.tin1 table is
different fro/ nodes in the ro.te path of the RR=>, a ro.te is said to be a fail6safe
path and destination deter/ines it as path label 2 After settin1 appropriate path
label in RR=P, the destination sends it to the so.rce alon1 the path infor/ation in
it Cor instance, as shown in Ci1.re ", /.ltiple paths between so.rce node : and
destination ' can be disco0ered .sin1 selecti0e RR=> forwardin1 sche/e d.rin1
ro.te disco0ery process
F6.*, $2$ D:@,*46 ./+1/, 1+: 5.*46 *.+, 5:@,* is sent
NFstatic 0oid
Ro.tin1:/ortInsert:ent7
%+'=OA''R destAddr, int ttl,
-
8/12/2019 SMORT Documentation
35/66
:$+RO:=% Nsent8
:$+RO:=%O%odeN c.rrentG :$+RO:=%O%odeN pre0io.sG
:$+RO:=%O%odeN new%ode J7:$+RO:=%O%ode N8checkedOpcO/alloc7sieof7:$+RO:=%O%ode88G
new%ode6MdestAddr J destAddrG new%ode6Mttl J ttlG
new%ode6Mti/es J G
new%ode6Mne5t J %UEEG
7sent6Msie8QQG
FF Cind Insertion point Insert after all address /atches
pre0io.s J %UEEG
c.rrent J sent6MheadG while 77c.rrent J %UEE8 SS 7c.rrent6MdestAddr TJ destAddr88
pre0io.s J c.rrentG
c.rrent J c.rrent6Mne5tG FFwhileFF
if 7pre0io.s JJ %UEE8
new%ode6Mne5t J sent6MheadG sent6Mhead J new%odeG
else
new%ode6Mne5t J pre0io.s6Mne5tG pre0io.s6Mne5t J new%odeG
FFifFF
FN Ro.tin1:/ortInsert:ent NF
FN
N Ro.tin1:/ort'eleteRo.teableN
N Re/o0e an entry fro/ the ro.te table
NF0oid Ro.tin1:/ort'eleteRo.teable7%+'=OA''R destAddr, :$+ROR Nro.teable8
:$+RORO%ode NtoCreeG :$+RORO%ode Nc.rrentG
if 7ro.teable6Msie JJ VV ro.teable6Mhead JJ %UEE8
-
8/12/2019 SMORT Documentation
36/66
ret.rnG
else if 7ro.teable6Mhead6MdestAddr JJ destAddr8
if 7ro.teable6Mhead6Mlifeti/e TJ si/clock788
toCree J ro.teable6MheadG
ro.teable6Mhead J toCree6Mne5tG
pcOfree7toCree8G 667ro.teable6Msie8G
else
for 7c.rrent J ro.teable6MheadG
c.rrent6Mne5t J %UEE SS c.rrent6Mne5t6MdestAddr T destAddrG
c.rrent J c.rrent6Mne5t8
if 7c.rrent6Mne5t J %UEE SS c.rrent6Mne5t6MdestAddr JJ destAddr SS
c.rrent6Mne5t6Mlifeti/e TJ si/clock788
toCree J c.rrent6Mne5tG
c.rrent6Mne5t J toCree6Mne5tG
pcOfree7toCree8G 667ro.teable6Msie8G
FN Ro.tin1:/ort'eleteRo.teable NF
FN
N Ro.tin1:/ort'elete%brable
N
N Re/o0e an entry fro/ the nei1hbor tableNF
0oid Ro.tin1:/ort'elete%brable7%+'=OA''R destAddr, :$+RO% Nnbrable8
:$+RO%O%ode NtoCreeG
:$+RO%O%ode Nc.rrentG
if 7nbrable6Msie JJ 8
ret.rnG
-
8/12/2019 SMORT Documentation
37/66
else if 7nbrable6Mhead6MdestAddr JJ destAddr8
toCree J nbrable6MheadG nbrable6Mhead J toCree6Mne5tG
pcOfree7toCree8G
667nbrable6Msie8G
else
for 7c.rrent J nbrable6MheadG
77c.rrent6Mne5t J %UEE8 SS 7c.rrent6Mne5t6MdestAddr T destAddr88G
c.rrent J c.rrent6Mne5t8
if 7c.rrent6Mne5t J %UEE SS c.rrent6Mne5t6MdestAddr JJ destAddr8
toCree J c.rrent6Mne5tG
c.rrent6Mne5t J toCree6Mne5tG pcOfree7toCree8G
667nbrable6Msie8G
FN Ro.tin1:/ort'elete%brable NF
FN
N Ro.tin1:/ort'elete:eenable
NN Re/o0e an entry fro/ the seen table
NF
0oid Ro.tin1:/ort'elete:eenable7:$+ROR: Nseenable8
:$+ROR:O%ode NtoCreeG
toCree J seenable6MfrontG seenable6Mfront J toCree6Mne5tG
pcOfree7toCree8G
667seenable6Msie8G
if 7seenable6Msie JJ 8
seenable6Mrear J %UEEG
FN Ro.tin1:/ort'elete:eenable NF
-
8/12/2019 SMORT Documentation
38/66
FN
N Ro.tin1:/ort'eleteB.fferN
N Re/o0e a packet fro/ the b.fferG Ret.rn RU= if deleted
NFB++E Ro.tin1:/ort'eleteB.ffer7%+'=OA''R destAddr, :$+ROBUCC=R Nb.ffer8
:$+ROBUCC=RO%ode NtoCreeG :$+ROBUCC=RO%ode Nc.rrentG
B++E deletedG
if 7b.ffer6Msie JJ 8
deleted J CAE:=G
else if 7b.ffer6Mhead6MdestAddr JJ destAddr8
toCree J b.ffer6MheadG b.ffer6Mhead J toCree6Mne5tG
pcOfree7toCree8G
667b.ffer6Msie8G deleted J RU=G
else
for 7c.rrent J b.ffer6MheadG
c.rrent6Mne5t J %UEE SS c.rrent6Mne5t6MdestAddr T destAddrG
c.rrent J c.rrent6Mne5t8
if 7c.rrent6Mne5t J %UEE SS c.rrent6Mne5t6MdestAddr JJ destAddr8
toCree J c.rrent6Mne5tG
c.rrent6Mne5t J toCree6Mne5tG pcOfree7toCree8G
667b.ffer6Msie8G
deleted J RU=G
else
deleted J CAE:=G
-
8/12/2019 SMORT Documentation
39/66
ret.rn 7deleted8G
FN Ro.tin1:/ort'eleteB.ffer NF
int =ncode7int inp.t,int key8
FFto 1et the ( bit inp.t and the key
FFclrscr78G
int iJ,lenJG
int sb[@#[@#J-,,--,-,--,-,-,,,-,-,--,--,-,--,-G
int sb-[@#[@#J,-,-,--,-,,-,--,--,,-,,-,-,-,--G
int sb2[@#[@#J-,,-,--,-,--,,-,,-,--,--,,-,-,-Gint sb"[@#[@#J-,,-,--,--,,-,-,-,-,,--,-,,-,-G
lon1 int fkopJ,fkinJ,fk5orJG
int ste/p-,ste/p2,sbintG
lon1 int 5orJ,k5orJ,e5p25orJGint encJG
char NeptrGchar inp[2#G
char instr[2#G
char ky[2#Gchar kystr[2#G
char ip[2#G
char e5p-[2#G
char le5p[2#Gchar e5p2[2#G
char 5str[2#G
char 5orstr[2#Gchar fk-per[2#G
char sbstr[2#,sbopt[2#,sbt/p[2#G
char sber[-#Gchar fk-5oropt[2#,fkt/p[2#G
char fk25oropt[2#G
char fk2l[2#,fk2r[2#G
char fk2per[2#Gchar ipin0[2#,ipt/p[2#G
FFto 1et the inp.t n./ber and con0ert it into binary
itoa7inp.t,inp,28G
lenJstrlen7inp8G
strcpy7instr,WW8G
for7iJlenGiT-GiQQ8
strcat7instr,WW8G
-
8/12/2019 SMORT Documentation
40/66
strcat7instr,inp8G
FFto 1et the key and con0ert it into binary
itoa7key,ky,28G
lenJstrlen7ky8Gstrcpy7kystr,WW8G
for7iJlenGiT-GiQQ8
strcat7kystr,WW8Gstrcat7kystr,ky8G
strcpy7ip,WW8G
FFinitial per/.tation
ip[#Jinstr[-#G
ip[-#Jinstr[#G
ip[2#Jinstr[--#Gip["#Jinstr[2#G
ip[3#Jinstr[#Gip[@#Jinstr[@#G
ip[#Jinstr[3#G
ip[!#Jinstr[-@#Gip[(#Jinstr[-2#G
ip[)#Jinstr[)#G
ip[-#Jinstr[-"#G
ip[--#Jinstr[(#Gip[-2#Jinstr[-#G
ip[-"#Jinstr[!#G
ip[-3#Jinstr[-3#Gip[-@#Jinstr["#G
ip[-#JXYXG
strcpy7e5p-,WW8Ge5p-[#Jip[(#G
e5p-[-#Jip[)#G
e5p-[2#Jip[-#G
e5p-["#Jip[--#Ge5p-[3#Jip[-2#G
e5p-[@#Jip[-"#G
e5p-[#Jip[-3#Ge5p-[!#Jip[-@#G
e5p-[(#JXYXG
strcpy7le5p,WW8Gle5p[#Jip[#G
le5p[-#Jip[-#G
le5p[2#Jip[2#G
le5p["#Jip["#G
-
8/12/2019 SMORT Documentation
41/66
le5p[3#Jip[3#G
le5p[@#Jip[@#G
le5p[#Jip[#Gle5p[!#Jip[!#G
le5p[(#JXYXG
FFe5pansion
strcpy7e5p2,WW8Ge5p2[#Je5p-[!#G
e5p2[-#Je5p-[#G
e5p2[2#Je5p-[-#G
e5p2["#Je5p-[2#Ge5p2[3#Je5p-[-#G
e5p2[@#Je5p-[2#G
e5p2[#Je5p-["#G
e5p2[!#Je5p-[3#Ge5p2[(#Je5p-["#G
e5p2[)#Je5p-[3#Ge5p2[-#Je5p-[@#G
e5p2[--#Je5p-[#G
e5p2[-2#Je5p-[@#Ge5p2[-"#Je5p-[#G
e5p2[-3#Je5p-[!#G
e5p2[-@#Je5p-[#G
e5p2[-#JXYXG
e5p25orJstrtol7e5p2,Septr,28Gk5orJstrtol7kystr,Septr,28G
5orJe5p25orZk5orG
strcpy75str,WW8G
ltoa75or,5str,28G
lenJstrlen75str8G
strcpy75orstr,WW8G
for7iJlenGiT-GiQQ8
strcat75orstr,WW8Gstrcat75orstr,5str8G
FFs bo5
-
8/12/2019 SMORT Documentation
42/66
strcpy7sbopt,WW8GFFinp.t s bo5
ste/p-JGste/p2JG
strcpy7sbstr,WW8G
sbstr[#J5orstr[#Gsbstr[-#J5orstr["#G
sbstr[2#JXYXG
ste/p-J7int8strtol7sbstr,Septr,28G
strcpy7sbstr,WW8G
sbstr[#J5orstr[-#G
sbstr[-#J5orstr[2#G
sbstr[2#JXYXGste/p2J7int8strtol7sbstr,Septr,28G
sbintJGsbintJsb[ste/p-#[ste/p2#G
strcpy7sbt/p,WW8G
itoa7sbint,sbt/p,-8GlenJstrlen7sbt/p8G
strcpy7sber,WW8G
if7lenJJ-8
strcat7sber,WW8Gstrcat7sber,sbt/p8G
strcat7sbopt,sber8G
FFinp.t s- bo5
ste/p-JGste/p2JG
strcpy7sbstr,WW8G
sbstr[#J5orstr[3#G
sbstr[-#J5orstr[!#Gsbstr[2#JXYXG
ste/p-J7int8strtol7sbstr,Septr,28G
strcpy7sbstr,WW8G
sbstr[#J5orstr[@#G
sbstr[-#J5orstr[#Gsbstr[2#JXYXG
ste/p2J7int8strtol7sbstr,Septr,28G
sbintJG
sbintJsb-[ste/p-#[ste/p2#G
-
8/12/2019 SMORT Documentation
43/66
strcpy7sbt/p,WW8G
itoa7sbint,sbt/p,-8G
lenJstrlen7sbt/p8Gstrcpy7sber,WW8G
if7lenJJ-8
strcat7sber,WW8Gstrcat7sber,sbt/p8G
strcat7sbopt,sber8G
FFinp.t s2 bo5
ste/p-JG
ste/p2JGstrcpy7sbstr,WW8G
sbstr[#J5orstr[(#G
sbstr[-#J5orstr[--#G
sbstr[2#JXYXGste/p-J7int8strtol7sbstr,Septr,28G
strcpy7sbstr,WW8G
sbstr[#J5orstr[)#G
sbstr[-#J5orstr[-#Gsbstr[2#JXYXG
ste/p2J7int8strtol7sbstr,Septr,28G
sbintJG
sbintJsb2[ste/p-#[ste/p2#Gstrcpy7sbt/p,WW8G
itoa7sbint,sbt/p,-8G
lenJstrlen7sbt/p8Gstrcpy7sber,WW8G
if7lenJJ-8
strcat7sber,WW8Gstrcat7sber,sbt/p8G
strcat7sbopt,sber8G
FFinp.t s" bo5
ste/p-JG
ste/p2JGstrcpy7sbstr,WW8G
sbstr[#J5orstr[-2#G
sbstr[-#J5orstr[-@#Gsbstr[2#JXYXG
ste/p-J7int8strtol7sbstr,Septr,28G
strcpy7sbstr,WW8G
-
8/12/2019 SMORT Documentation
44/66
sbstr[#J5orstr[-"#G
sbstr[-#J5orstr[-3#G
sbstr[2#JXYXGste/p2J7int8strtol7sbstr,Septr,28G
sbintJG
sbintJsb"[ste/p-#[ste/p2#Gstrcpy7sbt/p,WW8G
itoa7sbint,sbt/p,-8G
lenJstrlen7sbt/p8Gstrcpy7sber,WW8G
if7lenJJ-8
strcat7sber,WW8G
strcat7sber,sbt/p8Gstrcat7sbopt,sber8G
FFper/.tation
strcpy7fk-per,WW8Gfk-per[#Jsbopt[2#G
fk-per[-#Jsbopt[3#G
fk-per[2#Jsbopt[!#Gfk-per["#Jsbopt[#G
fk-per[3#Jsbopt[#G
fk-per[@#Jsbopt[@#G
fk-per[#Jsbopt[-#Gfk-per[!#Jsbopt["#G
fk-per[(#JXYXG
strcpy7fk-5oropt,WW8Gstrcpy7fkt/p,WW8G
fkopJstrtol7fk-per,Septr,28G
fkinJstrtol7le5p,Septr,28G
fk5orJfkopZfkinGltoa7fk5or,fkt/p,28G
lenJstrlen7fkt/p8G
for7iJlenGiT(GiQQ8strcat7fk-5oropt,WW8G
strcat7fk-5oropt,fkt/p8G
FFfk-5oropt is the o.tp.t of fk-
FFswitchin1
strcat7e5p-,fk-5oropt8G
-
8/12/2019 SMORT Documentation
45/66
FFfk2
strcpy7fk2r,WW8G
strcpy7fk2l,WW8G
fk2r[#Je5p-[(#G
fk2r[-#Je5p-[)#G
fk2r[2#Je5p-[-#Gfk2r["#Je5p-[--#G
fk2r[3#Je5p-[-2#G
fk2r[@#Je5p-[-"#G
fk2r[#Je5p-[-3#Gfk2r[!#Je5p-[-@#G
fk2r[(#JXYXG
fk2l[#Je5p-[#Gfk2l[-#Je5p-[-#G
fk2l[2#Je5p-[2#Gfk2l["#Je5p-["#G
fk2l[3#Je5p-[3#G
fk2l[@#Je5p-[@#Gfk2l[#Je5p-[#G
fk2l[!#Je5p-[!#G
fk2l[(#JXYXG
FFe5pansion
strcpy7fk2per,WW8G
fk2per[#Jfk2r[!#G
fk2per[-#Jfk2r[#Gfk2per[2#Jfk2r[-#G
fk2per["#Jfk2r[2#G
fk2per[3#Jfk2r[-#G
fk2per[@#Jfk2r[2#Gfk2per[#Jfk2r["#G
fk2per[!#Jfk2r[3#G
fk2per[(#Jfk2r["#Gfk2per[)#Jfk2r[3#G
fk2per[-#Jfk2r[@#G
fk2per[--#Jfk2r[#Gfk2per[-2#Jfk2r[@#G
fk2per[-"#Jfk2r[#G
fk2per[-3#Jfk2r[!#G
fk2per[-@#Jfk2r[#G
-
8/12/2019 SMORT Documentation
46/66
fk2per[-#JXYXG
FF5or with the key5orJGe5p25orJGk5orJG
e5p25orJstrtol7fk2per,Septr,28G
k5orJstrtol7kystr,Septr,28G5orJe5p25orZk5orG
strcpy75str,WW8Gltoa75or,5str,28G
lenJstrlen75str8G
strcpy75orstr,WW8Gfor7iJlenGiT-GiQQ8
strcat75orstr,WW8G
strcat75orstr,5str8G
strcpy7sbopt,WW8GFFinp.t s bo5
ste/p-JGste/p2JG
strcpy7sbstr,WW8G
sbstr[#J5orstr[#Gsbstr[-#J5orstr["#G
sbstr[2#JXYXG
ste/p-J7int8strtol7sbstr,Septr,28G
strcpy7sbstr,WW8G
sbstr[#J5orstr[-#G
sbstr[-#J5orstr[2#Gsbstr[2#JXYXG
ste/p2J7int8strtol7sbstr,Septr,28G
sbintJGsbintJsb[ste/p-#[ste/p2#G
strcpy7sbt/p,WW8G
itoa7sbint,sbt/p,-8G
lenJstrlen7sbt/p8Gstrcpy7sber,WW8G
if7lenJJ-8
strcat7sber,WW8Gstrcat7sber,sbt/p8G
strcat7sbopt,sber8G
FFinp.t s- bo5
ste/p-JG
ste/p2JG
-
8/12/2019 SMORT Documentation
47/66
strcpy7sbstr,WW8G
sbstr[#J5orstr[3#G
sbstr[-#J5orstr[!#Gsbstr[2#JXYXG
ste/p-J7int8strtol7sbstr,Septr,28G
strcpy7sbstr,WW8G
sbstr[#J5orstr[@#G
sbstr[-#J5orstr[#Gsbstr[2#JXYXG
ste/p2J7int8strtol7sbstr,Septr,28G
sbintJG
sbintJsb-[ste/p-#[ste/p2#Gstrcpy7sbt/p,WW8G
itoa7sbint,sbt/p,-8G
lenJstrlen7sbt/p8G
strcpy7sber,WW8Gif7lenJJ-8
strcat7sber,WW8Gstrcat7sber,sbt/p8G
strcat7sbopt,sber8G
FFinp.t s2 bo5
ste/p-JG
ste/p2JGstrcpy7sbstr,WW8G
sbstr[#J5orstr[(#G
sbstr[-#J5orstr[--#Gsbstr[2#JXYXG
ste/p-J7int8strtol7sbstr,Septr,28G
strcpy7sbstr,WW8G
sbstr[#J5orstr[)#G
sbstr[-#J5orstr[-#G
sbstr[2#JXYXGste/p2J7int8strtol7sbstr,Septr,28G
sbintJG
sbintJsb2[ste/p-#[ste/p2#Gstrcpy7sbt/p,WW8G
itoa7sbint,sbt/p,-8G
lenJstrlen7sbt/p8Gstrcpy7sber,WW8G
if7lenJJ-8
strcat7sber,WW8G
strcat7sber,sbt/p8G
-
8/12/2019 SMORT Documentation
48/66
strcat7sbopt,sber8G
FFinp.t s" bo5
ste/p-JG
ste/p2JGstrcpy7sbstr,WW8G
sbstr[#J5orstr[-2#G
sbstr[-#J5orstr[-@#Gsbstr[2#JXYXG
ste/p-J7int8strtol7sbstr,Septr,28G
strcpy7sbstr,WW8Gsbstr[#J5orstr[-"#G
sbstr[-#J5orstr[-3#G
sbstr[2#JXYXG
ste/p2J7int8strtol7sbstr,Septr,28GsbintJG
sbintJsb"[ste/p-#[ste/p2#Gstrcpy7sbt/p,WW8G
itoa7sbint,sbt/p,-8G
lenJstrlen7sbt/p8Gstrcpy7sber,WW8G
if7lenJJ-8
strcat7sber,WW8G
strcat7sber,sbt/p8Gstrcat7sbopt,sber8G
FFper/.tationstrcpy7fk-per,WW8G
fk-per[#Jsbopt[3#G
fk-per[-#Jsbopt[!#Gfk-per[2#Jsbopt[-#G
fk-per["#Jsbopt[2#G
fk-per[3#Jsbopt[@#G
fk-per[@#Jsbopt[#Gfk-per[#Jsbopt[#G
fk-per[!#Jsbopt["#G
fk-per[(#JXYXG
fkopJGfkinJGfk5orJG
strcpy7fk25oropt,WW8G
strcpy7fkt/p,WW8G
fkopJstrtol7fk-per,Septr,28G
fkinJstrtol7fk2l,Septr,28G
-
8/12/2019 SMORT Documentation
49/66
fk5orJfkopZfkinG
ltoa7fk5or,fkt/p,28G
lenJstrlen7fkt/p8Gfor7iJlenGiT(GiQQ8
strcat7fk25oropt,WW8G
strcat7fk25oropt,fkt/p8G
FFfk25oropt is the o.tp.t of fk2
FFIP 6-
strcpy7ipin0,WW8G
strcpy7ipt/p,WW8Gipt/p[#Jfk25oropt[#G
ipt/p[-#Jfk25oropt[-#G
ipt/p[2#Jfk25oropt[2#G
ipt/p["#Jfk25oropt["#Gipt/p[3#Jfk25oropt[3#G
ipt/p[@#Jfk25oropt[@#Gipt/p[#Jfk25oropt[#G
ipt/p[!#Jfk25oropt[!#G
ipt/p[(#Jfk2r[#Gipt/p[)#Jfk2r[-#G
ipt/p[-#Jfk2r[2#G
ipt/p[--#Jfk2r["#G
ipt/p[-2#Jfk2r[3#Gipt/p[-"#Jfk2r[@#G
ipt/p[-3#Jfk2r[#G
ipt/p[-@#Jfk2r[!#Gipt/p[-#JXYXG
ipin0[#Jipt/p[-#Gipin0[-#Jipt/p[-2#G
ipin0[2#Jipt/p["#G
ipin0["#Jipt/p[-@#G
ipin0[3#Jipt/p[#Gipin0[@#Jipt/p[@#G
ipin0[#Jipt/p[3#G
ipin0[!#Jipt/p[-"#Gipin0[(#Jipt/p[--#G
ipin0[)#Jipt/p[)#G
ipin0[-#Jipt/p[#Gipin0[--#Jipt/p[2#G
ipin0[-2#Jipt/p[(#G
ipin0[-"#Jipt/p[-#G
ipin0[-3#Jipt/p[-3#G
-
8/12/2019 SMORT Documentation
50/66
ipin0[-@#Jipt/p[!#G
ipin0[-#JXYXG
encJstrtol7ipin0,Septr,28G
ret.rn encG
-
8/12/2019 SMORT Documentation
51/66
CHAPTER % GLOMOSIM
-
8/12/2019 SMORT Documentation
52/66
GLOMOSIM
$ INTRODUCTION TO GLOMOSIM
+.r project has been done .sin1 a scalable si/.lation en0iron/ent called
Dlo$o:i/ 7for Dlobal $obile Infor/ation :yste/ :i/.lator8 that effecti0ely
.tilies parallel e5ec.tion to red.ce the si/.lation ti/e of detailed hi1h6fidelity
/odels of lar1e co//.nication networks Dlo$o:i/ has been desi1ned to be
e5tensible and co/posable? the co//.nication protocol stack for wireless
networks is di0ided into a set of layers, each with its own API $odels of protocols
at one layer interact with those at a lower 7or hi1her8 layer only 0ia these APIs he
/od.lar i/ple/entation enables consistent co/parison of /.ltiple protocols at a
1i0en layer he parallel i/ple/entation of Dlo$o:i/ can be e5ec.ted .sin1 a
0ariety of conser0ati0e synchroniation protocols, which incl.de the n.ll /essa1e
and conditional e0ent al1orith/s
$2 PARSEC
PAR:=* 7for PARallel :i/.lation =n0iron/ent for *o/ple5 syste/s8 is a
*6based si/.lation lan1.a1e de0eloped by the Parallel *o/p.tin1 Eaboratory at
U*EA, for se;.ential and parallel e5ec.tion of discrete6e0ent si/.lation /odels
It can also be .sed as a parallel pro1ra//in1 lan1.a1e PAR:=* r.ns on se0eral
platfor/s, incl.din1 /ost recent U%IL 0ariants as well as 4indows PAR:=*
adopts the process interaction approach to discrete6e0ent si/.lation An object
7also referred to as a physical process8 or set of objects in the physical syste/ is
represented by a lo1ical process Interactions a/on1 physical processes 7e0ents8
are /odeled by ti/e6sta/ped /essa1e e5chan1es a/on1 the correspondin1 lo1ical
processes +ne of the i/portant distin1.ishin1 feat.res of PAR:=* is its ability to
-
8/12/2019 SMORT Documentation
53/66
e5ec.te a discrete6e0ent si/.lation /odel .sin1 se0eral different asynchrono.s
parallel si/.lation protocols on a 0ariety of parallel architect.res PAR:=* is
desi1ned to cleanly separate the description of a si/.lation /odel fro/ the
.nderlyin1 si/.lation protocol, se;.ential or parallel, .sed to e5ec.te it h.s,
with few /odifications, a PAR:=* pro1ra/ /ay be e5ec.ted .sin1 the traditional
se;.ential 7Dlobal =0ent Eist8 si/.lation protocol or one of /any parallel
opti/istic or conser0ati0e protocols In addition, PAR:=* pro0ides powerf.l
/essa1e recei0in1 constr.cts that res.lt in shorter and /ore nat.ral si/.lation
pro1ra/s
$3 ABOUT GLOMOSIM
Dlo$o:i/ is a /obile si/.lator b.ilt .sin1 * lan1.a1e All /essa1e
transfers and other network ele/ents are handled by the indi0id.al layer codin1
b.ilt in * o /ake the concepts clear, Dlo$o:i/ pro0ides .sers with a
9is.aliation ool 7 9 8 b.ilt .sin1 Ka0a he 9 helps .s .nderstand the
network en0iron/ent, the node positions, /essa1e transfers, cl.sterin1 details, etc
$3$ G/MS A*+,+.*,
he networkin1 stack is deco/posed into a n./ber of layers as shown in
Ci1.re - A n./ber of protocols ha0e been de0eloped at each layer and /odels of
these protocols or layers can be de0eloped at different le0els of 1ran.larity
In o.r project we deal with all these layers, b.t /ost of the codin1 has been
i/ple/ented in the *l.sterin1 and Ro.tin1 layers he dyna/ic cl.sterin1al1orith/ e5plained in chapters 2 and " is i/ple/ented in these two layers he
cl.sterin1 al1orith/ has been f.lly i/ple/ented in the *l.sterin1 layer he
codin1 present in the Ro.tin1 layer has been lar1ely /odified accordin1 to the
cl.ster for/ation he al1orith/ .sed for ro.tin1 is the Bell/an6Cord al1orith/
-
8/12/2019 SMORT Documentation
54/66
his al1orith/ /aintains a ro.tin1 table for e0ery node bein1 si/.lated 4e ha0e
/odified the entries of this table based on the cl.ster for/ation which is dyna/ic
he co//.nication between the 0ario.s layers is acco/plished by /eans
of the 0ario.s APIs a0ailable A co//on API between two layers helps in the
co//.nication between those two layers A detailed description of the 0ario.s
APIs a0ailable and their f.nctions are 1i0en in section 3""
F6$$ G/MS A*+,+.*,
$3$2 G/MS L**.,:+ C44,/ S++.: ?* MAC + R5%
Cields? 7none8
his /essa1e is .sed by the $A* layer to re;.est infor/ation abo.t the c.rrent
channel stat.s
R,1*+ C44,/ S++.: ?* R5 + MAC%
Cields?status, flag
his /essa1e is .sed by the radio layer to ret.rn the c.rrent stat.s of the channel
as well as the /ethod by which the infor/ation is bein1 reported 7passi0ely or
acti0ely based on the re;.est /essa1e sent by the $A* layer8
MAC L
-
8/12/2019 SMORT Documentation
57/66
he sourceId refers to the ori1inal so.rce where the packet ori1inated Cor the
packet sent fro/ the network to the transport layer, the IP header is no lon1er a
part of the packet
N,+* L
-
8/12/2019 SMORT Documentation
58/66
his API is .sed by an application to infor/ *P to try to set.p a connection fro/
the 1i0en local port n./ber to the 1i0en re/ote address and port n./ber
Data packet to send from Application to TC!:
Cields?payload, packet"ize, connectionId
his API is .sed by an application to send a packet .sin1 on the 1i0en
connectionId
Connection Close from Application to TC!:
Cields? connectionId
his API is .sed by an application to close a partic.lar connection
#isten Socket "pen Result from TC! to Application:
Cields? localort, connectionId
his API is .sed by *P to infor/ the application abo.t the res.lt of tryin1 to
open a listen connection
Connection "pen Result from TC! to Application:
Cields? type, localort, remote/ddr, remoteort, connectionId
his API is .sed by *P to infor/ the application abo.t any connection that has
been opened to a re/ote address and port n./ber and the associated connection id
he connection type can be passi0e or acti0e
Data Sent Result from TC! to Application:
Cields? connectionId, packet"ize
his API is .sed by *P to infor/ the application abo.t the n./ber of bytes that
co.ld be sent d.e to the data sent re;.est 1enerated by the application for *P
Data Recei$ed from TC! to Application:
Cields? connectionId, payload, packet:ie
his API is .sed by *P to infor/ the application abo.t any data that has been
recei0ed on a connection
-
8/12/2019 SMORT Documentation
59/66
Connection Close Result from TC! to Application:
Cields? type, connectionId
his API is .sed by *P to infor/ the application abo.t the connection 1ettin1
closed as well as the type of connection close 7passi0e or acti0e8
-
8/12/2019 SMORT Documentation
60/66
C1+,* '% RESULT AND DISCUSSION
-
8/12/2019 SMORT Documentation
61/66
'$ SIMULATION RESULTS
In the si/.lation, we ha0e e5a/ined the perfor/ance of the proposed sec.rity
sche/e .nder beni1n and ad0erse en0iron/ents
S,4* % U45,* ,464 ,4@*4,4+
Under beni1n en0iron/ent, A+'96$AP sche/e and :A+'96$AP sche/e are
co/pared in order to 0erify the cost of the proposed sec.rity sche/eCi1.re 3
shows the packet deli0ery ratio plotted a1ainst /a5i/./ speed for A+'96$AP
witho.t sec.rity and with sec.rity As shown in Ci1.re 3, the packet deli0ery ratio
obtained .sin1 :A+'96$AP is abo0e )\ in all the node
Figure 5. Average byte routing load
-
8/12/2019 SMORT Documentation
62/66
speed and al/ost alike to that obtained .sin1 A+'96$AP his s.11ests that
:A+'96$AP is effecti0e in disco0erin1 and /aintainin1 ro.tes for deli0ery of
data packets, e0en with hi1h node /obility Ci1.re @ shows a0era1e byte ro.tin1
load for A+'9$AP and :A'+96$AP sche/es It can be obser0ed that a0era1e
byte ro.tin1 load in :A+'96$AP si1nificantly increases than A+'96$AP
sche/e after /a5i/./ speed of -/Fs At the node speed of - /Fs, a0era1e byte
ro.tin1 load for :A+'96$AP is abo.t 3\ hi1her than that of A+'96$AP
sche/e
S,4* 2% U45,* 5@,*:, ,4@*4,4+
In this scenario, the proposed sche/e is chosen to co/pare with the :RP .nder
ad0erse en0iron/ent 4e ha0e considered the /alicio.s nodes are e5isted in the
network and they can corr.pt the acc./.lated ro.te in all the re;.est packets and
re6broadcast 4e analyed the effect of /alicio.s nodes in :A+'96$AP with
0aryin1 the n./ber of /alicio.s nodes and co/pared with :RP 4e ha0e .sed -
*BR pairs
-
8/12/2019 SMORT Documentation
63/66
C1+,* &% CONCLUSION AND FUTURE WORK
-
8/12/2019 SMORT Documentation
64/66
CONCLUSION AND FUTURE WORK
In +.r project finally concl.ded that, we p.t forwarded A+'96$AP
sche/e and its sec.rity e5tension :A+'96$AP sche/e A+'9$AP sche/e is
rob.st and efficient /.ltipath ad6hoc ro.tin1 protocol It was intended to ha0e
sec.red A+'96$AP in order to pro0ide sec.rity a1ainst 0ario.s attacks as well as
to ha0e low load of crypto1raphic processin1 he si/.lation res.lts show that
:A+'96$AP is as efficient as A+'96$AP in disco0erin1 and /aintainin1
ro.tes It can be obser0ed that the perfor/ance of the proposed sche/e is better
than :RP sche/e in ter/s of packet deli0ery ratio in presence of /alicio.s nodes
In f.t.re work, we will e5tend o.r /.ltipath ro.tin1 protocol in hybrid ad6
hoc networks and e0al.ate the 1lobal IP connecti0ity .sin1 hybrid $A%=
sec.rity /echanis/
-
8/12/2019 SMORT Documentation
65/66
REFERENCES
[-# * : R $.rthy and B : $anoj, Ad Hoc 4ireless %etworks? Architect.resand Protocols, Prentice Hall PR, 23
[2# A %asip.ri, R *astaneda and : R 'as, Perfor/ance of $.ltipath Ro.tin1
for +n6'e/and Protocols in $obile Ad Hoc %etworks, $obile %etworks and
Applications , &l.wer Acade/ic P.blishers,2-, pp "")"3)
["# : $.eller, R P san1, and ' Dhosal, $.ltipath Ro.tin1 in $obile Ad Hoc
%etworks? Iss.es and *hallen1es, Perfor/ance ools and Applications to
%etworked :yste/s, Eect.re %otes in *o/p.ter :cience 9ol 2)@, 23, pp
2)2"3
[3# B 'ahill, B Ee0ine, = Beldin16Royer, and * :hields, A :ec.re Ro.tin1
Protocol for Ad Hoc %etworks, Uni0ersity of $assach.setts echnical Report
-"!, 2-
[@# & :an1iri, B 'ahill, ' EaCla//e, B Ee0ine, *:hields, and = Beldin16
Royer, A.thenticated Ro.tin1 for Ad Hoc %etworks, Ko.rnal on :elected Areas
in *o//.nications, 2"7"8, $arch 2@, pp @)(-
[# $+ Per0ai, $ *ardei, and K 4., Ro.tin1 :ec.rity in Ad Hoc 4ireless
%etworks, %etwork :ec.rity?7=ds8 : H.an1, ' $ac*all./, and '6
-
8/12/2019 SMORT Documentation
66/66