WO2020073988A1 - 一种路由表项生成方法、字典树生成方法和装置 - Google Patents

一种路由表项生成方法、字典树生成方法和装置 Download PDF

Info

Publication number
WO2020073988A1
WO2020073988A1 PCT/CN2019/110624 CN2019110624W WO2020073988A1 WO 2020073988 A1 WO2020073988 A1 WO 2020073988A1 CN 2019110624 W CN2019110624 W CN 2019110624W WO 2020073988 A1 WO2020073988 A1 WO 2020073988A1
Authority
WO
WIPO (PCT)
Prior art keywords
routing table
route
table entries
routes
destination address
Prior art date
Application number
PCT/CN2019/110624
Other languages
English (en)
French (fr)
Inventor
路小刚
高红亮
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP19871722.5A priority Critical patent/EP3737050A4/en
Publication of WO2020073988A1 publication Critical patent/WO2020073988A1/zh
Priority to US16/989,578 priority patent/US11627072B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/42Centralised routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/48Routing tree calculation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric

Definitions

  • the present application relates to the communication field, and in particular, to a routing table entry generation method, dictionary tree generation method and device.
  • Network devices such as routers and switches can support Internet Protocol (IP) routing and forwarding functions.
  • Network equipment usually includes a main control board and multiple interface boards.
  • the main control board mainly manages the network and is used to generate a routing information table (Routing Information Base (RIB) and a forwarding information base (Forwarding Information Base (FIB) table.
  • the generated FIB table of the main control board is delivered to the hardware chip in each interface board, and each interface board is used to forward the IP message to the FIB table issued by the main control board.
  • the existing main control board sends the FIB table to the interface board
  • the entire FIB table in the main control board is sent to each interface board.
  • the interface board receives the IP packet, it will look in the FIB table The routing entry that matches the destination address of the IP packet, and forwards the IP packet based on the matching routing entry.
  • the routing table entries learned by the main control board occupy a maximum of 4M of storage space, that is, store 4 million routes, where each route corresponds to a routing table entry, and each routing table entry includes: destination address and mask, download One-hop address, forwarding information shape description, forwarding outgoing interface, etc.
  • an embodiment of the present application provides a routing table entry generation method.
  • the method includes: a server obtains M first routing table entries, and each of the first routing table entries includes: one route and one out Correspondence between interfaces, and M ⁇ 2, M is an integer; the M first routing table entries are combined to generate N second routing table entries, at least some of the N second routing table entries A second routing table entry includes a correspondence between a public route and an outgoing interface.
  • the public route is used to indicate two or more routes, and N ⁇ M, where N is an integer.
  • N second routing table entries are generated by combining M first routing table entries, wherein at least one of the N second routing table entries includes a public route, and the public route At least two routes of M first routing table entries can be replaced, thereby greatly reducing the number of first routing table entries, thereby saving storage space of routing table entries, and the saved storage space can be used to save more Routing table entries to meet the needs of the market's large capacity.
  • the route in the first routing entry includes a destination address and a mask corresponding to the destination address, and the destination address of the route and The masks are all binary numbers; combining the M first routing table entries to generate N second routing table entries includes: obtaining each destination address of each route in the M first routing table entries The corresponding bits; according to the route set corresponding to the outbound interface with the largest number of routes and the bits corresponding to the destination addresses of each route, the M first routing entries are combined to generate The N second routing table entries.
  • the route set corresponding to the outbound interface with the largest number of routes and the destination address corresponding to each route includes:
  • dividing the multi-dimensional space volume until the first condition is satisfied, generating multiple low-dimensional space volumes includes: determining the multi-dimensional space volume The first plane of the dimensional space, where the first plane contains the most routes for the same outgoing interface; according to the bits of the destination address of each route of the same outgoing interface in the first plane, the multi-dimensional The space body is segmented to form a first space body and a second space body; whether the first space body and the second space body both satisfy the first condition is judged separately; if both are satisfied, the segmentation is stopped,
  • the plurality of low-dimensional space bodies are the first space body and the second space body.
  • the method further includes: if neither of the first conditions is satisfied, continue to the first space body and the second space body Performing segmentation until the space bodies generated after the segmentation meet the first condition, and generating the plurality of low-dimensional space bodies according to all the space bodies obtained after the segmentation;
  • the space volume that does not satisfy the first condition is segmented until the first condition is satisfied, to obtain the multiple low-dimensional spaces body.
  • an embodiment of the present application provides a dictionary tree generation method.
  • the method includes: acquiring N second routing table entries, at least one of the N second routing table entries, including: a public route Correspondence between an outgoing interface, the public route is used to indicate two or more routes, the N second routing table entries are generated by M first routing table entries, M ⁇ 2, and N ⁇ M, N and M are integers; wherein, each route in the first routing table entry includes a destination address and a mask corresponding to the destination address, and the destination address and mask of each of the routes
  • the codes are all binary numbers;
  • the method further includes: acquiring at least one indication information generated when the N second routing table entries are generated by the M first routing table entries; and based on the N routing locations of the N second routing table entries The included destination address, and, the at least one instruction information generates a dictionary tree, the dictionary tree includes: a root node, at least one branch connected to the root node, each of the branches is composed of multiple leaf nodes And the root node and at least one leaf node are provided with the indication information, and the indication information is used to indicate the bit corresponding to the destination address of the next layer branch of the node where the node is located.
  • a dictionary tree is generated according to the destination addresses included in the N routes of the N second routing entries, and the at least one instruction information, Including: determining the bit corresponding to each character in the destination address according to the destination address included in the N routes; configuring the indication information for indicating the bit corresponding to each character in , Indicating the leaf tree or root node of the branch of the upper layer of the destination address character to generate the dictionary tree.
  • the method provided in this aspect generates a dictionary tree formed by routing entries that include public routes. Compared with the original dictionary tree, the dictionary tree branches are reduced, and the number of nodes in the dictionary tree is reduced. The outgoing interface of the route can be quickly found without using off-chip memory, which reduces the forwarding delay.
  • an embodiment of the present application provides a routing table entry generation device, which is used to implement the above-mentioned first aspect and a routing table entry generation method in various implementation manners of the first aspect.
  • the device includes at least one functional unit or module.
  • the at least one functional unit is an acquiring unit, a generating unit, and the like.
  • the device may be a server or a main control board.
  • an embodiment of the present application provides a dictionary tree generation apparatus, which is used to implement the above-mentioned second aspect and the dictionary tree generation method in various implementation manners of the second aspect.
  • the device includes at least one functional unit or module.
  • the at least one functional unit is an acquiring unit, a generating unit, and the like.
  • the device may be a line card box or an interface board.
  • an embodiment of the present application further provides a routing table entry query method, which is used to query an outbound interface of a route among N second routing table entries.
  • the method includes: acquiring at least one route , Each of the routes is represented by binary characters; the binary characters of each route are searched step by step according to the instructions of each node configured in the dictionary tree, until all the binary characters in the route are traversed, and find out The last binary character; determine the outgoing interface of the current route according to the outgoing interface associated with the last character of the search, where the binary character is "0" or "1".
  • the method provided in this aspect compares each character of the route with the indication information configured by the root node or the leaf node in the dictionary tree according to the dictionary tree constructed using bits during each space segmentation, for example, the root node of the dictionary tree stores
  • the instruction information is the nth bit
  • the nth bit character of the search route should be used to compare with the information of the two child nodes of the root node, and search step by step until after traversing all the characters on the route, you can quickly find each The outgoing interface corresponding to the route improves the search efficiency.
  • an embodiment of the present application provides a routing table entry query device.
  • the device is used to query an outgoing interface of a route in a dictionary tree storing N second routing table entries.
  • the device uses In order to implement the routing table query method described in the fifth aspect above.
  • the device includes at least one functional unit or module.
  • the at least one functional unit is an acquiring unit, a generating unit, and the like.
  • the device may be a line card box or an interface board.
  • an embodiment of the present application provides a first device, the first device includes a transceiver, a processor, and a memory, wherein the transceiver is used to obtain M first routing table entries, each of the first A routing table entry includes a correspondence between a route and an outgoing interface, M ⁇ 2, M is an integer; the processor is used to merge the M first routing table entries to generate N second A routing table entry, at least one of the N second routing table entries includes a correspondence between a public route and an outgoing interface, and the public route is used to indicate two or more than two Routing, N ⁇ M, N is an integer.
  • the processor is specifically configured to obtain bits corresponding to each destination address of each route in the M first routing table entries ; According to the route set corresponding to the outbound interface with the largest number of routes, and the bits corresponding to the destination addresses of each route, merge the M first routing entries to generate the N first Two routing table entries.
  • the route in the first routing table entry includes a destination address and a mask corresponding to the destination address, and the destination address and mask of the route are both binary numbers.
  • the processor is specifically configured to configure the M routes in the M first routing table entries in a multi-dimensional space On n vertices, M ⁇ n; according to the route set corresponding to the outbound interface with the most routes in the M first routing entries, and the bits corresponding to the destination addresses of each route, right
  • the multi-dimensional space volume is segmented until a first condition is met, and multiple low-dimensional space volumes are generated; the first condition is: all vertices in one plane of the divided low-dimensional space volume are the same
  • the route of the outgoing interface is filled; or, there is no route in the segmented low-dimensional space; and, all the first routing table entries that satisfy the first condition are combined to generate the N second routing table entries .
  • the processor is specifically configured to determine a first plane of the multi-dimensional space body, where the first plane includes the same outbound interface The number of routes is the largest; according to the bits of the destination address of each route of the same outgoing interface in the first plane, the multi-dimensional space body is divided to form a first space body and a second space body; Whether both the first space body and the second space body meet the first condition; if both are satisfied, then the division is stopped, and the plurality of low-dimensional space bodies are the first space body and the first space body Two space bodies.
  • the processor is further specifically configured to continue the process of the first space body and the The two space bodies are segmented until the space bodies generated after the segmentation meet the first condition, and the multiple low-dimensional space bodies are generated according to all the space bodies obtained after the segmentation; or, if there is a low-dimensional space body If the space volume does not satisfy the first condition, the space volume that does not satisfy the first condition is divided until the first condition is satisfied, and the plurality of low-dimensional space volumes are obtained.
  • the first device may be a line card box or an interface board.
  • an embodiment of the present application provides a second device, the second device includes a transceiver, a processor, and a memory, wherein the transceiver is used to obtain N second routing table entries, and the N second At least one of the two routing entries includes: the correspondence between a public route and an outgoing interface.
  • the public route is used to indicate two or more routes.
  • the N second routing entries are M first routing table entries are generated, M ⁇ 2 and N ⁇ M, N and M are integers; wherein, each route in the first routing table entry includes a destination address and a mask corresponding to the destination address Code, and the destination address and mask of each of the routes are binary numbers;
  • the transceiver is also used to obtain at least one indication information generated when the M first routing table entries generate the N second routing table entries;
  • the processor is configured to generate a dictionary tree according to the destination addresses included in the N routes of the N second routing entries, and the at least one indication information, the dictionary tree includes a root node, and At least one branch connected to the root node, each branch is composed of a plurality of leaf nodes, and the root node and at least one leaf node are provided with the indication information, and the indication information is used to indicate where The bit corresponding to the destination address of the next branch of the node.
  • the processor is specifically configured to determine the location of each character in the destination address according to the destination addresses included in the N routes Corresponding bit; configure the indication information for indicating the bit corresponding to each character in the leaf node or root node that indicates the branch of the upper layer of the destination address character to generate the dictionary tree.
  • the second device is also used to implement all steps of the routing table query method of the foregoing fifth aspect.
  • an embodiment of the present application further provides a system, the system including the device according to the third aspect and the device according to the fourth aspect, or including the first device and the first device according to the seventh aspect The second device described in the eight aspect.
  • the first device is a server or a main control board
  • the second device is a line card box or an interface board.
  • system further includes the routing table query device according to the sixth aspect.
  • an embodiment of the present application further provides a computer storage medium that stores instructions, which when executed on a computer can implement various methods including the generation of routing table entries and dictionary tree generation provided by the present application Some or all steps in the example.
  • running the instruction on a computer may also implement part or all of the steps in the embodiment of the routing table query method provided by this application.
  • the present application also provides a computer program product.
  • the computer program product includes one or more computer instructions, such as routing table entry generation instructions, dictionary tree generation instructions, and the like. When the instructions are executed on a computer, some or all of the steps in the embodiments including the method for generating a routing table entry and generating a dictionary tree provided in this application may be implemented.
  • running the instruction on a computer may also implement part or all of the steps in the embodiment of the routing table query method provided by this application.
  • the routing table entry generation method provided in this application generates N second routing table entries by combining M first routing table entries, wherein at least one of the N second routing table entries includes a public route ,
  • the common route can replace at least two routes of the M first routing entries, thereby greatly reducing the number of first routing entries, thereby saving the storage space of routing entries, and the saved storage space can be used To save more routing table items to meet the market's large capacity needs.
  • the method for generating a dictionary tree provided by the present application generates a dictionary tree formed by routing entries that include a common route. Compared with the original dictionary tree, the dictionary tree branches are reduced, and the nodes of the dictionary tree are reduced.
  • the card box or interface board can quickly find the outgoing interface of the route without using off-chip memory, reducing the forwarding delay.
  • FIG. 1 is a schematic structural diagram of a router provided by this application.
  • FIG. 2a is a schematic structural diagram of a PB router provided by an embodiment of this application.
  • FIG. 2b is a schematic structural diagram of a frame router provided by an embodiment of the present application.
  • FIG. 3 is a flowchart of a routing table entry generation method provided by an embodiment of this application.
  • FIG. 4 is a flowchart of another routing table entry generation method provided by an embodiment of the present application.
  • 5a is a schematic diagram of an axially-sliced three-dimensional space body provided by an embodiment of the present application.
  • 5b is a schematic diagram of another axially divided three-dimensional space body provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of generating a routing table entry provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another three-dimensional space segmentation provided by an embodiment of the present application.
  • 8a is a schematic diagram of deleting a routing table entry provided by an embodiment of the present application.
  • 8b is a schematic diagram of adding a routing table entry provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of a dictionary tree provided by an embodiment of this application.
  • FIG. 13 is a schematic structural diagram of a routing table entry generation device according to an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of a dictionary tree generation device provided by an embodiment of the present application.
  • 15 is a schematic structural diagram of a hardware device according to an embodiment of the present application.
  • the technical solution of the present application is applied to the communication field, and can be applied to any networking environment in the communication field, such as a scale-out networking architecture, where the networking architecture includes at least one network device,
  • the network device may be a device such as a switch or a router (Router), such as a PB (Peta (10 15 ) Bit level) router.
  • PB Packeta (10 15 ) Bit level
  • a PB router is shown.
  • the router includes: a server, a plurality of line card boxes connected to the server, and a switching box connected to each line card box, etc., where each line card box It is provided with multiple ports / outgoing ports for connecting switching boxes or other network devices, such as terminals.
  • the server is a control device of a PB router, which is used to run IP protocols of different networks, learn routing, and generate a forwarding information (Forwarding Information Base (FIB) table, and forward the FIB table to Various line card boxes.
  • FIB Forwarding Information Base
  • the server may be a general-purpose server.
  • Each line card box is used to receive the FIB table from the server and store it on the hardware chip of the online card box, and then obtain the next hop information by querying the FIB table and forward the message. Further, each line card box has an independent central processing unit (Central Processing Unit, CPU), which forwards the FIB table to the internal network processor (Network Processor, NP). The FIB search module on the NP side is based on The obtained FIB table content determines the next hop device for packet forwarding.
  • CPU Central Processing Unit
  • NP Network Processor
  • the number of set line card boxes can be increased or decreased according to needs, such as packet forwarding.
  • Switch box It can be used as a switch network unit of a router to exchange data packets.
  • an embodiment of the present application further provides a router, such as a frame router.
  • the frame router includes a main control board and an interface board, and the interface board may also be called a service board.
  • each interface board has an independent CPU or NP for forwarding processing.
  • the main control board belongs to the control layer of the router.
  • the main control board obtains routing information according to the routing protocol session interaction and generates routing entries.
  • the main control board will generate The routing table entries are stored in the FIB table of the main control board, and the FIB table is delivered to each interface board.
  • the interface board When receiving an IP packet, the interface board searches the FIB table for routing entries that match the destination address of the IP packet, and forwards the IP packet based on the matching routing entry.
  • embodiments of the present application may also include other types of routers, and these routers have the functions of generating FIB tables and forwarding FIB tables to interface boards or line card boxes, and querying and forwarding packets or data packets in the FIB tables.
  • the routing table entry refers to an entry for instructing the router to forward data packets / IP packets and other traffic.
  • Each routing table entry includes a correspondence between a route and an outgoing interface, where the route includes information such as destination address / mask, next hop address, flag, and time stamp, as shown in Table 1.
  • the FIB table includes two routing entries. Further, the routing entry 1 includes a correspondence between a route and the outgoing interface "Vian-interface1" The routing table entry 2 includes the correspondence between another route and the outbound interface "InLoopBack0". Among them, the correspondence between these routes and the outgoing interface, as well as the destination address / mask and next hop address carried by each route can be preset.
  • the server or the main control board can learn from the outside through a routing protocol, or obtain a large number of routes through local static configuration, and then extract active routes to form a FIB table.
  • the server or the main control board may broadcast the FIB table to the line card box in the form of data packets or IP packets.
  • an embodiment of the present application provides a routing table entry generation method.
  • the method includes the following steps:
  • Step 101 Acquire M first routing table entries, each of which includes a correspondence between a route and an outgoing interface, M ⁇ 2, and M is a positive integer.
  • Each route in each first routing table entry includes: a destination address and a mask corresponding to the destination address, and the destination address and mask of each route are binary numbers, for example, The destination address / mask of a route is 000/111, and the number of digits of the destination address is the same as that of the mask.
  • the destination address and the mask are both represented by binary 0/1, and the number of destination addresses represented in binary is the same as the number of masks. For example, set the binary mask "1" and "0" to indicate the degree of concern for the destination address. If the mask corresponding to the destination address is "1", it means to care about the content of the destination address; if the mask is "0" It means that it does not care about the content of the destination address.
  • a route (routing table entry) includes: the destination address is: 10101100, and the corresponding mask is 11111100, then the last two digits of the mask "00" means that it does not care about the content of its corresponding destination address.
  • the addresses that do not care can be replaced with "*", then the destination address of the above route can be expressed as: 101011 **. If all the masks corresponding to the destination address of a route are 1, it means that all the contents of the destination address of the route are of interest, so the destination address remains unchanged and is written as 10101101.
  • Step 102 Combine the M first routing table entries to generate N second routing table entries, at least one of the N second routing table entries has a second routing table entry, including a common route and a
  • the public route is used to indicate two or more routes, and N ⁇ M, where N is a positive integer.
  • the public route includes a public destination address
  • the public destination address may be used to indicate IP addresses of two or more routes, and share the same mask.
  • the generated public route of the second routing entry includes a public destination address "0 **" and a mask "100", and there is a correspondence between the public route and the outgoing interface 2 .
  • the server or the main control board sends the generated N second routing table entries to each line card box through the FIB table.
  • the method provided in this embodiment generates N second routing table entries by combining M first routing table entries, wherein at least one of the N second routing table entries includes a public route, and the public A route can replace at least two routes of M first routing entries, thereby greatly reducing the number of first routing entries, saving storage space, and the saved storage space can be used to save more routing entries , To meet the market demand for large capacity.
  • the above step 102 specifically includes:
  • Step 1021 Obtain the bit corresponding to each destination address of each route in the M first routing entries.
  • the route in the first routing table entry includes: a destination address and a mask corresponding to the destination address, and the destination address and mask of each of the routes are binary numbers.
  • a routing table entry including the destination IP address / mask is expressed as: 000/111, where 000 of the destination IP address is sorted according to bit order: bit 1, bit 2 and bit 3, respectively.
  • one of the first routing table entries is "Route 000 corresponds to outgoing interface 2"
  • obtaining the bit of the route includes: obtaining the first bit "0", the second bit "0" and the third bit of route 000 Bit "0".
  • Step 1022 Combine the M first routing entries according to the route set corresponding to the outbound interface with the most routes and the bits corresponding to the destination addresses of each route to generate the N Second routing table entry.
  • step 1022 includes:
  • M routes in the M first routing table entries are arranged on n vertices of a multi-dimensional space body, and M ⁇ n, where n is a positive integer.
  • the first condition is: all vertices in one plane of the segmented low-dimensional space are filled with routes of the same interface, or there is no route in the segmented low-dimensional space.
  • the process includes: determining the first plane of the multi-dimensional space, where the first plane contains the most routes for the same outgoing interface; according to the bits of the destination address of each route of the same outgoing interface, Divide the multi-dimensional space body to form a first space body and a second space body; separately determine whether both the first space body and the second space body satisfy the first condition.
  • the segmentation is stopped, and the plurality of low-dimensional space bodies are the first space body and the second space body;
  • the space body that does not satisfy the first condition is segmented until the first condition is satisfied, to obtain the plurality of low-dimensional space bodies.
  • all first routing table entries of the first element that meets the first condition are merged, and the first element of the first condition is that all vertices in a plane of the low-dimensional space volume after segmentation are Routes with the same outgoing interface are filled.
  • all first routing table entries other than the second element that satisfies the first condition are merged, and the second element of the first condition is that there is no routing in the low-dimensional space after segmentation, thereby making the segmentation The low-dimensional space without routing does not participate in the generation and merging of the second routing table entry.
  • the embodiment of the present application uses binary to represent routes, and each route is represented by 3bit, 6bit, 8bit, etc., where the IPv4 route is 32bit, and the uninteresting content in the IP address of the route can be directly replaced with "*".
  • the mask corresponding to route 10101100 is 11111100, which can be directly written as 101011 **.
  • each A routing table entry includes the correspondence between the route and the outgoing interface.
  • the specific relationship is as follows:
  • Route 000 corresponds to outgoing interface 2
  • Route 001 corresponds to outgoing interface 2;
  • Route 010 corresponds to outgoing interface 2
  • Route 011 corresponds to outgoing interface 2;
  • Route 100 corresponds to outgoing interface 2;
  • Route 110 corresponds to outgoing interface 2
  • Route 101 corresponds to outgoing interface 1.
  • each route is arranged on the vertices of the n-dimensional space of the space.
  • a three-dimensional space with three coordinate axes of xyz is established.
  • each route, 000, 001, 010, 011, 100, and 110 at each vertex of the three-dimensional space, as shown in the circle vertex of FIG. 5a, each circle vertex sets a route.
  • Embodiments of the present application may use a dimensionality reduction merge algorithm to merge routes with the same outgoing interface into a common route, thereby merging the original multiple first routing table entries into a small number of second routing table entries to reduce the number of routing table entries Quantity, thus saving space for storing FIB tables.
  • the main process of the dimensionality reduction and merging algorithm includes: forming a routing space through the established n-dimensional space body with a route set at the vertex, and segmenting the routing space, and generating two n-1 dimension spaces after each segmentation body.
  • different methods are used for segmentation. For example, after segmentation, routes with the same outgoing interface are kept in the same n-1 dimension space as much as possible.
  • the n-dimensional space body and n-1 dimensional space body described in the embodiments of the present application refer to the geometric shape or geometric space body composed of routing vertices, for example, the three-dimensional space body composed of 8 vertices is
  • each geometric space body after segmentation is a two-dimensional space body compared to the original three-dimensional space body with eight routing vertices, so the original three-dimensional space body is said to be the remaining four vertices after one segmentation.
  • the formed plane is a two-dimensional space, that is, the n-dimensional space is divided into n-1 dimensional space.
  • the space body where the plane is located is divided again to obtain a point or line segment consisting of one or two routing vertices, which is one-dimensional, so the space body composed of four routing vertices will be formed after the space body is further segmented , A one-dimensional space composed of one or two routing vertices.
  • a three-dimensional space volume is segmented and reduced according to a dimensionality reduction merging algorithm.
  • the specific process includes:
  • S2 Determine the plane with the largest number of routes containing the same outgoing interface, such as the first plane.
  • the first plane is composed of 4 routing vertices 000, 001, 011, and 010.
  • the n-dimensional space is divided into two n-1 dimensional spaces; because the destination address is divided according to the first bit, that is, the content of the first bit is concerned, the content of the remaining bits is not
  • the bits of concern and don't care can be represented by "0", and then after being divided according to the first bit, the mask becomes 100.
  • the outbound interface 2 corresponds to the largest number of routes
  • the first plane composed of four vertices of the route "000, 001, 011, 010" corresponds to the same outbound interface, and according to the first condition: All vertices in a plane of the low-dimensional space volume are filled with routes, and are all the same route of the outgoing interface; the three-dimensional space volume is segmented at the midpoint x / 2 of the routes 000 and 100 as the axis to generate Two space bodies, such as space 0 and space 1.
  • space 0 includes 4 routing table entries, namely:
  • Route 000 corresponds to outgoing interface 2
  • Route 001 corresponds to outgoing interface 2;
  • Route 010 corresponds to outgoing interface 2
  • Route 011 corresponds to outgoing interface 2.
  • S3 Determine whether the divided low-dimensional spaces all meet the first condition. If it meets, then merge all routes that meet the first condition to generate a second routing entry; if not, continue to proceed Split until the first condition is satisfied.
  • the first condition may be called a suspension condition or an exit condition, and specifically includes the following two cases:
  • Case 1 All vertices in a plane of the low-dimensional space after segmentation are filled with routes, and are all routes with the same outgoing interface, merged into a route, and the public route jumps out.
  • a special case is that in the lowest dimensional space, only one host route can fill the entire routing space, so it will definitely jump out.
  • Route 0 ** corresponds to outgoing interface 2.
  • Space 0 Space 1 Route 100 corresponds to outgoing interface 2 Route 101 corresponds to outgoing interface 1 Route 110 corresponds to outgoing interface 2 A
  • route 1 * 0 corresponds to the outgoing interface 2.
  • route 0 ** can refer to: route 000, route 001, route 010 or route 011.
  • space 1 Determine whether another low-dimensional space, space 1 meets the above first condition; because space 1 is not the lowest dimension, so the first condition is not met, it needs to be divided again to generate space 0 (including 101 corresponding to outbound interface 1) and space 1, Among them, case 1 where space 0 satisfies the first condition and case 2 where space 1 satisfies the first condition (no route in the space), so a second routing entry can be obtained, and 101 corresponds to outgoing interface 1, as shown in FIG. 6.
  • Route 0 ** corresponds to outgoing interface 2;
  • Route 1 * 0 corresponds to outgoing interface 2;
  • Route 101 corresponds to outgoing interface 1.
  • the first routing table entry before the merger is 7 and the merged routing table entry is 3, which saves storage space for storing 4 routing table entries.
  • the method provided in this embodiment generates N second routing table entries by combining M first routing table entries, wherein at least one of the N second routing table entries includes a public route, and the public A route can replace at least two routes of the M first routing entries, which greatly reduces the number of first routing entries, thereby saving the storage space of routing entries, and the saved storage space can be used to save more Routing table entries to meet the needs of the market's large capacity.
  • a total of 6 cutting methods can be divided into two spatial bodies at a time. There are three cutting methods along the three axes of the x, y, and z axes. As shown in Fig. 5a, this cutting method may be called axial cutting.
  • the routing space is axially segmented for a 3-bit route, and there are a total of three segmentation methods; for a space composed of 32-bit routes, there are 32 axes, each of the 32-bit bits of the mask Bits can represent one axis, so there are 32 kinds of segmentation methods.
  • the routing table entries may be included to divide the routing table entries, such as the tangential segmentation method.
  • This method divides the four routes on the diagonal of the space body into a route set to form a space.
  • the dotted line represents four routes divided into a route set.
  • the eight vertex routes can be divided into diagonal lines: space 0 includes ⁇ 000,001,111,110 ⁇ ; space 1 includes ⁇ 100,101,001,010 ⁇ . Then, it is determined whether each space satisfies the above-mentioned first condition. If it is not satisfied, it continues to divide the space body that does not meet the first condition, and finally merges out the common routing table entry.
  • present application may also use other methods to divide and merge the M first routing table entries, which is not limited in the embodiments of the present application.
  • the above method further includes: “adding” and “deleting” the routing table entry in each space.
  • Step 1 Find the leaf node where the route to be deleted is located
  • Step 2 Check whether the space where the leaf node needs to be re-segmented after deleting the route. If it needs to be segmented, further divide the space;
  • Step 3 Check whether the associated parent node after the split can merge the routes. If it can be merged, the routes are merged into a public route; if the parent node cannot be merged, check whether the original split conditions are met. If they are not consistent , Then divide the route again.
  • routing table entry "route 010 corresponds to the outgoing interface 2" is deleted to obtain the three routing table entries included in the remaining "space 0", which are:
  • Route 000 corresponds to outgoing interface 2
  • Route 001 corresponds to outgoing interface 2;
  • Route 011 corresponds to outgoing interface 2.
  • the route can be divided, and the principle of division can include: the number of routes corresponding to the outgoing interface 2 is the largest; the division is carried out according to the second bit, and the mask is 110, because the content of the IP address of the third bit is not concerned, so the corresponding mask 0.
  • space 0 is obtained, including two routing table entries, namely:
  • Route 000 corresponds to outgoing interface 2
  • route 001 corresponds to outgoing interface 2.
  • Route 0 ** corresponds to outgoing interface 2.
  • Route 0 ** corresponds to outgoing interface 2;
  • Route 011 corresponds to outgoing interface 2.
  • the process of re-dividing and generating the second routing table entry after "adding" the routing table entry is the same as the method steps of the foregoing embodiment.
  • the specific process includes: first inserting the added route into the leaf node, and then checking Whether the two spaces of the route associated with the parent node can be merged into a public route, if they can be merged, they are directly merged into a public route; if they cannot be merged, then further check whether the conditions of the previous segmentation are met, if not, re Split and merge roads.
  • route 111 corresponding to outgoing interface 1 For example, as shown in FIG. 8b, add "route 111 corresponding to outgoing interface 1" to the original routing table. First, add the route to a leaf node, which may be the bottommost "space 1”; then detect Whether the two spaces of “space 0” juxtaposed with the bottom layer “space 1” can be merged into a common route. In this embodiment, since the “route 101 of space 0 corresponds to the outgoing interface 1” and the newly added space 1 "Route 111 corresponds to outgoing interface 1" can be merged and occupy the space 1 of the parent node, so the combined public route is: route 1 * 1 corresponds to outgoing interface 1.
  • the first routing table entry is arbitrarily added and deleted, and the above method can be used to quickly readjust and merge routes to form a new second routing table entry.
  • bits that can be replaced with "*" may be any bits of the route, including but not limited to the last bit.
  • first routing entries that are all 6 bits are listed, and the outgoing interfaces of the eight first routing entries are the same, that is, the eight routes form a routing space.
  • the 1st, 3rd and 5th bits are grouped together as 1; the remaining 2nd, 4th and 6th bits are replaced with "*" respectively, and the combined public route is "1 * 1 * 1 *".
  • an embodiment of the present application also provides a dictionary tree (trie) generation method, which can be applied to a device / device that receives a FIB table, such as an interface board or a line card box.
  • a device / device that receives a FIB table, such as an interface board or a line card box.
  • a device / device that sends a FIB table, such as a main control board or a server.
  • the receiving device / device uses N second routing table entries to generate a dictionary tree, and quickly searches the outgoing interface of the route according to the dictionary tree. Specifically, as shown in FIG. 10, the method includes the following steps:
  • Step 1001 Obtain N second routing table entries, at least one of the N second routing table entries includes: a correspondence between a public route and an outgoing interface, and the public route is used to indicate two Or more than two routes, the N second routing table entries are generated by M first routing table entries, and N ⁇ M, N and M are both positive integers.
  • Each route in the first routing table entry includes: a destination address and a mask corresponding to the destination address, and the destination address and mask of each route are binary numbers, and the destination address is The included characters are the same as the 0/1 numbers contained in the binary.
  • Step 1002 Acquire at least one indication information generated when the M first routing table entries generate the N second routing table entries.
  • the original routing space composed of 8 first routing entries is segmented according to the 1st bit, the 3rd bit and the 2nd bit respectively, and finally merged to generate 3
  • the second routing table entry which may include 3 indication information, respectively:
  • the first indication information is used to instruct the original routing space composed of eight first routing entries to be divided according to the first bit to form two routing spaces;
  • the second instruction information is used to instruct the space composed of the three remaining routes after the first segmentation to be segmented according to the third bit, and form two routing spaces, one of which contains one route;
  • the third indication information is used to instruct the space containing 1 route to be divided according to the 2nd bit to generate two routing spaces, and at this time, the exit condition is satisfied, and the division is terminated.
  • Step 1003 Generate a dictionary tree according to the destination addresses included in the N routes of the N second routing entries, and the at least one indication information.
  • the dictionary tree includes: a root node, at least one branch connected to the root node, each group is composed of a plurality of leaf nodes, and the root node and at least one leaf node are provided with indication information
  • the indication information is used to indicate the bit corresponding to the destination address of the next layer branch of the node where the node is located, wherein one indication information is set in each node.
  • step 1003 specifically includes: generating a destination tree according to the N routes of the N second routing entries, and generating the dictionary tree according to the at least one indication information, including: according to the N routes The destination address of the destination address, determine the bit corresponding to each of the characters in the destination address; configure the indication information indicating the bit corresponding to each of the characters to indicate the branch of the destination address character In the leaf node or the root node, the dictionary tree is generated.
  • an outgoing interface is also associated with the lowest leaf node of the dictionary tree.
  • the three generated routing table entries are:
  • Route 0 ** corresponds to outgoing interface 2;
  • Route 1 * 0 corresponds to outgoing interface 2;
  • Route 101 corresponds to outgoing interface 1.
  • the FIB table is generated according to the above three routing table entries, and the FIB table is delivered to each interface board or line card box.
  • the FIB table further includes 8 first routing table entries merged into the above 3 second routing table entries, and further includes the following information: each destination of each route in each first routing table entry The instruction corresponding to the address.
  • the first route 000 corresponds to the outgoing interface 2
  • the bit is the first bit, the second bit and the third bit
  • in the process of merging to generate the route 0 ** corresponds to the outgoing interface 2, it is divided according to the first bit, and the mask is 100 , As shown in Table 6.
  • Second routing table entry Instructions Route 0 ** corresponds to outgoing interface 2 Split according to the first bit Route 1 * 0 corresponds to outgoing interface 2 Split according to the 3rd bit Route 101 corresponds to outgoing interface 1 Split according to 2nd bit
  • the trie tree should be constructed according to the spatial segmentation order.
  • the segmentation plane used during spatial segmentation corresponds to a bit of the route, and the trie tree is based on The bits used in the split process construct a trie tree.
  • the first spatial segmentation is axial segmentation according to the first bit, so the indication information corresponding to the root node (root) of the trie tree is the first bit, which is used to indicate the two connected to the root node.
  • the bits of the destination IP address concerned by the branch (space 0 and space 1).
  • the following nodes are analogized in turn, and the third bit of indication information is configured in space 1, which is used to indicate the bit of the destination IP concerned by the next level.
  • the indication information is set to the second bit in the space of the next level, which is used to indicate that the second bit of the destination IP is 0, that is, route 101.
  • this embodiment also provides a routing query method. Specifically, the method includes:
  • the outgoing interface of the current route is determined according to the outgoing interface associated with the last "0" or "1" character of the search.
  • the search method includes: according to the indication information configured in the root node in the dictionary tree, indicating the first bit to determine the route 101 1st bit; according to the indication information configured in the next layer indication "1" of the root node, indicate the 3rd bit, and determine the third bit "1" in the route 101; finally, according to the indication information configured in the 3rd bit, indicate On the second bit, it is determined that the outbound interface associated with the character "0" of route 101 is 1, and then the outbound interface corresponding to route 101 is determined to be 1.
  • the method for finding the outgoing interface for route 0 ** and route 1 * 0 is the same as the above method.
  • the first bit is indicated, and the corresponding character is "0", the next two bytes are replaced with "*", don't care, so the outbound interface corresponding to the character "0" is found to be 2, so the outbound interface corresponding to route 0 ** is 2.
  • the method provided in this embodiment compares each character of the route with the indication information configured by the root node or the leaf node in the dictionary tree according to the dictionary tree constructed using bits during each space segmentation, for example, the root of the dictionary tree
  • the indication information stored by the node is the 3rd bit, then the 3rd character of the search route should be used to compare with the information of the two child nodes of the root node, and search step by step until after traversing all the characters on the route, you can quickly find each The outgoing interface corresponding to the route.
  • dictionary tree including indication information of all routing characters.
  • the dictionary tree The “1/0” characters that make up each route correspond to an indication message to indicate the bit, and the bit indicated by the indication message may be any bit generated according to the foregoing segmentation process, including but not limited to Yes: the order of the first bit, the second bit, and the third bit.
  • the dictionary tree starts from the indication information configured in the root node, and indicates the bits of the destination IP concerned in the next layer step by step, until the last outgoing interface associated with the leaf node. until.
  • the method provided in this embodiment generates a dictionary tree formed by routing entries that include public routes. Compared with the original dictionary tree, the dictionary tree branches are reduced, and the number of nodes in the dictionary tree is reduced. Therefore, for the searched line card box or interface The board can quickly find the outgoing interface of the route without using off-chip memory, reducing the forwarding delay.
  • FIG. 13 it is a schematic structural diagram of a routing table entry generation device provided by an embodiment of the present application.
  • the device may be the server or the main control board in the foregoing embodiment, and is used to implement the routing table entry generation method in the foregoing embodiment.
  • the routing table entry generating device 130 may include an obtaining unit 1301 and a generating unit 1302.
  • the device 130 may also include more or fewer components, such as a sending unit, a storage unit, etc. The application does not limit this.
  • the obtaining unit 1301 is configured to obtain M first routing table entries, and each of the first routing table entries includes: a correspondence between a route and an outgoing interface, and M ⁇ 2.
  • the generating unit 1302 is configured to merge the M first routing table entries to generate N second routing table entries, at least one of the N second routing table entries includes: a common Correspondence between a route and an outgoing interface.
  • the public route is used to indicate two or more routes, and N ⁇ M, N and M are both integers.
  • the route in the first routing entry includes a destination address and a mask corresponding to the destination address, and the destination address of each route And the mask are both binary numbers; the generating unit 1302 is specifically used to obtain the bits corresponding to the respective destination addresses of each route in the M first routing table entries; according to the outbound interface with the largest number of routes The corresponding route set and the bit corresponding to each destination address of each route merge the M first routing table entries to generate the N second routing table entries.
  • the generating unit 1302 is specifically configured to configure the M routes in the M first routing table entries in a multi-dimensional space On n vertices, M ⁇ n; according to the route set corresponding to the outbound interface with the most routes in the M first routing entries, and the bits corresponding to the destination addresses of each route, right
  • the multi-dimensional space body is segmented until a first condition is met, and multiple low-dimensional space bodies are generated.
  • the first condition is: all vertices in a plane of the divided low-dimensional space body are the same
  • the routing of the outgoing interface is filled; or, there is no routing in the divided low-dimensional space.
  • the generating unit 1302 is also specifically configured to merge all the first routing table items that satisfy the first condition to generate the N second routing table items.
  • the generating unit 1302 is specifically configured to determine the first plane of the multi-dimensional space body, and the first plane includes the same outgoing interface.
  • the number of routes is the largest; according to the bits of the destination address of each route of the same out interface, the multi-dimensional space body is divided to form a first space body and a second space body; the first space body is judged separately And whether the second space body satisfies the first condition; if both are satisfied, then the segmentation is stopped, and the plurality of low-dimensional space bodies are the first space body and the second space body.
  • the generating unit 1302 is further configured to continue to process the first space body and the second space if the first condition is not satisfied The space body is divided until the space bodies after the division meet the first condition, and the multiple low-dimensional space bodies are generated according to all the obtained space bodies after the division;
  • the space volume that does not satisfy the first condition is segmented until the first condition is satisfied, to obtain the multiple low-dimensional spaces body.
  • the generating unit merges the M first routing table entries into N second routing table entries, wherein at least one of the N second routing table entries includes a public route, the Public routes can replace at least two routes of the M first routing entries, thereby greatly reducing the number of first routing entries, saving the storage space of routing entries, and the saved storage space can be used to save more Multiple routing entries to meet the market's large capacity requirements.
  • FIG. 14 is a schematic structural diagram of a dictionary tree generation apparatus provided by an embodiment of the present application
  • the apparatus 140 is used to implement the dictionary tree generation method in the foregoing embodiment.
  • the device 140 may be a line card box or an interface board in the foregoing embodiments.
  • the device 140 may include an acquiring unit 1401 and a generating unit 1402.
  • the device 140 may also include more or fewer components, such as a sending unit, a storage unit, etc. Be limited.
  • the obtaining unit 1401 is configured to obtain N second routing table entries. At least one second routing table entry among the N second routing table entries includes: a correspondence between a public route and an outgoing interface.
  • the public route is used to indicate two or more routes.
  • the N second routing table entries are generated by M first routing table entries, and N ⁇ M, M and M are both integers; wherein, the first route Each route in the entry includes a destination address and a mask corresponding to the destination address, and the destination address and mask of each route are binary numbers;
  • the obtaining unit 1401 is further configured to obtain at least one indication information generated when the M second routing table entries generate the N second routing table entries;
  • the generating unit 1402 is configured to generate a dictionary tree according to the destination addresses included in the N routes of the N second routing entries, and the at least one indication information, the dictionary tree includes a root node, and all At least one branch connected to the root node, each of the branches is composed of a plurality of leaf nodes, and the root node and at least one leaf node are provided with the indication information for indicating the next layer of the node where they are located The bit corresponding to the destination address of the branch.
  • the public routes of the N second routing entries include a public destination address and a mask, and the public destination address is composed of several characters, each The character corresponds to a bit;
  • the generating unit 1402 is specifically configured to determine the bit corresponding to each character in the destination address according to the destination address included in the N routes; it will be used to indicate the corresponding bit of each character
  • the bit indication information is configured in a leaf node or a root node that indicates a branch of the upper layer of the destination address character, and the dictionary tree is generated.
  • the last node of each branch in the dictionary tree is also associated with an outgoing interface.
  • an embodiment of the present application further provides a hardware device, which is used to implement part or all of the steps of the routing table entry generation method described in the foregoing embodiment.
  • the hardware device is a first device.
  • the hardware device includes: a transceiver 151, a processor 152, and a memory 153.
  • the hardware device may include more or less components, or combine certain components, or arrange different components. , This application does not limit this.
  • the processor 152 is the control center of the hardware device, using various interfaces and lines to connect the various parts of the entire router, by running or executing the software programs and / or modules stored in the memory 153, and calling the data stored in the memory To perform various functions of the hardware device.
  • the processor 152 may be composed of an integrated circuit (Integrated Circuit, IC), for example, may be composed of a single packaged IC, or may be composed of multiple packaged ICs connected with the same function or different functions.
  • the processor may include only the CPU, or may be a combination of a GPU, a digital signal processor (DSP), and a control chip in the transceiver module.
  • DSP digital signal processor
  • the transceiver 151 may include components such as a receiver, a transmitter, and an antenna; used to receive or send FIB tables or routing table entries, and establish a communication connection with an external network device and perform data transmission.
  • the transceiver 151 may include a communication module such as a wireless local area network (WLAN) module, a Bluetooth module, a baseband module, and a radio frequency (RF) circuit corresponding to the communication module.
  • a communication module such as a wireless local area network (WLAN) module, a Bluetooth module, a baseband module, and a radio frequency (RF) circuit corresponding to the communication module.
  • WLAN wireless local area network
  • RF radio frequency
  • the transceiver module can support direct memory access.
  • the various transceiver modules in the transceiver 151 generally appear in the form of integrated circuits (integrated circuits) chips, and can be selectively combined without having to include all transceiver modules and corresponding antenna groups .
  • the transceiver may only include a baseband chip, a radio frequency chip, and corresponding antennas to provide communication functions in a cellular communication system.
  • a wireless communication connection established via the transceiver module such as wireless local area network access or WCDMA access.
  • the memory 153 is used to store program code for executing the technical solution of the present application, and is controlled and executed by the processor 152.
  • the processor 152 is used to execute the program code stored in the memory 153 to implement the routing table entry generation method in the foregoing embodiment.
  • the memory 153 may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM), or can store information and instructions
  • Other types of dynamic storage devices can also be electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), read-only disc (Compact Disc Read-Only Memory, CD-ROM) or other disc storage , Optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and Any other media that can be accessed by the computer, but not limited to this.
  • the memory may exist independently, or may be integrated with the processor.
  • the device may be a server or a main control board, or may be other devices having a function of generating routing table entries.
  • the device is a hardware device of the routing table entry generation device provided in the above embodiment.
  • the acquisition unit 1301 is to implement The function may be implemented by the transceiver 151 of the device, or the processor 152 controls the transceiver 151; the function to be implemented by the generating unit 1302 may be implemented by the processor 152 of the device.
  • the memory 153 is used to store a computer program product, and the computer program product includes one or more computer instructions, such as a routing table entry generation instruction and a routing table entry sending instruction.
  • the computer instructions When the computer instructions are run on a computer, all or part of the process or function of the routing table entry generation method described in the above embodiment of the present application is generated.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a network site, computer, server or data center Transmission to another site, computer or server via wired or wireless means.
  • the computer-readable storage medium may be a magnetic disk, an optical disk, a read-only storage memory ROM, or a random storage memory RAM.
  • the hardware device shown in FIG. 15 may also be a device having a function of a dictionary tree generating device and / or a routing table query device, such as a second device, for implementing the dictionary in the foregoing embodiment Tree generation method and routing table query method.
  • the hardware device may be a line card box or an interface board, or other devices with such functions, which is not limited in this application.
  • the function to be achieved by the obtaining unit 1401 may be implemented by the transceiver 151 of the hardware device in FIG. 15 or controlled by the processor 152 to control the transceiver 151
  • the function to be realized by the generating unit 1402 can be realized by the processor 152 of the device.
  • the memory 153 is used to store a computer program product, and the computer program product includes one or more computer instructions, such as a dictionary tree generation instruction and a routing out interface search instruction.
  • the computer instructions When the computer instructions are run on a computer, the processes or functions of the dictionary tree generation method and the routing table entry query method described in the above embodiments of the present application are wholly or partially generated.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a network site, computer, server or data center Transmission to another site, computer or server via wired or wireless means.
  • the computer-readable storage medium may be a magnetic disk, an optical disk, a read-only storage memory ROM, or a random storage memory RAM.
  • an embodiment of the present application provides a system for implementing part or all of the steps of a routing table entry generating method and a dictionary tree generating method provided by the embodiment of the present application.
  • the system includes the routing table entry generating device and the dictionary tree generating device in the foregoing embodiment, or the system includes a first device and at least one second device. Further, the first device is the device in the foregoing embodiment. A device with a function of generating a routing table entry, the second device is a device having the function of a dictionary tree generating device in the foregoing embodiment.
  • the first device and the second device may be provided separately or jointly, which is not limited in this embodiment of the present application.
  • the first device is a server or a main control board
  • the second device is a line card box or an interface board.
  • the system is a router, such as a PB router.
  • the system further includes at least one third device, and the third device is an exchange box. Understandably, the system may also include other hardware devices and components. This embodiment of the present application There are no restrictions on this.
  • the “unit” in the above embodiments may refer to an application-specific integrated circuit (ASIC), a processor and memory that execute one or more software or firmware programs, integrated logic circuits, and / or other Devices that can provide the above functions.
  • ASIC application-specific integrated circuit
  • processor and memory that execute one or more software or firmware programs, integrated logic circuits, and / or other Devices that can provide the above functions.
  • the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform.
  • the technical solutions in the embodiments of the present invention may be embodied in the form of software products in essence or part of contributions to the existing technology, and the computer software products may be stored in a storage medium, such as ROM / RAM , Magnetic disks, optical disks, etc., including several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or some parts of the embodiments.
  • plural means two or more than two.
  • the words “first” and “second” are used to distinguish the same or similar items that have substantially the same functions and functions. Those skilled in the art can understand that the words “first” and “second” do not limit the number and the execution order, and the words “first” and “second” do not necessarily mean different.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请实施例公开了一种路由表项生成方法、字典树生成方法和装置,其中所述路由表项生成方法包括:获取M个第一路由表项,每个所述第一路由表项中包括一条路由与一个出接口之间的对应关系,M≥2;对所述M个第一路由表项进行合并生成N个第二路由表项,所述N个第二路由表项中至少有一个第二路由表项包括一条公共路由与一个出接口之间的对应关系,所述公共路由用于指示两条或两条以上的路由,且N<M,N和M均为整数。该方法通过将M个第一路由表项合并成N个第二路由表项,大量地减少了第一路由表项的数量,节省了路由表项的存储空间,并且该节省的存储空间可以保存更多的路由表项,从而满足市场大容量的需求。

Description

一种路由表项生成方法、字典树生成方法和装置
本申请要求于2018年10月12日提交中国专利局、申请号为201811191267.8、发明名称为“一种路由表项生成方法、字典树生成方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,尤其涉及一种路由表项生成方法、字典树生成方法和装置。
背景技术
路由器、交换机等网络设备可支持因特网协议(Internet Protocol,IP)路由转发功能。网络设备通常包括主控板以及多个接口板,其中主控板主要进行网络间的管理,用于生成路由信息表(Routing Information Base,RIB)以及转发信息库(Forwarding Information Base,FIB)表,并将生成的主控板的FIB表下发至各个接口板中的硬件芯片,各个接口板用于对主控板下发的FIB表对IP报文进行报文转发。
现有主控板向接口板下发FIB表时,是将主控板中的整个FIB表下发至各接口板,这样,接口板在接收到IP报文时,就会在FIB表中查找与IP报文的目的地址匹配的路由条目,并基于匹配的路由条目对IP报文转发。
在海量连接不断发展的情况下,比如物联网的发展,需要主控板学习并生成的FIB的容量也越来越大,FIB表中需要存储的路由条数越来越多。一般地,主控板学习的路由表项最大占用4M存储空间,即存储4百万条路由,其中每条路由对应一个路由表项,每个路由表项中包括:目的地址和掩码、下一跳地址、转发信息的形状描述、转发的出接口等内容,由于接口板(或业务板)的硬件芯片保存FIB表的容量有限,当主控板的FIB容量较大时,比如存储了的路由条数超过4百万时,就无法存储更多的路由,进而不能满足大容量FIB表的市场需求。
发明内容
为了解决路由表项数量多,占用的存储空间超过接口板上芯片的最大存储容量,无法满足市场需求的技术问题,本申请公开了如下技术方案:
第一方面,本申请实施例提供了一种路由表项生成方法,所述方法包括:服务器获取M个第一路由表项,每个所述第一路由表项中包括:一条路由与一个出接口之间的对应关系,且M≥2,M为整数;对所述M个第一路由表项进行合并,生成N个第二路由表项,所述N个第二路由表项中至少有一个第二路由表项,包括一条公共路由与一个出接口之间的对应关系,所述公共路由用于指示两条或两条以上的路由,且N<M,N为整数。
本方面提供的方法,通过将M个第一路由表项合并生成N个第二路由表项,其中,N个第二路由表项中至少有一个第二路由表项包括公共路由,该公共路由可以替代M个第一路由表项的至少两条路由,从而大量地减少了第一路由表项的数量,进而节省了路由表项 的存储空间,并且该节省的存储空间可以用于保存更多的路由表项,满足市场大容量的需求。
结合第一方面,在第一方面的一种可能的实现方式中,第一路由表项中的路由包括一个目的地址和与所述目的地址对应的一个掩码,且所述路由的目的地址和掩码均为二进制数;对所述M个第一路由表项进行合并,生成N个第二路由表项,包括:获取所述M个第一路由表项中的每条路由的各个目的地址所对应的比特位;根据路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的比特位,对所述M个第一路由表项进行合并,生成所述N个第二路由表项。
结合第一方面,在第一方面的另一种可能的实现方式中,所述根据路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的所述比特位,对所述M个第一路由表项进行合并,生成所述N个第二路由表项的过程,包括:
将所述M个第一路由表项中的M个路由配置在一个多维度空间体的n个顶点上,M≤n;按照所述M个第一路由表项中路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的比特位,对所述多维度空间体进行切分直到满足第一条件为止,生成多个低维度空间体;所述第一条件为:在切分后的低维度空间体的一个平面内的所有顶点都被相同出接口的路由所填充;或者,在切分后的低维度空间体内无路由;对满足所述第一条件的所有第一路由表项进行合并,生成所述N个第二路由表项。
结合第一方面,在第一方面的又一种可能的实现方式中,对所述多维度空间体进行切分直到满足第一条件为止,生成多个低维度空间体,包括:确定所述多维度空间体的第一平面,所述第一平面中包含同一出接口的路由数最多;按照所述第一平面中所述同一出接口的各个路由的目的地址的比特位,对所述多维度空间体进行切分,形成第一空间体和第二空间体;分别判断所述第一空间体和所述第二空间体是否都满足所述第一条件;如果都满足,则停止切分,所述多个低维空间体为所述第一空间体和所述第二空间体。
结合第一方面,在第一方面的又一种可能的实现方式中,所述方法还包括:如果都不满足所述第一条件,继续对所述第一空间体和所述第二空间体进行切分直到切分后生成的空间体都满足所述第一条件为止,并根据所有切分后得到的空间体生成所述多个低维空间体;
或者,如果有一个低维空间体不满足所述第一条件,则对不满足所述第一条件的空间体进行切分,直到满足所述第一条件为止,得到所述多个低维空间体。
第二方面,本申请实施例提供了一种字典树生成方法,所述方法包括:获取N个第二路由表项,所述N个第二路由表项中至少有一个,包括:一条公共路由与一个出接口之间的对应关系,所述公共路由用于指示两条或两条以上的路由,所述N个第二路由表项由M个第一路由表项生成,M≥2,且N<M,N和M均为整数;其中,第一路由表项中的每条路由包括一个目的地址和与所述目的地址对应的一个掩码,且每条所述路由的目的地址和掩码均为二进制数;
所述方法还包括:获取由所述M个第一路由表项生成所述N个第二路由表项时产生的至少一个指示信息;根据所述N个第二路由表项的N个路由所包含的目的地址,和,所述至少一个指示信息生成字典树,所述字典树中包括:一个根节点,与所述根节点相连接的至少一条分支,每条所述分支由多个叶子节点组成,且所述根节点和至少一个叶子节点中 设置有所述指示信息,所述指示信息用于指示其所在节点的下一层分支的目的地址所对应的比特位。
结合第二方面,在第二方面的一种可能的实现方式中,根据所述N个第二路由表项的N个路由所包含的目的地址,和,所述至少一个指示信息生成字典树,包括:根据所述N个路由所包含的目的地址,确定所述目的地址中每个所述字符所对应的比特位;将用于指示每个所述字符所对应的比特位的指示信息配置在,指示目的地址字符的上一层分支的叶子节点或者根节点中,生成所述字典树。
本方面提供的方法,生成了包括有公共路由的路由表项形成的字典树,相比于原来全部字符组成的字典树分支减少、字典树的节点减少,所以对于查找的线卡盒子或接口板可以快速查找出路由的出接口,不需要使用片外内存,减少了转发时延。
第三方面,本申请实施例提供了一种路由表项生成装置,所述装置用于实现上述第一方面以及第一方面各种实现方式中的路由表项生成方法。
可选的,所述装置包括至少一个功能单元或模块,进一步地,所述至少一个功能单元为获取单元、生成单元等。
可选的,在一种可能的设计中,该装置可以是服务器或主控板。
第四方面,本申请实施例提供了一种字典树生成装置,所述装置用于实现上述第二方面以及第二方面各种实现方式中的字典树生成方法。
可选的,所述装置包括至少一个功能单元或模块,进一步地,所述至少一个功能单元为获取单元、生成单元等。
可选得,在一种可能的设计中,该装置可以是线卡盒子或者接口板。
第五方面,本申请实施例还提供了一种路由表项查询方法,该方法用于在N个第二路由表项中查询路由的出接口,具体地,所述方法包括:获取至少一个路由,每个所述路由均由二进制字符表示;将每个路由的二进制字符按照字典树中配置的每个节点的指示信息逐级查找,直到路由中的所有二进制字符均遍历完为止,并查找出最后一个二进制字符;根据所述查找的最后一个字符所关联的出接口确定当前路由的出接口,其中,所述二进制字符为“0”或“1”。
本方面提供的方法,根据每次空间切分时使用比特位构建的字典树,对路由的各个字符与字典树中的根节点或叶子节点所配置的指示信息进行比较,例如字典树根节点存储的指示信息是第n bit,那么应使用查找路由的第n bit字符与根节点的两个子节点的信息进行比较,逐级查找,直到遍历路由上的所有字符后,从而能够快速查找出每个路由对应的出接口,提高了查找效率。
第六方面,本申请实施例提供了一种路由表项查询装置,所述装置用于在存储有N个第二路由表项的字典树中查询路由的出接口,具体地,所述装置用于实现上述第五方面所述的路由表项查询方法。
可选的,所述装置包括至少一个功能单元或模块,进一步地,所述至少一个功能单元为获取单元、生成单元等。
可选的,在一种可能的设计中,该装置可以是线卡盒子或者接口板。
第七方面,本申请实施例提供了一种第一设备,该第一设备包括收发器、处理器和存储器,其中,所述收发器用于获取M个第一路由表项,每个所述第一路由表项中包括一条 路由与一个出接口之间的对应关系,M≥2,M为整数;所述处理器,用于对所述M个第一路由表项进行合并生成N个第二路由表项,所述N个第二路由表项中至少有一个第二路由表项包括一条公共路由与一个出接口之间的对应关系,所述公共路由用于指示两条或两条以上的路由,N<M,N为整数。
结合第七方面,在第七方面的一种可能的实现方式中,所述处理器,具体用于获取所述M个第一路由表项中的每条路由的各个目的地址所对应的比特位;根据路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的比特位,对所述M个第一路由表项进行合并,生成所述N个第二路由表项。其中,第一路由表项中的路由包括一个目的地址和与所述目的地址对应的一个掩码,且所述路由的目的地址和掩码均为二进制数。
结合第七方面,在第七方面的另一种可能的实现方式中,所述处理器,具体用于将所述M个第一路由表项中的M个路由配置在一个多维度空间体的n个顶点上,M≤n;按照所述M个第一路由表项中路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的比特位,对所述多维度空间体进行切分直到满足第一条件为止,生成多个低维度空间体;所述第一条件为:在切分后的低维度空间体的一个平面内的所有顶点都被相同出接口的路由所填充;或者,在切分后的低维度空间体内无路由;以及,对满足所述第一条件的所有第一路由表项进行合并,生成所述N个第二路由表项。
结合第七方面,在第七方面的又一种可能的实现方式中,所述处理器,具体用于确定所述多维度空间体的第一平面,所述第一平面中包含同一出接口的路由数最多;按照所述第一平面中所述同一出接口的各个路由的目的地址的比特位,对所述多维度空间体进行切分,形成第一空间体和第二空间体;分别判断所述第一空间体和所述第二空间体是否都满足所述第一条件;如果都满足,则停止切分,所述多个低维空间体为所述第一空间体和所述第二空间体。
结合第七方面,在第七方面的又一种可能的实现方式中,所述处理器,具体还用于如果都不满足所述第一条件,继续对所述第一空间体和所述第二空间体进行切分直到切分后生成的空间体都满足所述第一条件为止,并根据所有切分后得到的空间体生成所述多个低维空间体;或者,如果有一个低维空间体不满足所述第一条件,则对不满足所述第一条件的空间体进行切分,直到满足所述第一条件为止,得到所述多个低维空间体。
可选的,在一种可能的设计中,该第一设备可以是线卡盒子或者接口板。
第八方面,本申请实施例提供了一种第二设备,该第二设备包括收发器、处理器和存储器,其中,所述收发器用于获取N个第二路由表项,所述N个第二路由表项中至少有一个,包括:一条公共路由与一个出接口之间的对应关系,所述公共路由用于指示两条或两条以上的路由,所述N个第二路由表项由M个第一路由表项生成,M≥2且N<M,N和M均为整数;其中,第一路由表项中的每条路由包括一个目的地址和与所述目的地址对应的一个掩码,且每条所述路由的目的地址和掩码均为二进制数;
所述收发器,还用于获取由所述M个第一路由表项生成所述N个第二路由表项时产生的至少一个指示信息;
所述处理器,用于根据所述N个第二路由表项的N个路由所包含的目的地址,和,所述至少一个指示信息生成字典树,所述字典树中包括一个根节点,与所述根节点相连接的 至少一条分支,每条所述分支由多个叶子节点组成,且所述根节点和至少一个叶子节点中设置有所述指示信息,所述指示信息用于指示其所在节点的下一层分支的目的地址所对应的比特位。
结合第八方面,在第八方面的一种可能的实现方式中,所述处理器,具体用于根据所述N个路由所包含的目的地址,确定所述目的地址中每个所述字符所对应的比特位;将用于指示每个所述字符所对应的比特位的指示信息配置在,指示目的地址字符的上一层分支的叶子节点或者根节点中,生成所述字典树。
此外,所述第二设备还用于实现前述第五方面的路由表项查询方法的全部步骤。
第九方面,本申请实施例还提供了一种系统,所述系统包括上述第三方面所述的装置和第四方面所述的装置,或者包括上述第七方面所述的第一设备和第八方面所述的第二设备。
可选的,所述第一设备为服务器或主控板,所述第二设备为线卡盒子或接口板。
可选的,所述系统还包括上述第六方面所述的路由表项查询装置。
第十方面,本申请实施例还提供了一种计算机存储介质,该计算机存储介质存储有指令,该指令在计算机上运行时可实现包括本申请提供的路由表项生成、字典树生成方法各实施例中的部分或全部步骤。
可选的,在一种可能的实现方式中,在计算机上运行所述指令还可以实现本申请提供的路由表项查询方法实施例中的部分或全部步骤。
另外,本申请还提供了一种计算机程序产品,所述计算机程序产品包括一个或多个计算机指令,例如路由表项生成指令、字典树生成指令等。在计算机上运行所述指令时,可实现包括本申请提供的路由表项生成、字典树生成方法各实施例中的部分或全部步骤。
可选的,在一种可能的实现方式中,在计算机上运行所述指令还可以实现本申请提供的路由表项查询方法实施例中的部分或全部步骤。
本申请提供的路由表项生成方法,通过将M个第一路由表项合并生成N个第二路由表项,其中,N个第二路由表项中至少有一个第二路由表项包括公共路由,该公共路由可以替代M个第一路由表项的至少两条路由,从而大量地减少了第一路由表项的数量,进而节省了路由表项的存储空间,并且该节省的存储空间可以用于保存更多的路由表项,满足市场大容量的需求。
此外,本申请提供的字典树生成方法,生成了包括有公共路由的路由表项形成的字典树,相比于原来全部字符组成的字典树分支减少、字典树的节点减少,所以对于查找的线卡盒子或接口板可以快速查找出路由的出接口,不需要使用片外内存,减少了转发时延。
附图说明
图1为本申请提供的一种路由器的结构示意图;
图2a为本申请实施例提供的一种PB路由器的结构示意图;
图2b为本申请实施例提供的一种框式路由器的结构示意图;
图3为本申请实施例提供的一种路由表项生成方法的流程图;
图4为本申请实施例提供的另一种路由表项生成方法的流程图;
图5a为本申请实施例提供的一种轴向切分三维空间体的示意图;
图5b为本申请实施例提供的另一种轴向切分三维空间体的示意图;
图6为本申请实施例提供的一种生成路由表项的示意图;
图7本申请实施例提供的另一种切分三维空间体的示意图;
图8a为本申请实施例提供的一种删除路由表项的示意图;
图8b为本申请实施例提供的一种添加路由表项的示意图;
图9本申请实施例提供的一种路由合并的示意图;
图10为本申请实施例提供的一种字典树生成方法的流程图;
图11为本申请实施例提供的一种字典树的示意图;
图12为本申请实施例提供的另一种字典树的示意图;
图13为本申请实施例提供的一种路由表项生成装置的结构示意图;
图14为本申请实施例提供的一种字典树生成装置的结构示意图;
图15为本申请实施例提供的一种硬件设备的结构示意图。
具体实施方式
在对本申请实施例的技术方案说明之前,首先对本申请实施例中涉及的技术术语和应用场景进行介绍和说明。
本申请的技术方案应用于通信领域,可以应用于通信领域的任意一种组网环境中,例如大规模向外扩展(scale-out)组网架构,该组网架构中包括至少一个网络设备,所述网络设备可以是交换机、路由器(Router)等设备,例如PB(Peta(10 15)Bit级)路由器。
参见图1,示出了一种PB路由器,该路由器中包括:服务器,与服务器相连的多个线卡盒子,以及与每个线卡盒子相连的交换盒子等,其中,每个线卡盒子中设置有多个端口/出接口,用于连接交换盒子或者其他网络设备,比如终端。
示例地,如图2a所示,服务器为PB路由器的控制装置,用于运行不同网络的IP协议,学习路由,并生成转发信息库(Forwarding Information Base,FIB)表,以及将该FIB表转发给各个线卡盒子。
可选的,所述服务器可以是通用的服务器。
每个线卡盒子,用于接收来自服务器的FIB表,并将其存储在线卡盒子的硬件芯片上,然后通过查询FIB表获得下一跳信息,并进行报文的转发。进一步地,每个线卡盒子中都有独立的中央处理器(Central Processing Unit,CPU),该CPU将FIB表转发给内部的网络处理器(Network Processor,NP),NP侧的FIB查找模块根据获取的FIB表内容确定报文转发的下一跳设备。
可选的,设置的线卡盒子的数量可以根据需要,比如报文转发情况,增加或者减少。
交换盒子:可以作为路由器的交换网单元,用于对数据报文进行交换。
参见图2b,本申请实施例还提供了一种路由器,比如框式路由器。该框式路由器中包括:主控板和接口板,所述接口板也可称为业务板。
其中,每个接口板上都有独立的CPU或NP进行转发处理,主控板属于路由器的控制层,主控板根据路由协议会话交互得到路由信息,并生成路由表项,主控板将生成的路由表项存储在主控板的FIB表中,并将该FIB表下发给各个接口板。
接口板在接收到IP报文时,就会在FIB表中查找与IP报文的目的地址匹配的路由条目,并基于匹配的路由条目对IP报文转发。
另外,本申请实施例还可以包括其它类型的路由器,且这些路由器均具备生成FIB表和转发FIB表给接口板或线卡盒子的功能,以及在FIB表中查询并转发报文或数据包的功能。
下面对本申请实施例中所涉及的FIB表、路由表项等概念进行说明。
路由表项,是指用于指示路由器对数据包/IP报文等流量进行转发的表项。每个路由表项中包括一条路由与出接口之间的对应关系,其中,所述路由中包括:目的地址/掩码、下一跳地址、标志和时间戳等信息,如表1所示。
Figure PCTCN2019110624-appb-000001
表1
参见表1,为本实施例示出的一种FIB表,该FIB表中包括两个路由表项,进一步地,路由表项1中包括一条路由与出接口“Vian-interface1”之间的对应关系,路由表项2中包括另一条路由与出接口“InLoopBack0”之间的对应关系。其中,这些路由与出接口之间的对应关系,以及每条路由所携带的目的地址/掩码、下一跳地址等内容均可以预先设定。
可选的,服务器或者主控板可以通过路由协议从外部学习,或者本地静态配置获取大量的路由,然后提取出活跃的路由形成FIB表。
可选的,上述服务器或主控板可以通过数据包或者IP报文的方式广播FIB表给线卡盒子。
如图3所示,本申请实施例提供了一种路由表项生成方法,该方法包括以下步骤:
步骤101:获取M个第一路由表项,每个所述第一路由表项中包括一条路由与一个出接口之间的对应关系,M≥2,M为正整数。
其中,每个第一路由表项中的每条路由包括:一个目的地址和与所述目的地址对应的一个掩码,且每条所述路由的目的地址和掩码均为二进制数,例如,一条路由的目的地址/掩码为000/111,并且目的地址的位数与掩码的位数相同。
本申请各实施例中,目的地址和掩码均用二进制0/1表示,且二进制表示的目的地址的个数与掩码的个数相同。示例地,设置二进制掩码的“1”和“0”表示对目的地址的关心程度,如果目的地址对应的掩码是“1”,则表示关心该目的地址内容;如果掩码是“0”则表示不关心该目的地址内容。
例如,一条路由(路由表项)中包括:目的地址为:10101100,对应的掩码为11111100,则该掩码最后两位“00”表示不关心其对应的目的地址内容,本实施例中对不关心的地址可以用“*”来代替,则上述路由的目的地址可以表示为:101011**。如果一条路由的目的地址所对应的所有掩码都是1,则表示该路由的目的地址的全部内容都是要关心的,所以目的地址不变,写成:10101101。
本实施例中,仅保留内容关心的目的地址,对内容不关心的目的地址用“*”来代替,便于在查找时节约时间,避免遍历所有目的地址。
步骤102:对所述M个第一路由表项进行合并,生成N个第二路由表项,所述N个第二路由表项中至少有一个第二路由表项,包括一条公共路由与一个出接口之间的对应关系,所述公共路由用于指示两条或两条以上的路由,且N<M,N为正整数。
可选的,所述公共路由中包括一个公共目的地址,该公共目的地址可以用于指示两个或两个以上路由的IP地址,且共用相同的掩码。
例如,如表2所示,生成的第二路由表项的公共路由中,包括一个公共目的地址“0**”和掩码“100”,且该公共路由与出接口2之间具有对应关系。
Figure PCTCN2019110624-appb-000002
表2
示例地,服务器或主控板将生成的N个第二路由表项通过FIB表发送给各个线卡盒子。
本实施例提供的方法,通过将M个第一路由表项合并生成N个第二路由表项,其中,N个第二路由表项中至少有一个第二路由表项包括公共路由,该公共路由可以替代M个第一路由表项的至少两条路由,从而大量地减少了第一路由表项的数量,节省了存储空间,并且该节省的存储空间可以用于保存更多的路由表项,满足大容量的市场需求。
可选的,在本实施例的一种具体的实现方式中,如图4所示,上述步骤102具体包括:
步骤1021:获取所述M个第一路由表项中的每条路由的各个目的地址所对应的比特位。
其中,第一路由表项中的路由包括:一个目的地址和与所述目的地址对应的一个掩码,且每条所述路由的目的地址和掩码均为二进制数。比如,一个路由表项包括目的IP地址/掩码表示为:000/111,其中,目的IP地址的000按照比特位顺序排序分别是:第1bit,第2bit和第3bit。
例如,其中一个第一路由表项为“路由000对应出接口2”,获取该条路由的比特位包括:获取路由000的第1比特位“0”,第2比特位“0”和第3比特位“0”。
步骤1022:根据路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的比特位,对所述M个第一路由表项进行合并,生成所述N个第二路由表项。
具体地,步骤1022包括:
1)将所述M个第一路由表项中的M个路由配置在一个多维度空间体的n个顶点上,且M≤n,n为正整数。
2)按照所述M个第一路由表项中路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的比特位,对所述多维度空间体进行切分直到满足第一条件为止,生成多个低维度空间体。
其中,所述第一条件为:在切分后的低维度空间体的一个平面内的所有顶点都被相同出接口的路由所填充,或者,在切分后的低维度空间体内无路由。
进一步地,该过程包括:确定所述多维度空间体的第一平面,所述第一平面中包含同一出接口的路由数最多;按照所述同一出接口的各个路由的目的地址的比特位,对所述多维度空间体进行切分,形成第一空间体和第二空间体;分别判断所述第一空间体和所述第 二空间体是否都满足所述第一条件。
如果都满足,则停止切分,所述多个低维空间体为所述第一空间体和所述第二空间体;
如果都不满足所述第一条件,继续对所述第一空间体和所述第二空间体进行切分直到切分后生的空间体都满足所述第一条件为止,并根据所有切分后得到的空间体得到所述多个低维空间体;
如果有一个低维空间体不满足所述第一条件,则对不满足所述第一条件的空间体进行切分,直到满足所述第一条件为止,得到所述多个低维空间体。
3)对满足所述第一条件的所有第一路由表项进行合并,生成所述N个第二路由表项。
示例地,对满足第一条件的第一要素的所有第一路由表项进行合并,所述第一条件的第一要素为在切分后的低维度空间体的一个平面内的所有顶点都被相同出接口的路由所填充。
或者,对满足第一条件的第二要素之外的所有第一路由表项进行合并,所述第一条件的第二要素为在切分后的低维度空间体内无路由,进而使得切分后无路由的低维度空间不参与第二路由表项的生成和合并。
本申请实施例使用二进制来表示路由,每条路由以3bit、6bit、8bit等表示,其中,IPv4路由为32bit,路由的IP地址中不关心的内容可以直接用“*”代替。例如,路由10101100对应的掩码为11111100,可以直接写为101011**。
为方便说明,本实施例中以路由为3bit进行说明。以一组第一路由表项集合为:000、001、010、011、100、110为例,且所有第一路由表项集合中的IP地址所对应的掩码均为关心,获取每个第一路由表项中包括路由与出接口之间的对应关系,具体关系如下:
路由000对应出接口2;
路由001对应出接口2;
路由010对应出接口2;
路由011对应出接口2;
路由100对应出接口2;
路由110对应出接口2;
路由101对应出接口1。
将上述7个路由配置在空间的n维空间体的各个顶点上,如图5a所示,建立了一个xyz 3个坐标轴的三维空间体。然后将各个路由,000、001、010、011、100、110配置在三维空间体的各个顶点,参见图5a的圆圈顶点所示,每个圆圈顶点设置一个路由。
本申请实施例可以采用降维合并算法,将具有相同出接口的路由合并成一个公共路由,从而将原多个第一路由表项合并成少数的第二路由表项,以减少路由表项的数量,从而节约存储FIB表的空间。
其中,所述降维合并算法主要过程包括:通过建立的顶点设置有路由的n维空间体形成一个路由空间,对该路由空间进行切分,每次切分后生成两个n-1维空间体。根据路由的空间分布情况选择不同方式进行切分,比如按照切分后,使出接口相同的路由尽量保留到同一个n-1维的空间中。然后再对n-1维的空间体进行切分,降低维度,直到切分后的低维空间体的一个平面内的所有顶点都被路由所填充,且均是相同出接口的路由;或者,在切分后的低维空间体内无路由;由于该算法的关键环节在于选择n维空间体切分方式, 以便对n维空间体降低维度,最后合并相同出接口,所以该算法称之为降维合并算法。
需要说明的是,本申请实施例所述的n维空间体和n-1维空间体,是指由路由顶点组成的几何形状或几何空间体,比如以由8个顶点组成的三维空间体为例,如图5a所示,第一次切分后,得到两个几何空间体,这两个几何空间体各自包括4个路由顶点,且这4个路由顶点均可以被划分在一个平面上,因此切分后的每个几何空间体,相比于原8个路由顶点的三维空间体而言,是一个二维的空间体,所以称原三维空间体经过一次切分后剩余的4个顶点组成的平面为二维空间体,即将n维空间体切分后形成n-1维的空间体。
同理地,将该平面所在的空间体再次切分,得到由一个或两个路由顶点组成的点,或者线段,是一维,所以将由4个路由顶点组成平面的空间体继续切分之后形成,由一个或两个路由顶点组成的一维空间体。
在一种可能的设计中,如图5a所示,一种按照降维合并算法对三维空间体进行切分和降维,具体过程包括:
S1:筛选出路由数量对应最多的出接口。
S2:确定包含相同出接口的路由数量最多的平面,比如第一平面,该第一平面由4个路由路由顶点000、001、011和010,在该第一平面所对应的轴向位置,按照第1bit进行切分,将n维空间体切分为两个n-1维的空间体;由于对目的地址按照第1bit进行切分,即关心第1比特位的内容,其余比特位的内容不关心,不关心的比特位可以用“0”来表示,进而按照所述第1bit位切分之后,掩码变为100。
图5a中,出接口2对应的路由数量最多,且由路由“000,001,011,010”四个顶点组成的第一平面对应的出接口相同,且根据上述第一条件:在切分后的低维空间体的一个平面内的所有顶点都被路由所填充,且均是相同出接口的路由;对该三维空间体在路由000和100的中点x/2为轴进行切分,生成两个空间体,比如空间0和空间1。
如图6所示,空间0中包括4条路由表项,分别是:
路由000对应出接口2;
路由001对应出接口2;
路由010对应出接口2;
路由011对应出接口2。
S3:判断切分后的低维空间是否均满足第一条件,如果满足,则对满足所述第一条件的所有路由进行合并,生成第二路由表项;如果不满足,则继续对其进行切分直到满足所述第一条件为止。
所述第一条件,可称为中止条件或者跳出条件,具体包括以下两种情况:
情况一:在切分后的低维空间体的一个平面内的所有顶点都被路由所填充,且均是相同出接口的路由,合并为一条路由公共路由后跳出。
可选的,一种特殊的情况是,在最低维空间时,仅一条主机路由即可充满整个路由空间,所以必定会跳出。
情况二:在切分后的低维空间体内无路由;即空间内无路由,中止跳出。
如图6所示,对三维空间体第一次切分后,生成的空间0和空间1两个立体空间,其中,空间0满足第一条件的情况一,所以可合并成一个第二路由表项:路由0**对应出接口2。
对于空间1,不满足上述第一条件,则需要继续切分,比如按照第3bit进行切分,此时掩码变为101,中间位的掩码“0”表示对目的地址的第2比特位的内容不关心,切分方法如图5b所示,沿着路由100和101的中点z/2位置进行切分,得到两个低维空间如表3所示:
空间0 空间1
路由100对应出接口2 路由101对应出接口1
路由110对应出接口2  
表3
其中,切分后的空间0满足第一条件的情况一,所以可以合并生成一个第二路由表项:路由1*0对应出接口2。其中,“*”可以替代“1”或者“0”,即路由0**可以指代:路由000、路由001、路由010或者路由011。
判断另一个低维空间,空间1是否满足上述第一条件;由于空间1不是最低维度,所以不满足第一条件,需要再次切分,生成空间0(包括101对应出接口1)和空间1,其中,空间0满足第一条件的情况一,空间1满足第一条件的情况二(空间内无路由),所以可以得到一个第二路由表项,101对应出接口1,如图6所示。
合并满足所述第一条件的所有第二路由表项为:
路由0**对应出接口2;
路由1*0对应出接口2;
路由101对应出接口1。
比较切分合并前与合并后的第一路由表项和第二路由表项,如表4所示。
Figure PCTCN2019110624-appb-000003
表4
参见表4,本实施例提供的方法,合并前的第一路由表项为7条,合并后的路由表项为3条,即节约了存储4条路由表项的存储空间。
Figure PCTCN2019110624-appb-000004
表5
本实施例提供的方法,通过将M个第一路由表项合并生成N个第二路由表项,其中,N个第二路由表项中至少有一个第二路由表项包括公共路由,该公共路由可以替代M个第一路由表项的至少两条路由,大量地减少了第一路由表项的数量,从而节省了路由表项的存储空间,并且该节省的存储空间可以用于保存更多的路由表项,满足市场大容量的需求。
可选的,在上述对n维空间体进行切分的过程中,还可以采用其他方法进行切分,只要切分后满足跳出条件,且能够合并成第二路由表项即可,本申请对具体的各种切分方法不进行限制。
例如,对于上述的三维空间体的路由空间,一次切分切成两个空间体,一共可以有6种切分方法,分别是,沿轴向x、y、z三个轴有3种切法,如图5a所示,该切分方法可称为轴向切分。
本实施例中,针对3bit路由对路由空间进行了轴向切分,共有3中切分方法;对于由32bit的路由组成的空间体,有32个轴向,掩码的32位比特中每个比特位可以表示一个轴,所以共有32种切分方法。
另外,还可以包括其他切分方法来划分路由表项,比如切向切分方法。该方法是将空间体对角线的4个路由划分为一个路由集合,形成一个空间。如图7所示,虚线表示划分成一个路由集合的4个路由,具体地,将8个顶点路由按照对角线划可以分为:空间0包括{000,001,111,110};空间1包括{100,101,001,010}。然后再判断每个空间是否满足上述第一条件,如果不满足,则继续对不满足第一条件的空间体进行划分,最后合并出公共路由表项。
此外,本申请还可以采用其他方法划分对M个第一路由表项进行划分和合并,本申请实施例对此不进行限制。
在本实施例的另一种具体的实现中,上述方法还包括:对每个空间内的路由表项进行“增加”和“删除”。
例如,本实施例以对一个切分后的n-1维空间删除一条路由表项的过程进行说明,“删除”并合并路由的过程如下:
第一步:找到将要删除的路由所在的叶子节点;
第二步:查看删除路由后,是否需要重新切分该叶子节点所在的空间,如果需要切分,则进一步对该空间进行切分;
第三步:检查拆分后关联的父节点是否可以合并路由,如果可以合并,则对路由进行合并成一条公共路由;如果父节点不能合并,则查看是否满足原来切分的条件一致,如果不一致,则重新对路由进行划分。
具体地,如图8a所示,将路由表项“路由010对应出接口2”删除,得到剩余“空间0”中包括的3个路由表项,分别是:
路由000对应出接口2;
路由001对应出接口2;
路由011对应出接口2。
由于该空间0中形成的空间体的一个平面不满足所有顶点都被路由所填充的条件,即与原第一平面内所有路由的顶点都被填充的条件不一致,则需要对空间0中的3个路由进行切分,切分原则可以包括:出接口2对应的路由数量最多;按照第2bit进行切分,得 到掩码为110,因为第3bit的IP地址内容不关心,所以对应的掩码为0。
切分后得到空间0,包括两个路由表项,分别是:
路由000对应出接口2,和,路由001对应出接口2。
切分后形成的空间0满足在切分后的低维空间体的一个平面内的所有顶点都被路由所填充,且均是相同出接口的路由,则将“路由000对应出接口2,和,路由001对应出接口2”合并成一个公共路由表项为:路由0**对应出接口2。
同理地,对切分后得到的另一个空间,“空间1”而言,由于其不满足跳出条件,所以还需要进行切分,得到两个空间,分别是空间0和空间1,其次,新切分得到的空间1中剩余一个路由表项,满足跳出条件,得到一个第二路由表项为:路由011对应出接口2。
所以删除上述“路由010对应出接口2”后剩余的空间内,可以合并生成的第二路由表项为:
路由0**对应出接口2;
路由011对应出接口2。
同理地,对于“增加”路由表项后重新划分和生成第二路由表项的过程,与前述实施例的方法步骤相同,具体过程包括:先将添加的路由插入到叶子节点中,然后检查与父节点关联的路由两个空间是否可以合并成一条公共路由,如果可以合并,则直接合并成一条公共路由;如果不能合并,则进一步地查看是否满足之前切分的条件,如果不满足,重新切分和合并路。
例如,图8b所示,添加“路由111对应出接口1”至原路由表中,首先,将该路由添加至叶子节点中,所述叶子节点可以是最底层的“空间1”中;然后检测其与该最底层“空间1”所并列的“空间0”的两个空间是否可以合并成一个公共路由,本实施例中,由于空间0的“路由101对应出接口1”与新增加的空间1“路由111对应出接口1”可以合并,并占满父节点的空间1,所以合并后的公共路由为:路由1*1对应出接口1。
本实施例中,实现了第一路由表项任意地添加和删除,并且利用上述方法可以快速地重新调整和合并路由,形成新的第二路由表项。
需要说明的是,对于上述实施例中多个第一路由表项的合并过程,可以合并用“*”替代的比特位可以是路由的任意比特位,包括但不限于最后一个比特位。
例如图9所示,列出了8个均为6bit的第一路由表项,且这8个第一路由表项的出接口均相同,即这8条路由形成一个路由空间。对这8条路由进行合并,首先对第1bit进行轴向切分,切分后剩余的8个路由不能填满整个低一维空间(填满整个空间需要25=32个路由),即不满足第一条件,需要继续切分;由于这8条路由的第3bit均是“1”,所以在第3bit进行切分,切分后的8条路由仍然不能填满更低一维度的空间(填满整个空间需要24=16条路由);再继续切分,按照第5bit切分后,满足8条路由整个空间(23=8条路由),满足第一条件,即生成的8个路由被调整为:第1bit、第3bit和第5bit归纳在一起,均为1;剩余第2bit、第4bit和第6bit分别用“*”替代,合并后形成的公共路由为“1*1*1*”。
本实施例中,将存在比特位合并可能的路由,尽可能的切分到一个路由集合中,不断剔除不符合第一条件的路由,直到剩下的路由满足第一条件(在切分后的低维度空间体的一个平面内的所有顶点都被相同出接口的路由所填充),直到合并出公共的路由表项。
如图10所示,本申请实施例还提供了一种字典树(trie)生成方法,用于该方法可以应用于接收FIB表的装置/设备,例如接口板或者线卡盒子。另外,还可以是发送FIB表的装置/设备,比如主控板或者服务器。
进一步地,接收的装置/设备利用N个第二路由表项生成字典树,根据该字典树对路由的出接口进行快速查找。具体地,如图10所述,该方法包括以下步骤:
步骤1001:获取N个第二路由表项,所述N个第二路由表项中至少有一个,包括:一条公共路由与一个出接口之间的对应关系,所述公共路由用于指示两条或两条以上的路由,所述N个第二路由表项由M个第一路由表项生成,且N<M,N和M均为正整数。
其中,第一路由表项中的每条路由包括:一个目的地址和与所述目的地址对应的一个掩码,且每条所述路由的目的地址和掩码均为二进制数,且目的地址所包含的字符与二进制中包含的0/1数相同。
步骤1002:获取由所述M个第一路由表项生成所述N个第二路由表项时产生的至少一个指示信息。
比如上述方法实施例中,对于3bit的空间路由进行切分合并时,将由8个第一路由表项组成的原始路由空间分别按照第1bit、第3bit和第2bit进行切分,最后合并生成3个第二路由表项,其中可以包括3个指示信息,分别是:
第一指示信息,用于指示对8个第一路由表项组成的原始路由空间按照第1bit切分,形成两个路由空间;
第二指示信息,用于指示对第一次切分后剩余的3个路由组成的空间按照第3bit切分,又形成两个路由空间,其中一个路由空间中包含1条路由;
第三指示信息,用于指示对该包含1条路由的空间按照第2bit切分,生成两个路由空间,此时满足跳出条件,中止切分。
步骤1003:根据所述N个第二路由表项的N个路由所包含的目的地址,和,所述至少一个指示信息生成字典树。
所述字典树中包括:一个根节点,与所述根节点相连接的至少一条分支,每条所述分组由多个叶子节点组成,且所述根节点和至少一个叶子节点中设置有指示信息,所述指示信息用于指示其所在节点的下一层分支的目的地址所对应的比特位,其中,一个节点中设置有一个指示信息。
进一步地,步骤1003具体包括:根据所述N个第二路由表项的N个路由所包含的目的地址,和,所述至少一个指示信息生成字典树,包括:根据所述N个路由所包含的目的地址,确定所述目的地址中每个所述字符所对应的比特位;将用于指示每个所述字符所对应的比特位的指示信息配置在,指示目的地址字符的上一层分支的叶子节点或者根节点中,生成所述字典树。
此外,在所述字典树的最底层的叶子节点上还关联有出接口。
具体地,如图11所示在上述路由表项生成方法的实施例中,生成的3个路由表项分别为:
路由0**对应出接口2;
路由1*0对应出接口2;
路由101对应出接口1。
根据上述3个路由表项生成FIB表,并将该FIB表下发给各个接口板或者线卡盒子。其中,所述FIB表中还包括合并成上述3个第二路由表项的8个第一路由表项,以及,还包括如下信息:每个第一路由表项中每个路由的每个目的地址所对应的指示信息。例如,第一路由000对应出接口2,比特位为第1bit,第2bit和第3bit;在合并生成路由0**对应出接口2的过程中是按照第1bit进行切分的,掩码为100,如表6所示。
第二路由表项 指示信息
路由0**对应出接口2 按照第1bit切分
路由1*0对应出接口2 按照第3bit切分
路由101对应出接口1 按照第2bit切分
表6
由于,降维合并后的路由表项,存储和查找时需要设置一定顺序,trie树应根据空间切分顺序构造,空间切分时使用的切分平面对应路由的一个比特位,trie树根据切分过程中使用的比特位构造trie树。
如图11所示,例如第一次空间切分是按照第1bit轴向切分,所以trie树的根节点(root)对应的指示信息为第1bit,用于指示与根节点相连接的两个分支(空间0和空间1)所关心的目的IP地址的比特位。后面的节点依次类推,在空间1的中配置第3bit的指示信息,用于指示下一层级所关心的目的IP的比特位,对于没有指示的比特位用“*”表示,其中“*”可以替换为“1”或者“0”,进而达到指示两条路由的目的。
同理地,在下一个层级的空间中设置指示信息为第2bit,用于指示目的IP的第2个比特位是0,即路由101。
另外,参见图11所构建的字典树,本实施例还提供了一种路由查询方法,具体地,该方法包括:
获取至少一个路由,每个所述路由均由二进制“0/1”字符表示;
将每个路由的“0/1”按照字典树中配置的每个节点的指示信息逐级查找,直到路由中的所有“0/1”字符均遍历完为止,并查找出最后一个“0”或“1”字符;
根据所述查找的最后一个“0”或“1”字符所关联的出接口确定当前路由的出接口。
近一步地,如图11所示,以查找路由101的出接口为例,查找方法包括:根据所述字典树中的根(root)节点中配置的指示信息,指示第1bit,确定路由101的第1bit;根据所述根节点的下一层指示“1”中配置的指示信息,指示第3bit,确定路由101中的第3比特位“1”;最后根据第3bit中配置的指示信息,指示第2bit,确定路由101的字符“0”所关联的出接口为1,进而确定出路由101所对应的出接口为1。
同理地,对于路由0**和路由1*0查找出接口的方法与上述方法相同,比如查找路由0**的出接口,在根节点的指示信息中,指示第1bit,对应的字符是“0”,后面两位字节用“*”替代,不关心,所以找到该字符“0”对应的出接口是2,所以路由0**所对应的出接口是2。
本实施例中提供的方法,根据每次空间切分时使用比特位构建的字典树,对路由的各个字符与字典树中的根节点或叶子节点所配置的指示信息进行比较,例如字典树根节点存储的指示信息是第3bit,那么应使用查找路由的第3bit字符与根节点的两个子节点的信 息进行比较,逐级查找,直到遍历路由上的所有字符后,从而能够快速查找出每个路由对应的出接口。
此外,在根据N个第二路由表项生成字典树的结构中,还可以包括其它类型的字典树,比如图12所示,为一种包括所有路由字符的指示信息的字典树,该字典树中组成每个路由的“1/0”字符都对应一个指示信息来指示比特位,且所述指示信息所指示的比特位可以是按照前述切分过程中产生的任意比特位,包括但不限于是:第1bit、第2bit和第3bit的顺序,该字典树从根节点中配置的指示信息开始,逐级指示下一层所关心的目的IP的比特位,直到最后叶子节点所关联的出接口为止。
本实施例提供的方法,生成了包括有公共路由的路由表项形成的字典树,相比于原来全部字符组成的字典树分支减少、字典树的节点减少,所以对于查找的线卡盒子或接口板可以快速查找出路由的出接口,不需要使用片外内存,减少了转发时延。
参见图13,为本申请实施例提供的一种路由表项生成装置的结构示意图。所述装置可以是前述实施例中的服务器或者主控板,用于实现前述实施例中的路由表项生成方法。
如图13所示,所述路由表项生成装置130可以包括获取单元1301和生成单元1302,此外,所述装置130还可以包括更多或更少的部件,例如发送单元、存储单元等,本申请对此不进行限定。
进一步地,获取单元1301,用于获取M个第一路由表项,每个所述第一路由表项中包括:一条路由与一个出接口之间的对应关系,且M≥2。
生成单元1302,用于对所述M个第一路由表项进行合并,生成N个第二路由表项,所述N个第二路由表项中至少有一个第二路由表项包括:一条公共路由与一个出接口之间的对应关系,所述公共路由用于指示两条或两条以上的路由,且N<M,N和M均为整数。
可选的,在本申请实施例的一种具体实现方式中,第一路由表项中的路由包括一个目的地址和与所述目的地址对应的一个掩码,且每条所述路由的目的地址和掩码均为二进制数;所述生成单元1302,具体用于获取所述M个第一路由表项中的每条路由的各个目的地址所对应的比特位;按照路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的比特位,对所述M个第一路由表项进行合并,生成所述N个第二路由表项。
可选的,在本申请实施例的另一种具体实现方式中,所述生成单元1302,具体用于将所述M个第一路由表项中的M个路由配置在一个多维度空间体的n个顶点上,M≤n;按照所述M个第一路由表项中路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的比特位,对所述多维度空间体进行切分直到满足第一条件为止,生成多个低维度空间体,所述第一条件为:在切分后的低维度空间体的一个平面内的所有顶点都被相同出接口的路由所填充;或者,在切分后的低维度空间体内无路由。
所述生成单元1302,具体还用于对满足所述第一条件的所有第一路由表项进行合并,生成所述N个第二路由表项。
可选的,在本申请实施例的又一种具体实现方式中,所述生成单元1302,具体用于确定所述多维度空间体的第一平面,所述第一平面中包含同一出接口的路由数最多;按照所述同一出接口的各个路由的目的地址的比特位,对所述多维度空间体进行切分,形成第一空间体和第二空间体;分别判断所述第一空间体和所述第二空间体是否都满足所述第一条 件;如果都满足,则停止切分,所述多个低维空间体为所述第一空间体和所述第二空间体。
可选的,在本申请实施例的又一种具体实现方式中,所述生成单元1302,还用于如果都不满足所述第一条件,继续对所述第一空间体和所述第二空间体进行切分直到切分后生的空间体都满足所述第一条件为止,并根据所有切分后得到的空间体生成所述多个低维空间体;
或者,如果有一个低维空间体不满足所述第一条件,则对不满足所述第一条件的空间体进行切分,直到满足所述第一条件为止,得到所述多个低维空间体。
本方面提供的装置,生成单元通过将M个第一路由表项合并成N个第二路由表项,其中,N个第二路由表项中至少有一个第二路由表项包括公共路由,该公共路由可以替代M个第一路由表项的至少两条路由,从而大量地减少了第一路由表项的数量,节省了路由表项的存储空间,并且该节省的存储空间可以用于保存更多的路由表项,从而满足市场大容量的需求。
参见图14,为本申请实施例提供的一种字典树生成装置的结构示意图,该装置140用于实现前述实施例中的字典树生成方法。
可选的,该装置140可以是前述实施例中的线卡盒子或者接口板。
如图14所示,所述装置140可以包括获取单元1401和生成单元1402,此外,所述装置140还可以包括更多或更少的部件,例如发送单元、存储单元等,本申请对此不进行限定。
获取单元1401,用于获取N个第二路由表项,所述N个第二路由表项中至少有一个第二路由表项包括:一条公共路由与一个出接口之间的对应关系,所述公共路由用于指示两条或两条以上的路由,所述N个第二路由表项由M个第一路由表项生成,且N<M,M和M均为整数;其中,第一路由表项中的每条路由包括一个目的地址和与所述目的地址对应的一个掩码,且每条所述路由的目的地址和掩码均为二进制数;
所述获取单元1401,还用于获取由所述M个第一路由表项生成所述N个第二路由表项时产生的至少一个指示信息;
生成单元1402,用于根据所述N个第二路由表项的N个路由所包含的目的地址,和,所述至少一个指示信息生成字典树,所述字典树中包括一个根节点,与所述根节点相连接的至少一条分支,每条所述分支由多个叶子节点组成,且所述根节点和至少一个叶子节点中设置有所述指示信息,用于指示其所在节点的下一层分支的目的地址所对应的比特位。
可选的,在本申请实施例的一种具体实现方式中,所述N个第二路由表项的公共路由包括公共目的地址和掩码,所述公共目的地址由若干个字符组成,每个所述字符对应一个比特位;
所述生成单元1402,具体用于根据所述N个路由所包含的目的地址,确定所述目的地址中每个所述字符所对应的比特位;将用于指示每个所述字符所对应的比特位的指示信息配置在,指示目的地址字符的上一层分支的叶子节点或者根节点中,生成所述字典树。
可选的,在本申请实施例的另一种具体实现方式中,所述字典树中的每个分支的最后一个节点中还关联有出接口。
参见图15,本申请实施例还提供了一种硬件设备,用于实现前述实施例所述的路由表项生成方法的部分或全部步骤。
可选的,所述硬件设备为第一设备。
如图15所示,该硬件设备包括:收发器151、处理器152和存储器153,此外,该硬件设备中还可以包括更多或更少的部件,或者组合某些部件,或者不同的部件布置,本申请对此不进行限定。
其中,处理器152为硬件设备的控制中心,利用各种接口和线路连接整个路由器的各个部分,通过运行或执行存储在存储器153内的软件程序和/或模块,以及调用存储在存储器内的数据,以执行所述硬件设备的各种功能。
处理器152可以由集成电路(integrated circuit,IC)组成,例如可以由单颗封装的IC所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器可以仅包括CPU,也可以是GPU、数字信号处理器(digital signal processor,DSP)、及收发模块中的控制芯片的组合。
收发器151可以包括接收机、发射机与天线等部件;用于接收或发送FIB表或者路由表项,以及与外部网络设备建立通信连接,并进行数据传输。
具体地,收发器151可以包括无线局域网(wireless local area network,WLAN)模块、蓝牙模块、基带(base band)模块等通信模块,以及该通信模块对应的射频(radio frequency,RF)电路,用于进行无线局域网络通信、蓝牙通信、红外线通信及/或蜂窝式通信系统通信。所述收发模块可以支持直接内存存取(direct memory access)。
在本申请的不同实施方式中,收发器151中的各种收发模块一般以集成电路芯片(integrated circuit chip)的形式出现,并可进行选择性组合,而不必包括所有收发模块及对应的天线组。例如,收发器可以仅包括基带芯片、射频芯片以及相应的天线以在一个蜂窝通信系统中提供通信功能。经由所述收发模块建立的无线通信连接,例如无线局域网接入或WCDMA接入。
存储器153用于存储执行本申请技术方案的程序代码,并由处理器152来控制执行。所述处理器152用于执行存储器153中存储的程序代码,实现上述实施例中的路由表项生成方法。
进一步地,存储器153可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,也可以和处理器集成在一起。
可选的,在一种可能的设计中,所述设备可以是服务器或主控板,还可以是其它具有路由表项生成功能的设备。
示例性地,所述设备为上述实施例提供的路由表项生成装置的硬件设备,进一步地,在本申请图13所示的路由表项生成装置实施例中,所述获取单元1301所要实现的功能可以由该设备的收发器151实现,或者由处理器152控制收发器151实现;生成单元1302所要实现的功能则可以由该设备的处理器152实现。
进一步地,所述存储器153用于存储计算机程序产品,所述计算机程序产品包括一个或多个计算机指令,例如路由表项生成指令、路由表项发送指令。在计算机上运行所述计算机指令时,全部或部分地产生按照本申请上述实施例所述的路由表项生成方法的流程或功能。
所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网络站点、计算机、服务器或数据中心通过有线或无线方式向另一个站点、计算机或服务器进行传输。所述计算机可读存储介质可为磁碟、光盘、只读存储记忆体ROM或随机存储记忆体RAM等。
此外,本实施例中,图15所示的硬件设备还可以是一种具有字典树生成装置和/或路由表项查询装置功能的设备,比如第二设备,用于实现前述实施例中的字典树生成方法和路由表项查询方法。
可选的,在一种可能的设计中,所述硬件设备可以是一种线卡盒子或者接口板,还可以是其它具有这样功能的设备,本申请对此不进行限定。
示例性地,在本申请前述图14所示的实施例中,所述获取单元1401所要实现的功能可以由图15中该硬件设备的收发器151实现,或者由处理器152控制收发器151实现;生成单元1402所要实现的功能则可以由该设备的处理器152实现。
进一步地,所述存储器153用于存储计算机程序产品,所述计算机程序产品包括一个或多个计算机指令,例如字典树生成指令、路由出接口查找指令。在计算机上运行所述计算机指令时,全部或部分地产生按照本申请上述实施例所述的字典树生成方法、路由表项查询方法的流程或功能。
所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网络站点、计算机、服务器或数据中心通过有线或无线方式向另一个站点、计算机或服务器进行传输。所述计算机可读存储介质可为磁碟、光盘、只读存储记忆体ROM或随机存储记忆体RAM等。
此外,本申请实施例提供了一种系统,该系统用于实现本申请实施例提供的一种路由表项生成方法、字典树生成方法的部分或全部步骤。
其中,所述系统包括前述实施例中的路由表项生成装置和字典树生成装置,或者该系统包括第一设备和至少一个第二设备,进一步地,所述第一设备为具有前述实施例中路由表项生成装置功能的设备,所述第二设备为具有前述实施例中字典树生成装置功能的设备。
可选的,所述第一设备和第二设备可以分设,也可以合设,本申请实施例对此不予限制。
可选的,在一种具体实现中,所述第一设备为服务器或主控板,所述第二设备为线卡盒子或者接口板。
可选的,在一种具体实现中,所述系统为路由器,比如PB路由器。
可选的,在一种具体实现中,该系统还包括至少一个第三设备,所述第三设备为交换盒子,可以理解地,所述系统还可以包括其它硬件设备和部件,本申请实施例对此不予限制。
另外,在上述实施例中的“单元”可以指特定应用集成电路(application-specific  integrated circuit,ASIC),执行一个或多个软件或固件程序的处理器和存储器,集成逻辑电路,和/或其他可以提供上述功能的器件。
本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。
本说明书中各个实施例之间相同相似的部分互相参见即可。尤其,对于一种路由表项生成装置、字典树生成装置的实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例中的说明即可。
此外,在本申请的描述中,除非另有说明,“多个”是指两个或多于两个。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
以上所述的本申请实施方式并不构成对本申请保护范围的限定。

