9. Service Ingress QoS Policies

This chapter provides information to configure SAP ingress QoS policies using the CLI.

9.1. Overview

There is one default service ingress policy. The default policy has two classification resources and one meter (the num-qos-classifiers set to value 2). No queues are allocated by default. SAP-ingress policies with policing and queuing is supported for SAPs configured on access ports and hybrid ports.

Note:

SAP-egress queues and network port and hybrid port egress queues are supported on all 7210 SAS platforms as described in this document.

Each policy can have up to 32 ingress meters. The default policies can be copied and modified but cannot be deleted. The default policies are identified as policy ID 1.

The default SAP-ingress policy is applied to access ingress SAPs. You must explicitly associate other QoS policies, if desired.

Refer to the CLI usage chapter in the 7210 SAS-M, T, R6, R12, Mxp, Sx, S Basic System Configuration Guide for information about the tasks and commands necessary to access the CLI and to configure and maintain the 7210 SAS devices.

9.1.1. Default SAP-ingress policy

The default policy 1 maps all traffic to default forwarding class “be” and maps FC “be” to meter 1. Meter 1 is configured with cir 0 and pir max.

The following is a sample configuration output.

*A:7210-SAS>config>qos>sap-ingress# info detail
----------------------------------------------
            description "Default SAP ingress QoS policy."
            num-qos-classifiers 2
            scope template
            meter 1 create
                mode trtcm1
                adaptation-rule cir closest pir closest
                rate cir 0 pir max
                mbs default
                cbs default
            exit
            default-fc "be"
----------------------------------------------
*A:7210-SAS>config>qos>sap-ingress#

9.1.2. SAP-ingress policy Defaults

Table 41 lists the SAP-ingress policy defaults.

Table 41:  SAP-Ingress Policy Defaults 

Field

Default

description

“Default SAP ingress QoS policy.”

num-qos-classifiers

2

scope

template

meter

1

mode

trtcm1

adaptation-rule

cir closest pir closest

rate

pir = max, cir= 0

mbs

default

cbs

default

default-fc

be

9.2. Use of Index File by SAP QoS Ingress Policy

The 7210 SAS devices use an index file to store the map that indicates the QoS resource allocation to the SAPs. This file is used on reboot to ensure that all the SAPs that were created successfully before reboot can be recreated during a reboot. Without an index file, it is possible that all the SAPs that were configured successfully may fail on a reboot after saving the configuration file.

The index file is stored in the flash. During a reboot, if the file is found, the system allocates resources as per the stored map. If the file is not found, the system implements a best-fit algorithm and tries to allocate resources for all the SAPs on a first-come-first-served basis. There is no guarantee that resources will be allocated to all SAPs. When the index file is not present, it is possible that the saved configuration did not execute successfully after the reboot.

Note:

The index file used for QoS maps is different from the one used for storing Interface indexes.

9.2.1. Use of the Keyword “multipoint” for Default Meter 11

The system allows the sharing of a single meter for both unicast and multipoint traffic. The user can configure any of the available meters for multipoint traffic. The use of the multipoint keyword during meter creation is deprecated, except for use with meter 11, as described in the following paragraphs.

When the multipoint keyword is specified with meter 11, the software interprets it to be the default multipoint meter. The default multipoint meter is used for all FCs that do not have explicit multipoint meters configured.The software performs resource checks to ensure that the resources needed to use the multipoint meter with all the FCs are available before allowing this change.

Note:

  1. When the num-qos-resources command is set to a value of 2, the default multipoint meter 11 cannot be used because only a single meter is available for use.
  2. When associating a meter with an FC for BUM traffic, the software does not validate whether the meter is a multipoint meter, which allows the user to use a single meter for unicast and BUM traffic. This implies efficient use of SAP-ingress QoS resources. From release 4.0R4 onward, when the multipoint keyword is used, the software issues a warning indicating that it is an obsolete CLI command and is not saved in the configuration file, deprecating the use of multipoint keyword with any meter other than the default meter 11.

9.2.1.1. Example Uses of the Multipoint Meter

This section provides configuration examples of several uses of the multipoint meter.

Example 1

*7210-SAS>config>qos# sap-ingress 12 create 
*7210-SAS>config>qos>sap-ingress$ info      
----------------------------------------------
            num-qos-classifiers 4
            meter 1 create
            exit
----------------------------------------------
*7210-SAS>config>qos>sap-ingress$

In example 1, all FCs in the SAP-ingress policy use the default meter 1 (for all traffic types). If the configure qos sap-ingress id meter 11 multipoint create command is executed, it attaches the default meter 11 with all the FCs defined in the SAP-ingress policy.

After configuring meter 11 multipoint, all the FCs in this policy use two meters: default meter 1, to meter unicast traffic for all the FCs; and meter 11, to meter BUM traffic for all the FCs. In this example, because only the default FC “be” is in use, the multipoint meter is used to meter BUM traffic associated with default FC “be”.

The following example shows the policy after the configuration is changed.

*7210-SAS>config>qos# sap-ingress 12
*7210-SAS>config>qos>sap-ingress$ info 
----------------------------------------------
             num-qos-classifiers 4
             meter 1 create
             exit
meter 11 multipoint create
----------------------------------------------
*7210-SAS>config>qos>sap-ingress$

Deleting the multipoint meter 11 removes all the FCs associated with the multicast-meter, assuming all the FCs are using the default multicast meter and do not have any other multicast meter explicitly configured. Executing the configure qos sap-ingress id no meter 11 command disassociates meter 11 from the FCs, and the FCs use only meter 1 (if no other meter is configured explicitly).

Example 2

*7210-SAS>config>qos# sap-ingress 12
*7210-SAS>config>qos>sap-ingress$ info 
----------------------------------------------
configure> qos> sap-ingress 10 create
     meter 1 create
     exit
     meter 3 create
     exit
     default-fc be
     fc be 
          meter 3
          multicast-meter 3
     exit
     fc af
          meter 3
     exit
exit
----------------------------------------------

Starting with the policy in example 2, if the user now executes the configure qos sap-ingress id meter 11 multipoint create command, the FC “be” continues to use meter 3 and the FC “af” uses meter 11 for BUM traffic. In this example, if the user executes the configure qos sap-ingress id fc be no multicast-meter command, the default meter 11 is also used for FC “be”.

Example 3

----------------------------------------------
configure> qos> sap-ingress 10 create
     meter 1 create
     exit
     meter 3 create
     exit
 
     default-fc be
 
     fc be 
          meter 3
          unknown-meter 3
     exit
exit
----------------------------------------------

Upon executing the configure qos sap-ingress id meter 11 multipoint create command, FC "be" unknown-unicast traffic type continues to use meter 3, and broadcast and multicast traffic types use meter 11.

In example3, if a broadcast-meter was initially configured in the SAP-ingress policy and was followed by executing the configure qos sap-ingress  id meter 11 multipoint create command, FC “be” changes to use meter 11 for multicast traffic, and broadcast traffic continues to use meter 3 for unknown-unicast traffic and meter 3 for unicast traffic.

Also in example 3, if the user executes the configure qos sap-ingress id fc be no unknown-meter command, meter 3 is used for all traffic types classified to FC “be”. But, if the default meter 11 is defined in the policy, FC “be” uses meter 11 for BUM traffic.

9.3. Service Ingress Meter Selection Rules

This section describes the rules for meter selection by different traffic types under various configurations for VPLS services.

9.3.1. Default Policy

In the default policy, only meter 1 is defined. All FC and all traffic types use meter 1 by default. Meter 11 is not created by default and is not available for use.

The following is a sample default policy configuration output.

*7210-SAS>config>qos# sap-ingress 1 create // Default policy
*7210-SAS>config>qos>sap-ingress$ info
----------------------------------------------
num-qos-classifiers 2
meter 1 create
exit
----------------------------------------------
*7210-SAS>config>qos>sap-ingress$

9.3.2. VPLS Service without Meter 11

The following describes the use of meters when meter 11 in a VPLS service is not configured in the policy.

  1. If an FC is created without explicit meters, the default meter 1 is used for unicast traffic and for multipoint traffic types (such as broadcast, multicast, and unknown-unicast traffic).
  2. If an FC is created with an explicit unicast meter, that meter is used for unicast traffic and for multipoint traffic types (such as broadcast, multicast, and unknown-unicast traffic).
  3. If an FC is created with an explicit unicast meter and explicit broadcast meter, use these meters for unicast and broadcast traffic respectively, and use the unicast meter for all other traffic types.
  4. If an FC is created with an explicit unicast meter and explicit multicast meter, use the unicast meter for unicast traffic and multicast meter for all other traffic types.
  5. If an FC is created with an explicit unicast meter, an explicit broadcast meter, and an explicit multicast meter, use these meters for unicast, broadcast, and multicast traffic types respectively. The unknown unicast traffic type uses the explicitly defined multicast meter.
  6. If an FC is created with an explicit unicast meter, explicit broadcast meter, explicit unknown-unicast meter, and explicit multicast meter, use these meters for unicast, broadcast, unknown-unicast, and multicast traffic types, respectively.

9.3.3. VPLS Service with Meter 11

The following describes the use of meters when meter 11 in a VPLS service is defined in the policy.

  1. If an FC is created without explicit meters, use the default meter 1 for unicast traffic and default meter 11 for all other traffic types (such as broadcast, multicast, and unknown-unicast).
  2. If an FC is created with an explicit unicast meter, use that meter for unicast traffic, and use default meter 11 for all other traffic types.
  3. If an FC is created with an explicit unicast meter and explicit broadcast meter, use these meters for unicast and broadcast traffic respectively, and use meter 11 for all other traffic types.
  4. If an FC is created with an explicit unicast meter and explicit multicast meter, use the unicast meter for unicast traffic and multicast meter for all other kinds of traffic.
  5. If an FC is created with an explicit unicast meter, explicit broadcast meter, and explicit multicast meter, use these meters for unicast, broadcast, and multicast traffic types respectively. The unknown unicast traffic type uses the explicitly defined multicast meter.
  6. If an FC is created with an explicit unicast meter, explicit broadcast meter, explicit unknown-unicast meter, and explicit multicast meter, use these meters for unicast, broadcast, unknown-unicast and multicast traffic types, respectively.

9.3.4. Epipe, IES, and VPRN Services without PIM

The following are rules for meter selection for Epipe, IES, and VPRN services,

  1. A multipoint meter cannot be used. A multipoint meter configured in a policy is not used when the policy is applied to a SAP in an Epipe service.
  2. All FCs associated with a meter always use the unicast meter.
Note:

These rules apply to IES services when PIM is not enabled in the service.

9.3.5. IES and VPRN Services with PIM/Multicast and without Meter 11

The following are rules for meter selection for IES and VPRN services when PIM/multicast is enabled in the service and describes the use of meters when meter 11 is not configured in the policy.

  1. If an FC is created without explicit meters, the default meter 1 is used for unicast traffic and multicast traffic.
  2. If an FC is created with an explicit unicast meter, that meter is used for unicast traffic and multicast traffic.
  3. If an FC is created with an explicit unicast meter and explicit multicast meter, use the unicast meter for unicast traffic and multicast meter for multicast traffic.

9.3.6. IES and VPRN Services with PIM/Multicast and Meter 11

The following are rules for meter selection for IES and VPRN services when PIM/multicast is enabled in the service and meter 11 is defined in the policy.

  1. If an FC is created without explicit meters, use the default meter 1 for unicast traffic and default meter 11 for multicast traffic.
  2. If an FC is created with an explicit unicast meter, use that meter for unicast traffic and use default meter 11 for multicast traffic.
  3. If an FC is created with an explicit unicast meter and explicit multicast meter, use the unicast meter for unicast traffic and multicast meter for multicast traffic.

9.4. Service Ingress Policy Configuration Considerations

The num-qos-classifiers command cannot be modified when the policy is in use (for example, when it is associated with a SAP). Other parameters in the SAP-ingress policy can be changed.

When changing other parameters (for example, FC meter map or FC classification match criteria entries) for a policy that is in use, the system recomputes the resources required to accommodate the change. If the resources required exceed the configured value for num-qos-classifiers, the change is not allowed.

If more resources are needed than are configured in num-qos-classifiers for a existing policy, the following options are available.

  1. Copy the existing policy to a new policy, modify the num-qos-classifiers command, modify the match criteria entries, and modify the SAP configuration to associate it with the new policy.
  2. Ensure the existing policy is not in use by any SAP (if required, change the SAP configuration to disable the use of the QoS policy using the no qos form of the command), change all the required parameters, and modify the SAP configuration to use the policy again.
    Note:

    Both of these options have side effects; for example, they can reset the statistics associated with the meters and potentially cause existing traffic classification not to take effect. However, the system ensures that the default policy is used during the period when policy changes are being made after the two options are performed.

The following are additional service ingress policy configuration considerations.

  1. In releases prior to Release 3.0.R1, the software always the computes the number of resources (like classifiers and meters) required by a policy assuming it will be used in a VPLS service. This allows the policy to be applied to either an Epipe or VPLS service.
  2. From Release 3.0.R1 onwards, when creating a SAP-ingress policy, the software does not compute the number of resources required by a policy and validate it against resources available in the system. The software validates the resources needed only when the SAP-ingress policy is attached to a SAP. If enough resources are available, the association succeeds, otherwise the CLI command fails. Based on the service (VLL, VPLS, and so on) where the SAP is configured, for the same SAP-ingress policy the amount of resources required is different. The software validates that the number of QoS resources specified with the num-qos-classifiers command is sufficient for the match criteria, FC, and service specified, and the resources are available in hardware. If the validation fails, the software disallows the association of the SAP-ingress policy with the SAP.
  3. The match criteria type (that is, mac-criteria, ipv4-criteria, and ipv6-criteria) cannot be changed when the SAP-ingress QoS policy is in use. For example, if the match criteria type is set to ipv4-criteria and the policy is associated with a SAP, the ipv6-criteria or mac-criteria cannot be enabled in the same policy. If there is a need to change the criteria, the user must remove the association and change the SAP-ingress policy to use the new match criteria. For SAPs configured in VPRN services, the computation of resources is similar to an SAP configured in an Epipe service.

See Resource Allocation for Service Ingress QoS Policies for more information.

9.5. Resource Allocation for Service Ingress QoS Policies

The available global pool of ingress internal CAM hardware resources can be allocated based on user needs and shared among different features, such as SAP-ingress QoS policy, ingress ACLs, and so on. SAP-ingress QoS classification and meter resources can be allocated from this pool.

In addition, resources can be allocated for different SAP-ingress QoS policy classification match criteria based on operator needs. Users can modify the resources allocated to scale the number of entries available per match criteria or scale the number of SAPs. Resources from the global ingress internal CAM pool are allocated in fixed slices. The number of classification entries and meters per slice varies across 7210 SAS platforms.

Refer to the 7210 SAS-M, T, R6, R12, Mxp, Sx, S Basic System Configuration Guide for more information about the number of slices that can be allocated to a feature. For example, on a 7210 SAS-R6 IMM-b card, each slice allows 256 classification entries and 128 meters. The number of slices allotted for a SAP-ingress QoS policy is configured using the configure system resource-profile ingress-internal-tcam qos-sap-ingress-resource command.

Users can configure the resources available for SAP-ingress QoS policies and can limit the amount of resources used per match criteria supported for SAP-ingress QoS policies. A specific slice can be used for MAC criteria, IP criteria, or IPv6 criteria, or both IP and MAC criteria. Allocation of classification entries also allocates meter/policer resources that are used to implement per-FC per-traffic-type policing.

Note:

In addition to CAM-based resource allocation, the 7210 SAS-R6 and 7210 SAS-R12 support table-based resource allocation for DSCP-classification on SAP ingress. See Table-based Classification Using Dot1P and IP DSCP for Assigning FC and Profile on SAP Ingress for more information.

By default, the system allocates resources for SAP-ingress QoS policies to maintain backward compatibility with Release 4.0 and allocates resources for MAC criteria and IP criteria (by setting num-resources to max). Setting the num-resources value to max allows each match criterion to use the available SAP-ingress QoS resources on a first-come-first-served model. By default, the software does not allocate resources for use by ingress IPv6 classification or for using both IP (any) and MAC (any) criteria in a single SAP-ingress policy. Users must allocate resources before associating a SAP with an IPv6 SAP-ingress policy or both IP (any) and MAC (any) criteria in a SAP-ingress policy. Until appropriate resources are allocated, attempts to use the policy associated with a SAP fail.

If the configure system resource-profile qos-sap-ingress-resource command is used to allocate resources for SAP-ingress QoS policies, the system allocates resources in slices for a fixed number of entries; the entries allocated per slice is platform-dependent. Table 42 describes the use of these entries by different types of match criteria.

Table 42:  SAP Ingress Resource Allocation and Match Criteria Types 

Type of Match Criteria

Description

mac-criteria (any)

Before using SAP-ingress policies with mac-criteria (any), use the configure system resource-profile ingress-internal-tcam qos-sap-ingress-resource mac-match-enable CLI command to allocate resources from the SAP-ingress QoS resource pool. Resources are allocated for SAP-ingress policies that use mac-criteria (any and dot1p-only). Each entry in the SAP-ingress QoS policy that is configured to use mac-criteria uses one entry from the slices in the hardware resource pool allocated to mac-criteria.

For example, assume that on the 7210 SAS-R6 a SAP ingress policy is configured to use mac-criteria with 50 entries, and uses the configure system resource-profile ingress-internal-tcam qos-sap-ingress-resource mac-match-enable 1 CLI command to configure one slice for use by mac-criteria (allowing a total of 256 entries for use by policies that use mac-criteria). In this case, the user can configure 10 SAPs that use the mac-criteria SAP ingress policy and consume 25 entries.

ipv4-criteria (any)

The use of ipv4-criteria (any) match criteria is the same as the mac-criteria. Use the configure system resource-profile ingress-internal-tcam qos-sap-ingress-resource ipv4-match-enable CLI command to allocate resources. Additionally, IPv4 criteria can share entries allocated for IPv6 criteria. The SR OS automatically allocates entries from an IPv6 criteria slice to IPv4 criteria policies, if no entries are available in the allocated IPv4 criteria slices and no slices are available for allocation to IPv4 criteria from the SAP-ingress QoS resource pool. If an IPv4 criteria entry uses IPv6 criteria slices, the number of hardware entries used is the same as required by an IPv6 criteria entry (see ipv6-criteria (any) 1 for more information).

ipv6-criteria (any) 1

Before using ipv6-criteria match criteria, use the configure system resource-profile ingress-internal-tcam qos-sap-ingress-resource ipv6-ipv4-match-enable CLI command and specify the ipv6 keyword for the num-qos-classifiers command to allocate resources from the SAP-ingress QoS resource pool.

