OT: Anyone know how to create network latency?!

gtvlusso
gtvlusso Posts: 5,112
edited October 2010 in Commuting chat
Something that we usually try and avoid, but I need to create a latency for a test - need to create some TCP timeouts....

Any ideas - using Linux LDAP and SOAP....

Comments

  • jds_1981
    jds_1981 Posts: 1,858
    Can't physically unplug the wires?
    FCN 9 || FCN 5
  • gtvlusso
    gtvlusso Posts: 5,112
    Nope - boxes are in Germany! And that just gives you a disconnect!
  • cee
    cee Posts: 4,553
    can you configure the router or switch so that the TCP timeout is so small that it always does before the receipt is passed back to the originator?
    Whenever I see an adult on a bicycle, I believe in the future of the human race.

    H.G. Wells.
  • Pufftmw
    Pufftmw Posts: 1,941
    Check latency whilst uploading or downloading a number of 100mb files?

    Check latency whilst transfering big files to the site in Germany and back?

    Check latency whilst throwing an attack on your firewall?

    Install a dodgy NIC?
  • Set the default gateways along the way to take a circumambulatory route. Or even getting setting them up to route in a crcle and setting the max hops to a huge value...
  • dodgy
    dodgy Posts: 2,890
    Adjust MTU size f at least one of the routers on the way. Make it very small.
  • waddlie
    waddlie Posts: 542
    I would recommend re-setting the bipolarity on the transponster, myself.

    Failing that - Ctrl, Alt, Delete.
    Rules are for fools.
  • kelsen
    kelsen Posts: 2,003
    Just go for a ride on your bike and the problem will resolve itself
  • mzm70
    mzm70 Posts: 123
    Agree with dodgy, if you can ifconfig the local ethernet MTU size that should reflect back to the stack/application as MSS, if you can control the TCP send/receive window size then setting it down will require more acks/line trurn-around
  • Irvinet
    Irvinet Posts: 117
    Depends how serious a test you need. We ended up renting a 350km spool of fiber to test SAN replication latency over that distance....
    Roberts Audax - Raleigh Fixie - Thorn Tandem
  • gtvlusso
    gtvlusso Posts: 5,112
    mzm70 wrote:
    Agree with dodgy, if you can ifconfig the local ethernet MTU size that should reflect back to the stack/application as MSS, if you can control the TCP send/receive window size then setting it down will require more acks/line trurn-around

    May screw up my SSH session to a box I have no way of resetting! Was hoping to be able to buffer packets recvd by the NIC....
  • SimonAH
    SimonAH Posts: 3,730
    Reverse polarity, throw the third switch!
    FCN 5 belt driven fixie for city bits
    CAADX 105 beastie for bumpy bits
    Litespeed L3 for Strava bits

    Smoke me a kipper, I'll be back for breakfast.
  • cee
    cee Posts: 4,553
    Can you put a box in the way?

    on linux, run netem which as it suggests...does network emulation..you can mimic latency etc....

    OR on FreeBSD....try dummynet...

    same thing really.
    Whenever I see an adult on a bicycle, I believe in the future of the human race.

    H.G. Wells.
  • davis
    davis Posts: 2,506
    You can play with "tc" -- the traffic control manager for your network stack. It's probably already available for your distro.

    If you need lots (and lots) of control, then I believe you can use iptables to limit it to certain traffic, although the only use I've seen of iptables for latency is to implement QoS to reduce latency on certain kinds of traffic.

    Wow, this *is* OT :-)

    Edit: Ah, knew I'd seen it before: LagFactory looks to be a useful wrapper around tc, though I've not actually used it.
    Sometimes parts break. Sometimes you crash. Sometimes it’s your fault.
  • set network to download 100 torrents
  • setup http://wanem.sourceforge.net/ and use it as your gateway
  • Have you tried turning it off and back on again?

    If that doesn't work, try reinstalling Windows and all your applications.

    (What? Isn't that the IT department's standard advice?)
    Swim. Bike. Run. Yeah. That's what I used to do.

    Bike 1
    Bike 2-A
  • itboffin
    itboffin Posts: 20,064
    if you have cisco routers each end then an extended ping test with variable sweeping packet sizes, that will lay down a world of hurt on any WAN connection.

    If not use a tool like iperf to generate a massive amount of bi directional traffic across the link then run you latency test at the same time, once the network overload is over your session will return to normal.

    again with the cisco end to end WAN safe guard yourself by setting the routers to reload 10 mins after your test ends, just in case you kill the devices (unlikely) you can always log back in and cancel the reboot.

    As for your SSH sessions you're using screen or byobu aren't you? :wink:
    Rule #5 // Harden The Feck Up.
    Rule #9 // If you are out riding in bad weather, it means you are a badass. Period.
    Rule #12 // The correct number of bikes to own is n+1.
    Rule #42 // A bike race shall never be preceded with a swim and/or followed by a run.
  • itboffin
    itboffin Posts: 20,064
    Greg66 wrote:
    Have you tried turning it off and back on again?

    If that doesn't work, try reinstalling Windows and all your applications.

    (What? Isn't that the IT department's standard advice?)

    ssssh old man, is that nurse I hear? back to bed now you have finger painting in the morning.
    Rule #5 // Harden The Feck Up.
    Rule #9 // If you are out riding in bad weather, it means you are a badass. Period.
    Rule #12 // The correct number of bikes to own is n+1.
    Rule #42 // A bike race shall never be preceded with a swim and/or followed by a run.
  • Norky
    Norky Posts: 276
    cee wrote:
    Can you put a box in the way?

    on linux, run netem which as it suggests...does network emulation..you can mimic latency etc....

    OR on FreeBSD....try dummynet...

    +1. netem here and +1 to wot davis said.

    Code written to simulate various network failure conditions is the way to go. Other methods are a little... clunky.
    The above is a post in a forum on the Intertubes, and should be taken with the appropriate amount of seriousness.