<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic linux traffic shaping in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/linux-traffic-shaping/m-p/3875822#M84310</link>
    <description>Hi all, &lt;BR /&gt;I am very new to traffic control. &lt;BR /&gt;I read the lartc howto and I am curently using the script in ch15 (cookbook) with some restrictions: &lt;BR /&gt;I excluded the ingress section and i implemented the rest on both interfaces of my firewall.(eth0 the internet interface and eth1 the LAN interface)all i need is to separate between ssh and other traffic with ssh hghi priority.find below the script use on eth1 &lt;BR /&gt;(ssh priority one and all other 2) &lt;BR /&gt;##################################### Egress on eth1:the LAN interface ####################################### &lt;BR /&gt;&lt;BR /&gt;DEV=eth1 &lt;BR /&gt;&lt;BR /&gt;# install root HTB, point default traffic to 1:20 &lt;BR /&gt;$TC qdisc add dev $DEV root handle 1: htb default 20 &lt;BR /&gt;# shape everything at $UPLINK speed - this prevents huge queues in your DSL modem which destroy latency: &lt;BR /&gt;$TC class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit burst 6k &lt;BR /&gt;# high prio class 1:10: &lt;BR /&gt;$TC class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit burst 6k prio 1 &lt;BR /&gt;# bulk &amp;amp; default class 1:20 - gets slightly less traffic and a lower priority: &lt;BR /&gt;$TC class add dev $DEV parent 1:1 classid 1:20 htb rate 64kbit ceil ${UPLINK}kbit burst 3k prio 2 &lt;BR /&gt;&lt;BR /&gt;# both get Stochastic Fairness: &lt;BR /&gt;$TC qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10 &lt;BR /&gt;$TC qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10 &lt;BR /&gt;&lt;BR /&gt;# TOS Minimum Delay (ssh, NOT scp) in 1:10: &lt;BR /&gt;$TC filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip tos 0x10 0xff flowid 1:10 &lt;BR /&gt;$TC filter add dev $DEV parent 1:0 protocol ip prio 1 u32 match ip dport 22 0xffff flowid 1:10 &lt;BR /&gt;$TC filter add dev $DEV parent 1:0 protocol ip prio 1 u32 match ip sport 22 0xffff flowid 1:10 &lt;BR /&gt;&lt;BR /&gt;# ICMP (ip protocol 1) in the interactive class 1:10 so we can do measurements &amp;amp; impress our friends: &lt;BR /&gt;$TC filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip protocol 1 0xff flowid 1:10 &lt;BR /&gt;&lt;BR /&gt;# To speed up downloads while an upload is going on, put ACK packets of the download in the interactive class: &lt;BR /&gt;$TC filter add dev $DEV parent 1: protocol ip prio 10 u32 \ &lt;BR /&gt;match ip protocol 6 0xff \ &lt;BR /&gt;match u8 0x05 0x0f at 0 \ &lt;BR /&gt;match u16 0x0000 0xffc0 at 2 \ &lt;BR /&gt;match u8 0x10 0xff at 33 \ &lt;BR /&gt;flowid 1:10 &lt;BR /&gt;&lt;BR /&gt;# rest is .non-interactive. ie .bulk. and ends up in 1:20 &lt;BR /&gt;################################################################################### &lt;BR /&gt;&lt;BR /&gt;the same on eth0 with DEV=eth0 &lt;BR /&gt;&lt;BR /&gt;I tried the script on my lab using one pc as firewall with 2 eth one connected to my lan and the athor to a pc simulated as internet and everything worked fine. &lt;BR /&gt;When implemented on my real fw connected to the internet I didn't get the desired result that i got in the test.(the ssh or scp doesn't get the 1rst priority ....) &lt;BR /&gt;I am somewhat confused .Please any help? &lt;BR /&gt;&lt;BR /&gt;Regards &lt;BR /&gt;</description>
    <pubDate>Fri, 06 Oct 2006 09:00:34 GMT</pubDate>
    <dc:creator>linuxtolinux</dc:creator>
    <dc:date>2006-10-06T09:00:34Z</dc:date>
    <item>
      <title>linux traffic shaping</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-traffic-shaping/m-p/3875822#M84310</link>
      <description>Hi all, &lt;BR /&gt;I am very new to traffic control. &lt;BR /&gt;I read the lartc howto and I am curently using the script in ch15 (cookbook) with some restrictions: &lt;BR /&gt;I excluded the ingress section and i implemented the rest on both interfaces of my firewall.(eth0 the internet interface and eth1 the LAN interface)all i need is to separate between ssh and other traffic with ssh hghi priority.find below the script use on eth1 &lt;BR /&gt;(ssh priority one and all other 2) &lt;BR /&gt;##################################### Egress on eth1:the LAN interface ####################################### &lt;BR /&gt;&lt;BR /&gt;DEV=eth1 &lt;BR /&gt;&lt;BR /&gt;# install root HTB, point default traffic to 1:20 &lt;BR /&gt;$TC qdisc add dev $DEV root handle 1: htb default 20 &lt;BR /&gt;# shape everything at $UPLINK speed - this prevents huge queues in your DSL modem which destroy latency: &lt;BR /&gt;$TC class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit burst 6k &lt;BR /&gt;# high prio class 1:10: &lt;BR /&gt;$TC class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit burst 6k prio 1 &lt;BR /&gt;# bulk &amp;amp; default class 1:20 - gets slightly less traffic and a lower priority: &lt;BR /&gt;$TC class add dev $DEV parent 1:1 classid 1:20 htb rate 64kbit ceil ${UPLINK}kbit burst 3k prio 2 &lt;BR /&gt;&lt;BR /&gt;# both get Stochastic Fairness: &lt;BR /&gt;$TC qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10 &lt;BR /&gt;$TC qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10 &lt;BR /&gt;&lt;BR /&gt;# TOS Minimum Delay (ssh, NOT scp) in 1:10: &lt;BR /&gt;$TC filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip tos 0x10 0xff flowid 1:10 &lt;BR /&gt;$TC filter add dev $DEV parent 1:0 protocol ip prio 1 u32 match ip dport 22 0xffff flowid 1:10 &lt;BR /&gt;$TC filter add dev $DEV parent 1:0 protocol ip prio 1 u32 match ip sport 22 0xffff flowid 1:10 &lt;BR /&gt;&lt;BR /&gt;# ICMP (ip protocol 1) in the interactive class 1:10 so we can do measurements &amp;amp; impress our friends: &lt;BR /&gt;$TC filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip protocol 1 0xff flowid 1:10 &lt;BR /&gt;&lt;BR /&gt;# To speed up downloads while an upload is going on, put ACK packets of the download in the interactive class: &lt;BR /&gt;$TC filter add dev $DEV parent 1: protocol ip prio 10 u32 \ &lt;BR /&gt;match ip protocol 6 0xff \ &lt;BR /&gt;match u8 0x05 0x0f at 0 \ &lt;BR /&gt;match u16 0x0000 0xffc0 at 2 \ &lt;BR /&gt;match u8 0x10 0xff at 33 \ &lt;BR /&gt;flowid 1:10 &lt;BR /&gt;&lt;BR /&gt;# rest is .non-interactive. ie .bulk. and ends up in 1:20 &lt;BR /&gt;################################################################################### &lt;BR /&gt;&lt;BR /&gt;the same on eth0 with DEV=eth0 &lt;BR /&gt;&lt;BR /&gt;I tried the script on my lab using one pc as firewall with 2 eth one connected to my lan and the athor to a pc simulated as internet and everything worked fine. &lt;BR /&gt;When implemented on my real fw connected to the internet I didn't get the desired result that i got in the test.(the ssh or scp doesn't get the 1rst priority ....) &lt;BR /&gt;I am somewhat confused .Please any help? &lt;BR /&gt;&lt;BR /&gt;Regards &lt;BR /&gt;</description>
      <pubDate>Fri, 06 Oct 2006 09:00:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-traffic-shaping/m-p/3875822#M84310</guid>
      <dc:creator>linuxtolinux</dc:creator>
      <dc:date>2006-10-06T09:00:34Z</dc:date>
    </item>
  </channel>
</rss>

