Luleå algorithm

The Luleå algorithm of computer science, designed by Degermark et al. (1997), is a technique for storing and searching internet routing tables efficiently. It is named after the Luleå University of Technology, the home institute/university of the technique's authors. The name of the algorithm does not appear in the original paper describing it, but was used in a message from Craig Partridge to the Internet Engineering Task Force describing that paper prior to its publication.[1]

The key task to be performed in internet routing is to match a given IPv4 address (viewed as a sequence of 32 bits) to the longest prefix of the address for which routing information is available. This prefix matching problem may be solved by a trie, but trie structures use a significant amount of space (a node for each bit of each address) and searching them requires traversing a sequence of nodes with length proportional to the number of bits in the address. The Luleå algorithm shortcuts this process by storing only the nodes at three levels of the trie structure, rather than storing the entire trie.

Before building the Luleå trie, the routing table entries need to be preprocessed. Any bigger prefix that overlaps a smaller prefix must be repeatedly split into smaller prefixes, and only the split prefixes which does not overlap the smaller prefix is kept. It is also required that the prefix tree is complete. If there is no routing table entries for the entire address space, it must be completed by adding dummy entries, which only carries the information that no route is present for that range. This enables the simplified lookup in the Luleå trie (Sundström 2007).

The main advantage of the Luleå algorithm for the routing task is that it uses very little memory, averaging 4–5 bytes per entry for large routing tables. This small memory footprint often allows the entire data structure to fit into the routing processor's cache, speeding operations. However, it has the disadvantage that it cannot be modified easily: small changes to the routing table may require most or all of the data structure to be reconstructed. A modern home-computer (PC) has enough hardware/memory to perform the algorithm.

First level

The first level of the data structure consists of

  • A bit vector consisting of 216 = 65,536 bits, with one entry for each 16-bit prefix of an IPv4 address. A bit in this table is set to one if there is routing information associated with that prefix or with a longer sequence beginning with that prefix, or if the given prefix is the first one associated with routing information at some higher level of the trie; otherwise it is set to zero.
  • An array of 16-bit words for each nonzero bit in the bit vector. Each datum either supplies an index that points to the second-level data structure object for the corresponding prefix, or supplies the routing information for that prefix directly.
  • An array of "base indexes", one for each consecutive subsequence of 64 bits in the bit vector, pointing to the first datum associated with a nonzero bit in that subsequence.
  • An array of "code words", one for each consecutive subsequence of 16 bits in the bit vector. Each code word is 16 bits, and consists of a 10-bit "value" and a 6-bit "offset". The sum of the offset and the associated base index gives a pointer to the first datum associated with a nonzero bit in the given 16-bit subsequence. The 10-bit value gives an index into a "maptable" from which the precise position of the appropriate datum can be found.
  • A maptable. Because the prefix tree is required to be complete, there can only exist a limited amount of possible 16-bit bitmask values in the bit vector, 678. The maptable rows correspond to these 678 16-bit combinations, and columns the number of set bits in the bitmask at the bit location corresponding to the column, minus 1. So column 6 for the bitmask 1010101010101010 would have the value 2. The maptable is constant for any routing table contents.

To look up the datum for a given address x in the first level of the data structure, the Luleå algorithm computes three values:

  1. the base index at the position in the base index array indexed by the first 10 bits of x
  2. the offset at the position in the code word array indexed by the first 12 bits of x
  3. the value in maptable[y][z], where y is the maptable index from the code word array and z is bits 13–16 of x

The sum of these three values provides the index to use for x in the array of items.

Second and third levels

The second and third levels of the data structure are structured similarly to each other; in each of these levels the Luleå algorithm must perform prefix matching on 8-bit quantities (bits 17–24 and 25–32 of the address, respectively). The data structure is structured in "chunks", each of which allows performing this prefix matching task on some subsequence of the address space; the data items from the first level data structure point to these chunks.

If there are few enough different pieces of routing information associated with a chunk, the chunk just stores the list of these routes, and searches through them by a single step of binary search followed by a sequential search. Otherwise, an indexing technique analogous to that of the first level is applied.

Notes

  1. ^ "second Europe trip for IETFers... Archived 2012-08-19 at the Wayback Machine", Craig Partridge to IETF, May 1, 1997.

References

  • Degermark, Mikael; Brodnik, Andrej; Carlsson, Svante; Pink, Stephen (1997), "Small forwarding tables for fast routing lookups", Proceedings of the ACM SIGCOMM '97 conference on Applications, Technologies, Architectures, and Protocols for Computer Communication, Luleå tekniska universitet, pp. 3–14, doi:10.1145/263105.263133, ISBN 0-89791-905-X, S2CID 17232414.
  • US 6266706, Degermark, Mikael; Brodnik, Andrej & Carlsson, Svante et al., "Fast routing lookup system using complete prefix tree, bit vector, and pointers in a routing table for determining where to route IP datagrams", issued 2001 .
  • Medhi, Deepankar; Ramasamy, Karthikeyan (2007), Network Routing: Algorithms, Protocols, and Architectures, Elsevier, pp. 510–513, ISBN 978-0-12-088588-6.
  • Sundström, Mikael (2007), Time and Space Efficient Algorithms for Packet Classification and Forwarding (PhD Thesis), Luleå University of Technology.

