All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] 'sport' is good but 'dport'?
@ 2002-10-11  1:04 박정은
  2002-10-11  1:13 ` 박정은
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: 박정은 @ 2002-10-11  1:04 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 1560 bytes --]

hi all

I just tried to test whether the HTB works well or not .. (policy is very simple ^^;;)

I tried HTB simulator 'Ethloop' with lo (loopback ) and I found HTB works well....(very well)

So I changed lo to eth0  and tested ..

./tc qdisc add dev eth0 root handle 1: htb default 10
./tc class add dev eth0 parent 1: classid 1:1 htb rate 500kbps ceil 500kbps
./tc class add dev eth0 parent 1:1 classid 1:2 htb rate 180kbps ceil 500kbps
./tc class add dev eth0 parent 1:2 classid 1:10 htb rate 150kbps ceil 500kbps prio 2
./tc class add dev eth0 parent 1:2 classid 1:11 htb rate 5kbps ceil 10kbps prio 2
./tc class add dev eth0 parent 1:1 classid 1:12 htb rate 10kbps ceil 20kbps prio 1
./tc qdisc add dev eth0 parent 1:10 handle 20: pfifo limit 5
./tc qdisc add dev eth0 parent 1:11 handle 30: pfifo limit 5
./tc qdisc add dev eth0 parent 1:12 handle 40: sfq perturb 10

./tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 23 0xffff flowid 1:11
./tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 80 0xffff flowid 1:12

 It works well with outgoing packets ..  

 BUT!!   

  I changed last two lines to control Incoming packets .. like below..
./tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 23 0xfffe flowid 1:11
./tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 80 0xfffe flowid 1:12

It never works .. !!   If I send to 23 port 50kbps  It receive 50kbps.. I have no idea ..  

Did I thought wrong?    

thanks in advance...


[-- Attachment #2: Type: text/html, Size: 2744 bytes --]

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

* [LARTC] 'sport' is good but 'dport'?
  2002-10-11  1:04 [LARTC] 'sport' is good but 'dport'? 박정은
@ 2002-10-11  1:13 ` 박정은
  2002-10-11 10:42 ` Stef Coene
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: 박정은 @ 2002-10-11  1:13 UTC (permalink / raw)
  To: lartc

aGkgYWxsDQoNCkkganVzdCB0cmllZCB0byB0ZXN0IHdoZXRoZXIgdGhlIEhUQiB3b3JrcyB3ZWxs
IG9yIG5vdCAuLiAocG9saWN5IGlzIHZlcnkgc2ltcGxlIF5eOzspDQoNCkkgdHJpZWQgSFRCIHNp
bXVsYXRvciAnRXRobG9vcCcgd2l0aCBsbyAobG9vcGJhY2sgKSBhbmQgSSBmb3VuZCBIVEIgd29y
a3Mgd2VsbC4uLi4odmVyeSB3ZWxsKQ0KDQpTbyBJIGNoYW5nZWQgbG8gdG8gZXRoMCAgYW5kIHRl
c3RlZCAuLg0KDQouL3RjIHFkaXNjIGFkZCBkZXYgZXRoMCByb290IGhhbmRsZSAxOiBodGIgZGVm
YXVsdCAxMA0KLi90YyBjbGFzcyBhZGQgZGV2IGV0aDAgcGFyZW50IDE6IGNsYXNzaWQgMToxIGh0
YiByYXRlIDUwMGticHMgY2VpbCA1MDBrYnBzDQouL3RjIGNsYXNzIGFkZCBkZXYgZXRoMCBwYXJl
bnQgMToxIGNsYXNzaWQgMToyIGh0YiByYXRlIDE4MGticHMgY2VpbCA1MDBrYnBzDQouL3RjIGNs
YXNzIGFkZCBkZXYgZXRoMCBwYXJlbnQgMToyIGNsYXNzaWQgMToxMCBodGIgcmF0ZSAxNTBrYnBz
IGNlaWwgNTAwa2JwcyBwcmlvIDINCi4vdGMgY2xhc3MgYWRkIGRldiBldGgwIHBhcmVudCAxOjIg
Y2xhc3NpZCAxOjExIGh0YiByYXRlIDVrYnBzIGNlaWwgMTBrYnBzIHByaW8gMg0KLi90YyBjbGFz
cyBhZGQgZGV2IGV0aDAgcGFyZW50IDE6MSBjbGFzc2lk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QgdG8gMjMgcG9ydCA1MGticHMgIEl0IHJlY2VpdmUgNTBrYnBz
Li4gSSBoYXZlIG5vIGlkZWEgLi4gIA0KDQpEaWQgSSB0aG91Z2h0IHdyb25nPyAgICANCg0KdGhh
bmtzIGluIGFkdmFuY2UuLi4NCg0K

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] 'sport' is good but 'dport'?
  2002-10-11  1:04 [LARTC] 'sport' is good but 'dport'? 박정은
  2002-10-11  1:13 ` 박정은
@ 2002-10-11 10:42 ` Stef Coene
  2002-10-11 13:52 ` Michael T. Babcock
  2002-10-11 13:54 ` Robert Penz
  3 siblings, 0 replies; 5+ messages in thread
From: Stef Coene @ 2002-10-11 10:42 UTC (permalink / raw)
  To: lartc

On Sunday 13 October 2002 03:20, ¹ÚÁ¤Àº wrote:
> hi all
> 
> I just tried to test whether the HTB works well or not .. (policy is very
> simple ^^;;)
 
> I tried HTB simulator 'Ethloop' with lo (loopback ) and I found HTB works
> well....(very well)
 
> So I changed lo to eth0  and tested ..
> 
> ./tc qdisc add dev eth0 root handle 1: htb default 10
> ./tc class add dev eth0 parent 1: classid 1:1 htb rate 500kbps ceil
> 500kbps
 ./tc class add dev eth0 parent 1:1 classid 1:2 htb rate 180kbps
> ceil 500kbps ./tc class add dev eth0 parent 1:2 classid 1:10 htb rate
> 150kbps ceil 500kbps prio 2 ./tc class add dev eth0 parent 1:2 classid 1:11
> htb rate 5kbps ceil 10kbps prio 2 ./tc class add dev eth0 parent 1:1
> classid 1:12 htb rate 10kbps ceil 20kbps prio 1 ./tc qdisc add dev eth0
> parent 1:10 handle 20: pfifo limit 5
> ./tc qdisc add dev eth0 parent 1:11 handle 30: pfifo limit 5
> ./tc qdisc add dev eth0 parent 1:12 handle 40: sfq perturb 10
> 
> ./tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport
> 23 0xffff flowid 1:11
 ./tc filter add dev eth0 protocol ip parent 1:0 prio
> 1 u32 match ip sport 80 0xffff flowid 1:12 
>  It works well with outgoing packets ..  
> 
>  BUT!!   
> 
>   I changed last two lines to control Incoming packets .. like below..
> ./tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport
> 23 0xfffe flowid 1:11
 ./tc filter add dev eth0 protocol ip parent 1:0 prio
> 1 u32 match ip dport 80 0xfffe flowid 1:12 
> It never works .. !!   If I send to 23 port 50kbps  It receive 50kbps.. I
> have no idea ..  
 
> Did I thought wrong?    
Yes :)

You can only shape outgoing packets.  If you want to shape incoming packets, 
you can use policers or the imq device.  

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] 'sport' is good but 'dport'?
  2002-10-11  1:04 [LARTC] 'sport' is good but 'dport'? 박정은
  2002-10-11  1:13 ` 박정은
  2002-10-11 10:42 ` Stef Coene
@ 2002-10-11 13:52 ` Michael T. Babcock
  2002-10-11 13:54 ` Robert Penz
  3 siblings, 0 replies; 5+ messages in thread
From: Michael T. Babcock @ 2002-10-11 13:52 UTC (permalink / raw)
  To: lartc

박정은 wrote:

>It never works .. !!   If I send to 23 port 50kbps  It receive 50kbps.. I have no idea ..  
>
>Did I thought wrong?    
>  
>
You should read the FAQ / HOWTO again; it mentions that you can only 
shape outgoing packets for a variety of reasons.  You can limit incoming 
packets to some degree (not as well controlled, and somewhat pointless 
in some cases) by dropping the packets you don't want however, with the 
ingress filter.

-- 
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] 'sport' is good but 'dport'?
  2002-10-11  1:04 [LARTC] 'sport' is good but 'dport'? 박정은
                   ` (2 preceding siblings ...)
  2002-10-11 13:52 ` Michael T. Babcock
@ 2002-10-11 13:54 ` Robert Penz
  3 siblings, 0 replies; 5+ messages in thread
From: Robert Penz @ 2002-10-11 13:54 UTC (permalink / raw)
  To: lartc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 11 October 2002 15:52, Michael T. Babcock wrote:
> You should read the FAQ / HOWTO again; it mentions that you can only
> shape outgoing packets for a variety of reasons.  You can limit incoming
> packets to some degree (not as well controlled, and somewhat pointless
> in some cases) by dropping the packets you don't want however, with the
> ingress filter.
or better use imq 
http://luxik.cdi.cz/~patrick/imq/index.html

- -- 
Regards,
Robert
- ----------------
Robert Penz
robert.penz AT outertech.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9ptgj8tTsQqJDUBMRAnO5AJ9muDj6cI9iZzgrbE2A/2Wzkz9z6gCfftLy
NCFV8+0M7VQ4ihL863QEeiA=
=dPfA
-----END PGP SIGNATURE-----

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

end of thread, other threads:[~2002-10-11 13:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-11  1:04 [LARTC] 'sport' is good but 'dport'? 박정은
2002-10-11  1:13 ` 박정은
2002-10-11 10:42 ` Stef Coene
2002-10-11 13:52 ` Michael T. Babcock
2002-10-11 13:54 ` Robert Penz

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.