Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring a Filter to Exclude DHCPv6 and ICMPv6 Control Traffic for LAC Subscriber

This example shows how to configure a standard stateless firewall filter that excludes DHCPv6 and ICMPv6 control packets from being considered for idle-timeout detection for tunneled subscribers at the LAC.

Requirements

No special configuration beyond device initialization is required before configuring this example.

Overview

Subscriber access on a LAC can be limited by configuring an idle timeout period that specifies the maximum period of time a subscriber can remain idle after the subscriber session is established. The LAC monitors the subscriber’s upstream and downstream data traffic to determine whether the subscriber is inactive. Based on the session accounting statistics. the subscriber is not considered idle as long as data traffic is detected in either direction. When no traffic is detected for the duration of the idle time out, the subscriber is logged out gracefully similarly to a RADIUS-initiated disconnect or a CLI-initiated logout.

However, after a tunnel is established for L2TP subscribers, all packets through the tunnel at the LAC are treated as data packets. Consequently, the accounting statistics for the session are inaccurate and the subscriber is not considered to be idle as long as DHCPv6 and ICMPv6 control packets are being sent.

Starting in Junos OS Release 17.2R1, you can define a firewall filter for the inet6 family with terms to match on these control packets. Include the use the exclude-accounting terminating action in the filter terms to drop these control packets.

Configuration

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 then copy and paste the commands into the CLI at the [edit] hierarchy level.

Configure the Filter

Step-by-Step Procedure

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

To configure the filter:

  1. Set the idle timeout for subscriber sessions..

  2. Specify the idle timeout applies only to ingress traffic.

  3. Define the firewall filter term that excludes the DHCPv6 control packets from accounting statistics.

    1. Specify a match on packets with the first Next Header field set to UDP (17).

    2. Specify a match on packets with a source port of 546 or 547 (DHCPv6).

    3. Specify a match on packets with a DHCP destination port of 546 or 547 (DHCPv6).

    4. Count the matched DHCPv6 packets.

    5. Exclude the matched DHCPv6 packets from accounting statistics.

  4. Define the firewall filter term that excludes the ICMPv6 control packets from accounting statistics.

    1. Specify a match on packets with the first Next Header field set to ICMPv6 (58).

    2. Specify a match on packets with an ICMPv6 message type.

    3. Count the matched ICMPv6 packets.

    4. Exclude the matched ICMPv6 packets from accounting statistics.

  5. Define the default filter term to accept all other packets.

  6. Configure the dynamic profile to apply the filter to input and output interfaces for the inet6 family.

  7. Enable subscriber management accurate accounting.

Results

From configuration mode, confirm your configuration by entering the show access, show firewall, and show dynamic-profiles commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

If you are done configuring the device, enter commit from configuration mode.