Claims (15)

  1. 一种路由表项生成方法,其特征在于,所述方法包括:
    获取M个第一路由表项,每个所述第一路由表项中包括一条路由与一个出接口之间的对应关系,M≥2,M为整数;
    对所述M个第一路由表项进行合并,生成N个第二路由表项,所述N个第二路由表项中至少有一个第二路由表项,包括一条公共路由与一个出接口之间的对应关系,所述公共路由用于指示两条或两条以上的路由,N<M,N为整数。
  2. 根据权利要求1所述的方法,其特征在于,第一路由表项中的路由包括一个目的地址和与所述目的地址对应的一个掩码,且所述路由的目的地址和掩码均为二进制数;
    对所述M个第一路由表项进行合并,生成N个第二路由表项,包括:
    获取所述M个第一路由表项中的每条路由的各个目的地址所对应的比特位;
    根据路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的比特位,对所述M个第一路由表项进行合并,生成所述N个第二路由表项。
  3. 根据权利要求2所述的方法,其特征在于,所述根据路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的所述比特位,对所述M个第一路由表项进行合并,生成所述N个第二路由表项,包括:
    将所述M个第一路由表项中的M个路由配置在一个多维度空间体的n个顶点上,M≤n;
    按照所述M个第一路由表项中路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的比特位,对所述多维度空间体进行切分直到满足第一条件为止,生成多个低维度空间体;所述第一条件为:在切分后的低维度空间体的一个平面内的所有顶点都被相同出接口的路由所填充;或者,在切分后的低维度空间体内无路由;
    对满足所述第一条件的所有第一路由表项进行合并,生成所述N个第二路由表项。
  4. 根据权利要求3所述的方法,其特征在于,对所述多维度空间体进行切分直到满足第一条件为止,生成多个低维度空间体,包括:
    确定所述多维度空间体的第一平面,所述第一平面中包含同一出接口的路由数最多;
    按照所述第一平面中所述同一出接口的各个路由的目的地址的比特位,对所述多维度空间体进行切分,形成第一空间体和第二空间体;
    分别判断所述第一空间体和所述第二空间体是否都满足所述第一条件;
    如果都满足,则停止切分,所述多个低维空间体为所述第一空间体和所述第二空间体。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    如果都不满足所述第一条件,继续对所述第一空间体和所述第二空间体进行切分直到切分后生成的空间体都满足所述第一条件为止,并根据所有切分后得到的空间体生成所述多个低维空间体;
    或者,如果有一个低维空间体不满足所述第一条件,则对不满足所述第一条件的 空间体进行切分,直到满足所述第一条件为止,得到所述多个低维空间体。
  6. 一种字典树生成方法,其特征在于,所述方法包括:
    获取N个第二路由表项,所述N个第二路由表项中至少有一个第二路由表项,包括一条公共路由与一个出接口之间的对应关系,所述公共路由用于指示两条或两条以上的路由,所述N个第二路由表项由M个第一路由表项生成,M≥2,且N<M,N和M均为整数;其中,第一路由表项中的每条路由包括一个目的地址和与所述目的地址对应的一个掩码,且每条所述路由的目的地址和掩码均为二进制数;
    获取由所述M个第一路由表项生成所述N个第二路由表项时产生的至少一个指示信息;
    根据所述N个第二路由表项的N个路由所包含的目的地址,和,所述至少一个指示信息生成字典树,所述字典树中包括一个根节点,与所述根节点相连接的至少一条分支,每条所述分支由多个叶子节点组成,且所述根节点和至少一个叶子节点中设置有所述指示信息,所述指示信息用于指示其所在节点的下一层分支的目的地址所对应的比特位。
  7. 根据权利要求6所述的方法,其特征在于,根据所述N个第二路由表项的N个路由所包含的目的地址,和,所述至少一个指示信息生成字典树,包括:
    根据所述N个路由所包含的目的地址,确定所述目的地址中每个所述字符所对应的比特位;
    将用于指示每个所述字符所对应的比特位的指示信息配置在,指示目的地址字符的上一层分支的叶子节点或者根节点中,生成所述字典树。
  8. 一种路由表项生成装置,其特征在于,所述装置包括:
    获取单元,用于获取M个第一路由表项,每个所述第一路由表项中包括一条路由与一个出接口之间的对应关系,M≥2,M为整数;
    生成单元,用于对所述M个第一路由表项进行合并,生成N个第二路由表项,所述N个第二路由表项中至少有一个第二路由表项,包括一条公共路由与一个出接口之间的对应关系,所述公共路由用于指示两条或两条以上的路由,N<M,N为整数。
  9. 根据权利要求8所述的装置,其特征在于,第一路由表项中的路由包括一个目的地址和与所述目的地址对应的一个掩码,且所述路由的目的地址和掩码均为二进制数;
    所述生成单元,具体用于获取所述M个第一路由表项中的每条路由的各个目的地址所对应的比特位;根据路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的比特位,对所述M个第一路由表项进行合并,生成所述N个第二路由表项。
  10. 根据权利要求9所述的装置,其特征在于,
    所述生成单元,具体用于将所述M个第一路由表项中的M个路由配置在一个多维度空间体的n个顶点上,M≤n;按照所述M个第一路由表项中路由条数最多的出接口所对应的路由集合,以及所述每条路由的各个目的地址所对应的比特位,对所述多维度空间体进行切分直到满足第一条件为止,生成多个低维度空间体;所述第一条件为:在切分后的低维度空间体的一个平面内的所有顶点都被相同出接口的路由所填充;或 者,在切分后的低维度空间体内无路由;
    所述生成单元,具体用于对满足所述第一条件的所有第一路由表项进行合并,生成所述N个第二路由表项。
  11. 根据权利要求10所述的装置,其特征在于,
    所述生成单元,具体用于确定所述多维度空间体的第一平面,所述第一平面中包含同一出接口的路由数最多;按照所述第一平面中所述同一出接口的各个路由的目的地址的比特位,对所述多维度空间体进行切分,形成第一空间体和第二空间体;分别判断所述第一空间体和所述第二空间体是否都满足所述第一条件;如果都满足,则停止切分,所述多个低维空间体为所述第一空间体和所述第二空间体。
  12. 根据权利要求11所述的装置,其特征在于,
    所述生成单元,还用于如果都不满足所述第一条件,继续对所述第一空间体和所述第二空间体进行切分直到切分后生成的空间体都满足所述第一条件为止,并根据所有切分后得到的空间体生成所述多个低维空间体;
    或者,如果有一个低维空间体不满足所述第一条件,则对不满足所述第一条件的空间体进行切分,直到满足所述第一条件为止,得到所述多个低维空间体。
  13. 一种字典树生成装置,其特征在于,所述装置包括:
    获取单元,用于获取N个第二路由表项,所述N个第二路由表项中至少有一个第二路由表项包括一条公共路由与一个出接口之间的对应关系,所述公共路由用于指示两条或两条以上的路由,所述N个第二路由表项由M个第一路由表项生成,M≥2,且N<M,N和M均为整数;其中,第一路由表项中的每条路由包括一个目的地址和与所述目的地址对应的一个掩码,且每条所述路由的目的地址和掩码均为二进制数;
    所述获取单元,还用于获取由所述M个第一路由表项生成所述N个第二路由表项时产生的至少一个指示信息;
    生成单元,用于根据所述N个第二路由表项的N个路由所包含的目的地址,和,所述至少一个指示信息生成字典树,所述字典树中包括一个根节点,与所述根节点相连接的至少一条分支,每条所述分支由多个叶子节点组成,且所述根节点和至少一个叶子节点中设置有所述指示信息,所述指示信息用于指示其所在节点的下一层分支的目的地址所对应的比特位。
  14. 根据权利要求13所述的装置,其特征在于,
    所述生成单元,具体用于根据所述N个路由所包含的目的地址,确定所述目的地址中每个所述字符所对应的比特位;将用于指示每个所述字符所对应的比特位的指示信息配置在,指示目的地址字符的上一层分支的叶子节点或者根节点中,生成所述字典树。
  15. 一种计算机可读存储介质,所述存储介质中存储有指令,其特征在于,
    当所述指令被运行时,实现如权利要求1至5、或6至7中任一项所述的方法。
