Skip to contentSkip to conversation

hbt doubt

LARTC James Lista 3 participants 3 messages Nov 26, 2004

lore
Share & tools
lore
#1 lore raw
Quoted 4 lines · James Lista

please, what do those 2 following lines do ? mainly that "drop flowid :1" ?

tc qdisc add dev $WAN handle ffff: ingress

tells the kernel that it should be ready to do ingress filtering on device $WAN (well, actually it is called policing not filtering, because ingress' functionality is limited)

Quoted 2 lines

tc filter add dev $WAN parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1

the aforementioned ingress policy should match all ip packets, rate limit them to ${DOWNLINK} kbit/s with a 10k burst, and overlimits should be dropped. The flowid :1 is in my guess necessary in order for "tc" to accept the filter, but doesn't have any practical effect because ingress can't do classful stuff.

Bye,

Peter Surda (Shurdeek) <[email protected]>, ICQ 10236103, +436505122023

Signature · 4 lines
                   Press every key to continue.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#2 lore raw
In reply to James Lista
Quoted 7 lines · James Lista

please, what do those 2 following lines do ? mainly that "drop flowid :1" ?

tc qdisc add dev $WAN handle ffff: ingress
tc filter add dev $WAN parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1

They rate limit incoming packets.

"u32 match ip src 0.0.0.0/0" says to match everything.

"police rate ${DOWNLINK}kbit burst 10k" says to rate limit at DOWNLINK kbits per second, but to accept (fairly large) bursts of data up to 10K bytes.

"drop flowid :1" says to drop all packets in excess of the police rate.

HTH
gypsy
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/