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:

BontoalaKecamatanBontoalaPeta lokasi Kecamatan BontoalaTampilkan peta MakassarBontoalaBontoala (Sulawesi)Tampilkan peta SulawesiBontoalaBontoala (Indonesia)Tampilkan peta IndonesiaKoordinat: 5°07′53″S 119°25′25″E / 5.131494828308156°S 119.42357026240049°E / -5.131494828308156; 119.42357026240049Koordinat: 5°07′53″S 119°25′25″E / 5.131494828308156°S 119.42357026240049°E / -5.131494828308156; 119.42357026240049Negara I...

 

American politician John Baker HollisterMember of the U.S. House of Representativesfrom Ohio's 1st districtIn officeNovember 3, 1931 – January 3, 1937Preceded byNicholas LongworthSucceeded byJoseph A. Dixon Personal detailsBorn(1890-11-07)November 7, 1890Cincinnati, OhioDiedJanuary 4, 1979(1979-01-04) (aged 88)Cincinnati, OhioResting placeSpring Grove CemeteryPolitical partyRepublicanAlma mater St. Paul's School Yale University University of Munich Harvard Law Scho...

 

Halaman ini berisi artikel tentang satelit Jupiter. Untuk dewa dalam mitologi Yunani, lihat Io (mitologi). IoCitra Io dalam warna sejati yang diabadikan oleh Galileo. Titik hitam di sebelah kiri bagian tengah merupakan letusan gunung berapi Prometheus. Daratan berwarna keputihan dilapisi oleh endapan sulfur dioksida yang beku, sementara wilayah yang berwarna kuning memiliki kandungan sulfur yang tinggi.PenemuanDitemukan olehGalileo GalileiTanggal penemuan8 Januari 1610[1]Pen...

Artikel ini membutuhkan rujukan tambahan agar kualitasnya dapat dipastikan. Mohon bantu kami mengembangkan artikel ini dengan cara menambahkan rujukan ke sumber tepercaya. Pernyataan tak bersumber bisa saja dipertentangkan dan dihapus.Cari sumber: SMA Negeri 6 Semarang – berita · surat kabar · buku · cendekiawan · JSTOR SMA Negeri 6 SemarangInformasiDidirikan6 Agustus 1979JenisSekolah NegeriNomor Statistik Sekolah301036307006Kepala SekolahDrs. Mul...

 

Синелобый амазон Научная классификация Домен:ЭукариотыЦарство:ЖивотныеПодцарство:ЭуметазоиБез ранга:Двусторонне-симметричныеБез ранга:ВторичноротыеТип:ХордовыеПодтип:ПозвоночныеИнфратип:ЧелюстноротыеНадкласс:ЧетвероногиеКлада:АмниотыКлада:ЗавропсидыКласс:Пт...

 

