• 沒有找到結果。

CHAPTER 1 Introduction

1.3  Organization

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

4

1.3 Organization

The remainder of this thesis is structured as follows. Chapter 2 discusses related work about routing protocols of DTNs and random linear network coding. The design of our protocol is described in Chapter 3. Performance evaluation and results are discussed in Chapter 4.

Finally, Chapter 5 summarizes our works and discusses future work.

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

5

CHAPTER 2 Related Works

In this chapter, we will discuss other research about the DTNs routing protocols and network coding.

First, we introduce the core concepts of flooding-based protocols family and forwarding-based protocols family, and then describe the property used by these protocols to make routing decision and conclude their pros and cons. We will briefly describe the operation of each protocol and make a simple summary of these protocols at final.

The next part is about the research of network coding. We will illustrate the coding technique: random linear network coding. The operation of encoding and decoding process of random linear network coding will be described in detail.

Finally, we will mention some DTNs routing protocols using network coding similar to our proposed scheme.

2.1 Flooding-based routing protocol

Redundancy is the key property of this routing category. Protocols in the flooding-based routing family deliver multiple copies of each message to relay nodes, in order to increase the probability that at least one copy will reach destination, or to reduce delivery latency. The advantage of flooding-based routing protocol is that it’s very easy to implement and not needed any information about network topology. But this approach would consume too much bandwidth and storage resources and degrade performance.

2.1.1 Direct Contact

Direct Contact works as follow: The source wouldn’t transmit any data until it comes into contact with the destination. Cause of its simplicity, it would not consume many resources, and it only uses single transmission. However, the delay latency of message might be the longest. It has been proposed that using direct contact to deliver message between mobile nodes and fixed gateways could increase network throughput and decrease resource usage [5].

2.1.2 Two-Hop Relay

In Two-Hop Relay, the source would copy the message to the first n relay nodes that it contacts. There would be n+1 duplicated message in the network, so the probability that message finally delivered to destination is improved n times than direct contact. This approach has been used as a backup plan when ordinary ad-hoc routing cannot find a connected path [6].

Tree-Based Flooding is an extension of Two-Hop Relay. The name “Tree-Based Flooding”

comes from that the set of relays forms a tree of nodes rooted at source. In addition to the source could make copies of messages, the other relays also do the task of duplicating message. There would be an index to indicate that how many copies of this message could be duplicated. Therefore, by appropriately adjusting the index, it would efficiently control the total number of message copies and the farthest hop count from source which it could reach. If the internodes contact probabilities are identical independent and uniformly distributed, this scheme would achieve optimal performance [7].

2.1.4 Epidemic Routing

Replicated databases’ synchronizing is the original purpose of epidemic algorithm [8].

Vahdat and Becjer applied the same concept to deliver data in DTNs [9]. It works as follow:

Each message has a unique identifier. When two nodes in contact with each other, they would exchange all the identifier numbers in its buffer. If a node finds out that it doesn’t have the identifiers of some messages, it will ask for transmitting these messages it does not have from the contact node. Eventually, all the nodes will receive the same messages.

Because Epidemic Routing tries every possible contact opportunities to deliver messages over all nodes in the networks, this protocol requires no knowledge about network topology. And the delivery latency is minimal if the buffer size is unlimited. Epidemic Routing is also as a benchmark to evaluate the performance in DTNs.

2.2 Forwarding-based routing protocol

These routing protocols take a more traditional approach to route data in DTNs. Knowledge about network topology is the major property they used to make the best relay selection. A relay candidate could be found by using location information, predefined inter contact schedule, historical contact records or assigning metrics to nodes. The advantage is that it reduces unneeded resource consumptions, but it’s hard to obtain complete topology information in a distributed environment with intermittent connectivity.

2.2.1 Location-based Routing

The Location-based Routing uses positioning services such as GPS (Global Positioning System) to make forwarding decision. It estimates the probability of delivering messages from one node to another by different distance calculating algorithm. When nodes contact each other, they estimate the probabilities before transmitting data. The advantage of location-based routing is that it requires very little information about the network. Lebrun et al. proposed predicting future location of mobile nodes by using motion vector, and proved

that it has better delivery ratio than Two Hop Relay and lower overhead than Epidemic Routing [10].

2.2.2 Gradient Routing

