The Proposed Wormhole-Proof Protocol: WP-DSR
3.2 The Proposed Protocol: WP-DSR
3.2.2 The Proposed Protocol
The route discovery of WP-DSR is based on that of DSR, while with only a few changes.
23
In WP-DSR, when a node initiates or rebroadcasts an RREQ packet, it records the timestamp of when the packet is sending out in TnodeSend(requestor, SN), where node is the network ID of the sender, requestor is the network ID of the requestor of the RREQ packet, and SN is the sequence number of the RREQ packet.
When a node receives an RREQ packet from some node, or an RREP packet that this node is the second last hop in the route path of this RREP, it records the timestamp of when the packet is receiving in TnodeRecv(requestor, SN, from), where node is the network ID of the receiver, requestor is the network ID of the requestor of the RREQ packet, SN is the sequence number of the RREQ packet, from is the network ID of the previous hop of the RREQ packet.
We can know that on a certain node, if some TnodeSend(requestor,SN) is greater than a TnodeRecv(requestor,SN,from) (with the same requestor and SN), (TnodeSend(requestor,SN) - TnodeRecv(requestor,SN,from)) is the time duration that node cost for processing RREQ packet of network ID requestor and sequence number SN. Elsewhere, if some TnodeRecv(requestor,SN,from) is greater than a TnodeSend(requestor,SN) (with same requestor and SN), (TnodeRecv(requestor,SN,from) - TnodeSend(requestor,SN)) is the round trip time between node node and node from.
Therefore, WP-DSR detects wormhole attacks by gathering all TnodeSend(requestor,SN) and TnodeRecv(requestor,SN,from) during the route discovery phase, and makes use of them to compute the traverse time between two neighbor nodes. For any two neighbor nodes X and node Y (Y receives an RREQ from X), the traverse time between X and Y, named Duration(X,Y), can be calculated by:
Duration(X,Y) = 2
1(TXRecv(requestor,SN,Y) - TXSend(requestor,SN) –
(TYSend(requestor,SN) - TYRecv(requestor,SN,X))) (3-1)
24
Figure 3.3: Illustration of TnodeSend(requestor,SN) and TnodeRecv(requestor, SN, from)
Now, one problem is remained: how can node X obtain TYRecv(requestor,SN,X) and TYSend(requestor,SN) to know how long Y takes to process this RREQ? For this problem, WP-DSR chooses to embed (TYRecv(requestor,SN,X) - TYSend(requestor,SN)) into the RREP packet; i.e., when Y transmits an RREP packet to X, Y will embed this value into the RREP packet to inform X the RREQ processing duration on Y.
But another problem emerges: Since the destination node of an RREQ packet does not rebroadcast it, it does not have a TnodeSend(requestor,SN). Hence, on the destination node of an RREQ packet, TnodeSend(requestor,SN) is replaced to TnodeSend(requestor,SN,#) , which is the timestamp of when the number #st RREP packet with requestor and SN. And because an RREP cannot embed its TnodeSend(requestor,SN,#)
when it is sent out, a redundant RREP is necessary for bring the (TnodeSend(requestor,SN,#)
- TnodeRecv(requestor,SN,from)) of the first RREPto node from.
25
Figure 3.4: Example of the WP-DSR RREQ propagation
Now we demonstrate an entire route discovery procedure of WP-DSR. As illustrated in figure 3.4, we assume that node A wants to establish a route to node E, and the propagation of RREQ packets is as illustrated in figure 3.4. First node A initiates a new RREQ packet with requestor network ID “A”, the sequence number “2”
and the destination network ID “E”. While it is broadcasting this RREQ packet, it records the timestamp of when the packet is sending out in TASend(A,2). Afterwards, node B, a neighbor node of A, receives the RREQ packet, and records the timestamp of when it received the packet in TBRecv(A,2,A). After processing the RREQ packet as what is done in DSR, B rebroadcasts the RREQ packet and records the timestamp of when it sends out in TBSend(A,2). Later on, node A receives the RREQ and records the timestamp of when it received the packet in TBRecv(A,2,B). Although it has processed an RREQ packet with the same requestor and sequence number, it finds that it is the second last hop in the route path of the RREQ packet. Thus node A drops the RREQ packet, but keeps TBRecv(A,2,B) in its memory. And nodes B, C, D do the similar process, until the RREQ packet reaches its destination, node E.
26
Figure 3.5: Example of the WP-DSR RREP propagation
In figure 3.5, when node E receives the RREQ packet and finds itself is the destination node, it first initiates an RREP packet following the DSR, and then transmits the RREP packet to node D and records the timestamp when it is sent out in TESend(A,2,1). Thereupon, node E sends a redundant RREP packet embedded with (TESend(A,2,1) – TERecv(A,2,D), the processing time of the first RREP packet,to node D.
Node D records the timestamp of when the first RREP packet is received in TDRecv(A,2,D), and obtains (TESend(A,2,1) – TERecv(A,2,D)from the second RREP packet.
Node D then can computes the traverse time, DurationDE, by 2
1(TDRecv(A,2,E) –
TDSend(A,2) – (TESend(A,2,1) – TERecv(A,2,D))). Next, D embeds DurationDE and (TDSend(A,2) – TDRecv(A,2,C)), the processing time of the RREQ packet on node E, into the RREP packet and sends it to node C. So do node C and node E. Eventually, the RREP arrives at the requestor, node A. Node A checks if all the values of DurationXY
along the route path are less than a reasonable threshold. If yes, this route is a good route which does not pass through wormholes. But if any single value is larger than the threshold, this route is said to be contaminated by wormhole attacks and should not to be used.
27