What is in the Routing Information Base?
All possible routes to a destination network
What is in the forwarding information base? What is another name for it?
Routing table
-> contains best routes to a destination (chooses one best route from the routing inforamtion base…)
Are routing protocols involved in forwarding?
NO!
-> rounting used to create routing information base
and based on this, create forwarding information base…
=> also responsible for updates of RIB / FIB
Forwarding:
actually look at packets and relay to next hop based on FIB
Time criticality of routing / forwarding?
Routing
-> not that time critical
Forwarding
-> Highly time critical!
What are the goals of Longest Prefix Matching (LPM)?
Find an IP address with identical network parts (prefix matching)
Find the IP address with longest matching network parts (longest prefix matching)
How does naive LPM work?
Strict Longest Prefix Matching (LPM) Algorithm
Sort FIB: longest prefixes first
Scan for matching prefix (top to bottom)
First prefix that matches is the correct one
How to evaluate naive LPM?
very easy to implement
very slow (linear probing…)
What is an alternative to naive LPM?
Tree based lookup
How is tree-based prefix lookup realized?
Trie structures
-> trie := Tree with more invariants
content of parent node is prefix of the nodes content
-> useful for a variety of index structures, can be used for LPM
=> idea: model entire IP space inside a trie
How to Tires look like?
Omit the parent nodes and when creating a prefix, concatenate until leaf is reached…
How to create lookup Tries?
Start with shortest prefix in FIB (default gateway…)
-> for each entry, look at next hop…
=> assign each next hop unique Next Hop ID
=> going from shortest to longest prefix, extend Trie (based on binary representation of prefix, e.g. 0; 01, 10; 01-> 010, 011; …) if prefix is in FIB with ND-ID of corresponding next hop… and with X if no entry… (null entry)
How to do lookup in Tries?
Set curNode to the root
Set level to 0
Set lastNH-ID to invalid
If curNode.NH-ID exists: Set lastNH-ID to curNode.NH-ID
Check level-th bit of destination address
If 0: Set curNode to curNode.left
If 1: Set curNode to curNode.right
If curNode is NULL: Return lastNH-ID
level++
Goto step 4
What is a problem with Tries, how to solve it?
Problem:
Basic Tries are very wasteful
Most nodes would not be occupied by a route
Most routes have long prefixes (16 or 24)
Solution:
Aggregate chains of “empty” nodes into one (or zero) nodes
This compresses the path the algorithm has to traverse
Fewer nodes to save -> less memory consumption
Fewer nodes to visit -> less CPU consumption
What is another problem with Tries, how to solve it?
Problem
Each node has only two children
Very large (binary) trees are built
Solution
Nodes have 2n children
Pull children’s children into the parent
Fewer (but bigger) nodes to save
Fewer nodes to visit less CPU consumption (branch misses)
How can one combine level and path compression=?
Idea
Path compression and level compression are orthogonal
Both can be combined
Result: LPC-Trie
What are Dir 24-8?
more advanced lookup structure for routing tables
What is the basic idea behind Dir 24-8?
Construct two large tables
First 24 bit of the prefix are handled in the “TBL24”
Last 8 bit in “TBLlong”
Works because most prefixes are shorter than 24 bit (for IPv4)
Dir 24-8 was designed for hardware implementation
+ simple control flow
+ only one memory lookup for ≤ /24 prefixes (2 accesses for > /24 prefixes)
- requires lots of memory (> 32 MiB)
How does a lookup in Dir 24-8 work? (> /24 prefixes)
requires two lookups
first, lookup the /24 bit part that fits the specific IP
this part then points to the /8 table containing the enumeration of all IPaddresses with the corresponding next hop ID
How does lookup (< /24 Bit) work in Dir 24-8?
only one lookup
-> next hop id directly stored in first table…
What is DXR?
Similar to Dir 24-8, but with more flexible address separation (e.g. 16/16)
=> idea: create smaller routing tables to perform faster lookups
Zuletzt geändertvor 2 Jahren