A Survey of Wireless Sensor Network Routing Protocols based on SPIN

SPIN(Sensor Protocols for Information via Negotiation) comprises of a set of adaptive protocols that proficiently disseminate data in wireless sensor network(WSN).SPIN overcomes certain deficiencies associated with some of the data dissemination protocols & brings in more efficiency. WSNs have limited energy and hence efficiency of protocol has a significant impact on network‟s lifetime. Many protocols have been developed that are based on SPIN and are its modifications. This paper presents a survey on SPIN protocol and the various protocols devised which use SPIN as a base in one or another way


OVERVIEW OF SPIN
SPIN protocols are data-centric. The authors of SPIN [1], mention four protocols as a part of the SPIN protocols. Following are some details associated with these protocols: SPIN Messages ADV: new data advertisement message containing meta-data. REQ: Request for data. DATA: data message Meta-Data: SPIN doesn"t specify meta-data"s format which is considered to be application specific. However, if for sensor data X, x is the meta-data descriptor, the size of x in bytes ought to be lesser than size of X.
The following sub-sections discuss the four SPIN protocols.

SPIN-PP
SPIN-PP [1] is for point-to-point transmission. The protocol begins when a node advertises new data that it wants to disseminate. It sends ADV message to its neighbors. If the neighboring node needs the data, it sends REQ message. The initiator responds by sending DATA message containing the required data. Figure 1 indicates data dissemination in SPIN-PP. Node B request data from node A which had advertised its data to B. After receiving the data, B further advertises data to its neighbors. If node B has its own data, it can aggregate it with the received data. Every node needs to be aware of its one-hop neighbors only. SPIN-PP has been designed for lossless networks, but can be adapted for lossy or mobile networks.

SPIN-EC
SPIN-EC [1] incorporates energy-conservation heuristic to SPIN-PP protocol. If a node obtains some new data, it only starts the three-stage protocol (ADV-REQ-DATA), if it has enough energy to take part in full protocol with its neighbors. If node receives ADV message, it sends out REQ only if it has sufficient energy to send REQ & receive DATA. M a y 1 4 , 2 0 1 4

Figure 1: SPIN-PP protocol. Node A advertises its data to node B (1). Node B sends request for the data to A (2).
After receiving data (3), node B sends advertisement to its neighbors (4), who further request back to B.

SPIN-BC
SPIN-BC [1] is for broadcast media. All the messages are transmitted to broadcast address and processed by all nodes in sender"s transmission range. The example in figure 2 clarifies its operation.

SPIN-RL
SPIN-RL [1] is reliable version of SPIN-BC for lossy networks. Each node maintains track of which advertisements it happens to hear from which nodes, and if it does not get the data in certain time period after requesting, it re-requests. In SPIN-RL nodes restrain the rate at which they resend data. If node sends particular chunk of data in DATA message, it waits for pre-set time duration before answering any more requests for the same data.

SPIN-IT
SPIN-IT [2], (SPIN-Image Transfer) is a routing protocol for mobile & ad-hoc networks that allows efficient image retrieval on the basis of meta-data queries. SPIN-IT provides low bandwidth query based communication before image data"s transfer. Its working is as follows: Nodes request data by sending REQ message to broadcast address. All nodes in transmission range receive the request & keep account of the REQ messages received utilizing originating number identifier & unique request sequence number. New requests are re-broadcasted. Each node includes its source-ID to REQ header for setting up reverse path route. When request arrives at node having the needed data, it sends DATA message back to the node that requested it. The authors mention that in protocol"s current implementation, its ROUTE-REPLY message that"s used do that if requesting node gets multiple replies. It can select the "optimal" source. For simulation, authors use DSR (Dynamic Source Routing) [3] in which route-record is maintained in ROUTE-REPLY packet header. The "data" involved will be huge being image data, so shortest path routing might not be optimal. Routes can be formed based on stability or energy-constraints. SPIN-IT can flexibly use various types of routing. Figure 3 clarifies the working of SPIN-IT.

