CN102395126B - Mobile Ad hoc network address configuration realization method based on tree structure - Google Patents

Mobile Ad hoc network address configuration realization method based on tree structure Download PDF

Info

Publication number
CN102395126B
CN102395126B CN2011103579417A CN201110357941A CN102395126B CN 102395126 B CN102395126 B CN 102395126B CN 2011103579417 A CN2011103579417 A CN 2011103579417A CN 201110357941 A CN201110357941 A CN 201110357941A CN 102395126 B CN102395126 B CN 102395126B
Authority
CN
China
Prior art keywords
node
subnet
configuration
message
tree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2011103579417A
Other languages
Chinese (zh)
Other versions
CN102395126A (en
Inventor
王晓喃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Trigiant Optoelectronic Technology Co., Ltd.
Jiangsu Trigiant Sensing Technology Co., Ltd.
Jiangsu Trigiant Technology Co., Ltd.
Original Assignee
Changshu Institute of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changshu Institute of Technology filed Critical Changshu Institute of Technology
Priority to CN2011103579417A priority Critical patent/CN102395126B/en
Publication of CN102395126A publication Critical patent/CN102395126A/en
Application granted granted Critical
Publication of CN102395126B publication Critical patent/CN102395126B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a mobile Ad hoc network address configuration realization method based on a tree structure. The mobile Ad hoc network comprises a plurality of subnets. The subnets are identified only by a subnet ID. One subnet is formed by a plurality of nodes. The each node is identified by one node ID. The subnet ID of the subnet in which the node is located and the node ID form a node address. All the nodes in the subnet construct the tree structure. The node which is not configured acquires the address possessing subnet uniqueness in one hop range through the tree structure. Address repetition detection is not needed.

Description

A kind of mobile ad hoc network address configuration implementation method based on tree
Technical field
The present invention relates to a kind of address configuration implementation method, in particular a kind of mobile ad hoc network address configuration implementation method based on tree.
Background technology
Between node in mobile self-grouping network, communication realizes by forwarding and the route of intermediate node, therefore, each node must be furnished with the address with uniqueness and realize communication, therefore, realizes that one of key technology that automatic ad-hoc network need to solve is exactly the automatic allocation problem in address.
Current address configuration is divided into state address configuration and two kinds of forms of stateless address configuration, there is the state address allocation plan to adopt the communication mode of server/customer end to distribute address, being that node is filed an application the request of address to server, is then the node distribution address in network by the server unification.Due to mobile ad hoc network, without any infrastructure, for example server, therefore, have the state address allocation plan to be applied in mobile ad hoc network.In the stateless address configuration scheme, duplicate address detection need to be carried out to guarantee its uniqueness in each address be assigned with in whole network, caused a large amount of control to unwrap pin, consumed a large amount of Internet resources, therefore also be not suitable for mobile ad hoc network and use.
Therefore need to set up a kind of automatic allocation plan in address of low expense for mobile self-grouping network.
Summary of the invention
Goal of the invention: technical problem to be solved by this invention is for the deficiencies in the prior art, and a kind of mobile ad hoc network address configuration implementation method based on tree is provided.
Technical scheme: the invention discloses a kind of mobile ad hoc network address configuration implementation method based on tree, described implementation method is divided into a plurality of subnets by mobile self-grouping network, and subnet is by subnet ID unique identification, and subnet ID value generates at random by random function; A subnet consists of a plurality of nodes, direct communication or carry out indirect communication by intermediate node between node;
Each node is identified by a node ID, and the length of node ID is the i bit, has uniqueness in subnet, and the subnet ID of node place subnet and node ID form node address; The state of node comprises configuration status and not configuration status, and the configuration status dactylus is put configuration node address, and configuration status dactylus point does not have the configuration node address; The node ID configuration space of a subnet is [0,2 i-1], the i value is random natural number;
In subnet, all nodes are configured to tree, in a tree, each node comprises at most S child node, in tree, each node is preserved a sub-nodes records table, each records the corresponding child node of list item, each records list item and comprises child node value c and two territories of child node state, 1≤c≤S wherein, the child node state comprises unallocated state and distribution state; Child node value c and S value span are natural number;
The unallocated child node sum of configuration status node periodic broadcasting its place subnet ID and this node.
By tree, the configuration status node does not obtain the address with uniqueness by the node of configuration status in a jumping scope, without carrying out the address duplicate detection, has therefore reduced the address configuration cost, has shortened the address configuration time.Described tree can effectively reclaim the address resource that failure node discharges, and therefore the configuration status node has enough address spaces always and distributes to the node into configuration status, has improved the address configuration success rate.
In the method for the invention, after a node Y adds mobile ad hoc network, its initial condition is configuration node not, if node Y does not receive the broadcast of any node of configuration status in setting-up time, carries out following steps;
Step 301: start;
Step 302: described node Y broadcasts and sets up tree message in a jumping scope, and the message load is timestamp and the random subnet ID produced;
Step 303: judgement receives that whether the neighbor node of setting up tree message has father node, if having, carry out step 304, otherwise carry out step 305;
Step 304: abandon setting up tree message, carry out step 313;
Step 305: the priority of the foundation tree message received before whether the priority of neighbor node judging message is greater than and oneself send, if so, carry out step 306, otherwise carry out step 307;
Step 306: neighbor node is this message of broadcast in a jumping scope;
Step 307: after setting-up time, whether the priority of the foundation tree message of its transmission of neighbor node judging, for the highest, if so, carry out step 309, otherwise carry out step 308;
Step 308: the node of the foundation tree message that neighbor node is the highest using forwarding priority, as father node, carry out step 310;
Step 309: neighbor node is designated root node by oneself;
Step 310: at the appointed time, node Y judges whether to receive the message of the priority of the foundation tree message sent higher than oneself, if it is carry out step 311, otherwise carry out step 312;
Step 311: the node of the foundation tree message that node Y is the highest using forwarding priority, as father node, carry out step 313;
Step 312: node Y is designated root node by oneself;
Step 313: finish.
By said process, the configuration status node does not form tree, and obtains the address with uniqueness by the node of configuration status in a jumping scope, without carrying out the address duplicate detection, has therefore reduced the address configuration cost, has shortened the address configuration time.Described tree can effectively reclaim address resource, has improved the address configuration success rate.In said process, the transmission of message is controlled in a jumping scope, has reduced the address configuration cost, has shortened the address configuration delay, has strengthened extension of network.
In the method for the invention, if a timestamp of setting up tree message T is more Zao than the timestamp of another one foundation tree message T ', sets up the priority of tree message T and set message T ' higher than setting up;
If it is identical with the timestamp of setting up tree message T ' to set up the timestamp of tree message T, compare the subnet ID in message, be less than if set up the subnet ID of tree message T the subnet ID set up in tree message T ', set up the priority of tree message T higher than setting up tree message T ';
If it is identical with the timestamp and the subnet ID that set up tree message T ' with subnet ID to set up the timestamp of tree message T, the time of advent of relatively setting up tree message T and setting up tree message T ', be better than setting up tree message T ' if set up the time of advent of tree message T early than setting up tree message T ' or setting up the tree position of message T in waiting list, set up the priority of tree message T higher than setting up tree message T '.
By said process, can guarantee that in a subnet, all nodes are configured to a tree.
In the method for the invention, the node ID of root node oneself is set to 0, and in a jumping scope Broadcast Subnet ID and unallocated child node sum, start tree is carried out to initialization, the not configuration node in tree is by initialization procedure configuration node address:
Step 401: start;
Step 402: after configuration node is not received the broadcast of father node, judge in message, whether unallocated child node sum is not 0, if so, carry out step 403, otherwise carry out step 404;
Step 403: configuration node does not wait for that random time reselects father node and obtains address, carry out step 412;
Step 404: configuration node does not send address request to father node;
Step 405: after father node is received the message that configuration node does not send, check the child node record sheet, select record corresponding to minimum unassigned child node value, return to an address response message to configuration node not, the message load is the child node value c in corresponding record, this is recorded to the neutron node state simultaneously and is designated and distributes;
Step 406: after configuration node is not received response message, obtain the node ID of oneself according to formula y=Sx+c, wherein, the node ID that x is father node, node ID is combined to the node address that forms oneself with subnet ID, oneself is designated to configuration node simultaneously, and sets up the child node record sheet;
Step 407: configuration node judges that whether node ID corresponding to child node is greater than the address assignment space upper limit, if so, carry out step 408, otherwise carry out step 409;
Step 408: the distribution state of the corresponding child node of configuration node is set to unallocatedly, carry out step 410;
Step 409: the distribution state of the corresponding child node of configuration node is set to distribute;
Step 410: the unallocated child node sum of configuration node Broadcast Subnet ID and this node;
Step 411: after the child node of configuration node has been received broadcast, repeating step 402~step 410 is obtained address, until in tree, all nodes obtain node address;
Step 412: finish.
In said process, each the configuration status node have the right for other not the node of configuration status distribute address, the address configuration task is completed jointly by all nodes of configuration status, the node of configuration status does not obtain address by the node of configuration status in a jumping scope, and guarantees to distribute the uniqueness of address by formula y=Sx+c, without the address duplicate detection, reduced the address configuration cost, shorten the address configuration time, realized load balancing, improved address configuration efficiency.
In the method for the invention, wait for random time if newly add the not configuration node of mobile ad hoc network, receive the broadcast of a plurality of configuration nodes, select to supply to distribute the maximum configuration node of child node sum as father node, and obtain node address by following steps:
Step 501: start;
Step 502: configuration node does not send address request to father node;
Step 503: after father node is received the message that configuration node does not send, check the child node record sheet, select record corresponding to minimum unassigned child node value, return to an address response message to configuration node not, the message load is the child node value c in corresponding record, this is recorded to the neutron node state simultaneously and is designated distribution state;
Step 504: after configuration node is not received response message, obtain the node ID of oneself according to formula y=Sx+c, wherein, the node ID that x is father node, node ID is combined to the node address that forms oneself with subnet ID, oneself is designated to configuration node simultaneously, and sets up the child node record sheet;
Step 505: configuration node judges that whether node ID corresponding to child node is greater than the address assignment space upper limit, if so, carry out step 506, otherwise carry out step 507;
Step 506: the distribution state of the corresponding child node of configuration node is set to unallocatedly, carry out step 508;
Step 507: the distribution state of the corresponding child node of configuration node is set to distribute;
Step 508: the unallocated child node sum of configuration node Broadcast Subnet ID and this node;
Step 509: finish.
By said process, the configuration status node is not by adding tree to obtain address, and guarantees to distribute the uniqueness of address by formula y=Sx+c.Due to each the configuration status node have the right for other not the node of configuration status distribute the address with uniqueness, therefore, the address configuration task is completed jointly by all nodes of configuration status, the node of configuration status does not obtain the address with uniqueness by the node of configuration status in a jumping scope, without carrying out the address duplicate detection, reduced the address configuration cost, shortened the address configuration time, realize load balancing, improved address configuration efficiency.
In the method for the invention, after configuration node has obtained node ID, regularly to father node, send updating message and lay oneself open to normal condition to show, after father node is received the updating message of child node, reply the renewal response message to child node and lay oneself open to normal operating conditions to show;
In setting-up time, if father node is not received the updating message of child node, judge that child node lost efficacy or broken away from current subnet, and the state in child node record sheet corresponding to child node is set to unallocated state;
In setting-up time, if child node is not received the renewal response message of father node, judge that father node disappears or broken away from current subnet, will oneself be expressed as not configuration node, reselect father node and obtain node ID.
By said process, father node can reclaim the address that child node discharges effectively, guarantees to have enough address resources to distribute to other not configuration status nodes.Equally, child node is by judging whether father node guarantees correctness and the uniqueness of address in effective status.
In the method for the invention, after configuration node X has received the subnet ID of the broadcast of configuration node X ', carry out the subnet union operation in following two kinds of situations: 1) configuration node X is different from the subnet ID of configuration node X '; 2) configuration node X is identical with the address of configuration node X '.
In the method for the invention, node A in subnet M detects that subnet M needs and after subnet N carries out union operation, if in node A, unallocated child node sum is greater than 0, it carries out the subnet union operation, otherwise the father node of requesting node A is carried out the subnet union operation, and the father node of node A or node A is set as to configuration node Z; The union operation of configuration node Z place subnet M and subnet N comprises the steps:
Step 701: start;
Step 702: the tree root node R of configuration node Z-direction subnet N sends and merges message, the subnet ID that the message load is subnet M;
Step 703: after root node R receives and merges message, using configuration node Z as father node, and return to the merging response message to configuration node Z, root node R become merge after the node R of subnet M; If root node R receives a plurality of merging message, it only replys first merging message of receiving;
Step 704: after configuration node Z has received and merged response message, select record corresponding to minimum unassigned child node value, and return to an address response message to node R, the message load in record child node value c, by the status indicator of this record, be distribution state simultaneously;
Step 705: after node R is received address response message, according to formula y=Sx+c, get new node ID, wherein, x is the node ID of configuration node Z, and by the subnet ID of the subnet M calculated address that combines with node ID;
Step 706: whether the child node status field that node R judges the child node list entry is distribution state, if so, carry out step 707, otherwise carry out step 710;
Step 707: node R sends an address updating message to corresponding child node, and the message load is new node ID and the subnet ID of subnet M;
Step 708: after child node is received the address updating message, obtain new node ID according to formula y=Sx+c, wherein, x is the node ID that father node is new, c is the original child node value that father node distributes, then new node ID is combined to calculated address with the subnet ID of subnet M, sends an address updating message to the child node of distribution state simultaneously, the message load is new node ID and the subnet ID of subnet M;
Step 709: after child node is received the address updating message, repeating step 708, until in subnet N, the node ID of all nodes is all upgraded;
Step 710: subnet M and subnet N merge successfully, the subnet ID that the subnet ID after merging is subnet M;
Step 711: finish.
By above-mentioned union operation, in the subnet after can guaranteeing to merge, the uniqueness of node address, realized the correctness of communication and the correctness of route.
In the method for the invention, if one configuration node do not receive the subnet ID of any neighbor node broadcast or the subnet ID that receives when all different from own current subnet ID in setting-up time, it is designated not configuration node by again;
If configuration node is not received the network ID of any broadcast of configuration node in setting-up time, it starts to set up tree, and again obtains address by tree;
If configuration node is not received the network ID of configuration node broadcast in setting-up time, it adds this subnet place tree, and again obtains address by tree.
By said process, configuration node can not obtain the address with uniqueness.
In the method for the invention, the node A in subnet M receives the packet that Node B in subnet N sends and the address that node A detected is identical with the address of Node B; Now, the unicast path of the merging message that node A sends completes by the tree at Node B place, merge message and at first arrive Node B, then will merge message by Node B and send to its father node, father node will merge message again and be transmitted to its father node, until merge the root node that message finally arrives Node B place tree.
Said process has been realized the correctness of communication and the correctness of route.
Beneficial effect: the invention provides a kind of address of mobile ad hoc network implementation method of configuration automatically, for example, due to mobile ad hoc network and conventional network structure (the Internet) difference, for example: nodes in MANET has main frame and two identity of router simultaneously, address configuration scheme in therefore current legacy network can't be implemented in mobile self-grouping network, the address configuration scheme of using in the urgent need to a kind of applicable mobile self-grouping network.In the present invention, each nodes in MANET can be distributed address for other node, can guarantee the uniqueness of address without the address duplicate detection simultaneously, and this is that prior art can't realize.The implementation method that each node in described mobile self-grouping network configures automatically by address provided by the present invention, can have the address with uniqueness, realizes each other communication.The present invention can be applicable to the numerous areas such as traffic prosecution and agriculture project, is with a wide range of applications.
The accompanying drawing explanation
Below in conjunction with the drawings and specific embodiments, the present invention is done further and illustrates, above-mentioned and/or otherwise advantage of the present invention will become apparent.
Fig. 1 is mobile self-grouping network topological structure schematic diagram of the present invention.
Fig. 2 is node address structural representation of the present invention.
Fig. 3 is that child node of the present invention records the list item structural representation.
Fig. 4 is tree Establishing process schematic diagram of the present invention.
Fig. 5 is tree initialization schematic flow sheet of the present invention.
Fig. 6 is that not configuration node of the present invention obtains the node address schematic flow sheet.
Fig. 7 is that subnet of the present invention merges schematic flow sheet.
Embodiment:
The invention provides a kind of address of mobile ad hoc network implementation method of configuration automatically, in described method, each node in mobile self-grouping network can obtain the address with uniqueness, between node, by address, realizes communication each other.
Fig. 1 is mobile self-grouping network topological structure schematic diagram of the present invention.Described mobile self-grouping network 1 is divided into a plurality of subnets 2, and subnet 2 is by subnet ID unique identification, and subnet ID value generates at random by random function; A subnet consists of a plurality of nodes 3, direct communication or carry out indirect communication by intermediate node between node 3; The interior all nodes 3 of subnet 2 are configured to tree 4; Each node 3 is identified by a node ID, and the length of node ID is the i bit, in subnet 2, has uniqueness; The state of node comprises configuration status and not configuration status, and the configuration status dactylus is put configuration node address, and configuration status dactylus point does not have the configuration node address; The node ID configuration space of a subnet is [0,2 i-1], the i value is random natural number; The unallocated child node sum of configuration status node periodic broadcasting its place subnet ID and this node.
Fig. 2 is node address structural representation of the present invention.Node address is comprised of subnet ID and the node ID of place subnet, subnet of subnet ID unique identification, and subnet ID value generates at random by random function; Node of a node ID unique identification has uniqueness in subnet, and the length of node ID is the i bit, and the node ID configuration space of a subnet is [0,2 i-1], the i value is random natural number.
Fig. 3 is that child node of the present invention records the list item structural representation.In a tree, each node comprises at most S child node, in tree, each node is preserved a sub-nodes records table, each records the corresponding child node of list item, each records list item and comprises child node value c and two territories of child node state, 1≤c≤S wherein, the child node state comprises unallocated state and distribution state; Child node value c and S value span are natural number.
Fig. 4 is tree Establishing process schematic diagram of the present invention.After a node Y adds mobile ad hoc network, its initial condition is configuration node not, if node Y does not receive the broadcast of any node of configuration status in setting-up time, carries out following steps;
Step 301: start;
Step 302: described node Y broadcasts and sets up tree message in a jumping scope, and the message load is timestamp and the random subnet ID produced;
Step 303: judgement receives that whether the neighbor node of setting up tree message has father node, if having, carry out step 304, otherwise carry out step 305;
Step 304: abandon setting up tree message, carry out step 313;
Step 305: the priority of the foundation tree message received before whether the priority of neighbor node judging message is greater than and oneself send, if so, carry out step 306, otherwise carry out step 307;
Step 306: neighbor node is this message of broadcast in a jumping scope;
Step 307: after setting-up time, whether the priority of the foundation tree message of its transmission of neighbor node judging, for the highest, if so, carry out step 309, otherwise carry out step 308;
Step 308: the node of the foundation tree message that neighbor node is the highest using forwarding priority, as father node, carry out step 310;
Step 309: neighbor node is designated root node by oneself;
Step 310: at the appointed time, node Y judges whether to receive the message of the priority of the foundation tree message sent higher than oneself, if it is carry out step 311, otherwise carry out step 312;
Step 311: the node of the foundation tree message that node Y is the highest using forwarding priority, as father node, carry out step 313;
Step 312: node Y is designated root node by oneself;
Step 313: finish.
Fig. 5 is tree initialization schematic flow sheet of the present invention.The node ID of root node oneself is set to 0, and in a jumping scope Broadcast Subnet ID and unallocated child node sum, start tree is carried out to initialization, the not configuration node in tree is by initialization procedure configuration node address::
Step 401: start;
Step 402: after configuration node is not received the broadcast of father node, judge in message, whether unallocated child node sum is not 0, if so, carry out step 403, otherwise carry out step 404;
Step 403: configuration node does not wait for that random time reselects father node and obtains address, carry out step 412;
Step 404: configuration node does not send address request to father node;
Step 405: after father node is received the message that configuration node does not send, check the child node record sheet, select record corresponding to minimum unassigned child node value, return to an address response message to configuration node not, the message load is the child node value c in corresponding record, this is recorded to the neutron node state simultaneously and is designated and distributes;
Step 406: after configuration node is not received response message, obtain the node ID of oneself according to formula y=Sx+c, wherein, the node ID that x is father node, node ID is combined to the node address that forms oneself with subnet ID, oneself is designated to configuration node simultaneously, and sets up the child node record sheet;
Step 407: configuration node judges that whether node ID corresponding to child node is greater than the address assignment space upper limit, if so, carry out step 408, otherwise carry out step 409;
Step 408: the distribution state of the corresponding child node of configuration node is set to unallocatedly, carry out step 410;
Step 409: the distribution state of the corresponding child node of configuration node is set to distribute;
Step 410: the unallocated child node sum of configuration node Broadcast Subnet ID and this node;
Step 411: after the child node of configuration node has been received broadcast, repeating step 402~step 410 is obtained address, until in tree, all nodes obtain node address;
Step 412: finish.
Fig. 6 is that not configuration node of the present invention obtains the node address schematic flow sheet.If newly add the not configuration node of mobile ad hoc network to wait for random time, the broadcast of receiving a plurality of configuration nodes, select to supply to distribute the maximum configuration node of child node sum as father node, and obtain node address by following steps:
Step 501: start;
Step 502: configuration node does not send address request to father node;
Step 503: after father node is received the message that configuration node does not send, check the child node record sheet, select record corresponding to minimum unassigned child node value, return to an address response message to configuration node not, the message load is the child node value c in corresponding record, this is recorded to the neutron node state simultaneously and is designated distribution state;
Step 504: after configuration node is not received response message, obtain the node ID of oneself according to formula y=Sx+c, wherein, the node ID that x is father node, node ID is combined to the node address that forms oneself with subnet ID, oneself is designated to configuration node simultaneously, and sets up the child node record sheet;
Step 505: configuration node judges that whether node ID corresponding to child node is greater than the address assignment space upper limit, if so, carry out step 506, otherwise carry out step 507;
Step 506: the distribution state of the corresponding child node of configuration node is set to unallocatedly, carry out step 508;
Step 507: the distribution state of the corresponding child node of configuration node is set to distribute;
Step 508: the unallocated child node sum of configuration node Broadcast Subnet ID and this node;
Step 509: finish.
Fig. 7 is that subnet of the present invention merges schematic flow sheet.Node A in subnet M detects that subnet M needs and after subnet N carries out union operation, if in node A, unallocated child node sum is greater than 0, it carries out the subnet union operation, otherwise the father node of requesting node A is carried out the subnet union operation, and the father node of node A or node A is set as to configuration node Z; The union operation of configuration node Z place subnet M and subnet N comprises the steps:
Step 701: start;
Step 702: the tree root node R of configuration node Z-direction subnet N sends and merges message, the subnet ID that the message load is subnet M;
Step 703: after root node R receives and merges message, using configuration node Z as father node, and return to the merging response message to configuration node Z, root node R become merge after the node R of subnet M; If root node R receives a plurality of merging message, it only replys first merging message of receiving;
Step 704: after configuration node Z has received and merged response message, select record corresponding to minimum unassigned child node value, and return to an address response message to node R, the message load in record child node value c, by the status indicator of this record, be distribution state simultaneously;
Step 705: after node R is received address response message, according to formula y=Sx+c, get new node ID, wherein, x is the node ID of configuration node Z, and by the subnet ID of the subnet M calculated address that combines with node ID;
Step 706: whether the child node status field that node R judges the child node list entry is distribution state, if so, carry out step 707, otherwise carry out step 710;
Step 707: node R sends an address updating message to corresponding child node, and the message load is new node ID and the subnet ID of subnet M;
Step 708: after child node is received the address updating message, obtain new node ID according to formula y=Sx+c, wherein, x is the node ID that father node is new, c is the original child node value that father node distributes, then new node ID is combined to calculated address with the subnet ID of subnet M, sends an address updating message to the child node of distribution state simultaneously, the message load is new node ID and the subnet ID of subnet M;
Step 709: after child node is received the address updating message, repeating step 708, until in subnet N, the node ID of all nodes is all upgraded;
Step 710: subnet M and subnet N merge successfully, the subnet ID that the subnet ID after merging is subnet M;
Step 711: finish.
In sum, address of mobile ad hoc network provided by the invention is the implementation method of configuration automatically, technique can be applied to the numerous areas such as vehicle-mounted monitoring, medical treatment & health, military and national defense, for example, in the vehicle-mounted monitoring field, the automatic configuring technical of address of mobile ad hoc network can be applied to the road blocking monitor, every vehicle is a nodes in MANET, after their configuration addresss, can carry out information communication, the transmission road traffic condition, effectively to avoid road congested, keep the traffic moving, therefore, present technique has very high promotional value.
The invention provides a kind of thinking of the mobile ad hoc network address configuration implementation method based on tree; method and the approach of this technical scheme of specific implementation are a lot; the above is only the preferred embodiment of the present invention; should be understood that; for those skilled in the art; under the premise without departing from the principles of the invention, can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.In the present embodiment not clear and definite each component part all available prior art realized.

