Community discussions

MikroTik App
 
hci
Long time Member
Long time Member
Topic Author
Posts: 683
Joined: Fri May 28, 2004 5:10 pm

VOIP & QOS

Sat Feb 10, 2007 1:27 am

We have a 6mbps gateway Internet connection right now soon to update to 9mbps. Anyway, at peak times my Packet8 phone cuts out. Is there anyway with Mikrotik to automtically prioritize higher QOS traffic at the gateway? The only way that comes to mind to me is to limit all traffic but high QOS traffic to 95% of the bandwidth and reserve 5% for VOIP and higher QOS. This seems like a waste when there are no calls occurring.

Any other ways to do it?

Matt
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6704
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Mon Feb 12, 2007 2:24 pm

I think you may try to use 'priority' option in the queues.
- Create mangle, that marks VoIP traffic.
- Create queue entry, that has priority=1 configured.
 
amtisrac
Frequent Visitor
Frequent Visitor
Posts: 98
Joined: Mon Jun 13, 2005 10:53 am
Location: Hungary

Mon Feb 12, 2007 8:45 pm

I think you may try to use 'priority' option in the queues.
- Create mangle, that marks VoIP traffic.
- Create queue entry, that has priority=1 configured.
Have you ideas marking skype, msn and any other sip packets?
5060-506x is not enough, because it is possibe to use random ports etc.
 
hci
Long time Member
Long time Member
Topic Author
Posts: 683
Joined: Fri May 28, 2004 5:10 pm

Mon Feb 12, 2007 9:19 pm

I think you may try to use 'priority' option in the queues.
- Create mangle, that marks VoIP traffic.
- Create queue entry, that has priority=1 configured.
Since, at this time I have 6mbps, would I create one 6mbps queue then create other 6mbps queues that call this parent with various prioritys? Is priority 1 the highest or lowest priority?

Can we get an example of this on wiki?

Matt
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6704
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Tue Feb 13, 2007 7:59 am

SIP marking is/will be easier in 3.0 version. SIP helper is included to NAT traversal helpers, as well mangle contains 'connection-type=sip'.
I have no idea about skype.

Matt,
1 is highest priority, you can create queue with priority enabled, but without rate-limit configuration.
Using queue tree, you can create parent with 6 Mbps and two child queues one with priority=1 for VoIP and another with priority=8 (>1) for another traffic, that should be mangled.
 
amtisrac
Frequent Visitor
Frequent Visitor
Posts: 98
Joined: Mon Jun 13, 2005 10:53 am
Location: Hungary

Tue Feb 13, 2007 10:22 am

SIP marking is/will be easier in 3.0 version. SIP helper is included to NAT traversal helpers, as well mangle contains 'connection-type=sip'.
I have no idea about skype.
I try MT 3.0b5 but i found only h323 on nat, connection-type rules.
[admin@MikroTik] /ip firewall nat> add connection-type= 
ftp  gre  h323  irc  mms  pptp  quake3  tftp  !         
I'm very impatient? :)
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6704
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Tue Feb 13, 2007 10:44 am

yes :)
actually you may try to add type 'sip' manually in the field, it will be present in the upcoming versions.
 
User avatar
eugenevdm
Member Candidate
Member Candidate
Posts: 208
Joined: Tue Jun 01, 2004 12:23 pm
Location: Stellenbosch, South Africa
Contact:

Re: VOIP & QOS

Thu Jan 22, 2009 4:53 pm

...
Matt,

1 is highest priority, you can create queue with priority enabled, but without rate-limit configuration.

Using queue tree, you can create parent with 6 Mbps and two child queues one with priority=1 for VoIP and another with priority=8 (>1) for another traffic, that should be mangled.
Serges,

I want to create a generic rule on all our high sites to prioritise SIP traffic. All normal traffic should come second and all SIP traffic should come highest priority. Please could you give me some ideas how to do this.
 
User avatar
NetworkPro
Forum Guru
Forum Guru
Posts: 1376
Joined: Mon Jan 05, 2009 6:23 pm
Location: bit.ly/the-qos
Contact:

Re: VOIP & QOS

Thu Jan 22, 2009 5:57 pm

eugenevdm, you should start reading, my friend: http://forum.mikrotik.com/viewtopic.php ... 78#p141378 http://forum.mikrotik.com/viewtopic.php ... 28#p137128 I have the humble request that you let us know the QoS design you found to work for you.

Best Regards.
 
User avatar
eugenevdm
Member Candidate
Member Candidate
Posts: 208
Joined: Tue Jun 01, 2004 12:23 pm
Location: Stellenbosch, South Africa
Contact:

Re: VOIP & QOS

Fri Jan 23, 2009 6:00 am