Read other articles:

هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (فبراير 2019) رون توماس معلومات شخصية الميلاد 19 نوفمبر 1950  لويفيل، كنتاكي  الوفاة 14 يوليو 2018 (67 سنة)   لويفيل، كنتاكي  الطول 198 سنتيمتر  مركز اللعب لاعب هجوم قوي

 

Futsal pada Bandung 2016LokasiLapang Futsal ITB Jatinangor, Kabupaten SumedangTanggal15–26 September 2016← 20122021 → Cabang olahraga futsal pada Pekan Olahraga Nasional XIX digelar dari 15 sampai 26 september 2016[1] di Lapang Futsal, ITB Kampus Jatinangor, Kabupaten Sumedang, Jawa Barat. Pada edisi kali ini hanya nomor putra yang dipertandingkan. Kualifikasi Tuan rumah serta tim peraih Medali emas PON XVIII langsung lolos ke PON XIX, sebanyak 10 tiket dipereb...

 

The Maltese Falcon Cartel de la película.Título El halcón maltésFicha técnicaDirección John HustonProducción Hal B. WallisGuion John HustonBasada en El halcón maltés de Dashiell HammettMúsica Adolph Deutsch[1]​Fotografía Arthur EdesonMontaje Thomas RichardsVestuario Orry-KellyProtagonistas Humphrey BogartMary AstorPeter LorreGladys George Jerome CowanSydney Greenstreet Elisha Cook, Jr. Ver todos los créditos (IMDb)Datos y cifrasPaís Estados UnidosAño 1941Estreno 3 de ...

هذه المقالة بحاجة لصندوق معلومات. فضلًا ساعد في تحسين هذه المقالة بإضافة صندوق معلومات مخصص إليها. هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها. (ديسمبر 2021) جزء من سلسلة مقالات عنالسياسة في روما القديمة الفترات ال...

 

Dromiciops bozinovici Біологічна класифікація Царство: Тварини (Animalia) Тип: Хордові (Chordata) Клада: Синапсиди (Synapsida) Клас: Ссавці (Mammalia) Інфраклас: Сумчасті (Marsupialia) Надряд: Австралодельфи (Australidelphia) Ряд: Мікробіотерії (Microbiotheria) Родина: Мікробіотерієві (Microbiotheriidae) Рід: Дромер (Dromiciops) Вид: D....

 

Kalmuk beralih ke halaman ini. Untuk desa di Iran, lihat Kalmak-e Gelal. KalmukХальмгуд Halm'gudJumlah populasi196,000Daerah dengan populasi signifikan Kalmykia (Rusia) Rusia183,372[1][2] Ukraina325[3] Kirgizstan12,000[4]BahasaKalmyk Oirat, RusiaAgamaKebanyakan Buddha TibetanMinoritas Kristen Ortodoks di Rusia[5] Mayoritas Islam Sunni di Kirgizstan Minorias Yudaisme di Belarus[6]Kelompok etnik terkaitMongol, khususnya...

يفتقر محتوى هذه المقالة إلى الاستشهاد بمصادر. فضلاً، ساهم في تطوير هذه المقالة من خلال إضافة مصادر موثوق بها. أي معلومات غير موثقة يمكن التشكيك بها وإزالتها. (ديسمبر 2018) هذه المقالة يتيمة إذ تصل إليها مقالات أخرى قليلة جدًا. فضلًا، ساعد بإضافة وصلة إليها في مقالات متعلقة بها...

 