Alternative Protocol
Using centralized directory has been mentioned as an alternative to distributed method of SPIN-IT. Each node maintains route to central node (which maintains directory of all nodes and map of existing network topology).UPDATE messages are sent to central node, so that it can maintain the map. Nodes request data from central node which replies after performing directory look-up. SPIN-IT has overhead of REQ packets flooded through network and ROUTE-REPLY from source to requesting node. For centralized scheme, overhead are UPDATE messages to central node, REQ & ROUTE-REPLY messages between requester & central node. The simulation results show that SPIN-IT is more proficient when new data"s arrival at each node is higher than arrival of new requests for data at every node. Centralized scheme is better when number of updates is lesser.

Secure-SPIN
Secure-SPIN (Secure Sensor Protocol for Information via Negotiation for Wireless Sensor Networks) [4] is secure extension of SPIN protocol. It follows a clustering-based SPIN approach, which divides nodes into different classes & each class does random selection of Cluster-Head (CH). Table 1 summarizes the notations used. Sink sends AC to every node through CH. Each node creates PSAC using AC XOR its privacy key Ki.

PSAC=AC XOR Ki
The node that wants to be CH sends request message containing its PSAC. The sink authenticates the node by getting node"s key as per its PSAC. If privacy key exists in its list, its authenticated to be legal node. Sink decides if the node can be CH or not. If it can, then sink transmits all nodes" privacy key in this class to CH.
In ADV message phase, the node that wants to share its data, encrypts ADV message with its PSAC and sends it to CH. The CH using sending node"s private key & current AC decrypts the received ADV.
In REQ sending phase, the CH sends REQ message to source node.
In DATA message phase, if node wishes to transmit data to its CH, it XORs data with its PSAC, subsequently appends MAC and transmits packet to CH using its CDMA code. The CH upon reception of data, draws out Ki corresponding to the code and checks MAC to check data alteration. If data hasn"t been altered, sink XORs data with Ki and current AC.
Original data is obtained as a result.
The security protocol is applicable to sink-CH and CH-node communication. The authors mention that data authentication is achieved by encrypting ADV message with PSAC.As PSAC is generated by Ki, data confidentiality is ensured.MAC code ensures data integrity. Use of session key provides data freshness. Further CDMA technique improves secure communication.

S-SPIN
S-SPIN [5], is secure extension of SPIN that uses the ADV-REQ-DATA message scheme. The authors use MAC (Message Authentication Code) to protect ADV & REQ messages. A cryptographic scheme for DATA message hasn"t been specified, as its assumed to be application-specific. Its assumed each pair of neighboring nodes share a pair wise key.
In ADV Stage, once a node has new data, it sends ADV message to its neighbors. The initiator is denoted by symbol S. In the ADV message a MAC list (containing MAC in order of identifier list for its neighbors) and an integer n are included.
In REQ stage, the neighboring node, if in need of the advertised data, at first verifies the correctness of corresponding MAC in MAC list. MACreq is created from pair wise key between S & destination (D) .If verified, REQ message (including the integer n & MACreq) is sent to the initiator.
In DATA stage, S checks n and then checks MACreq. If its verified to be okay, S sends DATA message to D.

ESPIN
In "Energy Conservative Wireless Sensor Networks for Black Pepper Monitoring in Tropical Area" [6],the authors propose ESPIN(Energy-efficient SPIN) to solve energy saving problem, with the idea of designing energy-efficient solution for monitoring black pepper agriculture in tropical areas. Figure 4 shows the system architecture considered. The system has 15 nodes, a base station that"s connected to client terminal by Internet. The gathered data is sent to client terminal through GPRS. M a y 1 4 , 2 0 1 4  Negotiation phase: Source node sends ADV message. The receiving node, checks if its nearer to sink or not as compared to node that has sent ADV message. If hop distance of receiving node is smaller than hop distance included in ADV message received, then REQ message is sent to sending node (which then sends DATA message).

Data transmission phase:
This phase is same as in SPIN protocol.

SPMS
Shortest Path Minded SPIN (SPMS) [7], utilizes multi-hop model for data transmission & thus avoids exponential energy usage with distance. It keeps routing table for a zone, defined as node"s highest power level. Every node can create routing table with shortest path by employing Bellman-Ford algorithm. The Steps involved include: Node having data to share, advertises it. Neighbor needing that data, sends request message. If the node that sent the advertisement isn"t the next hop neighbor, it waits a certain amount of time before sending request. Data is sent to requesting node through shortest path (except in case of node failure).
In case of node failure, if previous node on shortest path fails, current node transmits request to node, from which it had initially got advertisement message. PRONE (Primary Originator Node) is maintained by each node ,which is energyproficient data source while SCONE(Secondary Originator Node) is alternative node in case PRONE fails.

