METHOD OF FORWARDING DATA PACKETS, METHOD OF CREATING MERGED FIB KEY ENTRY AND METHOD OF CREATING A SEARCH KEY
20170366457 · 2017-12-21
Inventors
Cpc classification
H04L49/901
ELECTRICITY
International classification
Abstract
The method of creating a key entry includes inserting a routing instance identifier (RII) after at least a portion of a key entry of a routing instance (RI) FIB, in accordance with an encoding scheme. In other words, at least a portion of bits of the RI FIB key entry is located before bit(s) of the RII in the resulting, merged FIB key entry. Depending on the encoding scheme, the RII can be inserted at the end of the RI FIB key entry, or at an intermediary location within the RI FIB key entry (after a given number of bits). To form the merged FIB, the method is repeated multiple times on corresponding key entries of the RI FIB. There is also provided a method of creating a search key to lookup the merged FIB.
Claims
1. A method of creating a key entry of a merged FIB for at least two routing instances (RI) on a network node, each RI having a corresponding RI FIB with corresponding RI FIB key entries and a corresponding routing instance identifier (RII), the method comprising: inserting a corresponding RII after at least a portion of a corresponding RI FIB key entry.
2. The method of claim 1 wherein the RII is inserted at the end of the corresponding RI FIB key entry.
3. The method of claim 1 wherein the RII is inserted between two portions of the corresponding RI FIB key entry.
4. The method of claim 1 further comprising repeating the step of inserting on all the RI FIB key entries to create other merged FIB key entries, creating the merged FIB using all the merged FIB key entries.
5. The method of claim 4 further comprising identifying a common root in a plurality of the RI FIB key entries, wherein the merged FIB key entries have the corresponding RII immediately after the common root of the corresponding RI FIB key entries.
6. The method of claim 5 further comprising storing a value of the common root in a memory.
7. The method of claim 6 further comprising creating a search key by inserting the corresponding routing instance identifier in the destination address of the data packet to be routed after a number of bits corresponding to the value of the common root.
8. A method of creating a search key for at least two routing instances (RI) on a network node sharing a merged FIB having key entries, each RI having a corresponding routing instance identifier (RII), the key entries of the merged FIB each including a corresponding one of the RIIs, the method comprising: inserting a corresponding RII after at least a portion of a destination address of a data packet to be routed by the network node.
9. The method of claim 8 wherein the RII is inserted at the end of the destination address.
10. The method of claim 8 wherein the RII is inserted between two portions of the destination address.
11. The method of claim 8 further comprising retrieving a value of a common root from a memory, wherein the RII is inserted after a number of bits of the destination address corresponding to the value of the common root.
12. A method of forwarding a data packet with a network node having at least two routing instances (RIs) sharing a merged FIB, the merged FIB having key entries provided in a format including a routing instance identifier (RII) after at least a portion of a data packet address, in accordance with an encoding scheme, the method comprising: receiving the data packet; reading a destination address in the data packet; creating a search key by inserting a corresponding RII after at least a portion of the destination address, in accordance with the encoding scheme; selecting an output port for the data packet including looking up the merged FIB using the search key; and forwarding the data packet via the selected output port.
13. The method of claim 12 further comprising identifying at least one common root of a plurality of key entries of FIBs of the routing instances, and storing at least one corresponding common root value in the memory, wherein the step of creating the search key includes reading the value of the common root in the memory, and inserting the RII after a number of bits of the destination address corresponding to the value of the common root.
14. The method of claim 13 wherein the step of identifying includes identifying at least one common root of a plurality of key entries of a plurality of FIBs in a same private address space.
15. The method of claim 13, wherein the step of identifying includes identifying a plurality of common roots in key entries of a plurality of FIBs in different private address spaces.
16. The method of claim 16, wherein the common roots have the same length.
17. The method of claim 16 wherein at least some of the common roots have a different length.
18. The method of claim 12 wherein the step of looking up the merged FIB includes performing a multibit trie algorithm.
Description
DESCRIPTION OF THE FIGURES
[0041] In the figures,
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
DETAILED DESCRIPTION
[0056] As presented above, a single device can have more than one co-existing routing instance. Typically, each routing instance (RI) has a corresponding forwarding information base (FIB), which will be referred to herein as the corresponding RI FIB.
[0057] Each co-existing RI is attributed a routing instance identifier (RII). The RII can be a virtual network identifier (VNI) or a virtual router identifier (VRI) followed by a VNI, for instance, depending on the specific routing instances co-existing on a given device. The key entries of the merged FIB 16 are created by inserting the routing instance identifier (RII) into the key entries of the corresponding RI FIBs 12, 14. More specifically, prefixes P1-P3 in RI FIB 12 are extended by prepending two binary bits 10 and become prefixes eP1-eP3, respectively, in the merged FIB 16. Similarly, prefixes P1-P3 in RI FIB 14 are extended by prepending two binary bits 11 and become prefixes eP4-eP6, respectively, in the merged FIB 16. All the resulting rows of the encoded RI FIBs (encoded key entries and associated data) are then amalgamated into a merged FIB 16. The encoding of the key entries of the RI FIBs 12, 14 is performed in accordance with an encoding scheme. In this example encoding scheme, the RII is inserted at the beginning of the RI FIB 12, 14 initial/original key entries, and the RI FIB 12, 14 initial key entries extend after the corresponding RII in the corresponding key entry of the resulting merged FIB 16.
[0058] The example shown has been simplified for ease of explanation. For instance, an artificial IP address length of 8 bits is used, whereas IPv4 specifies 32 bits and IPv6 specifies 128 bits. Moreover, in a given embodiment, the number of key entries can vary from one FIB to another, the number of FIBs can vary, and the total length of RII can be of another value than 2 bits. FIBs can be divided into one or multiple private address spaces, and each private address space can have one or more common roots with the same or different length. It will be understood that the teachings of this specification can be applied to alternate embodiments where the address formats are IPv4 or IPv6 address formats, or other formats, and in applications requiring a different number of bits than 2 for the RII. Devices having more than one co-existing routing instance can be embodied in various forms of network nodes, such as routers, network switches, and even personal computers, tablets or smartphones.
[0059]
[0060] For each data packet received by the network node 18, the network node 18 can look up the merged FIB 16 using a single algorithm, independently of the routing instance responsible for the current data packet. More specifically, a search key 32 is created by encoding the destination address 30 of a received data packet in accordance with the encoding scheme. In the example encoding scheme presented in
[0061] It was found that the encoding scheme presented in
[0062] Turning now to
[0063] Turning now to
[0064] Accordingly, in accordance with a general aspect, there is provided a computer-implemented method of encoding a search key or a merged FIB key entry, wherein the encoded key has an RII after at least a portion of the initial key (e.g. after a common root value or at the end of the initial key). The key to be encoded can be a key entry of an RI FIB, to form an encoded key entry of a merged FIB, or a destination address of a data packet, to form a search key. The encoded key, either in the form of an encoded key entry or in the form of a search key, is typically stored in the memory of the device, but can alternately be stored in another form of memory accessible by the network node.
[0065] Indeed, with reference to
[0066] With reference to
[0067] Example Embodiments Using Multiple Trie Lookup Algorithms
[0068] Various forms of longest prefix match (LPM) lookup algorithms exist. A hash function is one example. The unibit trie is another example. In the unibit trie, the algorithm checks the bits one at a time for a matching prefix until it reaches a ‘dead end’. The dead end can be a bit corresponding to a given prefix length for which the value does not match any longer key entry in the table. Another longest prefix matching algorithm is the multibit trie in which the bits are checked by groups of fixed or variable size referred to as strides in an attempt to gain speed over the unibit trie. The selection of a stride size can be based on a trade-off between memory accesses and space requirements. Several variants of such algorithms exist.
[0069] On-chip search engines are generally used for devices such as data center switches and routers, as search throughput of network processing units (NPUs) can significantly exceed the speed of off-chip memory. Multibit trie algorithms have been used in the past as a satisfactory solution to longest prefix match lookups in such applications. However, when applied to merged FIBs of virtual networks now widely used in software defined networking (SDN) and network function virtualization (NFV), the efficiency of multibit trie algorithms can be limited, at least in applications where the multibit trie is sparsely populated, as sparsely populated multibit tries are relatively costly in terms of on-chip resources. An approach making the multibit trie less sparsely populated was sought.
[0070] Indeed,
[0071] A shared binary trie 54 is created to represent the merged FIB. The shared binary trie is divided into sub-tries T1-T6 according to a stride size of 3. A sub-trie is characterized by prefixes contained within the sub-trie, its child sub-tries, and pointer to a Rout Entry (RE) node array, where an RE node array stores next-hop information for prefixes within a sub-trie. Various encoding schemes, such as internal bitmap for prefixes and external bitmaps for child sub-tries, can be used to encode a sub-trie.
[0072] To lookup address 8′b00011011 that belongs to FIB 1, a search key 10′b1000011011 is created by prepending it with RII of 10. The root sub-trie T1 is checked first against the first stride 100. There is no prefix match in T1, and child sub-trie T2 is chosen. Then the second stride 001 is checked against sub-trie T2, and a match with eP1 is found. Accordingly, eP1 is recorded as the current LPM, and child sub-trie T4 is chosen. Lastly, the third stride 101 is checked against sub-trie T4, and two matches are found: eP2 and eP3. As eP3 has longer length than eP2, eP3 is chosen as the LPM for this stride. Since eP3 has longer length than the current LPM eP1, eP3 is chosen as the final LPM.
[0073] There are two shortcomings for the above approach. First, all prefixes in RI FIB 12 and RI FIB 14 share the same 3 Most Significant Bits (MSBs) 000, and this is not used to achieve higher memory utilization. Secondly, compared with the original FIBs such as FIB 12 and FIB 14, the merged FIB becomes sparser. Sparse tries can render bitmap encoding inefficient, which, in turn, can lead to lower memory efficiency.
[0074]
[0075] To lookup address 8′b00011011 that belongs to RI FIB 1, a search key 10′b0001011011 is created by inserting it with RII of 10 after the common root of 000. The root sub-trie T1 is checked first against the first stride 000. There is no prefix match in T1, and child sub-trie T2 is chosen. Then the second stride 101 is checked against sub-trie T2, and a match with eP1 is found. Accordingly, eP1 is recorded as the current LPM, and child sub-trie T3 is chosen. Lastly, the third stride 101 is checked against sub-trie T3, and two matches are found: eP2 and eP3. As eP3 has longer length than eP2, eP3 is chosen as the LPM for this stride. Since eP3 has longer length than the current LPM eP1, eP3 is chosen as the final LPM.
[0076] For emerging Software Defined Networks (SDN) and Network Function Virtualization (NFV), each customer is assigned a Virtual Network, where resources allocated to a Virtual Network include a set of virtual machines and an IP address block. There are two standard IP address formats, an IPv4 address format with a length of 32 bits, and an IPv6 address format with a length of 128 bits. Typically, private IPv4 or IPv6 addresses are used for the IP address block assignment, and a virtual machine is assigned a private IPv4 or IPv6 address. As an example, a customer A can be assigned an IPv4 address block of 192.168/16, where /16 means that all customer A's addresses has the same 16 bit prefix 192.168, and another customer B can be assigned an IPv4 address block of 192.168.20/24. Here, 192.168/16 and 192.168.20/24 are called prefix roots for customers A and B, respectively. As these two customers have overlapping IPv4 address blocks, they must be assigned different RIIs for proper routing.
[0077] For IPv4, there are three private address spaces: 10/8, 172.16/12, and 192.168/16. For IPv6, many private address spaces are available, where a private address space is identified by a 7 bit fixed prefix plus a 40 bit global ID. A customer is assigned an address block within a private address space.
[0078] The above FIB merging shown in
[0085] Turning now to
[0086] A merged FIB 116 is generated from the set of extended host routes from all routing instances (such as VPNs or VRs). A merged trie 154 is created to represent the merged FIB 116.
[0087] In the scenario shown in
[0088] By appending the RII after the host route, for the host route P1 shared by FIB 112 and FIB 114, their extended host routes eP1 and eP4 are very close to each other, in the same subtrie T3 of the merged FIB 116. Similarly, for the host route P3 shared by FIB 112 and FIB 114, their extended host routes eP3 and eP6 are very close to each other, in the same subtrie T6 of the merged FIB 116. As a result, higher memory efficiency is achieved in the merged FIB 116.
[0089] Indeed, in modern data centers, most entries in a FIB are host routes due to virtual machine moves, where a host route is assigned to a single host and has a length of 32 bits or 128 bits for IPv4 or IPv6, respectively. As all host routes for a given address format have the same length.
[0090] Referring to
[0091] Indeed, for IP lookups of virtual networks two multi-bit merged tries can be generated, one for prefix RI key entries in which the RII is inserted after a common root, and another one for host route key entries in which the RII is appended to the host route. Such an embodiment is illustrated in
[0092] Here, two parallel multi-bit trie lookup functions 72, 74 are performed, one for merged prefix FIB 72, the other for merged host route FIB 74. A priority encoder 76 is used to select the best match among the parallel lookup results, where the results from the merged host route FIB are given higher priority. If a match is found from the merged host route FIB function 74, the match is selected as the final LPM match, otherwise, the match from the merged prefix FIB lookup function 72 is selected as the final LPM match.
[0093] Indeed, simulations have demonstrated that for IPv4 using address block of 192.168/16, the solution can provide more than 30% in memory savings, whereas in a private address block scenario under IPv6, the solution can provide memory savings up to 50%.
[0094] As can be understood, the examples described above and illustrated are intended to be exemplary only. For instance, the methods presented above can be applied to processor chips for servers or other applications having similar search engine capabilities where key entries having an address format need to be looked up for matching. The key encoding scheme can be applied to other forms of lookup algorithms, such as search tree-based algorithms. The scope is indicated by the appended claims.