• 沒有找到結果。

Chapter 1 Introduction

1.3 Synopsis

The remainder of this paper is organized as follows. Chapter 2 briefly introduces the related research efforts. Chapter 3 explains HPID mechanism, including format con-figuration, assignment and routing mechanisms. Chapter 4 discusses the limitations of our mechanism. Next, evaluation of the conventional PID mechanisms and our mecha-nism are presented in Chapter 5. At least, we conclude this thesis and introduce future works in chapter 6.

Chapter 2

Related Work

Path-aware identity (PID) means an identity contains routing information by certain mathematical operating, and a routing path can be established from the routing informa-tion directly. Therefore, efficient routing is realized without any extensive routing table.

Several PID assignment mechanisms have been proposed previously and could be cate-gorized as “structured” and “unstructured” based on the way to produce PID.

2.1 Structured PID Mechanisms

Structured PID assignment mechanism means that it assigns an identity after arranging tree structure. ZigBee distributed address assignment mechanism [20] is a structured mechanism, and we call it the ZigBee mechanism for short in the latter discussion. By the way, classful IP addressing [4] is also a typical example with structured characteris-tic although it isn’t a PID mechanism.

2.1.1 ZigBee Distributed Address Assignment Mechanism

The ZigBee mechanism arranges tree structure by previous network settings, such as the maximum number of children a parent may have (nwkMaxChildren, Cm), the maxi-mum depth in the network (nwkMaxDepth, Lm), and the maximaxi-mum number of routers a parent may have as children (nwkMaxRouters, Rm). It computes the function Cskip(d), essentially the size of the address sub-block being distributed by each parent at the depth to its router-capable child devices for a given network depth, d, as follows:

⎪⎩

Network addresses shall be assigned to end devices in a sequence number with the nth address, An, given by the following equation, where 1 ≤ n ≤ (Cm-Rm) and Aparent

represents the address of the parent.

n

This mechanism constructs a tree-structure routing path after allocating identities.

Then, an entity could transmit packets according to the computing result of the identity.

Figure 2-1 gives an example about how addresses are assigned with the following pa-rameters setting: nwkMaxChildren = 4, nwkMaxRouters = 4, and nwkMaxDepth = 3. In the beginning, a coordinator’s identity is 0 and its calculated Cskip value is equal to 21.

The address sequence that the coordinator can assign is, 1, 1+21, 1+21*2, and so on up to the largest address bounded by the address space or the limited nwkMaxChildren.

Similarly, an entity having address can calculate its Cskip value and allocate numbers in ascending order to the new entities attached to it. However an entity won’t have any children if the calculated Cskip value is equal to 0.

Cskip = 0

Figure 2-1 An example of the addresses allocation tree by ZigBee mechanism.

2.1.2 Disadvantages

Structured mechanisms have some problems, such as lack of network flexibility and in-efficient use of identity space. Because they all set certain limitations of the network, flexibility of the topology would be reduced. In other words, as the topology changes, entities out of setting ranges could not obtain proper identities. Furthermore, the net-work setting in advance may not be appropriate to the actual netnet-work environment, and then it will waste identities. Namely, in most situations, entities wouldn’t distribute in the whole area averagely but appear in some area frequently, so the identities reserved for the other area won’t be used.

Inefficient use of identity space is a significant problem. In order to satisfy identi-ties requisition of entiidenti-ties, a manager might try to stretch the length of identiidenti-ties to pro-vide more identities. But stretching the length is impracticable in some network envi-ronments. For example, in wireless sensor networks, device capabilities are limited and power saving is undoubtedly a very important issue. Some papers [16] [17] represent that identities with shorter length would diminish computing overhead while routing packets and achieve power saving. On the contrary, stretching identity length would in-crease overhead and consume more power.

2.2 Unstructured PID Mechanisms

Unstructured PID assignment mechanisms, unlike structured ones, have no beforehand network setting or limitations, so they keep flexibility of topology changing. Prime DHCP scheme [6] is one typical example.

2.2.1 Prime DHCP Scheme

Figure 2-2 An example of the addresses allocation tree by Prime DHCP scheme.

Prime DHCP scheme runs a prime numbering address allocation algorithm to compute unique addresses for address allocation and an entity which is considered as a DHCP proxy could acquire an address by itself or from its neighbor. Figure 2-2 gives an exam-ple of addresses a DHCP proxy can assign. The root proxy A has an address of 1 and can allocate prime numbers in ascending order to the new entities attached to it. For a non-root DHCP proxy, it can assign the address equal to its own address multiplied by the unused prime number, starting from the largest prime factor of its own address. Take the entity G with address 6 for example; the largest prime factor of 6 is 3 and the se-quence of addresses entity G can assign is, 6*3, 6*5, 6*7, and so on up to the largest address bounded by the address space. Each node needs to maintain its allocation status to record the last assigned address. After the addresses allocation of all entities, a tree structure will be established, and an entity can select the routing path by computing the destination identity.

