CN101695054A - Method and device for route maintenance and method and device for route query - Google Patents

Method and device for route maintenance and method and device for route query Download PDF

Info

Publication number
CN101695054A
CN101695054A CN200910235609A CN200910235609A CN101695054A CN 101695054 A CN101695054 A CN 101695054A CN 200910235609 A CN200910235609 A CN 200910235609A CN 200910235609 A CN200910235609 A CN 200910235609A CN 101695054 A CN101695054 A CN 101695054A
Authority
CN
China
Prior art keywords
route
hash
level
bit
address prefix
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN200910235609A
Other languages
Chinese (zh)
Other versions
CN101695054B (en
Inventor
宋小恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN2009102356096A priority Critical patent/CN101695054B/en
Publication of CN101695054A publication Critical patent/CN101695054A/en
Application granted granted Critical
Publication of CN101695054B publication Critical patent/CN101695054B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method and a device for route maintenance and a method and a device for route query. The method and the device for route maintenance and the method and the device for route query are characterized in that the public network and each VPN are respectively equipped with a corresponding virtual route (VR) table, if the mask length of the IP address prefix of each route table entry is smaller than or equal to M, then the route entry can be stored and queried in a route collection of M bit array elements matching with the most significant byte of the IP address prefix in the VR table; if the mask length of the IP address prefix of each route table entry is longer than M, then some stages of hash tables of the follow-up relative bytes corresponding to the IP address prefix can be queried step by step until the mask length of the IP address prefix is smaller than or equal to the sum of the relative byte corresponding to some follow-up stages of hash tables and the most significant M byte corresponding to the array elements, and then each route entry is stored and queried in the route collection of matching hash elements. The route query method and the device thereof can increase query efficiency and are adoptable to multicast routing.

Description

Route maintenance method and device and method for searching route and device
Technical field
The present invention relates to the message retransmission technique, particularly a kind of route maintenance method, a kind of route maintenance device, a kind of method for searching route and a kind of routing inquiring device.
Background technology
Usually all have routing table in the switching equipment such as all kinds of switches, router, deposited some route table items in the routing table, every route table items can both show that transmitting corresponding message from which port of switching equipment can be forwarded to next jumping with this message.Specifically, all comprise usually in every route table items: information such as destination address, IP mask, outbound port, next-hop ip address.
Switching equipment can be deposited earlier to carry out in the software layer routing table of soft forwarding and then be issued to be used to the hardware layer routing table that realizes that hardware layer is transmitted in the forwarding chip for CPU after learning certain route table items.When needs upgrade or delete certain bar route table items, need CPU from the software layer routing table, to inquire this route table items earlier and then is upgraded or delete the last hardware layer routing table that just can upgrade or delete in the forwarding chip.
Therefore, thus the search efficiency of software layer route table items will directly have influence on the progress that route table items is issued to hardware layer influences the progress that the message hardware layer is transmitted.And the search efficiency of software layer route table items depends on the storage mode of route table items usually.
Existing IP route storage mode is mostly based on tree-like, and (VirtualPrivate Network VPN) takies a tree respectively to public network, and utilizes IP address prefix (Prefix) as tree node with each VPN.It for maximum length 32 IP address prefix, the degree of depth of tree is 32 layers, utilize the IP address to travel through each layer successively when searching route table items so from the root node of tree, need search for 32 times at most and can find the pairing destination node of route table items to be found, thereby search efficiency is lower.
In order to improve search efficiency, prior art realizes inquiry to the public network route table items based on multistage Hash (Hash) table, yet, in the existing maintenance and inquiry mode based on multistage Hash table, when hash-collision takes place owing to the public network route table items that has a plurality of couplings in same Hash element index, need carry out the chained list traversal of multistage Hash table, thereby still have the not high problem of search efficiency.And, the inquiry mode of the multistage Hash table of prior art, high 20 bits in the corresponding IP address prefix of first order Hash table, and the highest byte that the highest 8 bits are constituted can not be 0, thus wasted 2 12, i.e. the shared computational resource of 4096 bits, go back the big storage resources in the committed memory.
In addition because multicast path is by not only comprising multicast address but also comprise source address, thereby the inquiry mode of existing multistage Hash table do not support yet multicast path by.
As seen, existing routing inquiry mode efficient based on multistage Hash table is high and versatility is not high yet.
Summary of the invention
In view of this, the invention provides a kind of route maintenance method, a kind of route maintenance device, a kind of method for searching route and a kind of routing inquiring device, can improve routing inquiry efficient.
A kind of route maintenance method provided by the invention is respectively public network and each VPN corresponding virtual route VR table is set, and includes 2 in every VR table MIndividual M bit array element, each array element that is used for IP address prefix highest byte coupling can derive down the 1st grade of Hash table and/or the 1st grade of route set, each Hash element of i level Hash table can derive down i+1 level Hash table and/or i+1 level route set, i more than or equal to 1 and smaller or equal to default maximum progression P, the P of Hash table for more than or equal to 1 and smaller or equal to the positive integer of 32-M, and for the public network of needs storage or the route table items of any VPN, this route maintenance method comprises:
Utilize the highest byte of the IP address prefix of this route table items in corresponding VR table, to search the array element of coupling;
When the mask-length of this route table items IP address prefix during, this route table items is deposited in the 1st grade of route set to the array element of coupling smaller or equal to M;
When the mask-length of this route table items IP address prefix during greater than M, the 1st grade of Hash table under the array element of coupling searched in the i level Hash table and IP address prefix the successively
Figure G2009102356096D0000031
The Ni bit Hash element of bits match is also judged this route table items IP address prefix at i level Hash table Whether the mask-length of bit is smaller or equal to Ni, if, this route table items deposited in the i+1 level route set under the Ni bit Hash element that mates to the i level Hash table, otherwise, continue to judge at the i+1 level Hash table under the Ni bit Hash element that mates in the i level Hash table;
Wherein, N0 gets 0, and Ni satisfies N1~NP sum to equal any positive integer of setting under this condition of 32-M.
When the mask-length of this route table items IP address prefix during, be that index finds the 1st grade of route set in internal memory with the array element content of coupling smaller or equal to M;
When the mask-length of this route table items IP address prefix during greater than M, be that index finds the 1st grade of Hash table in internal memory with the array element content of coupling, then at i level Hash table:
If route table items IP address prefix IP address prefix
Figure G2009102356096D0000033
The mask-length of bit is smaller or equal to Ni, is i+1 level route set under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling then;
If route table items IP address prefix
Figure G2009102356096D0000034
The mask-length of bit is greater than Ni, is i+1 level Hash table under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling then.
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling be empty, then further create the 1st grade of route set under this data element, this array element content the 1st grade of address of route set in internal memory being set to create also;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling is empty, then further create the 1st grade of Hash table under this data element, and this array element content the 1st grade of address of Hash table in internal memory being set to create, then at i level Hash table:
If route table items IP address prefix
Figure G2009102356096D0000035
The mask-length of bit is smaller or equal to Ni, the following i+1 level route set of the Ni bit Hash element of then further creating coupling, this Ni bit Hash element content address of i+1 level route set in internal memory of being set to create also;
If route table items IP address prefix The mask-length of bit be empty greater than the Ni bit Hash element content of Ni and coupling, then further creates i+1 level Hash table under the Ni bit Hash element of coupling, this Ni bit Hash element content address of i+1 level Hash table in internal memory of being set to create also.
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling has recorded the 1st grade of address of Hash table in internal memory this data element under, then further create the 1st grade of route set under this data element and the 1st grade of route set under interior this data element of route set pointed at the same level of the 1st grade of Hash table under this array element is set;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling has recorded the 1st grade of address of route set in internal memory under this data element, then further create the 1st grade of Hash table under this data element and the 1st grade of route set under this data element of route set pointed at the same level in the 1st grade of Hash table under this array element is set, then at i level Hash table:
If route table items IP address prefix
Figure G2009102356096D0000042
The mask-length of bit be the address of i+1 level Hash table in internal memory this Ni bit Hash element under smaller or equal to the Ni bit Hash element content of Ni and coupling, then further creates the i+1 level route set under the Ni bit Hash element that mates and i+1 level route set under interior this Ni bit Hash element of route set pointed at the same level of i+1 level Hash table under this Ni bit Hash element is set;
If route table items IP address prefix
Figure G2009102356096D0000043
The mask-length of bit be the address of i+1 level route set in internal memory this Ni bit Hash element under greater than the Ni bit Hash element content of Ni and coupling, then further the i+1 level Hash table under the Ni bit Hash element that mates of establishment, i+1 level Hash table that this Ni bit Hash element content is set to create in internal memory the address and i+1 level route set under this Ni bit Hash element of route set pointed at the same level in the i+1 level Hash table under this Ni bit Hash element is set.
Route set pointer at the same level in each Hash table in every grade is arranged on the 1st field of this Hash table.
Further be provided with the maximum mask-length and the minimum mask-length of all route table items IP address prefix corresponding bit of depositing in this route set of expression in each route set in every grade.
Public network and each VPN are provided with the VR table of two correspondences, and VR table is used to deposit the multicast routing table item, the 2nd VR table is used to deposit the singlecast router list item;
And, further has route pointer in the route set of the one VR table, described route pointer is pointed in pairing the 2nd VR table of multicast routing table item of its affiliated route set upper level array element of coupling or Hash element, with the array element of corresponding singlecast router list item IP address prefix first byte coupling.
Utilize VR-ID to distinguish public network and different VPN and distinguish corresponding VR table, and the continuous VR-ID of the continuous VPN corresponding value of order.
Preferably, described M gets 8.
A kind of route maintenance device provided by the invention, this device comprises CPU and internal memory,
Store the corresponding virtual route VR table that is respectively public network and each VPN setting in the described internal memory, include 2 in every VR table MIndividual M bit array element, each array element that is used for IP address prefix highest byte coupling can derive down the 1st grade of Hash table and/or the 1st grade of route set, each Hash element of i level Hash table can derive down i+1 level Hash table and/or i+1 level route set, i more than or equal to 1 and smaller or equal to default maximum progression P, the P of Hash table for more than or equal to 1 and smaller or equal to the positive integer of 32-M;
For the public network of needs storage or the route table items of any VPN, described CPU utilizes the highest byte of the IP address prefix of this route table items to search the array element of coupling in corresponding VR table;
When the mask-length of this route table items IP address prefix during smaller or equal to M, described CPU deposits this route table items to the 1st grade route set of array element in described internal memory of coupling;
When the mask-length of this route table items IP address prefix during greater than M, described CPU begins from the 1st grade of Hash table of array element described internal memory of coupling, searches successively in the i level Hash table and IP address prefix the
Figure G2009102356096D0000061
The Ni bit Hash element of bits match is also judged this route table items IP address prefix at i level Hash table
Figure G2009102356096D0000062
Whether the mask-length of bit is smaller or equal to Ni, if, this route table items deposited in the i+1 level route set under the Ni bit Hash element that mates to the i level Hash table, otherwise, continue to judge at the i+1 level Hash table under the Ni bit Hash element that mates in the i level Hash table;
Wherein, N0 gets 0, and Ni satisfies N1~NP sum to equal any positive integer of setting under this condition of 32-M.
When the mask-length of this route table items IP address prefix during smaller or equal to M, described CPU is that index finds the 1st grade of route set in internal memory with the array element content of coupling further;
When the mask-length of this route table items IP address prefix during greater than M, be that index finds the 1st grade of Hash table in internal memory with the array element content of coupling, carry out described judgement at i level Hash table successively then, and at i level Hash table:
If route table items IP address prefix IP address prefix
Figure G2009102356096D0000063
The mask-length of bit is smaller or equal to Ni, and then described CPU is an i+1 level route set under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling further;
If route table items IP address prefix
Figure G2009102356096D0000064
The mask-length of bit is greater than Ni, and then described CPU is an i+1 level Hash table under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling further.
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling be empty, then described CPU further creates the 1st grade of route set under this data element, this array element content the 1st grade of address of route set in internal memory being set to create also in described internal memory;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling is empty, then further create the 1st grade of Hash table under this data element, and this array element content the 1st grade of address of Hash table in internal memory being set to create, then at i level Hash table:
If route table items IP address prefix The mask-length of bit be empty smaller or equal to the Ni bit Hash element content of Ni and coupling, and then described CPU further creates i+1 level route set under the Ni bit Hash element of coupling, this Ni bit Hash element content address of i+1 level route set in internal memory of being set to create also in described internal memory;
If route table items IP address prefix
Figure G2009102356096D0000072
The mask-length of bit be empty greater than the Ni bit Hash element content of Ni and coupling, and then described CPU further creates i+1 level Hash table under the Ni bit Hash element of coupling, this Ni bit Hash element content address of i+1 level Hash table in internal memory of being set to create also in described internal memory.
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling has recorded the 1st grade of address of Hash table in internal memory this data element under, then described CPU is the 1st grade of route set under this data element of establishment and the 1st grade of route set under this data element of route set pointed at the same level in the 1st grade of Hash table under this array element is set in described internal memory further;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling has recorded the 1st grade of address of route set in internal memory under this data element, then further create the 1st grade of Hash table under this data element and the 1st grade of route set under this data element of route set pointed at the same level in the 1st grade of Hash table under this array element is set, then at i level Hash table:
If route table items IP address prefix
Figure G2009102356096D0000073
The mask-length of bit be the address of i+1 level Hash table in internal memory this Ni bit Hash element under smaller or equal to the Ni bit Hash element content of Ni and coupling, and the i+1 level route set under the then described CPU Ni bit Hash element that further establishment is mated in described internal memory also is provided with i+1 level route set under this Ni bit Hash element of route set pointed at the same level in the i+1 level Hash table under this Ni bit Hash element;
If route table items IP address prefix The mask-length of bit be the address of i+1 level route set in internal memory this Ni bit Hash element under greater than the Ni bit Hash element content of Ni and coupling, the i+1 level Hash table under the then described CPU Ni bit Hash element that further establishment is mated in described internal memory, the i+1 level Hash table that this Ni bit Hash element content is set to create in internal memory the address and i+1 level route set under this Ni bit Hash element of route set pointed at the same level in the i+1 level Hash table under this Ni bit Hash element is set.
Public network and each VPN are provided with the VR table of two correspondences, and VR table is used to deposit the multicast routing table item, the 2nd VR table is used to deposit the singlecast router list item;
And, further has route pointer in the route set of the one VR table, described route pointer is pointed in pairing the 2nd VR table of multicast routing table item of its affiliated route set upper level array element of coupling or Hash element, with the array element of corresponding singlecast router list item IP address prefix first byte coupling.
Public network and different VPN are distinguished corresponding VR table with the VR-ID differentiation, and the continuous VR-ID of the continuous VPN corresponding value of order.
Preferably, described M gets 8.
A kind of method for searching route provided by the invention is respectively public network and each VPN corresponding virtual route VR table is set, and includes 2 in every VR table MIndividual M bit array element, each array element that is used for IP address prefix highest byte coupling can derive down the 1st grade of Hash table and/or the 1st grade of route set, each Hash element of i level Hash table can derive down i+1 level Hash table and/or i+1 level route set, i more than or equal to 1 and smaller or equal to default maximum progression P, the P of Hash table for more than or equal to 1 and smaller or equal to the positive integer of 32-M, and for the public network of needs inquiry or the route table items of any VPN, this method for searching route comprises:
Utilize the highest byte of the IP address prefix of this route table items in corresponding VR table, to search the array element of coupling;
When the mask-length of this route table items IP address prefix during, search this route table items in the 1st grade of route set under the array element of coupling smaller or equal to M;
When the mask-length of this route table items IP address prefix during greater than M, the 1st grade of Hash table under the array element of coupling searched in the i level Hash table and IP address prefix the successively The Ni bit Hash element of bits match is also judged this route table items IP address prefix at i level Hash table Whether the mask-length of bit is smaller or equal to Ni, if, search this route table items in the i+1 level route set under the Ni bit Hash element that in i level Hash table, mates, otherwise, continue to judge at the i+1 level Hash table under the Ni bit Hash element that mates in the i level Hash table;
Wherein, N0 gets 0, and Ni satisfies N1~NP sum to equal any positive integer of setting under this condition of 32-M.
When the mask-length of this route table items IP address prefix during, be that index finds the 1st grade of route set in internal memory with the array element content of coupling smaller or equal to M;
When the mask-length of this route table items IP address prefix during greater than M, be that index finds the 1st grade of Hash table in internal memory with the array element content of coupling, then at i level Hash table:
If route table items IP address prefix IP address prefix The mask-length of bit is smaller or equal to Ni, is i+1 level route set under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling then;
If route table items IP address prefix
Figure G2009102356096D0000094
The mask-length of bit is greater than Ni, is i+1 level Hash table under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling then.
When the mask-length of this route table items IP address prefix during,, then finish current inquiry if the array element content of coupling be a sky smaller or equal to M;
When the mask-length of this route table items IP address prefix during,, then finish current inquiry if the array element content of coupling be a sky greater than M.
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling has recorded the 1st grade of address of Hash table in internal memory under this data element, then further inquire about the route set pointer at the same level in the 1st grade of Hash table under this array element, if the 1st grade of route set under should peer's this data element of route set pointed, table of query and routing item in the 1st grade of route set then, otherwise finish current inquiry;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling has recorded the 1st grade of address of route set in internal memory this data element under, the then further current inquiry of end;
When the mask-length of this route table items IP address prefix during greater than M, and the array element content of coupling is the 1st grade of Hash table, then at i level Hash table:
If route table items IP address prefix
Figure G2009102356096D0000101
The mask-length of bit is the address of i+1 level Hash table in internal memory under this Ni bit Hash element smaller or equal to the Ni bit Hash element content of Ni and coupling, the further route set pointer at the same level in the i+1 level Hash table under this Ni bit Hash element then, if the i+1 level route set under should this Ni bit Hash element of peer's route set pointed, table of query and routing item in this i+1 level route set then, otherwise finish current inquiry;
If route table items IP address prefix The mask-length of bit is the address of i+1 level route set in internal memory under this Ni bit Hash element greater than the Ni bit Hash element content of Ni and coupling, then finishes current inquiry.
Inquire about route set pointer at the same level by the 1st field that directly reads Hash table.
Further be provided with the maximum mask-length and the minimum mask-length of all route table items IP address prefix corresponding bit of depositing in this route set of expression in each route set in every grade;
If the mask-length of route table items IP address prefix corresponding bit to be checked greater than the maximum mask-length that route set write down that finds or less than the minimum mask-length that route set write down that finds, then directly finishes current inquiry.
Public network and each VPN are provided with the VR table of two correspondences, and VR table is used to deposit the multicast routing table item, the 2nd VR table is used to deposit the singlecast router list item;
Each bit with the IP address prefix of multicast routing table item to be found in VR table is an index, find the route set of corresponding level, and in this route set, find multicast routing table item to be found, find in corresponding the 2nd VR table according to the route set pointer in this route set then, array element with the first byte coupling of the IP address prefix of clean culture list item to be found, and follow-up each bit with the IP address prefix of singlecast router list item to be found is an index in the 2nd VR table, finds the route set of corresponding level step by step, and in this route set, find singlecast router list item to be found.
Utilize VR-ID to distinguish public network and different VPN and distinguish corresponding VR table, and the continuous VR-ID of the continuous VPN corresponding value of order.
Preferably, described M gets 8.
A kind of routing inquiring device provided by the invention, this device comprises CPU and internal memory,
Store the corresponding virtual route VR table that is respectively public network and each VPN setting in the described internal memory, include 2 in every VR table MIndividual be used for the i+1 level Hash table that derives under the Hash element arbitrarily with the M bit array element of IP address prefix highest byte coupling and the 1st grade of Hash table that derives under the array element arbitrarily and/or the 1st grade of route set, i level Hash table and/or i+1 level route set, i more than or equal to 1 and smaller or equal to default maximum progression P, the P of Hash table for more than or equal to 1 and smaller or equal to the positive integer of 32-M;
For the public network of needs inquiry or the route table items of any VPN, described CPU utilizes the highest byte of the IP address prefix of this route table items to search the array element of coupling in corresponding VR table;
When the mask-length of this route table items IP address prefix during smaller or equal to M, described CPU searches this route table items in the 1st grade of route set of the array element of coupling;
When the mask-length of this route table items IP address prefix during greater than M, the 1st grade Hash table of described CPU under the array element of coupling searched in the i level Hash table and IP address prefix the successively
Figure G2009102356096D0000111
The Ni bit Hash element of bits match is also judged this route table items IP address prefix at i level Hash table Whether the mask-length of bit is smaller or equal to Ni, if, search this route table items in the i+1 level route set under the Ni bit Hash element that described CPU mates in i level Hash table, otherwise described CPU continues to judge at the i+1 level Hash table under the Ni bit Hash element that mates in the i level Hash table;
Wherein, N0 get 0 and Ni satisfy N1~NP sum to equal under this condition of 32-M the positive integer set arbitrarily.
When the mask-length of this route table items IP address prefix during smaller or equal to M, described CPU is that index finds the 1st grade of route set in internal memory with the array element content of coupling;
When the mask-length of this route table items IP address prefix during greater than M, described CPU is that index finds the 1st grade of Hash table in internal memory with the array element content of coupling, then at i level Hash table:
If route table items IP address prefix IP address prefix
Figure G2009102356096D0000121
The mask-length of bit is smaller or equal to Ni, and then described CPU is an i+1 level route set under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling in described internal memory;
If route table items IP address prefix
Figure G2009102356096D0000122
The mask-length of bit is greater than Ni, and then described CPU is an i+1 level Hash table under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling in described internal memory.
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling be a sky, then described CPU finishes current inquiry;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling be a sky, then described CPU finishes current inquiry.
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling has recorded the 1st grade of address of Hash table in internal memory under this data element, then described CPU further inquires about the interior route set pointer at the same level of the 1st grade of Hash table under this array element, if the 1st grade of route set under should peer's this data element of route set pointed, then described CPU is the table of query and routing item in the 1st grade of route set, otherwise finishes current inquiry;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling has recorded the 1st grade of address of route set in internal memory this data element under, the further current inquiry of end of then described CPU;
When the mask-length of this route table items IP address prefix during greater than M, and the array element content of coupling is the 1st grade of Hash table, then at i level Hash table:
If route table items IP address prefix
Figure G2009102356096D0000131
The mask-length of bit is the address of i+1 level Hash table in internal memory under this Ni bit Hash element smaller or equal to the Ni bit Hash element content of Ni and coupling, then described CPU is the route set pointer at the same level in the i+1 level Hash table under this Ni bit Hash element further, if the i+1 level route set under should this Ni bit Hash element of peer's route set pointed, then described CPU is the table of query and routing item in this i+1 level route set, otherwise finishes current inquiry;
If route table items IP address prefix
Figure G2009102356096D0000132
The mask-length of bit is the address of i+1 level route set in internal memory under this Ni bit Hash element greater than the Ni bit Hash element content of Ni and coupling, and then described CPU finishes current inquiry.
Public network and each VPN are provided with the VR table of two correspondences, and VR table is used to deposit the multicast routing table item, the 2nd VR table is used to deposit the singlecast router list item;
Described CPU each bit with the IP address prefix of multicast routing table item to be found in VR table is an index, find the route set of corresponding level, and in this route set, find multicast routing table item to be found, find in corresponding the 2nd VR table according to the route set pointer in this route set then, array element with the first byte coupling of the IP address prefix of clean culture list item to be found, and follow-up each bit with the IP address prefix of singlecast router list item to be found is an index in the 2nd VR table, finds the route set of corresponding level step by step, and in this route set, find singlecast router list item to be found.
Described CPU utilizes VR-ID to distinguish public network and different VPN is distinguished corresponding VR table, and the continuous VR-ID of the continuous VPN corresponding value of order.
Preferably, described M gets 8.
As seen from the above technical solution, the present invention is respectively public network and each VPN is provided with corresponding virtual route VR table, includes 2 in every VR table MThe individual M bit array element that is used for IP address prefix highest byte coupling, if the mask-length of route table items IP address prefix is smaller or equal to M, then can distinguish this route table items with the highest byte of this IP address prefix, thus can be directly with the M bit array element of IP address prefix highest byte coupling under derive set of routes and incompatiblely deposit this route table items, and can directly in this route set, find this route table items; If the mask-length of route table items IP address prefix is greater than M, then the highest byte with this IP address prefix is not enough to distinguish this route table items, thereby need derive some grades of Hash tables of the follow-up corresponding bits of corresponding IP address prefix, until the mask-length of this IP address prefix the highest M bit and the pairing corresponding bits sum of follow-up some grades of Hash tables smaller or equal to the array element correspondence, then in the afterbody Hash table that derives with the IP address prefix under should the Hash element that mates of corresponding bits of level Hash table, derive incompatible this route table items of depositing of set of routes, and can find this route set according to same way as, in this route set, find this route table items.Like this, the maximum inquiry times among the present invention obviously are less than maximum 32 inquiries of tree structure in the prior art, and therefore, the present invention can improve routing inquiry efficient.
Further, at IP address prefix value is identical but the route conflict that mask-length is different, the present invention can set up route set, set up Hash table at the same level at the long code mask route table items at short mask route table items under the same element of coupling, utilize the route set of Hash table cascade at the same level peer again, thereby solved the problem of hash-collision.
Again further, the present invention can write down the maximum mask-length and the minimum mask-length of the route table items of depositing in each route set, thereby route table items to be checked greater than the record maximum mask-length or less than the record minimum mask-length the time, need not in route set, to inquire about and to know the route table items that does not have coupling, thereby further improve routing inquiry efficient.
In addition, the present invention can show with the VR that each VPN is provided with two correspondences respectively for public network, route table items that is used to deposit the expression multicast group address, another is used to deposit the route table items of expression multicast source address, thereby also can be applicable to multicast path by, further improve the versatility of routing inquiry.
Description of drawings
Fig. 1 is the structural representation of virtual routing table in the embodiment of the invention;
Fig. 2 is the structural representation of Hash table in the embodiment of the invention;
Fig. 3 is the structural representation of route set in the embodiment of the invention;
Fig. 4 be in the embodiment of the invention at multicast path by a kind of structural representation of virtual routing table;
Fig. 5 a~Fig. 5 e is the route table items storing process schematic diagram of example one in the embodiment of the invention;
Fig. 6 is the route table items storing process schematic diagram of example two in the embodiment of the invention;
Fig. 7 a~Fig. 7 b is the route table items delete procedure schematic diagram of example three in the embodiment of the invention.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is described in more detail.
The embodiment of the invention adopt the virtual route of one-level (Virtual Rout, VR) table and some grades of Hash tables are realized the maintenance and the inquiry of route table items, specifically referring to Fig. 1:
Be respectively public network and show, include 2 in every VR table with the VR that each VPN is provided with a correspondence MThe individual M bit array element that is used for IP address prefix highest byte coupling, M are less than 32 positive integer more than or equal to 1; Wherein, public network and different VPN corresponding respectively VR table can utilize VR-ID to be distinguished; Preferably, make the continuous VR-ID of the continuous VPN corresponding value of order, like this, when carrying out the VPN route of any VPN, can be offset according to the value that VPN puts in order to VR-ID, can directly obtain corresponding VR-ID, and the VR that once finds correspondence show;
Under each array element during every VR shows, can derive the 1st grade of Hash table and/or derive the 1st grade of route set (RoutSet) that can deposit M route table items at most, the content of this array element is the 1st grade of Hash table or the 1st grade of address of RoutSet in internal memory that derives just so, so that this array element can be as the 1st grade of Hash table that derives or the index of the 1st grade of RoutSet; Need to prove that value is the M bit array element of 0x00 in every VR table, if there is not special setting, it is merely able to Match IP Address prefix 0.0.0.0 usually, thereby this array element only can derive the 1st grade of RoutSet down usually;
In every Hash table of i level, include 2 NiIndividual being used for and IP address prefix
Figure G2009102356096D0000161
The Ni bit Hash element of bits match, i more than or equal to 1 and smaller or equal to default maximum progression P, the P of Hash table for more than or equal to 1 and get 0 smaller or equal to positive integer, the N0 of 32-M, and Ni satisfies N1~NP sum to equal the positive integer set arbitrarily under this condition of 32-M; And, when i gets 1~P-1, each Hash element in the i level Hash table can derive i+1 level Hash table and/or derive the RoutSet that the i+1 level is deposited Ni route table items at most down, and when i gets P, the i level, promptly derive only under each the Hash element in the P level Hash table i+1 level, also promptly the P+1 level can be deposited the RoutSet of 1 route table items.
Like this, when the storage route table items, if the mask-length of route table items IP address prefix is smaller or equal to M, then can distinguish this route table items with the highest byte of this IP address prefix, thus can be directly with the M bit array element of IP address prefix highest byte coupling under derive RoutSet and deposit this route table items; If the mask-length of route table items IP address prefix is greater than M, then the highest byte with this IP address prefix is not enough to distinguish this route table items, thereby need derive some grades of Hash tables of the follow-up corresponding bits of corresponding IP address prefix, until the mask-length of this IP address prefix the highest M bit and the pairing corresponding bits sum of follow-up some grades of Hash tables smaller or equal to the array element correspondence, promptly highest byte and the pairing byte sum of follow-up some Hash tables with this IP address prefix is enough to distinguish this route table items, then in the afterbody Hash table that derives with the IP address prefix under should the Hash element that mates of corresponding bits of level Hash table, derive RoutSet and deposit this route table items.
That is to say,,, still comprise fixing 2 in this VR table even if wherein there is not route table items for every VR table MIndividual M bit array element; And along with the depositing in of different route table items, the coupling array element down can corresponding RoutSet or Hash table and the RoutSet of deriving.
In like manner, when searching route table items, if the mask-length of route table items IP address prefix is smaller or equal to M, then can distinguish this route table items with the highest byte of this IP address prefix, thus can be directly with the M bit array element of IP address prefix highest byte coupling under find this route table items among the RoutSet that derives; If the mask-length of route table items IP address prefix is greater than M, then the highest byte with this IP address prefix is not enough to distinguish this route table items, thereby need search some grades of Hash tables of the follow-up corresponding bits of corresponding IP address prefix that derives step by step, until the mask-length of this IP address prefix the highest M bit and the pairing corresponding bits sum of follow-up some grades of Hash tables smaller or equal to the array element correspondence, promptly highest byte and the pairing byte sum of follow-up some Hash tables with this IP address prefix is enough to distinguish this route table items, among the RoutSet under the Hash element that in the end with the IP address prefix corresponding bits that should the level Hash table is mated in the one-level Hash table, can find this route table items then.
Below, three kinds of processing procedures in conjunction with storing, search, deleting are elaborated to route maintenance in the embodiment of the invention and lookup method.
1), there is the route table items of public network or any VPN to need storage
1.1) at first utilize the highest byte of the IP address prefix of this route table items in corresponding VR table, to search the array element of coupling, promptly the highest byte with the IP address prefix of this route table items is coupling searched in index in corresponding VR table a array element.
After this, have two kinds of situations, a kind of is that the mask-length of route table items IP address prefix then is that the mask-length of route table items IP address prefix is greater than M smaller or equal to M, another kind.
1.2a), when the mask-length of this route table items IP address prefix during smaller or equal to M, can directly this route table items be deposited among the 1st grade of RoutSet to the array element of coupling.Specifically, the array element content of coupling has recorded the 1st grade of address of RoutSet in internal memory of this data element, promptly existing this array element of coupling and the total mask-length of IP address prefix are smaller or equal to other route table items storage of M, and then the array element content with coupling is that index finds the 1st grade of RoutSet in internal memory.
In addition, in the practical application, also may there be following two kinds of special circumstances:
The array element content of a1, coupling is empty (NULL), the route table items storage of this array element of coupling is not promptly also arranged, then in internal memory, create the 1st grade of RoutSet under this data element, and this array element content the 1st grade of address of RoutSet in internal memory being set to create;
A2, a kind of special circumstances that relate to conflict, because before existing IP address prefix value is identical with current route table items to be stored, but mask-length is greater than other route table items storage of M, established the 1st grade of Hash table under the array element of coupling, thereby produced hash-collision, so at this moment, the array element content of coupling has recorded the 1st grade of address of Hash table in internal memory under this data element, promptly ought to set up under the array element of the 1st grade of RoutSet and establish the 1st grade of Hash table for current route table items to be stored, then still in internal memory, create the 1st grade of RoutSet under this data element but existing the 1st grade of Hash table in the reserved memory, and the 1st grade of RoutSet under this data element of RoutSet pointed at the same level default in the 1st grade of Hash table under this array element be set, promptly by the array element cascade of the RoutSet pointer at the same level in the 1st grade of Hash table with coupling in the 1st grade of RoutSet and the VR table, thereby for same M bit array element, its subordinate can comprise the 1st grade of Hash table at long code mask simultaneously, and at the 1st grade of RoutSet that lacks mask, referring to the 1st grade of Hash table and the 1st grade of RoutSet among the VR-ID Q among Fig. 1;
Then, among a1, the a2 any one, after setting up the 1st grade of RoutSet, again this route table items is deposited among the 1st grade of RoutSet to the array element of coupling.
1.2b) when the mask-length of this route table items IP address prefix during greater than M, because the conference of the mask-length of IP address prefix reaches 32, thereby the Hash table progression maximum that derives under the coupling array element can reach the P level, but mask-length value regardless of the IP address prefix, all can be from the 1st grade of Hash table under the array element of coupling, search successively in the i level Hash table and IP address prefix the
Figure G2009102356096D0000181
The Ni bit Hash element of bits match is also judged this route table items IP address prefix at i level Hash table Whether the mask-length of bit is smaller or equal to Ni; If this route table items is deposited to the i level Hash table and IP address prefix
Figure G2009102356096D0000183
Among the i+1 level RoutSet under the Ni bit Hash element of bits match, otherwise, continue in the i level Hash table with IP address prefix the
Figure G2009102356096D0000184
I+1 level Hash table under the Ni bit Hash element of bits match is judged, until this route table items IP address prefix
Figure G2009102356096D0000185
The mask-length of bit smaller or equal to N (i+1) till.
Specifically, be index finds the 1st grade of Hash table in internal memory after in array element content, if route table items IP address prefix the with coupling
Figure G2009102356096D0000186
The mask-length of bit has recorded the address of i+1 level RoutSet in internal memory smaller or equal to the Ni bit Hash element content of Ni and coupling, promptly existing IP address prefix the
Figure G2009102356096D0000191
This Hash element of bits match and the total mask-length of IP address prefix are positioned at
Figure G2009102356096D0000192
Between the storage of other route table items, be i+1 level RoutSet under the Ni bit Hash element of index search coupling then with the Ni bit Hash element content of coupling;
If route table items IP address prefix
Figure G2009102356096D0000193
The mask-length of bit has recorded the address of i+1 level Hash table in internal memory greater than the Ni bit Hash element content of pairing Ni of i level Hash table and coupling, promptly existing IP address prefix the
Figure G2009102356096D0000194
This Hash element of bits match and the total mask-length of IP address prefix greater than
Figure G2009102356096D0000195
Route table items storage, be i+1 level Hash table under the Ni bit Hash element of index search coupling then with the Ni bit Hash element content of coupling;
In addition, in the practical application, also specifically there are following several special circumstances at array element:
The array element content of b1, coupling is empty, then further creates the 1st grade of Hash table this data element under, this array element content the 1st grade of address of Hash table in internal memory being set to create also, carries out respective handling at i level Hash table then;
B2, for a kind of special circumstances that have hash-collision, because before existing IP address prefix value is identical with current route table items to be stored, and total mask-length is smaller or equal to other route table items storage of M, thereby established the 1st grade of RoutSet under the Hash element of coupling, thereby produced hash-collision, so at this moment, the array element content of coupling has recorded the 1st grade of address of RoutSet in internal memory under this data element, then further in internal memory, create the 1st grade of Hash table under this data element, and the 1st grade of RoutSet under this data element of RoutSet pointed at the same level in the 1st grade of Hash table under this array element be set, and then the 1st grade of Hash table from creating, carry out respective handling at i level Hash table.
Correspondingly, also there are relevant several special circumstances at i level Hash table:
C1, route table items IP address prefix
Figure G2009102356096D0000201
The mask-length of bit be a sky smaller or equal to the Ni bit Hash element content of Ni and coupling, and IP address prefix the is not promptly also arranged
Figure G2009102356096D0000202
This Hash element of bits match and the total mask-length of IP address prefix greater than
Figure G2009102356096D0000203
The storage of other route table items, then in internal memory, create i+1 level RoutSet under the Ni bit Hash element of coupling, and this Ni bit Hash element content address of i+1 level RoutSet in internal memory of being set to create;
C2, for a kind of special circumstances that have hash-collision that are similar to a2 since before existing IP address prefix value identical with current route table items to be stored and always mask-length greater than
Figure G2009102356096D0000204
The storage of other route table items, thereby established i+1 level Hash table under the Hash element of coupling, thereby produced hash-collision, this moment so, route table items IP address prefix the
Figure G2009102356096D0000205
The mask-length of bit is smaller or equal to Ni, and the Ni bit Hash element content of coupling is the address of i+1 level Hash table in internal memory under this Ni bit Hash element, promptly ought to set up under the Hash element of i+1 level RoutSet and establish i+1 level Hash table for current route table items to be stored, then in internal memory, create the i+1 level RoutSet under the Ni bit Hash element of coupling but keep i+1 level Hash table, and i+1 level RoutSet under this Ni bit Hash element of RoutSet pointed at the same level default in the i+1 level Hash table under this Ni bit Hash element is set, promptly by the RoutSet pointer at the same level in the i+1 level Hash table with the Hash element cascade of mating in i+1 level RoutSet and the i level Hash table, thereby for same Ni bit Hash element, its subordinate can comprise the i+1 level Hash table at long code mask simultaneously, and at the i+1 level RoutSet that lacks mask, referring to i level Hash table among the VR-ID among Fig. 11 and i level RoutSet, i level Hash table among the VR-ID Q and i level RoutSet;
For in c1, the c2 both of these case any one, after setting up i+1 level RoutSet, this route table items can be deposited to the i level Hash table and IP address prefix the Among the i+1 level RoutSet under the Ni bit Hash element of bits match.
C3, route table items IP address prefix
Figure G2009102356096D0000211
The mask-length of bit be a sky greater than the Ni bit Hash element content of pairing Ni of i level Hash table and coupling, and IP address prefix the is not promptly also arranged
Figure G2009102356096D0000212
This Hash element of bits match and the total mask-length of IP address prefix greater than Route table items storage, then in internal memory, create i+1 level Hash table under the Ni bit Hash element of coupling, and this Ni bit Hash element content address of i+1 level Hash table in internal memory of being set to create;
C4, have the special circumstances of hash-collision for the another kind that is similar to b2 and since before existing IP address prefix value and IP address prefix total mask-length identical with current route table items to be stored be positioned at
Figure G2009102356096D0000214
Between the storage of other route table items, thereby established i+1 level RoutSet under the Hash element of coupling, thereby produced hash-collision, this moment so, route table items IP address prefix the
Figure G2009102356096D0000215
The mask-length of bit is greater than the pairing Ni of i level Hash table, and the Ni bit Hash element content of coupling is the address of i+1 level RoutSet in internal memory under this Ni bit Hash element, then in internal memory, create the i+1 level Hash table under the Ni bit Hash element that mates and keep i+1 level RoutSet, this Ni bit Hash element content is changed the address of i+1 level Hash table in internal memory that is set to create again, and i+1 level RoutSet under this Ni bit Hash element of RoutSet pointed default at the same level in the i+1 level Hash table under this Ni bit Hash element is set, promptly by the RoutSet pointer at the same level in the i+1 level Hash table with the Hash element cascade of mating in i+1 level RoutSet and the i level Hash table, thereby for same Ni bit Hash element, its subordinate can comprise the i+1 level Hash table at long code mask simultaneously, and at the i+1 level RoutSet that lacks mask, referring to i level Hash table among the VR-ID among Fig. 11 and i level RoutSet, i level Hash table among the VR-ID Q and i level RoutSet;
For in c3, the c4 both of these case any one, after setting up i+1 level Hash table, continue in the i level Hash table with IP address prefix the I+1 level Hash table under the Ni bit Hash element of bits match judges, until the mask-length of this IP address prefix smaller or equal to the highest M bit and the pairing corresponding bits sum of follow-up some grades of Hash tables of array element correspondence, promptly highest byte and the pairing byte sum of follow-up some Hash tables with this IP address prefix is enough to distinguish this route table items.
2), there is the route table items of public network or any VPN to need inquiry
2.1) at first utilize the highest byte of the IP address prefix of route table items to be checked in corresponding VR table, to search the array element of coupling, promptly the highest byte with the IP address prefix of route table items to be checked is coupling searched in index in corresponding VR table a array element.
After this, have two kinds of situations, a kind of is that the mask-length of route table items IP address prefix to be checked then is that the mask-length of route table items IP address prefix to be checked is greater than M smaller or equal to M, another kind.
2.2a), when the mask-length of route table items IP address prefix to be checked during smaller or equal to M, can directly carry out longest prefix match (LongestPrefix Match among the 1st grade of RoutSet under the array element of coupling, LPM), can find route table items to be checked.Specifically, the array element content of coupling has recorded the 1st grade of address of RoutSet in internal memory of this data element, promptly existing this array element of coupling and the total mask-length of IP address prefix are smaller or equal to other route table items storage of M, and then the array element content with coupling is that index finds the 1st grade of RoutSet in internal memory.
In addition, in the practical application, also may there be following two kinds of special circumstances:
The array element content of d1, coupling is empty, and the route table items storage of this array element of coupling is not promptly also arranged, and then directly determines not have route table items to be checked, and finishes current querying flow;
D2, a kind of special circumstances that relate to conflict, promptly, array element content with coupling is that index finds the 1st grade of Hash table in internal memory, rather than the 1st grade of RoutSet, this situation might be because this array element subordinate of coupling comprises the 1st grade of Hash table at long code mask simultaneously, and at the 1st grade of RoutSet that lacks mask, referring to the 1st grade of Hash table and the 1st grade of RoutSet among the VR-ID Q among Fig. 1, and have of the array element cascade of default RoutSet pointer at the same level in the 1st grade of Hash table with coupling in the 1st grade of RoutSet and the VR table, so at this situation, in the array element content with coupling is index finds the 1st grade of Hash table in internal memory after, read the RoutSet pointer at the same level in the 1st grade of Hash table, if the 1st grade of RoutSet of the RoutSet pointed at the same level that reads, then can find the 1st grade of RoutSet according to the RoutSet pointer at the same level that reads, if the RoutSet pointer at the same level that reads is for empty, then there be not the 1st grade of RoutSet under this array element in expression, thereby directly determine not have route table items to be checked, and finish current querying flow.
2.2b) when the mask-length of this route table items IP address prefix during greater than M, because the conference of the mask-length of IP address prefix reaches 32, thereby the Hash table progression maximum that derives under the coupling array element can reach the P level, but mask-length value regardless of the IP address prefix, all can be from the 1st grade of Hash table under the array element of coupling, search successively in the i level Hash table and IP address prefix the The Ni bit Hash element of bits match is also judged this route table items IP address prefix at i level Hash table
Figure G2009102356096D0000232
Whether the mask-length of bit is smaller or equal to Ni; If, then in i level Hash table with IP address prefix
Figure G2009102356096D0000233
Carry out LPM among the i+1 level RoutSet under the Ni bit Hash element of bits match, otherwise, continue in the i level Hash table with IP address prefix the
Figure G2009102356096D0000234
I+1 level Hash table under the Ni bit Hash element of bits match is judged, until this route table items IP address prefix
Figure G2009102356096D0000235
The mask-length of bit smaller or equal to N (i+1) till.
Specifically, be index finds the 1st grade of Hash table in internal memory after in array element content, if route table items IP address prefix the with coupling
Figure G2009102356096D0000236
The mask-length of bit has recorded the address of i+1 level RoutSet in internal memory smaller or equal to the Ni bit Hash element content of Ni and coupling, promptly existing IP address prefix the
Figure G2009102356096D0000237
This Hash element of bits match and the total mask-length of IP address prefix are positioned at
Figure G2009102356096D0000238
Between the storage of other route table items, be i+1 level RoutSet under the Ni bit Hash element of index search coupling then with the Ni bit Hash element content of coupling;
If route table items IP address prefix
Figure G2009102356096D0000241
The mask-length of bit has recorded the address of i+1 level Hash table in internal memory greater than the Ni bit Hash element content of pairing Ni of i level Hash table and coupling, promptly existing IP address prefix the
Figure G2009102356096D0000242
This Hash element of bits match and the total mask-length of IP address prefix greater than
Figure G2009102356096D0000243
Route table items storage, be i+1 level Hash table under the Ni bit Hash element of index search coupling then with the Ni bit Hash element content of coupling;
In addition, in the practical application, also specifically there are following several special circumstances at array element:
The array element content of e1, coupling is empty, then directly determines not have route table items to be checked, and finishes current querying flow;
E2, with the coupling the array element content be that index finds the 1st grade of RoutSet rather than the 1st grade of Hash table in internal memory, promptly do not have and this array element coupling and the total mask-length of IP address prefix route table items greater than M, then directly determine not have route table items to be checked, and finish current querying flow.
Correspondingly, also there are relevant several special circumstances at i level Hash table:
F1, route table items IP address prefix
Figure G2009102356096D0000244
The mask-length of bit be a sky smaller or equal to the Ni bit Hash element content of Ni and coupling, and IP address prefix the is not promptly also arranged This Hash element of bits match and the total mask-length of IP address prefix greater than
Figure G2009102356096D0000246
The storage of other route table items, the direct current querying flow of end then;
F2, for a kind of special circumstances that have hash-collision, promptly, Hash element content with coupling is that index finds i+1 level Hash table in internal memory, rather than i+1 level RoutSet, this situation might be because this array element subordinate of coupling comprises the i+1 level Hash table at long code mask simultaneously, and at the i+1 level RoutSet that lacks mask, referring to i level Hash table among the VR-ID among Fig. 11 and i level RoutSet, i level Hash table among the VR-ID Q and i level RoutSet, and have of the array element cascade of default RoutSet pointer at the same level in the i+1 level Hash table with coupling in i+1 level RoutSet and the VR table, so at this situation, at the Hash element content with coupling is index finds i+1 level Hash table in internal memory after, read the RoutSet pointer at the same level in the i+1 level Hash table, if the RoutSet pointed i+1 level RoutSet at the same level that reads, then can find i+1 level RoutSet, and in the i+1 level RoutSet that finds, carry out LPM according to the RoutSet pointer at the same level that reads; If the RoutSet pointer at the same level that reads is for empty, then there is not the i+1 level RoutSet under this array element in expression, thereby directly determines not have route table items to be checked, and finishes current querying flow.
F3, route table items IP address prefix
Figure G2009102356096D0000251
The mask-length of bit be a sky greater than the Ni bit Hash element content of pairing Ni of i level Hash table and coupling, and IP address prefix the is not promptly also arranged
Figure G2009102356096D0000252
This Hash element of bits match and the total mask-length of IP address prefix greater than
Figure G2009102356096D0000253
Route table items storage, then directly determine not have route table items to be checked, and finish current querying flow;
F4, be that index finds i+1 level RoutSet rather than i+1 level Hash table in internal memory with the Hash element content of coupling, promptly do not have with this array element coupling and the total mask-length of IP address prefix greater than
Figure G2009102356096D0000254
Route table items, then directly determine not have route table items to be checked, and finish current querying flow.
3), there is the route table items of public network or any VPN to need deletion
At the deletion public network or arbitrarily before the route table items of VPN, at first need to find in the manner described above route table items to be deleted, find wait to delete route table items after, directly this route table items is deleted from the RoutSet at its place and is got final product.And, no longer there are other any route table items if deleted among the RoutSet of this route table items, then can be further with this RoutSet deletion; If the RoutSet of the RoutSet pointed deletion default at the same level in the Hash table at the same level is arranged, then also need the RoutSet pointer default at the same level in the Hash table of peer to be set to sky.
In addition, for i level Hash table, if its all Hash elements do not have the RoutSet pointer at the same level of all deleted and this i level Hash table of i+1 level Hash table, the i+1 level RoutSet under all Hash elements of next stage for empty, then can be more further with this i level Hash table deletion, and the upper level Hash element of this i level Hash table or the content of array element be set to sky.
More than, be in conjunction with three kinds of processing procedures of storing, searching, deleting, to the detailed description of route maintenance in the embodiment of the invention and lookup method.
Preferably, referring to Fig. 2, in the route maintenance and lookup method of the embodiment of the invention, RoutSet pointer default at the same level in each Hash table in every grade is arranged on the 1st field of this Hash table, and the follow-up field of Hash table then can comprise father's Hash table pointer (father's Hash table pointer of the 1st grade of Hash table is for empty) of changing Hash table successively, as all in Hash element content and this Hash table 2 perhaps in the upper level array element of this hashed table index NiIndividual Hash element.Like this, when hash-collision takes place when, the 1st field that directly reads Hash table can find RoutSet at the same level according to default RoutSet pointer at the same level, be arranged on other modes of the follow-up field of this Hash table than default RoutSet pointer at the same level, save the processing procedure of inquiry RoutSet pointer at the same level in all fields of this Hash table, thereby can further improve route storage and search efficiency.
Preferably, referring to Fig. 3, in the route maintenance and lookup method of the embodiment of the invention, further be provided with all route table items IP address prefix corresponding bit of depositing of this RoutSet of expression in each RoutSet in every grade (for the 1st grade of RoutSet, IP address prefix corresponding bit is 1~32 bit, for i+1 level RoutSet, IP address prefix corresponding bit is
Figure G2009102356096D0000261
) maximum mask-length and minimum mask-length, if current depositing in to the mask-length of the IP address prefix corresponding bit of the route table items of this RoutSet, greater than the maximum mask-length of this RoutSet record, then will currently deposit in to the mask-length of the IP address prefix of the route table items of this RoutSet and be updated to the maximum mask-length that this RoutSet writes down; If current depositing in to the mask-length of the IP address prefix corresponding bit of the route table items of this RoutSet, less than the minimum mask-length of this RoutSet record, then will currently deposit in to the mask-length of the IP address prefix of the route table items of this RoutSet and be updated to the minimum mask-length that this RoutSet writes down.Like this, when routing inquiry, if inquire certain RoutSet, and the mask-length of known route table items IP address prefix corresponding bit to be checked is greater than the maximum mask-length of this RoutSet record, then can directly determine does not have route table items to be checked in this RoutSet, thereby has saved the process of carrying out the LPM coupling in this RoutSet; In like manner, if the mask-length of known route table items IP address prefix corresponding bit to be checked is less than the minimum mask-length of this RoutSet record, then can directly determine does not have route table items to be checked in this RoutSet, thereby has saved the process of carrying out the LPM coupling in this RoutSet yet.And then, owing to saved unnecessary LPM matching process, thereby further improved the efficient of routing inquiry.
In addition, in the route maintenance and querying method of the embodiment of the invention, public network and each VPN can be provided with the VR table of two correspondences, the one VR table is used to deposit the IP address prefix and represents multicast group (Group, G) the multicast routing table item of address, the 2nd VR table are used to deposit the IP address prefix and represent clean culture source (Source, S) the singlecast router list item of address.And, referring to Fig. 4, in each grade RoutSet of the VR table of depositing the multicast routing table item, can further have route pointer (RoutePointer), this RoutePointer can point in pairing the 2nd VR table of multicast routing table item of its affiliated RoutSet upper level array element of coupling or Hash element, the array element of the IP address prefix first byte of the corresponding expression of coupling source address.
Like this, during the route storage, each bit with the IP address prefix of multicast routing table item in VR table is an index, find or set up the RoutSet of corresponding level, storage multicast route table items in this RoutSet, simultaneously, the first byte of also representing the IP address prefix of source address according to the singlecast router list item, the RoutePointer of this RoutSet is set, make it to point in pairing the 2nd VR table of corresponding singlecast router list item, represent the array element that the first byte of the IP address prefix of source address is mated with corresponding singlecast router list item, thereafter, in the 2nd VR table, follow-up each bit with the IP address prefix of singlecast router list item is an index, finds the RoutSet of corresponding level step by step, and in this RoutSet storage singlecast router list item.
In like manner, during routing inquiry, each bit with the IP address prefix of multicast routing table item to be found in VR table is an index, find or set up the RoutSet of corresponding level, and LPM obtains multicast routing table item to be found in this RoutSet, find in corresponding the 2nd VR table according to the RoutePointer among this RoutSet then and represent the array element that the first byte of the IP address prefix of source address is mated with clean culture list item to be found, thereafter, in the 2nd VR table, follow-up each bit with the IP address prefix of singlecast router list item to be found is an index, finds the RoutSet of corresponding level step by step, and LPM obtains singlecast router list item to be found in this RoutSet.
In the route maintenance device and routing inquiring device of the embodiment of the invention, include CPU and internal memory, wherein, internal memory in route maintenance device and the routing inquiring device all is used to store and is respectively corresponding VR table that public network and each VPN be provided with and follow-up some grades of Hash tables of deriving out and RoutSet; CPU in the route maintenance device carries out corresponding the processing according to aforementioned route maintenance method in the present embodiment, and the CPU in the routing inquiring device then is according to aforementioned method for searching route in the present embodiment.
And, with the route maintenance of the embodiment of the invention and lookup method in like manner, route maintenance device and routing inquiring device for the embodiment of the invention, RoutSet pointer default at the same level in each Hash table in every grade is arranged on the 1st field of this Hash table, and the follow-up field of Hash table then can comprise father's Hash table pointer (father's Hash table pointer of the 1st grade of Hash table is for empty) of changing Hash table successively, as all in Hash element content and this Hash table 2 perhaps in the upper level array element of this hashed table index NiIndividual Hash element.Like this, when hash-collision takes place when, the 1st field that CPU directly reads Hash table can find RoutSet at the same level according to default RoutSet pointer at the same level, be arranged on other modes of the follow-up field of this Hash table than default RoutSet pointer at the same level, save the processing procedure of inquiry RoutSet pointer at the same level in all fields of this Hash table, thereby can further improve route storage and search efficiency.
In addition, route maintenance device and routing inquiring device for the embodiment of the invention, further be provided with all route table items IP address prefix corresponding bit of depositing of this RoutSet of expression in each RoutSet in every grade (for the 1st grade of RoutSet, IP address prefix corresponding bit is 1~32 bit, for i+1 level RoutSet, IP address prefix corresponding bit is ) maximum mask-length and minimum mask-length, if current depositing in to the mask-length of the IP address prefix corresponding bit of the route table items of this RoutSet, greater than the maximum mask-length of this RoutSet record, then CPU will currently deposit in to the mask-length of the IP address prefix of the route table items of this RoutSet and be updated to the maximum mask-length that this RoutSet writes down; If current depositing in to the mask-length of the IP address prefix corresponding bit of the route table items of this RoutSet, less than the minimum mask-length of this RoutSet record, then CPU will currently deposit in to the mask-length of the IP address prefix of the route table items of this RoutSet and be updated to the minimum mask-length that this RoutSet writes down.Like this, when routing inquiry, if CPU inquires certain RoutSet, and the mask-length of known route table items IP address prefix corresponding bit to be checked is greater than the maximum mask-length of this RoutSet record, then CPU can directly determine there is not route table items to be checked in this RoutSet, thereby has saved the process of carrying out the LPM coupling in this RoutSet; In like manner, if the mask-length of known route table items IP address prefix corresponding bit to be checked is less than the minimum mask-length of this RoutSet record, then CPU can directly determine there is not route table items to be checked in this RoutSet, thereby has also saved the process of carrying out the LPM coupling in this RoutSet.And then, owing to saved the unnecessary LPM matching process of CPU, thereby further improved the efficient of routing inquiry.
With route maintenance and querying method in like manner, in the route maintenance and inquiry unit of the embodiment of the invention, public network and each VPN can be provided with the VR table of two correspondences, and VR table is used to deposit the IP address prefix and represents that the multicast routing table item of multicast group address, the 2nd VR table are used to deposit the singlecast router list item that the IP address prefix is represented unicast source address.And, in each grade RoutSet of the VR table of depositing the multicast routing table item, can further have RoutePointer, this RoutePointer can point in pairing the 2nd VR table of multicast routing table item of its affiliated RoutSet upper level array element of coupling or Hash element, the array element of the IP address prefix first byte of the corresponding expression of coupling source address.
Like this, during the route storage, CPU each bit with the IP address prefix of multicast routing table item in VR table is an index, find or set up the RoutSet of corresponding level, storage multicast route table items in this RoutSet, simultaneously, CPU also represents the first byte of the IP address prefix of source address according to the singlecast router list item, the RoutePointer of this RoutSet is set, make it to point in pairing the 2nd VR table of corresponding singlecast router list item, represent the array element that the first byte of the IP address prefix of source address is mated with corresponding singlecast router list item, thereafter, in the 2nd VR table, follow-up each bit with the IP address prefix of singlecast router list item is an index, finds the RoutSet of corresponding level step by step, and in this RoutSet storage singlecast router list item.
In like manner, during routing inquiry, CPU each bit with the IP address prefix of multicast routing table item to be found in VR table is an index, find or set up the RoutSet of corresponding level, and LPM obtains multicast routing table item to be found in this RoutSet, CPU finds in corresponding the 2nd VR table according to the RoutePointer among this RoutSet and represents the array element that the first byte of the IP address prefix of source address is mated with clean culture list item to be found then, thereafter, in the 2nd VR table, CPU is an index with follow-up each bit of the IP address prefix of singlecast router list item to be found, finds the RoutSet of corresponding level step by step, and LPM obtains singlecast router list item to be found in this RoutSet.
This shows that route maintenance in the embodiment of the invention and querying method and route maintenance and inquiry unit are respectively public network and each VPN corresponding virtual route VR table is set, and include 2 in every VR table MThe individual M bit array element that is used for IP address prefix highest byte coupling, if the mask-length of route table items IP address prefix is smaller or equal to M, then can distinguish this route table items with the highest byte of this IP address prefix, thus can be directly with the M bit array element of IP address prefix highest byte coupling under derive set of routes and incompatiblely deposit this route table items, and can directly in this route set, find this route table items; If the mask-length of route table items IP address prefix is greater than M, then the highest byte with this IP address prefix is not enough to distinguish this route table items, thereby need derive some grades of Hash tables of the follow-up corresponding bits of corresponding IP address prefix, until the mask-length of this IP address prefix the highest M bit and the pairing corresponding bits sum of follow-up some grades of Hash tables smaller or equal to the array element correspondence, then in the afterbody Hash table that derives with the IP address prefix under should the Hash element that mates of corresponding bits of level Hash table, derive incompatible this route table items of depositing of set of routes, and can find this route set according to same way as, in this route set, find this route table items.
Like this, need the inquiry of 2 (situations of 1 grade of Hash table) inferior~33-M time (situation of 32-M level Hash table) direct address at most, obviously be less than maximum 32 inquiries of tree structure in (M was greater than 1 o'clock) or no more than (M equals at 1 o'clock) prior art, and the M value is big more, inquiry times obviously is less than maximum 32 inquiries of tree structure in the prior art, thereby can improve routing inquiry efficient.
Further, at IP address prefix value is identical but the route conflict that mask-length is different, the embodiment of the invention can be set up route set, set up Hash table at the same level at the long code mask route table items at short mask route table items under the same element of coupling, utilize the route set of Hash table cascade at the same level peer again, thereby solved the problem of hash-collision.
Again further, the embodiment of the invention can write down the maximum mask-length and the minimum mask-length of the route table items of depositing in each route set, thereby route table items to be checked greater than the record maximum mask-length or less than the record minimum mask-length the time, need not in route set, to inquire about and to know the route table items that does not have coupling, thereby further improve routing inquiry efficient.
In addition, the embodiment of the invention can be shown with the VR that each VPN is provided with two correspondences respectively for public network, route table items that is used to deposit the expression multicast group address, another is used to deposit the route table items of expression multicast source address, thereby also can be applicable to multicast path by, further improve the versatility of routing inquiry.
Below, lift some examples again, the route maintenance in the embodiment of the invention and querying method and route maintenance and inquiry unit are further specified.
In following some examples, the bit number M of array element gets 8, Hash table progression is 4 grades to the maximum, and the 29th~32 bit of the 25th~28 bit of the 21st~24 bit of the 9th~20 bit of the 1st grade of corresponding IP address prefix of Hash table, the 2nd grade of corresponding IP address prefix of Hash table, the corresponding IP address prefix of 3rd level Hash table, the 4th grade of corresponding IP address prefix of Hash table, that is to say, the highest byte of the corresponding IP of the array element in VR table address, the 1st~4 grade of Hash table be follow-up 12,4,4,4 bits of the corresponding IP address prefix of order then.
Example one:
For needing the stored IP address prefix is the VPN route list item of the VPN1 of 1.2.3.4/31, is positioned to the corresponding VR table of VPN1 according to VR-ID1.
In the corresponding VR table of VPN1, utilize the highest byte 0x01 of the IP address prefix 1.2.3.4/31 of this route table items search coupling the 2nd array element, be array element 0x01.Because the mask-length of 1.2.3.4/31 is greater than 8, thereby search the 1st grade of Hash table under the array element 0x01.But because the content of array element 0x01 be empty, thereby referring to Fig. 5 a, create the 1st grade of Hash table under this data element 0x01, the content of this array element 0x01 the 1st grade of address of Hash table in internal memory being set to create also.
In the 1st grade of Hash table, utilize the 9th~20 bit 0x020 of the IP address prefix 1.2.3.4/31 of this route table items to be the Hash element 0x020 of index search to coupling, owing to greater than 12, thereby search the 2nd grade of Hash table under the Hash element 0x020 from the mask-length (31-8)=23 of the 9th~32 bit.But because the content of Hash element 0x020 be empty, thereby referring to Fig. 5 b, create the 2nd grade of Hash table under this Hash element 0x020, the content of this Hash element 0x020 the 2nd grade of address of Hash table in internal memory being set to create also.
In the 2nd grade of Hash table, utilize the 21st~24 bit 0x3 of the IP address prefix 1.2.3.4/31 of this route table items to be the Hash element 0x3 of index search to coupling, because the mask-length (31-8-12)=11 of the 21st~32 bit is greater than 4, thereby search 3rd level Hash table under the Hash element 0x3.But because the content of Hash element 0x3 be empty, thereby referring to Fig. 5 c, create 3rd level Hash table under this Hash element 0x3, the content of this Hash element 0x3 address of 3rd level Hash table in internal memory that be set to create also.
In the 3rd level Hash table, utilize the 25th~28 bit 0x0 of the IP address prefix 1.2.3.4/31 of this route table items to be the Hash element 0x0 of index search to coupling, because the mask-length (31-8-12-4)=7 of the 25th~32 bit is greater than 4, thereby search the 4th grade of Hash table under the Hash element 0x0.But because the content of Hash element 0x0 be empty, thereby referring to Fig. 5 d, create the 4th grade of Hash table under this Hash element 0x0, the content of this Hash element 0x0 the 4th grade of address of Hash table in internal memory being set to create also.
In the 4th grade of Hash table, utilize the 28th~32 bit 0x4 of the IP address prefix 1.2.3.4/31 of this route table items to be the Hash element 0x4 of index search to coupling, because the mask-length (31-8-12-4-4)=3 of the 28th~32 bit is less than 4, thereby search the 5th grade of RoutSet under the Hash element 0x4.But because the content of Hash element 0x4 is empty, thereby referring to Fig. 5 e, create the 5th grade of RoutSet under this Hash element 0x4, and the content of this Hash element 0x0 the 4th grade of address of Hash table in internal memory being set to create, in the 5th grade of RoutSet, deposit the VPN route list item that the IP address prefix is the VPN1 of 1.2.3.4/31 then, and maximum mask-length and the minimum mask-length of this RoutSet all is set to 3.
After this, when needs are searched the IP address prefix and are the VPN route list item of VPN1 of 1.2.3.4/31, at first be positioned to the VR table of VPN1 correspondence according to VR-ID1, then successively with 0x01,0x020,0x3,0x0,0x4 is an index, by array element 0x01, Hash element 0x020 under the array element 0x01 in the 1st grade of Hash table, Hash element 0x3 under this Hash element 0x020 in the 2nd grade of Hash table, Hash element 0x0 under this Hash element in the 0x3 3rd level Hash table, Hash element 0x4 under this Hash element 0x0 in the 4th grade of Hash table finds the RoutSet under this Hash element 0x4.After this, because the IP address prefix is that the last 4 bitmask length of 1.2.3.4/31 are 3, not greater than the maximum mask-length among the RoutSet under this Hash element 0x4, also not less than the minimum mask-length among this RoutSet, thereby in RoutSet, can obtain the VPN route list item that the IP address prefix is the VPN1 of 1.2.3.4/31 by LPM.
Example two:
Based on the event memory of example just like Fig. 5 e, it is that the VPN route list item of the VPN1 of 1.2.0.0/16 needs storage that the IP address prefix is arranged again, is positioned to the corresponding VR table of VPN1 according to VR-ID1.
In the corresponding VR table of VPN1, utilize the highest byte 0x01 of the IP address prefix 1.2.0.0/16 of this route table items search coupling the 2nd array element, be array element 0x01.Because the mask-length of 1.2.0.0/16 is greater than 8, and 1st grade Hash table the address in internal memory of the content of this array element 0x01 for creating, thereby be index, in internal memory, search the 1st grade of Hash table under the array element 0x01 with the content of array element 0x01.
In the 1st grade of Hash table, utilize the 9th~20 bit 0x020 of the IP address prefix 1.2.0.0/16 of this route table items to be the Hash element 0x020 of index search to coupling, owing to less than 12, thereby search the 2nd grade of RoutSet under the Hash element 0x020 from the mask-length (16-8)=8 of the 9th~32 bit.But because the content of Hash element 0x020 is the 2nd a grade of Hash table, thereby referring to Fig. 6, create the 2nd grade of RoutSet under this Hash element 0x020 but keep the 2nd grade of Hash table under this Hash element 0x020 and the 2nd grade of RoutSet that the RoutSet pointed at the same level in the 2nd grade of Hash table under this Hash element 0x020 is created is set, in the 2nd grade of RoutSet, deposit the VPN route list item that the IP address prefix is the VPN1 of 1.2.0.0/16 then, and maximum mask-length and the minimum mask-length of this RoutSet all is set to 8.
After this, when needs are searched the IP address prefix and are the VPN route list item of VPN1 of 1.2.0.0/16, at first be positioned to the VR table of VPN1 correspondence according to VR-ID1, be index with 0x01,0x020 successively then, the RoutSet pointer at the same level by the 2nd grade of Hash table under Hash element 0x020, this Hash element 0x020 in the 1st grade of Hash table under array element 0x01, the array element 0x01 finds the RoutSet under this Hash element 0x020.After this, because the IP address prefix is that the 9th~32 bitmask length of 1.2.0.0/16 is 8, not greater than the maximum mask-length among the RoutSet under this Hash element 0x020, also not less than the minimum mask-length among this RoutSet, thereby in RoutSet, can obtain the VPN route list item that the IP address prefix is the VPN1 of 1.2.0.0/16 by LPM.
Example three:
Based on the event memory of example two as Fig. 6, it is that the VPN route list item of the VPN1 of 1.2.3.4/31 need be inquired about and delete that the IP address prefix is arranged, and is positioned to the corresponding VR table of VPN1 according to VR-ID1.
In the corresponding VR table of VPN1, utilize the highest byte 0x01 of the IP address prefix of this route table items search coupling the 2nd array element, be array element 0x01.Because the mask-length of 1.2.3.4/31 is greater than 8, thereby be the 1st grade of Hash table under the index search array element 0x01 with the content of array element 0x01.
In the 1st grade of Hash table, utilize the 9th~20 bit 0x020 of the IP address prefix 1.2.3.4/31 of this route table items to be the Hash element 0x020 of index search to coupling, because greater than 12, thereby is the 2nd grade of Hash table under the index search Hash element 0x020 with the content of Hash element 0x020 from the mask-length (31-8)=23 of the 9th~32 bit.
In the 2nd grade of Hash table, utilize the 21st~24 bit 0x3 of the IP address prefix 1.2.3.4/31 of this route table items to be the Hash element 0x3 of index search to coupling, because the mask-length (31-8-12)=11 of the 21st~32 bit is greater than 4, thereby be 3rd level Hash table under the index search Hash element 0x3 with the content of Hash element 0x3.
In the 3rd level Hash table, utilize the 25th~28 bit 0x0 of the IP address prefix 1.2.3.4/31 of this route table items to be the Hash element 0x0 of index search to coupling, because the mask-length (31-8-12-4)=7 of the 25th~32 bit is greater than 4, thereby be the 4th grade of Hash table under the index search Hash element 0x0 with the content of Hash element 0x0.
In the 4th grade of Hash table, utilize the 28th~32 bit 0x4 of the IP address prefix 1.2.3.4/31 of this route table items to be the Hash element 0x4 of index search to coupling, because the mask-length (31-8-12-4-4)=3 of the 28th~32 bit is less than 4, thereby be the 5th grade of RoutSet under the index search Hash element 0x4 with the content of Hash element 0x4.
In the 5th grade of RoutSet, referring to Fig. 7 a, be the VPN route list item deletion of the VPN1 of 1.2.3.4/31 with the IP address prefix, and because this RoutSet is empty, thereby also with this RoutSet deletion, and the content of Hash element 0x4 is set to sky in the 4th grade of Hash table.Referring to Fig. 7 b, because the content of all Hash elements is sky in the 4th grade of Hash table, thereby delete the 4th grade of Hash table, and the content of Hash element 0x0 is set to sky in the 3rd level Hash table, the rest may be inferred, 3rd level Hash table and the 2nd grade of Hash table are also deleted, but owing to also have the 2nd grade of RoutSet under the Hash element 0x020 of the 1st grade of Hash table, thereby changing the Hash element 0x020 content of the 1st grade of Hash table into the 2nd grade of address of RoutSet in internal memory, the content that is about to Hash element 0x020 changes the index of the 2nd grade of RoutSet into.
More than three examples all be that VPN route with VPN is an example, the storage of public network route, inquiry, delete procedure are identical with it, multicast path by storage, inquiry, delete procedure also with it in like manner but need carry out processing by RoutPointer to two VR tables.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to and replace and improvement etc., all should be included within protection scope of the present invention.