Each ipv4-criteria match entry or ipv6-criteria configured in the QoS policy that uses ipv6-criteria uses two entries from the slices allocated for use by ipv6-criteria (128-bit) in the hardware. The system allocates entries from the ipv6-criteria pool in the following cases:

  1. if the SAP-ingress QoS policy uses ipv6-criteria entries (any or IPv6 DSCP) and ipv4-criteria entries (any or IPv4 DSCP)
  2. if the SAP-ingress QoS policy uses only ipv6-criteria (any or IPv6 DSCP)
  3. if the SAP-ingress QoS policy uses ipv4-criteria (any) and there are no resources available in the ipv4-criteria (see ipv4-criteria (any) for more information)

For example, assume that on the 7210 SAS-R6 a QoS policy is configured to use ipv6-criteria with 50 entries and the configure system resource-profile ingress-internal-tcam qos-sap-ingress-resource ipv4-ipv6-128-match-enable 1 command is used to configure one slice for ipv6-criteria. This allows a total of 128 entries for use by SAPs using SAP ingress QoS policies with ipv6-criteria (because each IPv6 entry uses two entries in hardware). In this example, the user can configure two SAPs that use this policy and consume a total of 100 entries. These resources can be shared with policies that use IPv4 criteria, though each IPv4 criteria entry consumes two entries in the hardware. IPv4 criteria policies can consume spare IPv6 resources; however, if a larger number of IPv4 criteria policies are planned, it is good practice to allocate more resources for use with IPv4 criteria.

IPv4 (any) and MAC (any) match

Before using IP-criteria (any) and MAC-criteria (any) in a single policy, use the configure system resource-profile ingress-internal-tcam qos-sap-ingress-resource ipv4-mac-match-enable command to allocate resources from the SAP-ingress QoS resource pool. Each IPv4-criteria match entry or MAC-criteria match entry configured in the QoS policy uses two entries from the allocated slices. The system allocates entries from the ipv4-mac-match-enable pool if the SAP-ingress QoS policy uses both ip-criteria (any) and ipv6-criteria (any).

The system also allocates entries for all other criteria, if there are no resources available to use in the pool allocated to those criteria. That is, if no resources are available in other pools, the following criteria are allocated resources from this pool: only mac-criteria any, only ip-criteria any, mac-criteria dot1p-only, ip-criteria dscp-only, ipv4-criteria dscp-only. 2

dot1p-only, IPv4 dscp-only, IPv6 dscp-only, and default SAP-ingress QoS policies

Use the dot1p-only or dscp-only option if only dot1p bits or only IP DSCP bits or only IP precedence bits are used for SAP-ingress classification. This facilitates efficient use of available hardware resources and better scaling. SAP-ingress policies that use only dot1p bits or only IPv4/IPv6 DSCP or IPv4/IPv6 precedence or default SAP-ingress QoS policy bits can use the resources from slices currently allocated for use by either IP-criteria or MAC-criteria or IPv6 criteria. The following is a list of special cases for resource allocation for default, dot1p-only, and dscp-only SAP-ingress policies.

  1. If no slices are available to accommodate a SAP associated with default or dot1p-only or a dscp-only SAP-ingress policy, the SR OS allocates resources against MAC criteria if the SAP is configured in a VLL or VPLS service. The SR OS uses the required number of entries for this policy. The remaining entries are available for SAPs that use MAC criteria or that use only dot1p or only IPv4/IPv6 DSCP or that use a default policy.
  2. If no slices are available to accommodate a SAP associated with default, dot1p-only, or a dscp-only SAP-ingress policy, the SR OS allocates resources against ipv4-criteria when the SAP is configured in an IES, RVPLS, or a VPRN service. The SR OS uses the required number of entries for this policy. The remaining entries are available for SAPs that use ipv4-criteria or that use only IPv4/IPv6 DSCP or only dot1p criteria or that use the default policy.
  3. For a SAP-ingress QoS policy, if the enable-table-classification command is set to use table-based classification and TCAM-based meters, and there are no resources available in the pool of slices allocated for ip-dscp-port-if-match criteria, a new slice is allocated and set to the ip-dscp-port-if-match-enable criteria. The SR OS uses the required number of entries from this slice for the policy being configured. The remaining entries are used for SAPs configured with the default SAP-ingress QoS policy, or for SAPs with the enable-table-classification command set, which uses dot1p or IP DSCP table-based classification with TCAM meters.

    Notes:

  1. When a slice is allocated for IPv6 criteria, the system automatically adjusts the number of available classification entries in that slice to half the number of total entries available.
  2. Resources are not allocated to ipv6-criteria (any) from this pool.

The SAP-ingress resource slices described in this section are different from the resources that are configured using the num-qos-classifiers command.The num-qos-classifiers command sets the limit on the resources needed per SAP-ingress QoS policy. The qos-sap-ingress-resource resources set the maximum limit on the resources available to all the SAP-ingress policies that are in use simultaneously on the system.

The SR OS manages the resource slices allocated to the SAP-ingress QoS policy pool and allocates the slice entries when a SAP-ingress QoS policy is associated with a SAP. A SAP specifies the number of QoS resources it needs using the num-qos-classifiers command (in the SAP-ingress policy), while the system allocates the resources required by the SAP from the qos-sap-ingress-resource slices, depending on whether the SAP-ingress policy uses ip-criteria, mac-criteria, or ipv6-criteria.

Use the tools dump system-resources command to view the current use and availability of system resources. One or more entries per slice are reserved for system use.

9.5.1. Resource Configuration Guidelines for Service Ingress QoS Policies Using CAM-based Classification

When a SAP is associated with a default SAP-ingress QoS policy and there are no resources available in the pool of slices already allocated for different criteria that are in use, a new slice is allocated and set to either mac-match criteria, ipv4-match criteria, or ip-dscp-port-if-match criteria. This allocation can result in a single slice getting consumed and becoming unavailable for other classification criteria, even if the mac-match criteria, ipv4-match criteria, or ip-dscp-port-if-match criteria are not used. To prevent this scenario, the SAP ingress resource configuration can be set to the specific number of slices for each criterion in use so that the SR OS can allocate the slices based on user requirement without allocating resources for any of the mac-match criteria, ipv4-match criteria, or ip-dscp-port-if-match criteria.

9.5.2. Computation of Resources Used per SAP-ingress Policy for CAM-based Classification

The user can configure the number of classification entries the SAP requires (TQ). The value of TQ is set using the num-qos-classifiers command, where TQ is the total number of QoS resources required by the SAP. To determine TQ, see Determining the Number of Policers/Meters per Policy (TP).

Number of meters allocated automatically by system = TQ / 2 (up to a maximum of 32 meters)

To calculate the number of SAPs allowed, assume all SAPs are configured to use “TQ” QoS resources per SAP.

Number of SAPs allowed = maximum classification entries / TQ

Note:

The number of SAPs arrived at using the preceding equation is subject to system limits. This equation is used to derive the limit on the number of SAPs due to QoS resources only.

The user is allowed to mix and match SAPs with different QoS resources (that is, using different values of TQ).

The following items determine the number of QoS resources to be allocated for a SAP:

  1. number of match-criteria entries used to identify the FC
  2. number of FCs to use and number of traffic-types to be policed per FC
  3. amount of hardware classification resources needed per entry configured by the user (see Resource Allocation for Service Ingress QoS Policies for information about resources needed per match entry; it varies based on different match criteria in use)

Only those FCs that are in use by the match-criteria classification entries are considered for the number of FCs. These FCs are referred to as “FCs in use.”

9.5.2.1. Determining the Number of Classification Entries

This section describes the rules and methods of determining the number of classification entries.

9.5.2.1.1. Rules for a SAP in a VPLS

Knowing the number of traffic types to use per “FC in use,” the following rules apply for a SAP in a VPLS service to determine the number of classification entries per FC in use.

  1. If an FC is in use and is created without explicit meters, use default meter 1 for unicast traffic and for all other traffic types (that is, broadcast, multicast, and unknown-unicast). This requires one classification entry in hardware. This assumes default multipoint meter 11 is not created by the user.
  2. If an FC is in use and is created without explicit meters, use default meter 1 for unicast traffic and default meter 11 (assuming meter 11 is created by the user) for all other traffic types (that is, broadcast, multicast, and unknown-unicast). This requires two classification entries in hardware.
  3. If an FC is in use and is created with an explicit unicast meter, use that meter for unicast traffic and for all other traffic types (that is, broadcast, multicast, and unknown-unicast). This requires one classification entry in hardware. This assumes default multipoint meter 11 is not created by the user.
  4. If an FC is in use and is created with an explicit unicast meter, use that meter for unicast traffic and use default meter 11 (assuming meter 11 is created by the user) for all other traffic types. This requires two classification entries in hardware.
  5. If an FC is in use and is created with an explicit unicast meter and explicit broadcast meter, use these meters for unicast and broadcast traffic respectively and use the unicast meter for all other traffic types (that is, multicast and unknown-unicast). This requires two classification entries in hardware. This assumes that the default multipoint meter 11 is not created by the user.
  6. If an FC is in use and is created with an explicit unicast meter and explicit broadcast meter, use these meters for unicast and broadcast traffic respectively and use meter 11 (assuming meter 11 is created by the user) for all other traffic types. This requires three classification entries in hardware.
  7. If an FC is in use and is created with an explicit unicast meter and explicit multicast meter, use the unicast meter for unicast traffic and multicast meter for all other kinds of traffic. This requires two classification entries in hardware.
  8. If an FC is in use and is created with an explicit unicast meter, explicit broadcast meter, and explicit multicast meter, use these meters for unicast, broadcast, and multicast traffic types respectively. The unknown unicast traffic type uses the explicitly defined multicast meter. This requires three classification entries in hardware.

9.5.2.1.2. Rules for a SAP in a VLL, VPRN, or IES Service with PIM Disabled

For calculating the number of classification entries per FC for a SAP in a VLL or VPRN service or IES service with PIM disabled, the following rules apply.

  1. Multipoint meters cannot be used. Multipoint meters configured in a policy are not used when the policy is applied to a SAP in an Epipe service.
  2. All FCs in use and associated with a meter always use the unicast meter. Therefore, all FCs in use utilize only one classification entry in the hardware.

9.5.2.1.3. Rules for a SAP in an IES or VPRN Service with PIM/multicast Enabled

Knowing the number of traffic types to use per “FC in use,” the following rules apply for a SAP in an IES and VPRN service enabled with PIM/multicast enabled to arrive at a number of classification entries per FC in use.

  1. If an FC is in use and is created without explicit meters, use default meter 1 for unicast traffic and multicast traffic. This requires one classification entry in hardware. This assumes the default multipoint meter 11 is not created by the user.
  2. If an FC is in use and is created without explicit meters, use default meter 1 for unicast traffic and default meter 11 (assuming meter 11 is created by the user), for multicast traffic. This requires two classification entries in hardware.
  3. If an FC is in use and is created with an explicit unicast meter, use that meter for unicast traffic and for multicast traffic. This requires one classification entry in hardware. This assumes default multipoint meter 11 is not created by the user.
  4. If an FC is in use and is created with an explicit unicast meter, use that meter for unicast traffic and use default meter 11 (assuming meter 11 is created by the user) for multicast traffic. This requires two classification entries in hardware.
  5. If an FC is in use and is created with an explicit unicast meter and explicit multicast meter, use the unicast meter for unicast traffic and multicast meter for multicast traffic. This requires two classification entries in hardware.

9.5.2.1.4. Calculating the Number of Classification Entries per FC

Apply the rules to determine the number of classification entries per FC (only for the FCs in use) using the following equation:

C(i) = SFCi (unicast) + FCi (multicast) + FCi (broadcast) + FCi (unknown_unicast)

i = nc, h1, ef, h2, l1, af, l2, be

where:

  1. FCi (unicast), FCi (multicast), FCi (broadcast), and FCi (unknown-unicast) are set to a value of 1 if the FC uses a classifier to identify traffic-type unicast, multicast, broadcast, and unknown-unicast, respectively
  2. FCi (unicast), FCi (multicast), FCi (broadcast), and FCi (unknown-unicast) are set to a value of 0 if the FC does not use a classifier to identify the traffic-type.

If the user does not configure meters explicitly for the FC and multipoint meter 11 is not created, the default unicast meter is used for all traffic types; therefore, only one classification entry in hardware is required by the FC. If the user does not configure meters explicitly for the FC and multipoint meter 11 is created, the default unicast meter and the default multicast meter are used. By default, two classification entries in hardware are required by an FC.

9.5.2.1.5. Determining the Number of Classification Entries per Policy (TC)

Taking into account the number of match criteria and the number of FCs used, use the following equation to determine total number of classification entries per policy.

TC = S E(i) * C(i)

i = nc, h1, ef, h2, l1, af, l2, be

where:

  1. E(i) is the number of match-criteria entries that classify packets to FCi. For 7210 SAS platforms, the maximum number of classification entries per policy can be 64 (including default).
  2. C(i) is the number of classification entries that are required by FCi to identify different traffic types.

9.5.2.1.6. Determining the Number of Policers/Meters per Policy (TP)

Determine the number of policers or meters to use (TP). A maximum of 32 meters per policy are available. The number of policers/meters is determined by the number of meters associated with FCs in the SAP-ingress QoS policy.

Use the values of TC and TP to determine the required number of QoS resources (TQ).

Only those meters associated with FCs are considered for number of meters. Note that only “FC in use” is considered.

Total QoS resources required (TQ) = max [(TC), (2 * TP))

The resulting number is rounded up to the next multiple of 2, greater than TQ obtained using the preceding equation; for example, if TC = 5 and TP = 2, max (5, (2 * 2)) is 5, and TQ is rounded up to 6.

The user configures the value of TQ using the num-qos-classifiers CLI command.

For examples and more information about resource calculation, see the following sections:

9.6. Table-based Classification Using Dot1P and IP DSCP for Assigning FC and Profile on SAP Ingress

Using an IP DSCP classification policy and a dot1p classification policy is another method used to assign the FC and profile on SAP ingress for use with color-aware meters. This is supported along with the capability to use other header fields in MAC and IP packets through the use of the mac-criteria, ipv4-criteria, and ipv6-criteria commands. When using SAP-ingress color-aware meters and policers, users can configure DEI to assign the initial profile on ingress and can configure either MAC criteria or IP criteria (or both) to assign the FC.

On the 7210 SAS-R6 and 7210 SAS-R12, users have the option of using an IP DSCP classification policy as a second method to assign FC and profile on SAP ingress for use with color-aware meters, as is the case on network ingress.

To implement DSCP classification on the 7210 SAS-R6 and 7210 SAS-R12, users create a DSCP classification policy, associate the policy with a SAP-ingress QoS policy or an Ethernet ingress port, apply the SAP-ingress QoS policy to the SAP or port, and enable the use of the policy. DSCP classification uses classification resources from a table classifier and, potentially, fewer resources from the CAM resources, thereby saving CAM resources for other purposes. When a table-based classification policy is enabled, CAM-based classifications from the SAP-ingress QoS policy are ignored.

9.6.1. IP DSCP and Dot1p Classification Policy Support

The 7210 SAS-R6 and 7210 SAS-R12 support IP DSCP and Dot1p classification as described in this section.

For SAPs in Layer 2 services (Epipe and VPLS) configured to use table-based classification, use the config qos sap-ingress table-classification-criteria CLI command, which provides the option to select one of the following: dot1p or IP DSCP, or both dot1p and IP DSCP, or none. This command is applicable only to SAPs configured in Layer 2 services; it is ignored for Layer 3 services (IES, VPRN, and RVPLS services).

The following behavior is supported with table-based classification for SAPs configured in Layer 2 services, depending on the configuration option selected using the config qos sap-ingress table-classification-criteria CLI command.

  1. If none is configured, use default-fc fc-name profile out (from the SAP-ingress policy).
  2. If use-dscp is configured, use the following policies:
    1. DSCP classification policy for IP packets
    2. default-fc fc-name profile out (from the SAP-ingress policy) for non-IP packets
  3. If use-dot1p is configured, use the following policies:
    1. dot1p classification policy for all tagged packets (IP and non-IP)
    2. default-fc fc-name profile out (from the SAP-ingress policy) for untagged packets
  4. If both-dscp-dot1p is configured, use the following policies:
    1. DSCP classification policy for IP packets
    2. dot1p classification policy for non-IP tagged packets
    3. default-fc fc-name profile out (from the SAP-ingress policy) for non-IP untagged traffic

Table-based classification for SAPs configured in Layer 3 services (IES and VPRN) does not allow classification options using the config qos sap-ingress table-classification-criteria CLI command. It must always be set to both-dscp-dot1p. The following behavior is supported:

  1. IP DSCP-based classification to assign FC and profile to an IP packet (both IPv4 and IPv6) received on SAP ingress
Note:

All SAPs in an RVPLS service can use either table-based classification or CAM-based classification entries. There cannot be a mix of SAPs, where some SAPs use table-based classification and others use CAM entries.

The following is the order of match for packets with table-based classification in Layer-3 services.

  1. IP packets are matched against IP DSCP entries. Ideally, packets match one of the explicitly configured user entries that classifies packets to the configured FC and profile. If there is no match, packets are assigned a default-dscp-fc and profile. If a packet is a non-IP packet, go to 2.
  2. Non-IP tagged Ethernet packets that do not match any IP DSCP entries are matched against dot1p values. Ideally, packets match one of the explicitly configured user entries that classifies packets to the configured FC and profile. If there is no match, packets are assigned a default-dot1p-fc and profile. Alternatively, users have an option to use DEI to assign the profile. If a packet is an untagged non-IP packet, go to 3.
  3. All non-IP untagged Ethernet packets are assigned a default-fc/untagged-fc (user-configurable) value for FC and profile out.

The 7210 SAS-R6 and 7210 SAS-R12 support IP DSCP classification as follows:

  1. IP DSCP-based classification to assign FC and profile to an IP packet (both IPv4 and IPv6) received on SAP ingress
  2. dot1p-based classification to assign FC and profile to tagged non-IP Ethernet packets
  3. assignment of a default FC and profile to untagged non-IP Ethernet packets

The following describes the order of match for packets.

  1. IP packets are matched against IP DSCP entries. Ideally, packets match one of the explicitly configured user entries that classifies packets to the configured FC and profile. If there is no match, packets are assigned a default FC and profile. If a packet is a non-IP packet, go to 2.
  2. Non-IP tagged Ethernet packets that do not match any IP DSCP entries are matched against dot1p values. Ideally, packets match one of the explicitly configured user entries that classifies packets to the configured FC and profile. If there is no match, packets are assigned a default FC and profile. Alternatively, users have an option to use DEI to assign the profile. If a packet is an untagged non-IP packet, go to 3.
  3. All non-IP untagged Ethernet packets are assigned a default value for FC and profile.

9.6.1.1. Default-FC Assignment Rules for SAPs in Layer 3 Services (Including RVPLS Services)

