IMPLEMENTING BYZANTINE ALGORITHM ON WIRELESS SENSOR NETWORKSGuided By:- Prof. GaurangRavalPresented By:Shatadru Chattopadhyay(07BIT005)Herat Gandhi(07BIT012)ShashankJuyal(07BIT017)
AGENDAIntroductionGoals and ObjectivesConstraintsTools and Technologies usedConceptsByzantine Failure Byzantine fault tolerant AlgorithmDeliverablesByzantine Implementation on Mesh NetworksByzantine Implementation on multi-hop networksByzantine implementation on multi-hop networks using power based routingComparison between algorithmsPractical DemonstrationFuture Scope
INTRODUCTIONGoals and ObjectivesImplementation of Byzantine Fault Tolerance AlgorithmSimulation of algorithm using TOSSIMDeployment over hardware motesMeasuring time required by each mote and optimizing itEfficient utilization of resources on Hardware motesPower Efficient Algorithms
IntroductionconstraintsInterference along the 2.4 GHz ISM band since most wireless devices tend to use this band for communication.Noise Level across links should be known.TOSSIM cannot simulate for heterogeneous networks.Because it is developed in TinyOS 2.1.1 it is backward incompatible.
IntroductionfunctionalitiesDetecting and Isolating faulty motes and keeping the network robust enough to communicateMaintaining power efficiencyA power efficient routing protocolA client server simulator for analysts to analyze their networks and topologiesGraphical Analysis and Report Generation
Introductiontools and technologiesNetBeans6.9.1TinyOSPowerTOSSIM-ZTOSSIMPython
Conceptsbyzantine faultThe term Byzantine was first used for the type of failure where faulty motes may exhibit completely unconstrained behavior.Derived from some traitorous generals of the Greek Byzantium EmpireThe Byzantine Problem assumes that the network is an n-mote connected undirected graphEach mote starts with an input from a fixed value set V .The goal is for the motes to eventually output decisions from the set V, with the possibility that a limited number (at most f) of motes might fail.
Conceptsbyzantine fault tolerant algorithmIn order to broadcast (m, i, r) at round r, mote i sends a message (“init', m, i, r) to all motes at round r. If mote j receives an ("init", m, i, r) message from mote i at round r, it sends ("echo", m, i, r) to all motes at round r + 1.If, before any round r > r + 2, mote j has received ("echo", m, i, r) messages from at least f + 1 motes, then j sends an ("echo", m, i, r) message at round r (if it has not already done so).If, by the end of any round r > r + l, mote j has received ("echo", m, i, r) messages from at least n - f motes, then j accepts the communication at round r(if it has not already done so).
conceptsCollection tree protocol(CTP)A collection protocol builds and maintains minimum cost trees to nodes that advertise themselves as tree roots.Two methods The first is data path validation using data packets to dynamically probe and validate the consistency of its routing topology.The second is adaptive beaconing, which extends the Trickle code propagation algorithm so it can be applied to routing control traffic.CTP uses expected transmissions (ETX) as its routing gradient.A root has an ETX of 0. The ETX of a node is the ETX of its parent plus the ETX of its link to its parent.
ConceptsdisseminationMajor Dissemination Protocols are DRIP-Each data item is independently advertised and disseminated. Metadata is not shared among data itemsDIP-It is a modification of the Drip protocol. Advertisement messages are used for a fixed data set meaning all nodes must agree on a fixed set of data item identifiers before dissemination. DHV-Advertisement messages are used for a fixed data set meaning all nodes must agree on a fixed set of data item identifiers before dissemination.
Deliverablesimplementation on mesh networksStage 1: All stations send HELO packet to the base stationStage 2: Base Stations sends ‘n’-the number of motes in the network, to all stationsStage 3: A node sends an INIT packet to all other motesStage 4: If having received INIT packet, motes send ECHO packet to all other motesStage 5: If a mote has received ‘n-f’ ECHO packets, f being the number of faulty motes, then communication is successfully established
Implementation on mesh networksPacket structuresHELO Packet-16 bit packetContains mote ID of the mote sending itINIT Packet-32 bit packetSent only once by a moteConsists sender`s mote IDECHO Packet-32 bit packetSent in reply to receiving an INITConsists of the mote ID of sender
Implementation over mesh networksresultsProbability vs. Number of Motes(n)
Implementation over mesh networksresultsEnergy(mJ) vs. Time(msecs)
Implementation over mesh networksresultsEnergy(mJ) vs. Probability
deliverablesImplementation over multi-hop networksFirst stage: All motes send HELO packet to base station using CTP and base station finds total number of motes in network.Second stage: Base station sends “n (number of motes)” to all motes using Dissemination.Third stage:In this stage one node will be randomly selected and will disseminate INIT packet using the Drip algorithm in the network.Fourth stage: After receiving INIT packet, motes send ECHO packet. Motes keep counter of ECHO packets.Fifth stage: If any mote has received n-f ECHO packets in previous round then it establishes successful communication.
Implementation over multi-hop networksPacket structuresHELO Packet-16 bit packetContains mote ID of the mote sending itINIT Value-Is a value disseminated over the networkValue disseminated using DRIPIf a value of 0 is received it is interpreted as INIT valueECHO Value-Is a value disseminated over the networkValue disseminated using DRIPIf a value other than 0 is received it is interpreted as ECHO
Implementation over multi-hop networksresultsEnergy vs. Number of Motes(n)
Implementation over multi-hop networksresultsTime vs. Number of Motes(n)
Deliverablesimplementation using power based routingFirst stage: All motes send HELO packet to base station using CTP and base station finds total number of motes in network. Second stage: Base station sends “n (number of motes)” to all motes using Dissemination.Third stage: Each mote sends HELO packet to its neighbor. Fourth stage: After receiving HELO packet from neighbor mote sends ACK packet to sender mote. After receiving ACK packet mote measures its RSSI value and stores all necessary information. Each mote also stores which mote can be selected as its parent. Continued……..
continuedFifth stage: Information collected from the previous stage is sent to base station using FRNDS packet and base station processes this information and creates routing table.Sixth stage: Base station sends pruned routing table to all motes. Seventh stage: In this stage one node will be randomly selected and will disseminate INIT packet using pruned routing table.  Eighth stage: After receiving INIT packet, motes send ECHO packet. Motes keep counter of ECHO packets.  Ninth stage: If any mote has received n-f ECHO packets in previous round then it establishes successful communication.
implementation using power based routingPacket structuresHELO Packet-16 bit packetContains mote ID of the mote sending itINIT Value-Is a value disseminated over the networkValue disseminated using DRIPIf a value of 0 is received it is interpreted as INIT valueECHO Value-Is a value disseminated over the networkValue disseminated using DRIPIf a value other than 0 is received it is interpreted as ECHOFRNDS Packet-Contains neighbor information and power required to transmit to them
implementation using power based routingresultsEnergy vs. Number of motes
implementation using power based routingresultsTime vs. Number of motes
Comparison between algorithms
SimulatorA client server based simulatorIt is aimed at network analysts to analyze topologiesCan work for particular or a randomly generated topologyProvides graphical analysis as well as reports for the topology and its energy consumptionWorks over the internet and TOSSIM needs to be installed only in the server hence saves from installing TinyOS.
simulatorreports-power analysis
simulatorreports-network graph
simulatorreports-power graph
Practical Demonstration
Future scopeSome improvements in the Algorithm can be done by using the routing table generated by the Base Station using power based routing in the implementation of Byzantine algorithm to make it more efficient and feasible over large network.This simulator performs all processing part on server and client can view result by communicating with server. This architecture can be extended to use cloud computing.
bibliographyD Gay, P Levis, ‘The NesC language: A holistic approach to network embedded systems’, ACM 2003Nancy Lynch, ‘Distributed Algorithms’, Morgan Kaufmann Inc. 1997\Philip Levis, ‘TOSSIM: Accurate and Scalable simulation of entire TinyOS applications’.Enrico Perla, Art O Cathain, ‘PowerTOSSIM z: Realistic Energy Modeling for Wireless Sensor Network Environments’Jessica Staddon, Dirk Balfanz and Glenn Durfee, ‘Efficient Tracing of Failed Nodes in Sensor Networks’, Palo Alto reasearch Center, October 1 2002. Thomas Clouqueur, ‘Fault Tolerance in Collaborative Sensor Networks for Target Detection, IEEE Conference, March 2004.Carolos Livadas and Nancy A. Lynch, ‘A Reliable Broadcast Scheme for Sensor Networks’.H.A. Ali, ‘An efficient relative broadcast algorithm in Adhoc networks based on Self-Pruning’, Egypt.
referenceshttp://docs.tinyos.nethttp://netbeans.org/kb/docs/ide/overview-screencast.htmlhttp://www.millennium.berkeley.eduhttp://www.eecs.harvard.edu/~mainland/tinyoshttp://www.cs.berkeley.edu/~pal/research/tossim.htmlhttp://deneb.cs.kent.eduhttp://vimeo.com/channels/tinyoshttp://cs.acadiau.ca/~shussain/wsn/apps/tos2/index.html
Thank YOu

Implementation Of Byzantine Fault Tolerant Algorithm on WSN

  • 1.
    IMPLEMENTING BYZANTINE ALGORITHMON WIRELESS SENSOR NETWORKSGuided By:- Prof. GaurangRavalPresented By:Shatadru Chattopadhyay(07BIT005)Herat Gandhi(07BIT012)ShashankJuyal(07BIT017)
  • 2.
    AGENDAIntroductionGoals and ObjectivesConstraintsToolsand Technologies usedConceptsByzantine Failure Byzantine fault tolerant AlgorithmDeliverablesByzantine Implementation on Mesh NetworksByzantine Implementation on multi-hop networksByzantine implementation on multi-hop networks using power based routingComparison between algorithmsPractical DemonstrationFuture Scope
  • 3.
    INTRODUCTIONGoals and ObjectivesImplementationof Byzantine Fault Tolerance AlgorithmSimulation of algorithm using TOSSIMDeployment over hardware motesMeasuring time required by each mote and optimizing itEfficient utilization of resources on Hardware motesPower Efficient Algorithms
  • 4.
    IntroductionconstraintsInterference along the2.4 GHz ISM band since most wireless devices tend to use this band for communication.Noise Level across links should be known.TOSSIM cannot simulate for heterogeneous networks.Because it is developed in TinyOS 2.1.1 it is backward incompatible.
  • 5.
    IntroductionfunctionalitiesDetecting and Isolatingfaulty motes and keeping the network robust enough to communicateMaintaining power efficiencyA power efficient routing protocolA client server simulator for analysts to analyze their networks and topologiesGraphical Analysis and Report Generation
  • 6.
  • 7.
    Conceptsbyzantine faultThe termByzantine was first used for the type of failure where faulty motes may exhibit completely unconstrained behavior.Derived from some traitorous generals of the Greek Byzantium EmpireThe Byzantine Problem assumes that the network is an n-mote connected undirected graphEach mote starts with an input from a fixed value set V .The goal is for the motes to eventually output decisions from the set V, with the possibility that a limited number (at most f) of motes might fail.
  • 8.
    Conceptsbyzantine fault tolerantalgorithmIn order to broadcast (m, i, r) at round r, mote i sends a message (“init', m, i, r) to all motes at round r. If mote j receives an ("init", m, i, r) message from mote i at round r, it sends ("echo", m, i, r) to all motes at round r + 1.If, before any round r > r + 2, mote j has received ("echo", m, i, r) messages from at least f + 1 motes, then j sends an ("echo", m, i, r) message at round r (if it has not already done so).If, by the end of any round r > r + l, mote j has received ("echo", m, i, r) messages from at least n - f motes, then j accepts the communication at round r(if it has not already done so).
  • 10.
    conceptsCollection tree protocol(CTP)Acollection protocol builds and maintains minimum cost trees to nodes that advertise themselves as tree roots.Two methods The first is data path validation using data packets to dynamically probe and validate the consistency of its routing topology.The second is adaptive beaconing, which extends the Trickle code propagation algorithm so it can be applied to routing control traffic.CTP uses expected transmissions (ETX) as its routing gradient.A root has an ETX of 0. The ETX of a node is the ETX of its parent plus the ETX of its link to its parent.
  • 11.
    ConceptsdisseminationMajor Dissemination Protocolsare DRIP-Each data item is independently advertised and disseminated. Metadata is not shared among data itemsDIP-It is a modification of the Drip protocol. Advertisement messages are used for a fixed data set meaning all nodes must agree on a fixed set of data item identifiers before dissemination. DHV-Advertisement messages are used for a fixed data set meaning all nodes must agree on a fixed set of data item identifiers before dissemination.
  • 12.
    Deliverablesimplementation on meshnetworksStage 1: All stations send HELO packet to the base stationStage 2: Base Stations sends ‘n’-the number of motes in the network, to all stationsStage 3: A node sends an INIT packet to all other motesStage 4: If having received INIT packet, motes send ECHO packet to all other motesStage 5: If a mote has received ‘n-f’ ECHO packets, f being the number of faulty motes, then communication is successfully established
  • 13.
    Implementation on meshnetworksPacket structuresHELO Packet-16 bit packetContains mote ID of the mote sending itINIT Packet-32 bit packetSent only once by a moteConsists sender`s mote IDECHO Packet-32 bit packetSent in reply to receiving an INITConsists of the mote ID of sender
  • 14.
    Implementation over meshnetworksresultsProbability vs. Number of Motes(n)
  • 15.
    Implementation over meshnetworksresultsEnergy(mJ) vs. Time(msecs)
  • 16.
    Implementation over meshnetworksresultsEnergy(mJ) vs. Probability
  • 17.
    deliverablesImplementation over multi-hopnetworksFirst stage: All motes send HELO packet to base station using CTP and base station finds total number of motes in network.Second stage: Base station sends “n (number of motes)” to all motes using Dissemination.Third stage:In this stage one node will be randomly selected and will disseminate INIT packet using the Drip algorithm in the network.Fourth stage: After receiving INIT packet, motes send ECHO packet. Motes keep counter of ECHO packets.Fifth stage: If any mote has received n-f ECHO packets in previous round then it establishes successful communication.
  • 18.
    Implementation over multi-hopnetworksPacket structuresHELO Packet-16 bit packetContains mote ID of the mote sending itINIT Value-Is a value disseminated over the networkValue disseminated using DRIPIf a value of 0 is received it is interpreted as INIT valueECHO Value-Is a value disseminated over the networkValue disseminated using DRIPIf a value other than 0 is received it is interpreted as ECHO
  • 19.
    Implementation over multi-hopnetworksresultsEnergy vs. Number of Motes(n)
  • 20.
    Implementation over multi-hopnetworksresultsTime vs. Number of Motes(n)
  • 21.
    Deliverablesimplementation using powerbased routingFirst stage: All motes send HELO packet to base station using CTP and base station finds total number of motes in network. Second stage: Base station sends “n (number of motes)” to all motes using Dissemination.Third stage: Each mote sends HELO packet to its neighbor. Fourth stage: After receiving HELO packet from neighbor mote sends ACK packet to sender mote. After receiving ACK packet mote measures its RSSI value and stores all necessary information. Each mote also stores which mote can be selected as its parent. Continued……..
  • 22.
    continuedFifth stage: Informationcollected from the previous stage is sent to base station using FRNDS packet and base station processes this information and creates routing table.Sixth stage: Base station sends pruned routing table to all motes. Seventh stage: In this stage one node will be randomly selected and will disseminate INIT packet using pruned routing table.  Eighth stage: After receiving INIT packet, motes send ECHO packet. Motes keep counter of ECHO packets.  Ninth stage: If any mote has received n-f ECHO packets in previous round then it establishes successful communication.
  • 23.
    implementation using powerbased routingPacket structuresHELO Packet-16 bit packetContains mote ID of the mote sending itINIT Value-Is a value disseminated over the networkValue disseminated using DRIPIf a value of 0 is received it is interpreted as INIT valueECHO Value-Is a value disseminated over the networkValue disseminated using DRIPIf a value other than 0 is received it is interpreted as ECHOFRNDS Packet-Contains neighbor information and power required to transmit to them
  • 24.
    implementation using powerbased routingresultsEnergy vs. Number of motes
  • 25.
    implementation using powerbased routingresultsTime vs. Number of motes
  • 26.
  • 27.
    SimulatorA client serverbased simulatorIt is aimed at network analysts to analyze topologiesCan work for particular or a randomly generated topologyProvides graphical analysis as well as reports for the topology and its energy consumptionWorks over the internet and TOSSIM needs to be installed only in the server hence saves from installing TinyOS.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
    Future scopeSome improvementsin the Algorithm can be done by using the routing table generated by the Base Station using power based routing in the implementation of Byzantine algorithm to make it more efficient and feasible over large network.This simulator performs all processing part on server and client can view result by communicating with server. This architecture can be extended to use cloud computing.
  • 33.
    bibliographyD Gay, PLevis, ‘The NesC language: A holistic approach to network embedded systems’, ACM 2003Nancy Lynch, ‘Distributed Algorithms’, Morgan Kaufmann Inc. 1997\Philip Levis, ‘TOSSIM: Accurate and Scalable simulation of entire TinyOS applications’.Enrico Perla, Art O Cathain, ‘PowerTOSSIM z: Realistic Energy Modeling for Wireless Sensor Network Environments’Jessica Staddon, Dirk Balfanz and Glenn Durfee, ‘Efficient Tracing of Failed Nodes in Sensor Networks’, Palo Alto reasearch Center, October 1 2002. Thomas Clouqueur, ‘Fault Tolerance in Collaborative Sensor Networks for Target Detection, IEEE Conference, March 2004.Carolos Livadas and Nancy A. Lynch, ‘A Reliable Broadcast Scheme for Sensor Networks’.H.A. Ali, ‘An efficient relative broadcast algorithm in Adhoc networks based on Self-Pruning’, Egypt.
  • 34.
  • 35.