Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Somesh Banerji <somesh@hclcomnet.co.in>
To: lartc@vger.kernel.org
Subject: [LARTC] Tc - Class HTB - Filter u32 - Match ip dport
Date: Wed, 08 Oct 2003 13:59:52 +0000	[thread overview]
Message-ID: <marc-lartc-106562110431418@msgid-missing> (raw)

My setup....

 [A]FTP Server  ----> [B]QOS Server ----> [C]Host

What I want to do.....

 Setup a HTB class for 32kbps with a u32 filter to match a Destination IP.

I get a perfect result for a ftp `get' on [C].

  ftp> get test
  local: test remote: test
  227 Entering Passive Mode (203,200,72,102,12,231)
  150 Opening BINARY mode data connection for test (1025830 bytes).
  ##############################################################
  ########...................################
  226 Transfer complete.
  1025830 bytes received in 262 secs (3.8 Kbytes/sec)
  ftp>

The working cfg on [B] is as under...
 
 tc qdisc add dev eth0 root handle 10: htb 
 tc class add dev eth0 parent 10 classid 10:10 htb rate 32kbit ceil 32kbit
 tc filter add dev eth0 parent 10: protocol ip prio 100 u32 match ip dst
203.200.72.91 flowid 10:10

But download becomes out of control when I delete, just the filter to
replace it with...

 tc filter add dev eth0 parent 10: protocol ip prio 100 u32 match ip sport
20 0xffff flowid 10:10

                       ---OR---

 any sport/dport with a valu of 20,21,22 14,15,16 0014,0015,0016

  
When the test setup & the test procedure is the same. 
It should work for the Protocol if it worked for the IP

!!!What could be wrong!!!!

  I only change from `u32 match ip dst 203.200.72.91' to 'u32 match ip
<sport|dport> <ftp-ports> 0xffff'
  I tried with all known <ftp-ports> as `sport' & `dport' both in decimal &
Hex.

Regards,

Somesh Banerji
Sr. Engineer
HCL Comnet System & Services
NOIDA U.P. INDIA       
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

             reply	other threads:[~2003-10-08 13:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-08 13:59 Somesh Banerji [this message]
2003-10-08 14:05 ` AW: [LARTC] Tc - Class HTB - Filter u32 - Match ip dport Jan Gerritsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-106562110431418@msgid-missing \
    --to=somesh@hclcomnet.co.in \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox