Shaping egress upload problem
Hi everybody,
This is my first message in this linux community service so please dont scream. I have a problem with setting up my traffic shaper for users in particular vlans to limit their upload speed. The download bandwith is limited properly and it didnt cause any problems for me. Maybe I will start from giving you some information about my link and topology. Policy that I want to achieve: - each user has a fixed bandwith of 512kbit down and 64kbit up - between vlan traffic is shaped by sfq on max LAN speed Information: - I use debian 5.03 64bit - I have 3 vlans (vlan10, vlan20, vlan30) on 802.1q protocol - I aggregate 2 network devices (eth0, eth1) using ifenslave and bonding module - This is an LACP aggregation - The aggregated interfaces goes to Cisco CAT. 2950 and from there is multiplexed through particular vlans - My total bandwith is 2048kbit/256kbit as for up/down Network topology image: http://img42.imageshack.us/img42/7317/nettopology.jpg Problems: Now as I said before everything works fine with shaping traffic that comes to my users (download). I do it that way: Code:
# Setting queue for vlan10 subinterface The problem starts with shaping traffic that goes from my lan users and I am well aware of the fact that I should use ingress shaping and imq issues but I want to bypass this kind of configuration as I heard that on routers you can easily manage inbound and outbound traffic because the condition is to shape only outgoing traffic and this type of traffic depends from the perspective we look at. For example on my ppp0 interface the outgoing traffic is the data that users send to the internet and so on. So I tried to do the same fing with ppp0 interface and I got things quite messy: The first attempt was that: Code:
# Setting queue for ppp0 modem interface <<< TESTING >>> changed private ip to public, so the speedtest showed me down: 512kbit and up: 256kbit :( The second Attempt: Code:
# Setting queue for ppp0 modem interface <<< TESTING >>> to enqueue it even then when nat mangles it. The result was unfortunately the same. The iptables rule was incrementing but the upload rate was the same. I read some LARTC documentation and they say that you must to turn off reverse path filtering to prevent complication between NAT and packet marking. So I tried: Code:
echo "0" > /proc/sys/net/ipv4/conf/all/rp_filter I am worried about that I maked some kind of broadcast storm because the counters in iptables in mangle table and prerouting chain is growing very fast (marking packets): Code:
# iptables -t mangle -nvL getting higher and higher. So this fact is suspicious for me. Another problem is that I had to turn off rp filtering and this is very dangerous for my routing table, that could be changed by some spoofed routing advertisement altough I dont use any routing protocols like bpg,ospf. So I dont know if I should use IMQ, I heard that it has some drawbacks and its difficult to setup. Sorry for the big lenght of this post but I couldnt explain what I mean in a different way. Please help me and advise me some way that is appropriate to solve this manner properly. |
Really anyone cannot help with this issue? I am only interested in the way of my approach to shape in/out traffic, cause its working quite well, but I dont know if I am doing it in the way it should be done properly? Is reverse path filtering set to 0 really dangerous, cause security is my priority in this workstation.
|
All times are GMT -5. The time now is 01:46 AM. |