Page 1 of 1

Prioritise traffic from a destination address

Posted: Thu Jan 25, 2007 3:13 pm
by mambotech
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

Posted: Thu Jan 25, 2007 3:17 pm
by janisk

DOesn't seem to work correctly

Posted: Fri Jan 26, 2007 11:40 am
by mambotech
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

Posted: Fri Jan 26, 2007 2:49 pm
by skillful
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"

Thanks

Posted: Fri Jan 26, 2007 3:30 pm
by mambotech
What do I do about the queues and the priority of VOIP ?


Thanks Mark

No traffic on all_traffic rule

Posted: Fri Jan 26, 2007 3:36 pm
by mambotech
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

Posted: Fri Jan 26, 2007 4:50 pm
by skillful
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

That worked

Posted: Fri Jan 26, 2007 6:12 pm
by mambotech
Skillful,

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

:(


Seem strange

Mark

Posted: Fri Jan 26, 2007 11:03 pm
by skillful
Can you see any traffic in the "all_traffic" mangle rule?

Traffic

Posted: Sat Jan 27, 2007 1:43 pm
by mambotech
Skillful,

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

Thanks Mark

Posted: Sat Jan 27, 2007 5:09 pm
by skillful
Export your queue rule and post it here

rule

Posted: Sat Jan 27, 2007 7:57 pm
by mambotech
Skillful,

It at the top of the topic.


Thanks Mark

Posted: Sat Jan 27, 2007 10:28 pm
by skillful
They are disabled!

queues

Posted: Sun Jan 28, 2007 1:46 am
by mambotech
Skillful,


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

Mark

Posted: Sun Jan 28, 2007 7:14 pm
by skillful
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.