Page 1 of 1

QoS with different ports

Posted: Fri Jul 10, 2015 10:52 pm
by safiullahtariq
Hello All,

I hope you are doing great.

I have made a network, and I would like to get some advices from you people. I am going to implement QoS for VoIP. I’ll explain how the network is made so that everyone can understand its working and advice accordingly.

Router is RB1100AHx2

I am getting WAN from port 1 of the Router provided by ISP and it is connected to my RB1100AHx2 on port 11 (I have 20 Mbps download/upload WAN link).
RB1100 AHx2 port 10 is connected to Asterisk (on Asterisk NIC 1) and Asterisk (NIC 2) is connected to the Router port 2 provided by the ISP. We have a PRI line from ISP. We have 26 users with softphones connected to Mikrotik.

Im planning to implement QoS as voice often get issues. Internet and VoIP is flowing through Mikrotik but from different ports.

For VoIP QoS: I will not be using layer 7 to identify SIP packets, I guess I don’t need to identify the packets. As I have the IPs, ill mark connection and packets.
In firewall/mangle: im going identify the interface on which Asterisk is connected (for incoming and outgoing packets) for connection and packet mark.
Queue: Im going to use Queue Tree and create different trees for Upload and download; and in upload there will be sub trees for different kind of traffic (http etc.) and vice versa in download.

What am I missing here? Should I include the VoIP queue in that queue or should I make separate queue? Or there is something else you all would suggest me.

Any advice is appreciated



Re: QoS with different ports

Posted: Sat Jul 11, 2015 1:17 am
by chechito
using layer 7 is the most inefficient way to identify voip traffic

asterisk mark traffic on DSCP with 46 or 48 by default, configure your phones and softphones to mark traffic with DSCP 46 or 48 (large discussion about 46 or 48).

with traffic marked on DSCP (layer 3) you can use that marking to identify VOIP traffic with mangle, manageable switches on some models can identify DSCP value and apply certain configurations to prioritize traffic.

remember to do L2 priority (when value 0-7 is available use 6, highest priority when are only 4 priorities or second highest priority when are eight priorities) marking based on DSCP marking at every point your equipment is capable of to ensure layer 2 priority reflects layer 3 priority, some equipment do this automatically, another dont, every brand has different behavior

Re: QoS with different ports

Posted: Sun Jul 12, 2015 4:45 pm
by safiullahtariq
Thank you for your reply.

I am a little confused. Can you please guide me. I have made a drawing of my understating of QoS... In the drawing, the packets are coming in but going out in a different pattern. My question is, the router prioritize traffic regardless of Ethernet ports, meaning no matter from which port the packets are coming, the router will make the VoIP packets go out first (to whichever port they want to go out).

As you said, I will use DSCP based traffic prioritization, but again there is a little doubt in my mind. For the WAN (internet) ill be using queue trees, I have 20Mbps link so ill be limiting at 20M, but my Asterisk does not depend on that 20Mbps link.
So should I create a different queue for Asterisk (as it also uses a different port)?

Re: QoS with different ports

Posted: Sun Jul 12, 2015 11:00 pm
by chechito
take a look of this page

then take a look at this

they explain it much better than me, any doubt please ask

i recommend you to test basic setups of qos to really understand

personally i started with simple queues with pcq

then i tested mangle and queue tree