Claims (32)

1. a route maintenance method is characterized in that, is respectively public network and each VPN corresponding virtual route VR table is set, and includes 2 in every VR table MIndividual M bit array element, each array element that is used for IP address prefix highest byte coupling can derive down the 1st grade of Hash table and/or the 1st grade of route set, each Hash element of i level Hash table can derive down i+1 level Hash table and/or i+1 level route set, i more than or equal to 1 and smaller or equal to default maximum progression P, the P of Hash table for more than or equal to 1 and smaller or equal to the positive integer of 32-M, and for the public network of needs storage or the route table items of any VPN, this route maintenance method comprises:
Utilize the highest byte of the IP address prefix of this route table items in corresponding VR table, to search the array element of coupling;
When the mask-length of this route table items IP address prefix during, this route table items is deposited in the 1st grade of route set to the array element of coupling smaller or equal to M;
When the mask-length of this route table items IP address prefix during greater than M, the 1st grade of Hash table under the array element of coupling searched in the i level Hash table and IP address prefix the successively
Figure F2009102356096C0000011
The Ni bit Hash element of bits match is also judged this route table items IP address prefix at i level Hash table
Figure F2009102356096C0000012
Whether the mask-length of bit is smaller or equal to Ni, if, this route table items deposited in the i+1 level route set under the Ni bit Hash element that mates to the i level Hash table, otherwise, continue to judge at the i+1 level Hash table under the Ni bit Hash element that mates in the i level Hash table;
Wherein, N0 gets 0, and Ni satisfies N1~NP sum to equal any positive integer of setting under this condition of 32-M.
2. route maintenance method as claimed in claim 1 is characterized in that,
When the mask-length of this route table items IP address prefix during, be that index finds the 1st grade of route set in internal memory with the array element content of coupling smaller or equal to M;
When the mask-length of this route table items IP address prefix during greater than M, be that index finds the 1st grade of Hash table in internal memory with the array element content of coupling, then at i level Hash table:
If route table items IP address prefix IP address prefix
Figure F2009102356096C0000021
The mask-length of bit is smaller or equal to Ni, is i+1 level route set under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling then;
If route table items IP address prefix
Figure F2009102356096C0000022
The mask-length of bit is greater than Ni, is i+1 level Hash table under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling then.
3. route maintenance method as claimed in claim 2 is characterized in that,
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling be empty, then further create the 1st grade of route set under this data element, this array element content the 1st grade of address of route set in internal memory being set to create also;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling is empty, then further create the 1st grade of Hash table under this data element, and this array element content the 1st grade of address of Hash table in internal memory being set to create, then at i level Hash table:
If route table items IP address prefix
Figure F2009102356096C0000023
The mask-length of bit is smaller or equal to Ni, the following i+1 level route set of the Ni bit Hash element of then further creating coupling, this Ni bit Hash element content address of i+1 level route set in internal memory of being set to create also;
If route table items IP address prefix
Figure F2009102356096C0000024
The mask-length of bit be empty greater than the Ni bit Hash element content of Ni and coupling, then further creates i+1 level Hash table under the Ni bit Hash element of coupling, this Ni bit Hash element content address of i+1 level Hash table in internal memory of being set to create also.
4. route maintenance method as claimed in claim 3 is characterized in that,
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling has recorded the 1st grade of address of Hash table in internal memory this data element under, then further create the 1st grade of route set under this data element and the 1st grade of route set under interior this data element of route set pointed at the same level of the 1st grade of Hash table under this array element is set;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling has recorded the 1st grade of address of route set in internal memory under this data element, then further create the 1st grade of Hash table under this data element and the 1st grade of route set under this data element of route set pointed at the same level in the 1st grade of Hash table under this array element is set, then at i level Hash table:
If route table items IP address prefix
Figure F2009102356096C0000031
The mask-length of bit be the address of i+1 level Hash table in internal memory this Ni bit Hash element under smaller or equal to the Ni bit Hash element content of Ni and coupling, then further creates the i+1 level route set under the Ni bit Hash element that mates and i+1 level route set under interior this Ni bit Hash element of route set pointed at the same level of i+1 level Hash table under this Ni bit Hash element is set;
If route table items IP address prefix
Figure F2009102356096C0000032
The mask-length of bit be the address of i+1 level route set in internal memory this Ni bit Hash element under greater than the Ni bit Hash element content of Ni and coupling, then further the i+1 level Hash table under the Ni bit Hash element that mates of establishment, i+1 level Hash table that this Ni bit Hash element content is set to create in internal memory the address and i+1 level route set under this Ni bit Hash element of route set pointed at the same level in the i+1 level Hash table under this Ni bit Hash element is set.
5. route maintenance method as claimed in claim 4 is characterized in that, the route set pointer at the same level in each Hash table in every grade is arranged on the 1st field of this Hash table.
6. as each described route maintenance method in the claim 1 to 5, it is characterized in that, further be provided with the maximum mask-length and the minimum mask-length of all route table items IP address prefix corresponding bit of depositing in this route set of expression in each route set in every grade.
7. as each described route maintenance method in the claim 1 to 5, it is characterized in that public network and each VPN are provided with the VR table of two correspondences, VR table is used to deposit the multicast routing table item, the 2nd VR table is used to deposit the singlecast router list item;
And, further has route pointer in the route set of the one VR table, described route pointer is pointed in pairing the 2nd VR table of multicast routing table item of its affiliated route set upper level array element of coupling or Hash element, with the array element of corresponding singlecast router list item IP address prefix first byte coupling.
8. as each described route maintenance method in the claim 1 to 5, it is characterized in that, utilize VR-ID to distinguish public network and different VPN and distinguish corresponding VR table, and the continuous VR-ID of the continuous VPN corresponding value of order.
9. as each described route maintenance method in the claim 1 to 5, it is characterized in that described M gets 8.
10. route maintenance device, this device comprises CPU and internal memory, it is characterized in that,
Store the corresponding virtual route VR table that is respectively public network and each VPN setting in the described internal memory, include 2 in every VR table MIndividual M bit array element, each array element that is used for IP address prefix highest byte coupling can derive down the 1st grade of Hash table and/or the 1st grade of route set, each Hash element of i level Hash table can derive down i+1 level Hash table and/or i+1 level route set, i more than or equal to 1 and smaller or equal to default maximum progression P, the P of Hash table for more than or equal to 1 and smaller or equal to the positive integer of 32-M;
For the public network of needs storage or the route table items of any VPN, described CPU utilizes the highest byte of the IP address prefix of this route table items to search the array element of coupling in corresponding VR table;
When the mask-length of this route table items IP address prefix during smaller or equal to M, described CPU deposits this route table items to the 1st grade route set of array element in described internal memory of coupling;
When the mask-length of this route table items IP address prefix during greater than M, described CPU begins from the 1st grade of Hash table of array element described internal memory of coupling, searches successively in the i level Hash table and IP address prefix the
Figure F2009102356096C0000041
The Ni bit Hash element of bits match is also judged this route table items IP address prefix at i level Hash table
Figure F2009102356096C0000042
Whether the mask-length of bit is smaller or equal to Ni, if, this route table items deposited in the i+1 level route set under the Ni bit Hash element that mates to the i level Hash table, otherwise, continue to judge at the i+1 level Hash table under the Ni bit Hash element that mates in the i level Hash table;
Wherein, N0 gets 0, and Ni satisfies N1~NP sum to equal any positive integer of setting under this condition of 32-M.
11. route maintenance device as claimed in claim 10 is characterized in that,
When the mask-length of this route table items IP address prefix during smaller or equal to M, described CPU is that index finds the 1st grade of route set in internal memory with the array element content of coupling further;
When the mask-length of this route table items IP address prefix during greater than M, be that index finds the 1st grade of Hash table in internal memory with the array element content of coupling, carry out described judgement at i level Hash table successively then, and at i level Hash table:
If route table items IP address prefix IP address prefix
Figure F2009102356096C0000051
The mask-length of bit is smaller or equal to Ni, and then described CPU is an i+1 level route set under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling further;
If route table items IP address prefix
Figure F2009102356096C0000052
The mask-length of bit is greater than Ni, and then described CPU is an i+1 level Hash table under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling further.
12. route storage device as claimed in claim 11 is characterized in that,
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling be empty, then described CPU further creates the 1st grade of route set under this data element, this array element content the 1st grade of address of route set in internal memory being set to create also in described internal memory;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling is empty, then further create the 1st grade of Hash table under this data element, and this array element content the 1st grade of address of Hash table in internal memory being set to create, then at i level Hash table:
If route table items IP address prefix
Figure F2009102356096C0000053
The mask-length of bit be empty smaller or equal to the Ni bit Hash element content of Ni and coupling, and then described CPU further creates i+1 level route set under the Ni bit Hash element of coupling, this Ni bit Hash element content address of i+1 level route set in internal memory of being set to create also in described internal memory;
If route table items IP address prefix
Figure F2009102356096C0000061
The mask-length of bit be empty greater than the Ni bit Hash element content of Ni and coupling, and then described CPU further creates i+1 level Hash table under the Ni bit Hash element of coupling, this Ni bit Hash element content address of i+1 level Hash table in internal memory of being set to create also in described internal memory.
13. route maintenance device as claimed in claim 12 is characterized in that,
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling has recorded the 1st grade of address of Hash table in internal memory this data element under, then described CPU is the 1st grade of route set under this data element of establishment and the 1st grade of route set under this data element of route set pointed at the same level in the 1st grade of Hash table under this array element is set in described internal memory further;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling has recorded the 1st grade of address of route set in internal memory under this data element, then further create the 1st grade of Hash table under this data element and the 1st grade of route set under this data element of route set pointed at the same level in the 1st grade of Hash table under this array element is set, then at i level Hash table:
If route table items IP address prefix
Figure F2009102356096C0000062
The mask-length of bit be the address of i+1 level Hash table in internal memory this Ni bit Hash element under smaller or equal to the Ni bit Hash element content of Ni and coupling, and the i+1 level route set under the then described CPU Ni bit Hash element that further establishment is mated in described internal memory also is provided with i+1 level route set under this Ni bit Hash element of route set pointed at the same level in the i+1 level Hash table under this Ni bit Hash element;
If route table items IP address prefix
Figure F2009102356096C0000063
The mask-length of bit be the address of i+1 level route set in internal memory this Ni bit Hash element under greater than the Ni bit Hash element content of Ni and coupling, the i+1 level Hash table under the then described CPU Ni bit Hash element that further establishment is mated in described internal memory, the i+1 level Hash table that this Ni bit Hash element content is set to create in internal memory the address and i+1 level route set under this Ni bit Hash element of route set pointed at the same level in the i+1 level Hash table under this Ni bit Hash element is set.
14., it is characterized in that public network and each VPN are provided with the VR table of two correspondences as each described route maintenance device in the claim 10 to 13, VR table is used to deposit the multicast routing table item, the 2nd VR table is used to deposit the singlecast router list item;
And, further has route pointer in the route set of the one VR table, described route pointer is pointed in pairing the 2nd VR table of multicast routing table item of its affiliated route set upper level array element of coupling or Hash element, with the array element of corresponding singlecast router list item IP address prefix first byte coupling.
15., it is characterized in that public network and different VPN are distinguished corresponding VR table with the VR-ID differentiation, and the continuous VR-ID of the continuous VPN corresponding value of order as each described route maintenance device in the claim 10 to 13.
16., it is characterized in that described M gets 8 as each described route maintenance device in the claim 10 to 13.
17. a method for searching route is characterized in that, is respectively public network and each VPN corresponding virtual route VR table is set, and includes 2 in every VR table MIndividual M bit array element, each array element that is used for IP address prefix highest byte coupling can derive down the 1st grade of Hash table and/or the 1st grade of route set, each Hash element of i level Hash table can derive down i+1 level Hash table and/or i+1 level route set, i more than or equal to 1 and smaller or equal to default maximum progression P, the P of Hash table for more than or equal to 1 and smaller or equal to the positive integer of 32-M, and for the public network of needs inquiry or the route table items of any VPN, this method for searching route comprises:
Utilize the highest byte of the IP address prefix of this route table items in corresponding VR table, to search the array element of coupling;
When the mask-length of this route table items IP address prefix during, search this route table items in the 1st grade of route set under the array element of coupling smaller or equal to M;
When the mask-length of this route table items IP address prefix during greater than M, the 1st grade of Hash table under the array element of coupling searched in the i level Hash table and IP address prefix the successively
Figure F2009102356096C0000081
The Ni bit Hash element of bits match is also judged this route table items IP address prefix at i level Hash table
Figure F2009102356096C0000082
Whether the mask-length of bit is smaller or equal to Ni, if, search this route table items in the i+1 level route set under the Ni bit Hash element that in i level Hash table, mates, otherwise, continue to judge at the i+1 level Hash table under the Ni bit Hash element that mates in the i level Hash table;
Wherein, N0 gets 0, and Ni satisfies N1~NP sum to equal any positive integer of setting under this condition of 32-M.
18. method for searching route as claimed in claim 17 is characterized in that,
When the mask-length of this route table items IP address prefix during, be that index finds the 1st grade of route set in internal memory with the array element content of coupling smaller or equal to M;
When the mask-length of this route table items IP address prefix during greater than M, be that index finds the 1st grade of Hash table in internal memory with the array element content of coupling, then at i level Hash table:
If route table items IP address prefix IP address prefix
Figure F2009102356096C0000083
The mask-length of bit is smaller or equal to Ni, is i+1 level route set under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling then;
If route table items IP address prefix
Figure F2009102356096C0000084
The mask-length of bit is greater than Ni, is i+1 level Hash table under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling then.
19. method for searching route as claimed in claim 18 is characterized in that,
When the mask-length of this route table items IP address prefix during,, then finish current inquiry if the array element content of coupling be a sky smaller or equal to M;
When the mask-length of this route table items IP address prefix during,, then finish current inquiry if the array element content of coupling be a sky greater than M.
20. method for searching route as claimed in claim 19 is characterized in that,
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling has recorded the 1st grade of address of Hash table in internal memory under this data element, then further inquire about the route set pointer at the same level in the 1st grade of Hash table under this array element, if the 1st grade of route set under should peer's this data element of route set pointed, table of query and routing item in the 1st grade of route set then, otherwise finish current inquiry;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling has recorded the 1st grade of address of route set in internal memory this data element under, the then further current inquiry of end;
When the mask-length of this route table items IP address prefix during greater than M, and the array element content of coupling is the 1st grade of Hash table, then at i level Hash table:
If route table items IP address prefix
Figure F2009102356096C0000091
The mask-length of bit is the address of i+1 level Hash table in internal memory under this Ni bit Hash element smaller or equal to the Ni bit Hash element content of Ni and coupling, the further route set pointer at the same level in the i+1 level Hash table under this Ni bit Hash element then, if the i+1 level route set under should this Ni bit Hash element of peer's route set pointed, table of query and routing item in this i+1 level route set then, otherwise finish current inquiry;
If route table items IP address prefix
Figure F2009102356096C0000092
The mask-length of bit is the address of i+1 level route set in internal memory under this Ni bit Hash element greater than the Ni bit Hash element content of Ni and coupling, then finishes current inquiry.
21. method for searching route as claimed in claim 20 is characterized in that, inquires about route set pointer at the same level by the 1st field that directly reads Hash table.
22. as each described method for searching route in the claim 17 to 21, it is characterized in that, further be provided with the maximum mask-length and the minimum mask-length of all route table items IP address prefix corresponding bit of depositing in this route set of expression in each route set in every grade;
If the mask-length of route table items IP address prefix corresponding bit to be checked greater than the maximum mask-length that route set write down that finds or less than the minimum mask-length that route set write down that finds, then directly finishes current inquiry.
23., it is characterized in that public network and each VPN are provided with the VR table of two correspondences as each described method for searching route in the claim 17 to 21, VR table is used to deposit the multicast routing table item, the 2nd VR table is used to deposit the singlecast router list item;
Each bit with the IP address prefix of multicast routing table item to be found in VR table is an index, find the route set of corresponding level, and in this route set, find multicast routing table item to be found, find in corresponding the 2nd VR table according to the route set pointer in this route set then, array element with the first byte coupling of the IP address prefix of clean culture list item to be found, and follow-up each bit with the IP address prefix of singlecast router list item to be found is an index in the 2nd VR table, finds the route set of corresponding level step by step, and in this route set, find singlecast router list item to be found.
24., it is characterized in that as each described method for searching route in the claim 17 to 21, utilize VR-ID to distinguish public network and different VPN and distinguish corresponding VR table, and the continuous VR-ID of the continuous VPN corresponding value of order.
25., it is characterized in that described M gets 8 as each described method for searching route in the claim 17 to 21.
26. a routing inquiring device, this device comprises CPU and internal memory, it is characterized in that,
Store the corresponding virtual route VR table that is respectively public network and each VPN setting in the described internal memory, include 2 in every VR table MIndividual be used for the i+1 level Hash table that derives under the Hash element arbitrarily with the M bit array element of IP address prefix highest byte coupling and the 1st grade of Hash table that derives under the array element arbitrarily and/or the 1st grade of route set, i level Hash table and/or i+1 level route set, i more than or equal to 1 and smaller or equal to default maximum progression P, the P of Hash table for more than or equal to 1 and smaller or equal to the positive integer of 32-M;
For the public network of needs inquiry or the route table items of any VPN, described CPU utilizes the highest byte of the IP address prefix of this route table items to search the array element of coupling in corresponding VR table;
When the mask-length of this route table items IP address prefix during smaller or equal to M, described CPU searches this route table items in the 1st grade of route set of the array element of coupling;
When the mask-length of this route table items IP address prefix during greater than M, the 1st grade Hash table of described CPU under the array element of coupling searched in the i level Hash table and IP address prefix the successively
Figure F2009102356096C0000111
The Ni bit Hash element of bits match is also judged this route table items IP address prefix at i level Hash table
Figure F2009102356096C0000112
Whether the mask-length of bit is smaller or equal to Ni, if, search this route table items in the i+1 level route set under the Ni bit Hash element that described CPU mates in i level Hash table, otherwise described CPU continues to judge at the i+1 level Hash table under the Ni bit Hash element that mates in the i level Hash table;
Wherein, N0 gets 0, and Ni satisfies N1~NP sum to equal any positive integer of setting under this condition of 32-M.
27. routing inquiring device as claimed in claim 26 is characterized in that,
When the mask-length of this route table items IP address prefix during smaller or equal to M, described CPU is that index finds the 1st grade of route set in internal memory with the array element content of coupling;
When the mask-length of this route table items IP address prefix during greater than M, described CPU is that index finds the 1st grade of Hash table in internal memory with the array element content of coupling, then at i level Hash table:
If route table items IP address prefix IP address prefix
Figure F2009102356096C0000113
The mask-length of bit is smaller or equal to Ni, and then described CPU is an i+1 level route set under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling in described internal memory;
If route table items IP address prefix
Figure F2009102356096C0000114
The mask-length of bit is greater than Ni, and then described CPU is an i+1 level Hash table under the Ni bit Hash element of index search coupling with the Ni bit Hash element content of coupling in described internal memory.
28. the routing inquiring device as claim 27 is stated is characterized in that,
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling be a sky, then described CPU finishes current inquiry;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling be a sky, then described CPU finishes current inquiry.
29. routing inquiring device as claimed in claim 28 is characterized in that,
When the mask-length of this route table items IP address prefix during smaller or equal to M, if the array element content of coupling has recorded the 1st grade of address of Hash table in internal memory under this data element, then described CPU further inquires about the interior route set pointer at the same level of the 1st grade of Hash table under this array element, if the 1st grade of route set under should peer's this data element of route set pointed, then described CPU is the table of query and routing item in the 1st grade of route set, otherwise finishes current inquiry;
When the mask-length of this route table items IP address prefix during greater than M, if the array element content of coupling has recorded the 1st grade of address of route set in internal memory this data element under, the further current inquiry of end of then described CPU;
When the mask-length of this route table items IP address prefix during greater than M, and the array element content of coupling is the 1st grade of Hash table, then at i level Hash table:
If route table items IP address prefix The mask-length of bit is the address of i+1 level Hash table in internal memory under this Ni bit Hash element smaller or equal to the Ni bit Hash element content of Ni and coupling, then described CPU is the route set pointer at the same level in the i+1 level Hash table under this Ni bit Hash element further, if the i+1 level route set under should this Ni bit Hash element of peer's route set pointed, then described CPU is the table of query and routing item in this i+1 level route set, otherwise finishes current inquiry;
If route table items IP address prefix
Figure F2009102356096C0000122
The mask-length of bit is the address of i+1 level route set in internal memory under this Ni bit Hash element greater than the Ni bit Hash element content of Ni and coupling, and then described CPU finishes current inquiry.
30., it is characterized in that public network and each VPN are provided with the VR table of two correspondences as each described routing inquiring device in the claim 26 to 29, VR table is used to deposit the multicast routing table item, the 2nd VR table is used to deposit the singlecast router list item;
Described CPU each bit with the IP address prefix of multicast routing table item to be found in VR table is an index, find the route set of corresponding level, and in this route set, find multicast routing table item to be found, find in corresponding the 2nd VR table according to the route set pointer in this route set then, array element with the first byte coupling of the IP address prefix of clean culture list item to be found, and follow-up each bit with the IP address prefix of singlecast router list item to be found is an index in the 2nd VR table, finds the route set of corresponding level step by step, and in this route set, find singlecast router list item to be found.
31., it is characterized in that described CPU utilizes VR-ID to distinguish public network and different VPN is distinguished corresponding VR table as each described routing inquiring device in the claim 26 to 29, and the continuous VR-ID of the continuous VPN corresponding value of order.
32., it is characterized in that described M gets 8 as each described routing inquiring device in the claim 26 to 29.
CN2009102356096A 2009-09-30 2009-09-30 Method and device for route maintenance and method and device for route query Active CN101695054B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009102356096A CN101695054B (en) 2009-09-30 2009-09-30 Method and device for route maintenance and method and device for route query

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009102356096A CN101695054B (en) 2009-09-30 2009-09-30 Method and device for route maintenance and method and device for route query

