As an example, I just setup an outbound iptables rule for Skype traffic to ensure it lands in the diffserv3 Voice tin. I set those packets as EF (Expedited Forwarding).
iptables -t mangle -A POSTROUTING -o eth0 -p udp -m multiport --dports 3478:3481 -j DSCP --set-dscp-class EF
Dear Dave14305,
Just curious, would you care clarifying what you did (rules on router OR rules on the device that generates the traffic ?) and which results you observed (actual packets in the target tin, as evidenced by tc -s qdisc) ?
I experimented with this myself. I could only direct traffic to a specific diffserv tin of the router if I defined the rules
on the Linux laptop that was generating the traffic. So, long before the processing of the packets in the router. When I had the iptables rules
on the router itself, it was not changing the receiving tin in diffserv in the router. Based on what I read and partly understood, there is a challenge in the "timing" of the processing between those rules and cake. (
https://forum.openwrt.org/t/ultimate-sqm-settings-layer-cake-dscp-marks-new-script/53209 ,
https://github.com/hisham2630/Ultim...SCP-marks-New-Script/blob/master/DSCP-ipv4.sh )
Below example of code I used. It was not meant to produce any real-life benefit. It was first meant to brutally test and understand how it worked
Code:
sudo iptables -t mangle --new-chain dscp_mark
sudo iptables -t mangle --flush dscp_mark
sudo iptables -t mangle -n --list
sudo iptables -t mangle --append POSTROUTING -j dscp_mark
sudo iptables -t mangle --append dscp_mark -p UDP -j DSCP --set-dscp-class AF41
While we are at it, for anyone's information, in my setup, although cake seemed to work fine overall, the statistics didn't always show clear performance differences between the lower priority tins (e.g. 1 or 2) vs the higher priority tins (e.g. 6 or 7). I mean some low priority tins with significant traffic had better (lower) pk_delay and av_delay than higher priority tins with significant traffic. (I emphasize "significant traffic" because a tin with only little traffic could have an irrelevant average, so to say). This might simply be a sign that there is little to no saturation on my line. It made me accept the simple "besteffort" approach.
Regarding the choice of RMerlin to use diffserv3, I can report that my Gigaset VoIP equipment does indeed tag traffic with DSCP. If memory serves, it was with "EF".
Fun fact regarding DSCP: NTP servers seem to be very creative at using the most exotic DSCP tags. Cisco apps like Webex and Jabber on Android seemed to properly tag traffic with AF41. Windows client will generally not generate tags, unless you mess with Windows GPOs. Whatsapp on Android would be rogue enough to use CS6 which is supposed to be for "Network Control" AFAIU.
Thank you to RMerlin, ttgapers, JackYazz and all members of this wonderful community.
Take care
W.