# dscp marking

**URL:** <https://community.f5.com/t/dscp-marking/38338>\
**Category:** Technical Forums\
**Tags:** dev, irules, devops, application-delivery\
**Created:** [February 1, 2010, 8:43am UTC](https://community.f5.com/t/dscp-marking/38338 "2010-02-01T08:43:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ozgur\_guler\_344](https://avatars.discourse-cdn.com/v4/letter/o/8491ac/32.png) [@ozgur\_guler\_344](https://community.f5.com/u/ozgur_guler_344)\
**Post date:** [February 1, 2010, 8:43am UTC](https://community.f5.com/t/dscp-marking/38338/1 "2010-02-01T08:43:42Z")

</div>

Hello;

I want to mark dscp bit of the traffic originating from virtual server? How can i do that? Wtih an irule or on GUI?

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [February 1, 2010, 12:10pm UTC](https://community.f5.com/t/dscp-marking/38338/2 "2010-02-01T12:10:07Z")

</div>

Hi Ozgur,

I don’t believe there is a way to set this flag on a packet. You could contact F5 Support to confirm this and/or request an enhancement.

Aaron

---

<div class="post-metadata">

**Author:** ![Fred\_Wittenberg](https://avatars.discourse-cdn.com/v4/letter/f/919ad9/32.png) [@Fred\_Wittenberg](https://community.f5.com/u/Fred_Wittenberg)\
**Post date:** [November 17, 2016, 3:28pm UTC](https://community.f5.com/t/dscp-marking/38338/3 "2016-11-17T15:28:47Z")

</div>

Realize this is quite dated but I just had to do this for a customer. To set the value to say CS2 you would perform the following:

iptables -t mangle -A OUTPUT -j DSCP --set-dscp-class CS2

NOTE: This change will not persist through reboots. you will need to run iptables-save or use a iptables config such as this

\*mangle :PREROUTING ACCEPT [0:0] :OUTPUT ACCEPT [0:0]

Add CS2 Marker

-A OUTPUT -j DSCP --set-dscp-class CS2 COMMIT \*nat :PREROUTING ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] :OUTPUT ACCEPT [0:0] COMMIT