The Gradient Routing assigns a weighted value to each node to represent if the node is suitable to deliver message to a given destination. When a node finds another node has higher weighted value, it passes message to it. So the message follows a gradient of improving utility function values towards the destination. Compared with Location-based

Routing, this approach requires more information about topology. First, each mode has to maintain a metric table for all possible destinations. Second, the metric table must to be propagated to every node to enable each node to compute its probability for all destinations.

For example, ZebraNet uses historical records to estimate weighted value [11]. Lindgren et al. propose PROPHET, a probabilistic routing protocol using history of encounter and transitivity [12].

2.2.3 Link Metrics

As traditional network routing protocol, this approach builds a topology graph, assigns weights to each link and execute a shortest path algorithm to find best path. Therefore, in order to find best route, this method requires the most network information. In DTNs, the weighted value is often determined by the delivery ratio or the delay latency. Jain et al.

present a modified Dijkstra shortest path algorithm based on time-variant with precise schedule [13].

2.3 Flooding-based protocol vs. Forwarding-based protocol

We make a simple conclusion for previous mentioned routing protocols and illustrate it in Figure 2. The vertical axis represents the amount of required information about network topology, and the horizontal axis is the degree of redundancy. It shows that the two routing categories have the same trend: the more properties it used, the higher delivery ratio it could achieve. But the efficiency is inversely proportional with the delivery ratio.

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

10 Figure 2: Flooding-based protocol vs. Forwarding-based protocol

2.4 Random Linear Network Coding

