Is there a simple way to test if a packet keeps its dscp end to end?
For example. How can I see that specific traffic (ip:port) keeps correct tag.
I tried ip flow on the router and mls qos on the switch but this does not always work as expected.
Is there an easy debug to test if traffic returns with correct tag?
If I use ping and set TOS, how can I see the return?
A simple method to verify this is to do it on a hop-by-hop basis, first from source to destination and then for the return traffic as well. On your routers (and most switches), you can use a policy map with no actions just to use it as a counter:
SW1(config)#class-map EF
SW1(config-cmap)#match dscp ef
SW1(config)#policy-map COUNTER
SW1(config-pmap)#class EF
SW1(config)#interface GigabitEthernet 0/1
SW1(config-if)#service-policy input COUNTER
Hi , I have question. as you mentioned switch will erase the QOS marking of all packet when we will enable the QOS on switch but default behavior of switch is to overwrite the DSCP value of the packet inside your frame according to the cos-to-dscp map.
so I confused what will happen? will erase or overwrite?
Waiting for your reply.
also what is the default DSCP value (in tos header) in packet and COS values in frame when PC sent the packet to router??
According to Cisco, by default, if QoS is enabled on a switch and no other QoS parameters have been set:
Inside the dot1q frame tag, there are three bits called 802.1p priority bits available which are also called CoS. These bits are set to 0.
Then, the switch calculates DSCP value based on the CoS-DSCP map table. As per the table, the switch sets the DSCP value to 0. DSCP value is located at the IP header of the packet.
In summary, the CoS and DSCP values of the frame enter the switch set to 0 by default if the QoS is enabled on the switch.
So essentially the bits are all set to 0. Now you can call that “erased” or “overwritten” whatever the case may be.
As for DSCP and COS values in packets/frames from a PC, under most circumstances, these too are set to 0, unless a specific application on the PC makes changes to these.