SPMS-Rec-RS
SPMS-Rec Request Suppression (SPMS-Rec-RS), [8] is an extension of SPMS-Rec mentioned along with SPMS-Rec. It decreases the redundant transmissions by suppressing redundant requests. Consider a node P that has initiated or forwarded a request for data from node S. During wait for data, it receives request for same data from node Q. Node P can opt for suppressing the forwarding of request if its already attempting to obtain that data or already possesses it. This protocol involves increased maintenance of state by intermediate nodes, since nodes have to maintain not only request packet forwarded, but also id of nodes whose requests have been repressed.

EDAS
Energy and Distance Aware data dissemination protocol based on SPIN (EDAS) [9], classifies nodes as primary nodes that transfer data to their zones or secondary nodes that receive data. Its working is as follows: 1. Primary node broadcasts an advertisement to its neighbors.
2. Neighbors receiving the advertisement set their timer inversely proportional to N m .
3. The neighbor to time-out first, becomes primary node and broadcasts advertisement.
4. If the primary node broadcasting the original advertisement, hears advertisement message again, it transmits data to the node from which it got the message.
5. If a node which hasn"t timed-out, receives advertisement message again, becomes the secondary node and sends a request message to node from which it received the message.
6. If a node hears the advertisement for first time, proceed to step 2.
7. All nodes repeat the above process, until they get the needed data [10].

CBS
Cluster Based SPIN (CBS) [11], is a combination of LEACH and SPIN. The network is organized into clusters. Nodes take turn to become cluster-head (CH), hence CHs "rotate" to balance energy usage in network. Its working is as follows: After cluster creation, each node wanting to disseminate its data in network, advertise it to CH and then CH request for data. After receiving data, it advertises it to neighboring CHs. After data delivery to CHs is done then CH propagate data amongst its member nodes in SPIN style. All CHs do the same procedure. Hence data is disseminated in the whole network.

D3
D3 (Data-centric Data Dissemination) [12] unites the benefits of data-centric routing like SPIN and Directed Diffusion (DD) [13]. Following message types have been specified in D3: INT: Interest, which is propagated from a node to rest of the nodes. It describes what type of data sink is interested in. Depth of a node, which is its hop distance to sink, with respect to interest too is stored by each node. ADV: Data advertisement. A node which has data of some interest, it informs all neighbors about it using interest identifier & its depth. DATA: Data message Its working is as follows: The basic working is evident in Figure 6.  [14] routing algorithm targets the "blindly forward" and "data inaccessible" problems of SPIN. It includes three phases, which are as follows: Data broadcasting stage: When source node has new data, it broadcasts ADV message to its neighbors and starts a timer.
Data requesting stage: After neighbors receive ADV message, they estimate if they have sufficient energy to complete the work of three stages. If the node has the data broadcasted, it sets the REQ message flag as 1, returns its energy value to source node by REQ message. If neighbors don"t possess the data, but have sufficient energy to carry out the work, flag of REQ message is set to 0, and its sent back along with energy value to source node.

Data transmission stage:
The source node filters the nodes whose flags are 0 and sends data to node with highest energy value. If they possess equal energy value, random selection is done. If the timer duration is greater than threshold, and all flags are 1,"data inaccessible" problem occurs. The source node chooses a node with highest value from its neighbor list and sends data necessarily. It then deletes the nodes from neighbor list, who don"t request data.

MS-SPIN
MS-SPIN [15] involves main features of SPIN and tackles the security issues as well. Its based on the concept of secure multicasting. Its assumed that each node has a private key, used to confirm authenticity. Table 2 summarizes the terminology used. Find packet Packet broadcasted to find out nearest secondary CA Ack-packet Packet sent by sink to source notifying about reception of initial packet End-packet Packet from source to destination, notifying end of data transfer.

Office
Main center for data storage Its working involves the following phases: 1. Initial phase: Nodes try to figure out the Secondary CA using Find-packet, to which they have to connect.

Setup phase:
Allocation of secondary IP addresses to nodes is accomplished in this. It further includes setting up Main CA, Secondary CA and CH. After Secondary CA setup procedure completion Ack-packet is sent to Main CA and similarly after CH setup completion, Ack-packet is transmitted to Secondary CA.