Community discussions

MikroTik App
 
MikroNewb
just joined
Topic Author
Posts: 5
Joined: Sat Apr 09, 2011 11:59 am

Controlled Latency

Sat Apr 09, 2011 6:11 pm

Any suggestions for creating controlled latency?

I've tried Queues, and a Simple Queue, it would be ok at first, but would the queue would increased to 300 - 400 packets at which point the connections would begin terminating.

Need to keep it controlled, just enough but not too much it gives up.

Was using PCQ Type as it needs to apply to about 7 connections with different destinations/ports.

Since that didn't work, I tried looking at Mangle/filter rules, and tried a Nth packet rule, every 3, packet 2 drop, this certainly created some Latency with the connection, but it was not consistent on the 7 connections and would result in one or two being lost completely. Guessing it was just bad luck the packets that were to go to those connections where the ones dropped.
 
Sanity
Member Candidate
Member Candidate
Posts: 198
Joined: Sun Mar 06, 2011 8:51 am

Re: Controlled Latency

Sat Apr 09, 2011 7:26 pm

You can not control latency. if you queue more packets than the link can handle, they will queue up. Physics cna not be cheated.

What you CAN do is havedifferent queues and put higher priority packets (that need to go first) into a queue that is handled first. At the cost of the others which then will queue up even more and then drop more often.

This is all yo ucan do. At the end, if you want more packets to be going through an interface than the interface can handle, they simply CAN NOT go without latency piling up.
 
MikroNewb
just joined
Topic Author
Posts: 5
Joined: Sat Apr 09, 2011 11:59 am

Re: Controlled Latency

Sat Apr 09, 2011 11:17 pm

You can not control latency. if you queue more packets than the link can handle, they will queue up. Physics cna not be cheated.

What you CAN do is havedifferent queues and put higher priority packets (that need to go first) into a queue that is handled first. At the cost of the others which then will queue up even more and then drop more often.

This is all yo ucan do. At the end, if you want more packets to be going through an interface than the interface can handle, they simply CAN NOT go without latency piling up.
I understand the physics, but you're not understanding my post.

The link can handle it find, ordinarily, what I want to do is create the latency and control it, I guess it might require more advanced queue options than are available on RouterOS, a variable limit rate for example or just something I can do that will delay the packets for a moment.

I'm guessing though that queues just aren't right for this purposes, since the options are either the queue fills up and up and up, or it drops packets, neither is acceptible in this scenario.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Controlled Latency

Sat Apr 09, 2011 11:30 pm

RouterOS doesn't have anything that allows you to introduce latency.

Try dummynet, it's native on FreeBSF but has been ported to other platforms. Works very well.
 
MikroNewb
just joined
Topic Author
Posts: 5
Joined: Sat Apr 09, 2011 11:59 am

Re: Controlled Latency

Sun Apr 10, 2011 1:10 am

RouterOS doesn't have anything that allows you to introduce latency.

Try dummynet, it's native on FreeBSF but has been ported to other platforms. Works very well.
Darn, and it seemed RouterOS did everything but make toast, I was really hoping it could handle this.

Great, something else to learn and fit into my network... :-/ My 493AH is the main router, not sure how well it'll work with another box inbetween that and the device.
 
User avatar
warwick09
Member Candidate
Member Candidate
Posts: 190
Joined: Mon Aug 07, 2006 1:34 pm
Location: The Bahamas / Florida

Re: Controlled Latency

Sun Apr 10, 2011 4:40 am

You can not control latency. if you queue more packets than the link can handle, they will queue up. Physics cna not be cheated.

What you CAN do is havedifferent queues and put higher priority packets (that need to go first) into a queue that is handled first. At the cost of the others which then will queue up even more and then drop more often.

This is all yo ucan do. At the end, if you want more packets to be going through an interface than the interface can handle, they simply CAN NOT go without latency piling up.
I understand the physics, but you're not understanding my post.

The link can handle it find, ordinarily, what I want to do is create the latency and control it, I guess it might require more advanced queue options than are available on RouterOS, a variable limit rate for example or just something I can do that will delay the packets for a moment.

