05-Layer 2—LAN Switching Configuration Guide

HomeSupportConfigure & DeployConfiguration GuidesH3C S9825 & S9855 Switch Series Configuration Guides-R913x-6W10005-Layer 2—LAN Switching Configuration Guide
10-PFC configuration
Title Size Download
10-PFC configuration 116.14 KB

Configuring PFC

About PFC

Priority-based flow control (PFC) provides a finer flow control mechanism to implement lossless packet transmission on Ethernet.

PFC performs flow control for packets based on the 802.1p priorities carried in packets. As shown in Figure 1, PFC establishes eight virtual channels over an Ethernet link, each corresponding to an 802.1p priority. Any virtual channel can be paused or restarted independent of the other channels. This mechanism allows multiple types of traffic to coexist on and share an Ethernet link.

Figure 1 How PFC works

 

When congestion occurs on the local end, the device determines how to process received packets based on the 802.1p priorities carried in packets as follows:

·     If PFC is enabled for the 802.1p priority carried in a packet, the local end accepts the packet and sends PFC pause frames to notify the remote end to stop sending packets carrying the 802.1p priority. The remote end stops sending packets carrying the 802.1p priority after receiving the PFC pause frames. This process is repeated until congestion is eliminated.

·     If PFC is not enabled for the 802.1p priority carried in a packet, the local end drops the packet.

Restrictions and guidelines

If you do not enable PFC on an interface, the interface can receive but cannot process PFC pause frames. To make PFC take effect, you must enable PFC on both ends.

To avoid packet loss, apply the same PFC configuration to all interfaces that the packets pass through.

If you configure generic flow control on a PFC-enabled interface, the following rules apply:

·     The PFC configuration takes effect preferentially, and the generic flow control configuration is ignored.

·     The generic flow control configuration takes effect on the interface only when PFC is disabled on it.

For more information about generic flow control, see Ethernet interface configuration in Interface Configuration Guide.

Configuring PFC on interfaces

1.     Enter system view.

system-view

2.     Enable PFC on all Ethernet interfaces.

priority-flow-control { auto | enable [ receive | send ] }

By default, PFC is disabled on all Ethernet interfaces.

3.     Enable PFC for 802.1p priorities on all Ethernet interfaces.

priority-flow-control no-drop dot1p dot1p-list

By default, PFC is disabled for all 802.1p priorities on all Ethernet interfaces.

4.     Enter Ethernet interface view.

interface interface-type interface-number

5.     Enable PFC on the Ethernet interface.

priority-flow-control { auto | enable [ receive | send ] }

By default, PFC is disabled.

6.     Enable PFC for 802.1p priorities.

priority-flow-control no-drop dot1p dot1p-list

By default, PFC is disabled for all 802.1p priorities.

7.     (Optional.) Set the pause time in PFC pause frames.

priority-flow-control pause-time time-vale

By default, the pause time in PFC pause frames is 65535.

Setting PFC thresholds

About PFC thresholds

The storage spaces for an interface include the following types:

·     Headroom storage space.

·     Shared storage space.

·     Guaranteed storage space.

Setting PFC thresholds enables flexible control over PFC and can make good use of the storage spaces. The device supports the following PFC thresholds:

·     Headroom buffer threshold—Maximum number of cell resources that can be used by packets with a specific 802.1p priority value in a headroom storage space. An interface drops received packets once this threshold is reached.

·     Back pressure frame triggering threshold—Maximum number of cell resources that can be used by packets with a specific 802.1p priority value in a shared storage space. PFC is triggered once this threshold is reached. The back pressure frame triggering threshold includes the following types:

¡     Dynamic back pressure frame triggering threshold—Maximum cell resources set in percentage.

¡     Static back pressure frame triggering threshold—Maximum cell resources set in an absolute value.

·     Offset between the back pressure frame stopping threshold and triggering threshold—When the number of cell resources used by packets with a specific 802.1p priority value decreases by this offset after PFC is triggered, PFC will be stopped.

·     PFC reserved threshold—Number of cell resources reserved for packets with a specific 802.1p priority value in a guaranteed storage space.

Restrictions and guidelines

WARNING

WARNING!

After PFC is enabled for 802.1p priorities, the PFC thresholds use the default values. As a practice, change the thresholds only when necessary.

 

After PFC is enabled for 802.1p priorities, the PFC thresholds use the default values, which are adequate in typical network environments. As a practice, change the thresholds only when necessary. Table 1 describes the default PFC thresholds.

Table 1 Default PFC thresholds

PFC threshold (right)

Interface type (below)

Headroom buffer threshold

Dynamic back pressure frame triggering threshold

Offset between the back pressure frame stopping threshold and triggering threshold

PFC reserved threshold

100-GE

491

5

12

16

200-GE

750

5

12

16

400-GE

1000

5

12

16

 

The sum of the effective headroom buffer threshold for all ports cannot exceed the global headroom space.

