Content of the invention
Present invention solves the technical problem that being to provide a kind of integration method and device of mapping item in mark net, Ke Yiyou
Effect reduces the number of entries of mapping table.
For solving above-mentioned technical problem, the invention provides a kind of integration method for identifying mapping item in net, including:
For the identity subnet that the distribution of access service router is specified;Mark net equipment is in identity and the position of storage
Putting increases the mapping item of each subnet in identity map table, and the mapping item to mobile terminal is integrated.
Further, in the mapping item of the subnet, including following map information:Subnet index, access service route
The station location marker of device, and subnet mask length.
Further, the mapping item of the mobile terminal, including following map information:Identity, mobile terminal
Station location marker, and subnet mask length.
Further, the subnet mask length of the mobile terminal is 32.
Further, the mapping item of mobile terminal is integrated, is specifically included:
When the mark net equipment receives the new information of mobile terminal, according to the identity mark in the new information
Know most long matching inquiry station location marker in the identity with station location marker mapping table, and judge the mapping item for matching
In subnet mask length:
If the subnet mask length in the mapping item is 32, that is, the mapping item of mobile terminal is matched, then
Whether the station location marker in the comparison mapping item consistent with the station location marker in the new information, and when inconsistent after
Continue and mate with station location marker mapping table in the identity, until matching the mapping item of subnet, that is, matched reflects
When the subnet mask length of firing table item is less than 32, then the station location marker in the mapping item of the subnet and the renewal
Whether the station location marker in message is consistent, if unanimously, deleting the mapping item of the mobile terminal for matching, if differing
Cause, then the mapping item of the mobile terminal is updated according to the station location marker in the new information.
Further, methods described also includes:
When the mark net equipment according to the identity in the new information in the identity and station location marker
In mapping table during most long matching inquiry station location marker, if the subnet mask length in the mapping item for matching is less than 32,
The mapping item of subnet is matched, then in the station location marker in the mapping item of the subnet and the new information
Whether station location marker is consistent, if inconsistent, is marked in described part mark and position according to the station location marker in the new information
Knowing increases the mapping item of the mobile terminal in mapping table.
Further, the mark net equipment includes:Access service router, positional information registration server, and/or
Internet interface business routers.
Present invention also offers a kind of integrating apparatus for identifying mapping item in net, are applied to identify net equipment, the dress
Put including:Mapping memory module, and inquiry integration module, wherein:
The mapping memory module is used for, the mapping table of memory mobile terminal in identity with station location marker mapping table
?;And according to the identity subnet that specifies for the distribution of access service router, map with station location marker in the identity
Increase the mapping item of each subnet in table;
Module is integrated in the inquiry to be used for, according to the mapping item of the subnet, to the identity and station location marker
In mapping table, the mapping item of mobile terminal is integrated.
Further, in the mapping item of the subnet of the mapping memory module storage, including following map information:
Subnet index, the station location marker of access service router, and subnet mask length;The mapping item of the mobile terminal, bag
Include following map information:Identity, the station location marker of mobile terminal, and subnet mask length;Wherein described mobile terminal
Subnet mask length be 32.
Further, the inquiry is integrated module and is used for, and in such a way the mapping item of mobile terminal is carried out whole
Close:
When the new information of mobile terminal is received, according to the identity in the new information in the identity mark
Know and most long matching inquiry station location marker in station location marker mapping table, and the subnet mask in the mapping item for judging to match is long
Degree:
If the subnet mask length in the mapping item is 32, that is, the mapping item of mobile terminal is matched, then
Whether the station location marker in the comparison mapping item consistent with the station location marker in the new information, and when inconsistent after
Continue and mate with station location marker mapping table in the identity, until matching the mapping item of subnet, that is, matched reflects
When the subnet mask length of firing table item is less than 32, then the station location marker in the mapping item of the subnet and the renewal
Whether the station location marker in message is consistent, if unanimously, deleting the mapping item of the mobile terminal for matching, if differing
Cause, then the mapping item of the mobile terminal is updated according to the station location marker in the new information.
Further, the inquiry is integrated module and is additionally operable to:According to the identity in the new information for receiving
In the identity with station location marker mapping table during most long matching inquiry station location marker, if in the mapping item for matching
Subnet mask length less than 32, that is, match the mapping item of subnet, then the position in the mapping item of the subnet
Put mark whether consistent with the station location marker in the new information, if inconsistent, according to the position in the new information
Identifying increases the mapping item of the mobile terminal in described part mark with station location marker mapping table.
Using the mapping table structure and integrated scheme of the present invention, compared with current mapping table, can be by the bar of mapping table
Mesh number amount is reduced to original 1/255~1/65535, on the one hand saves the memory space of mapping table, on the other hand in super large
Simpler easy is become to storage, management and the inquiry of mapping table in the case of amount user, is conducive to identifying the extensive of net
Deployment.
Specific embodiment
In present embodiment, relate generally to identify net equipment as follows:
TSR (ASR), the access-in management of main responsible mobile terminal and mobile management is accessed, RID is set
On ASR;
Internet interface business routers (ISR), is mainly responsible for connection identifier net and the Internet, it may have RID;
Positional information registration server (ILR), main be responsible for preserving mobile terminal positional information be<AID, RID>Mapping
Relation, and reply the inquiry to mapping relations.
In present embodiment, AID is belonged to ASR in units of IP subnets, then the AID in this subnet is distributed to return
Belong to the mobile terminal of ASR (being accessed through this ASR).
Present embodiment provides a kind of integration method for being applied to identify the mapping item in net, concrete using such as lower section
Case:
For the AID subnets that ASR distribution is specified, identity and in station location marker mapping table increasing of the net equipment in storage is identified
Plus AID subnets<AID, RID>Mapping item, and to mobile terminal<AID, RID>Mapping item is integrated.
Further, the AID subnets<AID, RID>In mapping item, including following map information:AID subnet ropes
Draw, RID, and subnet mask length.
Further, the mobile terminal<AID, RID>Mapping item, including following map information:AID, RID, with
And subnet mask length.
Wherein, the mask-length in the mapping item of main frame is to fix 32.
Further, to mobile terminal<AID, RID>Mapping item is integrated, and is specifically included:
When the mark net equipment receives the new information of mobile terminal, existed according to the AID in the new information
Identity and most long matching inquiry RID in station location marker mapping table,
If being not matched to list item, as abnormal conditions process;
If matching list item, the subnet mask length in segment table entry is further sentenced:
If subnet mask length=32, judge whether the RID in list item is consistent with the RID in new information, if one
Cause, then need not update list item;If it is inconsistent, continue coupling, until matching the subnet list item (subnet table at AID places
32) subnet mask length < in, if the RID in subnet list item is consistent with the RID in new information, deletes AID
The host entries (being integrated into subnet list item) being fitted on, if the RID in subnet list item is inconsistent with the RID in new information,
Corresponding host entries are updated according to new information then.
If subnet mask length < 32, judge whether the RID in list item is consistent with the RID in new information.If one
Cause, it is not necessary to update mapping item;If inconsistent, add or update the host entries of AID according to new information.
One kind based on present embodiment<AID, RID>Mapping table structure, as shown in table 1 below:
1 mapping table structure of table
AID/AID subnet numbers |
RID |
AID subnet mask lengths |
Other fields |
AID1 |
RID2 |
32 |
|
AID2 |
RID1 |
32 |
|
AIDn |
RIDm |
32 |
|
AID subnets 1 |
RID1 |
x |
|
AID subnets 2 |
RID2 |
y |
|
AID subnet n |
RIDn |
z |
|
Present embodiment is implemented including following key step:
Step A, mobile terminal MN1, MN2 access the mark net (identity of MN1, MN2 point by its ASR for being belonged to
Not Wei AID1, AID2, positional information be respectively RID1, RID2), as AID1, AID2 are belonging respectively to AID subnets 1, AID subnets
2, so the ASR/ISR in ILR and its Correspondent Node<AID, RID>In mapping table,<AID1, RID1,32>、<AID2,
RID2,32>The two list items are integrated into list item respectively<AID subnets 1, RID1, x>、<AID subnets 2, RID2, y>In (wherein
X, y are respectively AID subnets 1, the mask-length of AID subnets 2), as shown in table 2 below:
Table 2
AID/AID subnet numbers |
RID |
AID subnet mask lengths |
Other fields |
AID subnets 1 |
RID1 |
x |
|
AID subnets 2 |
RID2 |
y |
|
When the positional information of mobile node MN 1 is inquired about, can be found from upper table with the algorithm of the most long coupling of IP address
Correct result RID1;
Step B, when mobile terminal MN1, MN2 access mark net by ASR2 (RID2), ASR1 (RID1) respectively,<AID,
RID>The content of mapping table is as shown in table 3 below:
Table 3
AID/AID subnet numbers |
RID |
AID subnet mask lengths |
Other fields |
AID1 |
RID2 |
32 |
|
AID2 |
RID1 |
32 |
|
AID subnets 1 |
RID1 |
x |
|
AID subnets 2 |
RID2 |
y |
|
When the positional information of mobile node MN 1, MN2 is inquired about, can be from upper table with the algorithm of the most long coupling of IP address
It is RID2, RID1 respectively to find correct result;
Step C, mobile terminal MN1 are moved to when accessing mark net by ASR1 in the range of ASR1, and ILR, MN1 communication is right
The ISR or ASR at end can receive mapping item update message<AID1, RID1,32>, looked into the subnet number of AID1 in the mapping table
RID is ask, RID1 is obtained, identical with the RID in update message, then entry<AID1, RID1,32>It is integrated into<AID subnets
1, RID1, x>, mapping table content is as shown in table 4 below:
Table 4
AID/AID subnet numbers |
RID |
AID subnet mask lengths |
Other fields |
AID2 |
RID1 |
32 |
|
AID subnets 1 |
RID1 |
x |
|
For making the object, technical solutions and advantages of the present invention become more apparent, below in conjunction with accompanying drawing to the present invention
Embodiment be described in detail.It should be noted that in the case where not conflicting, in the embodiment and embodiment in the application
Feature can mutual combination in any.
As a example by using IPv4/IPv6 addresses as the mark net application scenarios of AID, in the present embodiment, it is assumed that ASR1, ASR2's
RID is respectively 192.168.1.1,192.168.2.1, belongs to its AID subnets and is respectively 10.1.1.0/24,10.1.2.0/
24, mobile terminal MN1, MN2 are respectively belonging to ASR1, ASR2, and its AID is respectively 10.1.1.1,10.1.2.1.Match somebody with somebody on ASR
Need when putting the AID subnets for belonging to which plus subnet mask length, and together with other necessary informations such as AID subnet numbers on
Report for work ILR.
As shown in figure 1, when MN1, MN2 access mark net by ASR1, ASR2 respectively, they are accessed by ISR
Internet.After MN1 starts, ASR1 sends update message to ILR and carries map information<10.1.1.1,192.168.1.1,32
>.ILR obtains 192.168.1.1, with the RID in update message with 10.1.1.1 most long matching inquiry RID in the mapping table
Unanimously, and subnet mask be 24!=32, by new mapping item<10.1.1.1,192.168.1.1,32>It is integrated into<
10.1.1.0,192.168.1.1,24>.After MN2 starts, the handling process of ASR, ILR is identical with MN1.At this moment on ILR, ISR
's<AID, RID>Content in mapping table is as shown in table 5 below:
Table 5
AID/AID subnet numbers |
RID |
AID subnet mask lengths |
10.1.1.0 |
192.168.1.1 |
24 |
10.1.2.0 |
192.168.2.1 |
24 |
During the positional information of inquiry mobile node MN 1, just can be found from upper table with the algorithm of the most long coupling of IP address
True result 192.168.1.1.
As shown in Fig. 2 when MN1, MN2 are switched to ASR2, ASR1 respectively, ASR1, ASR2 are respectively by new mapping item<
10.1.2.1,192.168.1.1,32>、<10.1.1.1,192.168.2.1,32>ISR and ILR are sent to update message.
With 10.1.1.1 most long matching inquiry RID in the mapping table, 192.168.1.1 is obtained, in update message
RID is inconsistent, and subnet mask is 24!=32, add new mapping item<10.1.1.1,192.168.2.1,32>;With
10.1.2.1 most long matching inquiry RID in the mapping table, obtains 192.168.2.1, inconsistent with the RID in update message,
And subnet mask is 24!=32, add new mapping item<10.1.2.1,192.168.1.1,32>.At this moment, on ILR, ISR
's<AID, RID>Content in mapping table is as shown in table 6 below:
Table 6
AID/AID subnet numbers |
RID |
AID subnet mask lengths |
10.1.1.1 |
192.168.2.1 |
32 |
10.1.2.1 |
192.168.1.1 |
32 |
10.1.1.0 |
192.168.1.1 |
24 |
10.1.2.0 |
192.168.2.1 |
24 |
During the positional information of inquiry mobile node MN 1, just can be found from upper table with the algorithm of the most long coupling of IP address
True result 192.168.2.1.
In conjunction with shown in Fig. 1, when mobile terminal MN1 is moved back to accesses mark net by ASR1 in the range of ASR1,
The ISR or ASR of ILR, MN1 Correspondent Node can receive the mapping item update message from ASR1<10.1.1.1,
192.168.1.1,32>.
With 10.1.1.1 most long matching inquiry RID in the mapping table, 192.168.2.1 is obtained, subnet mask is 32, first
192.168.2.1 is updated to 192.168.1.1 by step, and second step continues most long matching inquiry, obtains second matching result
192.168.1.1, mate the RID for obtaining for the second time identical with the RID in update message, then, then entry<
10.1.1.1,192.168.1.1,32>It is integrated into<10.1.1.0,192.168.1.1,24>, mapping table content such as table 7 below institute
Show:
Table 7
AID/AID subnet numbers |
RID |
AID subnet mask lengths |
10.1.1.0 |
192.168.1.1 |
24 |
10.1.2.0 |
192.168.2.1 |
24 |
Additionally, additionally providing a kind of integrating apparatus of mapping item in mark net in the embodiment of the present invention, it is applied to identify
Net equipment, described device include:Mapping memory module, and inquiry integration module, wherein:
The mapping memory module is used for, the mapping table of memory mobile terminal in identity with station location marker mapping table
?;And according to the identity subnet that specifies for the distribution of access service router, map with station location marker in the identity
Increase the mapping item of each subnet in table;
Module is integrated in the inquiry to be used for, according to the mapping item of the subnet, to the identity and station location marker
In mapping table, the mapping item of mobile terminal is integrated.
Further, in the mapping item of the subnet of the mapping memory module storage, including following map information:
Subnet index, the station location marker of access service router, and subnet mask length;The mapping item of the mobile terminal, bag
Include following map information:Identity, the station location marker of mobile terminal, and subnet mask length;Wherein described mobile terminal
Subnet mask length be 32.
Further, the inquiry is integrated module and is used for, and in such a way the mapping item of mobile terminal is carried out whole
Close:
When the new information of mobile terminal is received, according to the identity in the new information in the identity mark
Know and most long matching inquiry station location marker in station location marker mapping table, and the subnet mask in the mapping item for judging to match is long
Degree:
If the subnet mask length in the mapping item is 32, that is, the mapping item of mobile terminal is matched, then
Whether the station location marker in the comparison mapping item consistent with the station location marker in the new information, and when inconsistent after
Continue and mate with station location marker mapping table in the identity, until matching the mapping item of subnet, that is, matched reflects
When the subnet mask length of firing table item is less than 32, then the station location marker in the mapping item of the subnet and the renewal
Whether the station location marker in message is consistent, if unanimously, deleting the mapping item of the mobile terminal for matching, if differing
Cause, then the mapping item of the mobile terminal is updated according to the station location marker in the new information.
Further, the inquiry is integrated module and is additionally operable to:According to the identity in the new information for receiving
In the identity with station location marker mapping table during most long matching inquiry station location marker, if in the mapping item for matching
Subnet mask length less than 32, that is, match the mapping item of subnet, then the position in the mapping item of the subnet
Put mark whether consistent with the station location marker in the new information, if inconsistent, according to the position in the new information
Identifying increases the mapping item of the mobile terminal in described part mark with station location marker mapping table.
These are only that the present invention's is preferable to carry out case, be not limited to the present invention, the present invention can also there are other
Various embodiments, in the case of without departing substantially from spirit of the invention and its essence, those of ordinary skill in the art can be according to this
Bright make various corresponding changes and deformation, but these corresponding change and deformation should all belong to appended claims of the invention
Protection domain.
Obviously, those skilled in the art should be understood that each module or each step of the above-mentioned present invention can be with general
Computing device realizing, they can be concentrated on single computing device, or are distributed in multiple computing devices and are constituted
Network on, alternatively, they can be realized with the executable program code of computing device, it is thus possible to they are stored
Executed by computing device in the storage device, and in some cases, can be executed with the order being different from herein shown
The step of going out or describe, or they are fabricated to each integrated circuit modules respectively, or by the multiple modules in them or
Step is fabricated to single integrated circuit module to realize.So, the present invention is not restricted to any specific hardware and software combination.