I'm guessing though that queues just aren't right for this purposes, since the options are either the queue fills up and up and up, or it drops packets, neither is acceptible in this scenario.

Why would one want to introduce latency in the first place? :shock: ......... your trying to destroy someone else's network? :lol:
 
Sanity
Member Candidate
Member Candidate
Posts: 198
Joined: Sun Mar 06, 2011 8:51 am

Re: Controlled Latency

Sun Apr 10, 2011 10:42 am

Why would one want to introduce latency in the first place? :shock: ......... your trying to destroy someone else's network? :lol:
There are many scenarios for this, mostly around developing software that has to handle latency and the fact that your lab network is an ultral low latency setup comapred to the internet. Latency injection - especially hard one, ike double what you expect - will make the issues in your code obvious fast ;)
 
MikroNewb
just joined
Topic Author
Posts: 5
Joined: Sat Apr 09, 2011 11:59 am

Re: Controlled Latency

Sun Apr 10, 2011 1:06 pm

Why would one want to introduce latency in the first place? :shock: ......... your trying to destroy someone else's network? :lol:
There are many scenarios for this, mostly around developing software that has to handle latency and the fact that your lab network is an ultral low latency setup comapred to the internet. Latency injection - especially hard one, ike double what you expect - will make the issues in your code obvious fast ;)
Exactly, not what your normally want, but absolutely vital for some scenarios around testing.

No other ideas besides dummynet?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Controlled Latency

Sun Apr 10, 2011 6:53 pm

WANEm is a Linux distro that can do this. I like dummynet better. It can function in bridge mode so you can insert it anywhere transparently.

RouterOS simply doesn't expose anything that lets you add latency in a controlled fashion.
 
kdavid
Member Candidate
Member Candidate
Posts: 141
Joined: Sun Jul 03, 2005 8:11 pm

Re: Controlled Latency

Sun Apr 10, 2011 7:36 pm

Any suggestions for creating controlled latency?

I've tried Queues, and a Simple Queue, it would be ok at first, but would the queue would increased to 300 - 400 packets at which point the connections would begin terminating.

Need to keep it controlled, just enough but not too much it gives up.

Was using PCQ Type as it needs to apply to about 7 connections with different destinations/ports.

Since that didn't work, I tried looking at Mangle/filter rules, and tried a Nth packet rule, every 3, packet 2 drop, this certainly created some Latency with the connection, but it was not consistent on the 7 connections and would result in one or two being lost completely. Guessing it was just bad luck the packets that were to go to those connections where the ones dropped.
Try to create a shaping rule that not contains ICMP protokol. Try to make mangle for client and set in protocol !ICMP

!ICMP - this means you mangle everything without ICMP protocol ;)
 
MikroNewb
just joined
Topic Author
Posts: 5
Joined: Sat Apr 09, 2011 11:59 am

Re: Controlled Latency

Sun Apr 10, 2011 8:07 pm

Any suggestions for creating controlled latency?

I've tried Queues, and a Simple Queue, it would be ok at first, but would the queue would increased to 300 - 400 packets at which point the connections would begin terminating.

Need to keep it controlled, just enough but not too much it gives up.

Was using PCQ Type as it needs to apply to about 7 connections with different destinations/ports.

Since that didn't work, I tried looking at Mangle/filter rules, and tried a Nth packet rule, every 3, packet 2 drop, this certainly created some Latency with the connection, but it was not consistent on the 7 connections and would result in one or two being lost completely. Guessing it was just bad luck the packets that were to go to those connections where the ones dropped.
Try to create a shaping rule that not contains ICMP protokol. Try to make mangle for client and set in protocol !ICMP

!ICMP - this means you mangle everything without ICMP protocol ;)
Not sure what you're getting at here, its UDP traffic from a single source to multiple destinations with possibly different ports I need to test ASAP, in the near future may need to do the same for TCP as well.

Who is online

Users browsing this forum: Bing [Bot], gene, Google [Bot], LookUp and 96 guests