---
name: "firehol-dscp"
section: "5"
platform: "linux"
package: "firehol-doc"
version: "3.1.8+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/firehol-dscp"
---

# firehol-dscp(5)

set the DSCP field in the packet header

## NAME

firehol-dscp - set the DSCP field in the packet header

## SYNOPSIS

dscp { *value* \| class *classid* } *chain* *rule-params*

## DESCRIPTION

The `dscp` helper command sets the DSCP field in the header of packets traffic, to allow QoS shaping.

**Note**

There is also a `dscp` parameter which allows matching DSCP values within individual rules (see [firehol-params(5)](/firehol-params/5.md)).

Set *value* to a decimal or hexadecimal (0xnn) number to set an explicit DSCP value or use `class` *classid* to use an [iptables(8)](/iptables/8.md) DiffServ class, such as EF, BE, CSxx or AFxx (see `iptables -j DSCP --help` for more information).

The *chain* will be used to find traffic to mark. It can be any of the [iptables(8)](/iptables/8.md) built in chains belonging to the `mangle` table. The chain names are: INPUT, FORWARD, OUTPUT, PREROUTING and POSTROUTING. The names are case-sensitive.

The *rule-params* define a set of rule parameters to match the traffic that is to be marked within the chosen chain. See [firehol-params(5)](/firehol-params/5.md) for more details.

Any `dscp` commands will affect all traffic matched. They must be declared before the first router or interface.

## EXAMPLES

-

  ```
   # set DSCP field to 32, packets sent by the local machine
   dscp 32 OUTPUT
   # set DSCP field to 32 (hex 20), packets routed by the local machine
   dscp 0x20 FORWARD
   # set DSCP to DiffServ class EF, packets routed by the local machine
   #              and destined for port TCP/25 of 198.51.100.1
   dscp class EF FORWARD proto tcp dport 25 dst 198.51.100.1
  ```

## SEE ALSO

- •

  [firehol(1)](/firehol/1.md) - FireHOL program

- •

  [firehol.conf(5)](/firehol.conf/5.md) - FireHOL configuration

- •

  [firehol-params(5)](/firehol-params/5.md) - optional rule parameters

- •

  [iptables(8)](/iptables/8.md) ⟨http://ipset.netfilter.org/iptables.man.html⟩\\c  - administration tool for IPv4 firewalls

- •

  [ip6tables(8)](/ip6tables/8.md) ⟨http://ipset.netfilter.org/ip6tables.man.html⟩\\c  - administration tool for IPv6 firewalls

- •

  [ip(8)](/ip/8.md) - show / manipulate routing, devices, policy routing and tunnels

- •

  FireHOL Website ⟨http://firehol.org/⟩\\c

- •

  FireHOL Online PDF Manual ⟨http://firehol.org/firehol-manual.pdf⟩\\c

- •

  FireHOL Online Documentation ⟨http://firehol.org/documentation/⟩\\c

- •

  Linux Advanced Routing & Traffic Control HOWTO ⟨http://lartc.org/howto/⟩\\c

## AUTHORS

FireHOL Team.