Claims (9)

1. the mobile ad hoc network address configuration implementation method based on tree, is characterized in that, mobile self-grouping network is divided into to a plurality of subnets, and subnet is by subnet ID unique identification, and subnet ID value generates at random by random function; A subnet consists of a plurality of nodes, direct communication or carry out indirect communication by intermediate node between node;
Each node is identified by a node ID, and the length of node ID is the i bit, has uniqueness in subnet, and the subnet ID of node place subnet and node ID form node address; The state of node comprises configuration status and not configuration status, and the configuration status dactylus is put configuration node address, and configuration status dactylus point does not have the configuration node address; The node ID configuration space of a subnet is [0,2 i-1], the i value is random natural number;
In subnet, all nodes are configured to tree, in a tree, each node comprises at most S child node, in tree, each node is preserved a sub-nodes records table, each records the corresponding child node of list item, each records list item and comprises child node value c and two territories of child node state, 1≤c≤S wherein, the child node state comprises unallocated state and distribution state; Child node value c and S value span are natural number;
The unallocated child node sum of configuration status node periodic broadcasting its place subnet ID and this node;
After a node Y adds mobile ad hoc network, its initial condition is configuration node not, if node Y does not receive the broadcast of any node of configuration status in setting-up time, carries out following steps;
Step 301: start;
Step 302: described node Y broadcasts and sets up tree message in a jumping scope, and the message load is timestamp and the random subnet ID produced;
Step 303: judgement receives that whether the neighbor node of setting up tree message has father node, if having, carry out step 304, otherwise carry out step 305;
Step 304: abandon setting up tree message, carry out step 313;
Step 305: the priority of the foundation tree message received before whether the priority of neighbor node judging message is greater than and oneself send, if so, carry out step 306, otherwise carry out step 307;
Step 306: neighbor node is this message of broadcast in a jumping scope;
Step 307: after setting-up time, whether the priority of the foundation tree message of its transmission of neighbor node judging, for the highest, if so, carry out step 309, otherwise carry out step 308;
Step 308: the node of the foundation tree message that neighbor node is the highest using forwarding priority, as father node, carry out step 310;
Step 309: neighbor node is designated root node by oneself;
Step 310: at the appointed time, node Y judges whether to receive the message of the priority of the foundation tree message sent higher than oneself, if it is carry out step 311, otherwise carry out step 312;
Step 311: the node of the foundation tree message that node Y is the highest using forwarding priority, as father node, carry out step 313;
Step 312: node Y is designated root node by oneself;
Step 313: finish.
2. a kind of mobile ad hoc network address configuration implementation method based on tree according to claim 1, it is characterized in that, if a timestamp of setting up tree message T is more Zao than the timestamp of another one foundation tree message T ', sets up the priority of tree message T and set message T ' higher than setting up;
If it is identical with the timestamp of setting up tree message T ' to set up the timestamp of tree message T, compare the subnet ID in message, be less than if set up the subnet ID of tree message T the subnet ID set up in tree message T ', set up the priority of tree message T higher than setting up tree message T ';
If it is identical with the timestamp and the subnet ID that set up tree message T ' with subnet ID to set up the timestamp of tree message T, the time of advent of relatively setting up tree message T and setting up tree message T ', be better than setting up tree message T ' if set up the time of advent of tree message T early than setting up tree message T ' or setting up the tree position of message T in waiting list, set up the priority of tree message T higher than setting up tree message T '.
3. a kind of mobile ad hoc network address configuration implementation method based on tree according to claim 2, it is characterized in that, the node ID of root node oneself is set to 0, and in a jumping scope Broadcast Subnet ID and unallocated child node sum, start tree is carried out to initialization, the not configuration node in tree passes through initialization procedure configuration node address:
Step 401: start;
Step 402: after configuration node is not received the broadcast of father node, judge in message, whether unallocated child node sum is not 0, if so, carry out step 403, otherwise carry out step 404;
Step 403: configuration node does not wait for that random time reselects father node and obtains address, carry out step 412;
Step 404: configuration node does not send address request to father node;
Step 405: after father node is received the message that configuration node does not send, check the child node record sheet, select record corresponding to minimum unassigned child node value, return to an address response message to configuration node not, the message load is the child node value c in corresponding record, this is recorded to the neutron node state simultaneously and is designated and distributes;
Step 406: after configuration node is not received response message, obtain the node ID of oneself according to formula y=Sx+c, wherein, the node ID that x is father node, node ID is combined to the node address that forms oneself with subnet ID, oneself is designated to configuration node simultaneously, and sets up the child node record sheet;
Step 407: configuration node judges that whether node ID corresponding to child node is greater than the address assignment space upper limit, if so, carry out step 408, otherwise carry out step 409;
Step 408: the distribution state of the corresponding child node of configuration node is set to unallocatedly, carry out step 410;
Step 409: the distribution state of the corresponding child node of configuration node is set to distribute;
Step 410: the unallocated child node sum of configuration node Broadcast Subnet ID and this node;
Step 411: after the child node of configuration node has been received broadcast, repeating step 402~step 410 is obtained address, until in tree, all nodes obtain node address;
Step 412: finish.
4. a kind of mobile ad hoc network address configuration implementation method based on tree according to claim 1, it is characterized in that, wait for random time if newly add the not configuration node of mobile ad hoc network, receive the broadcast of a plurality of configuration nodes, select to supply to distribute the maximum configuration node of child node sum as father node, and obtain node address by following steps:
Step 501: start;
Step 502: configuration node does not send address request to father node;
Step 503: after father node is received the message that configuration node does not send, check the child node record sheet, select record corresponding to minimum unassigned child node value, return to an address response message to configuration node not, the message load is the child node value c in corresponding record, this is recorded to the neutron node state simultaneously and is designated distribution state;
Step 504: after configuration node is not received response message, obtain the node ID of oneself according to formula y=Sx+c, wherein, the node ID that x is father node, node ID is combined to the node address that forms oneself with subnet ID, oneself is designated to configuration node simultaneously, and sets up the child node record sheet;
Step 505: configuration node judges that whether node ID corresponding to child node is greater than the address assignment space upper limit, if so, carry out step 506, otherwise carry out step 507;
Step 506: the distribution state of the corresponding child node of configuration node is set to unallocatedly, carry out step 508;
Step 507: the distribution state of the corresponding child node of configuration node is set to distribute;
Step 508: the unallocated child node sum of configuration node Broadcast Subnet ID and this node;
Step 509: finish.
5. a kind of mobile ad hoc network address configuration implementation method based on tree according to claim 1, it is characterized in that, after configuration node has obtained node ID, regularly to father node, send updating message and lay oneself open to normal condition to show, after father node is received the updating message of child node, reply the renewal response message to child node and lay oneself open to normal operating conditions to show;
In setting-up time, if father node is not received the updating message of child node, judge that child node lost efficacy or broken away from current subnet, and the state in child node record sheet corresponding to child node is set to unallocated state;
In setting-up time, if child node is not received the renewal response message of father node, judge that father node disappears or broken away from current subnet, will oneself be expressed as not configuration node, reselect father node and obtain node ID.
6. a kind of mobile ad hoc network address configuration implementation method based on tree according to claim 1, it is characterized in that, after configuration node X has received the subnet ID of the broadcast of configuration node X ', carry out the subnet union operation in following two kinds of situations: 1) configuration node X is different from the subnet ID of configuration node X '; 2) configuration node X is identical with the address of configuration node X '.
7. a kind of mobile ad hoc network address configuration implementation method based on tree according to claim 6, it is characterized in that, node A in subnet M detects that subnet M needs and after subnet N carries out union operation, if in node A, unallocated child node sum is greater than 0, it carries out the subnet union operation, otherwise the father node of requesting node A is carried out the subnet union operation, and the father node of node A or node A is set as to configuration node Z; The union operation of configuration node Z place subnet M and subnet N comprises the steps:
Step 701: start;
Step 702: the tree root node R of configuration node Z-direction subnet N sends and merges message, the subnet ID that the message load is subnet M;
Step 703: after root node R receives and merges message, using configuration node Z as father node, and return to the merging response message to configuration node Z, root node R become merge after the node R of subnet M; If root node R receives a plurality of merging message, it only replys first merging message of receiving;
Step 704: after configuration node Z has received and merged response message, select record corresponding to minimum unassigned child node value, and return to an address response message to node R, the message load is the child node value c in record, by the status indicator of this record, is distribution state simultaneously;
Step 705: after node R is received address response message, according to formula y=Sx+c, get new node ID, wherein, x is the node ID of configuration node Z, and by the subnet ID of the subnet M calculated address that combines with node ID;
Step 706: whether the child node status field that node R judges the child node list entry is distribution state, if so, carry out step 707, otherwise carry out step 710;
Step 707: node R sends an address updating message to corresponding child node, and the message load is new node ID and the subnet ID of subnet M;
Step 708: after child node is received the address updating message, obtain new node ID according to formula y=Sx+c, wherein, x is the node ID that father node is new, c is the original child node value that father node distributes, then new node ID is combined to calculated address with the subnet ID of subnet M, sends an address updating message to the child node of distribution state simultaneously, the message load is new node ID and the subnet ID of subnet M;
Step 709: after child node is received the address updating message, repeating step 708, until in subnet N, the node ID of all nodes is all upgraded;
Step 710: subnet M and subnet N merge successfully, the subnet ID that the subnet ID after merging is subnet M;
Step 711: finish.
8. a kind of mobile ad hoc network address configuration implementation method based on tree according to claim 1, it is characterized in that, if one configuration node do not receive the subnet ID of any neighbor node broadcast or the subnet ID that receives when all different from own current subnet ID in setting-up time, it is designated not configuration node by again;
If configuration node is not received the network ID of any broadcast of configuration node in setting-up time, it starts to set up tree, and again obtains address by tree;
If configuration node is not received the network ID of configuration node broadcast in setting-up time, it adds this subnet place tree, and again obtains address by tree.
9. a kind of mobile ad hoc network address configuration implementation method based on tree according to claim 7, it is characterized in that, the node A in subnet M receives the packet that Node B in subnet N sends and the address that node A detected is identical with the address of Node B; Now, the unicast path of the merging message that node A sends completes by the tree at Node B place, merge message and at first arrive Node B, then will merge message by Node B and send to its father node, father node will merge message again and be transmitted to its father node, until merge the root node that message finally arrives Node B place tree.
CN2011103579417A 2011-11-14 2011-11-14 Mobile Ad hoc network address configuration realization method based on tree structure Active CN102395126B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103579417A CN102395126B (en) 2011-11-14 2011-11-14 Mobile Ad hoc network address configuration realization method based on tree structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103579417A CN102395126B (en) 2011-11-14 2011-11-14 Mobile Ad hoc network address configuration realization method based on tree structure

