[ previous ] [ next ] [ threads ]
 
 From:  "Michael" <zlinda1002 at cox dot net>
 To:  <m0n0wall at lists dot m0n0 dot ch>
 Subject:  Traffic shaping for cable modem
 Date:  Tue, 5 Dec 2006 18:15:21 -0700
I need some major help on how to configure traffic shaper. I have rules set
up now but they do NOT do what I want them to. I have read all faq (that are
available) on this list.

Here is my configuration:

FTP---M0N0WALL---wifi AP(dmz bridged)

World of Warcraft 3724
FTP			21
uTorrent		54759
NNTP			119

What I would like to achieve is for FTP to be priority over P2P-uTorrent,
and World of Warcraft latency to take priority over it all. 

I don't want latency to be dragged down by ftp or p2p apps while two World
of Warcraft games are going on.

uTorrent uses up to 16 upload streams at one time and maximum of 2 active
downloads at one time.
I am not sure how many download streams occur at one time but both the
upload and download can be configured with a source or destination mask?

My biggest problem is figuring out what to set the max download pipe at. 
I have a "adv." 12mb cable connection which as all know varies from
4.7mb-11900mb. 
If I put down a low number in the pipe it will criple my download when I do
have 11mb available. 

Below is what I have for the current rules:

- <shaper>
- <pipe>
  <bandwidth>935</bandwidth> 
  <descr>m_Total Upload</descr> 
  </pipe>
- <pipe>
  <bandwidth>9006</bandwidth> 
  <descr>m_Total Download</descr> 
  </pipe>
- <queue>
  <descr>m_High Priority #1 Upload</descr> 
  <targetpipe>0</targetpipe> 
  <weight>50</weight> 
  <mask>source</mask> 
  </queue>
- <queue>
  <descr>m_High Priority #2 Upload</descr> 
  <targetpipe>0</targetpipe> 
  <weight>30</weight> 
  <mask>source</mask> 
  </queue>
- <queue>
  <descr>m_High Priority #3 Upload</descr> 
  <targetpipe>0</targetpipe> 
  <weight>15</weight> 
  <mask>source</mask> 
  </queue>
- <queue>
  <descr>m_Bulk Upload</descr> 
  <targetpipe>0</targetpipe> 
  <weight>4</weight> 
  <mask>source</mask> 
  </queue>
- <queue>
  <descr>m_Hated Upload</descr> 
  <targetpipe>0</targetpipe> 
  <weight>1</weight> 
  <mask>source</mask> 
  </queue>
- <queue>
  <descr>m_Bulk Download</descr> 
  <targetpipe>1</targetpipe> 
  <weight>30</weight> 
  <mask>destination</mask> 
  </queue>
- <queue>
  <targetpipe>1</targetpipe> 
  <weight>1</weight> 
  <mask>destination</mask> 
  <descr>m_Hated Download</descr> 
  </queue>
- <queue>
  <descr>m_High Priority Download</descr> 
  <targetpipe>1</targetpipe> 
  <weight>60</weight> 
  <mask>destination</mask> 
  </queue>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  <port>54759</port> 
  </source>
- <destination>
  <any /> 
  </destination>
  <direction>in</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>m_P2P BitTorrent</descr> 
  <targetqueue>6</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  <port>54759</port> 
  </destination>
  <direction>in</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>m_P2P BitTorrent</descr> 
  <targetqueue>6</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  <port>54759</port> 
  </source>
- <destination>
  <any /> 
  </destination>
  <direction>out</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>m_P2P BitTorrent</descr> 
  <targetqueue>4</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  <port>54759</port> 
  </destination>
  <direction>out</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>m_P2P BitTorrent</descr> 
  <targetqueue>4</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  <port>6881-6999</port> 
  </source>
- <destination>
  <any /> 
  </destination>
  <direction>in</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>m_Blizzard Downloader</descr> 
  <targetqueue>6</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  <port>6881-6999</port> 
  </destination>
  <direction>in</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>m_Blizzard Downloader</descr> 
  <targetqueue>6</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  <port>6881-6999</port> 
  </source>
- <destination>
  <any /> 
  </destination>
  <direction>out</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>m_Blizzard Downloader</descr> 
  <targetqueue>4</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  <port>6881-6999</port> 
  </destination>
  <direction>out</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>m_Blizzard Downloader</descr> 
  <targetqueue>4</targetqueue> 
  </rule>
- <rule>
  <descr>m_Small Pkt Upload</descr> 
  <targetqueue>0</targetqueue> 
  <interface>wan</interface> 
  <direction>out</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  </destination>
  <iplen>0-100</iplen> 
  </rule>
- <rule>
  <descr>m_Outbound DNS Query</descr> 
  <targetqueue>0</targetqueue> 
  <interface>wan</interface> 
  <direction>out</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  <port>53</port> 
  </destination>
  <protocol>udp</protocol> 
  </rule>
- <rule>
  <descr>m_AH Upload</descr> 
  <targetqueue>0</targetqueue> 
  <interface>wan</interface> 
  <direction>out</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  </destination>
  <protocol>ah</protocol> 
  </rule>
- <rule>
  <descr>m_ESP Upload</descr> 
  <targetqueue>0</targetqueue> 
  <interface>wan</interface> 
  <direction>out</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  </destination>
  <protocol>esp</protocol> 
  </rule>
- <rule>
  <descr>m_GRE Upload</descr> 
  <targetqueue>0</targetqueue> 
  <interface>wan</interface> 
  <direction>out</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  </destination>
  <protocol>gre</protocol> 
  </rule>
