Traffic shaping for typical router for sub-provider.

Hi all again,

Let’s discuss the best way to setup a traffic shaper for a typical sub-provider’s router, example router:

interfaces:

WAN
LAN
vlan1
vlan2
vlan3
vlan4
vlan5

servers

WAN, vlan1, valn2 & servers - real ip networks.
vlan3, vlan4 & vlan5 - src-nat to some real address, like:

chain=srcnat action=src-nat to-addresses=70.80.39.116 to-ports=0-65535 src-address=192.168.64.0/24 dst-address=!192.168.64.0/24
chain=srcnat action=src-nat to-addresses=70.80.39.117 to-ports=0-65535 src-address=192.168.62.0/24 dst-address=!192.168.62.0/24
chain=srcnat action=src-nat to-addresses=70.80.39.118 to-ports=0-65535 src-address=192.168.63.0/24 dst-address=!192.168.63.0/24

Traffic should be:

WAN (symmetric channel from larger ISP) - 10 mbps
servers - 4/4 mbp (10 max)
vlan1 - 2/1 mbps (4/1 max)
vlan2 - 3/1 mbps (5/1 max)
vlan3 - 2/1 mbps (4/1 max)
vlan4 - 1 mbps / 512 kbps (2m / 512k max)
vlan5 - 1 mbps / 512 kbps (2m / 512k max)

e.g. we have servers interface with dedicated (guaranteed) 4 mbps and allowed to grow to 10 mbps in case if channel is empty. And few typical service packets: 1, 2 & 3 mbps, each can grow up to 2, 4 & 5 mbps if free bandwidth available.


What is the best way to make this scheme?