Community discussions

MikroTik App
 
chris84
newbie
Topic Author
Posts: 31
Joined: Tue Mar 27, 2007 12:05 pm
Location: Vienna
Contact:

Traffic priorization

Fri Feb 06, 2009 1:58 pm

Hi folks,

one of our customer needs a router which is capable of traffic prioritization, therefore I would like to use a RB450.

ether1 is WAN/Internet Interface and ether2 is LAN (connected to a switch).

LAN-IP: 10.108.1.200/24

ip firewall nat print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=srcnat action=masquerade src-address=10.108.1.0/24 out-interface=ether1-WAN

The problem is that they have 3-4 office PCs and one Hotspot-Gw in their LAN.

PC1: 10.108.1.1/24
PC2: 10.108.1.2/24
PC3: 10.108.1.3/24
PC4: 10.108.1.4/24
Hotspot-GW: 10.108.1.10/24

the goal is to prioritize the office pcs higher than the hotspot gateway, that means that the stuff should be able to work/surf in the internet even if a hotspot customer utilizes the whole line with a ftp download for example.

the major problem is that I can't say how much bandwidth they have, it should be a 8Mbit DSL line but most of the time they don't get more than 1 Mbps, so I'm not quite sure how the queues/queue trees should be set.

can you please point me in the right direction? :D
 
chris84
newbie
Topic Author
Posts: 31
Joined: Tue Mar 27, 2007 12:05 pm
Location: Vienna
Contact:

Re: Traffic priorization

Fri Feb 06, 2009 3:02 pm

I tried it with simple queues:

[admin@prioritytest] > queue simple print
Flags: X - disabled, I - invalid, D - dynamic
0 name="office" target-addresses=10.108.1.1/32,10.108.1.2/32,10.108.1.3/32,10.108.1.4/32 dst-address=0.0.0.0/0 interface=all parent=none direction=both priority=1
queue=ethernet-default/ethernet-default limit-at=0/0 max-limit=0/0 burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s total-queue=ethernet-default

1 name="hotspot" target-addresses=10.108.1.10/32 dst-address=0.0.0.0/0 interface=all parent=none direction=both priority=8 queue=ethernet-default/ethernet-default limit-at=0/0
max-limit=0/0 burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s total-queue=ethernet-default

then I started ftp downloading (with the 10.108.1.10 machine), which utilized the whole dsl-line, surfing on e.g. 10.108.1.1 was very very slow. There wasn't a difference whether the queues were enabled or disabled.

do you have an other suggestion how to handle this?
 
chris84
newbie
Topic Author
Posts: 31
Joined: Tue Mar 27, 2007 12:05 pm
Location: Vienna
Contact:

Re: Traffic priorization

Fri Feb 06, 2009 5:38 pm

queue tree also doesn't work for me.

here's what I tried:
[admin@prioritytest] > ip firewall mangle print 
Flags: X - disabled, I - invalid, D - dynamic 
 0   chain=prerouting action=mark-connection new-connection-mark=office_con passthrough=yes src-address-list=officelan 

 1   chain=prerouting action=mark-packet new-packet-mark=office passthrough=no src-address-list=officelan connection-mark=office_con 

 2   chain=prerouting action=mark-connection new-connection-mark=hotspot_con passthrough=yes src-address=10.108.1.10 

 3   chain=prerouting action=mark-packet new-packet-mark=hotspot passthrough=no connection-mark=hotspot_con
[admin@prioritytest] > ip firewall mangle print 
Flags: X - disabled, I - invalid, D - dynamic 
 0   chain=prerouting action=mark-connection new-connection-mark=office_con passthrough=yes src-address-list=officelan 

 1   chain=prerouting action=mark-packet new-packet-mark=office passthrough=no src-address-list=officelan connection-mark=office_con 

 2   chain=prerouting action=mark-connection new-connection-mark=hotspot_con passthrough=yes src-address=10.108.1.10 

 3   chain=prerouting action=mark-packet new-packet-mark=hotspot passthrough=no connection-mark=hotspot_con
If I do anything in the internet the counters increase but the priorization takes no effect.

In my little lab the uplink switch-port (to which ether1 is connected) to the internet is shaped to 2048/2048kbps.

First I start a ftp download from hotspot-network (this is 10.108.1.10 for the mikrotik) --> 2048kbps are reached.
then a second ftp transfer from an office pc is started and here I get only ~500kbps (transfer1 about 1200-1500kbps).
If transfer1 is stopped, transfer2 gets 2048kbps.

remember:
transfer1=hotspot=queue priority 8
transfer2=office=queue priority 1
I thought because of those priorities the office-ips always get more bandwidth than the hotspot ip. As I wrote before I couldn't really say how much bandwitdth is available on the DSL uplink, so it is impossible to set a max. bandwidth in queues.

Who is online

Users browsing this forum: No registered users and 30 guests