Controlled Latency

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.

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.

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.

Why would one want to introduce latency in the first place? :open_mouth: … your trying to destroy someone else’s network? :laughing:

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 :wink:

Exactly, not what your normally want, but absolutely vital for some scenarios around testing.

No other ideas besides dummynet?

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.

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 :wink:

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.