JA全農 COUNTDOWN JAPANZEN-NOH COUNTDOWN JAPANジャンル 音楽番組(J-POP)放送方式 生放送放送期間 1974年4月6日 -放送時間 毎週土曜 13:00 - 13:53放送局 TOKYO FMネットワーク JFNパーソナリティ ジョージ・ウィリアムズ安田レイ(一覧も参照)提供 全国農業協同組合連合会(JA全農)公式サイト 公式サイトテンプレートを表示 『JA全農 COUNTDOWN JAPAN』(ジェイエーぜんのう カウントダウン...

 

English territorial police force This article relies excessively on references to primary sources. Please improve this article by adding secondary or tertiary sources. Find sources: West Midlands Police – news · newspapers · books · scholar · JSTOR (June 2013) (Learn how and when to remove this template message) West Midlands PoliceLogoAbbreviationWMPAgency overviewFormed1 April 1974 (1974-04-01)Preceding agenciesBirmingham City PoliceWe...

Kongres Partai Komunis Uni Soviet Конгресс Коммунистической партии Советского СоюзаLogo PKUSJenisJenisRapat partai Jangka waktuBervariasi, namun akhirnya lima tahunPimpinanOtoritasStatuta Partai Komunis Uni Soviet YurisdiksiPartai Komunis Uni Soviet Tempat bersidangIstana Negara KremlinMoskwa, Uni Soviet L • BBantuan penggunaan templat ini Kongres Partai Komunis Uni Soviet (bahasa Rusia: съезд КПСС) adalah sebuah pertemuan para ...

 

  هذه المقالة عن عنصر الهيدروجين (H). لمعانٍ أخرى، طالع هيدروجين (توضيح). هيليوم → هيدروجين ← - -↑H↓Li 1H المظهر غاز عديم اللون ذو وميض أرجواني في حالة البلازماالخطوط الطيفية للهيدروجين [ملاحظة 1] الخواص العامة الاسم، العدد، الرمز هيدروجين، 1، H تصنيف العنصر لا فلز المج...

 

American journalist Not to be confused with Yu Liu (entrepreneur) also known as Eric Liu. Eric LiuDeputy Assistant to the President for Domestic PolicyIn office2000–2001PresidentBill ClintonPreceded byElena KaganSucceeded byJohn Bridgeland Personal detailsBorn1968 (age 54–55)Poughkeepsie, New York, U.S.SpouseJená CaneEducationYale UniversityHarvard UniversityOccupationAuthor, educator, strategist, journalist Eric LiuTraditional Chinese劉柏川Simplified Chinese刘柏川Han...

Institute of Civil Engineering redirects here. For other uses, see Institute of Civil Engineering (disambiguation). This article does not cite any sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: UP Diliman Institute of Civil Engineering – news · newspapers · books · scholar · JSTOR (March 2017) (Learn how and when to remove this template message) UP Dilima...

 

89

88 ← 89 → 90素因数分解 89 (素数)二進法 1011001三進法 10022四進法 1121五進法 324六進法 225七進法 155八進法 131十二進法 75十六進法 59二十進法 49二十四進法 3H三十六進法 2Hローマ数字 LXXXIX漢数字 八十九大字 八拾九算木 89(八十九、はちじゅうく、はちじゅうきゅう、やそじあまりここのつ)は自然数、また整数において、88の次で90の前の数である。 性質 89 は24番目...

 

Kurdish leader Chieftain and GeneralSimko Shikakسمکۆی شکاک Simkoyê ŞikakBornIsmail Agha Shikak1887 (1887)Chehriq, Urmia County, IranDied(1930-07-19)July 19, 1930 (aged 43)OshnaviehCause of deathSurprise ambush and assassination by Imperial Iranian Armed ForcesNationalityKurdishCitizenshipQajar Iran, and later Pahlavi IranKnown forSimko Shikak revolt (1918–1922)TitleChieftain of the Shekak tribe, and General of the Shekak forces.PredecessorCewer AghaSuccessorAbolish...

American professional wrestler and manager (born 1979) This article is about the wrestler. For the footballer, see Prince Nana (footballer). This article needs to be updated. Please help update this article to reflect recent events or newly available information. (March 2019) Prince NanaNana at a Ring of Honor show in 2011Birth nameNana Osei BandohBorn1979 (age 43–44)Brooklyn, New York, United StatesProfessional wrestling careerRing name(s)Nana[1]Prince NanaBilled height5&#...

 

American government official (born 1977) Ely RatnerAssistant Secretary of Defense for Indo-Pacific Security AffairsIncumbentAssumed office July 25, 2021PresidentJoe BidenPreceded byRandall Schriver Personal detailsSpouse Jennifer Yang ​(m. 2009)​EducationPrinceton University (BA)University of California, Berkeley (PhD) Ely Stefansky Ratner[1] (born 1977) is an American political scientist currently serving as Assistant Secretary of Defense for Indo-Pac...

 

Untuk kegunaan lain, lihat Gajayana (disambiguasi). Artikel ini tidak memiliki referensi atau sumber tepercaya sehingga isinya tidak bisa dipastikan. Tolong bantu perbaiki artikel ini dengan menambahkan referensi yang layak. Tulisan tanpa sumber dapat dipertanyakan dan dihapus sewaktu-waktu.Cari sumber: Universitas Gajayana Malang – berita · surat kabar · buku · cendekiawan · JSTOR Universitas Gajayana MalangUniga MalangNama sebelumnya Akademi Manajemen Perusahaan dan Akuntasi Ma...

Voce principale: Associazione Calcio Femminile Trani 80. A.C.F. Marmi Trani 80Stagione 1982Sport calcio Squadra Marmi Trani 80 Allenatore Santino Barbato Presidente Antonio Gusmai Serie A3º posto. Coppa ItaliaOttavi di finale. 1981 1983 Si invita a seguire il modello di voce Questa voce raccoglie le informazioni riguardanti l'Associazione Calcio Femminile Marmi Trani 80 nelle competizioni ufficiali della stagione 1982. Indice 1 Stagione 2 Rosa 3 Note 4 Bibliografia Stagione Il massimo c...

 

Consorts of Romanian monarchs were persons married to the Romanian monarch during his reign. All monarchs of modern Romania were male with the title of King of the Romanians, but all Romanian consorts were women with the title of Queen of Romania and style Majesty, rather than Queen of the Romanians. The following women were Queens of Romania as spouses of the kings of modern Romania between 1859 and 1947: Princesses of the United Principalities House of Cuza Picture Name Father Birth Marriag...

 

Strategi Solo vs Squad di Free Fire: Cara Menang Mudah!