10-22-2013 04:55 AM
hello! pls help me ) i have a nooby question) i need to set speedlimit for my dhcp users . dhcp on eth0 192.168.1.30-254/24 and wan on eth2 with static ip. So, how to set upload limit 4mbps and download 4mbps for each dhcp user ?
and also werry important for me to set such restrictions only for dhcp ! (for example ...168.1.2-1.30 need to have no such restrictions)
ps sorry for my english, its not my native language )
10-22-2013 06:20 AM - edited 10-22-2013 06:20 AM
You will need to use CLI and I think for each DHCP user you will need to create a policy for by using a match so this will not be automatic. Maybe you can think of another way QOS would work for you so it will not be so difficult to manage by reading the guides below:
Look at this PDF for all the settings: http://ftp.het.net/iso/vyatta/vc6.3/docs/Vyatta_QoS_R6.3_v01.pdf
Here is a guide for EdgeMax: http://wiki.ubnt.com/Quality_of_Service_%28QoS%29
10-22-2013 06:52 AM
oh, thanks... and if it no so difficult for you, can you give me just one example for only one IP adress on eth0, let it be 192.168.1.31 with limit 4mbs up/down. PLSe)
10-22-2013 08:47 AM - edited 10-22-2013 08:55 AM
configure set traffic-policy shaper BU default bandwidth 4mbit set traffic-policy shaper BU class 1 bandwidth 4mbit set traffic-policy shaper BU class 1 match ip source address 192.168.1.3/24 commit set interfaces ethernet eth2 traff-policy out BU commit save
To have more IPs change X to a different number.
set traffic-policy shaper BU class X bandwidth 4mbit set traffic-policy shaper BU class X match ip source address 192.168.1.X/24
configure set traffic-policy shaper BD default bandwidth 4mbit set traffic-policy shaper BD class 1 bandwidth 4mbit set traffic-policy shaper BD class 1 match ip destination address 192.168.1.3/24 commit set interfaces eth0 traffic-policy out BU commit save
10-22-2013 10:26 AM
10-22-2013 10:36 AM - edited 10-22-2013 10:38 AM
BU and BD are just the names he set for the policies. They probably mean to stand for "bandwidth upload" and "bandwidth download". You can name them whatever you want.
The commands are similar because he uses the same type of policy. There's a number of different QoS policy types available on the system. For low-level technical reasons only traffic-limiter can be applied to ingress traffic. The rest - like the shaper in his example - can only be applied to egress (outgoing) traffic.
You can get around this limitation by thinking of the router as a pipe. What goes in on one side (e.g. WAN port) goes out on the other (e.g. LAN port) and vice versa. By setting the limit on the appopriate port's outgoing packets you can effectively achieve both upload and download limiting.
It's the same approach I'm currently using on a layer 3 switch to set bandwidth limits on our customers' internet subscriptions.