Small Forwarding Tables for Fast Routing Lookups - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Small Forwarding Tables for Fast Routing Lookups

Description:

minimize lookup time. How? Minimize number of memory accesses required during lookup ... Has a height of 32 there spans entire IP address space ... – PowerPoint PPT presentation

Number of Views:82
Avg rating:3.0/5.0
Slides: 17
Provided by: wwwunixE
Category:

less

Transcript and Presenter's Notes

Title: Small Forwarding Tables for Fast Routing Lookups


1
Small Forwarding Tables for Fast Routing Lookups
  • Presented by
  • Yan Li Lilian Atieno
  • Fall 2002

2
Outline
  • Introduction
  • Routing and Forwarding Tables
  • Design goals and parameters
  • The data structure
  • Performance measurements
  • Scaling
  • Related work
  • Further work
  • Conclusion

3
Introduction
  • Forwarding table data structure
  • objective Fast routing lookup (experiments on
    Pentium pro Alpha 21164 - 2 million lookups/sec
  • Basic concept
  • Finding routing entry with longest matching
    prefix
  • Current IP router design
  • Store routing entries of most recently used
    destination addresses in the cache (forwarding
    table)
  • Assumptions locality of reference cache high
    hit rate

4
Routing with forwarding engine
  • Inbound interfaces send packets header to
    forwarding engines
  • F. engines determines outbound interface and
    sends this informaton to inbound interface.
  • Inbound interface send packet to outbound
    interface
  • Network processor has routing tables,participates
    in routing protocols, admin. duties e.t.c.
  • Example router BBN MGR router

5
Routing without forwarding engine
  • Inbound interface has processing elements to
    decide on the outbound interface
  • Example GRF routers from Ascend communications

6
Limitations on current design
  • Rapid growth of internet
  • Internet routing table too large to fit into
    on-chip caches
  • Off-chip memory references (DRAM) too slow to
    support routing speeds
  • Solution
  • Data structure that represents large routing
    tables in a very compact form that can fit in
    secondary cache
  • So far largest r. table in the internet can fit
    into 150-160KByte data structure

7
Design goals of data structure
  • Main goal
  • minimize lookup time
  • How?
  • Minimize number of memory accesses required
    during lookup
  • Minimize size of data structure to fit in cache
  • Assumtion
  • All routing entries specifying the same next hop
    can share the same routing information

8
The data structure
  • The forwarding table data structure is
    essentially a prefix tree with 3 levels
  • Has a height of 32 there spans entire IP address
    space
  • Prefix of routing table entry define a path in
    the tree ending in some node
  • Searching one level requires 1-4 memory accesses
  • Rule
  • For a give IP address, routing entry with longest
    matching prefix is used

9
Prefix tree
  • Tree must be complete
  • each node must have either 2 or no children
  • node with one child is given 1 more. Added child
    is referred to as a leaf
  • Next hop of leaf is same as next hop of closest
    ancestor

10
Level 1 of data structure
  • Level 1 search is either an index into next-hop
    table or index to level 2 chunk
  • Depth 16 is represented by a bit vector for each
    node
  • Bit-vector 1 if there is a node at depth 16
    (root head)
  • Pointer index to level 2 chunk
  • Also bit-vector 1 if there a leaf at depth 16 or
    less (genuine head)
  • pointer index to next-hop table
  • Bit vector 0 for all others(members).
  • Use same next-hop as largest head smaller than
    member

11
Finding pointer groups
  • Bit vectors are grouped into 16 bits to form
    bit-masks
  • Use the bit-masks to generate code words and base
    indices
  • The data structure encodes header information in
    16-bit pointers
  • There is a pointer to represent each set bit in
    the mask
  • 2 bits encode what kind of pointer it is
  • 14 bits form an index for either next-hop table
    or level 2 chunk
  • When bit mask is zero or has a single bit set,
    pointer is encoded directly into the code word.
    Maptable therefore doesnt contain these
    bit-masks

12
Finding the correct pointer
  • Maptables are used
  • Indexed by 10-bit value from code-word and the
    low 4 of high 16 bits of IP address
  • Contain 4-bit pointer offsets within a bit mask
  • specify number of pointers to skip over to find
    the wanted pointer
  • The number of possible non-zero bit masks a(n) of
    length 2n is given by
  • a(n) 1 a(n -1)2
  • a(4) 677
  • Assume a bit-mask of zero, total bit mask 678
    (can be represented by 10 bits)

13
Level 1 Search
  • Maptable is generated once and for all
  • The pointer index pix used to retrieve the
    pointer from the pointer array
  • Total of 7 bytes accessed in the search for level
    1 2-byte code word, 2-byte base index, one byte
    (actually 4 bits) in maptable and 2-byte pointer
  • Examine pointer if next-hop found or search
    continues

14
Levels 2 3 of the data structure
  • Consist of chunks
  • Chunk of height 8 contain max of 256 heads
  • Types of chunks
  • Sparse (1-8 heads)
  • Has 8 16-bit pointers and 8 8-bit indices
  • dense (9-64 heads)
  • Has 1 base index and 16 code words
  • Very dense(65-256 heads)
  • Has 16 code words and 4 base indices

15
Level 1 2 search
  • Binary search is used to search through a sparse
    chunk
  • Place the values in decreasing order
  • Search the middle value to determine if the
    desired element is on the left or right
  • Perform linear scan to index of that element
  • Pointer with that index is extracted
  • Search through dense and very dense chunks in
    level 2 and 3 is similar with level 1 search.
  • Use of code words and base indices
  • The same level 1 maptable is used

16
Growth limitations in design
  • Number of distinct next-hops is limited to 214
  • The number of pointer in level 2 3 is limited
    by size of base indices (2 bytes)
  • If pointer limit is exceeded, size of base
    indices must be increased to 3 bytes
  • The number of chunks of each kind limited to 214
    per level
  • If limit is ever exceeded data structure must be
    modified
  • Increase pointer size or encode pointer
    differently
Write a Comment
User Comments (0)
About PowerShow.com