07-01-2012 07:15 AM - edited 03-07-2019 07:32 AM
Hi everybody.
The switch uses its queues, which are available on a per-port basis, to buffer incoming and outgoing frames. The switch can use the CoS values to place the frames in the appropriate queues. Voice frames should be placed in the priority queue for minimal delay.
Let say i a switch trust cos of incoming frames and places in the priority queue for minimal delay. The switch does not alter cos values. Will this switch also place these frames with cos values in the appropriate queues for outgoing interface ?
thanks and have a great weekend.
Solved! Go to Solution.
07-01-2012 01:33 PM
Hello Sarah,
as you already now, trusting CoS value itself has nothing to do with the way qos and traffic management behaves. the important part in how classified packets get serviced depends on the QoS setting that you apply on the switch.
for example, if you put a traffic flow with CoS 5, in an ingress priority queue, this flow doesnt necessarily go to an egress priority queue too, unless you set it so.
but using certain features such as Auto qos for voice, makes the switch manage both ingress and egress queues at the same time
Hope it Helps,
Soroush.
07-02-2012 11:18 AM
Sarah, if QoS is disabled this is different case i believe we both assumed where u have qos enabled coz we were talking abt priority packets n stuff, in case it is Enabled u have to set trust states, all along the way.
if QoS is disabled, then switch simply doesnt care! it doesnt look for 802.1p header then. think of it like a dumb hub (QoS-wise), would a hub care what header information is attached to a PDU ? No!
HTH,
Soroush.
07-02-2012 05:34 PM
"May be i should keep my book"
.
As descibed in your book, if QoS is not enabled on your switches it won't care about the QoS markings but they will loose their markings when they cross any layer 3 device.
.
Siddhartha
07-03-2012 05:17 AM
The switches will calulate both COS and DSCP values, for example if you trust the COS value on a port it will also calculate the respective DSCP value based on the COS-to-DSCP mapping and in the same way if you trust the DSCP value it will calulate the respective COS value based on the DSCP-to COS map.
On the route we can configure using MQC - class maps and policy maps- with class map you can either match the incomming packets based on COS or based on DSCP not on both at the same time, for example
class-map match any voice
cos 5
or
class-map match any voice
dscp 46
Then you can use a policymap and set the value for the outgoing packets
policy-map qos
class-map match-any Platinum-Voice
priority percent 20
set ip dscp ef
At which node should we perform mapping cos to dscp?
Router and switches
Cos marking will travel over the trunk link. to Sw1. Can Sw1 map the cos to Dscp and send it over trunk port to R2 ?
Yes
Can Sw1 retain COS value and let R2 map the Cos to Dscp before sending it to R1?
Routers can map cos to DSCP and vice versa, so it depends where you want to perform the conversion and it really doesn't matter.
The only requirement is QoS needs to be a end to end configuration.
Siddhartha
07-04-2012 04:02 AM
Hi Sarah,
i aint Sidd thou!
this is the QoS chart on most of the devices, but note that this could be slightly different in different routers or switches:
Ingress Traffic ----> Classify ---> Policer ----> Marker (Set Cos) ----> Normal / Priority Queue ---> to the egress point
so its a Yes to what you said
HTH,
Soroush.
07-04-2012 11:31 AM
Hi Sarah,
I hope i'll be a good help for u to get it this time;
1) many ip phones have a built-in three port switch in them, one for PC, one for the phone itself, and one for upstream connection. when using separate voice n data van for ip phones the internal switch will tag voice traffic with the respective voice van ID and applies a COS 5 value.
since the ip phone connection to upstream switch is 802.1q trunk, it considers the Data vlan, its native vlan and send PC traffic untagged. (Correct)
2) using 802.1p, my understanding is that the ip phone sends the voice and data traffic with 802.1p header set and the frames carry a vlan ID equal to Zero (not literally VLAN 0) and switch accepts the frames with VLAN zero as if they are in the access vlan set on the switchport.
3) u r right, this is probably IP Precedence 5, not the CoS 5.
4) This feature is complementary to the "port prioritization for untagged packets" available on supported Cisco Catalyst switches.
whats the use of it? it lets us make sure that the traffic coming from a PC connected to the iphone will never get as high priority as Voice packets generated from the ip phone itself.
me not in the States but Happy 4th of july to U
HTH,
Soroush.
07-04-2012 11:35 AM
Hi Sarah,
1) My book says this command tells ip phone to use native vlan 22 ( also called data vlan) and vlan 24 for voip frames.
ip phone will send pc data without any tag and hence the word native vlan
Is this correct?
Yes
2) If we use " switchport voice vlan dot1p" the switch tells ip phone to use vlan 0 for voip traffic and use native vlan ( which is vlan 22) for PC.
My question is since we are using vlan 0 for voip, it should be used for voip throughout switched network for example:
Ip phone1-----sw1--------sw2------ipphone2
| |
PC PC
If we use " switchport voice vlan dot1p" on sw2, voip frames will be sent in vlan 0 by iphone2 to sw2. If ipphone2 has to communicate with iphone1 and they are on same subnet, then should ipphone1 be on vlan 0 as well?( that means we must also configure SW1 with " switchport voice vlan dot1p")
Yes, you would need to configure switchport voice vlan dot1p on all your switches, but remember vlan 0 is an internal voice vlan to the phone, when the switch receives vlan 0, it will change it to whatever access vlan you have configured (in your case 22).
3) If we use " switchport voice vlan untagged" on sw2, my book says both voip and pc data are sent using native vlan. then book also says COS bits still sent. This boggles my mind. When we use the option " untagged" the switch should not insert any dot1q tag . So without dot1q tag, how COS bits can still be carried?
Since the dot1p is a 3 bit priority tag and it is inside dot1q, when you configure "switchport voice vlan untagged" than there is no tag and no COS.
happy 4th.
HTH
07-04-2012 12:57 PM
Hi Sarah,
Yes, your understanding is correct.
Good Luck with the switching exam!
Make sure to get some hands-on practice on routers and switches before you take it.
Reza
07-04-2012 01:03 PM
With regards to the receiving end point, since 802.1p uses vlan 0 as a spacial case to carry a CoS value for voip frames, and cos is only used by intermediate devices for QoS purposes and having in mind that upon receiving the Voice packet, Switch assumes the Access vlan which is set on the interface in this case.
then i'd say, the Switch will simply strip off the vlan ID from the frame and and forward it to ip phone's IP address out the interface as it'll do on a normal access switchport.
this was my assumption based on the facts.
HTH,
Soroush.
07-04-2012 01:24 PM
I guess u are getting confused with the term of "Native VLAN or Untagged", this is in reference to an 802.1q tag. You can't put a CoS into a frame that is untagged (either 802.1q or 802.1p tag is required). A host connected to the phone can be configured to insert a tag into the frame (802.1p). in such case's or as a precaution, to make sure we don't ruin our voice priority accidentally or by a rogue user, intentionally, we could use this command.
Hope it Helps,
Soroush.
07-04-2012 02:01 PM
when voice packet is received at the ip phone with its Mac Address attached, the phone will just pick it up n otherwise will send it out the other interface, is a small 1 to 2 / 2 to 1 switch module. i dont think the built-in switch module in an ip phone is that sophisticated to perform queuing and other QoS stuff, this needs some hardware muscle... n it doesn't really need it.
its just faster to read the address and switch.
whatever qos and marking we implement at the beginning (ip phone) is just for Access, Distribution and Core network handling.
EDIT:
a 2nd view: reasong behind using CoS & DSCP marking is that the intermediate device has a lot of packets to handle and the only way it could know abt the urgency of the frame is reading these markings and follow instructions. as for the ip phone it could be hardcoded in itself that packets destined for the phone itself has the highest priority over all others!
Soroush.
07-04-2012 02:18 PM
Sarah,
Priority is 802.1p totally different from 802.1Q header
check this url:
http://www.cisco.com/en/US/products/hw/switches/ps607/products_qanda_item09186a0080116ffe.shtml#q9
Soroush.
07-04-2012 06:28 PM
I like this discussion, learned few things that I don't know before.
"Dot1p marrkings are carried by dot1q tag . So If there is no dot1q tag, there is no dot1p marking either.
That is correct.
if ip phone is using native vlan for attached PC, that means there is no 802.1p markings because switch does not insert dot1q tag for native vlan"
I am not sure what you exactly mean here but IP phone can't influece what PC can use.
usualy PCs can't tag the traffic and can't mark the traffic unless you use any special settings, so if the switch port is configured as a trunk port the outgoing or incomming PC traffic will go to the native VLAN defined.
that means there is no 802.1p markings because switch does not insert dot1q tag for native vlan"
Yes
Siddhartha
07-01-2012 01:33 PM
Hello Sarah,
as you already now, trusting CoS value itself has nothing to do with the way qos and traffic management behaves. the important part in how classified packets get serviced depends on the QoS setting that you apply on the switch.
for example, if you put a traffic flow with CoS 5, in an ingress priority queue, this flow doesnt necessarily go to an egress priority queue too, unless you set it so.
but using certain features such as Auto qos for voice, makes the switch manage both ingress and egress queues at the same time
Hope it Helps,
Soroush.
07-01-2012 04:32 PM
Thanks Soroushm.
By default a switch trusts cos values received on its trunk port. The cos value in received frame helps switch determine which priority queues for ingress port, the frame be placed. And If a switch determines that received frame has to forwarded out say f1/2, it will not place the frame in priority queue for egress port (f1/2) based on cos value carried by received frame unless we configure specific features such as auto qos.
Did i get it right ?
07-02-2012 03:32 AM
As for the trunk ports, I believe so Sarah, except for the Native Vlan frames, which dont have Tag Control info in their headers.
it said that in most cases without any special configuration, all user data traffic is sent in a Best Effort basis. so unless u configure ur device to take care of a certain class of traffic, it continues to use the best effort model.
but some configz are like a package! u config one thing, it takes care of ingress and egress; i.e. Auto QoS for voip!
EDIT: I misunderstood!!! you have to trust CoS and DSCP all along the way, then if u trust either CoS or DSCP, then the switch uses a conversion table to convert them in case its needed to be done (default and configurable). on access ports and uplinks you have to explicitly instruct to Trust and untagged traffic gets a 0 value by default.
Thanks Sid !
HTH,
Soroush.
07-02-2012 07:14 AM
Hi Sarah,
"By default a switch trusts cos values received on its trunk port."
I don't believe the above statement is true, even if its a trunk port you still have to tell the switch to either the trust the COS or DSCP received in the incomming frame.
"Example 2:If the port is trunk port, you can configure either the mls qos trust cos or mls qos trust dscp command. The dscp-cos map table is used to calculate the CoS value if the port is configured to trust DSCP. Similarly, the cos-dscp map table is used to calculate the DSCP value if the port is configured to trust CoS.
As Souroush mentioned since native VLAN traffic will have COS,DSCP values set to zero the switch will reset the COS and DSCP values back to zero even if we specify the trust command.
Example 3: If the port is a dot1q trunk port and the port is configured with the mls qos trust cos command, native VLAN frames will have CoS and DSCP values as 0. Because native VLAN frames are untagged and the frame is tagged after it enters the switch, the switch will set the default CoS value to 0 and the CoS-to-DSCP table sets the DSCP value to 0.
Note: The DSCP value of the packet coming from native VLAN will be reset to 0.
AutoQos is the easiest way to configure LAN QOS.
http://www.cisco.com/en/US/products/hw/switches/ps5023/products_tech_note09186a0080883f9e.shtml
https://supportforums.cisco.com/message/3656109#3656109
Siddhartha
07-02-2012 11:04 AM
I should throw my book in thrash.
That is exactly what my book says:
By default, QOS is disabled globally on a switch and all QOS information is allowed to pass from one switch port to another."
thanks for the correction or i will be building my QOS foundation on a wrong concept.
07-02-2012 11:18 AM
Sarah, if QoS is disabled this is different case i believe we both assumed where u have qos enabled coz we were talking abt priority packets n stuff, in case it is Enabled u have to set trust states, all along the way.
if QoS is disabled, then switch simply doesnt care! it doesnt look for 802.1p header then. think of it like a dumb hub (QoS-wise), would a hub care what header information is attached to a PDU ? No!
HTH,
Soroush.
07-02-2012 05:10 PM
May be i should keep my book.
07-02-2012 05:34 PM
"May be i should keep my book"
.
As descibed in your book, if QoS is not enabled on your switches it won't care about the QoS markings but they will loose their markings when they cross any layer 3 device.
.
Siddhartha
07-02-2012 08:11 PM
As descibed in your book, if QoS is not enabled on your switches it won't care about the QoS markings but they will loose their markings when they cross any layer 3 device.
.
R1---R2--trunk--sw1-----trunk-sw3-ip phone.
At which node should we perform mapping cos to dscp? Cos marking will travel over the trunk link. to Sw1. Can Sw1 map the cos to Dscp and send it over trunk port to R2 ? Can Sw1 retain COS value and let R2 map the Cos to Dscp before sending it to R1?
In between can a router map cos value to dscp value and vice versa ?
thanks and have a good evening.
07-03-2012 05:17 AM
The switches will calulate both COS and DSCP values, for example if you trust the COS value on a port it will also calculate the respective DSCP value based on the COS-to-DSCP mapping and in the same way if you trust the DSCP value it will calulate the respective COS value based on the DSCP-to COS map.
On the route we can configure using MQC - class maps and policy maps- with class map you can either match the incomming packets based on COS or based on DSCP not on both at the same time, for example
class-map match any voice
cos 5
or
class-map match any voice
dscp 46
Then you can use a policymap and set the value for the outgoing packets
policy-map qos
class-map match-any Platinum-Voice
priority percent 20
set ip dscp ef
At which node should we perform mapping cos to dscp?
Router and switches
Cos marking will travel over the trunk link. to Sw1. Can Sw1 map the cos to Dscp and send it over trunk port to R2 ?
Yes
Can Sw1 retain COS value and let R2 map the Cos to Dscp before sending it to R1?
Routers can map cos to DSCP and vice versa, so it depends where you want to perform the conversion and it really doesn't matter.
The only requirement is QoS needs to be a end to end configuration.
Siddhartha
07-03-2012 08:48 PM
Siddartham
Please correct me if ia m wrong. policy maps for incoming packets are evaluated first before routing.
On the route we can configure using MQC - class maps and policy maps- with class map you can either match the incomming packets based on COS or based on DSCP not on both at the same time, for example
class-map match any voice
cos 5
or
class-map match any voice
dscp 46
Let say we identify the an incoming packet using above policy map on a router. . Lets call this packet packt1. After we identify the pack1 we use " set" command to change DSCP value say to 45. Router now perform QOS on pack1 using this new DSCP value by placing it in priority queue for ingress port. Is it correct?
thanks.
07-04-2012 04:02 AM
Hi Sarah,
i aint Sidd thou!
this is the QoS chart on most of the devices, but note that this could be slightly different in different routers or switches:
Ingress Traffic ----> Classify ---> Policer ----> Marker (Set Cos) ----> Normal / Priority Queue ---> to the egress point
so its a Yes to what you said
HTH,
Soroush.
07-04-2012 10:03 AM
Hi Sarah,
i aint Sidd thou!
I agree with Soroush's explanation in his post.
For routers you can define different calss maps and policy maps for different directions,
for example
Class-map in_G0/0
Policy-map in_G0/0
class-map out_G0/0
policy-map out_G0/0
class-map in_S0/0
policy-map in_S0/0
class-map out_S0/0
policy-map out_S0/0
Siddhartha
07-04-2012 10:18 AM
Hi Soroushm
I already posted this question but still did not understand it.
I hope you can help me sort out this:
Sw1-f1/1-------------------Ip phone
|
|
PC
Int f1/1
switchport acess vlan 22
switchport voice vlan 24.
1) My book says this command tells ip phone to use native vlan 22 ( also called data vlan) and vlan 24 for voip frames.
ip phone will send pc data without any tag and hence the word native vlan
Is this correct?
2) If we use " switchport voice vlan dot1p" the switch tells ip phone to use vlan 0 for voip traffic and use native vlan ( which is vlan 22) for PC.
My question is since we are using vlan 0 for voip, it should be used for voip throughout switched network for example:
Ip phone1-----sw1--------sw2------ipphone2
| |
PC PC
If we use " switchport voice vlan dot1p" on sw2, voip frames will be sent in vlan 0 by iphone2 to sw2. If ipphone2 has to communicate with iphone1 and they are on same subnet, then should ipphone1 be on vlan 0 as well?( that means we must also configure SW1 with " switchport voice vlan dot1p")
3) If we use " switchport voice vlan untagged" on sw2, my book says both voip and pc data are sent using native vlan. then book also says COS bits still sent. This boggles my mind. When we use the option " untagged" the switch should not insert any dot1q tag . So without dot1q tag, how COS bits can still be carried?
=============================================================================
4) sw--------------ipphone
|
Pc
Let say we configure sw as:
int f1/1
switchport access vlan 2
switchport voice vlan 3
switchport priority extend cos 3
Ip phone will use native vlan2 for Pc which means no dot1q tag and vlan 3 for voip traffic. The last command tells ipphone to set COS value to 3 for frames received on its port connected to PC.
My question is what is the point as ip phone will send Pc 'frames using native vlan 2 to sw, without 8021q tag as a result , the cos value 3 can not be sent with PC data frames to SW.
If the above is true why should one use "switchport priority extend cos 3" command ?
Sorry for this long winded post. I am almost done with my book, three more chapters to go .I am planing to take switch exam in August.
thanks and happy 4 th of july if you are in states.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide