All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Tc - Class HTB - Filter u32 - Match ip dport
@ 2003-10-08 13:59 Somesh Banerji
  2003-10-08 14:05 ` AW: " Jan Gerritsen
  0 siblings, 1 reply; 2+ messages in thread
From: Somesh Banerji @ 2003-10-08 13:59 UTC (permalink / raw)
  To: lartc

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* AW: [LARTC] Tc - Class HTB - Filter u32 - Match ip dport
  2003-10-08 13:59 [LARTC] Tc - Class HTB - Filter u32 - Match ip dport Somesh Banerji
@ 2003-10-08 14:05 ` Jan Gerritsen
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Gerritsen @ 2003-10-08 14:05 UTC (permalink / raw)
  To: lartc

Hi,

>  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>

This log shows that you are using Passive FTP

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

now you put up a rule for sport 20.
Passiv FTP does not use sport 20, it uses any port > 1024, 
only "active" FTP uses port 20 as sport for data transfare,..

Jan Gerritsen
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿË\x01\x14™¨¥Šx%ŠË\x7f,\x04S\vùšŠYšŸ÷lõ¯ç–^[m§ÿÿ™¨¥™©ÿvÏZşy\x7f™¨¥™©ÿ–+-ŠwèşV«µÁÎY3ÿ†Ûiÿÿåj»\şŠà

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-08 14:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-08 13:59 [LARTC] Tc - Class HTB - Filter u32 - Match ip dport Somesh Banerji
2003-10-08 14:05 ` AW: " Jan Gerritsen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.