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...
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... ,S f쥤)+-喚L)쉳Y슍=jya뛴쥤f쬿_)fj얎?빁s뻃텫빁듺
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/
박정은 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/
-----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/