Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Maintaining a Constant Traffic Flow by Configuring a Static VLAN Interface with a Dynamic Profile for Subscriber Access

This example shows how to configure a static VLAN interface with a dynamic profile using static schedulers and CoS parameters for subscriber access to maintain a constant traffic flow. The CoS parameters configure a best-effort data service for subscribers.

Requirements

Before you begin, be sure that your environment meets the following requirements:

  • The interface is hosted on an MX Series router.

  • For hierarchical scheduling configurations, hierarchical scheduling is enabled in the static CLI for the interface referenced in the dynamic profile. If not, the dynamic profile fails.

  • Only one traffic-control-profile is configured under a dynamic profile.

  • The output-traffic-control-profile that binds the traffic-control profile to the interface is defined within the same dynamic profile as the interface.

Overview

In a dynamic profile, you can configure VLAN subscriber interfaces over the following statically created logical interface types:

  • GE—Gigabit Ethernet

  • XE—10-Gigabit Ethernet

  • AE—Aggregated Ethernet

Topology

We recommend that you configure each subscriber on a statically created VLAN.

Figure 1 shows an example of subscriber interfaces on an individual VLAN.

Figure 1: VLAN Subscriber InterfacesVLAN Subscriber Interfaces

You can further separate VLANs on subscriber interfaces by configuring a VLAN interface as the underlying interface for a set of IP demux interfaces.

Configuration

To configure a static VLAN interface with a dynamic profile for subscriber access, perform these tasks:

CLI Quick Configuration

To quickly configure this example, copy the following configuration commands into a text file, remove any line breaks, and then paste the commands into the CLI at the [edit] hierarchy level.

Configuring a Subscriber Interface with a Static VLAN

Step-by-Step Procedure

After you configure a static VLAN interface, you can reference it in a dynamic profile.

  1. Configure the static VLAN interface.

  2. Enable hierarchical scheduling for the interface.

  3. Enable VLAN tagging.

  4. Configure the unit and assign a VLAN ID.

  5. Define the family address type (inet for IPv4) for the VLAN interface.

  6. Enable the physical interface to borrow an IP address from the loopback interface by setting an unnumbered interface address. Configure a secondary IP address on the loopback interface, lo0.0, and configure it as the preferred source address.

Results

Confirm the configuration of the static VLAN interface by entering the show interfaces configuration command. If the command output does not display the intended configuration, repeat the instructions in this procedure to correct the configuration.

Associating the Dynamic Profile with a Statically Created Interface

Step-by-Step Procedure

A dynamic profile is a set of characteristics, defined in a type of template, that you can use to provide dynamic subscriber access and services for broadband applications. When configuring the interface at the [dynamic-profiles profile-name interfaces] hierarchy level for a dynamic profile, you use variables to specify the interface name and the logical unit value. When a DHCP subscriber sends a DHCP request to the interface, the dynamic profile replaces the interface name variable and logical unit name variable with the actual interface name and logical unit number of the interface that received the DHCP request.

Note:

Configuration of the interface name variable and logical interface name variable at the [edit dynamic-profiles profile-name interfaces] hierarchy level is required for a dynamic profile to function.

  1. Create the new dynamic profile for data services for subscribers.

  2. Define the interface-name variable statement with the internal $junos-interface-ifd-name variable used by the router to match the interface name of the receiving interface.

  3. Define the unit statement with the internal variable.

    • When referencing an existing interface, specify the $junos-underlying-interface-unit variable used by the router to match the unit value of the receiving interface.

    • When creating dynamic interfaces, specify the $junos-interface-unit variable used by the router to generate a unit value for the interface.

    or

  4. Define the family address type (inet for IPv4) for the $junos-interface-unit variable.

Results

Confirm the configuration of the dynamic profile by entering the show dynamic-profiles configuration command. If the command output does not display the intended configuration, repeat the instructions in this procedure to correct the configuration.

Configuring the Firewall Filter

Step-by-Step Procedure

To configure a static VLAN interface with a dynamic profile for subscriber access, you can configure a firewall filter to provide enhanced security by blocking packets based on various match criteria, such as subjecting traffic to a policer for rate limiting, assigning the traffic to a class-of-service (CoS) forwarding class for later queuing and packet rewrite operations, or directing traffic to a specific routing instance.

  1. Configure the family address type (inet for IPv4) for the firewall filter and specify the filter name.

    We recommend that you name the filter something that indicates the filter’s purpose. In this example, we use the bandwidth limit settings.

  2. Specify the term names for the filter. Make each term name unique and represent what its function is. The first term matches traffic that has been classified into the Expedited Forwarding (EF) class, and the second term matches all non-EF traffic.

  3. In each firewall filter term, specify the conditions used to match components of a packet. Configure the first term to match all traffic classified as EF class.

  4. Specify the actions to take when the packet matches the condition in the first term. Send the EF traffic to the policer named POL_EF_G=768K.

  5. Specify the action to take when the packet matches the condition in the second term. All non-EF packet traffic is accepted.

Results

Confirm the configuration by entering the show dynamic-profiles data-service firewall configuration command. If the command output does not display the intended configuration, repeat the instructions in this procedure to correct the configuration.

Configuring Static Schedulers in a Dynamic Profile

Step-by-Step Procedure