2.2.2 Disadvantages

Unstructured mechanisms have some drawbacks. For instance, the Prime DHCP scheme would make the tree structure skew and induce inefficient use of identity space

more poorly. As mentioned before, using identity space inefficiently will induce another problem that the length of identity should be stretched to content the identity requisition of each entity. But stretching identity length is not permitted in some environments, such as wireless sensor network. Although these mechanisms need no extra settings or limitations of the network, the skew tree structure results in other bad effects.

2.3 Summary

Because both structured and unstructured PID assignment mechanisms have their own problems, we want to propose a mechanism to eliminate or reduce these problems, called Hybrid Path-aware Identity (HPID) mechanism. HPID mechanism not only inte-grates structured and unstructured mechanisms but also uses identity space efficiently.

In the following section we will introduce our mechanism.

Chapter 3

HPID Mechanism

Whereas the drawbacks of the conventional PID assignment mechanisms, we propose a Hybrid Path-aware Identity (HPID) mechanism to eliminate or reduce effects of those problems. HPID mechanism integrates different PID mechanisms to combine their fea-tures and provides a hybrid assignment and routing mechanism. According to network characteristics, we could hybridize more than two mechanisms and draw on the strength of each to offset the weakness of the others. Namely, because a structured mechanism has problem about less flexibility of network topology, we could hybridize it with an unstructured mechanism to enhance flexibility. On the other hand, an unstructured mechanism which makes tree structure skew and causes inefficient use of identity space, could be hybridized with a structured one to make the tree structure more balance.

Therefore, hybridizing mechanisms could reduce the problems induced by each mecha-nism and make the use of identity more efficient. Moreover, simulation results indicate that our mechanism provides quite high identity utilization which is better than the other mechanisms.

Next, we will introduce the configuration of HPID format, assignment and routing mechanisms in the following sections.

3.1 HPID Format

PID1 PID2

a bits b bits

Figure 3-1. An illustration of the HPID format.

To perform HPID mechanism, we have to configure an HPID format in the beginning.

First of all, we partition the HPID format into several segments and choose some PID mechanisms for each segment based on network characteristics. Figure 3-1 is an illus-tration of HPID format, and it represents that there are two or more segments partitioned.

Segment 1 is a-bit and uses mechanism PID1, segment 2 is b-bit and uses mechanism PID2, etc. In order to explain our mechanism more clearly, we will take a scenario as an example in the following introduction.

K

Figure 3-2 Part of the distribution of the sensors.

Consider a scenario that we want to averagely distribute hundreds of sensors in a narrow area to control temperature of soil. Furthermore, each sensor should have a unique identity to recognize each other for sending data. Figure 3-2 illustrates the part of sensor distribution, and node A is a coordinator in the sensor network. Sensor devices have limited capabilities, such as memory and power. Therefore, the conventional ta-ble-driven mechanisms which need extensive routing table are not useful in this condi-tion. Conversely, we perform HPID mechanism to allocate identity for a sensor and configure an HPID format as follows.

0 1 2 3 4 5 6 7 8 9

Prime-based ZigBee

Figure 3-3. Configuration of the HPID format.

As the scenario described, we would configure the HPID format as Figure 3-3, and identity length is 10-bit for hundreds of sensors. Due to the network characteristics we partition the format into two segments. The first segment is 4-bit using the Prime DHCP scheme with sub-identity range from 0 to 15. The second segment is 6-bit using the Zig-Bee mechanism with sub-identity range from 0 to 63. Because sensors are distributed in a narrow area, the tree structure should be flexible enough to extend the control range.

Therefore, the Prime DHCP scheme is chosen for the first segment. Besides, the sub-tree structure should be balance for the average sensor distribution, and therefore we choose the ZigBee mechanism in the second segment. The parameters and Cskip values of the ZigBee mechanism are shown as Table 1.

Table 1. Parameters and Cskip values at each depth for ZigBee mechanism.

Parameters nwkMaxRouter 4

nwkMaxChild 4 nwkMaxDepth 3

Depth, d Cskip(d)

0 21 1 5 2 1 3 0

3.2 HPID Assignment Mechanism