The following default-fc command assignment rules apply for SAPs configured in Layer 3 services, including RVPLS services.

  1. Bridged IP packets processed in an RVPLS context that do not match any of the explicitly configured DSCP classification entries in the access port DSCP classification policy are assigned the default-dscp-fc configured in the policy. The profile assigned on ingress is in accordance with the user configuration (for example, default-dscp-fc "be" profile out).
  2. Bridged, tagged non-IP Layer 2 Ethernet packets, which are processed in an RVPLS context and that do not match any of the explicitly configured dot1p classification entries in the access port dot1p classification policy, are assigned the default-dot1p-fc configured in the policy. The profile assigned on ingress is the user-configures profile (for example, default-dot1p-fc "be" profile out).Bridged, untagged non-IP Layer 2 Ethernet packets, which are processed in an RVPLS context, will not match any of the explicitly configured dot1p classification entries in the access port dot1p classification policy. They are assigned the access port untagged-fc profile.
  3. Routed IP packets processed in an RVPLS context that do not match any of the explicitly configured DSCP classification entries in the DSCP classification policy associated with the interface using the routed-override-qos-policy command are assigned the default-dscp-fc configured in the policy. The profile assigned on ingress is the user-configured profile in the DSCP classification policy.
  4. IP packets processed in an IES or VPRN service context that do not match any of the explicitly configured DSCP classification entries in the DSCP classification policy associated with SAP-ingress policy are assigned the default-dscp-fc configured in the DSCP classification policy. The profile assigned on ingress is the user-configued profile in the DSCP classification policy.

9.6.2. Precedence Rules for DEI Assignments

The following precedence rules pertain to the use of DSCP classification policies, DEI profile assignment, and IP- and MAC-criteria entries.

  1. Assigning a profile using an IP DSCP classification policy has precedence over assigning a profile using DEI bits. That is, if both a DEI-based initial profile assignment and a DSCP-based initial profile assignment are enabled on a port, the profile assigned by DSCP-classification policy takes precedence for IP packets.
  2. The configure port ethernet enable-dei CLI command enables DEI-based profile assignments and can be used to assign a profile for SAPs configured to use CAM-based classification entries.
    1. A port can have a mix of SAPs with some SAPs configured to use DEI for profile assignment with CAM-based classification and other SAPs configured to use table-based classification for both FC and profile assignment.
    2. The enable-dei command does not affect SAPs using table-based classification. That is, a profile assignment for SAPs configured to use table-based classification always uses a DSCP classification policy.
    3. In the current release, using IP or MAC criteria and IP DSCP table-based classification are mutually exclusive.

9.6.3. Creating an IP DSCP Classification Policy

IP DSCP and dot1p classification policies can be used at SAP ingress, allowing users to define the mapping of an IP DSCP or dot1p value to an FC and profile.

The default values for the default-dscp-fc and default-dot1p-fc command are FC “be” and profile “out”. Newly-created classification policies contain the default “be” and “out” values as the default entries. The default-dscp-fc or default-dot1p-fc command assigns the default FC to any IP DSCP or dot1p value that is not explicitly configured by a user.

Up to 50 unique DSCP or dot1p classification policies can be supported on the 7210 SAS-R6 and 7210 SAS-R12.

Use the following syntax to create a DSCP classification QoS policy.

