3 ms·
Unfortunately IPv6 stack doesn't match IPv4 one on features and optimizations. IPv6 is still using regular radix tree and a route cache.
by betaby 9y ago
Unfortunately IPv6 stack doesn't match IPv4 one on features and optimizations.
IPv6 is still using regular radix tree and a route cache.
- Thaxll 9y agoWasn't it possible to re-implement the same IPv4 model?
- bogomipz 9y agoDo you have any insight into why this is?
- slackingoff2017 9y agoNot a Linux networking expert... But one thing could be that you can fit entire IPV4 address space in ram easily and this obviously can't be done for IPV6. Might make some design compromises slower and more complex, such as storing routes in Bloom filters rather than simple cache.
- bogomipz 9y agoNo? Doesn't compress nicely with the empty octets and colon substitution?
- slackingoff2017 9y agoRouters don't store IP addresses as strings... They use 32 bit and 2X64 bit unsigned ints usually. And you can't compress something when measuring cardinality. Each route takes up an entry and the minimum space you can use with a non probabilistic structure is 1 bit per entry in a bit map. There's compressed bitmaps but the random nature of routes will not compress well.
- vbernat 9y agoAuthor here. The weaknesses are known (see for example http://www.netdevconf.org/1.1/proceedings/slides/kubecek-ipv6-route-lookup-performance-scaling.pdf http://www.netdevconf.org/1.1/proceedings/slides/kubecek-ipv...). IPv6 doesn't have the same features as IPv4 (notably, IPv6 can do a route lookup using both source and destination addresses). Therefore, it's not just a matter of reusing what is done with IPv4.
- bogomipz 9y agoI guess you are referring to scoped addresses then in ipV6? That would makes sense. Thanks for the interesting link.
- vbernat 9y agoYes. But IPv6 doesn't really have a route cache either. However, it handles exceptions differently than IPv4. With IPv6, exceptions are put in the tree along regular entries (there has been some bugs, like /128 routes disappearing due to a "cached" entry being expired) while IPv4 stores the exceptions with the next-hop information. EDIT: I stand corrected: before 4.2, route entries were created for almost any destination, so it was essentially a route cache. After that, the entry is created only when it is really needed (MTU lower than the default MTU).