HPID assignment mechanism is a distributed mechanism, and each entity can assign an HPID by operating independently. Later, we will introduce generation and assignment of HPID in two approaches, “forward HPID” and “backward HPID”.

3.2.1 Forward HPID Approach

Prime-based (4-bit) 0 (6-bit)

Figure 3-4 Forward HPID of the 1st type.

Prime-based (4-bit) ZigBee (6-bit)

Figure 3-5 Forward HPID of the 2nd type.

Generation and assignment of forward HPID are started form the coordinator, node A in Figure 3-2. In the beginning, node A would produce an identity for itself. While other node attaches to the coordinator, it will process mechanism PID1 (the Prime DHCP scheme) to generate a forward HPID of the 1st type as form (a. 0) shown in Figure 3-4.

Among (a. 0), the former code, a, is 4-bit and produced by the mechanism PID1, and the latter code is 6-bit with all zeros. Then node A will assign identities to the attached nodes, such as node B and C. While identities of the 1st type have been assigned, node A would generate an only one forward-HPID of the 2nd type as form (a. b) shown in Figure 3-5. In (a. b), the former code, a, is the same as node A’s former code. The latter code, b, is a 6-bit non-zero number and produced by mechanism PID2 (the ZigBee mechanism) initially. Notice that b of the 2nd type’s identity (a. b) cannot be zero or identity (a. 0) will be duplicated.

While a node has been assigned an identity of the 1st type, it could assign identities to others as node A does. However, if a node is assigned an identity of the 2nd type, it could only generate the 2nd type’s identities. The former code of the generated identity is inherited from the node, and the latter code is produced by the mechanism PID2.

Notice that all of the produced codes should be up bounded by the identity space or within the limited restrictions. Say, the former codes must be within 15 and the latter

codes must be within 63.

Figure 3-6 The forward-HPIDs allocation tree.

Figure 3-6 illustrates the identities allocation tree. Node A (1. 0) is the coordinator and its former code, 1, is the initial number produced by the Prime DHCP scheme. Iden-tities of node B ~ H are the 1st type as well as node A, and the former codes of each are produced via the Prime DHCP scheme by their parents. Take node F (15. 0) for example, the former code, 15, is produced form node C (3. 0). Because the former code 3*3 has been assigned to node E (9. 0), node C produces a sequential code 3*5 for node F. We call that node A ~ H are nodes on a sub-tree yielded by the Prime DHCP scheme, and node A is the root of the sub-tree.

Node I ~ L have identities of the 2nd type with the invariant former codes to their parents, and the latter codes are produced via the ZigBee mechanism by their parents.

Take node I (4. 1) for instance, node D (4. 0) assigns a 2nd type’s identity to it because all of the 1st type’s identities have been assigned. Therefore, the former code of node I, 4, is inherited from its parent, and the latter code, 1, is the initial number produced by the ZigBee mechanism. The latter codes of node I’s children are also produced via the Zig-Bee mechanism. We call that node I, K, and L are nodes on a sub-tree yielded by the

ZigBee mechanism, and node I is the root of the sub-tree. Notice that the latter code of node I and J cannot be zero, otherwise the identity (4. 0) and (15. 0) would be dupli-cated.

However, with this approach, a problem and the related phenomenon must be con-sidered.

Leak of Identities

While HPID format has more than two segments, some identities will never be generated, and we call this problem “leak of identities”. For example, consider that an HPID format is partitioned into three segments and a root node has an identity as form (a. 0. 0) initially. Then the root node will generate identities as form (a. b. 0) to its chil-dren, but b must not be zero to avoid duplicate identities. Similarly, a node with identity as form (a. b. 0) will generate identities as form (a. b. c) with non-zero c. Therefore, identities with form (a, 0, c) will never be generated. This problem appears more sig-nificant while the number of partitioned segments increasing.

Unnatural Assignment

Besides, in Figure 3-6, we also observe that node L gets an identity form node I eventually although it can communicate with both node F and I physically. It is because node F has assigned the only one identity to node J. We call this phenomenon that a node can assign only one identity an “unnatural assignment” phenomenon. Such phe-nomenon always occurs in the leaf nodes of a sub-tree yielded by a certain mechanism.

For example, node A ~ F are nodes on a sub-tree yielded by the Prime DHCP scheme, and node H and F are leaf nodes.

In order to eliminate the problem and the phenomenon, we propose another ap-proach in the next section.

3.2.2 Backward-HPID Approach with Modification

BN = 4

Prime-based (4-bit) 0 (6-bit)

Figure 3-7 Backward-HPID of the 1st type.