CLI Syntax:
configure> qos>
dscp-classification classification-id [create]
dscp dscp-name [fc fc-name] [profile [in | out]
default-dscp-fc fc profile [in |out]

The following example shows the command to create a DSCP classification QoS policy.

Example:
configure> qos>
dscp-classification 101 create
dscp af42 fc af profile in
dscp af43 fc af profile out
dscp af32 fc h1 profile in
dscp af33 fc h1 profile out
dscp nc1 fc nc profile in
default-dscp-fc be profile out
exit

Use the following syntax to create a dot1p classification QoS policy.

CLI Syntax:
configure> qos>
dot1p-classification classification-id [create]
dot1p dot1p-name [fc fc-name] [profile [in | out]
default-dot1p-fc fc profile [in |out]

The following example shows the command to create a dot1p classification policy.

Example:
configure> qos>
dot1p-classification 101 create
dot1p af42 fc af profile in
dot1p af43 fc af profile out
dot1p af32 fc h1 profile in
dot1p af33 fc h1 profile out
dot1p nc1 fc nc profile in
default-dot1p-fc be profile out
exit

9.6.4. CAM Resource Usage for IP DSCP Classification Policies

The resources for IP DSCP classification policies are taken from hardware tables, which is referred to as table-based classification to differentiate it from CAM-based classification. Table-based resources do not use many CAM entries for classification. Only a fixed number of CAM resources are needed to match the FC and traffic type and to assign a meter/policer. Table-based classification uses CAM resources more efficiently than CAM-based classification.

  1. Users can enable an IP DSCP classification policy on a per-SAP or per-port basis. See Associating a DSCP Classification Policy.
  2. The rules for associating an IP DSCP classification policy with SAPs for different services are different. See Assigning and Enabling DSCP Classification Policies to a SAP.

To calculate the number of resources needed, see the following sections:

9.6.4.1. CAM Resource Allocation

When CAM-based classification is used from the SAP-ingress resource pool, CAM resources are used to match the FC and the traffic type (unicast, broadcast, multicast, and unknown) and to assign a meter to the FC. The maximum number of DSCP entries required is 36 entries (8 FCs * 4 traffic types + 1 default FC * 4 traffic types). The maximum number of CAM resources required is 32, which assumes the use of VPLS service with one meter per traffic type, regardless of the number of IP DSCP classification entries. Even if 64 IP DSCP values are matched, only 32 classification resources in the SAP-ingress CAM resource pool are needed. For Epipe services, the number of entries is reduced to nine (8 FCs + 1 default FC) because all traffic is treated as unicast.

To allocate resources to meters for a SAP ingress QoS policy that is using table-based DSCP classification, use the ip-dscp-port-if-match-enable num-resources command, found under the configure>system>resource-profile>ingress-internal-tcam>qos-sap-ingress-resource context. The command supports up to 10 resources (meters).

Use the following syntax to allocate resources to meters for table-based classification.

CLI Syntax:
configure> system> resource-profile>
ingress-internal-tcam>
qos-sap-ingress-resource>
ip-dscp-port-if-match-enable num-resources

The following example shows the allocation of resources to meters for table-based classification.

Example:
configure> system> resource-profile>
ingress-internal-tcam>
qos-sap-ingress-resource>
ip-dscp-port-if-match-enable 5

9.6.5. Associating a DSCP Classification Policy

A DSCP or dot1p classification policy must be associated with a SAP-ingress QoS policy or an Ethernet port to be able to map flows to an FC and profile for IP traffic received on SAP ingress.

The dscp-classification policy-id or dot1p-classification policy-id value identifies which classification policy is used to match IP packets and map the IP DSCP or dot1p to an FC and profile. The no form of the dscp-classification or dot1p-classification command associates the default classification policy (policy 1). The default policy maps all IP DSCP or dot1p values to FC “be” and profile “out”. If a packet does not match any explicitly configured criteria in the policy, the default-fc mapping is used. See IP DSCP and Dot1p Classification Policy Support for information about Layer 2 and Layer 3 scenarios.

9.6.5.1. Associating a Classification Policy with a SAP-Ingress QoS Policy

The num-qos-classifiers command allocates meters from the resources allocated towards the qos-sap-ingress pool, from the ingress-internal-tcam resource pool.

MAC, IPv4, and IPv6 criteria do not need to be defined because DSCP classification or dot1p classification is being used.

Use the following syntax to associate an IP DSCP classification policy with a SAP-ingress policy.

CLI Syntax:
configure> qos> sap-ingress policy-id [create]
num-qos-classifiers num-resources [ipv6 | no-ipv6]
[no] dscp-classification policy-id
default-fc fc

The following example shows the command usage to associate an IP DSCP classification policy with a SAP-ingress policy.

Example:
configure> qos> sap-ingress 1000 create
num-qos-classifiers 16
dscp-classification 101 
default-fc be
exit

Use the following syntax to associate a dot1p classification policy with a SAP-ingress policy.

CLI Syntax:
configure> qos> sap-ingress policy-id [create]
num-qos-classifiers num-resources [ipv6 | no-ipv6]
[no] dot1p-classification policy-id
default-fc fc

The following example shows the command usage to associate a dot1p classification policy with a SAP-ingress policy.

Example:
configure> qos> sap-ingress 1000 create
num-qos-classifiers 16
dscp-classification 101 
default-fc be
exit

Use the following syntax to configure the classification policy to classify traffic to a forwarding class.

CLI Syntax:
configure> qos> sap-ingress table-classification-criteria table-classification-criteria

The following example shows the command usage to configure the classification policy to classify traffic to a forwarding class.

Example:
configure> qos> sap-ingress table-classification-criteria none

9.6.5.2. Associating a Classification Policy with an Ethernet Port

Users associate an IP DSCP classification policy with an Ethernet port using the configure port ethernet access ingress dscp-classification command.

Users associate a dot1p classification policy with an Ethernet port using the configure port ethernet access ingress dot1p-classification command.

Use the following syntax to associate an IP DSCP classification policy with an Ethernet port.

CLI Syntax:
configure> port port-id
ethernet> access> ingress
[no] dscp-classification policy-id>
[no] untagged-fc fc

The following example shows the command usage to associate an IP DSCP classification policy with an Ethernet port.

Example:
configure> port 1/1/1 
ethernet
access
ingress
dscp-classification 101
untagged-fc 12
exit
exit
exit

Use the following syntax to associate a dot1p classification policy with an Ethernet port.

CLI Syntax:
configure> port port-id
ethernet> access> ingress
[no] dot1p-classification policy-id>
[no] untagged-fc fc
Example:
configure> port 1/1/1 
ethernet
access
ingress
dot1p-classification 101
untagged-fc
exit
exit
exit

9.6.6. Assigning and Enabling DSCP Classification Policies to a SAP

The 7210 SAS-R6 and 7210 SAS-R12 support table-based classification to assign an initial FC and profile on SAP ingress for Epipe and VPLS SAPs, VPRN and IES interface SAPs, and RVPLS SAPs. The use of table-based classification (IP DSCP) and CAM-based classification are mutually exclusive. That is, when table-based classification is used, any CAM-based classification configured from the SAP-ingress QoS policy is ignored.

9.6.6.1. Assigning and Enabling Policies to Epipe and VPLS SAPs

Within Epipe and VPLS services, SAPs can be configured with an IP DSCP or dot1p classification policy per SAP. This applies to SAPs configured on an access port and on a hybrid port. Using the enable-table-classification command means the SAP uses table-based policies along with the meters defined in the SAP-ingress policy. CAM-based resources from the SAP-ingress policy are ignored.

The enable-table-classification command enables the use of IP DSCP or dot1p tables per SAP ingress to assign an FC and profile. Using table-based classification means ignoring CAM classification in the service ingress policy, using only meters from the service ingress policy, and using the IP DSCP classification policy or dot1p classification policy that is configured in the SAP-ingress policy. The default FC is assigned per SAP.

The num-qos-classifiers command allocates meters from the IFP, with resources taken from the ingress-internal-tcam resource pool towards qos-sap-ingress.

The dscp-classification command configures the classification that policy is used to match IP packets and to map an IP DSCP value to an FC and profile.

The dot1p-classification command configures the classification that policy is used to match IP packets and to map a dot1p value to an FC and profile.

The table-classification-criteria command provides an option for all traffic to use either dot1p classification, DSCP classification, or both IP DSCP and dot1p classification, or assign default-fc (none option) to all traffic. The default-fc command configures the FC assigned to all untagged packets. All untagged packets are mapped to the profile “out”.

MAC, IPv4, and IPv6 criteria do not need to be defined because DSCP or dot1p classification is being used.

Use the following syntax to enable table classification for an Epipe and a VPLS service.

CLI Syntax:
configure> service> epipe> sap> ingress>
configure> service> vpls> sap> ingress>
[no] qos policy-id [enable-table-classification]

The following is an example of SAP-ingress QoS policy 1000 configured with DSCP classification policy 101 and default-fc “be”. It is followed by a sample Epipe ingress SAP configured to use SAP-ingress policy 1000 with table-based classification enabled.

Example:
configure> qos> sap-ingress 1000 create
num-qos-classifiers 16
fc af
meter 1
unknown-meter 2
multicast-meter 3
broadcast-meter 4
exit
dscp-classification 101
table-classification-criteria both-dscp-dot1p
default-fc be
exit
Example:
configure> service> epipe> sap>
ingress
qos 1000 [enable-table-classification]
exit

9.6.6.2. Assigning and Enabling Policies to IES and VPRN Interface SAPs

Within IES and VPRN services, SAPs can be configured with an IP DSCP classification policy per SAP. This applies to SAPs configured on an access port and on a hybrid port. Using the enable-table-classification command means the SAP uses table-based policies along with the meters defined in the SAP-ingress policy.

The enable-table-classification, num-qos-classifiers, dscp-classification, and default-fc commands for IES and VPRN interface SAPs operate similarly to Epipe and VPLS SAPs (see Assigning and Enabling Policies to Epipe and VPLS SAPs).

MAC, IPv4, and IPv6 criteria do not need to be configured because DSCP classification is being used.

Use the following syntax to enable table-based classification for an IES and a VPRN service.

CLI Syntax:
configure>service>ies>interface>sap>ingress>
configure>service>vprn>interface>sap>ingress>
[no] qos policy-id [enable-table-classification]

The following is an example of SAP-ingress QoS policy 1000 configured with DSCP classification policy 101 and default-fc “be”. It is followed by a sample ingress SAP on an IES service interface configured to enable table-based classification using SAP-ingress policy 1000.

Example:
configure> qos> sap-ingress 1000 create
num-qos-classifiers 16
fc af
meter 1
unknown-meter 2
multicast-meter 3
broadcast-meter 4
exit
dscp-classification 101
default-fc be
exit
Example:
configure>service>ies>interface>sap>
configure>service>vprn>interface>sap>
ingress
qos 1000 [enable-table-classification]
exit

9.6.6.3. Assigning Policies to RVPLS SAPs

For RVPLS SAPs configured on an access port, the 7210 SAS-R6 and 7210 SAS-R12 support RVPLS service with per-port IP DSCP classification policies for bridged traffic received on SAPs configured in the RVPLS service. For routed traffic, per-IP interface IP DSCP classification policies (that is, the QoS override policy) are used.

For RVPLS SAPs configured on a hybrid port, the network QoS policy of the port type associated with network port ingress is used for RVPLS SAP bridged traffic classification and profile. Only traffic classification is used from the network policy. Meters are still used from the SAP-ingress policy attached on the RVPLS SAP. For routed traffic received on a hybrid port, the IP DSCP policy (that is, the QoS override policy) associated with the RVPLS IP interface is used for traffic classification and profile.

Only meters configured in the SAP-ingress policy associated with RVPLS SAPs are used when table-based classification is enabled under the SAP associated with an RVPLS service.

Note:

All SAPs in an RVPLS service can use either table-based classification or CAM-based entries. There cannot be a mix of SAPs, where some SAPs use table-based classification and others use CAM entries.

9.6.6.3.1. Create a SAP-ingress policy and Assign the Policy to an RVPLS SAP

The following examples create and assign a SAP ingress QoS policy to an RVPLS SAP. Table-based classification is enabled in the override policy associated with the IES interface that is associated with the RVPLS service. In this case, only meters from the SAP ingress QoS policy are used. Ingress CAM entries are ignored (not used).

Example:
configure> qos> sap-ingress 1000 create
num-qos-classifiers 16
fc af
meter 1
unknown-meter 2
multicast-meter 3
broadcast-meter 4
exit
exit
Example:
configure> service> vpls (type rvpls)>
service-name 'rvpls-example-svc'
sap 1/1/1:100 create
ingress
qos 1000 [enable-table-classification]
exit
no shutdown
exit

9.6.6.3.2. Table-based Classification per IP Interface for Routed Packets

For routed packets, although the DSCP classification is based on the DSCP policy attached to the interface, the enable-table-classification command must also be set on RVPLS SAPs for table-based classification to work correctly. If enable-table-classification is not set on an RVPLS SAP, only profile is taken from the routed-override-qos policy for that SAP. In this case, traffic classification (as per TCAM-based classification) and meters are taken from the SAP-ingress policy attached to the RVPLS SAP.

The following syntax enables table-based classification and specifies the QoS override classification policy in the IES or VPRN interface RVPLS configuration. The policy-id specified in the routed-override-qos-policy command identifies the DSCP policy configured using the configure qos dscp-classification command.

CLI Syntax:
configure> service> ies> interface> vpls service-name
ingress
[no] enable-table-classification
[no] routed-override-qos-policy policy-id
exit
exit
Example:
configure> service> ies> interface>
vpls "rvpls-example-svc"
ingress 
enable-table-classification
routed-override-qos-policy 101
exit
exit
exit

9.6.6.3.3. Table-based Classification per Port for Bridged Packets

For bridged packets, although the DSCP classification is based on the DSCP policy attached to the port, the enable-table-classification command must also be set in the IES or VPRN interface context, as well as the respective RVPLS SAP context for table-based classification to work correctly (as shown in the example in this section). If enable-table-classification is not set on the respective RVPLS SAP, only profile is taken from the port policy for that SAP. In this case, classification (as per TCAM-based classification) and meters are taken from the SAP-ingress policy.

The following syntax enables table-based classification on an Ethernet port and specifies the DSCP classification policy in the port ethernet access ingress command.

CLI Syntax:
configure>port>
ethernet>
[no] enable-table-classification
exit
configure>port>ethernet>access>ingress>
[no] dscp-classification policy-id
[no] untagged-fc fc
exit
Example:
configure>port 1/1/1
ethernet
enable-table-classification
exit
configure>port> 1/1/1
ethernet>access>ingress> 
dscp-classification 101
untagged-fc ef
exit
exit
configure> service> ies> interface>
vpls "rvpls-example-svc"
ingress
enable-table-classification
exit
exit
exit

9.7. Calculating Resources Required for Classification

This section provides examples for calculating the resources required for SAP-ingress policy classification.

9.7.1. Examples: Calculating Resources Required for CAM-based Classification

This section provides examples for calculating the amount of resources needed for a service ingress policy when CAM-based classification is used. See Examples: Calculating Resources Required for IP DSCP Table-based Classification for calculations when IP DSCP table-based classification is used.

The resource calculation shown for VLL is also applicable for VPRN services.

The examples in this section use the following equations to calculate the value for num-qos-classifiers used in the SAP-ingress QoS policy. See Computation of Resources Used per SAP-ingress Policy for CAM-based Classification for information about these equations.

  1. total number of classification entries (TC)
       TC = S E(i) * C(i)
       i = nc, h1, ef, h2, l1, af, l2, be
    where:
    1. E(i) is the number of match-criteria entries that classify packets to FCi
    2. C(i) is the number of classification entries that are required by FCi to identify different traffic types
  2. total number of QoS resources required (TQ)
       TQ = max [(TC), (2 * TP)]
    where:
    1. TP is the number of meters/policers used

In addition, the examples show how to determine the number of classification entries for each forwarding class. For example, FCh2 (shown in example 1) is the sum of four traffic types: (unicast (U), broadcast (B), multicast (M), and unknown-unicast (U-u)). See Determining the Number of Classification Entries for more information.

   FCh2 = 1 + 0 + 1 + 0 = 2          (generalized to FCh2 = U + B + M + U-u

If BUM entries are not explicit and multipoint traffic is expected, meter "11" is used and the "M" traffic type is given a "1".

9.7.1.1. Example 1

sap-ingress 10 create
     description     “example-policy-1”
     num-qos-classifiers   8
     meter      1 create
          rate cir 0 pir max
     exit
     meter 11 multipoint create
          rate cir 0 pir max
     exit
meter      3 create
          rate cir     100 pir 100
     exit
     scope template
     default-fc      be
     fc     be create
          meter     3
     exit
     fc     af create
          meter     1
     exit
     fc     l1 create
          meter      3
     exit
     fc     h2 create
          meter     3
     exit
     mac-criteria dot1p-only
          entry      1 create
               match dot1p      7
               action fc af
          exit
          entry 2 create
               match dot1p      5
               action fc l1
          exit
          entry 3 create
               match dot1p      6
               action fc h2
          exit
     exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, compute the number of classification entries per FC as follows.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 0 + 1 + 0 = 2

Because FCh2 uses a unicast meter, an entry is needed to identify this traffic type explicitly. Another entry is needed to classify broadcast, multicast and unknown-unicast traffic type to the same FC and use the default meter 11.

FCl1 = 1 + 0 + 1 + 0 = 2
FCaf = 1 + 0 + 1 + 0 = 2
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 1 + 0 = 2

Use the following equation to calculate the total classification entries used by this policy.

TC = (0 * 0)nc + (0 * 0)h1 + (0 * 0)ef + (1 * 2)h2 + (1 * 2)l1 + (1 * 2)af + (0 * 0)l2 + (1 * 2)be = 8

Three explicit match criteria entries are used to map traffic to each of FC H2, FC L1, and FC AF, along with a default classification entry for FC BE.

The total number of meters used = 3 (because FCs use meter 1, meter 3 and meter 11).

In this example, num-qos-classifiers 8 is used (maximum of (8, (2 * 3))).

If the same policy were used for a SAP in an Epipe service, because all traffic is classified to a unicast traffic type and only unicast meters are used, the following computation is used.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 0 + 0 + 0 = 1
FCl1 = 1 + 0 + 0 + 0 = 1
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the preceding equation, total classification entries used = 4 and meters used = 2.

This example shows that using the same policy for Epipe SAP can lead to inefficient use of resources. Nokia recommends creating a different policy with the required number of resources (that is, with num-qos-classifiers 4).

9.7.1.2. Example 1a (Default Multipoint Meter 11 is Not Used)

sap-ingress 10 create
          description  “example-policy”
          num-qos-classifiers 4
 
          meter 1  create
               rate cir 0 pir max
          exit
          meter 3 create
               rate cir 100 pir 100
          exit
          
          scope template
          
          default-fc  be
          
          fc be  create
               meter 3
          exit
          fc af  create
               meter 1
          exit
          fc l1  create
               meter 3
          exit
          fc h2  create
               meter 3
          exit
          mac-criteria dot1p-only
          entry 1 create
               match dot1p 7
               action fc af
          exit
          entry 2  create
               match dot1p 5
               action fc l1
          exit
          entry 3  create
               match dot1p  6
               action fc h2
          exit
     exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, compute the number of classification entries per FC as follows.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 0 + 0 + 0 = 1

Because FCh2 uses unicast meter for all traffic types, an entry to classify all traffic types to FCh2 explicitly is required.

FCl1 = 1 + 0 + 0 + 0 = 1
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Use the following equation to calculate the total classification entries used by this policy.

TC = (0 * 0)nc + (0 * 0)h1 + (0 * 0)ef + (1 * 1)h2 + (1 * 1)l1 + (1 * 1)af + (0 * 0)l2 + (1 *1)be = 4

(three explicit match criteria entries are used to map traffic to each of FC H2, FC L1, and FC AF along with a default classification entry for FC BE)

The total number of meters used = 2 (because FCs use meter 1 and meter 3).

In this example, num-qos-classifiers 4 is used (maximum of (4, (2 * 2))). The use of unicast meter for all traffic-types allows QoS resources to be used efficiently.

If the same policy were used for a SAP in an Epipe service, all traffic is classified to a unicast traffic type, and only unicast meters are used, the following equations are used.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 0 + 0 + 0 = 1
FCl1 = 1 + 0 + 0 + 0 = 1
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the preceding equation for TC calculation, total classification entries used = 4 and meters used = 2.

This example shows that using the same policy for Epipe SAP can lead to inefficient use of resources. Nokia recommends creating a different policy with the required number of resources (that is, with num-qos-classifiers 4).

9.7.1.3. Example 2

sap-ingress 10 create
     description     “example-policy-1”
     num-qos-classifiers     16
     meter      1 create
          rate cir 0 pir max
     exit
     meter 11 multipoint create
          rate cir 0 pir max
     exit
     meter      3 create
          rate cir     100 pir 100
     exit
     meter      2 create
          rate cir 1 pir 20
     exit
     scope template
     default-fc           be
     fc     be create
          meter      3
          broadcast-meter 2
     exit
     fc     af create
          meter      3
          broadcast-meter 2
     exit
     fc     l1 create
          meter      3
          broadcast-meter 2
     exit
     fc     h2 create
          meter      3
          broadcast-meter 2
     exit
     mac-criteria dot1p-only
          entry      1 create
               match dot1p      7
               action fc af
          exit
          entry 2 create
               match dot1p      5
               action fc l1
          exit
          entry 3 create
               match dot1p      6
               action fc h2
          exit
     exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, classification entries used per FC, use the following computation.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 1 + 1 + 0 = 3

Because FCh2 uses unicast meter and broadcast meter, so two entries are needed to identify these traffic types explicitly. Another entry is needed to classify multicast and unknown-unicast traffic type to FCh2 and use the default meter 11.

FCl1 = 1 + 1 + 1 + 0 = 3
FCaf = 1 + 1 + 1 + 0 = 3
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 1 + 1 + 0 = 3

Using the preceding equation for TC calculation, to get the total classification entries used = 12 (three explicit match criteria entries map to each of FC H2, L1, and AF along with a default classification rule for BE).

The number of meters used = 3 (because FCs use only meter 2, meter 3, and meter 11).

In this example, num-qos-classifiers 16 is used (that is, a maximum of (12, (2*3))).

If the same policy were used for a SAP in an Epipe service, all traffic is classified to a unicast traffic type and only unicast meters are used, use the following computations.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 0 + 0 + 0 = 1
FCl1 = 1 + 0 + 0 + 0 = 1
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the preceding equation, the total classification entries used = 4 and meters used = 1.

This example shows that using the same policy for Epipe SAP can lead to inefficient use of resources. Nokia recommends creating a different policy with the required number of resources (that is, with num-qos-classifiers 4).

9.7.1.4. Example 2a (Default Multipoint Meter 11 is Not Used)

sap-ingress 10 create
     description  “example-policy-1”
     num-qos-classifiers  8
     
     meter 1 create
          rate cir 0 pir max
     exit
     meter 3 create
          rate cir  100 pir 100
     exit
     meter 2 create
          rate cir 1 pir 20
     exit
     scope template
     default-fc           be
     fc be  create
          meter  3
          broadcast-meter 2
     exit
     fc af  create
          meter  3
          broadcast-meter 2
     exit
     fc l1  create
          meter  3
          broadcast-meter 2
     exit
     fc h2  create
          meter  3
          broadcast-meter 2
     exit
     mac-criteria dot1p-only
     entry  1  create
          match dot1p  7
          action fc af
     exit
     entry 2  create
          match dot1p 5
          action fc l1
     exit
     entry 3 create
          match dot1p  6
          action fc h2
     exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, classification entries used per FC us the following computation.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 0 + 1 + 0 = 2

Because this FC uses unicast meter for unicast, multicast, unknown-unicast traffic and broadcast meter for broadcast traffic, two entries are needed.

FCl1 = 1 + 0 + 1 + 0 = 2
FCaf = 1 + 0 + 1 + 0 = 2
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 1 + 0 = 2

Using this equation to get the total classification, entries used = 8 ( three explicit match criteria entries map to each of FC H2, L1, and AF along with a default classification rule for BE).

The number of meters used = 2 (because FCs use only meter 2 and meter 3).

In this example, num-qos-classifiers 8 is used (that is, maximum of (8, (2*2))).

If the same policy were used for a SAP in an Epipe service, all traffic is classified to a unicast traffic type and only unicast meters are used, use the following computation.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 0 + 0 + 0 = 1
FCl1 = 1 + 0 + 0 + 0 = 1
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1
 

Using the preceding equation, the total classification entries used = 4 and meters used = 1.

This example shows that using the same policy for Epipe SAP can lead to inefficient use of resources. Nokia recommends creating a different policy with the required number of resources (that is, with num-qos-classifiers 4).

9.7.1.5. Example 3

sap-ingress 10 create
     description     “example-policy-2”
     num-qos-classifiers      16
     meter      1 create
          rate cir      100 pir 100
     exit
     meter     11 multipoint create
          rate cir 1 pir 20
     exit
     meter      3 create 
          rate cir      100 pir 100
     exit
     meter      2 create
          rate cir 1 pir 20
     exit
     meter      4 create
          rate cir 10 pir 100
     exit
     meter 5 create
          rate cir 10 pir 10
     exit
     scope template
     default-fc           be
     fc     af create
          meter      3
          broadcast-meter 2
          multicast-meter  4
     exit
     fc     l1 create
          meter      3
          broadcast-meter 2
     exit
     fc     h2 create
          meter      3
          broadcast-meter 2
     exit
     fc      h1 create
          meter      5
          broadcast-meter 4
          multicast-meter  4
          unknown-meter  4
     exit
     mac-criteria dot1p-only
          entry      1 create
               match dot1p     7
               action fc af
          exit
          entry 2 create
               match dot1p      5
               action fc l1
          exit
          entry 3 create
               match dot1p     6
               action fc h2
          exit
          entry 4 create
               match dot1p      3
               action fc h1
          exit
exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, the classification entries used per FC are the following.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 1 + 1 + 1 + 1 = 4

Because FCh1 uses unicast, broadcast, multicast and unknown-unicast meter, four entries are needed to identify these traffic types explicitly.

FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 1 + 1 + 0 = 3

Because FCh2 uses unicast meter and broadcast meter, two entries are needed to identify these traffic types explicitly. Another entry is needed to classify multicast and unknown-unicast traffic type to the same FC and use the default meter 11.

FCl1 = 1 + 1 + 1 + 0 = 3

Because FCl1 uses only unicast meter, an entry is needed to identify this traffic type explicitly. Another entry is needed to classify broadcast, multicast, and unknown-unicast traffic type to the same FC and use the default meter 11.

FCaf = 1 + 1 + 1 + 0 = 3

Becasue FCaf uses unicast, broadcast and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as the multicast traffic type and uses the same meter.

FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 1 + 0 = 2

Using the preceding equation, the total classification entries used = 15 and meters used = 6.

If the same policy were used for a SAP in an Epipe service, and all traffic is classified to a unicast traffic type and only unicast meters are used, the following is used.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 1 + 0 + 0 + 0 = 1
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 0 + 0 + 0 = 1
FCl1 = 1 + 0 + 0 + 0 = 1
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the preceding equation, the total classification entries used = 5 and meters used = 3 (because all FCs used only meter 1, meter 3 and meter 5).

9.7.1.6. Example 3a (Default Multipoint Meter 11 is Not Used)

sap-ingress 10 create
     description  “example-policy-2”
     num-qos-classifiers  12
     meter 1 create
          rate cir 100 pir 100
     exit
     meter 3 create
          rate cir 100 pir 100
     exit
     meter  2 create
          rate cir 1 pir 20
     exit
     meter 4 create
          rate cir 10 pir 100
     exit
     meter 5 create
          rate cir 10 pir 10
     exit
     scope template
     default-fc   be
     fc af  create
          meter  3
          broadcast-meter 2
          multicast-meter 4
     exit
     fc l1  create
          meter  3
          broadcast-meter 2
     exit
     fc h2  create
          meter  3
          broadcast-meter 2
     exit
     fc h1  create
          meter 5
          broadcast-meter 4
          multicast-meter 4
          unknown-meter 4
     exit 
     mac-criteria dot1p-only
     entry  1  create
          match dot1p  7
          action fc af
     exit
     entry 2  create
          match dot1p 5
          action fc l1
     exit
     entry 3  create
          match dot1p  6
          action fc h2
     exit
     entry 4  create
          match dot1p 3
          action fc h1
     exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, the classification entries used per FC are the following.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 1 + 1 + 1 + 1 = 4

Because FCh1 uses unicast, broadcast, multicast, and unknown-unicast meter, four entries are needed to identify these traffic types explicitly.

FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 0 + 1 + 0 = 2

Because FCh2 uses unicast meter and broadcast meter, two entries are needed to identify these traffic types explicitly. Multicast and unknown-unicast traffic use the same resource as the unicast traffic.

FCl1 = 1 + 0 + 1 + 0 = 2

Because FCl1 uses unicast meter and broadcast meter, two entries are needed to identify these traffic types explicitly. Multicast and unknown-unicast traffic use the same resource as the unicast traffic.

FCaf = 1 + 1 + 1 + 0 = 3

Because FCaf uses unicast, broadcast, and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as multicast traffic type and uses the same meter.

FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Because no explicit meters are configured for FC be, it uses meter 1 for all traffic types and needs one entry to identify these traffic types.

Using the preceding equation, the total classification entries used = 12 and meters used = 5. The num-qos-classifiers can be set to 12 (the minimum value).

If the same policy were used for a SAP in an Epipe service, all traffic is classified to a unicast traffic type and only unicast meters are used, use the following.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 1 + 0 + 0 + 0 = 1
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 0 + 0 + 0 = 1
FCl1 = 1 + 0 + 0 + 0 = 1
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the preceding equation, the total classification entries used = 5 and meters used = 3 (because all FCs used only meter 1, meter 3, and meter 5). For Epipe service, a policy with num-qos-classifiers set to 6 can be used.

9.7.1.7. Example 4

sap-ingress 10 create
     description     “example-policy-3”
     num-qos-classifiers      32
     meter      1 create
          rate cir     100 pir 100
     exit
     meter     11 multipoint create
          rate cir 1 pir 20
     exit
     meter      3 create
          rate cir     100 pir 100
     exit
     meter      2 create
          rate cir 1 pir 20
     exit
     meter      4 create
          rate cir 10 pir 100
     exit
     meter      5 create
          rate cir 10 pir 10
     exit
     meter      6 create
          rate cir 11 pir 100
     exit
     meter      8 create
          rate cir 20 pir 100
     exit
     scope template
     default-fc be
     fc     af create
          meter      3
          broadcast-meter 2
          multicast-meter  4
     exit
     fc     l1 create
          meter      3
          broadcast-meter 2
     exit
     fc     h2 create
          meter      3
          broadcast-meter 2
     exit
     fc      h1 create
          meter      5
          broadcast-meter 4
          multicast-meter  4
          unknown-meter  4
     exit
     fc      ef create
          meter      6
          broadcast-meter 2
          multicast-meter  8
     exit
     fc      nc create
          meter 6
          broadcast-meter 2
          multicast-meter 8
     exit
     mac-criteria dot1p-only
          entry      1 create
               match dot1p      4
               action fc af
          exit
          entry 2 create
               match dot1p      5
               action fc l1
          exit
          entry 3 create
               match dot1p      6
               action fc h2
          exit
          entry 4 create
               match dot1p      3
               action fc h1
          exit
          entry 5 create
               match dot1p      2
               action fc ef
          exit
          entry 6 create
               match dot1p      7
               action fc nc
          exit
     exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, compute the classification entries per FC, as follows.

FCnc = 1 + 1 + 1 + 0 = 3

Because FCnc uses unicast, broadcast, and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as the multicast traffic type and uses the same meter.

FCh1 = 1 + 1 + 1 + 1 = 4

Because FCh1 uses unicast, broadcast, multicast, and unknown-unicast meter, four entries are needed to identify these traffic types explicitly.

FCef = 1 + 1 + 1 + 0 = 3

Because FCef uses unicast, broadcast, and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as the multicast traffic type and uses the same meter.

FCh2 = 1 + 1 + 1 + 0 = 3

Because FCh2 uses unicast meter and broadcast meter, two entries are needed to identify these traffic types explicitly. Another entry is needed to classify multicast and unknown-unicast traffic types to the same FC and use the default meter 11.

FCl1 = 1 + 1 + 1 + 0 = 3
FCaf = 1 + 1 + 1 + 0 = 3

Because FCaf uses unicast, broadcast, and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as the multicast traffic type and uses the same meter.

FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 1 + 0 = 2

Using the preceding equation, the total classification entries used = 21 and meters used = 8.

If the same policy were used for a SAP in an Epipe service, and because all traffic is classified to a unicast traffic type and only unicast meters are used, use the following.

FCnc = 1 + 0 + 0 + 0 = 1
FCh1 = 1 + 0 + 0 + 0 = 1
FCef = 1 + 0 + 0 + 0 = 1
FCh2 = 1 + 0 + 0 + 0 = 1
FCl1 = 1 + 0 + 0 + 0 = 1
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the preceding equation, the total classification entries used = 7 and meters used = 4.

This example shows that using the same policy for Epipe SAPs can lead to inefficient use of resources. Nokia recommends creating a different policy with the required number of resources (that is, with num-qos-classifiers 8).

9.7.1.8. Example 4a (Default Multipoint Meter 11 is Not Used)

sap-ingress 10 create
     description  “example-policy-3”
     num-qos-classifiers  20
     meter 1 create
          rate cir 100 pir 100
     exit
     meter 3 create
          rate cir  100 pir 100
     exit
     meter 2 create
          rate cir 1 pir 20
     exit
     meter 4 create
          rate cir 10 pir 100
     exit
     meter 5 create
          rate cir 10 pir 10
     exit
     meter 6 create
          rate cir 11 pir 100
     exit
     meter 8 create
          rate cir 20 pir 100
     exit
 
     scope template
     
     default-fc  be
     fc af  create
          meter  3
          broadcast-meter 2
          multicast-meter 4
     exit
     fc l1  create
          meter 3
          broadcast-meter 2
     exit
     fc h2 create
          meter 3
          broadcast-meter 2
     exit
     fc h1 create
          meter 5
          broadcast-meter 4
          multicast-meter 4
          unknown-meter 4
     exit
     fc ef  create
          meter 6
          broadcast-meter 2
          multicast-meter 8
     exit
     fc nc  create
          meter 6
          broadcast-meter 2
          multicast-meter 8
     exit
     mac-criteria dot1p-only
     entry  1  create
          match dot1p  4
          action fc af
     exit
     entry  2  create
          match dot1p 5
          action fc l1
     exit
     entry  3   create
          match dot1p  6
          action fc h2
     exit
     entry  4  create
          match dot1p 3
          action fc h1
     exit
     entry   5  create
          match dot1p 2
          action fc ef
     exit
     entry   6  create
          match dot1p 7
          action fc nc
     exit
     exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, compute the classification entries per FC as follows.

FCnc = 1 + 1 + 1 + 0 = 3

Because FCnc uses unicast, broadcast, and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as the multicast traffic type and uses the same meter.

FCh1 = 1 + 1 + 1 + 1 = 4

Because FCh1 uses unicast, broadcast, multicast, and unknown-unicast meter, four entries are needed to identify these traffic types explicitly.

FCef = 1 + 1 + 1 + 0 = 3

Because FCef uses unicast, broadcast, and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as the multicast traffic type and uses the same meter.

FCh2 = 1 + 1 + 1 + 0 = 3

Because FCh2 uses unicast meter and broadcast meter, two entries are needed to identify these traffic types explicitly. Multicast and unknown-unicast traffic of the same FC use the unicast resources (both meter and classification entry).

FCl1 = 1 + 1 + 1 + 0 = 3
FCaf = 1 + 1 + 1 + 0 = 3

Because FCaf uses unicast, broadcast and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as the multicast traffic type and uses the same meter.

FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Because FCbe uses a single meter for all traffic-types, only a single meter and single entry is needed.

Using the preceding equation, the total classification entries used = 20 and meters used = 7, num-qos-classifiers to use is 20 (the minimum value).

If the same policy were used for a SAP in an Epipe service, because all traffic is classified to a unicast traffic type and only unicast meters are used, use the following.

FCnc = 1 + 0 + 0 + 0 = 1
FCh1 = 1 + 0 + 0 + 0 = 1
FCef = 1 + 0 + 0 + 0 = 1
FCh2 = 1 + 0 + 0 + 0 = 1
FCl1 = 1 + 0 + 0 + 0 = 1
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the preceding equation, the total classification entries used = 7 and meters used = 4.

This example shows that using the same policy for Epipe SAP can lead to inefficient use of resources. Nokia recommends creating a different policy with the required number of resources (that is, with num-qos-classifiers 8).

9.7.1.9. Example 5

sap-ingress 10 create
     description     “example-policy-3”
     num-qos-classifiers      32
     meter      1 create
          rate cir     100 pir 100
     exit
     meter      11 multipoint create
          rate cir 1 pir 20
     exit
     meter      3 create
          rate cir      100 pir 100
     exit
     meter      2 create
          rate cir 1 pir 20
     exit
     meter      4 create
          rate cir 10 pir 100
     exit
     meter      5 create
          rate cir 10 pir 10
     exit
     meter      6 create
          rate cir 11 pir 100
     exit
     meter      8 create
          rate cir 20 pir 100
     exit
     scope template
     default-fc           be
     fc     af create
          meter      3
          broadcast-meter 2
          multicast-meter  4
     exit
     fc     l1 create
          meter      3
          broadcast-meter 2
     exit
     fc     h2 create
          meter      3
          broadcast-meter 2
     exit
     fc      h1 create
          meter      5
          broadcast-meter 4
          multicast-meter  4
          unknown-meter  4
     exit
     fc      ef create
     exit
     fc      nc create
          meter 6
          broadcast-meter 2
          multicast-meter 8
     exit
     mac-criteria dot1p-only
          entry      1 create
               match dot1p      4
               action fc af
          exit
          entry 2 create
               match dot1p      5
               action fc l1
          exit
          entry 3 create
               match dot1p      6
               action fc h2
          exit
          entry 4 create
               match dot1p      3
               action fc h1
          exit
          entry 5 create
               match dot1p      2
               action fc ef
          exit
          entry 6 create
               match dot1p      7
               action fc nc
          exit
     exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, use the following to find the classification entries used per FC.

FCnc = 1 + 1 + 1 + 0 = 3

Because FCnc uses unicast, broadcast, and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as multicast traffic type and uses the same meter.

FCh1 = 1 + 1 + 1 + 1 = 4

Because FCh1 uses unicast, broadcast, multicast, and unknown-unicast meter, four entries are needed to identify these traffic types explicitly.

FCef = 1 + 0 + 1 + 0 = 2

Because no meters are explicitly configured, FCef uses the appropriate default that meters all the traffic types (that is, unicast traffic uses unicast meter 1 and broadcast, multicast, and unknown-unicast traffic uses multipoint meter 11).

FCh2 = 1 + 1 + 1 + 0 = 3

Because FCh2 uses unicast meter and broadcast meter, two entries are needed to identify these traffic types explicitly. Another entry is needed to classify multicast and unknown-unicast traffic types to the same FC and use the default meter 11.

FCl1 = 1 + 1 + 1 + 0 = 3
FCaf = 1 + 1 + 1 + 0 = 3

Because FCaf uses unicast, broadcast, and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as that multicast traffic type and uses the same meter.

FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 1 + 0 = 2

Using the preceding equation, the total classification entries used = 20 and meters used = 8.

If the same policy were used for a SAP in an Epipe service, because all traffic is classified to a unicast traffic type and only unicast meters are used, the following is true.

FCnc = 1 + 0 + 0 + 0 = 1
FCh1 = 1 + 0 + 0 + 0 = 1
FCef = 1 + 0 + 0 + 0 = 1
FCh2 = 1 + 0 + 0 + 0 = 1
FCl1 = 1 + 0 + 0 + 0 = 1
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the preceding equation, the total classification entries used = 7 and meters used = 4.

9.7.1.10. Example 6

sap-ingress 10 create
     description     “example-policy-1”
     num-qos-classifiers      16
 
     meter      1 create
          rate cir 0 pir max
     exit
     meter 11 multipoint create
          rate cir 0 pir max
     exit
     meter      3 create
          rate cir     100 pir 100
     exit
     meter 4 create
          rate cir 10  pir 50
     exit
 
     scope template
 
     default-fc      be
     fc     be create
          meter      3
     exit
     fc     af create
          meter      1
     exit
     fc     l1 create
          meter      3
          multicast-meter 4
     exit
     fc     h2 create
          meter      3
     exit
 
     mac-criteria dot1p-only
          entry      1 create
               match dot1p      7
               action fc af
          exit
          entry 2 create
               match dot1p      5
               action fc l1
          exit
          entry 3 create
               match dot1p      6
               action fc h2
          exit
     exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, the following represents the number of classification entries per FC.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 0 + 1 + 0 = 2
FCl1 = 1 + 0 + 1 + 0 = 2

Because FCl1 uses unicast meter and multicast meter, an entry is needed to identify these traffic types explicitly. Broadcast and unknown-unicast traffic are also classified using the same entry as multicast and use the same meter.

FCaf = 1 + 0 + 1 + 0 = 2

Becasue FCaf uses unicast meter, an entry is needed to identify these traffic types explicitly. Another entry is needed to classify broadcast, multicast, and unknown-unicast traffic types to the same FC and use the default meter 11.

FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 1 + 0 = 2

Using the above equation, the total classification entries used = 8 and meters used = 4.

If the same policy were used for a SAP in an Epipe service, all traffic is classified to a unicast traffic type and only unicast meters are used, so the following is true.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 1 + 0 + 0 + 0 = 1
FCl1 = 1 + 0 + 0 + 0 = 1
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the above equation, the total classification entries used = 4 and meters used = 2.

9.7.1.11. Example 7

sap-ingress 10 create
     num-qos-classifiers      8
     meter 1 create
     exit
     meter 11 multipoint create
     exit
     meter 3 create
     exit
     meter 4 create
     exit
     fc be create
          meter 1
          broadcast-meter 11
          mulitcast-meter   4
     exit
     fc af create
          meter 3
     exit
     default-fc be 
     match entry 1
          dot1p 7 fc af
     exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, the following are the number of classification entries per FC.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 0 + 0 + 0 + 0 = 0
FCl1 = 0 + 0 + 0 + 0 = 0
FCaf = 1 + 0 + 1 + 0 = 2

Because FCaf uses unicast meter, an entry is needed to identify these traffic types explicitly. Another entry is needed entry to classify broadcast, multicast, and unknown-unicast traffic type to the same FC and use the default meter 11.

FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 1 + 1 + 0 = 3

Because FCbe uses unicast, broadcast, and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as the multicast traffic type and uses the same meter.

Using the preceding equation, the total classification entries used = 5 and meters used = 4.

If the same policy were used for a SAP in an Epipe service, because all traffic is classified to a unicast traffic type and only unicast meters are used, the following is true.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 0 + 0 + 0 + 0 = 0
FCl1 = 0 + 0 + 0 + 0 = 0
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the preceding equation, the total classification entries used = 2 and meters used = 2.

9.7.1.12. Example 8

sap-ingress 10 create
     num-qos-classifiers     16
     meter 1 create
     exit
     meter 11 multipoint create
     exit
     meter 3 create
     exit
     meter 4 create
     exit
     fc be create
          meter 1
          broadcast-meter 11
          mulitcast-meter   4
     exit
     fc af create
          meter 3
     exit
     default-fc be
     mac-criteria dot1p-only
     entry 1 create
          match dot1p 7 7
          action fc af
     exit
          dot1p 7 fc af
     exit
     match entry 2 
          dot1p 5 fc af
     exit
     match entry 3 
          dot1p 3 fc af
     exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, the following represents number of classification entries per FC.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 0 + 0 + 0 + 0 = 0
FCl1 = 0 + 0 + 0 + 0 = 0
FCaf = 1 + 0 + 1 + 0 = 2

Because FCaf uses unicast meter, an entry is needed to identify these traffic types explicitly. Another entry is needed to classify broadcast, multicast, and unknown-unicast traffic types to the same FC and use the default meter 11.

FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 1 + 1 + 0 = 3

Because FCbe uses unicast, broadcast, and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as the multicast traffic type and uses the same meter.

Using the equation, calculate the total classification entries used by this policy, as follows.

TC = (0 * 0)nc + (0 * 0)h1 + (0 * 0)ef + (0 * 0)h2 + (0 * 0)l1 + (3 * 2)af + (0 * 0)l2 + (1 * 3)be = 9

The number of meters used in this policy = 4.

In this example, num-qos-classifiers 16 is used (that is, a maximum of (9, (2 * 4))).

If the same policy were used for a SAP in an Epipe service, because all traffic is classified to a unicast traffic type and only unicast meters are used, the following is true:

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 0 + 0 + 0 + 0 = 0
FCl1 = 0 + 0 + 0 + 0 = 0
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the equation, calculate the total classification entries used by this policy, as follows.

TC = (0 * 0)nc + (0 * 0)h1 + (0 * 0)ef + (0 * 0)h2 + (0 * 0)l1 + (3 * 1)af + (0 * 0)l2 + (1 * 1)be = 4

The number of meters used in this policy = 2.

9.7.1.13. Example 9

sap-ingress 10 create
     num-qos-classifiers      256
     meter 1 create
     exit
     meter 11 multipoint create
     exit
     meter 3 create
     exit
     meter 4 create
     exit
     fc be create
          meter 1
          broadcast-meter 11
          mulitcast-meter   4
     exit
     fc af create
          meter 3
          broadcast-meter 11
          multicast-meter   4
     exit
     default-fc be
     ip-criteria  dscp-only
      entry 1  create
            match dscp cp1
            action fc af
      exit
      entry 2  create 
            match dscp cp2
            action fc af
      exit
      entry 3 create
            match dscp cp3
            action fc af
      exit
      entry 4  create
            match dscp cp4
            action fc af
      exit
      entry 5  create
            match dscp cp5
            action fc af
      exit
      entry 6  create
            match dscp cp6
            action fc af
      exit
      entry 7   create
            match dscp cp7
            action fc af
      exit
      entry 8   create
            match dscp cs1 
            action fc af
      exit
      entry 9   create
            match dscp cp9
            action fc af
      exit
      entry 10   create
            match dscp af11
            action fc af
      exit
      entry 11   create
            match dscp cp11 
            action fc af
      exit
      entry 12   create
            match dscp af12
            action fc af
      exit
      entry 13   create
            match dscp cp13
            action fc af
      exit
      entry 14   create
            match dscp af13
            action fc af
      exit
      entry 15   create
            match dscp cp15
            action  fc af
      exit
      entry 16   create
            match dscp  cs2
            action fc af
      exit
      entry 17   create
            match dscp cp17
            action fc af
      exit
      entry 18   create
            match dscp af21
            action  fc af
      exit
      entry 19   create
            match dscp cp19 
            action fc af
      exit
      entry 20  create
            match dscp af22 
            action fc af
      exit
      entry 21   create
            match dscp cp21 
            action fc af
      exit
      entry 22   create
            match dscp af23 
            action  fc af
      exit
      entry 23   create
            match dscp cp23
            action fc af
      exit
      entry 24   create
            match dscp cs3
            action  fc af
      exit
      entry 25   create
            match dscp cp25
            action fc af
      exit
      entry 26   create
            match dscp af31
            action  fc af
      exit
      entry 27   create
            match dscp cp27 
            action fc af
      exit
      entry 28   create
            match dscp af32
            action fc af
      exit
      entry 29   create
            match dscp cp29
            action fc af
      exit
      entry 30   create
            match dscp af33
            action fc af
      exit
      entry 31   create
            match dscp cp31 
            action fc af
      exit
      entry 32   create
            match dscp cs4
            action fc af
      exit
      entry 33   create
            match dscp cp33
            action fc af
      exit
      entry 34   create
            match dscp af41
            action fc af
      exit
      entry 35   create
            match dscp cp35
            action fc af
      exit
      entry 36   create
            match dscp af42
            action fc af
      exit
      entry 37   create
            match dscp cp37
            action  fc af
      exit
      entry 38   create
            match dscp af43
            action fc af
      exit
      entry 39   create
            match dscp cp39 
            action fc af
      exit 
      entry 40   create
            match dscp cs5
            action fc af
      exit
      entry 41   create
            match dscp cp41
            action  fc af
      exit
      entry 42   create
            match dscp cp42 
            action fc af
      exit
      entry 43    create
            match dscp cp43
            action  fc af
      exit
      entry 44   create
            match dscp cp44 
            action fc af
      exit
      entry 45    create
            match dscp cp45
            action fc af
      exit
      entry 46   create
            match dscp ef 
            action  fc af
      exit
      entry 47   create
            match dscp cp47 
            action  fc af
      exit
      entry 48  create
            match dscp nc1
            action fc af
      exit
      entry 49 create
            match dscp cp49 
            action fc af
      exit
      entry 50 create
            match dscp cp50 
            action fc af
      exit
exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, the following represents the number of classification entries per FC.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 0 + 0 + 0 + 0 = 0
FCl1 = 0 + 0 + 0 + 0 = 0
FCaf = 1 + 0 + 1 + 0 = 3

Because FCaf uses unicast meter, an entry is needed to identify these traffic types explicitly. Another entry is needed to classify broadcast, multicast, and unknown-unicast traffic types to the same FC and use the default meter 11.

FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 1 + 1 + 0 = 3

Becasue FCbe uses unicast, broadcast, and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as the multicast traffic type and uses the same meter.

Using the equation, calculate the total classification entries used by this policy, as follows.

TC = (0 * 0)nc + (0 * 0)h1 + (0 * 0)ef + (0 * 0)h2 + (0 * 0)l1 + (50 * 3)af + (0 * 0)l2 + (1 * 3)be = 153

The number of meters used in this policy = 4.

In this example num-qos-classifiers 256 is used (maximum of (153, (2 * 4)) = 153, rounded to the next multiple of 2, which is 154).

If the same policy were used for a SAP in an Epipe service, because all traffic is classified to a unicast traffic type and only unicast meters are used, the following is true.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 0 + 0 + 0 + 0 = 0
FCl1 = 0 + 0 + 0 + 0 = 0
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the equation, calculate the total classification entries used by this policy, as follows.

TC = (0 * 0)nc + (0 * 0)h1 + (0 * 0)ef + (0 * 0)h2 + (0 * 0)l1 + (50 * 1)af + (0 * 0)l2 + (1 * 1)be = 51

The number of meters used in this policy = 2.

For Epipe SAPs, Nokia recommends defining another SAP-ingress policy with num-qos-classifiers 64 (that is, maximum of (51, (2 * 2)) = 51, rounded to the next multiple of 2, which is 52).

9.7.1.14. Example 9a (Default Multipoint Meter 11 is Not Used)

sap-ingress 10 create
     num-qos-classifiers  154
     meter 1 create
     exit
     meter 3 create
     exit
     meter 4 create
     exit
     meter 11 create
     exit
 
     fc be  create
          meter 1
          broadcast-meter 11
          multicast-meter 4
     exit
     fc af  create
          meter 3
          broadcast-meter 11
          multicast-meter 4
     exit
     default-fc be
 
     ip-criteria  dscp-only
     entry 1  create
          match dscp cp1
          action fc af
     exit
     entry 2  create 
          match dscp cp2
          action fc af
     exit
     entry 3 create
          match dscp cp3
          action fc af
     exit
     entry 4  create
          match dscp cp4
          action fc af
     exit
     entry 5  create
          match dscp cp5
          action fc af
     exit
     entry 6  create
          match dscp cp6
          action fc af
     exit
     entry 7   create
          match dscp cp7
          action fc af
     exit
     entry 8   create
          match dscp cs1 
          action fc af
     exit
     entry 9   create
          match dscp cp9
          action fc af
     exit
     entry 10   create
          match dscp af11
          action fc af
     exit
     entry 11   create
          match dscp cp11 
          action fc af
     exit
     entry 12   create
          match dscp af12
          action fc af
     exit
     entry 13   create
          match dscp cp13
          action fc af
     exit
     entry 14   create
          match dscp af13
          action fc af
     exit
     entry 15   create
          match dscp cp15
          action  fc af
     exit
     entry 16   create
          match dscp  cs2
          action fc af
     exit
     entry 17   create
          match dscp cp17
          action fc af
     exit
     entry 18   create
          match dscp af21
          action  fc af
     exit
     entry 19   create
          match dscp cp19 
          action fc af
     exit
     entry 20  create
          match dscp af22 
          action fc af
     exit
     entry 21   create
          match dscp cp21 
          action fc af
     exit
     entry 22   create
          match dscp af23 
          action  fc af
     exit
     entry 23   create
          match dscp cp23
          action fc af
     exit
     entry 24   create
          match dscp cs3
          action  fc af
     exit
     entry 25   create
          match dscp cp25
          action fc af
     exit
     entry 26   create
          match dscp af31
          action  fc af
     exit
     entry 27   create
          match dscp cp27 
          action fc af
     exit
     entry 28   create
          match dscp af32
          action fc af
     exit
     entry 29   create
          match dscp cp29
          action fc af
     exit
     entry 30   create
          match dscp af33
          action fc af
     exit
     entry 31   create
          match dscp cp31 
          action fc af
     exit
     entry 32   create
          match dscp cs4
          action fc af
     exit
     entry 33   create
          match dscp cp33
          action fc af
     exit
     entry 34   create
          match dscp af41
          action fc af
     exit
     entry 35   create
          match dscp cp35
          action fc af
     exit
     entry 36   create
          match dscp af42
          action fc af
     exit
     entry 37   create
          match dscp cp37
          action  fc af
     exit
     entry 38   create
          match dscp af43
          action fc af
     exit
     entry 39   create
          match dscp cp39 
          action fc af
     exit 
     entry 40   create
          match dscp cs5
          action fc af
     exit
     entry 41   create
          match dscp cp41
          action  fc af
     exit
     entry 42   create
          match dscp cp42 
          action fc af
     exit
     entry 43    create
          match dscp cp43
          action  fc af
     exit
     entry 44   create
          match dscp cp44 
          action fc af
     exit
     entry 45    create
          match dscp cp45
          action fc af
     exit
     entry 46   create
          match dscp ef 
          action  fc af
     exit
     entry 47   create
          match dscp cp47 
          action  fc af
     exit
     entry 48  create
          match dscp nc1
          action fc af
     exit
     entry 49 create
          match dscp cp49 
          action fc af
     exit
     entry 50 create
          match dscp cp50 
          action fc af
     exit
     exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, the following shows the number of classification entries per FC.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 0 + 0 + 0 + 0 = 0
FCl1 = 0 + 0 + 0 + 0 = 0
FCaf = 1 + 0 + 1 + 0 = 3

Because FCaf uses unicast, broadcast, and multicast meter, three entries are required to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as the multicast traffic type and uses the same meter. Additionally, note that meter 11 is not defined to be a multipoint meter but is used as a normal unicast meter.

FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 1 + 1 + 0 = 3

Because FCbe uses unicast, broadcast, and multicast meter, three entries are needed to identify these traffic types explicitly. The unknown-unicast traffic type is classified using the same entry as the multicast traffic type and uses the same meter. Additionally, note that meter 11 is not defined to be a multipoint meter but is used as a normal unicast meter.

Using the equation, calculate the total classification entries used by this policy, as follows.

TC = (0 * 0)nc + (0 * 0)h1 + (0 * 0)ef + (0 * 0)h2 + (0 * 0)l1 + (50 * 3)af + (0 * 0)l2 + (1 * 3)be = 153

The number of meters used in this policy = 4. In this example, num-qos-classifiers 154 is used (maximum of (153, (2 * 4)) = 153, rounded to the next multiple of 2, which is 154).

If the same policy were used for a SAP in an Epipe service, because all traffic is classified to a unicast traffic type and only unicast meters are used, the following is true.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 0 + 0 + 0 + 0 = 0
FCl1 = 0 + 0 + 0 + 0 = 0
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the equation, calculate the total classification entries used by this policy, as follows.

TC = (0 * 0)nc + (0 * 0)h1 + (0 * 0)ef + (0 * 0)h2 + (0 * 0)l1 + (50 * 1)af + (0 * 0)l2 + (1 * 1)be = 51

The number of meters used in this policy = 2.

For Epipe SAP it is recommended to define another SAP-ingress policy where num-qos-classifiers 52 is used (that is, maximum of (51, (2 * 2)) = 51, rounded to the multiple of 2, which is 52).

9.7.1.15. Example 10

sap-ingress 10 create
     description   “example-policy-1”
     num-qos-classifiers   4
     meter     1 create
          rate cir 0 pir max
     exit
     meter 11 multipoint create
          rate cir 0 pir max
     exit
     scope template
     default-fc l2
     fc   l2 create
          meter 1
     exit
     fc     af create
          meter 1
     exit
     mac-criteria any
          entry    1 create
               match dot1p   7
               action fc af
          exit
     exit
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, compute the number of classification entries per FC, as follows.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 0 + 0 + 0 + 0 = 0
FCl1 = 0 + 0 + 0 + 0 = 0
FCaf = 1 + 0 + 1 + 0 = 2
FCl2 = 1 + 0 + 1 + 0 = 2
FCbe = 0 + 0 + 0 + 0 = 2

Using the equation, calculate the total classification entries used by this policy, as follows.

TC = (0 * 0)nc + (0 * 0)h1 + (0 * 0)ef + (0 * 0)h2 + (0 * 0)l1 + (1 * 2)af + (1 * 2)l2 + (0 * 0)be = 4

The number of meters used = 2 (because both FCs use meter 1 and meter 11).

In this example, num-qos-classifiers 4 is used (that is, maximum of (4, (2 * 2))).

If the same policy were used for a SAP in an Epipe service, because all traffic is classified to a unicast traffic type and only unicast meters are used, the following is true.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 0 + 0 + 0 + 0 = 0
FCl1 = 0 + 0 + 0 + 0 = 0
FCaf = 1 + 0 + 0 + 0 = 1
FCl2 = 1 + 0 + 0 + 0 = 1
FCbe = 0 + 0 + 0 + 0 = 0

Using the preceding equation, calculate the total classification entries used = 2 and meters used = 1.

As this example shows, for Epipe SAPs with the same amount of resources allocated, more FCs can be used, if required.

9.7.1.16. Example 11

sap-ingress 10 create
     description   “example-policy-1”
     num-qos-classifiers   4
     meter     1 create
          rate cir 0 pir max
     exit
     meter 11 multipoint create
          rate cir 0 pir max
     exit
     scope template
     default-fc be
exit

In the preceding example, assuming the policy is attached to a SAP in a VPLS service, compute the number of classification entries per FC, as follows.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 0 + 0 + 0 + 0 = 0
FCl1 = 0 + 0 + 0 + 0 = 0
FCaf = 0 + 0 + 0 + 0 = 0
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 1 + 0 = 2

Using the equation, calculate the total classification entries used by this policy, as follows.

TC = (0 * 0)nc + (0 * 0)h1 + (0 * 0)ef + (0 * 0)h2 + (0 * 0)l1 + (0 * 0)af + (1 * 2)l2 + (0 * 0)be = 2

The number of meters used = 2 (because default FC uses meter 1 and meter 11).

In this example, num-qos-classifiers 4 is used (that is, maximum of (2, (2 * 2))).

If the same policy were used for a SAP in an Epipe service, because all traffic is classified to a unicast traffic type and only unicast meters are used, the following is true.

FCnc = 0 + 0 + 0 + 0 = 0
FCh1 = 0 + 0 + 0 + 0 = 0
FCef = 0 + 0 + 0 + 0 = 0
FCh2 = 0 + 0 + 0 + 0 = 0
FCl1 = 0 + 0 + 0 + 0 = 0
FCaf = 0 + 0 + 0 + 0 = 0
FCl2 = 0 + 0 + 0 + 0 = 0
FCbe = 1 + 0 + 0 + 0 = 1

Using the preceding equation, total classification entries used = 1 and meters used = 1.

As this example shows, for Epipe SAPs with the same amount of resources allocated, more FCs can be used, if required.

9.7.2. Examples: Calculating Resources Required for IP DSCP Table-based Classification

This section provides examples for calculating the amount of resources needed for a service ingress policy when using IP DSCP table-based classification. See Examples: Calculating Resources Required for CAM-based Classification for calculations when CAM-based classification is used.

The examples in this section use the following equations to calculate the value for num-qos-classifiers used in the SAP-ingress QoS policy. See Computation of Resources Used per SAP-ingress Policy for CAM-based Classification for details about these equations.

  1. total number of classification entries (TC)
       TC = S E(i) * C(i)
       i = nc, h1, ef, h2, l1, af, l2, be, default-fc
    where:
    1. E(i) is equal to 1 if FC(i) is in use by the dscp-classification policy. Otherwise, E(i) is equal to 0.
    2. C(i) is the number of classification entries that are required by FCi to identify different traffic types. For a specific FC, for each traffic type (unicast, broadcast, multicast, and unknown-unicast) configured to use a meter, a classification entry is needed.
      Note:

      The default-fc command uses additional resources, even if all the eight FCs are configured.

  2. total number of QoS resources required (TQ)
       TQ = max [(TC), (2 * TP))
    where:
    1. TP is the number of meters/policers used

In addition, the examples show how to determine the number of classification entries for each forwarding class. For example, FCh2 (shown below) is the sum of four traffic types: (unicast (U), broadcast (B), multicast (M), and unknown-unicast (U-u)). See Calculating the Number of Classification Entries per FC for more information.

   FCh2 = 1 + 0 + 1 + 0 = 2          (generalized to FCh2 = U + B + M + U-u)

If BUM entries are not explicit and multipoint traffic is expected, meter 11 is used and the "M" traffic type is given a "1".

Consider the following items when calculating the resources required when using IP DSCP table-based classification.

  1. See Service Ingress Meter Selection Rules for rules about the meters used per FC for different traffic types; see Determining the Number of Classification Entries for the rules and the number of classification entries per FC. In addition:
    1. If an FC uses one meter for all four traffic types, the maximum of four classification entries are needed.
    2. As a minimum, an FC uses a single meter.
    3. Users have an option to use between one and four meters per FC, one meter each for four different traffic types, in a VPLS service.
    4. Users have an option to use either one and two meters per FC, one meter each for two traffic types, in IES and VPRN service when using multicast.
    5. Users can use only a single meter per FC for unicast traffic in Epipe, IES, and VPRN service, where IES and VPRN are not configured to use multicast.
  2. For an Epipe, VPLS, IES, or VPRN SAP, the FCs in use can be determined by counting the FCs configured in the DSCP classification policy and the default FC configured in the SAP-ingress policy.
  3. For routed VPLS (RVPLS), to determine the FCs in use, the following apply.
    1. For SAPs on access ports, the “FCs in use” is the sum total of all FCs configured across the following items:
      1. DSCP classification policy associated as an override policy under the IP interface context
      2. port DSCP classification policy associated with the access port
      3. untagged-fc value configured under the access port
      4. default-fc value configured in the SAP-ingress policy
    2. For SAPs on hybrid ports, the “FCs in use” is the sum total of all FCs configured across the following items:
      1. DSCP classification policy associated as an override policy under the IP interface context
      2. network port policy associated with the hybrid port
      3. default-fc value configured under the SAP-ingress policy

9.7.2.1. Example 1: Epipe, IES, and VPRN Services Using Unicast Traffic Type

 
*A:dut-a>config>qos>dscp-classification# info detail 
----------------------------------------------
            description "dscp-classification-23"
            default-dscp-fc "be" profile in
            dscp cs3 fc "be"
            dscp cs4 fc "ef" profile out
            dscp af31 fc "af" profile in
            dscp af33 fc "l1" profile in
            dscp af41 fc "nc"
            dscp cp25 fc "l2"
            dscp cp31 fc "h2" profile out
            dscp cp33 fc "h1" profile in
----------------------------------------------
*A:dut-a# configure qos sap-ingress 23 
*A:dut-a>config>qos>sap-ingress# info 
----------------------------------------------
            description "sap-Ingress-Policy-23"
            num-qos-classifiers 16
            meter 1 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 9 create
                mode trtcm2 
                rate cir 3000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 10 create
                mode trtcm2 
                rate cir 4000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 11 multipoint create
                mode trtcm2 
                rate cir 2000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 12 create
                mode trtcm2 
                rate cir 3500 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 13 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 14 create           
                mode trtcm2 
                rate cir 5000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 15 create
                mode trtcm2 
                rate cir 4000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            fc "af" create
                meter 11
            exit
            fc "be" create
                meter 9
            exit
            fc "ef" create
                meter 14
            exit
            fc "h1" create
                meter 15
            exit
            fc "h2" create
                meter 13
            exit
            fc "l1" create
                meter 12
            exit
            fc "l2" create
                meter 10
            exit
            fc "nc" create
                meter 1
            exit
            dscp-classification 23
----------------------------------------------
*A:dut-a# configure service epipe 7 
*A:dut-a>config>service>epipe# info 
----------------------------------------------
            description "Default epipe for service id 7"
            sap 1/1/3:201 create
                description "Default sap for service id 7"
                ingress
                    qos 23  enable-table-classification
                exit
                egress
                exit
            exit
            no shutdown
----------------------------------------------

In the preceding example, all eight FCs are configured and eight meters are configured. For an Epipe service, only the unicast traffic-type is identified. This requires one classification entry per FC configured and an additional one for the default-fc assignment, for a total of 9 classification entries.

FC (nc) = 1+ 0+ 0 + 0 = 1 
FC (h1) = 1+ 0+ 0 + 0 = 1 
FC (ef) = 1+ 0+ 0 + 0 = 1 
FC (h2) = 1+ 0+ 0 + 0 = 1 
FC (l1) = 1+ 0+ 0 + 0 = 1 
FC (af) = 1+ 0+ 0 + 0 = 1 
FC (l2) = 1+ 0+ 0 + 0 = 1 
FC (be) = 1+ 0+ 0 + 0 = 1 
FC (default-fc) = 1+ 0+ 0 + 0 = 1 

TC = 1*1 (FC-nc) + 1*1 (FC-h1) + 1*1 (FC-ef) + 1*1 (FC-h2) + 1*1 (FC-l1) + 1*1 (FC-af) + 1*1 (FC-l2) + 1*1 (FC-be) + 1*1 (default-fc) = 9

TP = total meters used is 8

In this example, num-qos-classifiers is set to (maximum (9, (8*2)) = 16.

If the same policy is attached to an IES or VPRN SAP without multicast enabled (VPRN example shown below, IES is similar), the num-qos-classifiers required are the same as that for an Epipe service (that is, 16). The calculations are the same as for an Epipe service.

----------------------------------------------
vprn 7 customer 1 create
            description "Default VPRN ID 7"
            route-distinguisher 3:7
            interface "int1VPRN201" create
                address 43.43.44.1/24
                sap 1/1/3:201 create
                    description "sap-7-43.43.44.1"
                    ingress
                        qos 23 enable-table-classification
                    exit
                    egress
                    exit
                exit
            exit
            service-name "XYZ Vprn 7"
            no shutdown
        exit
----------------------------------------------

9.7.2.2. Example 2: VPLS Using Unicast and BUM Meter with IES or VPRN Using Multicast

 
*A:dut-a>config>qos>dscp-classification# info detail 
----------------------------------------------
            description "dscp-classification-23"
            default-dscp-fc "be" profile in
            dscp cs3 fc "be"
            dscp cs4 fc "ef" profile out
            dscp af31 fc "af" profile in
            dscp af33 fc "l1" profile in
            dscp af41 fc "nc"
            dscp cp25 fc "l2"
            dscp cp31 fc "h2" profile out
            dscp cp33 fc "h1" profile in
----------------------------------------------
*A:dut-a# configure qos sap-ingress 23 
*A:dut-a>config>qos>sap-ingress# info 
----------------------------------------------
            description "sap-Ingress-Policy-23"
            num-qos-classifiers 18
            meter 1 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 9 create
                mode trtcm2 
                rate cir 3000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 10 create
                mode trtcm2 
                rate cir 4000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 11 multipoint create
                mode trtcm2 
                rate cir 2000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 12 create
                mode trtcm2 
                rate cir 3500 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 13 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 14 create           
                mode trtcm2 
                rate cir 5000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 15 create
                mode trtcm2 
                rate cir 4000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            fc "af" create
                meter 11
            exit
            fc "be" create
                meter 9
            exit
            fc "ef" create
                meter 14
            exit
            fc "h1" create
                meter 15
            exit
            fc "h2" create
                meter 13
            exit
            fc "l1" create
                meter 12
            exit
            fc "l2" create
                meter 10
            exit
            fc "nc" create
                meter 1
            exit
            dscp-classification 23
----------------------------------------------
----------------------------------------------
vpls 7 customer 1 svc-sap-type any create
            description "Default tls for service id 7"
            
            sap 1/1/3:201 create
                description "Default sap for service id 7"
                ingress
                    qos 23  enable-table-classification
                exit
                egress
                exit
            exit
            no shutdown
        exit
----------------------------------------------

In the preceding example, all eight FCs are configured and eight meters are configured. In addition, multipoint meter 11 is configured for use. For the VPLS service, four traffic types are identified (unicast and BUM). Because multicast meter 11 is defined, the BUM traffic type for all FCs use meter 11. The number of classification entries required is as follows.

FC (nc) = 1 + 0 + 1 + 0 = 2
FC (h1) = 1 + 0 + 1 + 0 = 2
FC (ef) = 1 + 0 + 1 + 0 = 2
FC (h2) = 1 + 0 + 1 + 0 = 2
FC (l1) = 1 + 0 + 1 + 0 = 2
FC (af) = 1 + 0 + 1 + 0 = 2
FC (l2) = 1 + 0 + 1 + 0 = 2
FC (be) = 1 + 0 + 1 + 0 = 2
FC (default-fc) = 1 + 0 + 1 + 0 = 2

TC = 1*2 (FC-nc) + 1*2 (FC-h1) + 1*2 (FC-ef) + 1*2 (FC-h2) + 1*2 (FC-l1) + 1*2 (FC-af) + 1*2 (FC-l2) + 1*2 (FC-be) + 1*2 (default-fc) = 18

TP = total meters used is 8

In this example, num-qos-classifiers is set to (maximum (18, (8*2)) = 18.

If the same policy is attached to an IES or VPRN service with multicast enabled, the number of resources required is 18 (that is, num-qos-classifiers needs to be set to 18). The calculations are the same as those for a VPLS service (shown above).

9.7.2.3. Example 3: VPLS Service Using Unicast, Broadcast, Multicast, and Unknown-unicast with Additional FCs

In this example, the SAP-ingress policy in Example 2: VPLS Using Unicast and BUM Meter with IES or VPRN Using Multicast is changed to define additional meters and applied to a SAP configured in a VPLS service.

*A:dut-a# configure qos sap-ingress 24 
*A:dut-a>config>qos>sap-ingress# info 
----------------------------------------------
            description "sap-Ingress-Policy-24"
            num-qos-classifiers 18
            meter 1 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 9 create
                mode trtcm2 
                rate cir 3000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 10 create
                mode trtcm2 
                rate cir 4000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 11 multipoint create
                mode trtcm2 
                rate cir 2000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 12 create
                mode trtcm2 
                rate cir 3500 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 13 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 14 create           
                mode trtcm2 
                rate cir 5000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 15 create
                mode trtcm2 
                rate cir 4000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 20 multipoint create 
                mode trtcm2 
                rate cir 0 pir 5
                mbs 50 kbits
                cbs 50 kbits
            exit
            meter 21 multipoint create
                mode trtcm2 
                rate cir 0 pir 10
                mbs 100 kbits
                cbs 100 kbits
            exit
            meter 22 multipoint create
                mode trtcm2 
                rate cir 0 pir 50
                mbs 100 kbits
                cbs 100 kbits
            exit
            fc "af" create
                meter 11
            broadcast-meter 22
            exit
            fc "be" create
                meter 9
            exit
            fc "ef" create
                meter 14
            broadcast-meter 22
            exit
            fc "h1" create
                meter 15
            broadcast-meter 22
            exit
            fc "h2" create
                meter 13
            broadcast-meter 22
            exit
            fc "l1" create
                meter 12
            broadcast-meter 22
                unknown-unicast 21
            exit
            fc "l2" create
                meter 10
            broadcast-meter 20
            exit
            fc "nc" create
                meter 1
            exit
            dscp-classification 23
----------------------------------------------

For the VPLS service, four traffic types are identified (unicast and BUM). Because multicast meter 11 is defined, BUM traffic types for all FCs use meter 11 (because the user has not configured an explicit multicast-meter for the FC). The number of classification entries required is determined as shown in the following.

FC (nc) = 1 + 0 + 1 + 0 = 2 
  (one for unicast and one for all of BUM) 
FC (h1) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast & unknown-unicast)
FC (ef) = 1 + 1 + 1 + 0 = 3   (one for unicast, one for broadcast, and one for both 
multicast & unknown-unicast)
FC (h2) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast & unknown-unicast)
FC (l1) = 1 + 1 + 1 + 1 = 4 
  (one for unicast, one for broadcast, one for unknown-unicast & one for multicast)
FC (af) = 1 + 1 + 1 + 0 = 3 
  (one for unicast, one for broadcast, and one for both multicast and unknown-
unicast)
FC (l2) = 1 + 1 + 1 + 0 = 3 
  (one for unicast, one for broadcast, and one for both multicast and unknown-
unicast)
FC (be) = 1 + 0 + 1 + 0 = 2 
  (one for unicast and one for all of BUM) 
FC (default-fc) = 1 + 0 + 1 + 0 = 2
  (one for unicast and one for all of BUM, since default-dscp-fc is configured to 
be FC 'be' in the dscp-classification policy) 

TC = 1*2 (FC-nc) + 1*3 (FC-h1) + 1*3 (FC-ef) + 1*3 (FC-h2) + 1*4 (FC-l1) + 1*3 (FC-af) + 1*3 (FC-l2) + 1*2 (FC-be) + 1*2 (default-fc) = 25

TP = total meters used is 11

In this example, num-qos-classifiers is calculated as (maximum (25, (11*2)) = 25, but is set to 26 after rounding to the next highest even number.

If the same policy is attached to an IES or an VPRN service with multicast enabled, the number of resources required is 18 (that is, num-qos-classifiers needs to be set to 18). This is because for IES and VPRN only unicast and multicast traffic types are supported; broadcast and unknown-unicast traffic types are not supported and do not consume any resources. The calculation is as follows.

FC (nc) = 1 + 0 + 1 + 0 = 2 
  (one for unicast and one for all of BUM) 
FC (h1) = 1 + 0 + 1 + 0 = 2 
  (one for unicast and one for all of BUM) 
FC (ef) = 1 + 0 + 1 + 0 = 2 
  (one for unicast and one for all of BUM) 
FC (h2) = 1 + 0 + 1 + 0 = 2 
  (one for unicast and one for all of BUM) 
FC (l1) = 1 + 0 + 1 + 0 = 2 
  (one for unicast and one for all of BUM) 
FC (af) = 1 + 0 + 1 + 0 = 2 
  (one for unicast and one for all of BUM) 
FC (l2) = 1 + 0 + 1 + 0 = 2 
  (one for unicast and one for all of BUM) 
FC (be) = 1 + 0 + 1 + 0 = 2 
(one for unicast and one for all of BUM) 
FC (default-fc) = 1 + 0 + 1 + 0 = 2 
  (one for unicast and one for all of BUM, since default-dscp-fc is configured to be
 FC 'be' in the dscp-classification policy) 

TC = 1*2 (FC-nc) + 1*2 (FC-h1) + 1*2 (FC-ef) + 1*2 (FC-h2) + 1*2 (FC-l1) + 1*2 (FC-af) + 1*2 (FC-l2) + 1*2 (FC-be) + 1*2 (default-fc) = 18

TP = total meters used is 8 (meter 20, meter 21, and meter 22 are not used because they are associated with broadcast and unknown-unicast traffic types, which are not supported for IES and VPRN)

Hence, in this example num-qos-classifiers is set to (maximum (18, (8*2)) = 18.

9.7.2.4. Example 4: Routed VPLS on Access Port Using Unicast, Broadcast, Multicast, and Unknown-unicast with Additional FCs

 
*A:dut-a>config>qos>dscp-classification# info detail 
----------------------------------------------
            description "dscp-classification-23"
            default-dscp-fc "be" profile in
            dscp cs3 fc "be"
            dscp cs4 fc "ef" profile out
            dscp af31 fc "af" profile in
            dscp af33 fc "l1" profile in
            dscp af41 fc "nc"
            dscp cp25 fc "l2"
            dscp cp31 fc "h2" profile out
            dscp cp33 fc "h1" profile in
----------------------------------------------
*A:dut-a# configure qos sap-ingress 24 
*A:dut-a>config>qos>sap-ingress# info 
----------------------------------------------
            description "sap-Ingress-Policy-24"
            num-qos-classifiers 26
            meter 1 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 9 create
                mode trtcm2 
                rate cir 3000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 10 create
                mode trtcm2 
                rate cir 4000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 11 multipoint create
                mode trtcm2 
                rate cir 2000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 12 create
                mode trtcm2 
                rate cir 3500 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 13 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 14 create           
                mode trtcm2 
                rate cir 5000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 15 create
                mode trtcm2 
                rate cir 4000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 20 multipoint create 
                mode trtcm2 
                rate cir 0 pir 5
                mbs 50 kbits
                cbs 50 kbits
            exit
            meter 21 multipoint create
                mode trtcm2 
                rate cir 0 pir 10
                mbs 100 kbits
                cbs 100 kbits
            exit
            meter 22 multipoint create
                mode trtcm2 
                rate cir 0 pir 50
                mbs 100 kbits
                cbs 100 kbits
            exit
            fc "af" create
                meter 11
            broadcast-meter 22
            exit
            fc "be" create
                meter 9
            exit
            fc "ef" create
                meter 14
            broadcast-meter 22
            exit
            fc "h1" create
                meter 15
            broadcast-meter 22
            exit
            fc "h2" create
                meter 13
            broadcast-meter 22
            exit
            fc "l1" create
                meter 12
            broadcast-meter 22
                unknown-unicast 21
            exit
            fc "l2" create
                meter 10
            broadcast-meter 20
            exit
            fc "nc" create
                meter 1
            exit
            dscp-classification 23
----------------------------------------------

IES service and routed VPLS service configuration is as follows.

----------------------------------------------
ies 7 customer 1 vpn 7 create
            description "Default Ies service id 7"
            interface "int1IES201" create
                address 43.43.44.1/24
                vpls "rvpls607"
                    ingress
                        enable-table-classification
                        routed-override-qos-policy 23
                    exit
                exit
            exit
            service-name "XYZ Ies 7"
            no shutdown
----------------------------------------------
----------------------------------------------
vpls 607 customer 1 r-vpls svc-sap-type any create
            description "Default tls service id 607"
            allow-ip-int-bind
            exit
            stp
                shutdown              
            exit
            service-name "rvpls607"
            sap 1/1/3:201 create
                description "Default sap service id 607"
                ingress
                    qos 23  enable-table-classification
                exit
                egress
                exit
            exit
            no shutdown
----------------------------------------------

The configuration for the DSCP-classification policy associated with the access port where the RVPLS SAP is configured, and that is used for classifying bridged packets, is shown as follows:

*A:dut-a# configure port 1/1/3 
*A:dut-a>config>port# info 
----------------------------------------------
        ethernet
            mode access 
            enable-table-classification
            access
                ingress
                    dscp-classification 23
                    untagged-fc ef
                exit
            exit
            encap-type dot1q
            mtu 9212
        exit
        no shutdown
----------------------------------------------

For the bridged traffic in a VPLS service, four traffic types are identified (unicast and BUM). Because multicast meter 11 is defined, BUM traffic type for all FCs use meter 11 (note that an explicit multicast-meter for the FC has not been configured). The number of classification entries required is as follows.

FC (nc) = 1 + 0 + 1 + 0 = 2
  (one for unicast and one for all of BUM)
FC (h1) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast & unknown-unicast)
FC (ef) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast & unknown-unicast)
FC (h2) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast & unknown-unicast)
FC (l1) = 1 + 1 + 1 + 1 = 4
  (one for unicast, one for broadcast, one for unknown-unicast & one for multicast) 
FC (af) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast and unknown-
unicast)
FC (l2) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast and unknown-
unicast)
FC (be) = 1 + 0 + 1 + 0 = 2
  (one for unicast and one for all of BUM) 
