CN102291472A - Network address lookup method and device - Google Patents
Network address lookup method and device Download PDFInfo
- Publication number
- CN102291472A CN102291472A CN2011102681719A CN201110268171A CN102291472A CN 102291472 A CN102291472 A CN 102291472A CN 2011102681719 A CN2011102681719 A CN 2011102681719A CN 201110268171 A CN201110268171 A CN 201110268171A CN 102291472 A CN102291472 A CN 102291472A
- Authority
- CN
- China
- Prior art keywords
- low
- network address
- list item
- address
- sublist
- 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.)
- Pending
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention provides a network address lookup method. The method comprises the following steps of: looking up a first high M entry in a high M table, wherein the first high M entry comprises a high M bit address of a first network address, M is a natural number, the first network address is in X bit and X is a natural number; if the first high M entry is looked up in the high M table, judging whether a subtable corresponding to the first high M entry is contained in a low N table or not, wherein N is a natural number; and if the subtable is contained in the low N table, looking up a low N entry corresponding to the first network address in the low N table, wherein the low N entry contains the low N bit of the first network address and X is the sum of M and N. By using the network address lookup method and device provided by the embodiment of the invention, problems that a plurality of network addresses are stored in one table and more storage spaces are occupied because the high bit of each network address occupies a certain storage space while the high bits of multiple network addresses are the same can be solved.
Description
Technical field
The embodiment of the invention relates to the communication technology, relates in particular to a kind of network address lookup method and device.
Background technology
In the communications field, before router is transmitted message, need in route forwarding table, search list item with matching destination address according to the destination address of message.Thereby determine the next hop address of this message.Longest prefix match (the longest prefix match) is the mode of searching comparatively commonly used.
Realize in the multiple mode of longest-prefix length coupling that (Ternary Content Addressable Memory TCAM) is a kind of common method to use Ternary Content Addressable Memory.The memory cell of TCAM is except " 0 " and " 1 " two states, also have and a kind ofly be indifferent to (don ' t care) state.Being indifferent to state both showed and can also can be " 1 " for " 0 ".
The inventor finds that there is following technical problem in prior art:
The plurality of network address is stored in the table, and when a plurality of network addresss high-order identical, the high position of each network address all needs to take certain memory space, and the memory space that takies is more.
Summary of the invention
The embodiment of the invention provides a kind of network address lookup method and device, can solve the plurality of network address is stored in the table, when a plurality of network addresss high-order identical, the high position of each network address all needs to take certain memory space, the problem that the memory space that takies is more.
On the one hand, a kind of network address lookup method that the embodiment of the invention provides comprises:
Search the first high M list item in high M table, the described first high M list item comprises the high M bit address of first network address, and M is a natural number, and described first network address is the X position, and X is a natural number;
If in described high M table, find the described first high M list item, then judge the sublist that whether comprises the corresponding described first high M list item in the low N table, N is a natural number;
If comprise described sublist in the described low N table, then in described low N table, search the low N list item of corresponding described first network address, described low N list item comprises the low N position of described first network address, X be M and N with.
On the other hand, device is searched in a kind of network address that the embodiment of the invention provides, and comprising:
Search unit and judging unit;
The described unit of searching is used for searching the first high M list item at high M table, the described first high M list item comprises the high M bit address of first network address, M is a natural number, described first network address is the X position, X is a natural number, judged result according to described judging unit, if comprise the sublist of the corresponding described first high M list item in the low N table, then in described low N table, search the low N list item of corresponding described first network address, described low N list item comprises the low N position of described first network address, N is a natural number, X be M and N and;
If described judging unit is used for finding the described first high M list item at described high M table, then judge in the described low N table whether comprise described sublist.
Network address lookup method and device that the embodiment of the invention provides, with the higher memory of plurality of network address in high M table, with the lower memory of this plurality of network address in low N shows.When a plurality of network addresss in this plurality of network address high-order identical, only need to use a list item of high M table to store the high position of these a plurality of network addresss.
As seen, the network address lookup method and the device that provide by the embodiment of the invention, can solve the plurality of network address is stored in the table, when a plurality of network addresss high-order identical, the high position of each network address all needs to take certain memory space, the technical problem that the memory space that takies is more.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do one to the accompanying drawing of required use in embodiment or the description of the Prior Art below introduces simply, apparently, accompanying drawing in describing below is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the network address lookup method flow chart that the embodiment of the invention provides;
Fig. 2 is that the device schematic diagram is searched in the network address that the embodiment of the invention provides.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Embodiment one:
The embodiment of the invention provides a kind of network address lookup method, can be used for to carry out the scene that search the network address, gateway address resolution protocol (Address Resolution Protocol that main frame is sent for example, when ARP) respective response is carried out in request, the network address that need search main frame.Referring to Fig. 1, Fig. 1 is the network address lookup method flow chart that the embodiment of the invention provides, and this method comprises:
101: search the first high M list item in high M table, this first high M list item comprises the high M position of first network address, and M is a natural number, and this first network address is the X position, and X is a natural number.
First network address can be destination address or source address.First network address can be the network address of corresponding specific protocol.Specific protocol can be Internet protocol (Internet Protocol, IP) or medium access control (Media Access Control, MAC) agreement.When first network address was the IP address, the IP address can be Internet Protocol Version 4 (Internet Protocol version 4, IPv4) address, perhaps IPv6 (Internet Protocol version 6, IPv6) address.When first network address was the IPv4 address, first network address was 32 bits.When first network address was the IPv6 address, first network address was 128 bits.First network address can be carried in the message that the network equipment receives.For example the network equipment is received the Internet protocol packets (Internet Protocol Packet, IP grouping), has comprised the IP address in this IP grouping.
High M table can be stored in the network equipment, and this network equipment can be router, switch, fire compartment wall or load equalizer.Specifically, high M table can be stored in the internal memory of this network equipment.When comprising TCAM in this network equipment, high M table also can be stored among the TCAM of this network equipment.This high M table can be used for the high M position of the network address, storing X position.High M table can comprise a list item or a plurality of list item.Under special scenes, utilize the high M bit address of the high M table network address, storing X position can save memory space.Scene with IPv4 is an example, and router receives the route messages of neighbor router issue, has obtained to carry out message and has transmitted required routing information.Routing information can be stored in forwarding information base (Forwarding Information Base, FIB).Routing information among the FIB can comprise several purpose IP addresses of 32.High 16 of a plurality of purpose IP address can be identical in these several IP addresses.For example high 16 of this a plurality of purpose IP address all is the decimal system 192.168.Therefore can represent the high 16 of this a plurality of purpose IP address with a list item in the high M table, thereby save the memory space of this a plurality of purpose IP address.
High M table can comprise the first high M list item, and this first high M list item comprises the high M bit address of this first network address.Scene with IPv6 is an example, when first network address is 128 IPv6 address, can comprise the high 64 of this first network address in the high M table.This moment, the value of M was 64.
102: if find this first high M list item in this high M table, then judge the sublist that whether comprises in the low N table should the first high M list item, N is a natural number.
Low N table is used for the low N position of the network address, storing X position.Low N table can comprise a plurality of list items.Low N table can comprise sublist that should the first high M list item.This sublist is a subclass of this low N table.This sublist can comprise one or more sublist list items.The sublist list item comprises the low N position of the network address, X position that high M position equals the high M position of this first network address.This sublist can comprise the low N position of this first network address, also can not comprise the low N position of this first network address.
Under special scenes, can not comprise this sublist in this low N table.For example, router is learnt first network address by Routing Protocol.This first network address is a new IPv6 address.When the control plane of router gives this first network address under the datum plane of router, can only down give the high 64 of this first network address, i.e. network segment address, that does not give this first network address down hangs down 64.Can not comprise in the low N table that forms by above-mentioned scene sublist that should first network address.
103: if should comprise this sublist in the low N table, then search in this low N table low N list item that should first network address, this low N list item comprises the low N position of this first network address, X be M and N with.
According to the low N bit address of first network address, in low N table, search low N list item.Should hang down the low N position that the N list item comprises this first network address.If find low N list item, then show first network address and high M table and hang down the N table and mate.
Above-mentioned technical scheme of searching first network address can be applied to several scenes.For example, can and hang down the N table and the ARP request that main frame sends be verified high M table as the arp cache table of gateway.When first network address and high M table and when hanging down the N table coupling taking place, show that source IP address is the checking of the message of first network address by the arp cache table of gateway.In addition, can and hang down N and show to transmit high M table as the message that the route forwarding table of router is received router.When first network address and high M table and when hanging down the N table coupling taking place, show that router can be that the IP grouping of first network address is transmitted to destination address according to route forwarding table.
With respect to prior art several network addresss, X position are stored in the table, present embodiment is stored in high M table respectively with the high M position of the network address, X position and low N position and hangs down in the N table.In high M table, only need high M position by identical a plurality of network addresss, high M position in the network address, a list item storing X position.This means the list item that not to have content to repeat in the high M table, reduced the identical required memory space in the network address, a plurality of X position in high M position.Therefore, the network address lookup method that present embodiment provides has solved the plurality of network address has been stored in the table, when a plurality of network addresss high-order identical, the high position of each network address all needs to take certain memory space, the technical problem that the memory space that takies is more.
In addition, in the network address lookup method that present embodiment provides, before in low N table, searching the low N position of first network address, to whether comprising in the low N table sublist that should the first high M list item is judged, avoided when in the low N table during, still in low N table, searched low N list item that should first network address not to sublist that should the first high M list item.Improved search efficiency.
Present embodiment provides the method for a kind of Network Search address, and this lookup method is by searching high M table and hanging down the N table and realize.A kind of specific implementation of this lookup method hereinafter is provided.For ease of understanding, the generative process of hereinafter introducing high M table earlier and hanging down the N table, the search procedure of introducing high M table then and hanging down the N table:
First: high M table and the generative process of hanging down the N table
During the embedded OS initialization of router, can in internal memory, be respectively memory space of index assignment of high 64, low 64 and high 64 bit address of 128 IPv6 address.More than three memory spaces be independent of each other.
Router is learnt first network address according to Routing Protocol, and this first network address is 128 IPv6 address.The CPU of router is by control channel, and for example (Peripheral Component Interconnect Express, PCI-E) bus are issued to this network address and search engine the circumferential component high-speed interconnect.Searching engine can be a chip.
Search the first network of network address that engine receives that router is learnt, high 64 of this first network address are added in the high M table, form the first high M list item.During specific implementation, can be to be high 64 addresses distributed spaces when searching engine with high 64 embedded OS initialization that are written to router of this network address.
Search the index that engine can generate these high 64 bit address at random, and index stores that will these high 64 bit address is the memory space of the index assignment of high 64 bit address during to the embedded OS initialization.The index of high 64 bit address and high 64 bit address is one to one.That is to say that the index of high 64 bit address is different for different high 64 bit address.The index of high 64 bit address can be the binary number of Y bit, and Y is a natural number.
When searching engine and generate the index of these high 64 bit address at random, search first sign that engine can generate this low high M list item.First sign is used for representing whether low M table comprises sublist that should the first high M list item.First sign can be the binary number of a bit.For example can represent not comprise in the low M table to sublist that should the first high M list item with Binary Zero; Can represent to comprise in the low M table to sublist that should the first high M list item with binary one.
Search engine the index of high 64 bit address of this first network address and low 64 of this first network address are added in the low M table, form low N list item.During specific implementation, can be to search to be low 64 bit address addresses distributed spaces when engine is written to the embedded OS initialization of router with low 64 bit address of the index of high 64 bit address of this first network address and this first network address.
Second portion: high M table and the search procedure of hanging down the N table
Router receives that destination address is the message of first network address, and with this message deliver to network processing unit (Network Processor, NP).After NP resolves this message, extract the purpose IP address of this message, i.e. first network address.NP is sent to high 128 of this first network address to search engine.Search engine and in high M table, search the high 64 of this first network address.If search engine finds high 64 bit address that comprise this first network address in high M table list item, promptly the first high M list item is searched engine is read these high 64 bit address from the internal memory of router index, and index that will these high 64 bit address is sent to NP.
When searching engine and read the index of these high 64 bit address, search first sign that engine can be read these high 64 bit address, and this first sign is sent to NP.First sign is used for representing whether low M table comprises sublist that should the first high M list item.First sign can be the binary number of a bit.For example represent not comprise in low 64 tables to sublist that should first high 64 list items with Binary Zero; Represent to comprise in low 64 tables to sublist that should first high 64 list items with binary one.
When first sign shows that these high 64 bit address have corresponding low 64 bit address, the hanging down 64 and be sent to and search engine of the index that NP will this high 64 bit address and this first network address.Searching engine is key assignments (key) with the index of these high 64 bit address and low 64 of this first network address, searches the list item that whether exists with this key coupling in low M table.When flag bit shows that when not comprising sublist that should the first high M list item in the low M table, NP no longer initiates to search.
Searching engine is key with the index of these high 64 bit address and low 64 bit address of this first network address, searches the list item that mates with this key in low 64 tables, promptly low N list item.In low M table, find this low N list item if search engine, search the index that engine can be read these low 64 bit address, and the index that will hang down 64 bit address is sent to NP.NP can be according to the index of these low 64 bit address, and the destination address of receiving for router is that the message of first network address is determined the physics outgoing interface transmitted.
Optionally,
If should not comprise this sublist in the low N table, then in this low N table, do not search this low N list item.
Optionally,
Whether comprise in the low N table of this judgement sublist that should the first high M list item specifically comprised:
Judge whether to comprise this sublist in the low N table according to first sign of this first high M list item.
Optionally,
The low N list item that should search corresponding first network address in this low N table specifically comprises:
With the index of this first high M list item and the low N position of this first network address is key, searches this low N list item in this low N table, and this low N list item comprises the index of this first high M list item.
Optionally,
The high M bit address of this first network address and/or low N bit address are stored in this high M table and/or this low N table with the form of binary tree.
Embodiment two:
The embodiment of the invention provides a kind of network address to search device, can be used for carrying out the scene that search the network address, and when for example respective response is carried out in gateway ARP request that main frame is sent, the network address that need search main frame.Referring to Fig. 2, Fig. 2 is that the device schematic diagram is searched in the network address that the embodiment of the invention provides, and this device comprises searches unit 201 and judging unit 202:
This is searched unit 201 and is used for searching the first high M list item at high M table, this first high M list item comprises the high M bit address of first network address, M is a natural number, and this first network address is the X position, and X is a natural number, judged result according to this judging unit, if comprise in the low N table to sublist that should the first high M list item, then in this low N table, to search low N list item that should first network address, this low N list item comprises the low N position of this first network address, N is a natural number, X be M and N and.
First network address can be destination address or source address.First network address can be the network address of corresponding specific protocol.Specific protocol can be IP or MAC agreement.When first network address was the IP address, the IP address can be the IPv4 address, perhaps the IPv6 address.When first network address was the IPv4 address, first network address was 32 bits.When first network address was the IPv6 address, first network address was 128 bits.First network address can be carried in the message that the network equipment receives.For example the network equipment is received the IP grouping, has comprised the IP address in this IP grouping.
High M table can be stored in the network equipment, and this network equipment can be router, switch, fire compartment wall or load equalizer.Specifically, high M table can be stored in the internal memory of this network equipment.When comprising TCAM in this network equipment, high M table also can be stored among the TCAM of this network equipment.This high M table can be used for the high M position of the network address, storing X position.High M table can comprise a list item or a plurality of list item.Under special scenes, utilize the high M bit address of the high M table network address, storing X position can save memory space.Scene with IPv4 is an example, and router has obtained to carry out message and transmitted required routing information by receiving the route messages of neighbor router issue.Routing information can be stored in FIB.Routing information among the FIB can comprise several purpose IP addresses of 32.High 16 of a plurality of purpose IP address can be identical in these several IP addresses.For example high 16 of this a plurality of purpose IP address all is the decimal system 192.168.Therefore can represent the high 16 of this a plurality of purpose IP address by a list item in the high M table, thereby save the memory space of this a plurality of purpose IP address.
High M table can comprise the first high M list item, and this first high M list item comprises the high M bit address of this first network address.Scene with IPv6 is an example, when first network address is 128 IPv6 address, can comprise the high 64 of this first network address in the high M table.This moment, the value of M was 64.
According to the low N bit address of first network address, in low N table, search low N list item.Should hang down the low N position that the N list item comprises this first network address.If find low N list item, then show first network address and high M table and hang down the N table and mate.
If this judging unit 202 is used for finding this first high M list item at this high M table, then judge whether to comprise this sublist in the low N table.
Low N table is used for the low N position of the network address, storing X position.Low N table can comprise a plurality of list items.Low N table can comprise sublist that should the first high M list item.This sublist is a subclass of this low N table.This sublist can comprise one or more sublist list items.The sublist list item comprises the low N position of the network address, X position that high M position equals the high M position of this first network address.This sublist may comprise the low N position of this first network address, also may not comprise the low N position of this first network address.
Under special scenes, can not comprise this sublist in this low N table.For example, router is learnt first network address by Routing Protocol.This first network address is a new IPv6 address.When the control plane of router gives this first network address under the datum plane of router, can only down give the high 64 of this first network address, i.e. network segment address, that does not give this first network address down hangs down 64.Can not comprise in the low N table that forms by above-mentioned scene sublist that should first network address.
Above-mentioned technical scheme of searching first network address can be applied to several scenes.For example, can and hang down the N table and the ARP request that main frame sends be verified high M table as the arp cache table of gateway.When first network address and high M table and when hanging down the N table coupling taking place, show that source IP address is the checking of the message of first network address by the arp cache table of gateway.In addition, can and hang down N and show to transmit high M table as the message that the route forwarding table of router is received router.When first network address and high M table and when hanging down the N table coupling taking place, show that router can be that the IP grouping of first network address is transmitted to destination address according to route forwarding table.
With respect to prior art several network addresss, X position are stored in the table, present embodiment is stored in high M table respectively with the high M position of the network address, X position and low N position and hangs down in the N table.In high M table, only need high M position by identical a plurality of network addresss, high M position in the network address, a list item storing X position.This means the list item that can not repeat in the high M table, reduced the identical required memory space in the network address, a plurality of X position in high M position.Therefore, the network address that present embodiment provides has been searched device solves the plurality of network address has been stored in the table, when a plurality of network addresss high-order identical, the high position of each network address all needs to take certain memory space, the technical problem that the memory space that takies is more.
In addition, search in the device network address that present embodiment provides, before in low N table, searching the low N position of first network address, to whether comprising in the low N table sublist that should the first high M list item is judged, avoided when in the low N table during, still in low N table, searched low N list item that should first network address not to sublist that should the first high M list item.Improved search efficiency.
Present embodiment provides the device of a kind of Network Search address, and this searches device by searching high M table and hanging down the N table and realize.Hereinafter provide this to search a kind of specific implementation of device.For ease of understanding, the generative process of hereinafter introducing high M table earlier and hanging down the N table, the search procedure of introducing high M table then and hanging down the N table:
First: high M table and the generative process of hanging down the N table
During the embedded OS initialization of router, can in internal memory, be respectively memory space of index assignment of high 64, low 64 and high 64 bit address of 128 IPv6 address.More than three memory spaces be independent of each other.
Router is learnt first network address according to Routing Protocol, and this first network address is 128 IPv6 address.The CPU of router is by control channel, and PCI-E bus for example is issued to this network address and searches engine.Searching engine can be a chip.
Search the first network of network address that engine receives that router is learnt, high 64 of this first network address are added in the high M table, form the first high M list item.During specific implementation, can be to be high 64 addresses distributed spaces when searching engine with high 64 embedded OS initialization that are written to router of this network address.
Search the index that engine can generate these high 64 bit address at random, and index stores that will these high 64 bit address is the memory space of the index assignment of high 64 bit address during to the embedded OS initialization.The index of high 64 bit address and high 64 bit address is one to one.That is to say that the index of high 64 bit address is different for different high 64 bit address.The index of high 64 bit address can be the binary number of Y bit, and Y is a natural number.
When searching engine and generate the index of these high 64 bit address at random, search first sign that engine can generate this low high M list item.First sign is used for representing whether low M table comprises sublist that should the first high M list item.First sign can be the binary number of a bit.For example can represent not comprise in the low M table to sublist that should the first high M list item with Binary Zero; Can represent to comprise in the low M table to sublist that should the first high M list item with binary one.
Search engine the index of high 64 bit address of this first network address and low 64 of this first network address are added in the low M table, form low N list item.During specific implementation, can be to search to be low 64 bit address addresses distributed spaces when engine is written to the embedded OS initialization of router with low 64 bit address of the index of high 64 bit address of this first network address and this first network address.
Second portion: high M table and the search procedure of hanging down the N table
Router receives that destination address is the message of first network address, and this message is delivered to NP.After NP resolves this message, extract the purpose IP address of this message, i.e. first network address.NP is sent to high 128 of this first network address to search engine.Search engine and in high M table, search the high 64 of this first network address.If search engine finds high 64 bit address that comprise this first network address in high M table list item, promptly the first high M list item is searched engine is read these high 64 bit address from the internal memory of router index, and index that will these high 64 bit address is sent to NP.
When searching engine and read the index of these high 64 bit address, search first sign that engine can be read these high 64 bit address, and this first sign is sent to NP.First sign is used for representing whether low M table comprises sublist that should the first high M list item.First sign can be the binary number of a bit.For example represent not comprise in low 64 tables to sublist that should first high 64 list items with Binary Zero; Represent to comprise in low 64 tables to sublist that should first high 64 list items with binary one.
When first sign shows that these high 64 bit address have corresponding low 64 bit address, the hanging down 64 and be sent to and search engine of the index that NP will this high 64 bit address and this first network address.Searching engine is key with the index of these high 64 bit address and low 64 of this first network address, searches the list item that whether exists with this key coupling in low M table.When flag bit shows that when not comprising sublist that should the first high M list item in the low M table, NP no longer initiates to search.
Searching engine is key with the index of these high 64 bit address and low 64 bit address of this first network address, searches the list item that mates with this key in low 64 tables, promptly low N list item.In low M table, find this low N list item if search engine, search the index that engine can be read these low 64 bit address, and the index that will hang down 64 bit address is sent to NP.NP can be according to the index of these low 64 bit address, and the destination address of receiving for router is that the message of first network address is determined the physics outgoing interface transmitted.
Optionally,
This is searched the unit and is further used for, if should not comprise this sublist in the low N table, does not then search this low N list item in this low N table.
Optionally,
This judging unit specifically is used for, and judges whether to comprise this sublist in the low N table according to first sign of this first high M list item.
Optionally,
This is searched the unit and specifically is used for, and is key with the index of this first high M list item and the low N position of this first network address, searches this low N list item in this low N table, and this low N list item comprises the index of this first high M list item.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforementioned program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (9)
1. network address lookup method is characterized in that:
Search the first high M list item in high M table, the described first high M list item comprises the high M position of first network address, and M is a natural number, and described first network address is the X position, and X is a natural number;
If in described high M table, find the described first high M list item, then judge the sublist that whether comprises the corresponding described first high M list item in the low N table, N is a natural number;
If comprise described sublist in the described low N table, then in described low N table, search the low N list item of corresponding described first network address, described low N list item comprises the low N position of described first network address, X be M and N with.
2. according to the described method of claim 1, it is characterized in that:
If do not comprise described sublist in the described low N table, then do not search described low N list item.
3. according to claim 1 or 2 described methods, it is characterized in that:
The sublist that whether comprises the corresponding described first high M list item in the low N table of described judgement specifically comprises:
Judge in the described low N table whether comprise described sublist according to first sign of the described first high M list item.
4. according to the described method of the arbitrary claim of claim 1 to 3, it is characterized in that:
The described low N list item of searching corresponding described first network address in described low N table specifically comprises:
With the index of the described first high M list item and the low N position of described first network address is key assignments key, searches described low N list item in described low N table, and described low N list item comprises the index of the described first high M list item.
5. according to the described method of the arbitrary claim of claim 1 to 4, it is characterized in that:
The high M position of described first network address and/or low N position are stored in described high M table and/or the described low N table with the form of binary tree.
6. device is searched in a network address, it is characterized in that, comprising:
Search unit and judging unit;
The described unit of searching is used for searching the first high M list item at high M table, the described first high M list item comprises the high M position of first network address, M is a natural number, described first network address is the X position, X is a natural number, judged result according to described judging unit, if comprise the sublist of the corresponding described first high M list item in the low N table, then in described low N table, search the low N list item of corresponding described first network address, described low N list item comprises the low N position of described first network address, N is a natural number, X be M and N and;
If described judging unit is used for finding the described first high M list item at described high M table, then judge in the described low N table whether comprise described sublist.
7. according to the described device of claim 6, it is characterized in that:
The described unit of searching is further used for, if do not comprise described sublist in the described low N table, does not then search described low N list item.
8. according to claim 6 or 7 described devices, it is characterized in that:
Described judging unit specifically is used for, and judges in the described low N table whether comprise described sublist according to first sign of the described first high M list item.
9. according to the described device of the arbitrary claim of claim 6 to 8, it is characterized in that:
The described unit of searching specifically is used for, and is key with the index of the described first high M list item and the low N position of described first network address, searches described low N list item in described low N table, and described low N list item comprises the index of the described first high M list item.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102681719A CN102291472A (en) | 2011-09-09 | 2011-09-09 | Network address lookup method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102681719A CN102291472A (en) | 2011-09-09 | 2011-09-09 | Network address lookup method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102291472A true CN102291472A (en) | 2011-12-21 |
Family
ID=45337572
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011102681719A Pending CN102291472A (en) | 2011-09-09 | 2011-09-09 | Network address lookup method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102291472A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102739520A (en) * | 2012-05-31 | 2012-10-17 | 华为技术有限公司 | Checking method and checking device |
CN103034602A (en) * | 2012-12-06 | 2013-04-10 | 华为技术有限公司 | Content searching chip based on interconnecting bus of periphery part and system |
CN103309950A (en) * | 2013-05-22 | 2013-09-18 | 苏州雄立科技有限公司 | Searching method for key value |
CN103473237A (en) * | 2012-06-08 | 2013-12-25 | 苏州雄立科技有限公司 | Key value grouping method |
CN103514404A (en) * | 2012-06-29 | 2014-01-15 | 网秦无限(北京)科技有限公司 | Safety detection method and safety detection device |
CN104184732A (en) * | 2014-08-25 | 2014-12-03 | 浪潮集团有限公司 | Hardware implementation method for matching IP address with IP range strategy |
CN104539537A (en) * | 2014-12-25 | 2015-04-22 | 北京华为数字技术有限公司 | Routing lookup method and device |
CN106416150A (en) * | 2015-05-07 | 2017-02-15 | 华为技术有限公司 | Route query method and network device |
CN113660160A (en) * | 2021-08-20 | 2021-11-16 | 烽火通信科技股份有限公司 | UCMP load sharing method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1710879A (en) * | 2004-06-17 | 2005-12-21 | 株式会社日立制作所 | Packet forwarding device |
US7630373B2 (en) * | 2005-05-06 | 2009-12-08 | Hitachi, Ltd. | Packet transfer apparatus |
CN102164080A (en) * | 2011-03-29 | 2011-08-24 | 华为技术有限公司 | Routing address inquiry method and device |
-
2011
- 2011-09-09 CN CN2011102681719A patent/CN102291472A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1710879A (en) * | 2004-06-17 | 2005-12-21 | 株式会社日立制作所 | Packet forwarding device |
US7630373B2 (en) * | 2005-05-06 | 2009-12-08 | Hitachi, Ltd. | Packet transfer apparatus |
CN102164080A (en) * | 2011-03-29 | 2011-08-24 | 华为技术有限公司 | Routing address inquiry method and device |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102739520A (en) * | 2012-05-31 | 2012-10-17 | 华为技术有限公司 | Checking method and checking device |
CN102739520B (en) * | 2012-05-31 | 2015-03-18 | 华为技术有限公司 | Checking method and checking device |
CN103473237A (en) * | 2012-06-08 | 2013-12-25 | 苏州雄立科技有限公司 | Key value grouping method |
CN103514404A (en) * | 2012-06-29 | 2014-01-15 | 网秦无限(北京)科技有限公司 | Safety detection method and safety detection device |
CN103034602B (en) * | 2012-12-06 | 2015-11-25 | 华为技术有限公司 | A kind of content search chip based on peripheral component interconnect bus and system |
WO2014086219A1 (en) * | 2012-12-06 | 2014-06-12 | 华为技术有限公司 | Content searching chip and system based on peripheral component interconnect bus |
CN103034602A (en) * | 2012-12-06 | 2013-04-10 | 华为技术有限公司 | Content searching chip based on interconnecting bus of periphery part and system |
US9342629B2 (en) | 2012-12-06 | 2016-05-17 | Huawei Technologies Co., Ltd. | Content searching chip based protocol conversion |
CN103309950A (en) * | 2013-05-22 | 2013-09-18 | 苏州雄立科技有限公司 | Searching method for key value |
CN104184732A (en) * | 2014-08-25 | 2014-12-03 | 浪潮集团有限公司 | Hardware implementation method for matching IP address with IP range strategy |
CN104539537A (en) * | 2014-12-25 | 2015-04-22 | 北京华为数字技术有限公司 | Routing lookup method and device |
CN104539537B (en) * | 2014-12-25 | 2018-04-20 | 北京华为数字技术有限公司 | A kind of method for searching route and device |
CN106416150A (en) * | 2015-05-07 | 2017-02-15 | 华为技术有限公司 | Route query method and network device |
CN106416150B (en) * | 2015-05-07 | 2020-01-10 | 华为技术有限公司 | Route query method and network equipment |
CN113660160A (en) * | 2021-08-20 | 2021-11-16 | 烽火通信科技股份有限公司 | UCMP load sharing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102291472A (en) | Network address lookup method and device | |
US8312066B2 (en) | Hash collision resolution with key compression in a MAC forwarding data structure | |
JP4742167B2 (en) | Method for performing a table lookup operation using a table index that exceeds the CAM key size | |
US10608866B2 (en) | Forwarding Ethernet packets | |
CN101834802B (en) | Method and device for forwarding data packet | |
US10333845B2 (en) | Forwarding data packets | |
US7706375B2 (en) | System and method of fast adaptive TCAM sorting for IP longest prefix matching | |
US11012258B2 (en) | Packet transmission | |
US8923298B2 (en) | Optimized trie-based address lookup | |
CN110505621B (en) | Terminal migration processing method and device | |
EP3280104B1 (en) | Ip routing lookup | |
CN103581022A (en) | MAC address finding and transmitting method and device | |
CN107547407A (en) | Message transmitting method, device and realization device | |
US9654397B2 (en) | Method for looking up data in hash tables and associated network device | |
CN103825824A (en) | Message processing method and message processing device | |
CN102325077B (en) | Communication method among branches and egress routers of branches | |
WO2006063217A1 (en) | Maskable content addressable memory | |
CN102164080B (en) | Routing address inquiry method and device | |
US20130077530A1 (en) | Scaling IPv6 on Multiple Devices Virtual Switching System with Port or Device Level Aggregation | |
CN104994186A (en) | Query method, processor and device of media access control address | |
US20130177019A1 (en) | Scaling ipv4 at large datacenters with device level aggregation | |
CN107204926B (en) | Rapid route searching method for preprocessing cache | |
CN101494603B (en) | Paralleling high-speed route addressing method for 128 bits Internet address | |
US10216535B2 (en) | Efficient MAC address storage for virtual machine applications | |
CN113079076B (en) | Message forwarding method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C53 | Correction of patent of invention or patent application | ||
CB02 | Change of applicant information |
Address after: 100085 Beijing, Haidian District on the road, No. 3 Applicant after: Beijing Huawei Digital Technology Co.,Ltd. Address before: 100085 Beijing, Haidian District on the road, No. 3 Applicant before: Huawei Digit Technology Co., Ltd. |
|
COR | Change of bibliographic data |
Free format text: CORRECT: APPLICANT; FROM: HUAWEI DIGIT TECHNOLOGY CO., LTD. TO: BEIJING HUAWEI DIGITAL TECHNOLOGY CO., LTD. |
|
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20111221 |