Publications (2)

Publication Number Publication Date
CN102395126A CN102395126A (en) 2012-03-28
CN102395126B true CN102395126B (en) 2013-12-11

Family

ID=45862318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103579417A Active CN102395126B (en) 2011-11-14 2011-11-14 Mobile Ad hoc network address configuration realization method based on tree structure

Country Status (1)

Country Link
CN (1) CN102395126B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102694884B (en) * 2012-06-25 2014-05-28 常熟理工学院 IPv6 address configuration and management method of wireless sensor network
CN102984296B (en) * 2012-12-07 2015-10-21 北京交通大学 The method that the configuration of a kind of network address and network merge
CN104104746B (en) * 2014-07-16 2017-11-10 苏州博联科技有限公司 A kind of segmented address distribution method of wireless self-networking
CN106506368B (en) * 2016-10-19 2019-01-11 常熟理工学院 A kind of data communication implementation method Internet-based
CN108174427B (en) * 2017-12-25 2020-12-25 上海金卓科技有限公司 Fusion method and device for same-frequency mobile ad hoc network, terminal equipment and storage medium
CN109862131B (en) * 2019-02-20 2022-03-04 北京奇艺世纪科技有限公司 Server access address allocation method and device and computer readable storage medium
CN110366149A (en) * 2019-07-30 2019-10-22 海南天然橡胶产业集团股份有限公司 Information feedback method and system
CN114025408B (en) * 2022-01-04 2022-06-17 北京交通大学 Network establishing and accessing method and device for self-adaptive networking and computer equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014377A (en) * 2011-01-06 2011-04-13 常熟理工学院 Distributed wireless sensor network-based IPv6 address configuration implementing method
CN102056152A (en) * 2011-01-06 2011-05-11 常熟理工学院 Implementation method of automatic configuration for network addresses of wireless sensors based on Internet protocol version 6 over low power wireless personal area network (6LoWPAN)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7672289B2 (en) * 2005-08-09 2010-03-02 Mitsubishi Electric Research Laboratories, Inc. Method for defining, allocating and assigning addresses in ad hoc wireless networks

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014377A (en) * 2011-01-06 2011-04-13 常熟理工学院 Distributed wireless sensor network-based IPv6 address configuration implementing method
CN102056152A (en) * 2011-01-06 2011-05-11 常熟理工学院 Implementation method of automatic configuration for network addresses of wireless sensors based on Internet protocol version 6 over low power wireless personal area network (6LoWPAN)