FC (default-fc) = 1 + 0 + 1 + 0 = 2
  (one for unicast and one for all of BUM, since default-dscp-fc is configured to be
 FC 'be' in the dscp-classification policy) 

TC = 1*2 (FC-nc) + 1*3 (FC-h1) + 1*3 (FC-ef) + 1*3 (FC-h2) + 1*4 (FC-l1) + 1*3 (FC-af) + 1*3 (FC-l2) + 1*2 (FC-be) + 1*2 (default-fc) = 25

TP = total meters used is 11

In this example num-qos-classifiers is set to (maximum (25, (11*2)) = 25), which means 26 after rounding to the next highest even number.

Note:

For routed traffic in the routed VPLS service, only the unicast traffic type is currently supported. This does not change the amount of resources needed because bridged traffic requires higher amount of resources. To reduce the amount of resources, users can dedicate a single meter for BUM traffic from all FCs, as shown in the following example (note that meter 11 is used for all FCs automatically when meter 11 is defined in the policy).

*A:dut-a# configure qos sap-ingress 34 
*A:dut-a>config>qos>sap-ingress# info 
----------------------------------------------
            description "sap-Ingress-Policy-34"
            num-qos-classifiers 18
            meter 1 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 9 create
                mode trtcm2 
                rate cir 3000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 10 create
                mode trtcm2 
                rate cir 4000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 11 multipoint create
                mode trtcm2 
                rate cir 2000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 12 create
                mode trtcm2 
                rate cir 3500 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 13 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 14 create 
                mode trtcm2 
                rate cir 5000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 15 create
                mode trtcm2 
                rate cir 4000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 20 multipoint create 
                mode trtcm2 
                rate cir 400000 pir 1000000
                mbs 5000 kbits
                cbs 500 kbits
            exit
            fc "af" create
                meter 9
            exit
            fc "be" create
                meter 20
            exit
            fc "ef" create
                meter 14
            exit
            fc "h1" create
                meter 15
            exit
            fc "h2" create
                meter 13
            exit
            fc "l1" create
                meter 12
            exit
            fc "l2" create
                meter 10
            exit
            fc "nc" create
                meter 1
            exit
            dscp-classification 23
