ctinfo action in tc(8) Linux ctinfo action in tc(8) (NAME) tc-ctinfo - connmark tc (SYNOPSIS) tc ... action ctinfo [ dscp MASK [STATEMASK] ] [ cpmark [MASK] ] [ zone ZONE ] [ CONTROL ] [ index ] (DESCRIPTION) CTINFO ( Conntrack Information ) tc (conntrack marks) . . DSCP DSCP connmark diffserv IPv4/v6 . connmark . DSCP (ingress) qdisc CAKE . (bleach) (remap) . CPMARK ( copymark) connmark (mark) . connmark . connmark . DSCP CPMARK . (tc -s) DSCP CPMARK set . DSCP diffserv . (PARAMETERS) DSCP: mask DSCP (conntrack mark) . . mask . statemask conntrack mark . statemask mask . DSCP AND conntrack mark statemask . statemask . CPMARK: mask AND conntrack mark mask (mark) . 0xffffffff . mask . : zone (zone) conntrack . zone . 0 . CONTROL qdisc . reclassify . pipe . drop (drop) . shot drop continue . pass qdisc . . index (index) . index . (EXAMPLES) DSCP (ingress) IFB : # IFB tc qdisc add dev ifb4eth0 handle ffff: ingress # qdisc CAKE tc qdisc add dev ifb4eth0 root cake bandwidth 40mbit # (UP) ip link set dev ifb4eth0 up # : ctinfo dscp mirred IFB tc filter add dev eth0 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action ctinfo dscp 0xfc000000 0x01000000 mirred egress redirect dev ifb4eth0 tc -s qdisc show dev eth0 ingress filter parent ffff: protocol all pref 10 u32 chain 0 filter parent ffff: protocol all pref 10 u32 chain 0 fh 800: ht divisor 1 filter parent ffff: protocol all pref 10 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1 not_in_hw match 00000000/00000000 at 0 action order 1: ctinfo zone 0 pipe index 2 ref 1 bind 1 dscp 0xfc000000 0x01000000 installed 72 sec used 0 sec DSCP set 1333 error 0 CPMARK set 0 Action statistics: Sent 658484 bytes 1833 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 action order 2: mirred (Egress Redirect to device ifb4eth0) stolen index 1 ref 1 bind 1 installed 72 sec used 0 sec Action statistics: Sent 658484 bytes 1833 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 DSCP (egress) : iptables iptables << >> (CPU) . # DSCP # statemask connmark iptables -t mangle -A POSTROUTING -o eth0 -m connmark --mark 0x00000000/0x01000000 -g CLASS_MARKING_CHAIN # DSCP tc filter add dev eth0 protocol all prio 10 u32 match u32 0 0 flowid 1:1 action ctinfo dscp 0xfc000000 0x01000000 tc -s filter show dev eth0 filter parent 800e: protocol all pref 10 u32 chain 0 filter parent 800e: protocol all pref 10 u32 chain 0 fh 800: ht divisor 1 filter parent 800e: protocol all pref 10 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:1 not_in_hw match 00000000/00000000 at 0 action order 1: ctinfo zone 0 pipe index 1 ref 1 bind 1 dscp 0xfc000000 0x01000000 installed 7414 sec used 0 sec DSCP set 53404 error 0 CPMARK set 0 Action statistics: Sent 32890260 bytes 120441 pkt (dropped 0, overlimits 0 requeues 0) backlog 0b 0p requeues 0 (SEE ALSO) tc(8), tc-cake(8), tc-connmark(8), tc-mirred(8) (AUTHORS) ctinfo Kevin Darbyshire-Bryant . iproute2 4 Jun 2019 ctinfo action in tc(8)