PCT/CN2019/110624 2018-10-12 2019-10-11 一种路由表项生成方法、字典树生成方法和装置 WO2020073988A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19871722.5A EP3737050A4 (en) 2018-10-12 2019-10-11 METHOD AND DEVICE FOR GENERATING ROUTING TABLE ENTRIES AND METHOD AND DEVICE FOR GENERATING A TRIE-TREE
US16/989,578 US11627072B2 (en) 2018-10-12 2020-08-10 Routing entry generation method and apparatus and trie generation method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811191267.8A CN111049746B (zh) 2018-10-12 2018-10-12 一种路由表项生成方法、字典树生成方法和装置
CN201811191267.8 2018-10-12

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/989,578 Continuation US11627072B2 (en) 2018-10-12 2020-08-10 Routing entry generation method and apparatus and trie generation method and apparatus

Publications (1)

Publication Number Publication Date
WO2020073988A1 true WO2020073988A1 (zh) 2020-04-16

Family

ID=70163646

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/110624 WO2020073988A1 (zh) 2018-10-12 2019-10-11 一种路由表项生成方法、字典树生成方法和装置

Country Status (4)

Country Link
US (1) US11627072B2 (zh)
EP (1) EP3737050A4 (zh)
CN (1) CN111049746B (zh)
WO (1) WO2020073988A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11621910B1 (en) * 2020-06-23 2023-04-04 Juniper Networks, Inc. Concurrent routing for network devices
CN113726907B (zh) * 2021-09-15 2024-03-19 腾讯科技(深圳)有限公司 一种路由处理方法、网元设备、装置以及可读存储介质
CN115378864B (zh) * 2022-08-09 2024-06-21 刘学 一种立体互联网络的路由表管理生成方法、电子设备及存储介质
CN115348169B (zh) * 2022-08-24 2023-09-22 大陆汽车研发(重庆)有限公司 用于车载网关的路由配置方法、装置、设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102055817A (zh) * 2010-12-30 2011-05-11 中国人民解放军信息工程大学 同源地址束汇聚方法及同源汇聚网络路由系统
CN103560963A (zh) * 2013-11-18 2014-02-05 中国科学院计算机网络信息中心 一种OpenFlow流表存储空间压缩方法
US20150281055A1 (en) * 2014-03-27 2015-10-01 Brocade Communications Systems, Inc. Techniques for aggregating hardware routing resources in a multi-packet processor networking system
CN105704040A (zh) * 2016-04-12 2016-06-22 桂林电子科技大学 一种路由表的构建和查找方法
CN108322394A (zh) * 2018-04-02 2018-07-24 京信通信系统(中国)有限公司 路由表建立、查找、删除及状态变更方法和装置

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7917145B2 (en) * 1992-11-02 2011-03-29 Broadcom Corporation Radio frequency local area network
US7369561B2 (en) * 2003-07-17 2008-05-06 Samsung Electronics Co., Ltd. Apparatus and method for route summarization and distribution in a massively parallel router
US7486672B2 (en) * 2004-04-20 2009-02-03 Samsung Electronics Co., Ltd. Apparatus and method for searching trie trees using masks with non-symbol boundaries and flooding default routes in a massively parallel router
US7519733B1 (en) * 2004-05-13 2009-04-14 Cisco Technology, Inc. Arrangement in a router for establishing multicast group hierarchy and coalescence
CN101388842B (zh) * 2008-10-30 2012-04-04 华为技术有限公司 一种存储方法和装置
CN101478551B (zh) * 2009-01-19 2011-12-28 清华大学 基于多核处理器的多域网包分类方法
CN102405623B (zh) * 2010-04-08 2014-10-08 华为技术有限公司 路由表项的存储方法和装置
CN102484610B (zh) * 2010-04-12 2015-01-21 华为技术有限公司 路由表建立方法和装置及路由表查找方法和装置
CN101969681A (zh) * 2010-11-08 2011-02-09 中国人民解放军空军工程大学 大规模移动自组织网络路由的实现方法
US9596222B2 (en) * 2011-08-02 2017-03-14 Cavium, Inc. Method and apparatus encoding a rule for a lookup request in a processor
US9491087B1 (en) * 2012-11-28 2016-11-08 The Arizona Board Of Regents On Behalf Of The University Of Arizona Devices and methods for forwarding information base aggregation
US10057130B2 (en) * 2012-12-21 2018-08-21 Airbus Ds Sas D2HCP protocol in ad hoc networks: merging of sub-networks and address conflict resolution
CN103401777B (zh) * 2013-08-21 2015-12-02 中国人民解放军国防科学技术大学 Openflow的并行查找方法和系统
CN104618244B (zh) * 2015-01-19 2018-03-02 迈普通信技术股份有限公司 一种sdn网络与传统ip网络互通的方法及系统
CN105939268B (zh) * 2015-10-28 2019-11-08 杭州迪普科技股份有限公司 一种二层转发表项聚合方法及装置
CN106254244B (zh) * 2016-07-28 2020-01-07 上海斐讯数据通信技术有限公司 一种基于sdn网络的合并流表项方法
CN106484865A (zh) * 2016-10-10 2017-03-08 哈尔滨工程大学 一种基于DNA k‑mer index问题四字链表字典树检索算法
CN106446246B (zh) * 2016-10-12 2019-10-11 网宿科技股份有限公司 通信系统、缓存服务器、缓存内容推送、查找方法及系统
CN108289104B (zh) * 2018-02-05 2020-07-17 重庆邮电大学 一种工业SDN网络DDoS攻击检测与缓解方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102055817A (zh) * 2010-12-30 2011-05-11 中国人民解放军信息工程大学 同源地址束汇聚方法及同源汇聚网络路由系统
CN103560963A (zh) * 2013-11-18 2014-02-05 中国科学院计算机网络信息中心 一种OpenFlow流表存储空间压缩方法
US20150281055A1 (en) * 2014-03-27 2015-10-01 Brocade Communications Systems, Inc. Techniques for aggregating hardware routing resources in a multi-packet processor networking system
CN105704040A (zh) * 2016-04-12 2016-06-22 桂林电子科技大学 一种路由表的构建和查找方法
CN108322394A (zh) * 2018-04-02 2018-07-24 京信通信系统(中国)有限公司 路由表建立、查找、删除及状态变更方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3737050A4 *