Publications (2)

Publication Number Publication Date
CN101695054A true CN101695054A (en) 2010-04-14
CN101695054B CN101695054B (en) 2012-04-18

Family

ID=42093996

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009102356096A Active CN101695054B (en) 2009-09-30 2009-09-30 Method and device for route maintenance and method and device for route query

Country Status (1)

Country Link
CN (1) CN101695054B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035727A (en) * 2010-11-17 2011-04-27 杭州华三通信技术有限公司 Method and equipment for processing routing
CN102916892A (en) * 2012-11-05 2013-02-06 杭州迪普科技有限公司 Processing method and device for multicast message
CN103581023A (en) * 2013-11-06 2014-02-12 盛科网络(苏州)有限公司 Method and device for realizing longest mask matching
CN105141525A (en) * 2015-06-30 2015-12-09 杭州华三通信技术有限公司 IPv6 routing lookup method and IPv6 routing lookup device
CN107682266A (en) * 2017-09-12 2018-02-09 杭州迪普科技股份有限公司 Matching process and device, the computer-readable recording medium of flow table item
CN108089696A (en) * 2016-11-08 2018-05-29 罗克韦尔自动化技术公司 For the virtual reality and augmented reality of industrial automation
CN111131049A (en) * 2019-12-31 2020-05-08 盛科网络(苏州)有限公司 Method and device for processing routing table entry
CN111291058A (en) * 2020-03-17 2020-06-16 芯启源(南京)半导体科技有限公司 Method for optimizing storage LPM (low power management) rule based on hierarchical pc-trie structure
CN115622934A (en) * 2022-10-09 2023-01-17 苏州盛科通信股份有限公司 Routing information storage method, device, network equipment and readable storage medium
CN117349483A (en) * 2023-12-05 2024-01-05 杭州行芯科技有限公司 Parasitic parameter searching method and device, electronic equipment and storage medium
CN117997834A (en) * 2024-04-03 2024-05-07 格创通信(浙江)有限公司 Lookup table updating and table item searching methods, device, network equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1571301A (en) * 2003-07-16 2005-01-26 深圳市中兴通讯股份有限公司 Apparatus and method for implementing parallel optimized signal receiving via route display in optical network

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035727B (en) * 2010-11-17 2013-01-09 杭州华三通信技术有限公司 Method and equipment for processing routing
CN102035727A (en) * 2010-11-17 2011-04-27 杭州华三通信技术有限公司 Method and equipment for processing routing
CN102916892A (en) * 2012-11-05 2013-02-06 杭州迪普科技有限公司 Processing method and device for multicast message
CN103581023A (en) * 2013-11-06 2014-02-12 盛科网络(苏州)有限公司 Method and device for realizing longest mask matching
CN105141525A (en) * 2015-06-30 2015-12-09 杭州华三通信技术有限公司 IPv6 routing lookup method and IPv6 routing lookup device
CN105141525B (en) * 2015-06-30 2018-08-10 新华三技术有限公司 IPv6 method for searching route and device
CN108089696B (en) * 2016-11-08 2021-01-08 罗克韦尔自动化技术公司 Virtual reality and augmented reality for industrial automation
CN108089696A (en) * 2016-11-08 2018-05-29 罗克韦尔自动化技术公司 For the virtual reality and augmented reality of industrial automation
CN107682266A (en) * 2017-09-12 2018-02-09 杭州迪普科技股份有限公司 Matching process and device, the computer-readable recording medium of flow table item
CN111131049A (en) * 2019-12-31 2020-05-08 盛科网络(苏州)有限公司 Method and device for processing routing table entry
CN111131049B (en) * 2019-12-31 2021-08-27 苏州盛科通信股份有限公司 Method and device for processing routing table entry
CN111291058A (en) * 2020-03-17 2020-06-16 芯启源(南京)半导体科技有限公司 Method for optimizing storage LPM (low power management) rule based on hierarchical pc-trie structure
CN111291058B (en) * 2020-03-17 2023-06-16 芯启源(南京)半导体科技有限公司 LPM rule storage method based on layered pc-trie structure
CN115622934A (en) * 2022-10-09 2023-01-17 苏州盛科通信股份有限公司 Routing information storage method, device, network equipment and readable storage medium
CN117349483A (en) * 2023-12-05 2024-01-05 杭州行芯科技有限公司 Parasitic parameter searching method and device, electronic equipment and storage medium
CN117349483B (en) * 2023-12-05 2024-04-09 杭州行芯科技有限公司 Parasitic parameter searching method and device, electronic equipment and storage medium
CN117997834A (en) * 2024-04-03 2024-05-07 格创通信(浙江)有限公司 Lookup table updating and table item searching methods, device, network equipment and medium

