Method and apparatus is determined in address in local area network (LAN) based on IPv6
Technical field
Address sign technology in the local area network (LAN) based on IPv6 (Internet Protocol Version 6) the present invention relates to, method and apparatus is determined in the address relating in particular in a kind of local area network (LAN) based on IPv6.
Background technology
In the Internet of global extensive use, is at present to take IPv4 (Internet Protocol Version 6) agreement for basic, IP address represents there are in theory about 4,000,000,000 with 32 bits, in fact because various restrictions only have half address and can use.And, considering and due to the development of 3G terminal, IP phone, home network etc., the demand of IP address can significantly be increased the coming years, professional institution predicts probably the first half of the year in 2011, global ip v4 address can be assigned.
Internet engineering group on November 7th, 1994 (IESG, Internet Engineering SteeringGroup) is formally by studying IPv6 as standard.IPv6 address adopts 128 bit addresses length, almost can unrestrictedly provide address, except solving the limited defect of IPv4 address number, IPv6 agreement also possesses following several respects advantage with respect to IPv4 agreement: the automatic equipment allocative abilities that IPv6 agreement the provides equipment that access network identification is new automatically can automatically configuring, is very important for the user of mobile and wireless access; IPv6 protocol suite is mostly supported new security functions, such as system to the authentication operation of system, data transmission based on encrypting etc.; In IPv6 agreement, the definition of packet-priority can better be supported real-time application; Multi-casting communication mechanism in IPv6 agreement can provide point-to-multipoint communication process making full use of under the prerequisite of Internet resources.
IPv6 address by the difference of addressing system and function, can be divided into three basic forms of it: the first is unicast address (Unicast) at present, is used for identifying a single interface.Send to the bag of a unicast address to be delivered on the interface by this address designation.The second is any program request address (Anycast), generally distributes to a plurality of interfaces that belong to different nodes.Send to the bag of any program request address be sent to this address designation, according on a nearest interface of routing protocol distance metric.The third is multicast address (Multicast), is generally used for identifying a group interface of different nodes, sends to the bag of a multicast address to be sent on the total interface that this address identifies.
Have at present three kinds of conventional forms to can be used for representing IPv6 address with text-string form: the first form is x:x:x:x:x:x:x:x, wherein, " x " is hexadecimal numerical value, corresponds respectively to eight 16 sections in 128 bit address.For example: 2001:fecd:ba23:cd1f:dcb1:1010:9234:4078.
Some IPv6 addresses may comprise a lot of zero-bit.For the ease of describe this address with text mode, formulated a kind of special grammer.Use ":: " indicate that 16 of many groups are zero.":: " can only occur once in an address, can be used for compressing leading, end in an address or adjacent 16 zero.For example: fec0:1:0:0:0:0:0:1234 can be expressed as fec0:1::1234.
When processing has the hybird environment of IPv4 and IPv6 node, can use the another kind of form of IPv6 address.Be x:x:x:x:x:x:d.d.d.d, wherein, " x " is the hexadecimal value of 96 high-order consecutive bytes of IPv6 address, and " d " is the decimal value of 32 low level consecutive bytes.For example: 0:0:0:0:0:0:10.1.2.3 and:: the representation of 10.11.3.123.
Although the length of 128 bit address of IPv6 has solved the problem of IP Address Run Short well, also brought in actual use a new problem: IPv6 address is because oversize and cannot accurately remember.Although can pass through access services device domain name when carrying out client/server business, by the parsing of domain name system (DNS, Domain Name System) and return to corresponding IPv6 address and solve.But for the terminal in local area network (LAN), conventionally there is no domain name, can only directly access by IPv6 address, this has just brought very large difficulty to the communication of terminal in local area network (LAN).And one supported the terminal of IPv6 often to have a plurality of IPv6 address, especially handheld terminal is subject to the limitation of address input and display mode, and problem is more outstanding.
Summary of the invention
In view of this, main purpose of the present invention is to provide the address in a kind of local area network (LAN) based on IPv6 to determine method and apparatus, and the input IPv6 reference address providing to user is simpler, facilitates the local area network (LAN) of user based on IPv6 to communicate.
For achieving the above object, technical scheme of the present invention is achieved in that
A method is determined in address in local area network (LAN) based on IPv6, and the part that in local area network (LAN), the address field of terminal is identical indicates with the identifier of setting, and described method comprises:
During initiating business request, the part that address field described in object terminal address is identical replaces with described identifier, as the destination address of input; And
In the interface that source terminal is supported at self, determine the interface that forwards described service request, and according to the address of described destination address and current selected interface, described destination address is converted to IPv6 complete form.
Preferably, in the interface that described source terminal is supported at self, select to forward the interface of described service request, comprising:
Total interface and IPv6 address thereof that described source terminal search is supported self, remove virtual interface address, local loopback address, address, tunnel and multicast address in total interface IPv6 address; And
Select interface that priority is the highest as the interface that forwards described service request.
Preferably, in the interface that described source terminal is supported at self, select to forward the interface of described service request, comprising:
Described source terminal is determined the interface that forwards described service request according to identifier described in inputted destination address, different identifiers is corresponding to different forwarding interfaces.
Preferably, in the interface that described source terminal is supported at self, determine the interface that forwards described service request, comprising:
Described source terminal is using the interface of appointment as the interface that forwards described service request.
Preferably, determine the IPv6 complete form of described destination address, comprising:
According to the number of characters n after identifier described in inputted destination address, by rear n character replacement of the IPv6 address of selected interface, be the character after identifier described in described destination address.
Preferably, described method also comprises:
After service request retransmission failure, select interface that priority is time high as the interface that forwards described service request, until described service request forwards successfully or described source terminal in the interface supported be selected complete.
An address determining device in local area network (LAN) based on IPv6, comprising:
Indicate unit, the identifier that is used to the identical part of address field of terminal in local area network (LAN) to indicate to set;
Input unit, for when the initiating business request, the part that address field described in object terminal address is identical replaces with described identifier, as the destination address of input;
Determining unit, determines for the interface of supporting at source terminal the interface that forwards described service request; And
Converting unit, for determining the IPv6 complete form of described destination address according to the address of described destination address and the current selected interface of described determining unit.
Preferably, described determining unit comprises:
Search subelement, total interface and the IPv6 address thereof for searching for described source terminal, supported;
Remove subelement, for removing virtual interface address, local loopback address, address, tunnel and the multicast address of the total interface IPv6 address that described search unit searches for; And
Chooser unit, for selecting interface that priority is the highest as the interface that forwards described service request.
Preferably, described determining unit comprises:
Subelement is set, is used to the identical part of address field of terminal in LAN that different identifiers is set; And
Determine subelement, for determine the interface that forwards described service request according to identifier described in inputted destination address.
Preferably, described determining unit is using the interface of appointment as the interface that forwards described service request.
Preferably, described determining unit, according to the number of characters n after identifier described in inputted destination address, is the character after identifier described in described destination address by rear n character replacement of the IPv6 address of selected interface.
Preferably, described chooser unit, after service request retransmission failure, selects interface that priority is time high as the interface that forwards described service request, until described service request forwards successfully or described source terminal in the interface supported be selected complete.
In the present invention, for the IPv6 address of terminal in local area network (LAN), for the part that wherein address field is identical, with the identifier of setting, indicate, user is when communicating by IPv6 address, needn't input the IPv6 address of standard, and input carries the home address of identifier, source terminal is changed automatically according to user's Input Address, thereby realize the communication between terminal in local area network (LAN), greatly facilitate access and the maintenance of user's local area network terminal.Technical solution of the present invention is simple and practical.
Accompanying drawing explanation
Fig. 1 the present invention is based on the flow chart that method is determined in address in the local area network (LAN) of IPv6;
Fig. 2 is the composition structural representation that the present invention is based on the address determining device in the local area network (LAN) of IPv6;
Fig. 3 is the composition structural representation of determining unit in the address determining device the present invention is based in the local area network (LAN) of IPv6;
Fig. 4 is that in the address determining device the present invention is based in the local area network (LAN) of IPv6, another of determining unit forms structural representation.
Embodiment
Basic thought of the present invention is: for the IPv6 address of terminal in local area network (LAN), for the part that wherein address field is identical, with the identifier of setting, indicate, user is when communicating by IPv6 address, needn't input the IPv6 address of standard, and input carries the home address of identifier, source terminal is changed automatically according to user's Input Address, thereby realizes the communication between terminal in local area network (LAN), greatly facilitates access and the maintenance of user's local area network terminal.
For making the object, technical solutions and advantages of the present invention clearer, by the following examples and with reference to accompanying drawing, the present invention is described in more detail.
IP address is comprised of the network address and host address two parts conventionally, All hosts address in same local area network (LAN) all possesses the identical network address, length is prefix (prefix) length, and certain two IPv6 address often possesses longer same prefix in local area network (LAN), the present invention is just for this feature, for the prefix addresses of terminal in local area network (LAN), respective identifier being set identifies, by this identifier and host address, can realize host addresses all in same local area network (LAN) is identified, during the terminal carrying out service request of user in local area network, needn't input the IPv6 address of this service request terminal, only input utilizes the address of the common sign of this identifier and respective host address, because selected identifier is all the known identifier of user, identifier is relatively simple, the address of terminal is more easily remembered.
The expression way (being called same People Near Me address in the present invention) of the IP address of terminal that the present invention proposes, only needs to know in same local area network (LAN) the part with aforesaid prefix addresses difference.For example the IPv6 address of terminal interface is: 2001:fecd:ba23:cd1f:dcb1:1010:9234:4078, the same People Near Me address of this interface can be denoted as #c7 so, " # " is identifier, for identifying the address in IPv6 address in each terminal of same local area network (LAN) with same section, identified " 2001:fecd:ba23:cd1f:dcb1:1010:9234:40 ", " #c7 " actual represent be with the same local area network (LAN) of this interface word in the IPv6 address neighbours' main frame that is 2001:fecd:ba23:cd1f:dcb1:1010:9234:40c7.Above-mentioned identifier can also be other characters, so long as terminal can be supported the identifier of input.Identifier is preferably chosen the character outside the character of 16 systems signs, choose the character outside " 0 to 9 " and " A to E ", with with IPv6 address in home address distinguish, identifier can be also the combination of an above character, as long as be simple and easy to memory.
The IPv6 address of the terminal based in above-mentioned same local area network (LAN) represents mode, and illustrating the present invention is that address transition and communication are carried out in the IPv6 address how to represent based on aforesaid way.
Fig. 1 the present invention is based on the flow chart that method is determined in address in the local area network (LAN) of IPv6, and as shown in Figure 1, the address the present invention is based in IPv6 local area network (LAN) determines that method comprises the following steps:
Step 101: during initiating business request, the part that address field described in object terminal address is identical replaces with described identifier, as the destination address of input.
By aforesaid IPv6, represent mode, during object terminal originating service request in local area network, only input carries the home address of identifier accordingly, while being aforesaid 2001:fecd:ba23:cd1f:dcb1:1010:9234:40c7 as object terminal address, only input " #c7 " in destination address.
Step 102: determine the interface that forwards described service request in the interface that source terminal is supported at self, and according to the address of described destination address and current selected interface, described destination address is converted to IPv6 complete form.
On whole interfaces in source terminal search self and interface, corresponding IPv6 address forms set A, according to the information of real network environment and set access control, from set A, remove the address of virtual interface, local loopback address, address, tunnel and multicast address etc., judge whether current set A is empty, finish if it is empty current flow process, the current interface without service request forwarding of terminal is described, if be not empty, in remaining interface IP address, according to the priority of interface, from usable interface, select the interface that priority is the highest, interface as forwarding service request, and according to the IPv6 address of this interface, determine the IPv6 address of the corresponding reality of destination address of user input.Here, the interface of supporting due to terminal is a plurality of, therefore, when generating service request, need to choose one as the final forwarding interface of service request in these interfaces, can the priority of these interfaces be set according to actual network environment, choose the interface that interface that priority is the highest forwards as service request at every turn.
Certainly, also can realize in other way the interface that service request forwards.For example, the identifier of respective local area network is set for the type of the local area network (LAN) under institute's supporting interface in terminal, for example, while comprising three interfaces in terminal, the local area network (LAN) that these three interfaces connect is different, like this, can different identifiers be set for the terminal in these three local area network (LAN)s, such as being set to respectively " j ", " k ", " l " etc., like this, the identifier in the destination address of inputting by user can be determined the interface of answering forwarding service request.Certainly, the method that different identification symbol is set has increased the difficulty of user's local area network identifier memory, and which is applicable to the less situation of terminal interface.The present invention preferably utilizes the mode of aforesaid single identifier to carry out the sign of IP address of terminal.
Certainly, also can be in source terminal the interface that forwards of specific data, this specified interface is as the interface that forwards described service request.
After determining the interface that forwards aforementioned service request, determine to the IPv6 address of interface thereupon, can determine according to the IPv6 address of determined interface the IPv6 address of the corresponding reality of destination address of user's input.For example, when the interface IP address of forwarding service request of determining terminal is when " 2001:fecd:ba23:cd1f:dcb1:1010:9234:4078 ", can determine the IPv6 address " 2001:fecd:ba23:cd1f:dcb1:1010:9234:40c7 " of the corresponding reality in address " #c7 " that user inputs.Determine two characters after sign, and two characters " 40 " behind the IPv6 address of the interface of determined forwarding service request are directly replaced with to the character after the identifier " # " in " #c7 ".
Step 103: source terminal forwards described service request by determined object IPv6 address.
By the practical IP v6 address of determined destination address in step 102, the interface by determined forwarding service request forwards described service request to source terminal.Identical with existing service request pass-through mode, repeat no more it here and realize details.
Step 104: receive after the retransmission failure message of service request, for the situation that an identifier is only set, to in set A, select the inferior high interface of priority as the interface that forwards described service request, return to the interface that step 102 redefines forwarding service request, until described service request forwards successfully or described source terminal in the interface supported selected complete, flow process finishes.The interface of supporting due to terminal is a plurality of, therefore, by the priority option interface of interface and determine the practical IP v6 address of destination address, terminal corresponding to this object IPv6 address might not be correctly to process the terminal of service request, thereby, at definite service request retransmission failure or return to service request and process after failure, will attempt whether success of time priority interface forwarding service request, until the interface of supporting in service request forwarding success or source terminal is selected complete.Step 104 is optional steps.
The present invention can make terminal can show easily input IP address with People Near Me address and conversion method, and utilizes the IP address direct communication of above-mentioned simple sign, conversion method of the present invention has been considered the factors such as network capabilities and user preferences, with People Near Me address, possesses the characteristic that can converse a plurality of neighbours address for the distinct interface of terminal, can be based on the novel service application of this feature development, such as realizing business redundancy etc., for redundancy terminal in different local area network (LAN)s (configuring identical terminal), as long as configure for above-mentioned redundancy terminal the IPv6 address that bit address is not identical in different local area network (LAN)s, by inputting identical object home address, by any interface, can realize the Operational Visit in above-mentioned redundancy terminal.
Fig. 2 is the composition structural representation that the present invention is based on the address determining device in the local area network (LAN) of IPv6, as shown in Figure 2, the present invention is based on address determining device in the local area network (LAN) of IPv6 comprises and indicates unit 20, input unit 21, determining unit 22 and converting unit 23, wherein, the identifier that sign unit 20 is used to the identical part of address field of terminal in local area network (LAN) to indicate to set; Input unit 21 is for when the initiating business request, and the part that address field described in object terminal address is identical replaces with described identifier, as the destination address of input; Determining unit 22 determines for the interface of supporting at source terminal the interface that forwards described service request; Converting unit 23 is for determining the IPv6 complete form of described destination address according to the address of described destination address and the current selected interface of described determining unit.Concrete, determining unit 22, according to the number of characters n after identifier described in inputted destination address, is the character after identifier described in described destination address by rear n character replacement of the IPv6 address of selected interface.Fig. 3 is the composition structural representation of determining unit in the address determining device the present invention is based in the local area network (LAN) of IPv6, as shown in Figure 3, determining unit of the present invention comprises search subelement 220, removes subelement 221 and chooser unit 22, wherein, search subelement 220 is supported for searching for described source terminal total interface and IPv6 address thereof; Remove subelement 221 for virtual interface address, local loopback address, address, tunnel and the multicast address of the total interface IPv6 address of removing search unit 220 and searching for; Chooser unit 222 is for selecting interface that priority is the highest as the interface that forwards described service request.
Chooser unit 222, after service request retransmission failure, selects interface that priority is time high as the interface that forwards described service request, until described service request forwards successfully or described source terminal in the interface supported be selected complete.
Fig. 4 is that in the address determining device the present invention is based in the local area network (LAN) of IPv6, another of determining unit forms structural representation, as shown in Figure 4, the present invention determines that comprise that determining unit comprises arranges subelement 223 and definite subelement 224, wherein, subelement 223 being set is used to the identical part of address field of terminal in LAN that different identifiers is set; Determine that subelement 224 is for determining the interface that forwards described service request according to identifier described in inputted destination address.
Determining unit 22 of the present invention also directly the data retransmission interface of appointment as the interface that forwards described service request.
Those skilled in the art are to be understood that, address determining device in the local area network (LAN) based on IPv6 shown in Fig. 2 is to design for realizing the method that in aforesaid elimination multipoint cooperative, between the user of different districts, sounding reference symbol disturbs, in device shown in Fig. 2, each processing unit and the function of processing subelement can be understood with reference to the description of preceding method, the function of each processing unit and processing subelement can realize by the program running on processor, also can realize by concrete logical circuit.
The above, be only preferred embodiment of the present invention, is not intended to limit protection scope of the present invention.