When you configure the global headroom space, the shared cell resources in the buffer will be reduced. Total cell resources = Headroom + Shared + Reserved. Among these resources:

·     The headroom resources are controlled by using the priority-flow-control poolid headroom command.

·     The shared resources can be viewed by using the display buffer usage command.

·     The reserved resources are controlled by using the priority-flow-control no-drop dot1p command.

On the S9825 Switch Series, if you configure inbound PFC thresholds on ports in different buffers, the configuration does not affect the traffic proportions of these ports in the outbound direction when the ports are congested.

During the PFC deadlock recovery process, you cannot execute the priority-flow-control no-drop dot1p command to configure PFC and PFC thresholds for the specified 802.1p priorities.

When default settings are used, the PFC function does not take effect for unknown unicast packets.

You must enable PFC for 802.1p priorities before setting the PFC thresholds.

If you cancel PFC threshold settings on an interface, the PFC thresholds are restored to the state when only the priority-flow-control no-drop dot1p command is executed.

Procedure

1.     Enter system view.

system-view

2.     Set the maximum headroom storage space size for a service pool.

priority-flow-control poolid service-pool-id headroom headroom-number

On the S9855 Switch Series, the default is 3994. On the S9825 Switch Series, the default is 5000.

3.     Enter Ethernet interface view.

interface interface-type interface-number

4.     Set the PFC thresholds.

priority-flow-control no-drop dot1p dot1p-list [ pause-threshold { threshold-value | ratio threshold-ratio } [ headroom headroom-number | pause-threshold-offset offset-value | reserved-buffer reserved-value ] * ]

By default, PFC is disabled for all 802.1p priority values on an interface.

5.     (Optional.) Set the headroom buffer threshold.

priority-flow-control dot1p dot1p headroom headroom-number

See Table 1.

If you execute this command or the priority-flow-control no-drop dot1p (Ethernet interface view) command multiple times for the same 802.1p priority, the headroom-number argument in the most recent command takes effect.

6.     (Optional.) Set the back pressure frame triggering threshold.

¡     Set the dynamic back pressure frame triggering threshold.

priority-flow-control dot1p dot1p ingress-buffer dynamic ratio

See Table 1.

¡     Set the static back pressure frame triggering threshold.

priority-flow-control dot1p dot1p ingress-buffer static threshold

By default, the static back pressure frame triggering threshold is not set.

7.     (Optional.) Set the offset between the back pressure frame stopping threshold and triggering threshold.

priority-flow-control dot1p dot1p ingress-threshold-offset offset-number

See Table 1.

8.     (Optional.) Set the PFC reserved threshold.

priority-flow-control dot1p dot1p reserved-buffer reserved-number

See Table 1.

If you execute this command or the priority-flow-control no-drop dot1p (Ethernet interface view) command multiple times for the same 802.1p priority, the reserved-number argument in the most recent command takes effect.

Configuring PFC deadlock detection

About this task

When packets carrying the specified 802.1p priority are transmitted in a loop, packets in the data buffer cannot be forwarded and PFC frames are repeatedly transmitted between devices. As a result, the cell resources in the buffer for device interfaces always cannot be released. In this case, the device enters the PFC deadlock state.

This feature periodically detects whether the device is in the PFC deadlock state. If an interface is always in the PFC XOFF state within the PFC deadlock detection interval, the device enters the PFC deadlock state. If PFC deadlock detection is recovered in automatic mode, the device automatically releases the deadlock state and recovers PFC and PFC deadlock detection after the delay timer expires. During the delay timer period, the device disables PFC and PFC deadlock detection on the interface, so that packets can be forwarded properly.

After the PFC deadlock state is released, the PFC deadlock detection feature can be recovered on the interface in automatic or manual mode. Recovering this feature enables the PFC feature again at the same time. Use the automatic recovery mode when no serious failures occur.

Restrictions and guidelines

The specified CoS value must be within the 802.1p priority list specified by using the priority-flow-control no-drop dot1p command. To view the 802.1p priority for each CoS value, execute the display qos map-table dot1p-lp command.

When configuring the action to take on packets during the delay timer period for PFC deadlock automatic recovery, follow these restrictions and guidelines:

·     With the forwarding keyword specified, if the priority-flow-control no-drop dot1p command is executed, only packets with 802.1p priorities specified in this command are rate-limited when congestion occurs. If the priority-flow-control no-drop dot1p command is not executed, packets are not rate-limited.

·     With the discard keyword specified, if the priority-flow-control enable command is executed, packets with any 802.1p priority are rate-limited when congestion occurs. If the priority-flow-control enable command is not executed, packets are not rate-limited.

·     During the PFC deadlock recovery process, you cannot execute this command to modify the action to take on packets.

Prerequisites

Before you configure PFC deadlock detection on an Ethernet interface, complete the following tasks:

·     Enable PFC in auto mode or forcibly on the Ethernet interface.

