Re-write a 802.1Q VLAN tagged packet
Re-write a packet's 802.1p priority
Re-write packet's IP TOS
Alter a packet's transmit queue
For this example, we have an IP Phone which is sending its VoIP traffic 802.1Q-VLAN tagged into port fe.3.11, and also is setting the IP header's TOS field.
The goal of this configuration is to intercept that traffic, and modify the 802.1Q VLAN, 802.1p Priority, and TOS field (5811) to be in conformance with desired Quality of Service recommendations.
Globally enable Class of Service awareness, including the ability to perform a TOS Rewrite:
set cos state enable
Write a Class of Service (to be stored into the COS table at Index 40) specifying a desired 802.1p Priority of 6 and a desired 8-bit TOS value of 104 (triggered from a 6-bit DSCP value of 26, we are here merely ensuring that the last two TOS bits - not used by DSCP - are zeroed), and that the processed frame is to be placed into transmit queue reference 6 (per '
show cos reference
set cos settings 40 priority 6 tos-value 104.255 txq-reference 6
Create a Policy Profile / "Role" (to be stored into the Policy table at Index 5 and named
set policy profile 5 name VoIP tci-overwrite enable
Tie policy profile #5 and its rules/classifications to only port fe.3.11, affecting only traffic which ingresses that port:
set policy rule admin-profile port fe.3.11 mask 16 port-string fe.3.11 admin-pid 5
Create a policy rule operating under Policy Profile 5 that targets frames with a DSCP value of 26 (TOS value of 104) and forwards them as VLAN 3015, treating them according to CoS setting 40:
set policy rule 5 iptos 104 mask 8 vlan 3015 cos 40
Because the Profile provides no default action; the non-TOS-labeled, non-802.1Q-Tagged traffic of the phone's attached PC will receive its VLAN and Priority based on port fe.3.11's PVID and PPID settings - as would usually happen in the absence of Policy overrides.
For more about the use of these commands, please refer to the Configuration Guide for your product.