On Sunday 23 November 2003 03:38, raz@zazone.net wrote:> Hi,
>
> It seems I can''t sort this thing out:
>
> the same tc filter rule works ok when using u32 classifier with ip src
> x.x.x.x but it doesn''t work when substituting src with dst...
the same
> exact rule....
>
> and for patient people here is the proof:
>
> -----------------------------
> tc filter add dev eth1 parent 1: protocol ip prio 3 u32 match ip src
> 80.97.88.16/28 flowid 1:11
>
> tc -s -d class show dev eth1
>
> class htb 1:11 parent 1:1 prio 0 quantum 1000 rate 64Kbit ceil 512Kbit
> burst 1680b/8 mpu 0b cburst 2254b/8 mpu 0b level 0
> Sent 1003576 bytes 5017 pkts (dropped 0, overlimits 0)
> rate 2937bps 21pps
> lended: 5012 borrowed: 5 giants: 0
> tokens: 163300 ctokens: 27588
>
> -------------------------------------
> tc filter add dev eth1 parent 1: protocol ip prio 3 u32 match ip dst
> 80.97.88.16/28 flowid 1:11
>
> tc -s -d class show dev eth1
>
> class htb 1:11 parent 1:1 prio 0 quantum 1000 rate 64Kbit ceil 512Kbit
> burst 1680b/8 mpu 0b cburst 2254b/8 mpu 0b level 0
> Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
> lended: 0 borrowed: 0 giants: 0
> tokens: 168099 ctokens: 28187
That''s very logic to me. You are doing this on the same interface.
That
means that you can not have packets with the same dst and src. So if
80.97.88.16/28 is a network connected to eth1 your packets leaving eth1 will
have dst 80.97.88.16/28. If you want to match the packets comming from
80.97.88.16/28, you have to use src 80.97.88.16/28 but on an other interface
where they leave your box, and that''s not eth1.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.openprojects.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/