Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • See all Red Hat products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Red Hat OpenShift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • See all technologies
    • Programming languages & frameworks

      • Java
      • Python
      • JavaScript
    • System design & architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer experience

      • Productivity
      • Tools
      • GitOps
    • Automated data processing

      • AI/ML
      • Data science
      • Apache Kafka on Kubernetes
    • Platform engineering

      • DevOps
      • DevSecOps
      • Red Hat Ansible Automation Platform for applications and services
    • Secure development & architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & cloud native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • See all learning resources

    E-books

    • GitOps cookbook
    • Podman in action
    • Kubernetes operators
    • The path to GitOps
    • See all e-books

    Cheat sheets

    • Linux commands
    • Bash commands
    • Git
    • systemd commands
    • See all cheat sheets

    Documentation

    • Product documentation
    • API catalog
    • Legacy documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore the Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

IPv6 routing scalability enhancements in RHEL7.3

November 3, 2016
Hannes Olivier

    According to recent statistics, IPv6 traffic has surpassed the 12% mark and its traffic volume is constantly growing. This draws more and more attention to scalability issues within the IPv6 stack, some of them were already (maybe even long time ago) solved in the IPv4 networking stack. Other limitations are new and specific to the Linux IPv6 implementation. This particular blog post discusses a particular issue in the IPv6 routing implementation which can be exposed on highly loaded IPv6 setups (see below for further details if you want to check if you might be affected by this problem).

    The core networking code has the requirement to save some metric information to a temporary stable storage space within the kernel. Examples of such metric information are the last measured round trip time for TCP during the last socket close or just the discovered path maximum transmission unit towards that particular end host. While the IPv4 stack can already handle those information lazily by using copy-on-write and more elaborate techniques when such a metric needs to be saved, the IPv6 stack greedily allocated this space during first contact with a particular end-host, cloned the looked up node and reinserted it into the routing trie with the specialized end-host address.

    Particularly, systems exchanging just a few packets with every other host and moving on to the next one were forced to allocate a lot of memory upfront. Memory allocation in the kernel should always be bounded by some limits, otherwise it is possible for someone to bring the Linux kernel into memory pressure and let other subsystems of the kernel fail. Enforcing those limits is the IPv6 routing subsystem garbage collector's job.

    Multiple tunables define how the garbage collector should keep control over the routing trie. In the /proc filesystem, one can find settings for the maximum number of routing entries, when the garbage collector should start collecting and cleaning up the trie:

    • interval of garbage collector invocations
    • maximum number of routing entries
    • expiration time of routing entries
    • number of routing entries when to engage the garbage collector and wait until further allocations
    • minimum timespan between garbage collector invocations
    • etc.

    Those tunables put system admins into a complex situation for tuning the routing code. In the past it was normally enough to raise the maximum number of routing entries and invoke the garbage collector frequently enough by using the default settings, but as IPv6 usage grew bigger and bigger this was no longer enough --- densely populated routing tries led to other performance issues. It can be done better now!

    The new implementation in RHEL7.3, which got backported from the upstream Linux kernel, was done by Martin Lau of Facebook. The TCP metrics store in RHEL7 was already handled like in the IPv4 implementation. TCP metrics information live in a dedicated AVL-Tree also known as the inet_peer cache. Routing nodes could lazily reference the information in this tree and didn't need to provide the storage on their own. This leaves us in the situation where only storage for the MTU needed to be provided. The routing code was adapted to allocate the specific routing entries only on need, in particular when an IPv6 Packet-Too-Big ICMPv6 notification is received, which should be a very uncommon event. This very much relieved the routing code from allocating the entries prematurely and thus also relaxed the garbage collector. Thus the above mentioned tunables are only effective for cleaning up PMTU exceptions and redirects.

    This IPv6 routing improvement is now available in RHEL-7.3.

    Those routing optimizations should not be confused with the IPv4 routing cache removal. This cache consisted of a separate lookup data structure (a hash) to store common routing lookups. Several reasons, not particular performance oriented ones, lead to its removal including the fact that the hash was remotely attackable.

    To check if you are affected by the problem described in this article, regularly check the NoRoutes counter in /proc/net/snmp6 (or use nstat as a frontend to read those counters). In a correctly configured IPv6 network setup, those counters shouldn't increase constantly. If they do, further analysis, for example with dropwatch, might be necessary.

    Recent Posts

    • Introduction to distributed inference with llm-d

    • How to build your dynamic plug-ins for Developer Hub

    • Defining success: Evaluation metrics and data augmentation for oversaturation detection

    • Deploying OpenShift hosted clusters on bare metal

    • Get started with language model post-training using Training Hub

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue