Community discussions

MikroTik App
 
User avatar
mambotech
Member Candidate
Member Candidate
Topic Author
Posts: 112
Joined: Thu Jun 08, 2006 6:20 pm

Prioritise traffic from a destination address

Thu Jan 25, 2007 3:13 pm

Hi,

I want to priorities traffic from a destination address (VOIP Server) but I am stuggling to workout how to do this. I understand that I have to mark the traffic from the destination and then create a queue but I am not sure of the syntax.

This is also going through an MT loadbalancer so I also need to force the traffic down one connection.

Can anyone help please.


THanks
Last edited by mambotech on Thu Jan 25, 2007 3:18 pm, edited 1 time in total.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Thu Jan 25, 2007 3:17 pm

 
User avatar
mambotech
Member Candidate
Member Candidate
Topic Author
Posts: 112
Joined: Thu Jun 08, 2006 6:20 pm

DOesn't seem to work correctly

Fri Jan 26, 2007 11:40 am

Hi Janisk

I have setup the mangle rules to mark the connection and packets, this seems to be woring fine. My problem is with the queues. Please see config below. I have disabled them at the moment because I was not seeing any traffic on the all_traffic queue. I would also like to route all voip traffic through WAN1 as well.

Mangle

0 ;;; P2P Mangle rule
chain=prerouting p2p=all-p2p action=mark-connection new-connection-mark=p2p_connection passthrough=yes

1 ;;; Marks to packet before the firewall rule drops the packet
chain=prerouting connection-mark=p2p_connection action=mark-packet new-packet-mark=p2p_packet
passthrough=yes

2 X ;;; voip mangle rule Marks connection
chain=prerouting dst-address=212.23.56.228 action=mark-connection new-connection-mark=voip
passthrough=yes

3 X ;;; Marks all other traffic before passing to the queue. Traffic priority + 8 which is the lowest
chain=prerouting action=mark-connection new-connection-mark=all_traffic passthrough=yes

4 X chain=prerouting action=mark-packet new-packet-mark=all_traffic passthrough=yes

5 X chain=prerouting dst-address=212.23.56.246 action=mark-connection new-connection-mark=voip
passthrough=yes

6 X chain=prerouting action=mark-packet new-packet-mark=voip passthrough=yes

7 X chain=prerouting dst-address=212.23.56.248 action=mark-connection new-connection-mark=voip
passthrough=yes

8 X chain=prerouting src-address=172.22.1.200 action=mark-connection new-connection-mark=voip
passthrough=yes

9 X chain=postrouting out-interface=WAN1 packet-mark=voip action=passthrough


queues:

Simple queue
0 X name="Main" 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 total-queue=default-small


Tree queue
0 X name="queue1" parent=main packet-mark=voip limit-at=0 queue=default priority=1 max-limit=0 burst-limit=0
burst-threshold=0 burst-time=0s

1 X name="queue2" parent=main packet-mark=all_traffic limit-at=0 queue=default priority=3 max-limit=0
burst-limit=0 burst-threshold=0 burst-time=0s

2 X name="main" parent=global-total packet-mark="" limit-at=0 queue=default priority=8 max-limit=0
burst-limit=0 burst-threshold=0 burst-time=0s
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Fri Jan 26, 2007 2:49 pm

Re-arrange your mangle rules as follows:

0 ;;; P2P Mangle rule
chain=prerouting p2p=all-p2p action=mark-connection new-connection-mark=p2p_connection passthrough=yes

1 ;;; Marks to packet before the firewall rule drops the packet
chain=prerouting connection-mark=p2p_connection action=mark-packet new-packet-mark=p2p_packet
passthrough=no

2 ;;; voip mangle rule Marks connection
chain=prerouting dst-address=212.23.56.228 action=mark-connection new-connection-mark=voip
passthrough=yes

3 chain=prerouting dst-address=212.23.56.246 action=mark-connection new-connection-mark=voip
passthrough=yes

4 chain=prerouting dst-address=212.23.56.248 action=mark-connection new-connection-mark=voip
passthrough=yes

5 chain=prerouting src-address=172.22.1.200 action=mark-connection new-connection-mark=voip
passthrough=yes

6 X chain=prerouting action=mark-packet new-packet-mark=voip passthrough=no

7 ;;; Marks all other traffic before passing to the queue. Traffic priority + 8 which is the lowest
chain=prerouting action=mark-connection new-connection-mark=all_traffic passthrough=yes


8 chain=prerouting action=mark-packet new-packet-mark=all_traffic passthrough=no


9 chain=postrouting out-interface=WAN1 packet-mark=voip action=passthrough

Note that passthrough in 1, 6 and 8 is "no"
 
User avatar
mambotech
Member Candidate
Member Candidate
Topic Author
Posts: 112
Joined: Thu Jun 08, 2006 6:20 pm

Thanks

Fri Jan 26, 2007 3:30 pm

What do I do about the queues and the priority of VOIP ?


Thanks Mark
 
User avatar
mambotech
Member Candidate
Member Candidate
Topic Author
Posts: 112
Joined: Thu Jun 08, 2006 6:20 pm

No traffic on all_traffic rule

Fri Jan 26, 2007 3:36 pm

Hi skillful

I have setup the mangle as you explained but I am not seeing any traffic on the all_traffic rule. I need to mark all other traffic so that I can priorites in the queues ...


Thanks Mark
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Fri Jan 26, 2007 4:50 pm

I suggest you add "in-interface" to the "all_traffic" rule mangle rule, i.e

7 ;;; Marks all other traffic before passing to the queue. Traffic priority + 8 which is the lowest
chain=prerouting in-interface=lan action=mark-connection new-connection-mark=all_traffic passthrough=yes

where "lan" is the interface name
 
User avatar
mambotech
Member Candidate
Member Candidate
Topic Author
Posts: 112
Joined: Thu Jun 08, 2006 6:20 pm

That worked

Fri Jan 26, 2007 6:12 pm

Skillful,

Thanks for that. I am still not seeing any traffic on the all_traffic queue ??

:(


Seem strange

Mark
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Fri Jan 26, 2007 11:03 pm

Can you see any traffic in the "all_traffic" mangle rule?
 
User avatar
mambotech
Member Candidate
Member Candidate
Topic Author
Posts: 112
Joined: Thu Jun 08, 2006 6:20 pm

Traffic

Sat Jan 27, 2007 1:43 pm

Skillful,

Yeah I can see traffic in the mangle rule but not in the queue?

Thanks Mark
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Sat Jan 27, 2007 5:09 pm

Export your queue rule and post it here
 
User avatar
mambotech
Member Candidate
Member Candidate
Topic Author
Posts: 112
Joined: Thu Jun 08, 2006 6:20 pm

rule

Sat Jan 27, 2007 7:57 pm

Skillful,

It at the top of the topic.


Thanks Mark
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Sat Jan 27, 2007 10:28 pm

They are disabled!
 
User avatar
mambotech
Member Candidate
Member Candidate
Topic Author
Posts: 112
Joined: Thu Jun 08, 2006 6:20 pm

queues

Sun Jan 28, 2007 1:46 am

Skillful,


Thats because they are not working. I am not sure they are setup correctly.

Mark
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Sun Jan 28, 2007 7:14 pm

They appear okay. Leave the simple queue rule disabled but enable the tree queues and see what happens.

Do you have infinite bandwidth? If not, you might have to specify a value for max-limit for things to work properly.

Who is online

Users browsing this forum: BoraHorza, grusu and 60 guests