You can configure static scheduling and queuing parameters in a dynamic profile for subscriber access. Schedulers are part of the basic class-of-service (CoS) infrastructure. You must define at least one scheduler per forwarding class. Schedulers indicate a forwarding class’s priority, transmit weight, and buffer size, as well as various shaping and rate control mechanisms.

  1. Specify the best-effort scheduler for which you want to configure parameters.

    Note:

    Set schedulers to the name of the scheduler to be configured or to the Junos OS predefined variable ($junos-cos-scheduler) used for dynamic subscriber interfaces. The predefined variable is replaced with the scheduler name obtained from the RADIUS server when a subscriber authenticates over the interface to which the dynamic profile is attached.

  2. (Optional) Configure the buffer size to use the remaining buffer available.

    This parameter allows you to specify an explicit buffer size, either as a percent of interface speed or as a function of time (specified in microseconds).

  3. (Optional) Configure the drop-profile map to associate one or more drop profiles with a queue.

    The default random early detection (RED) drop profile is used when no explicit drop profile mapping is specified. Specify a packet-loss priority (PLP) level of any, and for the specified scheduler to accept any protocol type.

  4. (Optional) Configure the drop profile to map a fill level (fullness of a queue) to a drop probability (probability that a packet is dropped).

    You enable RED by applying a drop profile to a scheduler.

  5. (Optional) Configure the queue’s scheduler priority to a specific level (low) for guaranteed rate traffic.

  6. (Optional) Configure the queue’s transmit weight [in bits per second (bps)] or as a percentage of transmission capacity.

    The transmit rate guarantees the rate for the queue, assuming no priority-based starvation occurs. When you do not specify a transmit weight, or when the transmit rate is reached, the queue can only send excess-rate traffic because that queue’s priority is demoted to the excess region. A percentage of zero (0) drops all packets in the queue.

  7. (Optional) Configure the queue’s weight as either a percentage, or a proportion, for any unused bandwidth traffic to share.

    Behavior varies based on interface mode, explicit configuration, and whether any other queues have explicit weight configured. By default, excess bandwidth between the guaranteed and shaped rate is shared equally among queues.

  8. (Optional) Configure the priority of how excess bandwidth traffic is sent on a scheduler in a dynamic profile.

    To prevent the queue from sending any excess rate traffic, set to none.

Results

Confirm the configuration of the scheduler with static values in the dynamic profile by entering the show dynamic-profiles data-service class-of-service configuration command. If the command output does not display the intended configuration, repeat the instructions in this procedure to correct the configuration.

Associating the Scheduler with a Scheduler Map

Step-by-Step Procedure

After you define your schedulers, you must link them to a set of queues on a logical interface using a scheduler map. Applying a scheduler map to an interface places the related set of schedulers and drop profiles into effect.

  1. Configure the scheduler map name.

  2. Configure a forwarding class to associate a scheduler with a scheduler map.

  3. Associate the scheduler you previously defined (be-scheduler) with the scheduler map.

Results

Confirm the configuration of the scheduler map by entering the show dynamic-profiles data-service class-of-service scheduler-maps configuration command. If the command output does not display the intended configuration, repeat the instructions in this procedure to correct the configuration.

Configuring and Applying Static Traffic Shaping and Scheduling Parameters in a Dynamic Profile

Step-by-Step Procedure

Configure static traffic shaping and scheduling parameters in a traffic-control profile. A traffic-control profile is a generic class-of-service (CoS) container that you can apply at all points of a CoS hierarchy to affect the committed information rate (CIR), peak information rate (PIR), and excess bandwidth handling. You can specify the traffic-control profile at the port, logical interface, or logical interface-set level. The traffic-control profile also references the scheduler map.

  1. Create the traffic-control profile and assign it a name.

  2. Apply the static scheduler map, data-service-map, that you previously configured.

  3. Configure the shaping rate [in bits per second (bps)] to use for the scheduler in the dynamic profile.

    The shaping rate places a maximum limit on a queue’s transmit capacity. By default, the shaping rate is equal to the interface speed/shaping rate enabling the queue to send a the full rate of the interface.

  4. Configure the guaranteed rate [in bits per second (bps)] to use for the scheduler in the dynamic profile.

    The guaranteed rate is the minimum bandwidth the queue can receive; if excess physical interface bandwidth is available for use, the logical interface can receive more than the guaranteed rate provisioned for the interface, depending on how you choose to manage excess bandwidth and the interface’s mode of PIR compared to CIR/PIR.

  5. Configure the delay-buffer rate [in bits per second (bps)] based on the delay-buffer calculation.

    The delay buffer rate setting at one level of the hierarchy becomes the reference bandwidth used at the next higher level, and the sum of the reference bandwidth cannot exceed the value used at a lower level. If you do not include this statement, the delay-buffer rate is based on the guaranteed rate if one is configured, or on the shaping rate if no guaranteed rate is configured.

  6. After you configure the traffic shaping and scheduling CoS parameters in a dynamic profile, you apply them to an interface. The output traffic-control profile enables you to provide traffic scheduling to the interface.

    Configure the interface name and logical interface using a variable, and apply the output traffic-control profile to the interface. Specify the previously defined traffic-control profile, tcp-data-service.

Results

Confirm the configuration and application of the static traffic shaping and scheduling parameters by entering the show dynamic-profiles configuration command. If the command output does not display the intended configuration, repeat the instructions in this procedure to correct the configuration.

Verification

Confirm that the configuration is working properly.

Verifying Traffic Shaping and Scheduling Profiles for Subscriber Access

Purpose

View the class-of-service (CoS) configurations that are referenced in a dynamic profile for subscriber access.

Action

Meaning

The Shaping rate, Delay Buffer rate, and Guaranteed rate fields indicate rates of 50,000 bps, 10,000 bps, and 10,000 bps, respectively, for the traffic-control profile.

Verifying the Mapping of Schedulers for Subscriber Access

Purpose

Display the mapping of schedulers to forwarding classes and a summary of scheduler parameters for each entry.

Action

Meaning

The Scheduler map field indicates the parameters are for the best-effort scheduler. The Transmit rate field shows 40 percent; the Rate Limit field indicates no limit; and the Drop profiles fields are for drop3.