Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Neighbor Discovery Cache Protection

SUMMARY NDP Cache Protection enables you to protect the routing engine from certain types of denial-of-service (DoS) attacks in IPv6 deployment scenarios.

Neighbor Discovery Cache Protection Overview

Routing Engines can be susceptible to certain denial-of-service (DoS) attacks in IPv6 deployment scenarios. IPv6 subnets in general tend be very large—for example, a /64 subnet might have a high number of unassigned addresses. The control plane of the Routing Engine performs the address resolution for unknown addresses. An attacker can quickly overwhelm the control plane of the Routing Engine by generating resolution requests for this unassigned address space, resulting in a cache overflow. The attacker relies on both the number of requests generated and the rate at which requests are queued up. Such scenarios can tie up router resources and prevent the Routing Engine from answering valid neighbor solicitations and maintaining existing neighbor cache entries, effectively resulting in a DoS attack for legitimate users.

The strategies for mitigating such DoS attacks are as follows:

  • Filter unused address space.

  • Minimize the size of subnets.

  • Configure discard routes for subnets.

  • Enforce limits to the size and rate of resolution for entries in the neighbor discovery cache.

Neighbor discovery cache impact can be minimized by restricting the number of IPv6 neighbors and new unresolved next-hop addresses that can be added to the cache. You can set limits per interface by using the nd6-max-cache and the nd6-new-hold-limit configuration statements or system-wide by using the nd-system-cache-limit configuration statement.

Note:
  • For small sized platforms such as ACX, EX22XX, EX3200, EX33XX, and SRX, default is 20,000.

  • For medium sized platforms such as EX4200, EX45XX, EX4300, EX62XX, QFX, and MX, default is 75,000.

  • For rest of the platforms, default is 100,000.

Configuring Neighbor Discovery Cache Protection

Routing Engines can be susceptible to certain types of denial-of-service (DoS) attacks in IPv6 deployment scenarios. IPv6 subnets in general tend be very large; for example, a /64 subnet might have a high number of unassigned addresses. The control plane of the Routing Engine performs the address resolution for unknown addresses. An attacker can quickly overwhelm the control plane of the Routing Engine by generating resolution requests for this unassigned address space, resulting in a cache overflow. An attacker relies on both the number of requests generated and the rate at which requests are queued up.

The neighbor discovery process is that part of the control plane that implements the Neighbor Discovery Protocol. It is responsible for performing address resolution and maintaining the entries in the neighbor cache. One way to mitigate the DoS attacks is by enforcing limits to the size of the neighbor discovery cache and the rate of resolution of new next-hop entries, and by prioritizing certain categories of neighbor discovery traffic. You can configure limits to the neighbor discovery cache per interface and systemwide.

Before you begin, ensure that you are running Junos OS Release 15.1 or later.

Local limits apply to individual interfaces and are defined for resolved and unresolved entries in the neighbor discovery queue, while global limits apply systemwide.

To configure neighbor discovery cache protection on an interface:

  1. Configure IPv6 family for the interface.
  2. Configure the maximum size of the neighbor discovery cache for the interface.
  3. Configure the maximum number of unresolved entries in the neighbor discovery cache that can be attached to the interface.

To verify the configuration, execute the show interfaces interface-name operational command.

To configure neighbor discovery cache protection systemwide:

  • Configure the systemwide limit for the neighbor discovery cache.

To verify the configured system-wide limits, execute the show system statistics icmp6 operational command.

Note:
  • For small sized platforms such as ACX, EX22XX, EX3200, EX33XX, and SRX, default is 20,000.

  • For medium sized platforms such as EX4200, EX45XX, EX4300, EX62XX, QFX, and MX, default is 75,000.

  • For rest of the platforms, default is 100,000.

Example: Configuring Neighbor Discovery Cache Protection to Prevent Denial-of-Service Attacks

This example shows how to configure a limit to the number of IPv6 neighbor entries that can be added to the neighbor discovery. Enforcing limits to the number of entries in the cache mitigates denial-of-service (DoS) attacks. The neighbor discovery cache feature supports two types of limits:

  • Local—Local limits are configured per interface and are defined for resolved and unresolved entries in the neighbor discovery cache.

  • Global—Global limits apply systemwide. A global limit is further defined separately for the public interfaces and management interfaces, for example, fxp0. The management interface has a single global limit and no local limit. The global limit enforces a systemwide cap on entries for the neighbor discovery cache, including for the loopback interface for the internal routing instance, as well as management interfaces and the public interfaces.

Requirements

This example requires MX Series routers running Junos OS Release 15.1 or later.

Overview

Routing Engines can be susceptible to certain types of DoS attacks in IPv6 deployment scenarios. IPv6 subnets in general tend be very large—for example, a /64 subnet might have a high number of unassigned addresses, which can be used to perform DoS attacks. The control plane of the Routing Engine performs the address resolution for unknown addresses. An attacker can quickly overwhelm the control plane of the Routing Engine by generating resolution requests for this unassigned address space and overflow the queue. The attacker relies on both the number of requests generated and the rate at which requests are queued up.

The neighbor discovery process is that part of the control plane that implements the Neighbor Discovery Protocol. It is responsible for performing address resolution and maintaining the neighbor cache. One way to mitigate DoS attacks is by enforcing limits ot the neighbor discovery queue limits, which can be done by restricting queue size and the rate of resolution, and by prioritizing certain categories of neighbor discovery traffic.

Configuration

To configure neighbor discovery cache protection, perform these tasks:

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.

You can also configure a systemwide limit to the number of IPv6 neighbor entries in the neighbor discovery cache. This limit also includes the loopback interface, management interfaces, and the public interfaces.

The limit distribution from the nd-system-cache-limit statement for different interface types is performed according to certain fixed percentages. When nd-system-cache-limit is defined as X and the internal routing interface neighbor discovery cache limit is Y (default is 200), then:

  • Public maximum cache limit, Z = 80% of (X- Y)

  • Management interface maximum cache limit (for example, fxp0), M = 20% of (X-Y)

Configuring Neighbor Discovery Cache Protection

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure neighbor discovery cache protection per interface:

  • Configure the nd6-max-cache and nd6-new-hold-limit.

Results

To confirm neighbor discovery cache protection locally, enter show interfaces ge-0/3/0 from configuration mode. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

Verification

Confirm that the configuration is working properly.

Verifying Neighbor Discovery Cache Protection Globally

Purpose

Verify that the output reflects the systemwide limit for the neighbor discovery cache.

Action

From operational mode, run the show system statistics icmp6 command.

Meaning

The systemwide cap enforced on the neighbor discovery cache entries is 100000.

Management ND nexthops creation failed as mgt limit reached indicates the drop count for the management interface when the systemwide limit is reached. Total ND nexthops creation failed as limit reached indicates failure for management, public, or Internal routing instance interfaces, and Public ND nexthops creation failed as public limit reached indicates the drop count for public interfaces when the systemwide limit to the number of entries is reached.

Verifying Neighbor Discovery Cache Protection Locally

Purpose

Verify that the output reflects the configured interface limits.

Action

From operational mode, run the show interfaces ge-0/3/0 command.

Meaning

The maximum number of total entries and the maximum number of entries for new unresolved next-hop addresses that can be attached to interface ge-0/3/0 is 100000.

NH drop cnt refers to the number of neighbor discovery requests not serviced because the interface maximum queue size limits have been reached.