270 likes | 289 Views
Fast IP Address Lookup Algorithms. 정 성 권 서울대학교 컴퓨터공학과 sung@dandelion.snu.ac.kr. 고속 라우터 요구. 인터넷 성장 : # hosts, traffic volume IP as universal application protocol Traffic pattern: local global 병목 요소 : transmission 라우터. CPU. CPU. Memory. Memory. Line Card. Fwd Engine. Line
E N D
Fast IP Address Lookup Algorithms 정 성 권 서울대학교 컴퓨터공학과 sung@dandelion.snu.ac.kr
고속 라우터 요구 • 인터넷 성장: # hosts, traffic volume • IP as universal application protocol • Traffic pattern: local global • 병목 요소: transmission 라우터
CPU CPU Memory Memory Line Card Fwd Engine Line Card Fwd Eng Fwd Eng Line Card Line Card Fwd Eng Line Card Fwd Engine Fwd Eng Line Card Line Card Fwd Engine Line Card Fwd Eng Fwd Eng Line Card 라우터 구조
라우터 성능 요소 • Average Throughput • bps • pps (1000~2000 bit/packet) • Worst case bounds • QoS concern
IP Address Lookup 요구 • Routing table: 50,000 200,000 entries • 처리속도: 2.4 10Gbps • 주소 길이: 32 -> 128 bits • 추가 기능 • flow identification • packet filtering • 예) 5Gbps => ~5Mpps => 200ns/packet
척도 • Average/Worst Case Lookup time • 조건: 테이블 크기, 주소 길이 • Update time • memory • flexibility
Address Lookup 문제 • Aggregated IP address notation: CIDR • Longest Prefix Matching LPM: Key의 prefix가 되는, 즉 Key=Pis 를 만족하는, Pi중 길이가 최대인 것을 찾음. • 10* • 111* • 11010* • 11* • 0* • 1000* • 100000* • 100001* Lookup Key => LPM 10001011 1000* 10111110 10* 01010101 0* 11011101 11* Prefix table {Pi}
기본 Algorithm 요소 • Trie • Binary Search • Hashing • Indexing
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)
Trie 0 1 • 10* • 111* • 11010* • 11* • 0* • 1000* • 100000* • 100001* Binary Tries: W accesses
One-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
Controlled Prefix Expansion • Prefix expansion on multi-, carefully-selected-levels (multibit trie) • 10* • 111* • 11010* • 11* • 0* • 1000* • 100000* • 100001* 2-3-2 expansion
Controlled Prefix Expansion(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
Lulea - level 1 (cont.) • Compact representation • on-chip cache, SRAM • Problems: • Scalability • Update overhead
Binary Search 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
Binary Search on Prefix Length(2) • Marker
Prefix Length 분포 • Backbone Router (MAE-East)
Binary Search on Prefix Length(3) • Mutating • Small number of distinct prefix lengths after mutating • Each subtries only stores “failure levels” (rope)
IP v6 Address Lookup • 128bit • # memory accesses, table size • Suggestion [V.Srinivasan, G. Varghese] • Binary search on prefix length+ multibit trie Binary search on prefix length (hash table) 64 32 96 0-32 32-64 64-96 96-128 4 level multibit trie
Binary 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
Performance Comparison 300MHz Pentium II
H/W 구현 • H/W 구현을 고려한 algorithm • 기본 기법 • 파이프라인 • 병렬화 • Cheap DRAM
결언 • 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
References 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/.