Layer 2 QoS (CoS)

CMG and HSG support QoS at layer 2 by setting class of service (CoS) for Ethernet frames. CoS (as in IEEE P802.1P) is a 3-bit field called the Priority Code Point (PCP) within an Ethernet frame header when using VLAN tagged frames as defined by IEEE 802.1Q. It specifies a priority value of between 0 and 7 inclusive that can be used by QoS disciplines to differentiate traffic.

In mbox, when configuring a VLAN interface, there're two command options we can use

!interface vlan 0 10 enable set cos <default-outbound-priority> <mapped-priority> match cost <default-in-bound-priority> <mapped-priority>!

NOTE:

  • set cos <outbound-priority> <mapped-priority>. This command rewrite priority for frames going out from the vlan interface, so that upstream switch can provide differential treatment (QoS) for the "colored" frames based on CoS value. By default, all frames have 0 (lowest priority, treat with best efforts). Set a target priority value <mapped-priority> for upstream switch to use.
  • match cost <inbound-priority> <mapped-priority>. This command does the reverse, for frames coming into mbox. By default, it rewrites all frames to 0, irregardless the incoming frame priority. Use this command to preserve or change to other values.

NOTE:

  1. "firewall-set" command marks IP packet headers at layer 3 for router/firewall to perform QoS control
  2. "set" command sets priority bit on ethernet frames at layer 2 for switch to perform QoS control

Some ISPs require to set CoS for CPE WAN interface when trunking is configured. Below is an example of Cisco CoS config and mbox CoS config.

Cisco IOS config:

!policy-map COS class class-default set cos 1!interface FastEthernet0.1103 encapsulation dot1Q 1103 ip address dhcp service-policy output COS!

mbox config:

!interface vlan 0 1103 enable set cos 0 1 ip address dhcp!