eugenevdm, you should start reading
NetworkPro, I joined this forum Jun 01 2004 and since then I have been reading a lot.
I have also been building up a company that is running fairly successfully and since I am running the company a lot of my time is spent managing the company, not reading technical stuff.

That's why I came to this forum. I really don't have the time to read every single bit of documentation to get a simple QoS design.

I'm sure many people are in the same situation as I am. They have a network with high sites and a data feed and clients and they want to prioritise one or two protocols.

I use forums because I don't have the time to always RTFM.
If you have an answer for me, please give me something.
If not then I prefer to hear from someone in the community who has.

What I am after is something like this:
- Create mangle, that marks VoIP traffic.
- Create queue entry, that has priority=1 configured.
I need to know:

(1) Does this need to be created on every high site, or should it just be created in the data centre.
(2) What is the actual rule? e.g.:
/ip firewall mangle mark protocol=sip name=sip_marking
/ip firewall mangle mark protocol=!sip name=all_other_traffic
/queue simple add name=sip_queue priority=1
/queue simple add name=all_other_traffic  priority=8
[bind queue to some queueing discipline]
(3) Is is possible to create the rule generically, without specifying bandwidth sizes. I don't want to tie the rule to a specific bandwidth size, I merely want it prioritised.
I have the humble request that you let us know the QoS design you found to work for you.
[/quote]
If I find a solution, I will be sure to share it. That's why I came to this forum. Not to go off into the corner and read some manuals like a good old nerd but to try and find information that is easily shared.
 
User avatar
NetworkPro
Forum Guru
Forum Guru
Posts: 1376
Joined: Mon Jan 05, 2009 6:23 pm
Location: bit.ly/the-qos
Contact:

Re: VOIP & QOS

Fri Jan 23, 2009 11:57 am

I agree with your point of view.

There are a lot of problems associated with QoS. It's a science of it's own. But I guess we can try something and see if it will work, if you are lucky.

Usually QoS must be implemented only on the main Internet Gateway, where hopefully, you know your exact bandwidth and hopefully, it is stable and not varying due to 1% loss or other reasons.

Can you please draw a simple diagram in paint, showing VoIP traffic's path over the congested interface you want to manage? So that I can have an idea where QoS needs to be set up.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6704
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: VOIP & QOS

Mon Jan 26, 2009 4:21 pm

Generally, connection-type=sip can be used to catch SIP traffic, which is going over the router.
connection-type option is available in
/ip firewall mangle add connection-type
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8716
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: VOIP & QOS

Mon Jan 26, 2009 5:33 pm

Generally, connection-type=sip can be used to catch SIP traffic, which is going over the router.
connection-type option is available in
/ip firewall mangle add connection-type
is SIP helper needed to use this option?
 
mknnoc
Trainer
Trainer
Posts: 229
Joined: Thu Feb 28, 2008 6:40 am
Location: cambodia

Re: VOIP & QOS

Mon Jan 26, 2009 6:13 pm

i have created the rule as below:

chain=prerouting action=passthrough connection-type=sip
chain=prerouting action=passthrough connection-type=h323

but i don't see any bytes or packets counter increased. and i am sure that there are a lot of SIP/H323 traffic are forwarded by my router.

any idea?

PS:
1- Which one is better between connection-type=sip/h323 and L7 protocol(sip/h323)?
2- Does L7 protocol and connection-type=sip/h323 100% work? does anyone test them successfully?
 
User avatar
NetworkPro
Forum Guru
Forum Guru
Posts: 1376
Joined: Mon Jan 05, 2009 6:23 pm
Location: bit.ly/the-qos
Contact:

Re: VOIP & QOS

Mon Jan 26, 2009 8:29 pm

I would first mark by port, if we know the port for sure, like port 80 is for sure http 99.99% of the time. Then maybe I would test to mark by connection-type. And the last marking will be by L7. All would be passthrough=no to not mark them three times. I do not trust either of the three to recognize and mark it all. And by the way, (most of the) L7 is not usable for routing marks, just for QoS.
 
mknnoc
Trainer
Trainer
Posts: 229
Joined: Thu Feb 28, 2008 6:40 am
Location: cambodia

Re: VOIP & QOS

Tue Jan 27, 2009 7:17 am

i have created the rule as below:

chain=prerouting action=passthrough connection-type=sip
chain=prerouting action=passthrough connection-type=h323

but i don't see any bytes or packets counter increased. and i am sure that there are a lot of SIP/H323 traffic are forwarded by my router.

any idea?
any idea?
 
mknnoc
Trainer
Trainer
Posts: 229
Joined: Thu Feb 28, 2008 6:40 am
Location: cambodia

Re: VOIP & QOS

Thu Jan 29, 2009 4:10 pm

connection-type cannot work. it can caught any SIP or H323.
any idea??