Configuring CoS on OVSDB-Managed VXLAN Interfaces
On QFX5100 and QFX10000 Series switches, you can configure packet classification, packet scheduling, and packet code point rewrite (rewrite rules) class of service (CoS) features on OVSDB-managed VXLAN interfaces. An OVSDB-managed VXLAN interface uses an OVSDB controller to create and manage the VXLAN interfaces and tunnels.
Classifier, scheduler, and rewrite rule configuration on OVSDB-managed VXLAN interfaces uses the same CLI statements as CoS configuration on regular Ethernet interfaces. However, feature support differs on OVSDB-managed VXLAN interfaces compared to regular Ethernet interfaces in several ways, depending on whether a switch interface is access-facing (connected to servers and other devices accessing the network) or network-facing (connected to the network, for example, switch interfaces that connect to a VXLAN gateway).
Classifiers—On access-facing ingress interfaces, you can configure either BA or MF DSCP classifiers.
On network-facing ingress interfaces, you can configure only DSCP classifiers.
Rewrite rules—On network-facing interfaces, you can configure DSCP rewrite rules. Access-facing interfaces do not support rewrite rules. IEEE 802.1p rewrite rules are not supported.
Note:Rewrite rules rewrite the DSCP code point on the VXLAN header only. Rewrite rules do not rewrite the DSCP code point on the inner packet header. If you do not configure a rewrite rule, by default, the code point value in the packet header is copied into the VXLAN header.
Schedulers—Egress interfaces use enhanced transmission selection (ETS) hierarchical port scheduling, the same as regular Ethernet interfaces, and the same features are supported. You can configure packet scheduling on access-facing and network-facing egress interfaces.
For more information about CoS feature support on OVSDB-managed VXLAN interfaces, (see Understanding CoS on OVSDB-Managed VXLAN Interfaces.)
This topic covers CoS configuration on OVSDB-managed VXLAN interfaces. It does not cover OVSDB or VXLAN configuration. See Understanding Dynamically Configured VXLANs in an OVSDB Environment for information about OVSDB-managed VXLANs.
If you do not configure CoS on an interface, the interface uses the default CoS properties. If you configure some CoS properties on an interface, the interface uses the configured CoS for those properties and default CoS for unconfigured properties. The only difference in the default settings on OVSDB-managed VXLAN interfaces is that if you do not configure a rewrite rule, by default, the code point value in the packet header is copied into the VXLAN header. (There is no default rewrite rule on other interfaces.) See Understanding Default CoS Scheduling and Classification for information about default scheduler and classifier settings.
The following three procedures show how to configure classifiers, rewrite rules, and ETS hierarchical port scheduling on OVSDB-managed VXLAN interfaces.
You can configure classifiers based on the default classifier or a previously configured classifier, or you can create completely new classifiers that do not use any default values. This example is for a network interface.
You can configure rewrite rules based on the default rewrite rule or a previously existing rewrite rule. The default rewrite rule writes the inner packet header value to the VXLAN outer header, or you can create completely new classifiers that do not use any default values. You can configure rewrite rules only on network-facing interfaces, and the only supported rewrite rules are DSCP rewrite rules.
To configure a rewrite rule on a network-facing egress interface using the default rewrite rule or a previously configured rewrite rule as a template (the switch uses the default values for any values that you do not explicitly configure), include the
import
statement and specifydefault
or the rewrite rule name as the rewrite rule to import, and associate the rewrite rule with a forwarding class, a loss priority, and one or more code points:[edit class-of-service rewrite-rules] user@switch# set dscp rewrite-name import (rewrite-name | default) forwarding-class forwarding-class-name loss-priority level code-points [aliases] [bit-patterns]
To create a rewrite rule that is not based on the default rewrite rule or a previously existing rewrite rule, create a new rewrite rule and associate it with a forwarding class, a loss priority, and one or more code points:
[edit class-of-service rewrite-rules] user@switch# set dscp rewrite-name forwarding-class forwarding-class-name loss-priority level code-points [aliases] [bit-patterns]
Note:Rewrite rules are not supported on access-facing interfaces.
Apply the rewrite rule to one or more OVSDB-managed VXLAN interfaces on the switch:
[edit class-of-service interfaces] user@switch# set interface-name unit unit rewrite-rules dscp rewrite-name
ETS hierarchical port scheduling allocates port bandwidth to traffic in two tiers. ETS provides better port bandwidth utilization and greater flexibility to allocate port resources to forwarding classes (this equates to allocating port resources to output queues because queues are mapped to forwarding classes) and to groups of forwarding classes called forwarding class sets (fc-sets).
First, ETS allocates port bandwidth to fc-sets (also known as priority groups). Each fc-set consists of one or more forwarding classes that carry traffic that requires similar CoS treatment. The bandwidth each fc-set receives is then allocated to the forwarding classes in that fc-set. Each forwarding class is mapped to an output queue. The scheduling properties of a forwarding class are assigned to the queue to which the forwarding class is mapped. Traffic control profiles control the allocation of port bandwidth to fc-sets. Queue schedulers control the allocation of fc-set bandwidth to forwarding classes. See Understanding CoS Output Queue Schedulers, Understanding CoS Traffic Control Profiles, and Understanding CoS Hierarchical Port Scheduling (ETS) for detailed information about scheduling.
Schedulers define the CoS properties of the output queues mapped to forwarding classes. After you configure a scheduler, you use a scheduler map to map the scheduler to one or more forwarding classes. Mapping the scheduler to a forwarding class applies the scheduling properties to the traffic in the forwarding class.
Schedulers define the following characteristics for the forwarding classes (queues) mapped to the scheduler:
transmit-rate
—Minimum bandwidth, also known as the committed information rate (CIR), set as a percentage rate or as an absolute value in bits per second. The transmit rate also determines the amount of excess (extra) priority group bandwidth that the queue can share. Extra priority group bandwidth is allocated among the queues in the priority group in proportion to the transmit rate of each queue.Note:Include the preamble bytes and interframe gap (IFG) bytes as well as the data bytes in your bandwidth calculations.
Note:You cannot configure a transmit rate for strict-high priority queues. Queues (forwarding classes) with a configured transmit rate cannot be included in an fc-set that has strict-high priority queues.
shaping-rate
—Maximum bandwidth, also known as the peak information rate (PIR), set as a percentage rate or as an absolute value in bits per second.Note:Include the preamble bytes and interframe gap (IFG) bytes as well as the data bytes in your bandwidth calculations.
priority
—One of two bandwidth priorities that queues associated with a scheduler can receive:low
—The scheduler has low priority.strict-high
—The scheduler has strict-high priority. You can configure only one queue as a strict-high priority queue. Strict-high priority allocates the scheduled bandwidth to the queue before any other queue receives bandwidth. Other queues receive the bandwidth that remains after the strict-high queue has been serviced.We recommend that you always apply a shaping rate to strict-high priority queues to prevent them from starving other queues. If you do not apply a shaping rate to limit the amount of bandwidth a strict-high priority queue can use, then the strict-high priority queue can use all of the available port bandwidth and starve other queues on the port.
drop-profile-map
—Drop profile mapping to a loss priority and protocol to apply weighted random early detection (WRED) packet drop characteristics to the scheduler.Note:If ingress port congestion occurs because of egress port congestion, apply a drop profile to the traffic on the congested egress port so that traffic is dropped at the egress interface instead of at the ingress interface. (Ingress interface congestion can affect uncongested ports when an ingress port transmits traffic to both congested and uncongested egress ports.)
buffer-size
—Size of the queue buffer as a percentage of the dedicated buffer space on the port, or as a proportional share of the dedicated buffer space on the port that remains after the explicitly configured queues are served.explicit-congestion-notification
—Enables ECN on a best-effort queue. ECN enables end-to-end congestion notification between two ECN-enabled endpoints on TCP/IP based networks. ECN must be enabled on both endpoints and on all of the intermediate devices between the endpoints for ECN to work properly. ECN is disabled by default.
A traffic control profile defines the CoS properties of an fc-set, and the amount of port resources allocated to the group of forwarding classes (queues) in the fc-set. After you configure a traffic control profile, you apply it (with an associated fc-set) to an interface, to configure scheduling on that interface for traffic that belongs to the forwarding classes in the fc-set .
A traffic control profile defines the following characteristics for the fc-set (priority group) mapped to the traffic control profile when you apply traffic control profile and fc-set to an interface:
guaranteed-rate
—Minimum bandwidth, also known as the committed information rate (CIR). The guaranteed rate also determines the amount of excess (extra) port bandwidth that the fc-set can share. Extra port bandwidth is allocated among the fc-sets on a port in proportion to the guaranteed rate of each fc-set.Note:You cannot configure a guaranteed rate for a, fc-set that includes strict-high priority queues. If the traffic control profile is for an fc-set that contains strict-high priority queues, do not configure a guaranteed rate.
shaping-rate
—Maximum bandwidth, also known as the peak information rate (PIR).scheduler-map
—Bandwidth and scheduling characteristics for queues, defined by mapping forwarding classes to schedulers. (The queue scheduling characteristics represent amounts or percentages of the fc-set bandwidth, not the amounts or percentages of total link bandwidth.)
Because a port can have more than one fc-set, when you assign resources to an fc-set, keep in mind that the total port bandwidth must serve all of the queues associated with that port in each fc-set.
The following procedure shows how to configure scheduler properties, map schedulers to forwarding classes, map forwarding classes to fc-sets, configure traffic control profile properties, and apply traffic control profiles and fc-sets to interfaces (to apply the ETS ports scheduling configuration to interfaces).
You do not have to explicitly configure all of the scheduler and traffic control profile characteristics. Some characteristics are disabled by default, such as ECN, and should only be enabled under certain conditions. You can have a mix of configured CoS properties and default CoS properties.
Name the queue scheduler and define the minimum guaranteed bandwidth for the queue:
[edit class-of-service] user@switch# set schedulers scheduler-name transmit-rate (rate | percent percentage)
Define the maximum bandwidth for the queue:
[edit class-of-service schedulers scheduler-name] user@switch# set shaping-rate (rate | percent percentage)
Define the queue priority:
[edit class-of-service schedulers scheduler-name] user@switch# set priority level
Define the drop profile using a drop profile map:
[edit class-of-service schedulers scheduler-name] user@switch# set drop-profile-map loss-priority (low | medium-high | high) protocol protocol drop-profile drop-profile-name
Configure the size of the port dedicated buffer space for the queue:
[edit class-of-service schedulers scheduler-name] user@switch# set buffer-size percent 20
Enable ECN, if desired (queue should handle best-effort traffic):
[edit class-of-service schedulers scheduler-name] user@switch# set explicit-congestion-notification
Configure a scheduler map to map the scheduler to a forwarding class, which applies the scheduler’s properties to the traffic in that forwarding class:
[edit class-of-service] user@switch# set scheduler-maps scheduler-map-name forwarding-class forwarding-class-name scheduler scheduler-name
This completes the characteristics you can configure in a scheduler, and scheduler mapping to forwarding classes. The next steps show how to configure traffic control profiles.
Name the traffic control profile and define the minimum guaranteed bandwidth for the fc-set:
[edit class-of-service ] user@switch# set traffic-control-profiles traffic-control-profile-name guaranteed-rate (rate | percent percentage)
Define the maximum bandwidth for the fc-set:
[edit class-of-service traffic-control-profiles traffic-control-profile-name] user@switch# set shaping-rate (rate | percent percentage)
Attach a scheduler map to the traffic control profile; the scheduler map associates the schedulers and forwarding classes (queues) in the scheduler map with the traffic control profile:
[edit class-of-service traffic-control-profiles traffic-control-profile-name] user@switch# set scheduler-map scheduler-map-name
This completes the characteristics you can configure in a traffic control profile. The next step shows how to assign forwarding classes to fc-sets.
Assign one or more forwarding classes to the fc-set:
[edit class-of-service] user@switch# set forwarding-class-sets forwarding-class-set-name class forwarding-class-name
This completes assigning forwarding classes to fc-sets. The next steps show how to apply ETS hierarchical port scheduling to interfaces.
To apply ETS hierarchical port scheduling to interfaces, associate an fc-set and a traffic control profile with interfaces. The fc-set determines the forwarding class(es) and queue(s) that use the specified interface. The traffic control profile determines the amount of port resources allocated to the fc-set, and the mapping of forwarding classes to schedulers in the traffic control profile determines the allocation of fc-set resources to the forwarding classes that are members of the fc-set.
user@switch# set interfaces interface-name forwarding-class-set fc-set-name output-traffic-control-profile tcp-name