Community discussions

MikroTik App
 
JesseMathis
newbie
Topic Author
Posts: 46
Joined: Fri Dec 15, 2006 10:53 pm

QOS Verification with configs.

Thu Jan 04, 2007 5:56 pm

I am new to QOS and Mikrotik and would like for someone to verify that my configs are correct. I want to give VOIP traffic high priority, P2P traffic lowest priority. HTTP traffic Med-High priority, and all other traffic Medium priority.

These are my MANGLE Rules.

0 ;;; VOIP Traffic - RTP
chain=forward protocol=udp dst-port=5004 action=mark-connection
new-connection-mark=VOIP_Traffic passthrough=yes

1 ;;; VOIP Traffic - RTP
chain=forward protocol=udp dst-port=5005 action=mark-connection
new-connection-mark=VOIP_Traffic passthrough=yes

2 ;;; VOIP Traffic - IAX2
chain=forward protocol=udp dst-port=4569 action=mark-connection
new-connection-mark=VOIP_Traffic passthrough=yes

3 ;;; VOIP Traffic - IAX1
chain=forward protocol=udp dst-port=5036 action=mark-connection
new-connection-mark=VOIP_Traffic passthrough=yes

4 ;;; VOIP Traffic - SIP
chain=forward protocol=udp dst-port=5060 action=mark-connection
new-connection-mark=VOIP_Traffic passthrough=yes

5 ;;; VOIP Taffic - SIP
chain=forward protocol=udp dst-port=5061 action=mark-connection
new-connection-mark=VOIP_Traffic passthrough=yes

6 ;;; VOIP Traffic
chain=forward connection-mark=VOIP_Traffic action=mark-packet
new-packet-mark=VOIP_Packet passthrough=yes

7 ;;; VOIP Traffic - Change TOS
chain=forward packet-mark=VOIP_Packet action=change-tos
new-tos=min-delay

8 ;;; HTTP Traffic
chain=forward protocol=tcp dst-port=80 action=mark-connection
new-connection-mark=HTTP_Traffic passthrough=yes

9 ;;; HTTPS Traffic
chain=forward protocol=tcp dst-port=443 action=mark-connection
new-connection-mark=HTTP_Traffic passthrough=yes

10 ;;; HTTP Traffic - Packet Mark
chain=forward connection-mark=HTTP_Traffic action=mark-packet
new-packet-mark=HTTP_Packet passthrough=yes

11 ;;; P2P Traffic Connection
chain=forward p2p=all-p2p action=mark-connection
new-connection-mark=P2P_Connection passthrough=yes

12 ;;; P2P Traffic Packet
chain=forward connection-mark=P2P_Connection action=mark-packet
new-packet-mark=P2P_Packet passthrough=yes

13 ;;; Other Client Traffic
chain=forward action=mark-connection new-connection-mark=Other_Traffic
passthrough=yes

14 ;;; Other Client Traffic - Packet Mark
chain=forward connection-mark=Other_Traffic action=mark-packet
new-packet-mark=Other_Packet passthrough=yes



THESE ARE MY SIMPLE QUEUES

0 name="P2P_Traffic" dst-address=0.0.0.0/0 interface=all parent=none
packet-marks=P2P_Packet direction=both priority=8 queue=default/default
limit-at=320000/320000 max-limit=320000/320000 total-queue=default
total-limit-at=320000 total-max-limit=320000

1 name="VOIP_Traffic" dst-address=0.0.0.0/0 interface=all parent=none
packet-marks=VOIP_Packet direction=none priority=1
queue=fuze-default/fuze-default limit-at=0/0 max-limit=512000/512000
total-queue=fuze-default total-limit-at=1280000 total-max-limit=1280000

2 name="Web_Traffic" dst-address=0.0.0.0/0 interface=all parent=none
packet-marks=HTTP_Packet direction=none priority=2
queue=default-small/default-small limit-at=0/0 max-limit=0/0
total-queue=fuze-default

3 name="Client_Other" dst-address=0.0.0.0/0 interface=all parent=none
packet-marks=Other_Packet direction=none priority=4
queue=default-small/default-small limit-at=0/0 max-limit=0/0
total-queue=fuze-default



THESE ARE MY QUEUE TYPES

0 name="default" kind=pfifo pfifo-limit=50

1 name="ethernet-default" kind=pfifo pfifo-limit=50

2 name="wireless-default" kind=sfq sfq-perturb=5 sfq-allot=1514

3 name="synchronous-default" kind=red red-limit=60 red-min-threshold=10
red-max-threshold=50 red-burst=20 red-avg-packet=1000

