• No results found

2.4 Protocol Definitions

2.4.1 Network Management

WSNFS provides a link-state protocol type network. It continuously maintains network topology at each node to facilitate minimal-hop routing from any source to any destination within the network. As discussed in Section 2.3.1, WSNFS avoids use of “special” nodes to enable network uniformity. All nodes within a WSNFS network have the same knowledge of the network topology to ensure redundancy against failure and allow external data sinks to connect to the network at any location. WSNFS network formation and management is defined by four states: discovery, mapping, routing, and maintenance.

Discovery

The discovery state is responsible for identifying 1-hop neighbors. This is accom- plished by broadcasting a discovery message on a random interval. The random interval is in place to reduce the likelihood of communication collisions between neighboring nodes (also possibly in the discovery state). Any node that receives a discovery message responds by generating a discovery response. Nodes in the discovery state that receive a discovery response message add the corresponding responder to a their local neighbor list. The WSNFS discovery protocol rules are summarized as follows:

1. Discovery messages are broadcast at random intervals without retransmission.

2. Discovery response messages are sent in reply to all received discovery messages.

3. When a discovery message reply is received, the originating node is added to the 1-hop neighbor list.

4. The discovery state is concluded when the neighbor list no longer changes.

Mapping

The mapping state allows each node in the network to identify the network topology. Each node broadcasts a mapping message that includes the originating 1-hop neigh- bor list. Additionally, as each mapping message is forwarded through the network, each relay node appends its identification data to form a route list for each mapping message. Upon receiving a mapping message, each node builds an adjacency table,

which is used for determining the shortest path between any two known nodes in the network. The WSNFS mapping protocol rules are summarized as follows:

1. Mapping messages includes a unique (to generating node) packet identifier, origin of packet, associated 1-hop neighbor list, and network path traversed. 2. Mapping messages are broadcast at random intervals with retransmission lim-

ited to desired network maximum hop size.

3. Mapping messages are not forwarded if a message with the same ID and origin have been previously received. (This rule applies to broadcasts in general.) 4. Mapping messages are not forwarded if the retransmission limit is exceeded. 5. The mapping message path field is appended with the receiving node identifier

before being relayed.

6. The mapping state is concluded when the adjacency table no longer changes. Figure 2.3 shows an example of mapping message propagation through a representa- tive 3Ö3 network, in which Node 9 broadcasts a mapping message to the network. For this example, the mapping message is represented by a rectangular box showing the message’s internal state, and the top-right corner of the box indicates the message’s current location in the network. The color of the location box indicates whether the message should be rebroadcast: green indicating retransmission and red indicating no rebroadcast.

As seen in Figure 2.3, Node 9 broadcasts its 1-hop neighbor table, which in this case includes nodes 6 and 8. In the initial state, at the top of the figure, we see

Source: 9 Re-trans: 3 Neighbors: 6,8 Path:9 1 2 3 4 5 6 7 8 9 9 Source: 9 Re-trans: 3 Neighbors: 6,8 Path:9 6 Source: 9 Re-trans: 3 Neighbors: 6,8 Path:9 8 Source: 9 Re-trans: 2 Neighbors: 6,8 Path:9,8 5 Source: 9 Re-trans: 2 Neighbors: 6,8 Path: 9,8 7 Source: 9 Re-trans: 2 Neighbors: 6,8 Path: 9,6 3 Source: 9 Re-trans: 2 Neighbors: 6,8 Path: 9,6 5 Source: 9 Re-trans: 1 Neighbors: 6,8 Path: 9,6,5 2 Source: 9 Re-trans: 1 Neighbors: 6,8 Path: 9,6,5 4 Source: 9 Re-trans: 1 Neighbors: 6,8 Path: 9,6,5 8 Source: 9 Re-trans: 1 Neighbors: 6,8 Path: 9,6,3 2 Source: 9 Re-trans: 1 Neighbors: 6,8 Path: 9,8,7 4 Source: 9 Re-trans: 0 Neighbors: 6,8 Path: 9,6,3,2 1 Source: 9 Re-trans: 0 Neighbors: 6,8 Path: 9,6,3,2 5 Source: 9 Re-trans: 0 Neighbors: 6,8 Path: 9,6,5,4 1 Source: 9 Re-trans: 0 Neighbors: 6,8 Path: 9,6,5,4 7

Figure 2.3: Mapping Message Propagation (WSNFS Broadcasts)

that the source node is set to 9, the packet should be retransmitted three times, the neighbor table includes nodes 6 and 8, and the message packet path only includes node 9. Next, we see that nodes 6 and 8 receive Node 9’s broadcast and in turn rebroadcast the message. When the broadcasts from nodes 6 and 8 are received by their 1-hop neighbors, we see that Node 5 will receive the message from both 6 and 8. Based on the mapping rules, Node 5 will opt to retransmit the mapping message that it received first. In this example, we assume Node 5 received the message from Node 6 first, and thus Node 5 will not retransmit the message received from Node 8. Additionally, we see that when Node 5 receives the mapping packet, the retransmit field has been decremented by one, and the path field now includes Node 9 and Node 8 or Node 6, depending on which node the packet originates. This process continues, with repeated messages being silenced at each stage, and the message surviving being the one that was first received. Finally, at the bottom left of Figure 2.3, we see that Node 1 receives Node 9’s message from Node 2, with Node 9’s 1-hop neighbors and

the path through the network that the mapping packet traversed.

Routing

Routing is accomplished by applying Dijkstra’s shortest path algorithm [35] on first request. In WSNFS, routes from one node to another are not calculated until there is a request to send a packet to the particular destination. The results of the path finding algorithm are stored for future use. This approach spreads the overall overhead of building the routing table by avoiding the calculation until it is actually needed the first time. Subsequent routing requests will be fast since the route has been already calculated. Broadcast messages do not utilize the routing table. Instead, they rely on the message propagation method described in Section 2.4.1. The routing process is summarized in the following sequence:

1. The source and destination node identifiers are passed to the mapper.

2. If the route between source and destination has been calculated, the next hop is returned from the previously calculated route.

3. If the route between source and destination has not been calculated, the short- est path algorithm is applied to the adjacency table, and the next hop on the calculated route is returned.

Maintenance

Maintenance occurs when nodes join or leave an established network. Periodic “heartbeat” messages are sent to 1-hop neighbor nodes to indicate reachability.

Failure to receive a number of heartbeat messages over an expected interval results in a timeout and the neighbor table being updated. Additionally, each node may enter the mapping state periodically to signal the network when the local topology has changed. Any node receiving mapping information that is different from its current view purges routing information associated with the differences and updates. Of course, new nodes joining an existing network will simply be added when mapping packets are received, as when the network as a whole is being formed. Mapping packets, as with all other packets in WSNFS, include a monotonically increasing packet identifier that aids in determining the chronology of information (i.e., Lamport time stamps [34]). As an example, if a node leaves the network and reappears in a different physical area of the existing network, the node will produce mapping packets that override the previous topology information associated with it. The primary controlling element for data synchronization is the packet identifier chronology. Thus, each node that receives newer topology information will purge older entries and update.