Skip to contentSkip to conversation

upload vs download

LARTC Vlad Mihai 2 participants 2 messages Aug 19, 2003

lore
Share & tools
lore

Vlad Mihai

author
#0 lore raw

I have a tc script which splits the bandwidth in 8 leaf classes based on IP filtering.
The script looks like this:

tc filter add dev $LAN_IFACE protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.0.121 flowid 1:11

The separation works excellent for downloads, but for uploads, it is ignored...
Can you tell me how to deal with it?

Thanks in advance,
Vlad Mihai

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

#1 lore raw
Quoted 11 lines · Vlad Mihai

I have a tc script which splits the bandwidth in 8 leaf classes based on IP filtering.
The script looks like this:

tc filter add dev $LAN_IFACE protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.0.121 flowid 1:11

The separation works excellent for downloads, but for uploads, it is ignored...
Can you tell me how to deal with it?

Yes. For uploads, the packets are natted. So the src address is rewritten. You can get around this if you mark the packets with iptables when they enter the box (so you have the real src address) and use that mark with the fw filter.

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

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