Also Published As

Publication number Publication date
EP3737050A1 (en) 2020-11-11
US20200374214A1 (en) 2020-11-26
CN111049746B (zh) 2022-04-22
EP3737050A4 (en) 2021-05-12
US11627072B2 (en) 2023-04-11
CN111049746A (zh) 2020-04-21

Similar Documents

Publication Publication Date Title
WO2020073988A1 (zh) 一种路由表项生成方法、字典树生成方法和装置
US6778532B1 (en) Packet relaying apparatus and high speed multicast system
EP2560327B1 (en) Routing table establishment method and device
CN112425131B (zh) 一种acl的规则分类方法、查找方法和装置
US20050018683A1 (en) IP address storage technique for longest prefix match
CN108718278B (zh) 一种报文传输方法和装置
US8923298B2 (en) Optimized trie-based address lookup
JP2004537921A (ja) 高速パケット転送のための方法及びシステム
CN107347035B (zh) 路由查找方法、装置、分配节点、查找节点及入口节点
EP3280104B1 (en) Ip routing lookup
CN103107945B (zh) 一种快速查找ipv6路由的系统及方法
CN115426312B (zh) 一种大规模多模态网络中标识管理及优化转发方法和装置
Le et al. Memory-efficient and scalable virtual routers using FPGA
CN106453091B (zh) 路由器转发平面的等价路由管理方法和装置
US7042884B2 (en) Network address forwarding table lookup apparatus and method
CN111294285B (zh) 一种网络数据的分发方法及负载均衡器
CN112667640B (zh) 一种路由地址存储方法及装置
CN103457855A (zh) 无类域间路由表建立、以及报文转发的方法和装置
WO2023088226A1 (zh) 转发报文的方法以及相关设备
CN104539537B (zh) 一种路由查找方法和装置
Vijay et al. Implementation of memory-efficient linear pipelined IPv6 lookup and its significance in smart cities
CN117640513A (zh) 一种数据处理方法、装置和系统
CN114979090A (zh) IPv6数据包处理方法、装置、计算机设备和存储介质
CN110636005B (zh) 知识中心网络的知识路由方法及装置
JP2002325091A (ja) フロー識別検索装置および方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19871722

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019871722

Country of ref document: EP

Effective date: 20200804

NENP Non-entry into the national phase

Ref country code: DE