Can I make my net lag WORSE on purpose?

Discussion in 'Games' started by nagromme, Feb 15, 2007.

  1. nagromme macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #1
    I host game servers sometimes, and it's not fair when I play on a machine 20 feet away--my ping is around 10-20 while others get 40-100+.

    Is there any artificial way I can simulate a higher ping?

    (UT 2004 has the pktlag command for that, but I want something that works for ALL games--such as Prey.)

    Any thoughts?

    TIA
     
  2. MRU macrumors demi-god

    MRU

    Joined:
    Aug 23, 2005
    Location:
    Ireland
    #2
    Do you want to simulate a higher ping to make matches a little fairer ?

    If so you could just get hammered on liquor before you game and no matter how good your ping is - it wont be an advantage :D
     
  3. nagromme thread starter macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #3
    Correct :)

    And I know I can set my gfx detail high so I get a poor framerate, or abuse cough syrup, or stuff dust bunnies in my mouse, or other handicaps... but I'm looking for something that doesn't change the game experience, and works for all games.

    In other words, I don't want to even the odds in a frustrating way, I just want to erase my ping advantage so I play under the same conditions others do.
     
  4. butaro macrumors regular

    Joined:
    Nov 9, 2006
    Location:
    Canada
    #4
    Computer being 20 feet away from you being on your LAN? Best way would be to somehow re-route your connection to it through the internet WAN instead of LAN. How to do this though, im not sure :p
     
  5. Dagless macrumors Core

    Dagless

    Joined:
    Jan 18, 2005
    Location:
    Fighting to stay in the EU
    #5
    Maybe stick a wireless card in one computer? Though my own experience I've found wired computers have a much stronger connection whislt my iMac suffers.
     
  6. nagromme thread starter macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #6
    Actually it IS going through WAN I'm pretty sure--I connect via WAN game browser, not LAN. So, not literally 20 feet of signal travel, but the signal gets back to me really fast (sometimes under 10ms) all the same.

    Now, if there's some way that my signal is STILL not getting past my router, but in fact is acting just like LAN, then I'd be interested in any suggestions to make it more WAN-like. But I can't think how that could happen: the WAN game browser doesn't know my machines' internal IP addresses.

    (Also, I'm already joining via WiFi. The server is wired, but my play machine is not.)

    Thanks for the thoughts, keep 'em coming :)
     
  7. ~Shard~ macrumors P6

    ~Shard~

    Joined:
    Jun 4, 2003
    Location:
    1123.6536.5321
    #7
    You could run a torrent client in the background and seed something popular with your upload rate pinned... ;) :D
     
  8. nagromme thread starter macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #8
    Actually, I've heard of people doing things like that!

    That raises a second issue... net LOSS (which UT 2004 can also simulate via pktloss). But I don't feel the need to slow my data rate or add loss, just increase my ping :)

    (Also, any Internet traffic I add through my DSL will also degrade the server's own connection, and hurt other players.)

    Thinking out loud... is there any software that does something... anything... with all net traffic on a Mac (either incoming or outgoing)... which I could then use in some kind of a dummy way to add a little delay to my pings? Like Little Snitch or some security software? Is there anything that takes packets and does... something... before passing them along?

    What about bouncing my traffic through some remote proxy? Any free way to do that?

    Or maybe something I can set in my router that would delay ONE machine but not the other?
     
  9. ~Shard~ macrumors P6

    ~Shard~

    Joined:
    Jun 4, 2003
    Location:
    1123.6536.5321
    #9
    Could you set your NIC card settings to something ridiculous like 10 Mb half-duplex or something along those lines? What is your router/gateway situation? Can you enable or run any type of COS in your network? (Probably not, but just throwing stuff out there for ya... ;) :D)
     
  10. nagromme thread starter macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #10
    Ooh! There's a word in your post that I understood! "Network"! :)

    My setup, if it helps, is a 2wire "wireless gateway" DSL router. Server is wired to it directly, while my main Mac is connected over WiFi.
     
  11. ~Shard~ macrumors P6

    ~Shard~

    Joined:
    Jun 4, 2003
    Location:
    1123.6536.5321
    #11
    Sorry, I'm an Electronics Engineer and Technology Project Manager at a Service Provider and have my CCNA certification, I can't help myself... :p ;) :D :cool:

    In all honestly running a torrent client with your upload rate pinned will cause lag using a 2Wire. It's actually a bug which was only fixed in the very latest firmware release - it deals with the number of UDP sessions which are opened and how the 2Wire handles and processes them. Basically, you can;t even access your 2Wire's configuration page at times if you have torrents running! ;) :D

    In terms of COS (Class of Service, it's basically prioritization of bits/traffic) the 2Wire does not have the functionality required to do this.

    Hopefully that made a bit more sense... :eek: ;) :cool:
     
  12. butaro macrumors regular

    Joined:
    Nov 9, 2006
    Location:
    Canada
    #12
    Wow i can't believe i have some experience with 2Wires from my co-op at a telecom company hehe. Well what i would suggest if its possible(im not familiar with the options of 2Wires configuration page) Change your wireless signal transmission strength to lower. (TX Rate lower too) Then you can make yourself almost as slow as dial-up if your wireless supports that low.

    Suggestion 2. Find somewhere that you can VPN to, and play online while connected to the VPN. Sometimes while i was doing work at my school via VPN i forgot to disconnect then would play online and wonder why it was going slow only to find that my VPN was still connected.
     
  13. butaro macrumors regular

    Joined:
    Nov 9, 2006
    Location:
    Canada
    #13
    But wouldnt the 2Wire have QoS support, i thought thats pretty much standard nowadays
    edit: may have confused myself lol i never heard of CoS until you mentioned it
     
  14. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #14
    I think that there's probably a way to use the 'ipfw' command, particularly with the 'pipe' or 'queue' options, but I'm not familiar enough with it to recommend anything with confidence. Basically, you can use OS X's firewall to delay traffic... I'm just not sure exactly how to do so. :eek:

    Edit: This and this might help...
     
  15. nagromme thread starter macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #15
    Interesting... I will explore those suggestions. Thanks!

    I'm especially interested in anything that doesn't slow down my data rate/bandwidth--but merely increases the ping. (The strict definition of "lag," although gamers often cry "lag" when they mean "loss" :) )

    That way, ideally, my downloads and web browsing would be as fast as ever... except for starting ~1/10 of a second later.
     
  16. ~Shard~ macrumors P6

    ~Shard~

    Joined:
    Jun 4, 2003
    Location:
    1123.6536.5321
    #16
    Yeah, CoS is different from QoS. QoS deals more with performance metrics such as packet loss, jitter and delay with respect to traffic management whereas CoS is a queuing discipline. An algorithm compares fields of packets or CoS tags to classify packets and to assign to queues of differing priority. Unlike QoS, CoS does not ensure network performance or guarantee priority in delivering packets.

    So, if you could assign certain traffic with a certain CoS tag, you could effectively give that type of traffic lower priority, thus slowing it down in a busier network. :cool:

    Kay, that would be something a bit different from what I've been describing then, and a little more tricky...

    Hmm, you could always execute a DoS attack on yourself which would probably result in a very bad ping (if the host would be reachable at all!) ;) :D
     
  17. nagromme thread starter macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #17
    ipfw?

    I'm not much of a command-line man, but glancing over those scary links...

    Would this do the trick, adding 80 ping to all TCP and UDP traffic (just covering all bases)?

    Code:
    ipfw pipe 1 config delay 80
    ipfw add pipe 1 tcp from any to any
    ipfw add pipe 1 udp from any to any
    Would I just enter those lines into Terminal?

    And how would I get my system COMPLETELY back to its previous state when I was done?

    (I don't want to start down the road of a "hacked" OS X.)
     
  18. ~Shard~ macrumors P6

    ~Shard~

    Joined:
    Jun 4, 2003
    Location:
    1123.6536.5321
    #18
    rm *


    :eek:


    Okay, to eliminate any chance of a misunderstanding, yes, I am joking...
     
  19. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #19
    First of all, I'm pretty sure that this:
    Code:
    sudo ipfw flush
    will reset the firewall, but I'm not positive. I'll look more into it.

    Second, I'd think that you'd only want to delay certain (game) ports and not everything, right?
     
  20. nagromme thread starter macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #20
    Well, rather than have to find out WHICH ports all the different games use, I don't mind delaying everything. I'll simply turn it off when I'm not gaming.

    When you say "reset the firewall" would that lose my FW settings in System Prefs? (I've opened come custom ports for things like game server webadmin.)
     
  21. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #21
    I think it would.

    Searching for 'ipfw' here, it seems yellow knows what he's talking about. I think there's probably a way to use different rule sets in ipfw, and he could probably tell you how. You might want to try PMing him.
     
  22. nagromme thread starter macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #22
  23. ChrisA macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #23
    [Edit] I just read the man page for "ipfw". Yes, as I thought BSD (a.k.a. "Mac OS X") is very much like Linux. (I suspect BSD had these features first.) Looks like you can get the effect you want by forwarding packets to "dummynet".



    How much work are you willing to do to? What you really need to do is get a more sophisticated router, one that allows you to "throttle" the data rate based factors like the IP address of the computer and port numbers. Actually you don't want to control the rate in terms of bits per second, that would still give you short ping times because pings are short. You want to throttle packets per second and/or introduce some delay

    I know you can do this with Linux and IP tables. You would have to use a Linux/PC as a router. They make nice routers but are gross overkill unless you need some feature you can't get otherwise.

    But BSD has similar abilities. There may be a way to hand edit the firewall rules on a Mac OSX system to throttle packets based on IP address end points or port numbers. I'd bet a 6-pack that it could be done But my experience is with Linux and IP Tables where I know it's possible.

    Likely if you hunt around in /etc and read man pages you find that everything you need is already on your Mac. Or try posting a question about "throttling" on a BSD forum Ask them not how to do it but what you should read.

    For Linux info start here www.shorewall.net and read the part about "Linux traffic shaping and control". You have total control over how network packets are queued and dequeued, algorithms used and so on. but it goes back to the first question: "how much work are you willing to do?"

    Seeing as you are running your own game server one idea would be to throttle ALL traffic in and out of it so that EVERYONE has equal access to the server, basically you'd slow everyone down to the speed of the slowest person.
     
  24. nagromme thread starter macrumors G5

    nagromme

    Joined:
    May 2, 2002
    #24
    Thanks.

    "How much work?" Not much :) (I just want fairer play, it's not worth a lot of time, or any money.)

    Thanks for the info and links! All leads are welcomed.
     
  25. dralbertqnixon macrumors newbie

    Joined:
    Feb 15, 2007
    #25
    could one not create a long static route throughout the network to de-optimize efficiency? at least logically - this creates a longer route for packets to take on a network than required. This ultimately creates more traffic on your home LAN as packets are being forwarded, artifically to other computers on your network, analyzed by the host and sent on their way to the next destination and (at least from a logical standpoint) would add more time to your packets making their way from the router to your actual computer.

    this is all theoretical mind you (it has been awhile since my cisco days) - one requires a router capable of creating static routes and a bit of hands on testing.
     

Share This Page