·     Enable PFC for 802.1p priorities on the Ethernet interface.

Procedure

1.     Enter system view.

system-view

2.     Set the precision for the PFC deadlock detection timer.

priority-flow-control deadlock precision { high | normal }

By default, the PFC deadlock detection timer uses normal precision.

3.     Set the PFC deadlock detection interval for the specified CoS value.

priority-flow-control deadlock cos cos-value interval interval

By default, the PFC deadlock detection interval is not set.

4.     Configure the delay timer for PFC deadlock detection automatic recovery.

priority-flow-control deadlock auto-recover cos cos-value delay delay-interval

By default, the delay timer for PFC deadlock detection automatic recovery is not configured.

5.     Configure the action to take on packets during the delay timer period for PFC deadlock automatic recovery.

priority-flow-control deadlock auto-recover action { discard | forwarding }

By default, the device forwards received packets during the delay timer period for PFC deadlock detection automatic recovery.

6.     Configure the upper threshold for PFC deadlock times during the specified period.

priority-flow-control deadlock threshold cos cos-value period period count count

By default, the upper threshold for PFC deadlock times during the specified period is not configured.

7.     Enter Ethernet interface view.

interface interface-type interface-number

8.     Set the recovery mode for PFC deadlock detection on the Ethernet interface.

priority-flow-control deadlock recover-mode { auto }

By default, PFC deadlock detection recovers in automatic mode.

9.     Enable PFC deadlock detection on the Ethernet interface.

priority-flow-control deadlock enable

By default, PFC deadlock detection is disabled.

Configuring PFC deadlock prevention

About this task

A device assigns an incoming packet to a queue with an 802.1p priority based on the DSCP value of the packet and the DSCP-802.1p priority map. When packets carrying the specified 802.1p priority are transmitted in a loop, each node on the path stops transmitting packets with the specified DSCP values. In this case, a PFC deadlock occurs. To prevent PFC deadlocks, you can modify the DSCP-802.1p mappings for packets. The packets will be forwarded based on the new DSCP value.

This function enables the device to modify the 802.1p priority and DSCP value of packets when forwarding them.

Restrictions and guidelines

You cannot assign an interface with this feature enabled to an aggregation group or enable this feature on an aggregation group member port.

For the S9855 series switches, you can configure up to two DSCP mappings with different original DSCP values on an interface.

For the S9825 series switches, the following restrictions apply:

·     Each interface can be configured with only one DSCP mapping.

·     The device supports a maximum of 63 groups of DSCP mappings. When different interfaces have the same source DSCP values, Dot1p priorities, and mapped DSCP values, they are considered as one group. Also, when equivalent routes are configured, the outgoing ports must belong to the same group.

·     Enabling deadlock prevention will reduce routing specifications, which might lead to abnormal traffic forwarding. Deleting the deadlock prevention configuration can restore normal function.

Procedure

1.     Enter system view.

system-view

2.     Enter interface view.

interface interface-type interface-number

3.     Configure DSCP mappings.

priority-flow-control dscp-mapping { original-dscp original-dscp-value to priority priority dscp dscp-value }&<1-2>

By default, no DSCP mappings are configured.

Configuring the early warning thresholds for PFC packets

About this task

You can configure the early warning threshold for incoming or outgoing PFC packets of an interface as needed. The early warning threshold notifies a situation where the PFC packet transmission rate is still within a normal range but needs attention.

When the rate of PFC packets that an interface sends or receives reaches the early warning threshold, the system generates traps and logs to notify the user. According to the traps and logs, the user can discover some exceptions in the network, for example:

·     The NIC of the peer device fails and continuously sends PFC packets at a high speed. In this case, you can set the early warning threshold for incoming PFC packets.

·     The device fails and continuously sends PFC frames. In this case, you can set the early warning threshold for outgoing PFC packets.

To monitor bidirectional PFC packets, you can set the early warning thresholds for incoming packets and outgoing packets separately.

Restrictions and guidelines

The number of PFC pause frames that an interface sends or receives is counted and the early warning threshold configuration takes effect only when PFC is enabled.

Procedure

1.     Enter system view.

system-view

2.     Enter Ethernet interface view.

interface interface-type interface-number

3.     Configure the early warning threshold for incoming PFC packets.

priority-flow-control early-warning dot1p dot1p-list inpps pps-value

By default, no early warning threshold is configured for incoming PFC packets.

4.     Configure the early warning threshold for outgoing PFC packets.

priority-flow-control early-warning dot1p dot1p-list outpps pps-value

By default, no early warning threshold is configured for outgoing PFC packets.

Verifying and maintaining PFC

Perform all display tasks in any view.

·     Display the PFC information of interfaces.

display priority-flow-control interface [ interface-type [ interface-number ] ]

·     Display DSCP mapping statistics.

display priority-flow-control dscp-mapping statistics [ slot slot-number ]

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网