Differences

This shows you the differences between two versions of the page.

Link to this comparison view

content:tech:mdp [02/05/2014 12:28]
Andrew Bettison add section headers and bullet point about MDP port numbers
content:tech:mdp [22/11/2017 17:59] (current)
Andrew Bettison Replace entire out-of-date content with link to the up-to-date Serval DNA tech document.
Line 1: Line 1:
 ===== Mesh Datagram Protocol (MDP) ===== ===== Mesh Datagram Protocol (MDP) =====
  
-MDP was designed and first prototyped in May-June 2012 as part of the [[:content:activity:naf1|first New America Foundation contract]] to integrate Serval security into the OpenBTS base station, and development of [[:content:servalmesh:releases:version_0_90|release 0.90 “Shiny”]] of the Serval Mesh app for Android.  MDP is implemented in the [[Serval DNA]] component. +See the [[https://github.com/servalproject/serval-dna/blob/development/doc/Mesh-Datagram-Protocol.md|Mesh-Datagram-Protocol.md]] [[:content:dev:techdoc|technical document]].
- +
-MDP has been designed for use in a [[http://en.wikipedia.org/wiki/Wireless_mesh_network|wireless mesh network]], in which nodes may move and connections may be intermittent or of highly variable quality.  MDP is unrelated to the [[http://en.wikipedia.org/wiki/Internet_Protocol|Internet Protocol]], although it copies some concepts such as port numbers.  The main characteristics of MDP are: +
- +
-  * Every **address**, also known as a [[SID]], is a 256-bit public key in the [[crypto]] used by the [[Serval Mesh]].  The [[Security Framework]] describes this approach in more detail. +
- +
-  * Every node device may have one address ([[SID]]) or many, which it creates itself using random key generation.  The large size of the key space means that the [[http://en.wikipedia.org/wiki/Birthday_problem|probability of two devices having the same address]] remains negligible, even if the mesh grows to billions of devices. +
- +
-  * The payload of every MDP packet may be clear text, signed, or encrypted and signed.  (Encrypted but not signed is not currently an option, but future advances in the [[http://nacl.cace-project.eu|NaCl crypto library]] may make this possible.)  The encryption key is the public key (address) of the recipient, and the signing key is the private key of the sender. +
- +
-  * MDP is an [[http://en.wikipedia.org/wiki/Network_layer|OSI Level 3 (Network) layer]], and may be carried over any wireless or wired data link, whether over a shared medium (eg, [[http://en.wikipedia.org/wiki/CSMA/CA|CSMA/CA]] used in [[http://en.wikipedia.org/wiki/WiFi|Wi-Fi]]) or a dedicated medium (eg, [[http://en.wikipedia.org/wiki/Packet_radio|AX.25 packet radio]], [[http://en.wikipedia.org/wiki/Serial_cable|serial cable]]). +
- +
-  * MDP does not guarantee packet delivery or preserve packet order.  MDP may deliver duplicate copies of packets.  It is up to the MDP client applications using higher level protocols layered over MDP to detect duplicate and deal with lost and out-of-order packets. +
- +
-  * MDP uses per-hop retransmission to solve the cumulative end-to-end packet loss that can plague wireless networks.  (To carry a packet over **N** hops, where each hop has a probability **P** of dropping a packet due to interference or collision, the end-to-end loss is **1-(1-P)<sup>N</sup>**.  For example, given a per-hop packet loss of 10%, a five hop route has a net packet loss of 41%, and a ten hop route 75%.)  The retransmission scheme does not attempt to be perfect -- it does not guarantee zero packet loss and can produce duplicate packets -- but it can restore a practically unusable route to highly usable, independently of the route length, at the expense of higher latency, some packet re-ordering, and some duplicate packets. +
- +
-==== MDP packet structure ==== +
- +
-An **MDP packet** consists of a variable-length header followed by a variable-length payload which may have one of three forms, depending on the encryption settings in the header: +
- +
-{{https://raw.github.com/servalproject/serval-docs/master/linux.conf.au-2013/slides/png/Protocol%201%20-%20MDP%20packet.png?800}} +
- +
-  * Every packet has a //source// and //destination//  [[MDP port number]], which are completely unrelated to [[http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers|Internet port numbers]] In encrypted packets, these port numbers are part of the encrypted payload, which makes it harder for an eavesdropper to guess the purpose of the packet. +
- +
-==== Implementations ==== +
- +
-All implementations to date are part of the [[Serval DNA]] daemon. +
- +
-  * MDP was first carried over [[http://en.wikipedia.org/wiki/WiFi|Wi-Fi]] using the [[Overlay network]] encapsulation. +
-  * MDP was then carried over the packet radio of the [[Mesh extender]] without any other protocol encapsulation.+
  

Login