The main distinctions of backward and forward HPID approaches are the form of the 1st type’s identities and the identities assignment method of the leaf nodes. In Figure 3-7, the 1st type’s form of the backward-HPID is (0. a) with the all-zero 6-bit former code and the latter code, a, which is 4-bit and produced via the mechanism PID1 (the Prime DHCP scheme). The 2nd type’s form is (a. b) which is the same as the forward HPID.

The former code, a, is inherited from its parent’s code a. In other wards, the former code is the same as the latter code or the former code of its parent’s identity if its parent has the identity with the form (0. a) or (a. b) respectively. While the latter code, b, is 6-bit long and produced via the mechanism PID2 (the ZigBee mechanism) by its parent.

Notice that the coordinator‘s identity cannot be zero, otherwise it will cause the duplicate identities. While the code b in the form (a. b) is zero-allowed, and the problem about leak of identities could be solved here.

(0. 1)

Figure 3-8 The backward-HPIDs allocation tree.

Figure 3-8 illustrates the backward-HPIDs allocation tree which is similar to the forward HPID approach except the 1st type’s identities and the modified behaviors of the leaf nodes, such as node F and H. In order to eliminate the unnatural assignment phenomenon, we let the leaf node takes the role as its only one child in the forward HPID approach. Take node F for example, instead of assigning the identity (15. 0) to its child, it takes the role as the node with identity (15. 0) and can assigns more than one identities via the ZigBee mechanism. In other words, the identity (15. 0) is reserved and never be assigned. Therefore, the modified behaviors of the leaf nodes could eliminate the phenomenon of the unnatural assignment phenomenon.

Besides, BN (Bit Number) used for routing procedure represents the length of the meaningful code, including the inherited and produced code. Learning BN’s value of each HPID costs no additional messages but just through computing the HPID directly.

Say, the 1st type’s identity must be less than 16 and the meaningful code is the last 4-bit produced code, so the BN is equal to 4. Similarly, BN of the 2nd type’s identity is equal to 10 because of the first 4-bit inherited code and the last 6-bit produced code.

3.3 HPID Routing Mechanism

The HPID routing procedure is performed through computing the HPIDs directly, so it is not necessary to lookup the extensive routing table and fasts the routing latency. Next, we will continue the scenario and introduce the routing mechanism via the backward HPID approach with modification. The routing procedure for the forward HPID ap-proach is trivial and similar to the backward HPID apap-proach, thus we take the backward HPID approach as an example to describe the routing mechanism.

If (RN_BN = D_BN) { if (RN_ID = D_ID)

RN is D;

else if (RN_Former_ID = D_Former_ID) { if (RN_BN = a)

run the routing mechanism of PID_1;

else

run the routing mechanism of PID_2;

} else { run the routing mechanism of PID_2;

else

run the routing mechanism of PID_1;

} else { send to P;

} • RN – the receiving node

• D – the destination node

• P – the parent node of RN

(1)

(2)

(3)

To perform the routing procedure, the receiving node must to compute the HPIDs of the destination and itself when a node receives packets. The receiving node compares the BNs and conforms the following rules.

(1) If the BN of the receiving node is equal to the destination’s, then compare the former code of the HPIDs.

(i) If the former codes are different, then the receiving node sends the packets to its parent directly.

(ii) Otherwise, compare the latter codes of both.

a. If the latter codes are different, then the receiving node performs the routing mechanism corresponding to the latter code. (Namely, if both nodes’ HPIDs are the 1st type, then perform the mechanism PID1. Otherwise, perform the mechanism PID2.)

b. Otherwise, the receiving node is the destination.

(2) If the BN of the receiving node is less than the destination’s, then shift the HPID of the destination right k bits to get the shifted HPID, where k is equal to

receiving node’s BN minus destination’s BN. Compare the latter code of the receiving node and the shifted HPID.

(i) If the latter codes are the same, then the receiving node performs the next routing mechanism corresponding to its latter code (the mechanism PID2).

(ii) Otherwise, the receiving node performs the routing mechanism corre-sponding to its latter code (the mechanism PID1).

(3) If the BN of the receiving node is larger than the destination’s, then the receiv-ing node sends the packets to its parent directly.

K

Figure 3-9 The routing procedure via the backward-HPID.

Figure 3-9 illustrates the routing procedure from node K (source) to node L (desti-nation). In (a), node K compares the HPIDs of itself and node L, and sends the packet to

Figure 3-9 illustrates the routing procedure from node K (source) to node L (desti-nation). In (a), node K compares the HPIDs of itself and node L, and sends the packet to

相關文件