----------------------------------------------

In the preceding example all, eight FCs are configured and nine meters are configured, with multipoint meter 11 dedicated to all BUM traffic for all FCs in use. For the VPLS service, four traffic-types are identified (unicast and BUM). Because multicast meter 11 is defined, BUM traffic type for all FCs use meter 11. The number of classification entries required is as follows.

FC (nc) = 1 + 0 + 1 + 0 = 2
FC (h1) = 1 + 0 + 1 + 0 = 2
FC (ef) = 1 + 0 + 1 + 0 = 2
FC (h2) = 1 + 0 + 1 + 0 = 2
FC (l1) = 1 + 0 + 1 + 0 = 2
FC (af) = 1 + 0 + 1 + 0 = 2
FC (l2) = 1 + 0 + 1 + 0 = 2
FC (be) = 1 + 0 + 1 + 0 = 2
FC (default-fc) = 1 + 0 + 1 + 0 = 2

TC = 1*2 (FC-nc) + 1*2 (FC-h1) + 1*2 (FC-ef) + 1*2 (FC-h2) + 1*2 (FC-l1) + 1*2 (FC-af) + 1*2 (FC-l2) + 1*2 (FC-be) + 1*2 (default-fc) = 18

TP = total meters used is 9

In this example num-qos-classifiers is set to (maximum (18, (9*2)) = 18.

9.7.2.5. Example 5: Routed VPLS Service on a Hybrid Port Using Unicast, Broadcast, Multicast and Unknown-unicast for Some FCs

 
*A:dut-a>config>qos>dscp-classification# info detail 
----------------------------------------------
            description "dscp-classification-23"
            default-dscp-fc "be" profile in
            dscp cs3 fc "be"
            dscp cs4 fc "ef" profile out
            dscp af31 fc "af" profile in
            dscp af33 fc "l1" profile in
            dscp af41 fc "nc"
            dscp cp25 fc "l2"
            dscp cp31 fc "h2" profile out
            dscp cp33 fc "h1" profile in
----------------------------------------------
*A:dut-a# configure qos sap-ingress 24 
*A:dut-a>config>qos>sap-ingress# info 
----------------------------------------------
            description "sap-Ingress-Policy-24"
            num-qos-classifiers 26
            meter 1 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 9 create
                mode trtcm2 
                rate cir 3000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 10 create
                mode trtcm2 
                rate cir 4000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 11 multipoint create
                mode trtcm2 
                rate cir 2000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 12 create
                mode trtcm2 
                rate cir 3500 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 13 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 14 create           
                mode trtcm2 
                rate cir 5000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 15 create
                mode trtcm2 
                rate cir 4000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 20 multipoint create 
                mode trtcm2 
                rate cir 0 pir 5
                mbs 50 kbits
                cbs 50 kbits
            exit
            meter 21 multipoint create
                mode trtcm2 
                rate cir 0 pir 10
                mbs 100 kbits
                cbs 100 kbits
            exit
            meter 22 multipoint create
                mode trtcm2 
                rate cir 0 pir 50
                mbs 100 kbits
                cbs 100 kbits
            exit
            fc "af" create
                meter 11
                broadcast-meter 22
            exit
            fc "be" create
                meter 9
            exit
            fc "ef" create
                meter 14
                broadcast-meter 22
            exit
            fc "h1" create
                meter 15
                broadcast-meter 22
            exit
            fc "h2" create
                meter 13
                broadcast-meter 22
            exit
            fc "l1" create
                meter 12
                broadcast-meter 22
                unknown-unicast 21
            exit
            fc "l2" create
                meter 10
                broadcast-meter 20
            exit
            fc "nc" create
                meter 1
            exit
            dscp-classification 23
----------------------------------------------

The IES service and routed VPLS service configuration is as follows.

----------------------------------------------
ies 7 customer 1 vpn 7 create
            description "Default Ies service id 7"
            interface "int1IES201" create
                address 43.43.44.1/24
                vpls "rvpls607"
                    ingress
                        enable-table-classification
                        routed-override-qos-policy 23
                    exit
                exit
            exit
            service-name "XYZ Ies 7"
            no shutdown
----------------------------------------------
----------------------------------------------
vpls 607 customer 1 r-vpls svc-sap-type any create
            description "Default tls service id 607"
            allow-ip-int-bind
            exit
            stp
                shutdown              
            exit
            service-name "rvpls607"
            sap 1/1/3:201 create
                description "Default sap service id 607"
                ingress
                    qos 24 enable-table-classification
                exit
                egress
                exit
            exit
            no shutdown
----------------------------------------------

The configuration for the network port policy for a hybrid port, followed by associating the policy with hybrid port 1/1/3, is shown in the following. This configuration is used for classifying RVPLS SAP bridged packets, and also for classifying IP traffic received and processed in the context of the network port IP interface.

**A:dut-a >config>qos# network 23 
**A:dut-a >config>qos>network# info 
----------------------------------------------
            ingress
                default-action fc be profile in
                meter 1 create
                exit
                dscp cs4 fc ef profile out
                dscp af31 fc af profile in
                dscp af33 fc l1 profile in
                dscp af41 fc nc profile in
                dscp cp25 fc l2 profile out
                dscp cp31 fc h2 profile out
                dscp cp33 fc h1 profile in
            exit
            egress
            exit
----------------------------------------------
*A:dut-a #/configure port 1/1/3
A:NS1543C2102>config>port# info 
----------------------------------------------
        shutdown
        ethernet
            mode hybrid 
            access
            exit
            encap-type dot1q
            network
                queue-policy "_tmnx_hybrid_default"
                qos 23
            exit
        exit
----------------------------------------------
*A:NS1543C2102>config>port#

For the bridged traffic in a VPLS, four traffic types are identified (unicast and BUM). Because multicast meter 11 is defined, BUM traffic types for all FCs use meter 11 (note the user has not configured an explicit multicast meter for the FC). The number of classification entries required is as follows.

FC (nc) = 1 + 0 + 1 + 0 = 2
  (one for unicast and one for all of BUM)
FC (h1) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast & unknown-unicast)
FC (ef) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast & unknown-unicast)
FC (h2) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast & unknown-unicast)
FC (l1) = 1 + 1 + 1 + 1 = 4
  (one for unicast, one for broadcast, one for unknown-unicast & one for multicast)
FC (af) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast and unknown-
unicast)
FC (l2) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast and unknown-
unicast)
FC (be) = 1 + 0 + 1 + 0 = 2
  (one for unicast and one for all of BUM)
FC (default-fc) = 1 + 0 + 1 + 0 = 2
  (one for unicast and one for all of BUM, since default-dscp-fc is configured to
be FC 'be' in the dscp-classification policy)

TC = 1*2 (FC-nc) + 1*3 (FC-h1) + 1*3 (FC-ef) + 1*3 (FC-h2) + 1*4 (FC-l1) + 1*3 (FC-af) + 1*3 (FC-l2) + 1*2 (FC-be) + 1*2 (default-fc) = 25

TP = total meters used is 11

In this example, num-qos-classifiers is calculated as (maximum (25, (11*2)) = 25, but is set to 26 after rounding to the next highest even number.

9.7.2.6. Example 6: Routed VPLS on Access Port and Hybrid Port

This example is similar to Example 5: Routed VPLS Service on a Hybrid Port Using Unicast, Broadcast, Multicast and Unknown-unicast for Some FCs, except that FCs in use from the port policy and the override policy are considered. The following configuration shows the policy association with two SAPs configured in the routed VPLS, with one SAP on the access port and the other SAP on the hybrid port.

 *A:dut-a>config>qos>dscp-classification 23 create
*A:dut-a>config>qos>dscp-classification# info detail 
----------------------------------------------
            description "dscp-classification-23"
            default-dscp-fc "be" profile in
            dscp cs3 fc "be"
            dscp cs4 fc "ef" profile out
            dscp af31 fc "af" profile in
            dscp af33 fc "l1" profile in
            dscp af41 fc "nc"
            dscp cp25 fc "l2"
            dscp cp31 fc "h2" profile out
            dscp cp33 fc "h1" profile in
----------------------------------------------
*A:dut-a>config>qos>dscp-classification 24 create
*A:dut-a>config>qos>dscp-classification# info detail 
----------------------------------------------
            description "dscp-classification-24"
            default-dscp-fc "be" profile in
            dscp cs4 fc "ef" profile out
            dscp af31 fc "af" profile in
----------------------------------------------
*A:dut-a# configure qos sap-ingress 24 
*A:dut-a>config>qos>sap-ingress# info 
----------------------------------------------
            description "sap-Ingress-Policy-24"
            num-qos-classifiers 26
            meter 1 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 9 create
                mode trtcm2 
                rate cir 3000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 10 create
                mode trtcm2 
                rate cir 4000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 11 multipoint create
                mode trtcm2 
                rate cir 2000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 12 create
                mode trtcm2 
                rate cir 3500 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 13 create
                mode trtcm2 
                rate cir 5000 pir 7000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 14 create           
                mode trtcm2 
                rate cir 5000 pir 6000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 15 create
                mode trtcm2 
                rate cir 4000 pir 5000
                mbs 200 kbits
                cbs 100 kbits
            exit
            meter 20 multipoint create 
                mode trtcm2 
                rate cir 0 pir 5
                mbs 50 kbits
                cbs 50 kbits
            exit
            meter 21 multipoint create
                mode trtcm2 
                rate cir 0 pir 10
                mbs 100 kbits
                cbs 100 kbits
            exit
            meter 22 multipoint create
                mode trtcm2 
                rate cir 0 pir 50
                mbs 100 kbits
                cbs 100 kbits
            exit
            fc "af" create
                meter 11
                broadcast-meter 22
            exit
            fc "be" create
                meter 9
            exit
            fc "ef" create
                meter 14
                broadcast-meter 22
            exit
            fc "h1" create
                meter 15
                broadcast-meter 22
            exit
            fc "h2" create
                meter 13
                broadcast-meter 22
            exit
            fc "l1" create
                meter 12
                broadcast-meter 22
                unknown-unicast 21
            exit
            fc "l2" create
                meter 10
                broadcast-meter 20
            exit
            fc "nc" create
                meter 1
            exit
            dscp-classification 24
----------------------------------------------

The IES service and routed VPLS service configurations are as follows.

----------------------------------------------
ies 7 customer 1 vpn 7 create
            description "Default Ies service id 7"
            interface "int1IES201" create
                address 43.43.44.1/24
                vpls "rvpls607"
                    ingress
                        enable-table-classification
                        routed-override-qos-policy 24
                    exit
                exit
            exit
            service-name "XYZ Ies 7"
            no shutdown
----------------------------------------------
----------------------------------------------
vpls 607 customer 1 r-vpls svc-sap-type any create
            description "Default tls service id 607"
            allow-ip-int-bind
            exit
            stp
                shutdown              
            exit
            service-name "rvpls607"
            sap 1/1/24:201 create // SAP on hybrid port
                description "Default sap service id 607"
                ingress
                    qos 24 enable-table-classification
                exit
                egress
                exit
            exit
            sap 1/1/3:201 create  // SAP on access port
                description "Default sap service id 607"
                ingress
                    qos 24 enable-table-classification
                exit
                egress
                exit
            exit
            no shutdown
----------------------------------------------

The configuration of the network port policy for a hybrid port, followed by associating the policy with hybrid port 1/1/3 is shown in the following output example. This configuration is used for classifying RVPLS SAP bridged packets and also for classifying IP traffic received and processed in the context of the network port IP interface.

**A:dut-a >config>qos# network 123 
**A:dut-a >config>qos>network# info 
----------------------------------------------
            ingress
                default-action fc be profile in
                meter 1 create
                exit
                dscp cs4 fc ef profile out
                dscp af31 fc af profile in
                dscp af33 fc l1 profile in
                dscp af41 fc nc profile in
                dscp cp25 fc l2 profile out
                dscp cp31 fc h2 profile out
                dscp cp33 fc h1 profile in
            exit
            egress
            exit
----------------------------------------------
*A:dut-a #/configure port 1/1/24
A:NS1543C2102>config>port# info 
----------------------------------------------
        shutdown
        ethernet
            mode hybrid 
            access
            exit
            encap-type dot1q
            network
                queue-policy "_tmnx_hybrid_default"
                qos 123
            exit
        exit
----------------------------------------------
*A:NS1543C2102>config>port#

The configuration of the DSCP classification policy associated with the access port, which is the port where the RVPLS SAP is configured, is shown in the following example. The policy is used for classifying bridged packets.

*A:dut-a# configure port 1/1/3 
*A:dut-a>config>port# info 
----------------------------------------------
        ethernet
            mode access 
            enable-table-classification
            access
                ingress
                    dscp-classification 24
                    untagged-fc ef
                exit
            exit
            encap-type dot1q
            mtu 9212
        exit
        no shutdown
----------------------------------------------

To determine the resources needed for RVPLS SAP 1/1/3:201 consider the FCs configured in the DSCP classification policy configured in access port 1/1/3 context—there are three FCs (be, af, ef) configured. In addition, consider the FCs configured in the DSCP classification policy configured in the context of IES IP interface—there are three FCs (be, af, ef) configured. The total number of resources for RVPLS SAP 1/1/3:201 is computed as follows using the meter configuration under SAP-ingress policy 24.

FC (ef) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast & unknown-unicast)
FC (af) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast and unknown-
unicast)
FC (be) = 1 +0 +1 +0 = 2
  (one for unicast and one for all of BUM) 
FC (default-fc) = 1 + 0 + 1 + 0 = 2
  (one for unicast and one for all of BUM) 

TC = 0*2 (FC-nc) + 0*3 (FC-h1) + 1*3 (FC-ef) + 0*3 (FC-h2) + 0*4 (FC-l1) + 1*3 (FC-af) + 0*3 (FC-l2) + 1*2 (FC-be) + 1*2 (default-fc) = 10

TP = total meters used is 4 (meter 11, meter 9, meter 22, and meter 14)

To use the available resources efficiently for the RVPLS SAP 1/1/3:201 a policy with num-qos-classifiers set to (maximum (10, (4*2)) = 10 is required.

To determine the resources needed for RVPLS SAP 1/1/24:201 consider the FCs configured in the network port policy 123, which is associated with network port 1/1/24—all eight FCs are configured. In addition, consider the FCs configured in the DSCP classification policy configured in the context of IES IP interface—three FCs (be, af, ef) are configured. The total number of resources for RVPLS SAP 1/1/24:201 is computed as follows, using the meter configuration under the SAP-ingress policy 24.

FC (nc) = 1 + 0 + 1 + 0 = 2
  (one for unicast and one for all of BUM)
FC (h1) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast & unknown-unicast)
FC (ef) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast & unknown-unicast)
FC (h2) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast & unknown-unicast)
FC (l1) = 1 + 1 + 1 + 1 = 4
  (one for unicast, one for broadcast, one for unknown-unicast & one for multicast)
FC (af) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast and unknown-
unicast)
FC (l2) = 1 + 1 + 1 + 0 = 3
  (one for unicast, one for broadcast, and one for both multicast and unknown-
unicast)
FC (be) = 1 + 0 + 1 + 0 = 2
  (one for unicast and one for all of BUM)
FC (default-fc) = 1 + 0 + 1 + 0 = 2
  (one for unicast and one for all of BUM, since default-dscp-fc is configured to
be FC 'be' in the dscp-classification policy)

TC = 1*2 (FC-nc) + 1*3 (FC-h1) + 1*3 (FC-ef) + 1*3 (FC-h2) + 1*4 (FC-l1) + 1*3 (FC-af) + 1*3 (FC-l2) + 1*2 (FC-be) + 1*2 (default-fc) = 25

TP = total meters used is 11

For RVPLS SAP /1/124:201, a policy is required with num-qos-classifiers in the policy is calculated (maximum (25, (11*2)) = 25, but is set to 26 after rounding to the next highest even number.

9.8. Basic Configurations

A basic service ingress QoS policy must conform to the following:

  1. have a unique service ingress QoS policy ID
  2. allocate number of classifier and meter resources needed for use
  3. have a QoS policy scope of template or exclusive
  4. have at least one default unicast forwarding class
  5. (optionally) use multipoint FC meter/queue

Configuring and applying QoS policies is optional. If no QoS policy is explicitly applied to a SAP, a default QoS policy is applied.

9.8.1. Creating Service Ingress QoS Policies

To create a service ingress policy, perform the following.

  1. Define a policy ID value. The system does not dynamically assign a value.
  2. Define a description that n provides a brief overview of policy features.
  3. Specify the num-qos-classifiers command. The default value is 2.
  4. Specify a default FC for the policy. All packets received on an ingress SAP using this ingress QoS policy are classified to the default FC.
  5. Define FC parameters by performing the following.
    1. Modify the unicast-meter/queue default value to override the default unicast forwarding type meter mapping for fc fc-name.
    2. Modify the multicast-meter/queue default value to override the default multicast forwarding type meters/queue mapping for fc fc-name.
    3. Modify the unknown-meter/queue default value to override the default unknown unicast forwarding type meter mapping for fc fc-name.
    4. Modify the broadcast-meter default value to override the default broadcast forwarding type meter mapping for fc fc-name.
  6. On platforms where applicable, specify the following classification criteria: IPv4/IPv6 or MAC criteria, or both IP and MAC criteria. You can define IPv4/IPv6, MAC-based, and MAC- and IP-based SAP-ingress policies to select the ingress and corresponding forwarding class for matched traffic. See Service Ingress IP Match Criteria and Service Ingress MAC Match Criteria.
    A SAP-ingress policy is created with a template scope. The scope can be modified to exclusive for a special one-time use policy. Otherwise, the template scope enables the policy to be applied to multiple SAPs.

The following is a sample service ingress policy configuration output.

A:ALA-7>config>qos>sap-ingress# info
----------------------------------------------
...
        sap-ingress 100 create
            description "Used on VPN sap"
            num-qos-classifications 2 
            no meter 
            dscp-classification 100     (7210 SAS-R6 and 7210 SAS-R12 only) 
            no ip-criteria 
            no ipv6-criteria 
            no mac-criteria 
            scope template 
...
----------------------------------------------
A:ALA-7>config>qos>sap-ingress#

9.8.1.1. Service Ingress QoS Meter

To create service ingress meter parameters, perform the following.

  1. Define new meter ID value. The system does not dynamically assign a value.
  2. Configure meter parameters. Ingress meters support the definition of either srTCM (Single Rate Tri-Color Meter) or trTCM (Two Rate Tri-Color Meter), CIR/PIR, CBS/MBS parameters.

The following is a sample ingress meter configuration output.

A:ALA-7>config>qos# info
#------------------------------------------
echo "QoS Policy Configuration"
#------------------------------------------
...
sap-ingress 100 create
     description "Used on VPN sap"
     meter 1 create
     exit
     meter 11 multipoint create
          exit
     meter 2 create
          rate cir 11000
     exit
     meter 3 create
          cbs 32
          rate 11000
     exit
     meter 4 create
          rate 1
     exit
     meter 5 create
          cbs 64
          mbs 128
          rate cir 1500 pir 1500
     exit
     meter 6 create
          mode srtcm
          rate cir 2500 pir 2500
     exit
     meter 7 create
          cbs 256
          mbs 512
          rate cir 100 pir 36
     exit
     meter 8 create
          cbs 256
          mbs 512
          rate cir 11000
     exit
     meter 9 create
          rate cir 11000
     exit
     meter 10 create
          rate cir 1
     exit
     meter 12 create
          rate cir 1500 pir 1500
     exit
     meter 13 create
          rate cir 2500 pir 2500
     exit
     meter 14 create
          rate cir 36 pir 100
     exit
          meter 15 create
          rate cir 36 pir 100
     exit
     meter 16 create
          cbs 128
          mbs 256
          rate cir 36 pir 100
     exit
...
#------------------------------------------
A:ALA-7>config>qos#

9.8.1.2. Service Ingress IP Match Criteria

When specifying SAP-ingress match criteria, only one match criteria type can be configured in the SAP-ingress QoS policy.

The following is a sample ingress IP criteria configuration output.

 
7210-SAS>config>qos>sap-ingress# info
----------------------------------------------
            num-qos-classifiers 32
            meter 1 create
            exit
            meter 11 multipoint create
            exit
            fc "h2" create
            exit
            ip-criteria any
                entry 16 create
                    description "test"
                    match
                    exit
                    action fc "be"
                exit
            exit
----------------------------------------------
7210-SAS>config>qos>sap-ingress#
 
7210-SAS>config>qos>sap-ingress# info
----------------------------------------------
            num-qos-classifiers 4
            meter 1 create
            exit
            meter 11 multipoint create
            exit
            ip-criteria dscp-only
                entry 30 create
                    match
                    exit
                    action fc "l2"
                exit
            exit
----------------------------------------------
7210-SAS>config>qos>sap-ingress#

9.8.1.3. Service Ingress MAC Match Criteria

To configure service ingress policy MAC criteria, perform the following.

  1. Define new entry ID value. Entries must be explicitly created; the system does not dynamically assign entries or a value.
  2. Associate the FC with a specific MAC criteria entry ID.
  3. Define a description. The description provides a brief overview of policy features.

The following is a sample ingress MAC criteria configuration output.

7210-SAS>config>qos>sap-ingress# info
----------------------------------------------
            description "test"
            num-qos-classifiers 16
            meter 1 create
            exit
            meter 11 multipoint create
            exit
            mac-criteria dot1p-only
                entry 25 create
                    match
                    exit
                    no action
                exit
            exit
            default-fc "h1"
----------------------------------------------
7210-SAS>config>qos>sap-ingress#

9.8.2. Applying Service Ingress Policies

Apply SAP ingress policies to the following service SAPs:

9.8.2.1. Epipe

The following sample configuration output shows an Epipe service configuration with SAP-ingress policy 100 applied to the SAP.

 
A:ALA-7>config>service# info
----------------------------------------------
        epipe 6 customer 6 vpn 6 create
            sap 1/1/18:3000 create
                ingress
                    qos 100 [enable-table-classification] 
                exit
                egress
                    qos 200
                exit
            exit
            no shutdown
        exit
----------------------------------------------
A:ALA-7>config>service#

9.8.2.2. VPLS

The following sample configuration output shows a VPLS service configuration with SAP-ingress policy 100.

A:ALA-7>config>service# info
----------------------------------------------
        vpls 700 customer 7 vpn 700 create
            description "test"
            stp
                shutdown
            exit
            sap 1/1/9:10 create
                ingress
                    qos 100 [enable-table-classification] 
                exit
            exit
        exit
----------------------------------------------
A:ALA-7>config>service#

9.8.2.3. VPRN

The following sample configuration output shows a VPRN service configuration.

A:ALA-7>config>service# info
----------------------------------------------
...
        vprn 1 customer 1 create
            ecmp 8
            autonomous-system 10000
            route-distinguisher 10001:1
            auto-bind ldp
            vrf-target target:10001:1
            interface "to-ce1" create
                address 11.1.0.1/24
                sap 1/1/10:1 create
                    ingress
                    qos 100 [enable-table-classification] 
                    exit
                exit
            exit
            no shutdown
        exit
...
----------------------------------------------
A:ALA-7>config>service#

9.8.2.4. IES

The following sample configuration output shows an IES service configuration.

 
A:ALA-7>config>service# info
----------------------------------------------
...
ies 1 customer 1 create
      interface "to-c1" create
          address 11.1.0.1/24
          sap 1/1/10:100 create
               ingress
                    qos 100 [enable-table-classification] 
               exit
               egress
                    qos 100
               exit
          exit
          no shutdown
     exit
...
----------------------------------------------
A:ALA-7>config>service#

9.9. Service Management Tasks

This section describes service management tasks.

9.9.1. Deleting QoS Policies

Every service SAP is associated, by default, with the appropriate ingress policy (policy-id 1). You can replace the default policy with a customer-configured policy, but you cannot entirely remove the policy from the SAP configuration. When you remove a non-default service ingress policy, the association reverts to the default policy-id 1.

A QoS policy cannot be deleted until it is removed from all SAPs where it is applied.

A:ALA-7>config>qos# no sap-ingress 100
MINOR: CLI SAP ingress policy "100" cannot be removed because it is in use.
A:ALA-7>config>qos#

9.9.1.1. Removing a QoS Policy from Service SAPs

The following Epipe service output examples show that the SAP service ingress reverts to policy-id 1 when the non-default policies are removed from the configuration.

A:ALA-104>config>service>epipe# info detail
----------------------------------------------
          description "Distributed Epipe service to west coast"
                no tod-suite
                dot1ag
                exit
                ingress
                    qos 1 
                    no filter
                exit
                egress
                    no filter
                exit
                no collect-stats
                no accounting-policy
                no shutdown           
----------------------------------------------
A:ALA-7>config>service>epipe#

9.9.2. Copying and Overwriting QoS Policies

You can copy an existing service ingress policy, rename it with a new policy ID value, or overwrite an existing policy ID. The overwrite option must be specified or an error occurs if the destination policy ID exists.

Use the following syntax to copy and overwrite QoS policies.

CLI Syntax:
config>qos# copy {sap-ingress} source-policy-id dest-policy-id [overwrite]

The following is sample configuration output.

*A:ALU-7210>config>qos# info
#--------------------------------------------------
echo "QoS Policy Configuration"
#--------------------------------------------------
        sap-ingress 100 create
            description "Used on VPN sap"
            meter 1 create
            exit
            meter 2 multipoint create
            exit
            meter 10 create
                rate cir 11000
            exit
            meter 11 multipoint create
            exit
        exit
        sap-ingress 101 create
            description "Used on VPN sap"
            meter 1 create
            exit
            meter 2 multipoint create
            exit
            meter 10 create
                rate cir 11000
            exit
            meter 11 multipoint create
            exit
        exit
        sap-ingress 200 create
            description "Used on VPN sap"
            meter 1 create
            exit
            meter 2 multipoint create
            exit
            meter 10 create
                rate cir 11000
            exit
            meter 11 multipoint create
            exit
        exit
----------------------------------------------
*A:ALU-7210>config>qos#

9.9.3. Removing a Policy from the QoS Configuration

Use the following syntax to remove a policy from the QoS configuration.

CLI Syntax:
config>qos# no sap-ingress policy-id
Example:
config>qos# no sap-ingress 100

9.9.4. Editing QoS Policies

You can change existing QoS policies and entries. The changes are applied immediately to all services where this policy is applied. To prevent configuration errors, copy the policy to a work area, make the edits, and then overwrite the original policy.