A kind of vehicle-mounted net address collocation method based on locating information
Technical field
The present invention relates to a kind of address configuration method, in particular a kind of vehicle-mounted net address collocation method based on locating information.
Background technology
Along with the development of vehicle-mounted network technology and continuing to bring out of various new application, thereby can obtain the application demand that network satisfies user's sharp increase by accessing Internet in the urgent need to vehicle-mounted net.
Vehicle-mounted network accessing Internet, the key technical problem that at first will solve are exactly that the IPv6 address configures automatically, because vehicle node only could realize after obtaining to have the IPv6 address of global uniqueness and the communicating by letter of IPv6 networking node.The automatic configuration in IPv6 address can be in the situation that nobody intervenes the IPv6 address that has global uniqueness for each interface configuration, and the design object of this characteristic and vehicle-mounted net self-organizing, self-configuring is very identical.But meanwhile, implement existing IPv6 autoconf in the vehicle-mounted net of fast moving and also have some problems.For example, there is state I Pv6 autoconf to adopt the communication pattern configuration of IP v6 address of server/customer end, postpone owing to can increase considerably address configuration from remote server configuration IPv6 address, and the vehicle node of fast moving is difficult to the role of reception server, therefore, state I Pv6 autoconf and be not suitable for the vehicle-mounted net of IPv6 and use is arranged; Stateless IPv6 autoconf adopts the multicast mode by Neighbor Discovery Protocol, duplicate address detection to be carried out to guarantee its uniqueness in network in the IPv6 address of configuration, postpone because duplicate address detection has caused long address configuration, so stateless IPv6 autoconf is difficult to be applied to the vehicle-mounted net of IPv6 of fast moving equally.
Therefore, need to propose a kind of vehicle-mounted net address collocation method of low delay.
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 vehicle-mounted net address collocation method based on locating information is provided.
Technical scheme: the invention discloses a kind of vehicle-mounted net address collocation method based on locating information, it is characterized in that, described vehicle-mounted net comprises couple in router, three kinds of nodes of access node and vehicle node; Couple in router is connected to the backbone network of IPv6 the Internet, and an access node can be connected with more than one couple in router; The rectangular closed region division that will surround with all access nodes that a couple in router is connected is the territory, road; An access node can belong to territory, more than one road simultaneously; Vehicle-mounted net comprises one with the territory of setting out on a journey, wherein territory, k road ([x interval according to geographical coordinate
k, x
k+1], [y
k, y
k+1]) determine; Access node in the territory, road accesses the IPv6 the Internet by couple in router, and vehicle node is linked into the IPv6 the Internet by access node and the couple in router in territory, place road;
Vehicle node enters that vehicle-mounted net obtains first IPv6 address is set to its home address, and when vehicle node is obtained home address, the territory, road at place is set to territory, local road; Vehicle node is left the temporary IP v6 address that obtains when territory, local road enters territory, another one road and is set to its Care-of Address, and when vehicle node is obtained Care-of Address, the territory, road at place is set to it and delivers the car territory;
Vehicle-mounted net based on the territory, road can effectively reduce the configuration frequency of vehicle node Care-of Address, thereby avoids the communication disruption that causes due to address change, thereby has improved communication quality;
The IPv6 address of vehicle-mounted net node is comprised of five parts: first is territory, road ID, it is overall route prefix, territory, a road of unique identification, territory, the road ID of in territory, a road, all access nodes and vehicle node are obtained in this territory, road IPv6 address is identical, and its value equals territory, the road ID of couple in router in this territory, road; Second portion is the abscissa territory, and sign access node and vehicle node be the geographical abscissa of position separately; Third part is the ordinate territory, and sign access node and vehicle node be the geographical ordinate of position separately; The 4th part is random number ID, is produced by random function; The 5th part is inner ID, vehicle node of unique identification;
Wherein, the 4th part is produced by random function, and purpose is to reduce the repetition rate of address;
The abscissa territory of the IPv6 address of couple in router, ordinate territory, random number ID and inner ID are 0; The random number ID of access node and inner ID are 0;
Vehicle-mounted net IPv6 address hierarchy based on locating information can effectively reduce the address repetition rate, postpones and cost thereby reduce address configuration.
Obtained the vehicle node of IPv6 address regularly to neighbours' vehicle node broadcast beacon frame, the beacon frame load is the length of territory, the road ID in its territory, place road and the distributed address space that obtains in the territory, road;
Couple in router is preserved an address binding table, is used for being recorded in home address and Care-of Address that vehicle node that the territory of going the same way mutually obtains home address moves to other territories, road;
After vehicle node X started, if its neighbours' vehicle node does not have to distribute the address, vehicle node X was according to following Procedure Acquisition home address:
Step 101: beginning;
Step 102: vehicle node X obtains the geographical coordinate (x of own position, y), produce a random number z and a temporary address, territory, the road ID that territory, the road ID of temporary address obtains for the beacon frame from neighbours' vehicle node, abscissa is x, ordinate is y, and random number ID is z, and inner ID is 0;
Step 103: vehicle node X is the broadcast address detect-message in the territory, road, and the couple in router AR1 to territory, place road sends address detected message simultaneously, and the source address of message is the temporary address of vehicle node X;
Step 104: after couple in router AR1 receives address detected message, check whether the address binding table is identical with abscissa, ordinate and the random number ID of vehicle node X with the vehicle node that judgement moves to other territories, road, if there is identical vehicle node, couple in router AR1 returns to an address identical message to vehicle node X;
Step 105: after other vehicle node in the territory, road are received address detected message, if abscissa, ordinate and the random number ID of its IPv6 address are identical with vehicle node X's, return to an address identical message to vehicle node X, otherwise to neighbours' vehicle node forwarding address detect-message;
Whether step 106: vehicle node X judgement receives the address identical message at the appointed time, if receive, returns to step 102, otherwise carry out step 107;
Step 107: vehicle node X with the temporary address as the home address of oneself and obtain and can distribute address space [1,2
16-1];
Step 108: finish;
After vehicle node X obtains home address, the beacon frame of going on the air.
In the address above mentioned layoutprocedure, address duplicate detection process control is carried out in the territory, road, thereby has reduced address configuration cost and delay.In addition, because the random number ID of vehicle node is produced by random function, therefore improved the address configuration success rate.
In the method for the invention, after vehicle node Y starts, can distribute address space [L, U] if its neighbours' vehicle node X has, wherein L and U be positive integer and L less than U, vehicle node Y obtains home address by following process from neighbours' vehicle node X so:
Step 201: beginning;
Step 202: vehicle node Y obtains the geographical coordinate (x of own position, y), produce a random number z and a temporary address, territory, the road ID that territory, the road ID of temporary address obtains for the beacon frame from neighbours' vehicle node X, abscissa is x, ordinate is y, and random number ID is z, and inner ID is 0;
Step 203: vehicle node Y-direction vehicle node X sends address request;
Step 204: after vehicle node X receives address request, return to an address response message to vehicle node Y, the message load is for distributing address space
Vehicle node X is updated to the address space of oneself simultaneously
Step 205: after vehicle node Y receives address response message, with the lower limit of address space
As inner ID, and combine with territory, road ID, abscissa, ordinate and the random number ID of vehicle node X, produce the IPv6 address of oneself, obtain simultaneously and can distribute address space
Step 206: finish;
After vehicle node Y obtains home address, the beacon frame of going on the air.
In the address above mentioned layoutprocedure, vehicle node is obtained the IPv6 address with uniqueness from the neighbours' vehicle node in a jumping scope, need not to carry out the address duplicate detection, so the address configuration task is distributed to each vehicle node equably, realized the distributed address configuration.In addition, the control information of vehicle node applied address is transmitted in a jumping scope, has therefore reduced the address configuration delay, has improved the address configuration success rate.
In the method for the invention, if vehicle node enters in an access node communication range and this access node connects plural couple in router simultaneously, judge that this vehicle node will enter territory, next road from territory, current road, need co-located care-of address; Access node is regularly to neighbours' vehicle node broadcast beacon frame, and the beacon frame load comprises the geographical coordinate interval corresponding to territory, road ID and territory, affiliated road in territory, the affiliated road of access node;
When vehicle node X enters territory, next road, by following Procedure Acquisition Care-of Address:
Step 301: beginning;
The geographical coordinate interval that step 302: vehicle node X is corresponding according to territory, road under own geographical coordinate and access node obtains territory, the road ID in the next car territory that enters and corresponding geographical coordinate interval;
Whether step 303: vehicle node X judgement enters next car territory is territory, local road, if so, carry out step 307, otherwise carry out step 304;
Whether step 304: the vehicle node X judgement neighbours' vehicle node in delivering the car territory has can be distributed address space, if so, carry out step 306, otherwise carry out step 305;
Step 305: vehicle node X obtains Care-of Address by execution in step 101~108, carry out step 307;
Step 306: vehicle node X obtains Care-of Address by execution in step 201~206;
Step 307: finish;
Vehicle node X obtains Care-of Address in delivering the territory, road after, the beacon frame load of its broadcasting is the distributed address space of delivering territory, the road ID in car territory and delivering the car territory and obtain;
Vehicle node X obtains Care-of Address in delivering the territory, road after, couple in router to territory, local road sends address registration message, the Care-of Address of message load for newly obtaining, after couple in router is received address registration message, search the address binding table, the Care-of Address of the corresponding list item of vehicle node X is updated to Care-of Address in address registration message.
The address above mentioned layoutprocedure effectively combines stateless address configuration and two kinds of mechanism of state configuration is arranged, and has state configuration to be based upon on the stateless configure base.In stateless address configuration, the address duplicate detection is controlled in the territory, road and carries out, thereby has reduced address configuration cost and delay.In the state address configuration is arranged, vehicle node is obtained the IPv6 address with uniqueness from the neighbours' vehicle node in a jumping scope, need not to carry out the address duplicate detection, so the address configuration task is distributed to each vehicle node equably, realized the distributed address configuration.In addition, the control information of vehicle node applied address is transmitted in a jumping scope, has therefore reduced the address configuration delay, has improved the address configuration success rate.Due to the priority of the priority that the state address configuration is arranged higher than the stateless configuration, therefore most of node adopts has the state address configuration to obtain the IPv6 address and realized the distributed address configuration, therefore the address configuration cost is less, and the address postpones shorter, and address configuration has higher success rate.
In the method for the invention, if after vehicle node is obtained the address space of home address and correspondence thereof, move to and deliver the territory, road, its home address and corresponding address space thereof remain unchanged; If vehicle node lost efficacy, corresponding home address and corresponding address space thereof discharge automatically;
After if vehicle node is obtained the address space of Care-of Address and correspondence thereof, move to another one new deliver the territory, road, the Care-of Address that it is original and corresponding address space thereof are released, if vehicle node lost efficacy, the Care-of Address that it is corresponding and corresponding address space thereof discharge automatically.
In the present invention, vehicle node need not extra expense and safeguards address space, also need not extra expense and carries out the address recovery, has therefore reduced the address maintenance cost and has reclaimed cost, simultaneously vehicle node also has enough address assignment spaces for distributing, to have improved the address configuration success rate always.
Beneficial effect: the invention provides a kind of vehicle-mounted net address collocation method based on locating information, described In-vehicle networking can obtain the IPv6 address with global uniqueness by address configuration method provided by the present invention, thereby realize and the communicating by letter of IPv6 the Internet, obtain network service.Because address configuration method provided by the invention postpones short, success rate is high, therefore effectively reduces bursts dropping ratio, thereby has improved the service quality of vehicle-mounted net, the present invention can be applicable to the fields such as road conditions monitoring, vehicle management, is with a wide range of applications.
Description of drawings
Below in conjunction with the drawings and specific embodiments, the present invention is done further illustrating, above-mentioned and/or otherwise advantage of the present invention will become apparent.
Fig. 1 is couple in router of the present invention, access node and vehicle node structural representation.
Fig. 2 is node IP v6 address structure schematic diagram of the present invention.
Fig. 3 is vehicle node home address configuration flow schematic diagram of the present invention.
Fig. 4 is that vehicle node of the present invention is from neighbours' vehicle node configuration home address schematic flow sheet.
Fig. 5 is care-of address configuration schematic flow sheet of the present invention.
Embodiment:
The invention provides a kind of vehicle-mounted net address collocation method based on locating information, described In-vehicle networking can obtain the IPv6 address with global uniqueness by address configuration method provided by the present invention, thereby realize and the communicating by letter of IPv6 the Internet, obtain network service.Because address configuration method provided by the invention postpones short, success rate is high, therefore effectively reduces bursts dropping ratio, thereby has improved the service quality of vehicle-mounted net, the present invention can be applicable to the fields such as road conditions monitoring, vehicle management, is with a wide range of applications.
Fig. 1 is couple in router of the present invention, access node and vehicle node structural representation.Described vehicle-mounted net comprises couple in router 1,3 three kinds of nodes of access node 2 and vehicle node; 4, one access nodes 2 of backbone network that couple in router 1 is connected to the IPv6 the Internet can be connected with more than one couple in router 1; The rectangular closed region division that all access nodes 2 that will be connected with a couple in router 1 surround is territory, road 5; An access node 2 can belong to territory, more than one road 5 simultaneously; Vehicle-mounted net comprises one with the territory 5 of setting out on a journey, wherein territory 5, k road ([x interval according to geographical coordinate
k, x
k+1], [y
k, y
k+1]) determine; Access node 2 in territory, road 5 is by couple in router 1 access IPv6 the Internet 4, and access node 2 and the couple in router 1 of vehicle node 3 by territory, place road 5 is linked into IPv6 the Internet 4.
Vehicle-mounted net based on the territory, road can effectively reduce the configuration frequency of vehicle node Care-of Address, thereby avoids the communication disruption that causes due to address change, thereby has improved communication quality.
Fig. 2 is node IP v6 address structure schematic diagram of the present invention.The IPv6 address of vehicle-mounted net node is comprised of five parts: first is territory, road ID, it is overall route prefix, territory, a road of unique identification, territory, the road ID of in territory, a road, all access nodes and vehicle node are obtained in this territory, road IPv6 address is identical, and its value equals territory, the road ID of couple in router in this territory, road; Second portion is the abscissa territory, and sign access node and vehicle node be the geographical abscissa of position separately; Third part is the ordinate territory, and sign access node and vehicle node be the geographical ordinate of position separately; The 4th part is random number ID, is produced by random function; The 5th part is inner ID, vehicle node of unique identification.
Wherein, the 4th part is produced by random function, and purpose is to reduce the repetition rate of address.
The abscissa territory of the IPv6 address of couple in router, ordinate territory, random number ID and inner ID are 0; The random number ID of access node and inner ID are 0;
Vehicle node enters that vehicle-mounted net obtains first IPv6 address is set to its home address, and when vehicle node is obtained home address, the territory, road at place is set to territory, local road; Vehicle node is left the temporary IP v6 address that obtains when territory, local road enters territory, another one road and is set to its Care-of Address, and when vehicle node is obtained Care-of Address, the territory, road at place is set to it and delivers the car territory.
Vehicle-mounted net IPv6 address hierarchy based on locating information can effectively reduce the address repetition rate, postpones and cost thereby reduce address configuration.
Obtained the vehicle node of IPv6 address regularly to neighbours' vehicle node broadcast beacon frame, the beacon frame load is the length of territory, the road ID in its territory, place road and the distributed address space that obtains in the territory, road.
Fig. 3 is vehicle node home address configuration flow schematic diagram of the present invention.Couple in router is preserved an address binding table, is used for being recorded in home address and Care-of Address that vehicle node that the territory of going the same way mutually obtains home address moves to other territories, road.
After vehicle node X started, if its neighbours' vehicle node does not have to distribute the address, vehicle node X was according to following Procedure Acquisition home address:
Step 101: beginning.
Step 102: vehicle node X obtains the geographical coordinate (x of own position, y), produce a random number z and a temporary address, territory, the road ID that territory, the road ID of temporary address obtains for the beacon frame from neighbours' vehicle node, abscissa is x, ordinate is y, and random number ID is z, and inner ID is 0.
Step 103: vehicle node X is the broadcast address detect-message in the territory, road, and the couple in router AR1 to territory, place road sends address detected message simultaneously, and the source address of message is the temporary address of vehicle node X.
Step 104: after couple in router AR1 receives address detected message, check whether the address binding table is identical with abscissa, ordinate and the random number ID of vehicle node X with the vehicle node that judgement moves to other territories, road, if there is identical vehicle node, couple in router AR1 returns to an address identical message to vehicle node X.
Step 105: after other vehicle node in the territory, road are received address detected message, if abscissa, ordinate and the random number ID of its IPv6 address are identical with vehicle node X's, return to an address identical message to vehicle node X, otherwise to neighbours' vehicle node forwarding address detect-message.
Whether step 106: vehicle node X judgement receives the address identical message at the appointed time, if receive, returns to step 102, otherwise carry out step 107.
Step 107: vehicle node X with the temporary address as the home address of oneself and obtain and can distribute address space [1,2
16-1].
Step 108: finish.
After vehicle node X obtains home address, the beacon frame of going on the air.
In the address above mentioned layoutprocedure, address duplicate detection process control is carried out in the territory, road, thereby has reduced address configuration cost and delay.In addition, because the random number ID of vehicle node is produced by random function, therefore improved the address configuration success rate.
Fig. 4 is that vehicle node of the present invention is from neighbours' vehicle node configuration home address schematic flow sheet.After vehicle node Y starts, can distribute address space [L, U] if its neighbours' vehicle node X has, wherein L and U be positive integer and L less than U, vehicle node Y obtains home address by following process from neighbours' vehicle node X so:
Step 201: beginning.
Step 202: vehicle node Y obtains the geographical coordinate (x of own position, y), produce a random number z and a temporary address, territory, the road ID that territory, the road ID of temporary address obtains for the beacon frame from neighbours' vehicle node X, abscissa is x, ordinate is y, and random number ID is z, and inner ID is 0.
Step 203: vehicle node Y-direction vehicle node X sends address request.
Step 204: after vehicle node X receives address request, return to an address response message to vehicle node Y, the message load is for distributing address space
Vehicle node X is updated to the address space of oneself simultaneously
Step 205: after vehicle node Y receives address response message, with the lower limit of address space
As inner ID, and combine with territory, road ID, abscissa, ordinate and the random number ID of vehicle node X, produce the IPv6 address of oneself, obtain simultaneously and can distribute address space
Step 206: finish.
After vehicle node Y obtains home address, the beacon frame of going on the air.
In the address above mentioned layoutprocedure, vehicle node is obtained the IPv6 address with uniqueness from the neighbours' vehicle node in a jumping scope, need not to carry out the address duplicate detection, so the address configuration task is distributed to each vehicle node equably, realized the distributed address configuration.In addition, the control information of vehicle node applied address is transmitted in a jumping scope, has therefore reduced the address configuration delay, has improved the address configuration success rate.
Fig. 5 is care-of address configuration schematic flow sheet of the present invention.If vehicle node enters in an access node communication range and this access node connects plural couple in router simultaneously, judge that this vehicle node will enter territory, next road from territory, current road, need co-located care-of address; Access node is regularly to neighbours' vehicle node broadcast beacon frame, and the beacon frame load comprises the geographical coordinate interval corresponding to territory, road ID and territory, affiliated road in territory, the affiliated road of access node.
When vehicle node X enters territory, next road, by following Procedure Acquisition Care-of Address:
Step 301: beginning.
The geographical coordinate interval that step 302: vehicle node X is corresponding according to territory, road under own geographical coordinate and access node obtains territory, the road ID in the next car territory that enters and corresponding geographical coordinate interval.
Whether step 303: vehicle node X judgement enters next car territory is territory, local road, if so, carry out step 307, otherwise carry out step 304.
Whether step 304: the vehicle node X judgement neighbours' vehicle node in delivering the car territory has can be distributed address space, if so, carry out step 306, otherwise carry out step 305.
Step 305: vehicle node X obtains Care-of Address by execution in step 101~108, carry out step 307.
Step 306: vehicle node X obtains Care-of Address by execution in step 201~206.
Step 307: finish.
Vehicle node X obtains Care-of Address in delivering the territory, road after, the beacon frame load of its broadcasting is the distributed address space of delivering territory, the road ID in car territory and delivering the car territory and obtain.
Vehicle node X obtains Care-of Address in delivering the territory, road after, couple in router to territory, local road sends address registration message, the Care-of Address of message load for newly obtaining, after couple in router is received address registration message, search the address binding table, the Care-of Address of the corresponding list item of vehicle node X is updated to Care-of Address in address registration message.
The address above mentioned layoutprocedure effectively combines stateless address configuration and two kinds of mechanism of state configuration is arranged, and has state configuration to be based upon on the stateless configure base.In stateless address configuration, the address duplicate detection is controlled in the territory, road and carries out, thereby has reduced address configuration cost and delay.In the state address configuration is arranged, vehicle node is obtained the IPv6 address with uniqueness from the neighbours' vehicle node in a jumping scope, need not to carry out the address duplicate detection, so the address configuration task is distributed to each vehicle node equably, realized the distributed address configuration.In addition, the control information of vehicle node applied address is transmitted in a jumping scope, has therefore reduced the address configuration delay, has improved the address configuration success rate.Due to the priority of the priority that the state address configuration is arranged higher than the stateless configuration, therefore most of node adopts has the state address configuration to obtain the IPv6 address and realized the distributed address configuration, therefore the address configuration cost is less, and the address postpones shorter, and address configuration has higher success rate.
In sum, the invention provides a kind of vehicle-mounted net address collocation method based on locating information, described In-vehicle networking can obtain the IPv6 address with global uniqueness by address configuration method provided by the present invention, thereby realizes and the communicating by letter of IPv6 the Internet, and obtains network service.Because address configuration method provided by the invention postpones short, success rate is high, therefore effectively reduces bursts dropping ratio, thereby has improved the service quality of vehicle-mounted net, the present invention can be applicable to the fields such as road conditions monitoring, vehicle management, is with a wide range of applications.
The invention provides the thinking based on the vehicle-mounted net address collocation method of locating information; 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 prerequisite that does not break away from the principle 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.