Memory based method for searching quickly the longest matching of IP address

An IP address and the longest matching technology, applied in the field of data communication, can solve problems such as slow search speed, fast positioning, work impact, etc., and achieve the effect of simple method and improved efficiency

Inactive Publication Date: 2007-09-26
上海复娱文化传播股份有限公司
View PDF0 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

At present, the user initiates a request to the system redirector, and the redirector matches the IP address of the user who initiated the request with thousands of IP segments that have been pre-entered in the system according to the longest matching method one by one, and obtains the IP address of the user. region, and redirect the user's request to the server closest to the user according to the region where the user is located. Since all users will initiate a request to the redirector, the search speed is slow by sequential search, so that it cannot be quickly located. , Efficiently respond to user requests and have an impact on work

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Memory based method for searching quickly the longest matching of IP address
  • Memory based method for searching quickly the longest matching of IP address
  • Memory based method for searching quickly the longest matching of IP address

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0030] As shown in Figure 1, for loading the IP address library into the internal memory, the data structure schematic diagram, described a kind of memory-based IP address longest matching quick search method, its operation steps are:

[0031] The data structure definition of "the first table"

name

type

Meaning

pointer type tag

Bool

true indicates that the "subordinate table pointer" points to the "MASK bucket

direction chart",

False means that the "subordinate table pointer" points to the second paragraph

surface"

subordinate table pointer

Void*

Pointer to the next level table, if it is empty, it means there is no

There is this routing entry.

The data structure definition of the "second table"

name

type

Meaning

subordinate table pointer

void*

Pointer to the next level table, if it is empty, it means there is no

There is this routing...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The related fast lookup method based on memory IP address longest match comprises: first, classifying the IP address into the A and B type, building index tree with 8-bit as one segment, setting A-type address as one layer, and B-type address as two layers; to the bottom layer, building a MASK bucket index every connecting an IP sequence table for storing the final IP item; when looking up, deciding the coming IP address as A- or B-type; for A type, according to the obtained MASK bucket index, using bisection way for matching from the 32-bit MASK IP table till finding out or failure; for B type, leading into the second segment table, locating in the second segment table by inferior 8-bit of IP address, then leading into the MASK bucket index as the A type. This invention is high efficient and fast.

Description

technical field [0001] The invention relates to a memory-based method for quickly searching the longest IP address matching, which can realize IP route searching, software firewall rule table searching, IP table searching of an IP-based load balancing system, and belongs to the field of data communication. Background technique [0002] In an IP-based load balancing system, it is often necessary to determine the region where the user is located based on the IP address of the requesting user, and redirect the user's request to the server closest to the user to provide services for the user according to the region where the user is located. . [0003] For example, streaming services for the whole province or all over the country need to use this method to provide users with nearby services in order to improve service quality. At present, the user initiates a request to the system redirector, and the redirector matches the IP address of the user who initiated the request with t...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): H04L12/56H04L29/06G06F17/30H04L45/748
Inventor 王磊
Owner 上海复娱文化传播股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products