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 opplication, network can be obtained thus meets the application demand of 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 first will solve is exactly IPv6 Address Autoconfiguration, because vehicle node only could realize the communication with IPv6 network node after acquisition has the IPv6 address of global uniqueness.IPv6 Address Autoconfiguration can when unmanned the intervention for each interface configuration has the IPv6 address of global uniqueness, and the design object of this characteristic and vehicle-mounted net self-organizing, self-configuring is very identical.But meanwhile, in the vehicle-mounted net of fast moving, implement existing IPv6 autoconf and also there are some problems.Such as, state I Pv6 autoconf is had 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, there is state I Pv6 autoconf and be not suitable for the vehicle-mounted net of IPv6 and use; Stateless IPv6 autoconf adopts multicast to carry out duplicate address detection to guarantee its uniqueness in a network by the IPv6 address of Neighbor Discovery Protocol to configuration, postpone because duplicate address detection result in longer address configuration, therefore stateless IPv6 autoconf is difficult to the vehicle-mounted net of IPv6 being applied to fast moving equally.
Therefore, the vehicle-mounted net address collocation method proposing a kind of low delay is needed.
Summary of the invention
Goal of the invention: technical problem to be solved by this invention is for the deficiencies in the prior art, provides a kind of vehicle-mounted net address collocation method based on locating information.
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, access node and vehicle node three kinds of nodes; 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 that all access nodes be connected with a couple in router surround is set to territory, road; An access node can belong to territory, more than one road simultaneously; Vehicle-mounted net comprises one with territory of setting out on a journey, and wherein territory, kth road is according to geographical coordinate interval ([x
k, x
k+1], [y
k, y
k+1]) determine; Access node in territory, road is by couple in router access IPv6 the Internet, and vehicle node is linked into IPv6 the Internet by the access node in territory, place road and couple in router;
First IPv6 address vehicle node being entered vehicle-mounted net acquisition is set to its home address, and the territory, road vehicle node being obtained place during home address is set to territory, local road; Vehicle node is left the temporary IP v6 address obtained when territory, local road enters territory, another one road and be set to its Care-of Address, the territory, road vehicle node being obtained place during Care-of Address is set to it and delivers car territory;
Vehicle-mounted net based on territory, road effectively can reduce the configuration frequency of vehicle node Care-of Address, thus avoids the communication disruption that causes due to address change, thus improves communication quality;
The IPv6 address of vehicle-mounted net node is made up of five parts: Part I is territory, road ID, it is overall route prefix, territory, a unique identification road, in territory, a road, territory, the road ID of the IPv6 address that all access nodes and vehicle node obtain in this territory, road is identical, and its value equals territory, the road ID of couple in router in this territory, road; Part II is abscissa territory, the geographical abscissa of mark access node and vehicle node position separately; Part III is ordinate territory, the geographical ordinate of mark access node and vehicle node position separately; Part IV is random number ID, is produced by random function; Part V is inner ID, unique identification vehicle node;
Wherein, Part IV is produced by random function, and object is the repetition rate reducing 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 is 0;
Vehicle-mounted net IPv6 address hierarchy based on locating information can effectively reduce address repetition rate, thus reduces address configuration delay and cost.
Obtained the vehicle node of IPv6 address regularly to neighbours' vehicle node broadcast beacon frame, beacon frame load be its territory, place road territory, road ID and obtain in territory, road can the length in allocation address space;
Couple in router preserves an address binding table, and the vehicle node obtaining home address for being recorded in territory of going the same way mutually moves to home address and the Care-of Address in other territories, road;
After vehicle node X starts, if do not have can allocation address for its neighbours' vehicle node, then vehicle node X is according to following Procedure Acquisition home address:
Step 101: start;
Step 102: vehicle node X obtains the geographical coordinate (x of oneself position, y), produce a random number z and temporary address, territory, the road ID of temporary address is territory, the road ID obtained from the beacon frame of neighbours' vehicle node, abscissa is x, ordinate is y, random number ID is z, and inner ID is 0;
Step 103: vehicle node X is broadcast address detect-message in territory, road, and the couple in router AR1 simultaneously to territory, place road sends Address Detection message, and the source address of message is the temporary address of vehicle node X;
Step 104: after couple in router AR1 receives Address Detection message, check that whether identical with the abscissa of vehicle node X, ordinate and random number ID address binding table with the vehicle node judging to move to other territories, road, if there is identical vehicle node, couple in router AR1 returns an address identical message to vehicle node X;
Step 105: after other vehicle node in territory, road receive Address Detection message, if the abscissa of its IPv6 address, ordinate and random number ID are identical with vehicle node X's, then return an address identical message to vehicle node X, otherwise to neighbours' vehicle node forwarding address detect-message;
Step 106: vehicle node X judges whether receive address identical message at the appointed time, if received, returns step 102, otherwise carry out step 107;
Step 107: vehicle node X using temporary address as oneself home address and obtain can allocation address space [1,2
16-1];
Step 108: terminate;
After vehicle node X obtains home address, beacon frame of going on the air.
In address above mentioned layoutprocedure, address duplicate detection process control performs in territory, road, thus reduces address configuration cost and delay.In addition, because the random number ID of vehicle node is produced by random function, therefore improve address configuration success rate.
In the method for the invention, after vehicle node Y starts, if having can allocation address space [L, U] for its neighbours vehicle node X, wherein L and U is positive integer and L is less than U, so vehicle node Y then by following process from neighbours vehicle node X acquisition home address:
Step 201: start;
Step 202: vehicle node Y obtains the geographical coordinate (x of oneself position, y), produce a random number z and temporary address, territory, the road ID of temporary address is territory, the road ID obtained from the beacon frame of neighbours vehicle node X, abscissa is x, ordinate is y, 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, returns an address response message to vehicle node Y, and Message Payload is allocation address space
the address space of oneself is updated to by vehicle node X simultaneously
Step 205: after vehicle node Y receives address response message, by the lower limit of address space
as inner ID, and combine with territory, the road ID of vehicle node X, abscissa, ordinate and random number ID, produce the IPv6 address of oneself, obtain can allocation address space simultaneously
Step 206: terminate;
After vehicle node Y obtains home address, beacon frame of going on the air.
In address above mentioned layoutprocedure, vehicle node obtains the IPv6 address with uniqueness from the neighbours' vehicle node within the scope of a jumping, without the need to carrying out address duplicate detection, therefore address configuration task is distributed to each vehicle node equably, achieves distributed address configuration.In addition, the control information of vehicle node applied address is transmitted within the scope of a jumping, postponing, improve address configuration success rate because this reducing address configuration.
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, then 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 it is interval that beacon frame load comprises geographical coordinate corresponding to territory, the road ID in territory, road belonging to access node and territory, affiliated road;
When vehicle node X enters next territory, road, by following Procedure Acquisition Care-of Address:
Step 301: start;
Step 302: the vehicle node X geographical coordinate that territory, road is corresponding belonging to the geographical coordinate of oneself and access node interval obtains territory, road ID and the corresponding geographical coordinate interval in the next car territory entered;
Step 303: vehicle node X judges whether the next car territory entered is territory, local road, if so, carry out step 307, otherwise carry out step 304;
Step 304: vehicle node X judge deliver whether the neighbours' vehicle node in car territory have can allocation address space, if so, carry out step 306, otherwise carry out step 305;
Step 305: vehicle node X obtains Care-of Address by performing step 101 ~ 108, carry out step 307;
Step 306: vehicle node X obtains Care-of Address by performing step 201 ~ 206;
Step 307: terminate;
Vehicle node X after delivering and obtaining Care-of Address in territory, road, the beacon frame load of its broadcast be deliver car territory territory, road ID and can allocation address space what deliver that car territory obtains;
Vehicle node X is after delivering and obtaining Care-of Address in territory, road, couple in router to territory, local road sends address registration message, Message Payload is the new Care-of Address obtained, after couple in router receives address registration message, search address binding table, the Care-of Address of corresponding for vehicle node X list item is updated to the Care-of Address in address registration message.
Address above mentioned layoutprocedure effectively combines stateless address configuration and has state to configure two kinds of mechanism, and has state configuration to be based upon on stateless configure base.In stateless address configuration, address duplicate detection controls to perform in territory, road, thus reduces address configuration cost and delay.In having state address to configure, vehicle node obtains the IPv6 address with uniqueness from the neighbours' vehicle node within the scope of a jumping, without the need to carrying out address duplicate detection, therefore address configuration task is distributed to each vehicle node equably, achieves distributed address configuration.In addition, the control information of vehicle node applied address is transmitted within the scope of a jumping, postponing, improve address configuration success rate because this reducing address configuration.The priority that the priority configured owing to there being state address configures higher than stateless, therefore most of node adopts has state address to configure acquisition IPv6 address and achieves distributed address configuration, therefore address configuration cost is less, and address delay is shorter, and address configuration has higher success rate.
In the method for the invention, if after vehicle node obtains the address space of home address and correspondence thereof, move to and deliver territory, road, its home address and the address space of correspondence thereof remain unchanged; If vehicle node lost efficacy, corresponding home address and the address space of correspondence thereof discharged automatically;
If after vehicle node obtains the address space of Care-of Address and correspondence thereof, move to another one new deliver territory, road, the address space of the Care-of Address that it is original and correspondence thereof is released, if vehicle node lost efficacy, the Care-of Address of its correspondence and the address space of correspondence thereof discharged automatically.
In the present invention, vehicle node safeguards address space without the need to extra expense, also carries out address recovery without the need to extra expense, because this reducing address maintenance cost and reclaiming cost, vehicle node also has enough address assignment spaces for distributing, can improve address configuration success rate always simultaneously.
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, thus realize the communication with 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, thus improves 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.
Accompanying drawing explanation
To do the present invention below in conjunction with the drawings and specific embodiments and further illustrate, 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, thus realize the communication with 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, thus improves 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, access node 2 and vehicle node 3 three kinds of nodes; Backbone network 4, access node 2 that couple in router 1 is connected to IPv6 the Internet can be connected with more than one couple in router 1; The rectangular closed region that all access nodes 2 be connected with a couple in router 1 surround is set to territory, road 5; An access node 2 can belong to territory, more than one road 5 simultaneously; Vehicle-mounted net comprises one with territory 5 of setting out on a journey, and wherein territory, kth road 5 is according to geographical coordinate interval ([x
k, x
k+1], [y
k, y
k+1]) determine; Access node 2 in territory, road 5 accesses IPv6 the Internet 4 by couple in router 1, and vehicle node 3 is linked into IPv6 the Internet 4 by the access node 2 in territory, place road 5 and couple in router 1.
Vehicle-mounted net based on territory, road effectively can reduce the configuration frequency of vehicle node Care-of Address, thus avoids the communication disruption that causes due to address change, thus improves 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 made up of five parts: Part I is territory, road ID, it is overall route prefix, territory, a unique identification road, in territory, a road, territory, the road ID of the IPv6 address that all access nodes and vehicle node obtain in this territory, road is identical, and its value equals territory, the road ID of couple in router in this territory, road; Part II is abscissa territory, the geographical abscissa of mark access node and vehicle node position separately; Part III is ordinate territory, the geographical ordinate of mark access node and vehicle node position separately; Part IV is random number ID, is produced by random function; Part V is inner ID, unique identification vehicle node.
Wherein, Part IV is produced by random function, and object is the repetition rate reducing 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 is 0;
First IPv6 address vehicle node being entered vehicle-mounted net acquisition is set to its home address, and the territory, road vehicle node being obtained place during home address is set to territory, local road; Vehicle node is left the temporary IP v6 address obtained when territory, local road enters territory, another one road and be set to its Care-of Address, the territory, road vehicle node being obtained place during Care-of Address is set to it and delivers car territory.
Vehicle-mounted net IPv6 address hierarchy based on locating information can effectively reduce address repetition rate, thus reduces address configuration delay and cost.
Obtained the vehicle node of IPv6 address regularly to neighbours' vehicle node broadcast beacon frame, beacon frame load be its territory, place road territory, road ID and obtain in territory, road can the length in allocation address space.
Fig. 3 is vehicle node home address configuration flow schematic diagram of the present invention.Couple in router preserves an address binding table, and the vehicle node obtaining home address for being recorded in territory of going the same way mutually moves to home address and the Care-of Address in other territories, road.
After vehicle node X starts, if do not have can allocation address for its neighbours' vehicle node, then vehicle node X is according to following Procedure Acquisition home address:
Step 101: start.
Step 102: vehicle node X obtains the geographical coordinate (x of oneself position, y), produce a random number z and temporary address, territory, the road ID of temporary address is territory, the road ID obtained from the beacon frame of neighbours' vehicle node, abscissa is x, ordinate is y, random number ID is z, and inner ID is 0.
Step 103: vehicle node X is broadcast address detect-message in territory, road, and the couple in router AR1 simultaneously to territory, place road sends Address Detection message, and the source address of message is the temporary address of vehicle node X.
Step 104: after couple in router AR1 receives Address Detection message, check that whether identical with the abscissa of vehicle node X, ordinate and random number ID address binding table with the vehicle node judging to move to other territories, road, if there is identical vehicle node, couple in router AR1 returns an address identical message to vehicle node X.
Step 105: after other vehicle node in territory, road receive Address Detection message, if the abscissa of its IPv6 address, ordinate and random number ID are identical with vehicle node X's, then return an address identical message to vehicle node X, otherwise to neighbours' vehicle node forwarding address detect-message.
Step 106: vehicle node X judges whether receive address identical message at the appointed time, if received, returns step 102, otherwise carry out step 107.
Step 107: vehicle node X using temporary address as oneself home address and obtain can allocation address space [1,2
16-1].
Step 108: terminate.
After vehicle node X obtains home address, beacon frame of going on the air.
In address above mentioned layoutprocedure, address duplicate detection process control performs in territory, road, thus reduces address configuration cost and delay.In addition, because the random number ID of vehicle node is produced by random function, therefore improve 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, if having can allocation address space [L, U] for its neighbours vehicle node X, wherein L and U is positive integer and L is less than U, so vehicle node Y then by following process from neighbours vehicle node X acquisition home address:
Step 201: start.
Step 202: vehicle node Y obtains the geographical coordinate (x of oneself position, y), produce a random number z and temporary address, territory, the road ID of temporary address is territory, the road ID obtained from the beacon frame of neighbours vehicle node X, abscissa is x, ordinate is y, 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, returns an address response message to vehicle node Y, and Message Payload is allocation address space
the address space of oneself is updated to by vehicle node X simultaneously
Step 205: after vehicle node Y receives address response message, by the lower limit of address space
as inner ID, and combine with territory, the road ID of vehicle node X, abscissa, ordinate and random number ID, produce the IPv6 address of oneself, obtain can allocation address space simultaneously
Step 206: terminate.
After vehicle node Y obtains home address, beacon frame of going on the air.
In address above mentioned layoutprocedure, vehicle node obtains the IPv6 address with uniqueness from the neighbours' vehicle node within the scope of a jumping, without the need to carrying out address duplicate detection, therefore address configuration task is distributed to each vehicle node equably, achieves distributed address configuration.In addition, the control information of vehicle node applied address is transmitted within the scope of a jumping, postponing, improve address configuration success rate because this reducing address configuration.
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, then 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 it is interval that beacon frame load comprises geographical coordinate corresponding to territory, the road ID in territory, road belonging to access node and territory, affiliated road.
When vehicle node X enters next territory, road, by following Procedure Acquisition Care-of Address:
Step 301: start.
Step 302: the vehicle node X geographical coordinate that territory, road is corresponding belonging to the geographical coordinate of oneself and access node interval obtains territory, road ID and the corresponding geographical coordinate interval in the next car territory entered.
Step 303: vehicle node X judges whether the next car territory entered is territory, local road, if so, carry out step 307, otherwise carry out step 304.
Step 304: vehicle node X judge deliver whether the neighbours' vehicle node in car territory have can allocation address space, if so, carry out step 306, otherwise carry out step 305.
Step 305: vehicle node X obtains Care-of Address by performing step 101 ~ 108, carry out step 307.
Step 306: vehicle node X obtains Care-of Address by performing step 201 ~ 206.
Step 307: terminate.
Vehicle node X after delivering and obtaining Care-of Address in territory, road, the beacon frame load of its broadcast be deliver car territory territory, road ID and can allocation address space what deliver that car territory obtains.
Vehicle node X is after delivering and obtaining Care-of Address in territory, road, couple in router to territory, local road sends address registration message, Message Payload is the new Care-of Address obtained, after couple in router receives address registration message, search address binding table, the Care-of Address of corresponding for vehicle node X list item is updated to the Care-of Address in address registration message.
Address above mentioned layoutprocedure effectively combines stateless address configuration and has state to configure two kinds of mechanism, and has state configuration to be based upon on stateless configure base.In stateless address configuration, address duplicate detection controls to perform in territory, road, thus reduces address configuration cost and delay.In having state address to configure, vehicle node obtains the IPv6 address with uniqueness from the neighbours' vehicle node within the scope of a jumping, without the need to carrying out address duplicate detection, therefore address configuration task is distributed to each vehicle node equably, achieves distributed address configuration.In addition, the control information of vehicle node applied address is transmitted within the scope of a jumping, postponing, improve address configuration success rate because this reducing address configuration.The priority that the priority configured owing to there being state address configures higher than stateless, therefore most of node adopts has state address to configure acquisition IPv6 address and achieves distributed address configuration, therefore address configuration cost is less, and address delay is 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, thus realizes the communication with IPv6 the Internet, obtains network service.Because address configuration method provided by the invention postpones short, success rate is high, therefore effectively reduces bursts dropping ratio, thus improves 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 of the vehicle-mounted net address collocation method based on locating information; the method and access of this technical scheme of specific implementation is 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.The all available prior art of each component part not clear and definite in the present embodiment is realized.