7

I need to permanently increase network latency in approximately 100ms, without losing packets.

Reason: On a certain server and internet game my ping is too much lower than the other people playing it. I have 15ms, when average is 150ms which gives me cheater-like advantages.

So also out of curiosity I'm looking for ways to increase my ping while keeping connection stable. What are my options if any?

I thought about VPN services, but it seems like a bad option since games use UDP?

Is there any router/software that would assist me on this?

I'm on windows.

14
  • debatable if you get an advantage or disadvantage. for example in the 2D game soldat you need to have a high ping to have an advantage. most player activate a p2p client for that.
    – Wandang
    Commented Dec 13, 2013 at 9:30
  • I see. Well, the game in question is an FPS called Red Orchestra. You don't get any advantage by being laggy. It's just unfair the way it is now, because the server is a few meters away from home (New York), and the people in my team are in South America, while the opponents are in Europe, so I get advantages over everybody. I won't be able to join the tournaments if I don't find a way to increase my ping.
    – rzb
    Commented Dec 13, 2013 at 9:35
  • Seed torrents? Set a connection/speed limit and seed linux distros. When torrenting - or even downloading - my ping goes all over the place.
    – tombull89
    Commented Dec 13, 2013 at 9:40
  • That would make things unstable, as I'd probably lose lots of packets.
    – rzb
    Commented Dec 13, 2013 at 9:45
  • 8
    I don't know how to overcome your issue but i just wanted to chip in and say it's pretty stupid if you can't get into a tournament for having too good a connection. Commented Dec 13, 2013 at 10:19

2 Answers 2

7

You could give dummynet a shot:

Adding Latency

We can con­trol traf­fic by adding rules that match spe­cific packet data, and then send the pack­ets through a Dum­mynet pipe with added delay or packet loss. For exam­ple, we could add a 100 ms delay to all traf­fic head­ing to xkcd.com like so:

$ sudo ipfw pipe 1 config delay 100ms
$ sudo ipfw add 100 pipe 1 ip from any to xkcd.com
00100 pipe 1 ip from any to any dst-ip 107.6.106.82

The first com­mand here con­fig­ures a Dum­mynet pipe with id 1, cre­at­ing the pipe if it did not already exist. The sec­ond com­mand cre­ates a rule num­bered 100, which matches pack­ets with the desired des­ti­na­tion address and routes them through the pipe. Note that any rule that attempts to pass pack­ets through a non-existant pipe will block traf­fic and throw an error, so do not for­get to con­fig­ure pipes before using them. Using list again allows us to view the updated ruleset.

$ sudo ipfw list
00100 pipe 1 ip from any to 107.6.106.82
65535 allow ip from any to any

Ping­ing xkcd.com should show a round-trip time of 100 ms plus what­ever the actual cur­rent latency is across the connection.

$ ping xkcd.com
PING xkcd.com (107.6.106.82): 56 data bytes
64 bytes from 107.6.106.82: icmp_seq=0 ttl=55 time=117.092 ms
64 bytes from 107.6.106.82: icmp_seq=1 ttl=55 time=124.583 ms
64 bytes from 107.6.106.82: icmp_seq=2 ttl=55 time=117.916 ms
64 bytes from 107.6.106.82: icmp_seq=3 ttl=55 time=121.067 ms

In most cases, we would want to sim­u­late a full duplex con­nec­tion by adding a cor­re­spond­ing rule for pack­ets com­ing from the remote host, so that the delay is applied in both direc­tions. When we are done play­ing with our new rule, we can delete it and the pipe as follows.

$ sudo ipfw delete 100
$ sudo ipfw pipe 1 delete

source


It looks like the dummynet project includes binaries for Windows. To adapt the commands, it should be enough to simply run the ipfw commands from an elevated command prompt. For example:

ipfw pipe 1 config delay 100ms
ipfw add 100 pipe 1 ip from any to server-ip
ipfw add 101 pipe 1 ip from server-ip to any
1

I ended up using openvpn. It's a breeze to use and works pretty good. Pings is stable, no packet loss. The only future problem is the 100mb of traffic limit. I'm not sure how fast I'll get to that just by playing games.

7
  • I would recommend trying to insert artificial delays locally, if possible - VPNs do put you at the mercy of an external provider/network, so their performance can vary, especially for gaming. That said, if you happen to own a server somewhere (even a cheap VPS), you can set up your own VPN endpoint with a little more control. Another potential disadvantage of VPNs is they typically retransmit in case of packet loss, while most FPS games use UDP and simply accept the loss, catching up with future packets. Retransmitting can incur significant delays (usually seen as latency spikes).
    – Bob
    Commented Dec 15, 2013 at 15:00
  • Good info. Do you know how I could insert artificial delays locally? It seems like a very doable thing for a router, but so unusual that it's been hard to find.
    – rzb
    Commented Dec 16, 2013 at 3:07
  • That's exactly what my answer attempts to address, though it's untested on Windows, and it's just a guess. You could try anyway, if you want.
    – Bob
    Commented Dec 16, 2013 at 3:17
  • 2
    The one I suggested in my answer (dummynet) has nothing to do with VPNs. It's effectively a network filter that, in this configuration, can hold requests for a specified amount of time based on a condition. It is entirely local, and runs on your machine. It can also run on some routers, but that's certainly not necessary. The example adds a 100ms delay to any requests from your machine to xkcd. You could do likewise for requests from your machine to your game server, and then from the game server to your machine.
    – Bob
    Commented Dec 16, 2013 at 5:02
  • 1
    In my first comment on your own answer, I suggested a VPN endpoint that you own as being (marginally) better than some other VPN service. But my primary suggestion remains - use a local tool rather than routing through an external network.
    – Bob
    Commented Dec 16, 2013 at 5:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .