Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Example: Configuring CoS PFC for FCoE Traffic

 

Priority-based flow control (PFC, described in IEEE 802.1Qbb) is a link-level flow control mechanism that you apply at ingress interfaces. PFC enables you to divide traffic on one physical link into eight priorities. You can think of the eight priorities as eight “lanes” of traffic that correspond to queues (forwarding classes). Each priority is mapped to a 3-bit IEEE 802.1p CoS value in the VLAN header.

You can selectively apply PFC to the traffic in any queue without pausing the traffic in other queues on the same link. You must apply PFC to FCoE traffic to ensure lossless transport.

This example describes how to configure PFC for FCoE traffic:

Requirements

This example uses the following hardware and software components:

  • One switch

  • Junos OS Release 11.1 or later for the QFX Series

Overview

FCoE traffic requires PFC to ensure lossless packet transport. This example shows you how to configure PFC on FCoE traffic, use the default FCoE forwarding-class-to-queue mapping and:

  • Configure a classifier that associates the FCoE forwarding class with FCoE traffic, which is identified by IEEE 802.1p code point 011 (priority 3).

  • Configure a congestion notification profile to apply PFC to the FCoE traffic.

  • Apply the classifier and the PFC configuration to ingress interfaces.

    Note

    Configuring or changing PFC on an interface blocks the entire port until the PFC change is completed. After a PFC change is completed, the port is unblocked and traffic resumes. Blocking the port stops ingress and egress traffic, and causes packet loss on all queues on the port until the port is unblocked.

  • Configure the CoS bandwidth scheduling for the FCoE forwarding class output queue.

  • On switches that support enhanced transmission selection (ETS) hierarchical port scheduling, create a forwarding class set (priority group) that includes the FCoE forwarding class; this is required to configure enhanced transmission selection (ETS) and support data center bridging (DCB).

  • For ETS, configure the bandwidth scheduling for the FCoE priority group.

  • Apply the configuration to ingress and egress interfaces. How this is done differs depending on whether you use ETS or direct port scheduling for the CoS configuration.

    For direct port scheduling, you apply a scheduler map directly to the interface. A scheduler map maps schedulers to forwarding classes, and applies the CoS properties of the scheduler to the output queue mapped to the forwarding class.

    For ETS hierarchical port scheduling, you apply the scheduler map to a traffic control profile, and then apply the traffic control profile to the interface. The scheduler map maps CoS properties to forwarding classes (and their associated output queues) just as it does for direct port scheduling. The traffic control profile maps CoS properties to the priority group (a group of forwarding classes defined in a forwarding class set) that contains the forwarding class, creating a CoS hierarchy that allocates port bandwidth to a group of forwarding classes (priority group), and then allocates the priority group bandwidth to the individual forwarding classes.

Each interface in this example acts as both an ingress interface and an egress interface, so the classifier, congestion notification profile, and scheduling are applied to all of the interfaces.

Topology

Table 1 shows the configuration components for this example.

Table 1: Components of the PFC for FCoE Traffic Configuration Topology

Component

Settings

Hardware

One switch

Behavior aggregate classifier (maps the FCoE forwarding class to incoming packets by IEEE 802.1 code point)

Code point 011 to forwarding class fcoe and loss priority low

Ingress interfaces: xe-0/0/31, xe-0/0/32, xe-0/0/33, xe-0/0/34

PFC congestion notification profile

fcoe-cnp:

Code point 011

Ingress interfaces: xe-0/0/31, xe-0/0/32, xe-0/0/33, xe-0/0/34

FCoE queue scheduler

fcoe-sched:

Minimum bandwidth 3g

Maximum bandwidth 100%

Priority low

Forwarding class-to-scheduler mapping

Scheduler map fcoe-map:

Forwarding class fcoe

Scheduler fcoe-sched

On switches that support direct port scheduling, if you use port scheduling, attach the scheduler map directly to interfaces xe-0/0/31, xe-0/0/32, xe-0/0/33, and xe-0/0/34.

ETS only: Forwarding class set (FCoE priority group)

fcoe-pg:

Forwarding class fcoe

Egress interfaces: xe-0/0/31, xe-0/0/32, xe-0/0/33, xe-0/0/34

ETS only: Traffic control profile

fcoe-tcp:

Scheduler map fcoe-map

Minimum bandwidth 3g

Maximum bandwidth 100%

For ETS hierarchical scheduling, attach the traffic control profile (using the output-traffic-control-profile keyword) to interfaces xe-0/0/31, xe-0/0/32, xe-0/0/33, and xe-0/0/34.

Figure 1 shows a block diagram of the configuration components and the configuration flow of the CLI statements used in the example.

Figure 1: PFC for FCoE Traffic Configuration Components Block Diagram
PFC for
FCoE Traffic Configuration Components Block Diagram

Configuration

CLI Quick Configuration

To quickly configure PFC for FCoE traffic, copy the following commands, paste them in a text file, remove line breaks, change variables and details to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

The configuration is separated into the configuration common to ETS and direct port scheduling, and the portions of the configuration that apply only to ETS and only to port scheduling.

Common Configuration that applies to ETS Hierarchical Scheduling and to Port Scheduling:

[edit class-of-service]

set classifiers ieee-802.1 fcoe-classifier forwarding-class fcoe loss-priority low code-points 011

set congestion-notification-profile fcoe-cnp input ieee-802.1 code-point 011 pfc

set interfaces xe-0/0/31 unit 0 classifiers ieee-802.1 fcoe-classifier

set interfaces xe-0/0/32 unit 0 classifiers ieee-802.1 fcoe-classifier

set interfaces xe-0/0/33 unit 0 classifiers ieee-802.1 fcoe-classifier

set interfaces xe-0/0/34 unit 0 classifiers ieee-802.1 fcoe-classifier

set interfaces xe-0/0/31 congestion-notification-profile fcoe-cnp

set interfaces xe-0/0/32 congestion-notification-profile fcoe-cnp

set interfaces xe-0/0/33 congestion-notification-profile fcoe-cnp

set interfaces xe-0/0/34 congestion-notification-profile fcoe-cnp

set schedulers fcoe-sched priority low transmit-rate 3g

set schedulers fcoe-sched shaping-rate percent 100

set scheduler-maps fcoe-map forwarding-class fcoe scheduler fcoe-sched

Configuration for ETS hierarchical scheduling—the ETS-specific portion of this example configures forwarding class set (priority group) membership, priority group CoS settings (traffic control profile), and assigns the priority group and its CoS configuration to the interfaces:

[edit class-of-service]

set forwarding-class-sets fcoe-pg class fcoe

set traffic-control-profiles fcoe-tcp scheduler-map fcoe-map guaranteed-rate 3g

set traffic-control-profiles fcoe-tcp shaping-rate percent 100

set interfaces xe-0/0/31 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp

set interfaces xe-0/0/32 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp

set interfaces xe-0/0/33 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp

set interfaces xe-0/0/34 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp

Configuration for port scheduling—the port-scheduling-specific portion of this example assigns the scheduler map (which sets the CoS treatment of the forwarding classes in the scheduler map) to the interfaces:

[edit class-of-service]

set interfaces xe-0/0/31 scheduler-map fcoe-map

set interfaces xe-0/0/32 scheduler-map fcoe-map

set interfaces xe-0/0/33 scheduler-map fcoe-map

set interfaces xe-0/0/34 scheduler-map fcoe-map

Common Configuration (Applies to ETS Hierarchical Scheduling and to Port Scheduling)

Step-by-Step Procedure

To configure the ingress classifier for FCoE traffic, PFC on the FCoE traffic, apply the PFC and classifier configurations to interfaces, and configure queue scheduling, for both ETS hierarchical scheduling and port scheduling (common configuration):

  1. Configure a classifier to set the loss priority and IEEE 802.1 code point assigned to the FCoE forwarding class at the ingress:
    [edit class-of-service]

    user@switch# set classifiers ieee-802.1 fcoe-classifier forwarding-class fcoe loss-priority low code-points 011



  2. Configure PFC on the FCoE queue by applying FCoE to the IEEE 802.1 code point 011:
    [edit class-of-service]

    user@switch# set congestion-notification-profile fcoe-cnp input ieee-802.1 code-point 011 pfc



  3. Apply the PFC configuration to the ingress interfaces:
    [edit class-of-service]

    user@switch# set interfaces xe-0/0/31 congestion-notification-profile fcoe-cnp

    user@switch# set interfaces xe-0/0/32 congestion-notification-profile fcoe-cnp

    user@switch# set interfaces xe-0/0/33 congestion-notification-profile fcoe-cnp

    user@switch# set interfaces xe-0/0/34 congestion-notification-profile fcoe-cnp



  4. Assign the classifier to the ingress interfaces:
    [edit class-of-service]

    user@switch# set interfaces xe-0/0/31 unit 0 classifiers ieee-802.1 fcoe-classifier

    user@switch# set interfaces xe-0/0/32 unit 0 classifiers ieee-802.1 fcoe-classifier

    user@switch# set interfaces xe-0/0/33 unit 0 classifiers ieee-802.1 fcoe-classifier

    user@switch# set interfaces xe-0/0/34 unit 0 classifiers ieee-802.1 fcoe-classifier



  5. Configure output scheduling for the FCoE queue:
    [edit class-of-service]

    user@switch# set schedulers fcoe-sched priority low transmit-rate 3g

    user@switch# set schedulers fcoe-sched shaping-rate percent 100



  6. Map the FCoE forwarding class to the FCoE scheduler:
    [edit class-of-service]

    user@switch# set scheduler-maps fcoe-map forwarding-class fcoe scheduler fcoe-sched



ETS Hierarchical Scheduling Configuration

Step-by-Step Procedure

To configure the forwarding class set (priority group) and priority group scheduling (in a traffic control profile), and apply the ETS hierarchical scheduling for FCoE traffic to interfaces:

  1. Configure the forwarding class set for the FCoE traffic:
    [edit class-of-service]

    user@switch# set forwarding-class-sets fcoe-pg class fcoe



  2. Define the traffic control profile for the FCoE forwarding class set:
    [edit class-of-service]

    user@switch# set traffic-control-profiles fcoe-tcp scheduler-map fcoe-map guaranteed-rate 3g

    user@switch# set traffic-control-profiles fcoe-tcp shaping-rate percent 100



  3. Apply the FCoE forwarding class set and traffic control profile to the egress ports:
    [edit class-of-service]

    user@switch# set interfaces xe-0/0/31 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp

    user@switch# set interfaces xe-0/0/32 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp

    user@switch# set interfaces xe-0/0/33 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp

    user@switch# set interfaces xe-0/0/34 forwarding-class-set fcoe-pg output-traffic-control-profile fcoe-tcp



Port Scheduling Configuration

Step-by-Step Procedure

To apply port scheduling for FCoE traffic to interfaces:

  1. Apply the scheduler map to the egress ports:
    [edit class-of-service]

    user@switch# set interfaces xe-0/0/31 scheduler-map fcoe-map

    user@switch# set interfaces xe-0/0/32 scheduler-map fcoe-map

    user@switch# set interfaces xe-0/0/33 scheduler-map fcoe-map

    user@switch# set interfaces xe-0/0/34 scheduler-map fcoe-map

Results

Display the results of the configuration (the system shows only the explicitly configured parameters; it does not show default parameters such as the fcoe lossless forwarding class). The results are from the ETS hierarchical scheduling configuration to show the more complex configuration. Direct port scheduling results would not show the traffic control profile or forwarding class set portions of the configuration, and would display the name of the scheduler map under each interface (instead of the names of the forwarding class set and output traffic control profile), but is otherwise the same.





Tip

To quickly configure the interfaces, issue the load merge terminal command and then copy the hierarchy and paste it into the switch terminal window.

Verification

To verify that the PFC configuration for FCoE traffic components has been created and is operating properly, perform these tasks:

Verifying That Priority-Based Flow Control Has Been Enabled

Purpose

Verify that PFC is enabled on the FCoE queue to enable lossless transport.

Action

List the congestion notification profiles using the operational mode command show class-of-service congestion-notification:

Meaning

The show class-of-service congestion-notification operational command lists all of the congestion notification profiles and which IEEE 802.1p code points have PFC enabled. The command output shows that PFC is enabled on code point 011 for the fcoe-cnp congestion notification profile.

The command also shows the default cable length (100 meters), the default maximum receive unit (2500 bytes), and the default mapping of priorities to output queues because this example does not include configuring these options.

Verifying the Ingress Interface PFC Configuration

Purpose

Verify that the classifier fcoe-classifier and the congestion notification profile fcoe-cnp are configured on ingress interfaces xe-0/0/31, xe-0/0/32, xe-0/0/33, and xe-0/0/34.

Action

List the ingress interfaces using the operational mode command show configuration class-of-service interfaces:

user@switch> show configuration class-of-service interfaces xe-0/0/31
user@switch> show configuration class-of-service interfaces xe-0/0/32
user@switch> show configuration class-of-service interfaces xe-0/0/33
user@switch> show configuration class-of-service interfaces xe-0/0/34

Meaning

The show configuration class-of-service interfaces commands list the congestion notification profile that is mapped to the interface (fcoe-cnp) and the IEEE 802.1p classifier associated with the interface (fcoe-classifier).