Spanish footballer In this Spanish name, the first or paternal surname is Guerrero and the second or maternal family name is López. Julen Guerrero Guerrero in a 1995 advertPersonal informationFull name Julen Guerrero López[1]Date of birth (1974-01-07) 7 January 1974 (age 50)[1]Place of birth Portugalete, SpainHeight 1.79 m (5 ft 10 in)[1]Position(s) Attacking midfielderYouth career1982–1992 Athletic BilbaoSenior career*Years Team Apps (G...

Soccer clubFC BerlinShort nameFCBFounded2017; 7 years ago (2017)StadiumCoyer Field, Buffalo State CollegeCapacity2,000OwnersSantiago AlmadaGabriel AlmadaHead CoachesFrancesco Cardillo (UPSL)Greg Margolis (UWS)LeagueUPSL (men)United Women's Soccer (women)2023UPSL Fall: 6th, Midwest East Division (men)UWS: 17th, East Division (women)WebsiteClub website Home colors Away colors FC Berlin is a Canadian and American soccer club based in Kitchener, Ontario, Canada and Buffalo, New...

 

Meghan JadhavLahir7 Juni 1992 (umur 31)Mumbai Maharashtra, IndiaKebangsaanIndianPekerjaanaktorTahun aktif2005–sekarangDikenal atas Krishna di Jai Shri Krishna Gyan Prakash Chaturvedi di Saas Bina Sasural Abhimanyu di Suryaputra Karn Kartikeya di Mahakali Young David Fernandez di Brothers Vyomasur di Radha Krishna Meghan Jadhav adalah aktor televisi dan film India yang dikenal karena perannya sebagai Dewa Krishna di Jai Shri Krishna, Abhimanyu di Suryaputra Karn dan Kartikeya di M...

 

Sporting event delegationSweden at the1936 Summer OlympicsIOC codeSWENOCSwedish Olympic CommitteeWebsitewww.sok.se (in Swedish and English)in BerlinCompetitors171 in 17 sportsFlag bearerBo LindmanMedalsRanked 7th Gold 6 Silver 5 Bronze 9 Total 20 Summer Olympics appearances (overview)189619001904190819121920192419281932193619481952195619601964196819721976198019841988199219962000200420082012201620202024Other related appearances1906 Intercalated Games Sweden competed at the 1936 Summ...

森川智之配音演员本名同上原文名森川 智之(もりかわ としゆき)罗马拼音Morikawa Toshiyuki昵称モリモリ[1]、帝王[1]国籍 日本出生 (1967-01-26) 1967年1月26日(57歲) 日本東京都品川區[1](神奈川縣川崎市[2]、橫濱市[3]成長)职业配音員、旁白、歌手、藝人音乐类型J-POP出道作品外國人取向的日語教材代表作品但丁(Devil May Cry)D-boy(宇宙騎...

 

الجماعة الإسلامية في جنوب شرق آسيا التأسيس التنظيم الحلفاء  القاعدة تعديل مصدري - تعديل   الجماعة الإسلامية في جنوب شرق آسيا[1] هي منظمة إسلامية مسلحة في جنوب شرق آسيا تهدف إلى إنشاء دولة إسلامية في جنوب شرق آسيا، تضم هذه الدولة إندونيسيا وماليزيا وجنوب الفلبين وس...

 

1917 African-American protest in New York City For other uses, see Silence March. Silent ParadePart of the reaction to the East St. Louis riotsand anti-lynching movementThe 1917 Silent Parade in New YorkDateJuly 28, 1917LocationNew York City, New York, United States40°45′47″N 73°58′26″W / 40.76306°N 73.97389°W / 40.76306; -73.97389Caused byBlack people deaths during the East St. Louis riotsGoalsTo protest murders, lynchings, and other anti-black violence; t...

Agricultural and environmental issues The environmental impact of agriculture is the effect that different farming practices have on the ecosystems around them, and how those effects can be traced back to those practices.[1] The environmental impact of agriculture varies widely based on practices employed by farmers and by the scale of practice. Farming communities that try to reduce environmental impacts through modifying their practices will adopt sustainable agriculture practices. ...

 

Magnetic phenomenon Fig. 1.—Arago's spinning diskFig. 2.—Babagge and Herschel's experimentFig. 3.—Slit disks used by Babbage and HerschelArago's rotations is an observable magnetic phenomenon that involves the interactions between a magnetized needle and a moving metal disk. The effect was discovered by François Arago in 1824. At the time of their discovery, Arago's rotations were surprising effects that were difficult to explain. In 1831, Michael Faraday introduced the theory of elect...

 

Traditional Korean rice cakes with a sweet filling SongpyeonTypeTteokPlace of originKoreaServing temperature15–25 °C (59–77 °F)Food energy(per 8 serving)220 kcal (921 kJ)[1]Other informationFood related to Chuseok  Media: SongpyeonKorean nameHangul송편Hanja松䭏Revised RomanizationsongpyeonMcCune–Reischauersongp'yŏnIPA[soŋ.pʰjʌn] Songpyeon (Korean: 송편; Hanja: 松䭏) is a traditional Korean food made of rice...

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Januari 2023. BelgiumExel merupakan sebuah maskapai penerbangan yang berbasis di Belgia. Maskapai ini mengoperasikan penerbangan sewaan menuju Afrika, Asia dan Karibia sebagai bagian dari paket wisata untuk Thomas Cook. Sejarah Maskapai penerbangan ini didirikan dan...

 

السلطنة الجبرية 1417 – 1526   خارطة تقريبية لحدود السلطنة الجبرية في أوج اتساعها وفقًا لرأي الباحث خالد بن عزام الخالدي. سميت باسم جبر بن نبهان عاصمة الأحساء نظام الحكم دولةٌ وِراثيةٌ اللغة العربيّة الديانة الإسلام على المذهب السُّنِّي المالِكي[1] الشَّيخ، الأمير...

 

Olaug NilssenBiographieNaissance 28 décembre 1977 (46 ans)FørdeNationalité norvégienneFormation Université de BergenActivité ÉcrivaineAutres informationsDistinctions Liste détailléeSigmund Skard Fellowship (2004)Fonds du père Alfred Andersson-Rysst (2004)Language Prize (d) (2006)Prix de la littérature nynorske (2017)Prix Dobloug (2019)Prix Fritt-Ord (en) (2021)modifier - modifier le code - modifier Wikidata Olaug Nilssen, née le 28 décembre 1977 à Førde, est un romancière...

New Zealand speedway rider (1933–2018) Ronnie MooreMBEMoore in 1973Born(1933-03-08)8 March 1933Hobart, Tasmania, AustraliaDied18 August 2018(2018-08-18) (aged 85)Christchurch, New ZealandNationalityNew ZealanderCareer history1950–63, 1969–72Wimbledon Dons1974Coventry Bees Individual honours1954, 1959World Champion1952, 1972London Riders' Champion1952, 1960Brandonapolis1952, 1955, 1956, 1960The Laurels1956, 1962, 1968, 1969New Zealand Champion1960Tom Farndon Memorial winner Team hon...

 

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Desember 2022. Mieczysław StoorLahir(1929-09-05)5 September 1929Bojanowo, PolandiaMeninggal5 Oktober 1973(1973-10-05) (umur 44)Krasnik Lubelski, PolandiaPekerjaanPemeranTahun aktif1954–1973 Mieczysław Stoor (5 September 1929 – 5 Oktober...