- <rule>
  <descr>m_ICMP Upload</descr> 
  <targetqueue>1</targetqueue> 
  <interface>wan</interface> 
  <direction>out</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  </destination>
  <protocol>icmp</protocol> 
  </rule>
- <rule>
  <descr>m_TCP ACK Upload</descr> 
  <targetqueue>2</targetqueue> 
  <interface>wan</interface> 
  <direction>out</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  </destination>
  <iplen>0-80</iplen> 
  <protocol>tcp</protocol> 
  <tcpflags>ack</tcpflags> 
  </rule>
- <rule>
  <descr>m_Catch-All Upload</descr> 
  <targetqueue>3</targetqueue> 
  <interface>wan</interface> 
  <direction>out</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  </destination>
  </rule>
- <rule>
  <descr>m_ICMP Download</descr> 
  <targetqueue>7</targetqueue> 
  <interface>wan</interface> 
  <direction>in</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  </destination>
  <protocol>icmp</protocol> 
  </rule>
- <rule>
  <descr>m_Small Pkt Download</descr> 
  <targetqueue>7</targetqueue> 
  <interface>wan</interface> 
  <direction>in</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  </destination>
  <iplen>0-100</iplen> 
  </rule>
- <rule>
  <descr>m_AH Download</descr> 
  <targetqueue>7</targetqueue> 
  <interface>wan</interface> 
  <direction>in</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  </destination>
  <protocol>ah</protocol> 
  </rule>
- <rule>
  <descr>m_ESP Download</descr> 
  <targetqueue>7</targetqueue> 
  <interface>wan</interface> 
  <direction>in</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  </destination>
  <protocol>esp</protocol> 
  </rule>
- <rule>
  <descr>m_GRE Download</descr> 
  <targetqueue>7</targetqueue> 
  <interface>wan</interface> 
  <direction>in</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  </destination>
  <protocol>gre</protocol> 
  </rule>
- <rule>
  <descr>m_Catch-All Download</descr> 
  <targetqueue>5</targetqueue> 
  <interface>wan</interface> 
  <direction>in</direction> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  </destination>
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>udp</protocol> 
- <source>
  <any /> 
  <port>27000-27015</port> 
  </source>
- <destination>
  <any /> 
  </destination>
  <direction>out</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>Steam UDP</descr> 
  <targetqueue>0</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>udp</protocol> 
- <source>
  <any /> 
  <port>27000-27015</port> 
  </source>
- <destination>
  <any /> 
  </destination>
  <direction>in</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>Steam UDP</descr> 
  <targetqueue>7</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>udp</protocol> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  <port>27000-27015</port> 
  </destination>
  <direction>in</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>Steam UDP</descr> 
  <targetqueue>7</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>udp</protocol> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  <port>27000-27015</port> 
  </destination>
  <direction>out</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>Steam UDP</descr> 
  <targetqueue>0</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  <port>27030-27039</port> 
  </source>
- <destination>
  <any /> 
  </destination>
  <direction>out</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>Steam TCP</descr> 
  <targetqueue>0</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  <port>27030-27039</port> 
  </source>
- <destination>
  <any /> 
  </destination>
  <direction>in</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>Steam TCP</descr> 
  <targetqueue>7</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  <port>27030-27039</port> 
  </destination>
  <direction>in</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>Steam TCP</descr> 
  <targetqueue>7</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  <port>27030-27039</port> 
  </destination>
  <direction>out</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>Steam TCP</descr> 
  <targetqueue>0</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  <port>3724</port> 
  </source>
- <destination>
  <any /> 
  </destination>
  <direction>out</direction> 
  <iplen /> 
  <iptos>lowdelay</iptos> 
  <tcpflags /> 
  <descr>World of Warcraft</descr> 
  <targetqueue>0</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  <port>3724</port> 
  </destination>
  <direction>in</direction> 
  <iplen /> 
  <iptos>lowdelay</iptos> 
  <tcpflags /> 
  <descr>World of Warcraft</descr> 
  <targetqueue>7</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  <port>3724</port> 
  </source>
- <destination>
  <any /> 
  </destination>
  <direction>in</direction> 
  <iplen /> 
  <iptos>lowdelay</iptos> 
  <tcpflags /> 
  <descr>World of Warcraft</descr> 
  <targetqueue>7</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
  <protocol>tcp</protocol> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  <port>3724</port> 
  </destination>
  <direction>out</direction> 
  <iplen /> 
  <iptos>lowdelay</iptos> 
  <tcpflags /> 
  <descr>World of Warcraft</descr> 
  <targetqueue>0</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
- <source>
  <any /> 
  <port>6112-6119</port> 
  </source>
- <destination>
  <any /> 
  </destination>
  <direction>out</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>Blizzard Generic</descr> 
  <targetqueue>0</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  <port>6112-6119</port> 
  </destination>
  <direction>in</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>Blizzard Generic</descr> 
  <targetqueue>7</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
- <source>
  <any /> 
  <port>6112-6119</port> 
  </source>
- <destination>
  <any /> 
  </destination>
  <direction>in</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>Blizzard Generic</descr> 
  <targetqueue>7</targetqueue> 
  </rule>
- <rule>
  <interface>wan</interface> 
- <source>
  <any /> 
  </source>
- <destination>
  <any /> 
  <port>6112-6119</port> 
  </destination>
  <direction>out</direction> 
  <iplen /> 
  <iptos /> 
  <tcpflags /> 
  <descr>Blizzard Generic</descr> 
  <targetqueue>0</targetqueue> 
  </rule>
- <magic>
  <p2plow /> 
  <maskq /> 
  <maxup>90</maxup> 
  <maxdown>490</maxdown> 
  </magic>
  </shaper>