Also Published As

Publication number Publication date
CN101695054B (en) 2012-04-18

Similar Documents

Publication Publication Date Title
CN101695054B (en) Method and device for route maintenance and method and device for route query
CN101594319B (en) Entry lookup method and entry lookup device
CN104462549B (en) A kind of data processing method and device
KR100441317B1 (en) Method and apparatus for classifying data packets
CN1135787C (en) Method for transmitting data packets to a plurality of receivers in a heterogeneous communications network
CN102035735A (en) Device and method for providing forwarding and qos information
US10554555B2 (en) Hash-based overlay routing architecture for information centric networks
CN101631086B (en) Routing list partitioning and placing method searched by parallel IP route
CN102158421B (en) Method and unit for creating layer three interface
CN101388030A (en) Database and database processing methods
JP6195014B2 (en) COMMUNICATION SYSTEM, COMMUNICATION METHOD, RELAY DEVICE, AND COMMUNICATION PROGRAM
CN107707474B (en) Route distribution method and system
US8724514B2 (en) Method and a device for controlling advertising of routing data
US9485179B2 (en) Apparatus and method for scalable and flexible table search in a network switch
CN104009921A (en) Data message forwarding method based on any field matching
CN106453091B (en) The equivalent route management method and device of router Forwarding plane
US9628368B2 (en) Method and apparatus for compressing content name
CN103457855B (en) Classless inter-domain routing table is established and the method and apparatus of message forwarding
CN106656816B (en) Distributed ipv6 method for searching route and system
CN103581023A (en) Method and device for realizing longest mask matching
CN115865844B (en) Virtual-real combined dynamic flow scheduling method and device based on SDN (software defined network) and NDN (non-dynamic network)
CN105207904A (en) Message processing method, device and router
CN104301227B (en) High-speed low-power-consumption IP route table lookup method based on TCAM
CN103209128B (en) The simultaneously data forwarding method of supported data report and virtual circuit services and router
CN103999435B (en) For the apparatus and method of efficient network address translation and ALG process

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: Huasan Communication Technology Co., Ltd.

CP03 Change of name, title or address