27
Fast IP Address Lookup Fast IP Address Lookup Algorithms Algorithms 정 정 정 정정정정정 정정정정정정 [email protected]

Fast IP Address Lookup Algorithms

  • Upload
    enoch

  • View
    35

  • Download
    2

Embed Size (px)

DESCRIPTION

Fast IP Address Lookup Algorithms. 정 성 권 서울대학교 컴퓨터공학과 [email protected]. 고속 라우터 요구. 인터넷 성장 : # hosts, traffic volume IP as universal application protocol Traffic pattern: local  global 병목 요소 : transmission  라우터. CPU. CPU. Memory. Memory. Line Card. Fwd Engine. Line - PowerPoint PPT Presentation

Citation preview

Page 1: Fast IP Address Lookup Algorithms

Fast IP Address Lookup Fast IP Address Lookup AlgorithmsAlgorithms

정 성 권서울대학교 컴퓨터공학과

[email protected]

Page 2: Fast IP Address Lookup Algorithms

고속 라우터 요구고속 라우터 요구 인터넷 성장 : # hosts, traffic volume IP as universal application protocol Traffic pattern: local global 병목 요소 : transmission 라우터

Page 3: Fast IP Address Lookup Algorithms

라우터 구조라우터 구조

LineCard

CPU

Memory

LineCard

LineCard

FwdEngine

FwdEngine

FwdEngine

LineCard

CPUMemory

FwdEng

LineCard

FwdEng

LineCard

FwdEng

FwdEng

LineCard

FwdEng

LineCard

FwdEng

LineCard

Page 4: Fast IP Address Lookup Algorithms

라우터 성능 요소라우터 성능 요소 Average Throughput

– bps– pps (1000~2000 bit/packet)

Worst case bounds– QoS concern

Page 5: Fast IP Address Lookup Algorithms

IP Address Lookup IP Address Lookup 요구요구 Routing table: 50,000 200,000 entries 처리속도 : 2.4 10Gbps 주소 길이 : 32 -> 128 bits 추가 기능

– flow identification– packet filtering

예 ) 5Gbps => ~5Mpps => 200ns/packet

Page 6: Fast IP Address Lookup Algorithms

척도척도 Average/Worst Case Lookup time

– 조건 : 테이블 크기 , 주소 길이 Update time memory flexibility

Page 7: Fast IP Address Lookup Algorithms

Address Lookup Address Lookup 문제문제 Aggregated IP address notation: CIDR Longest Prefix Matching

10*111*11010*11*0*1000*100000*100001*

Lookup Key => LPM 10001011 1000* 10111110 10* 01010101 0* 11011101 11*Prefix table {Pi}

LPM: Key 의 prefix 가 되는 , 즉 Key=Pis 를 만족하는 , Pi 중 길이가 최대인 것을 찾음 .

Page 8: Fast IP Address Lookup Algorithms

기본 기본 Algorithm Algorithm 요소요소 Trie Binary Search Hashing Indexing

Page 9: Fast IP Address Lookup Algorithms

Address Lookup Address Lookup 신기술신기술 Binary search on prefix length, Washington Univ.

(SIGCOMM97) Compressed multibit tries, Lulea Univ. (SIGCOMM97) Single-level prefix expansion, Stanford Univ.

(INFOCOM98) Binary search on prefix ranges, Washington Univ.

(INFOCOM98) Controlled prefix expansion, Washington Univ.

(SIGMETRICS98) & Swedish Inst. Of CS (Hot Interconnect 98)

Page 10: Fast IP Address Lookup Algorithms

TrieTrie

10*111*11010*11*0*1000*100000*100001*

0 1

Binary Tries: W accesses

Page 11: Fast IP Address Lookup Algorithms

One-level Prefix ExpansionOne-level Prefix Expansion

Stanford 방식– Prefixes expanded to 24bits: 224 entries

예 ) 1001* => 1001…0000 ~ 1001…1111

– High-order 24bits as table index

– Pros: memory-speed lookup– Cons: update overhead

not scalable to IP v6 memory cost

Page 12: Fast IP Address Lookup Algorithms

Controlled Prefix ExpansionControlled Prefix Expansion

Prefix expansion on multi-, carefully-selected-levels (multibit trie)

