[Nottingham] Bandwidth shaping
Alex Herington
alex at fnet.nu
Fri May 5 04:17:42 BST 2006
Hi all,
I've searched around on google and I can't find anyone else's stories of
trying this, but has anyone tried using bandwidth shaping on VLAN
interfaces? Thanks in advance if anyone can help!
I have a box with eth0 (WAN) and eth1 (LAN running tagged VLANs on a
NetGear switch) performing NAT between the two.
Shaping traffic coming out of eth0 is fine and dandy but shaping traffic
out of VLAN eth1.10 (for example) seems to limit to ~128kbit/s when I
specify any bandwidth rate, measured by pulling a file over FTP from a
box (on the WAN side that's actually a local switch) I know I can pull
100mbit from :/ If I remove the marking iptables rule I can pull at
100mbit again so it's definitely the Linux traffic shaping that's at
fault. With the same rules in place I get ~50kbit/s pulling from
ftp.mirror.ac.uk. Again once I remove the iptables mark I can pull at
about 3500kbit/s (so it's not a lack of WAN bandwidth in the building).
It's just odd that the transfer speed seems proportionate to the maximum
unthrottled bandwidth I can pull from a host! Quite bizarre considering
the exact same commands applied to eth0 work perfectly when pushing to
the same local FTP server.
I have VLAN header reordering turned on so that DHCPd works but I'm not
so sure this would be causing the problem. I'm clearing all iptables
marks and qdiscs/classes.. etc before trying these tests.
Example of the commands I'm using:
# tc qdisc add dev eth1.10 root handle 1:0 htb
# tc class add dev eth1.10 parent 1:0 classid 1:1 htb rate 512kbit
# tc class add dev eth1.10 parent 1:1 classid 1:10 htb rate 512kbit ceil
512kbit
# tc filter add dev eth1.10 protocol ip parent 1:0 prio 1 handle 3 fw
flowid 1:10
# iptables -I FORWARD -t mangle -o eth0 --source 10.0.10.0/24 -j MARK
--set-mark 3
If anyone could shed any light it would be greatly appreciated :)
Regards,
Alex
More information about the Nottingham
mailing list