4 name="hotspot-default" kind=sfq sfq-perturb=5 sfq-allot=1514

5 name="fuze-default" kind=pcq pcq-rate=0 pcq-limit=50
pcq-classifier=src-address pcq-total-limit=10000

6 name="default-small" kind=pfifo pfifo-limit=10



THESE ARE THE INTERFACE QUEUES. Ethernet2 is the Outside interface to the public internet. Ether5 is the Physical internal interface. Servers and Clients are VLAN interfaces which are associated with Ether5

# INTERFACE QUEUE
0 ether2 fuze-default
1 ether3 ethernet-default
2 ether4 ethernet-default
3 ether5 ethernet-default
4 Servers default
5 Clients fuze-default
 
JesseMathis
newbie
Topic Author
Posts: 46
Joined: Fri Dec 15, 2006 10:53 pm

Thu Jan 04, 2007 6:03 pm

I think I need to add a rule to give DSCP EF traffic priority 1.
 
User avatar
macgaiver
Forum Guru
Forum Guru
Posts: 1772
Joined: Wed May 18, 2005 5:57 pm
Location: Sol III, Sol system, Sector 001, Alpha Quadrant

Thu Jan 04, 2007 7:31 pm

Try to use passthrough=no on the "mark-packet" rules, so the traffic will not be remarked another time.

2) first mark all p2p connections then all the packets, and only then handle all other traffic.
 
JesseMathis
newbie
Topic Author
Posts: 46
Joined: Fri Dec 15, 2006 10:53 pm

Thu Jan 04, 2007 8:57 pm

How does this look? I wasn't sure about removing passthrough on the VOIP Packet marking because the next after this changes the TOS on all VOIP Packets that are marked. If I remove passthrough on the Voip Packet mark will the change TOS rule still work even though it is after the Voip packet mark rule?

MANGLE RULES

0 ;;; P2P Traffic Connection
chain=forward p2p=all-p2p action=mark-connection
new-connection-mark=P2P_Connection passthrough=yes

1 ;;; P2P Traffic Packet
chain=forward connection-mark=P2P_Connection action=mark-packet
new-packet-mark=P2P_Packet passthrough=no

2 ;;; VOIP Traffic - RTP
chain=forward protocol=udp dst-port=5004 action=mark-connection
new-connection-mark=VOIP_Traffic passthrough=yes

3 ;;; VOIP Traffic - RTP
chain=forward protocol=udp dst-port=5005 action=mark-connection
new-connection-mark=VOIP_Traffic passthrough=yes

4 ;;; VOIP Traffic - IAX2
chain=forward protocol=udp dst-port=4569 action=mark-connection
new-connection-mark=VOIP_Traffic passthrough=yes

5 ;;; VOIP Traffic - IAX1
chain=forward protocol=udp dst-port=5036 action=mark-connection
new-connection-mark=VOIP_Traffic passthrough=yes

6 ;;; VOIP Traffic - SIP
chain=forward protocol=udp dst-port=5060 action=mark-connection
new-connection-mark=VOIP_Traffic passthrough=yes

7 ;;; VOIP Taffic - SIP
chain=forward protocol=udp dst-port=5061 action=mark-connection
new-connection-mark=VOIP_Traffic passthrough=yes

8 ;;; VOIP Traffic
chain=forward connection-mark=VOIP_Traffic action=mark-packet
new-packet-mark=VOIP_Packet passthrough=yes

9 ;;; VOIP Traffic - Change TOS
chain=forward packet-mark=VOIP_Packet action=change-tos
new-tos=min-delay

10 ;;; HTTP Traffic
chain=forward protocol=tcp dst-port=80 action=mark-connection
new-connection-mark=HTTP_Traffic passthrough=yes

11 ;;; HTTPS Traffic
chain=forward protocol=tcp dst-port=443 action=mark-connection
new-connection-mark=HTTP_Traffic passthrough=yes

12 ;;; HTTP Traffic - Packet Mark
chain=forward connection-mark=HTTP_Traffic action=mark-packet
new-packet-mark=HTTP_Packet passthrough=no

13 ;;; Other Client Traffic
chain=forward action=mark-connection new-connection-mark=Other_Traffic
passthrough=yes

14 ;;; Other Client Traffic - Packet Mark
chain=forward connection-mark=Other_Traffic action=mark-packet
new-packet-mark=Other_Packet passthrough=no
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Fri Jan 05, 2007 10:12 am

if you need to alter marked packets then sure - do no set passthrough=no
change TOS and then remove from mangle (set passthrough=no)