10*111*11010*11*0*1000*100000*100001*

2-3-2 expansion

Page 13: Fast IP Address Lookup Algorithms

Controlled Prefix ExpansionControlled Prefix Expansion(2)(2)

Balance between lookup time/update time/memory: “tunable”

Reduce distinct prefix lengths => help binary search on prefix lengths, too.

Easy H/W implementation– pipeline; multi-bank memory

Some ideas patented by Wash. Univ. & licensed for commercial uses

Page 14: Fast IP Address Lookup Algorithms

Level Compressed TrieLevel Compressed Trie

Page 15: Fast IP Address Lookup Algorithms

Lulea, Compressed TrieLulea, Compressed Trie

Page 16: Fast IP Address Lookup Algorithms

Lulea - level 1Lulea - level 1

Page 17: Fast IP Address Lookup Algorithms

Lulea - level 1 Lulea - level 1 (cont.)(cont.)

• Compact representation•on-chip cache, SRAM

• Problems:•Scalability•Update overhead

Page 18: Fast IP Address Lookup Algorithms

Binary SearchBinary Search on Prefix Length on Prefix Length

Hash table for each prefix length

Reduce # of hash table access: binary search on lengths

O(logW) Algorithm: good for long addresses

Page 19: Fast IP Address Lookup Algorithms

Binary SearchBinary Search on Prefix Length on Prefix Length(2)(2)

Marker

Page 20: Fast IP Address Lookup Algorithms

Prefix Length Prefix Length 분포분포 Backbone Router (MAE-East)

Page 21: Fast IP Address Lookup Algorithms

Binary SearchBinary Search on Prefix Length on Prefix Length(3)(3)

Mutating

•Small number of distinct prefix lengths after mutating•Each subtries only stores “failure levels” (rope)

Page 22: Fast IP Address Lookup Algorithms

IP v6 Address LookupIP v6 Address Lookup 128bit # memory accesses, table size Suggestion [V.Srinivasan, G. Varghese]

– Binary search on prefix length+ multibit trie

64

32 96

0-32 32-64 64-96 96-128

Binary search on prefixlength (hash table)

4 level multibit trie

Page 23: Fast IP Address Lookup Algorithms

Binary Search on RangeBinary Search on Range

O(log2N) Algorithm: – good for small # entries (e.g. enterprise

routers with ~1000 entries)

Multi-way search– logk2N

– use of CPU cache

Page 24: Fast IP Address Lookup Algorithms

Performance ComparisonPerformance Comparison

300MHz Pentium II

Page 25: Fast IP Address Lookup Algorithms

H/W H/W 구현구현 H/W 구현을 고려한 algorithm 기본 기법

– 파이프라인– 병렬화– Cheap DRAM

Page 26: Fast IP Address Lookup Algorithms

결언결언 High speed IP address lookup is feasible both in

S/W and H/W Tradeoff points & Evaluation criteria

– forwarding table size; address length– cost; lookup speed; update speed; flexibility; scalability

Applications: IP v4; IP v6; flow identification, Firewall filter

새로운 lookup 기법 + 복합 기법 적용 + 구현효율 Proprietary schemes: patented or secret

Page 27: Fast IP Address Lookup Algorithms

ReferencesReferences

Marcel Waldvogel , et al., "Scalable High Speed IP Routing Lookups", ACM SIGCOMM '97

Pankaj Gupta, Steven Lin, and Nick McKeown , "Routing Lookups in Hardware at Memory Speeds." IEEE Infocom April 1998, San Francisco.

George Varghese, "Fast Scalable Routing Lookups". Proceedings of ACM SIGCOMM, Sep 97.

V.Srinivasan, "Faster IP Lookups using Controlled Prefix Expansion". Proceedings of ACM SIGMETRICS, Sep 98.

B. Lampson, et al., "IP Lookups using Multiway and Multicolumn Search". Infocom 98.

Mikael Degermark, et al., "Small Forwarding Tables for Fast Routing Lookups", ACM SIGCOMM '97

Andreas Moestedt, et al., "IP Address Lookup in Hardware for High-Speed Routing", Hot Interconnects, August 1998

Michigan University and Merit Network. Internet Performance Management and Analysis (IPMA) Project, http://nic.merit.edu/~ipma/.