Also Published As

Publication number Publication date
CN102395126A (en) 2012-03-28

Similar Documents

Publication Publication Date Title
CN102395126B (en) Mobile Ad hoc network address configuration realization method based on tree structure
CN102364970B (en) Implementation method for automatically configuring address of mobile ad hoc network
CN102572015B (en) Implementation method for dynamic IPv6 address configuration of mobile ad hoc network
CN102572016B (en) Method for realizing cluster-based distributed mobile self-organizing network IPv6 (Internet Protocol version 6) address configuration
CN102883403B (en) Construction method for mobile ad hoc network
CN101600156B (en) Auto-allocation method of addresses of mobile ad hoc networks
CN102291448B (en) Automatic IP (Internet protocol) address allocation method based on geographical position in mobile ad hoc network
CN107889185B (en) Networking method of wireless data acquisition system of electric meter
CN104333914A (en) Method and equipment of establishing Mesh link
CN102333118A (en) Automatic Internet protocol version 6 (IPv6) address configuration method for vehicular network
CN102158812B (en) Wireless Mesh network multicasting communication method of AC-AP (Access Controller-Access Point) framework
CN102694884B (en) IPv6 address configuration and management method of wireless sensor network
CN103491590B (en) A kind of implementation method of wireless sensor network route of future generation
CN103078969A (en) Method and equipment for announcing media access control (MAC) address information
CN106254239A (en) A kind of LORA service in wireless communication network block transmission method of low latency
CN103312811A (en) Method for connecting vehicle-mounted network into IPv6 internet
CN105119828A (en) Fast wireless network routing achievement method
CN102428690B (en) A method for assigning a network address for communicating in a segmented network
CN103945415B (en) Communication implementation method for wireless network
CN103167057B (en) A kind of vehicle-mounted net address collocation method based on locating information
CN116249077B (en) Method and device for acquiring communication routing state of working group member
CN105723687A (en) Methods for configuring and managing an IP network, corresponding devices and computer programs
CN104717308A (en) Implementing method of vehicle-mounted cloud
CN104270479B (en) communication implementation method of next generation wireless network
CN104244231A (en) Address configuration implementation method of next generation wireless network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20170405

Address after: The 214205 Jiangsu Yixing environmental science and Technology Industrial Park Jun Zhilu No. 8

Patentee after: Jiangsu Trigiant Optoelectronic Technology Co., Ltd.

Address before: 215500 School of computer science and engineering, Changshu Institute Of Technology, Suzhou, Jiangsu,

Patentee before: Changshu Science and Engineering College

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20191211

Address after: 214206 No.1, Junzhi Road, environmental protection science and Technology Industrial Park, Yixing City, Wuxi City, Jiangsu Province

Co-patentee after: Jiangsu Trigiant Optoelectronic Technology Co., Ltd.

Patentee after: Jiangsu Trigiant Technology Co., Ltd.

Co-patentee after: Jiangsu Trigiant Sensing Technology Co., Ltd.

Address before: The 214205 Jiangsu Yixing environmental science and Technology Industrial Park Jun Zhilu No. 8

Patentee before: Jiangsu Trigiant Optoelectronic Technology Co., Ltd.

TR01 Transfer of patent right