Radom Linear Network Coding (RLNC) is a form of network coding. RLNC regards the messages as vectors of elements in the Galois Field (such as GF 2 , and all numerical operation are also defined on the Galois Field. The RLNC is much more computationally intensive than simply performing XORs on incoming packets. The following illustrates RLNC operations; consider the source has a message and the message is fragmented into k blocks , , … , with the same block size.

A coded block is generated:

∑ · , where is randomly chosen over the GF 2

The coefficients , , … , is called encoding vector, and is transmitted along with each coded block. Figure 3 shows the encoding process.

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

11 Figure 3: The encoding process of RLNC

A node decodes as soon as it has received coded blocks X = , , … , with linearly independent encoding vectors. It first forms a coefficient matrix C using the encoding vectors. Each row in C corresponds to the encoding vectors of one coded block.

The original blocks B , , … , could be recovered by:

B = C X

The inversion of C is only possible when its rows are linearly independent, in other words C is full rank (rank of C == k).

2.5 Network Coding on DTNs

Network coding has been widely used in different network filed. Several research efforts [14, 15] have applied network coding to P2P system. Katti et al proposed a scheme to combine network coding and wireless mesh network [16]. CodeTorrent[17] and VANETCODE[18] exploit network coding to rapidly distribute data among nodes in vehicular network.

There are some routing protocols [19, 20] studied the benefit of network coding on DTNs. Those protocols applied network coding to avoid redundant replication transmission.

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

12

However, those protocols select relay node based on epidemic routing, so they send coded blocks to every contact node results in high transmission overhead.

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

13

CHAPTER 3 The LANC Protocol

This section we will introduce our schemes in detail. First we give an overview of the protocol and describe detail in the subsections below. We proposed location-assisted routing with network coding: LANC. The main idea of LANC is, as each contact opportunity occurs; calculate the probability of the contact node to check if it is suitable to relay messages to destination. The criterions we used to estimate probability are trajectory of node, node’s moving direction and its velocity. If the result of estimated probability is larger than the threshold, the RLNC operation will be performed on messages in the buffer. After the coding process, this protocol schedules messages to transmit according to the estimated results. When the transmission is completed, the rank map and purge table will be put into beacons to inform other nodes. Once a node receives the beacon from contact node, it could purge its buffer by looking up the purge table.

We model a DTN as a set of mobile nodes in a vehicular environment. And there is only allowed inter-vehicle communication. A "contact" is defined as two nodes are within the radio range of each other, thus they have an opportunity to transfer data. Each node in the network equips global positioning system (GPS) device. And the navigation system is installed on every node. The nodes use the navigation system to find a shortest path to its destination. The navigation system provides three kind of primitive information: trajectory, moving direction and velocity. Based on the information provided by navigation system, every node can collect navigation information contained in beacon which is broadcasted from the contact neighbors during contact time and make routing decision accordingly. The destination of message has a fixed location such as a portal to internet. A node can deliver messages to the final recipient directly or via intermediate nodes.

3.2 Delivery Probability Estimation

When transmission opportunity occurs during contact time, how to define a delivery quality of node is the first question to address. Same as the concept of forwarding-based routing protocol, we use the location information to estimate the delivery probability.

First of all, if there is a node that will bring the message closer to destination, we might be able to rely on it to deliver the message. So we adopt the future trajectory of node provided by navigation system as one of the estimation factors.

However, the trajectory information is not enough to define good relay candidates. For example, a bus may have a fixed trajectory closer to destination but its moving direction is

away from it. Therefore, the node’s moving direction should also take into account.

Finally, it is very intuitive to select a faster node to take the responsibility for delivering message.

Combined the three factors, the formula we used to estimate delivery probability listed below:

1 c: Contact node

, , : System parameters (range from 0 to 1), 1 Path(c): Ratio to reach destination (range from 0 to 1)

Dir(c): Ratio moving toward destination (range from 0 to 1) V(c): Relative velocity ratio (range from 0 to 1)

If the result of P(c) is greater than the predefined threshold, then the contact node c are viewed as an appropriate relay candidate. The detail of algorithms will list below.

3.2.1 Algorithm Path(c)

In algorithm Path(c), the minimal distance between message’s destination and a node’s path is defined as the result that calculating the minimum distance from the location of destination to each coordinates of the path. For example, in Figure 5 the message is now at node A.

Input: Node A’s path, Node C’s path, Message M Output: ratio to reach destination

1. dist_A := minDistance(A.getPath(), M.getDestination()) 2. dist_C := minDistance(C.getPath(), M.getDestination()) 3. ratio := Math.abs(dist_A-dist_C)/dist_A

4. Path(c) := ratio > 1 ? 1 : ratio 5. return Path(c)

Figure 4: Algorithm Path(c)

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

16

There is a contact node C. For Node A, the minimal distance between Node A’s future path and destination is dist_A. For Node C, the minimal distance from destination to each coordinates of Node C’s path is dist_C. It is obvious that node C will be closer to the destination, so node C is more proper than node A for delivering message M. Using algorithm Path(c), we obtain the ratio to reach destination of each contact node.

Figure 5: Calculate Path(c)

As mentioned before, the algorithm Path(c) may not be enough to select a “good” relay node;

the moving direction should be also considered. Therefore, we add the second function, Dir(c), in the delivery probability estimation formula. For instance, in Figure 7, node A is in

contact with node C, and node A holds the message M. We can get a vector formed by message M’s moving intention, and another vector of node C’s moving direction. There will be an angle formed by these two vectors. If the angle is close to zero means that the node C is moving toward the destination of message M. So we could also take node C as a relay candidate. We would get the ratio moving toward destination of the contact node by using algorithm Dir(c).

Input: Node A’s location, Node C’s moving direction, Message M Output: ratio moving toward destination

1. mv_M := M.getDestination() – A.getLocation() 2. len_M := countDistance(mv_M)

3. mv_C := C.getMovingDirection() 4. len_C := countDistance(mv_C)

5. angle := Math.acos(Math.dotsum(mv_M, mv_C) / (len_M*len_C)) 6. Dir(c) := 1 – angle/π

7. return Dir(c)

Figure 6: Algorithm Dir(c)

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

18 Figure 7: Calculate Dir(c)

3.2.3 Algorithm V(c)

Input: Node A’s speed, Node C’s speed Output: relative velocity ratio

1. spd_A := A.getSpeed() 2. spd_C := C.getSpeed() 3. if(spd_C == 0) 4. V(c) := 0 5. else if (spd_A == 0) 6. V(c) := 1 7. else

8. ratio := Math.abs(spd_A-spd_C)/spd_A 9. V(c) := ratio > 1 ? 1 : ratio

10. return V(c)

Figure 8: Algorithm V(c)

When designing a DTN routing protocol, delay latency is an important issue needed to be concerned; hence we wish message delivered to destination as soon as possible. If a node has faster velocity, then it might reach destination quickly. The relative velocity ratio is calculated using algorithm V(c).

3.3 Location-assisted routing with network coding

Now we will give a full description of our proposed protocol in this section. The LANC protocol executes when two nodes are within radio range and have discovered one another.

It has five stages: Initialization, Probability estimation, Coding, Scheduling and Termination.

When two nodes contact with each other, they will collect metadata during initialization stage. After obtain the metadata, the nodes will estimate the delivery probability using the formula we mentioned in previous section 3.2. If the result of estimation is larger than threshold, it will perform coding operation on the messages in outgoing buffer. Due to not all the coded blocks are needed to be delivered, the coded blocks will be scheduled by the previous estimated results and contact node’s rank map. After the transfer is finished, if the receiver is the destination of the message, it will try to decode the message, update purge table or rank map depending on the decoding result. The detail of each stage is listed below.

3.3.1 Initialization

When moving in the networks, nodes will send out periodic beacons which allow detecting contact nodes in the transmission range. A node will not send out any message if it has no neighbors. The beacons not only inform neighbor the presence of node, but also contain the metadata of node.

The metadata contained in beacon includes: trajectory information of node, node’s moving direction, velocity, rank map and purge table. The first three factors are used to estimate delivery probability as we mentioned before. The rank map is a record of independent encoding vectors of each message. The purge table indicates which message has already decoded.

The format of rank map is: (M_ID: R, M_ID: R, M_ID: R …) M_ID: unique id of message

R: rank of message

In order to distinguish a coded block belongs to which message, a unique identifier will be assigned to message before encoding process at source. Here we use a hash function called SHA-1 to generate unique identifier for each message.

The rank of message is the number of independent encoding vectors. At each transmission finished, a node will check the rank of message, and records the value with corresponding message identifier.

The format of purge table is: (M_ID: T, M_ID: T, M_ID: T…) M_ID: unique id of message

T: the time original message is decoded

If the original message is decoded successfully, its identifier and the time decoding process finished will be pushed into the purge table and propagated by beacons. Nodes receive this beacon could drop coded blocks according to the same identifier to release memory space.

3.3.2 Probability Estimation

After discovering a contact node by its beacon, a node could estimate the delivery probability

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

21

using the formula we mentioned in section 3.1. The procedure works as follow: for each message in buffer, if the result of P(c) is larger than threshold, then puts the message in outgoing buffer for next coding stage.

3.3.3 Coding Operation

Before the transmission starting, the coding operation will code the blocks in the outgoing buffer. The RLNC is performed on the blocks with the same message identifier. The encoding operation is a slight difference between source node and relay node.

In source node, a message is divided into k blocks and one or several coded blocks will be transferred with corresponding encoding vectors. As mentioned in section 2.4, the source first chooses a set of random elements from GF 2 , then multiplies each block with the element , and adds up all the results of the multiplications together to produce a coded block. If the source node wants to generate another coded block, the operations are the same except the source node has to choose another encoding vector. Figure 9 illustrates the coding operation in source node.

Figure 9: Encoding a single block in source

‧ 國

立 政 治 大 學

N a tio na

l C h engchi U ni ve rs it y

22

If a relay node wants to send coded blocks to another node, it operates similar operations as source does. It also chooses a set of random elements from GF 2 , but the size of this set is the number of coded blocks with the same message identifier in its buffer. Relay node multiplies each element with encoding vector and finally adds up to produce a new encoding vector. This operation is repeated again using the same set of elements to generate a new coded block. Since all the numerical operations are defined on GF 2 and all the coefficients are also randomly chosen from GF 2 , the new generated code block and encoding vector are still the linear combination of original message. The message is decodable as long as the destination could receive enough linear independent encoding vectors such that the coefficient matrix formed by encoding vectors is full rank. Figure 10 shows the encoding procedure in relay node.

Figure 10: Re-encoding in relay

3.3.4 Scheduling

Before starting a transmission, we will schedule which coded blocks in outgoing buffer should be transferred first to get better performance. As we mentioned in previous section, a message is decodable only if its encoding matrix is full rank. Therefore, the rank of message

Before starting a transmission, we will schedule which coded blocks in outgoing buffer should be transferred first to get better performance. As we mentioned in previous section, a message is decodable only if its encoding matrix is full rank. Therefore, the rank of message

相關文件