Forgot your password?
typodupeerror
Networking Operating Systems Software Windows IT Linux

Using Linux To Make a Slow, Awful WAN Connection 110

Posted by timothy
from the too-bad-to-be-true dept.
Julie188 writes "This is a brilliant little Linux trick from Windows fanboy Tyson Kopczynski. He wanted to test a new Windows 7 feature called Branch Cache, which caches remote data on the local machine to reduce traffic on a stressed out WAN connection. But how to fake a crappy WAN? Linux. 'The command that I executed (tc) made use of Linux Traffic Control (a kernel thing) which allows me to easily interject 100ms latency on eth1. Boff, Bonk, Pow, Plop, Kapow, swa-a-p, whamm, zzzzzwap, bam ... instant WAN crappiness,' he writes."
This discussion has been archived. No new comments can be posted.

Using Linux To Make a Slow, Awful WAN Connection

Comments Filter:
  • Lol. (Score:2, Funny)

    by Anonymous Coward
    Linux: Because sometimes you want slow and awful.
    • Re:Lol. (Score:5, Funny)

      by ushering05401 (1086795) on Thursday April 09, 2009 @10:28PM (#27527227) Journal

      Linux, 'cause even Windows techs need real tools sometimes.

      • Re: (Score:1, Informative)

        by Anonymous Coward

        Let just say its if you follow the networking security setting from MS, you will not have this problem

        • Re: (Score:1, Informative)

          by Anonymous Coward

          Obviously the moderator who gave this an offtopic rating didn't read the fucking article. Its a direct quote.

          What a maroon!

      • by Blakey Rat (99501)

        Windows has tools to do that. We used one when I was testing Xbox 360 Live games for MS that ran on Windows 2000 over ICS, and could inject any amount of latency or packet-loss you wanted.

        This is just some guy going with "what he knows" instead of bothering to look for another solution. To suggest it's some kind of deficiency with Windows is stupid.

        • by h4rr4r (612664)

          This windows tool is free and the source is available?

          ICS is not free last I checked.

          • by Blakey Rat (99501)

            I really don't know, I only used it when I worked at Microsoft, and obviously when you work for them the licensing isn't that big a deal. I'm nearly 100% sure it was, at the very least, part of the Xbox 360 development kits, which means it could also be a standard component of Visual Studio. But I really don't know.

            Also, who cares if the source is available as long as it works?

            • by h4rr4r (612664)

              For when it does not work, so you can fix it.
              Or for when MS or whoever stops supporting it.

  • so.... (Score:5, Funny)

    by Anonymous Coward on Thursday April 09, 2009 @10:24PM (#27527209)

    Linux has to be forced to degrade network performance. Windows does it automatically.

    Did MS ever fix that 10 TCP/IP connection limit?

    • Re:so.... (Score:5, Funny)

      by Anonymous Coward on Thursday April 09, 2009 @10:30PM (#27527243)

      Did MS ever fix that 10 TCP/IP connection limit?

      What? So if I open a tenth browser tab I won't be abl

    • Re: (Score:3, Interesting)

      by Anonymous Coward

      I think the still haven't fixed the thing where Vista is limited [technet.com] to 100mbps if you are also playing audio [slashdot.org].

      They should have stuck with the BSD network stack. As many bugs as they inserted into it to make it vulnerable, it still would pass traffic at the full data rate.

      • Re: (Score:3, Interesting)

        by digitalunity (19107)

        I've found when transferring files across my local network, if I have any audio applications open I can't get more than 28-30 Mbps out of my wireless. If I close the audio application, I can often get over 40 Mbps.

    • Re: (Score:2, Informative)

      by Vectronic (1221470)

      No, XP, Vista, Win7 all have the limit, but I'm not so sure about Server versions.

      They don't consider it a "flaw", as they boast it as malware limiting, and under most situations, it's irrelevant because 10 new connections a second is about 5 times more than most applications need. Excluding P2P, and a few Games.

      Event ID: 4226 [microsoft.com]

      However, they haven't made it any harder to bypass, Hex editing, or one of a few automated versions out there for XP, Vista and Win7 [google.com].

      • they boast it as malware limiting

        That's like a car's windows not being able to close fully and the manufacturer saying "it's a good thing too, because the air conditioning sucks!"

      • by kenh (9056)

        First off, how many incomplete outbound TCP-IP connections do you really need to have open inside of one second?

        Windows XP, Vista, and Windows 7 are all DESKTOP OS, and the stated goal is to limit the spread of certain types of malware...

        If you read the article referred to, the excessive outbound connection attempts are not dropped, they are delayed to maintain a manageable flow of information.

        If I were to run a port scanner against a /24 subnet, that would mean it would take at least 2.6 seconds, since it

        • by mhall119 (1035984)

          First off, how many incomplete outbound TCP-IP connections do you really need to have open inside of one second?

          Eleven? Maybe twelve? I don't know, and I'm pretty sure Microsoft doesn't know either, so why are they deciding for me?

          Windows XP, Vista, and Windows 7 are all DESKTOP OS

          Oh, so that's a good reason to limit their networking potential? Every other "DESKTOP OS" can do more than 10.

          and the stated goal is to limit the spread of certain types of malware...

          Wow, security through....what, sloth? That's a new one on me.

          Must it be able to spew all 256 connection requests instantly?

          If that's what I want it to do, why shouldn't it?

          A little research leads me to the conclusion that this is a meaningful effort to have a positive impact on the spread of malware on Windows XP, Vista, and Windows 7 desktops.

          Perhaps a little more research is in order then. Not only does it not seem to be effective as stopping the spread of Windows malware, but not having this limit hasn't s

  • by seebs (15766) on Thursday April 09, 2009 @10:32PM (#27527253) Homepage

    Why not just use a Vista box and play an MP3?

    • Re: (Score:1, Funny)

      by Anonymous Coward

      Because that would take a good 4 or 5 hours to install.

      But I guess MS would call that a strength of Vista: It takes hours to setup before it can fail while you can make Linux fail right away!

    • Re: (Score:2, Informative)

      by DrDitto (962751)
      Funny. In 1996, my Windows NT 4.0 workstation box running on a Pentium 166Mhz machine would never skip playing an MP3 no matter what I threw at it. I could start 12 simultaneous programs and the WinAMP MP3 still didn't skip. I didn't get skip-free Linux MP3 playback until about 2002 with a 1.5GHz machine. Move a window, playback skipped.
      • by LoRdTAW (99712)

        I believe the skipping is a limitation with X windows and not the Linux kernel. When you click to drag, the process that spawned the window is "paused" until you let go of it. This prevents X windows from going crazy trying to redraw the windows while moving which could cause problems. At least that what I read somewhere.

        • by uid8472 (146099)
          The thing you read somewhere is wrong. There does exist the XGrabServer call, which some window managers use in some cases (mostly older WMs, I suspect), but the documentation strongly recommends using it as little as possible. In no case is anything like that inherent in X11.
        • I've seen this behaviour too, on a board with a craptastic Via Unichrome Pro IGP.

          I suspect something locks down the CPU while screen redrawing is occuring.

      • by Anonymous Coward
        It's been 13 years. In Moore years that's a long time. Let it go.
      • by Lorens (597774)

        You wanted BeOS . . .

      • by Tubal-Cain (1289912) on Friday April 10, 2009 @03:01AM (#27528673) Journal

        my Windows NT 4.0 workstation box running on a Pentium 166Mhz machine would never skip playing an MP3 no matter what I threw at it.

        Try throwing bricks.

        • my Windows NT 4.0 workstation box running on a Pentium 166Mhz machine would never skip playing an MP3 no matter what I threw at it.

          Try out the windows...

      • Yeah, winamp really didn't stop for anything back in those days. On my win9x-system it would happily play through some bluescreens as well.

        • Had the same experience. In winamp there is an option about size of the buffer used for decoded audio. I usually set it to 5000ms but I remember it can be set much higher. This allowed for winamp to play even during the blue screen for limited time, often until the song ends depending on cause of the BSoD.
      • by toddestan (632714)

        Winamp runs in the "high" priority class, which meant that few things could interupt it. Despite this being something that many people would frown upon, it actually worked pretty well. You should be able to do basically the same thing in Linux on older hardware.

  • Goal? (Score:2, Insightful)

    What is the point of doing this? Is this even of remote interest to anyone other than the author of the article? If there's a genuine reason for this to be important or at least intriguing, someone please speak...
    • Re:Goal? (Score:5, Informative)

      by umeboshi (196301) on Thursday April 09, 2009 @10:43PM (#27527327)

      This seems to be valuable in situations where you are developing an application that will be accessing a database behind a dsl firewall. It would be nice to be able to profile the performance on your local network, instead of having it run too slowly to be used in the field. This happened to me once, and I fixed the problem by using a subselect, instead of multiple sql commands, but this wasn't readily obvious as the library was hiding the details of the process, and the speed of the local network compensated for the ineffiency(sp) of the code.

    • What is the point of doing this?

      Actually, I was thinking of adding bandwidth throttling to certain parts of a subnet. This info is exacly what you need when you don't know where to start (for me at least).

      Shit wifi performace is a standard Linux 'feature'

      Com on now, switch distro's. How long did you research? Oh wait, your friend said "here, this is the distro for you..."? Try http://www.pclinuxos.com/ [pclinuxos.com], or you could just accept that the US government has outlawed the OEM's of wi-fi from open sourcing the drivers. (some clueless dumbshit thought it would keep hackers from destroyi

    • Sure it is interesting. Lots of times you can't adequately simulate 'real world conditions' in an office LAN or even with consumer grade connectivity.

      Example: At my job we operate a work-at-home business that transmits essentially a voip phone call from various locations of a certain restaurant chain to the worker's home over two dsl lines, but without the luxury of being able to 'redial'. The only DSL we can actually get in our office is too close to our datacenter (under 5 hops) to adequately simulate

    • by FooAtWFU (699187)
      My company has a Linux box (named "slow-router") that does exactly that, to simulate network latency talking to remote devices over the network. I think it might even simulate random packet loss and such as well. It's useful to be able to do, but it's also not all that difficult... or newsworthy... good blog post, poor Slashdot post.
      • by phayes (202222)
        I beg to differ, for me, this is geek news. I found TFA & the following discussion interesting. It touches subjects that interest me peripherally but that I never needed to research. Now, I've been able to discover some interesting tools it would have taken me a while to discover otherwise.
    • Re: (Score:2, Interesting)

      by Orion (3967)

      I just went through a similiar exercise at work, to determine if TCP was a good enough protocol for a slow point to point wireless connection with a high bit error rate.

      We ended up using DummyNet on FreeBSD, mostly because we happened to have a high-end FreeBSD box handy...

    • by cheetah (9485)

      This really is a something that has been around for a long time. One of the most interesting uses I have found for it is; simulating the effects of satellite Wan connections. Most of these links have about 600ms of end-to-end latency and without something like this simple tc command it is difficult to simulate this without actually hooking up to a real satellite connection.

      Other uses; I once bandwidth limited one of my old roommates. Every week I would shave a little bit more bandwidth off of his connect

    • by godrik (1287354)
      well, tc is used on research grid on networking, tcp slow start, peer to peer simulation... It is clearly not new and I do not understand why this is posted on /. today...
    • by iYk6 (1425255)

      I tried playing an online linux game called Daimonin. It is kind of like a multiplayer of the old Ultima's. AFAIK, it still suffers from a serious problem, in that it doesn't do any client side prediction, and so there is severe latency between every move and every action (about half a second, which makes the game too painful to play). I tried to fix it, and started by attempting to introduce some lag on my local connection, but didn't find a way to do it.

      I have since discovered several methods of making a

    • by RAMMS+EIN (578166)

      ``What is the point of doing this?''

      What is the point of simulating a slow, lossy network? Why, figuring out how your setup would behave if it were in a real slow, lossy network, of course!

      I use tricks like this quite frequently when developing network software and network protocols. Especially when I'm working on my forward error correction protocol, because that is _intended_ for slow, lossy networks. Alas, my Ethernet is very fast and very reliable. ;-)

    • It is genuinely useful. One of the things I needed to do for my PhD was test a protocol I'd been designing in high-latency environments. For the early testing, I used the FreeBSD box under my desk as the server and my laptop as the client, and just told dummynet to add 100ms of latency into the connection. Later, I added some real world tests, but this was very convenient because the latency was entirely deterministic and so the results were reproducible. You can control latency, packet loss, and throug
    • by bunratty (545641)

      At my wife's company, most employees have Windows XP laptops and can connect to the file server at work using openVPN. Even though latency is only 40 ms, Windows XP is incredibly slow at accessing the file server. Even simple operations such as getting a directory listing can take several seconds. Opening a small Word document takes over 30 seconds.

      If Windows 7 has a feature that speeds up this access, it's going to be of great interest to many people. Of course, if Microsoft fixed the poor performance of C

  • that Linux is awesome for research!

  • so (Score:4, Insightful)

    by Idimmu Xul (204345) on Thursday April 09, 2009 @10:41PM (#27527315) Homepage Journal

    how did that windows caching stuff he was testing out perform? or is this article just a synopsis of the man page for a common command .... ?

    • Followup coming... (Score:3, Informative)

      by rkhalloran (136467)

      Author of TFA said his original intent was to highlight using Linux to simulate network crapfulness, but enough folks have asked your question that he's planning a followup with the actual caching results.

      SCOX(Q) DELENDA EST!!

    • by AcquaCow (56720)

      WANem is a FANTASTIC product.

      I use it heavily at work for generating latency into our net applications to see how they might behave across really shitty links.

      It's great injecting out of sequence and randomly ordered packets at the click of a button =)

        -- Dave

  • by hwyhobo (1420503) on Thursday April 09, 2009 @10:57PM (#27527451)

    Such capability is very useful to network folks to predict application behavior and best management approaches in various environments. We used FreeBSD for that purpose, but the effect was the same. We injected 350ms latency in each direction, and presto - satellite communication. That is enough to cripple TCP connectivity through a sizable pipe (latency will preclude the flow from taking entire pipe). By testing various acceleration methodologies, you can see first hand which one will allow you to fully utilize the bandwidth you are paying for, all in the comfort of your lab.

    • http://wanem.sourceforge.net/ [sourceforge.net] is a great tool for this. We use it at work to test thin clients over simulated WAN links. It has a ton of options (latency, jitter, packet loss, bandwidth, etc).
    • by srvivn21 (410280)

      Such capability is very useful to network folks to predict application behavior and best management approaches in various environments. We used FreeBSD for that purpose, but the effect was the same. We injected 350ms latency in each direction, and presto - satellite communication. That is enough to cripple TCP connectivity through a sizable pipe (latency will preclude the flow from taking entire pipe). By testing various acceleration methodologies, you can see first hand which one will allow you to fully utilize the bandwidth you are paying for, all in the comfort of your lab.

      Even better, with dummynet on FreeBSD, you can add loss to the equation (http://www.cs.unc.edu/~jeffay/dirt/FAQ/comp249-001-F99/dummynet.html [unc.edu]) to simulate a dirty satellite link (such as one in need of a re-peak). Good times...

  • Throw in a 300 baud modem [wikipedia.org] if you want a crappy network connection. You can read a newspaper (dead tree edition) while a screen of text is downloading.
    • I used to do something similar, with a couple of modems, a pbx, and windows internet sharing. That was my slow internet test for a while. Not 300 baud, but good enough for what I was doing.
    • Re: (Score:3, Funny)

      by mazarin5 (309432)

      I like how you felt the need to provide a wikipedia link, just in case we wouldn't know what that was.

      Now if you'll excuse me, I think I hear some kids on my lawn.

      • by creimer (824291)
        When I was a lead tester at Accolade/Infogrames/Atari (same company, two owners, multiple identity crises), I had younger tests who didn't think video games existed before the Playstation. They were amazed that I played Pong when it first came out. They were shocked when I introduced them to another tester who tested board games in the 1970's. You can't always assume that the youngsters know what you're talking about.

        Besides, when was the last time you saw an acoustic modem? ;)
  • ... and you might find out about NISTnet, which has been around for YEARS... NISTnet does the same thing as this, on Linux, and also includes a statistical latency delay model which simulates real world conditions.

    • by bazim2 (625704)
      Unfortunately, NISTnet can only delay IP traffic, netem works at the ethernet layer and can delay everything. One of the great things about netem is that it can be set up to act as a bridge. Think of it as an ethernet cable with 100ms delay. NISTnet is great but it can't do that.
  • At work we deal with satellite links in northern offices (100ms crappy? try 800ms... ), testing network apps and such it would be handy to have had this feature back when I did this sorta thing.

    Good to file away in the back of my head for future reference.

  • tc basically allows you to activate netem (a network emulator in linux). I dont know about now, but when I had used it for a project a year ago, you had to compile your kernel with netem enabled. tc then allowed you to modify your link properties to emulate wan links. Had used this with tcpprobe to analyze the performance of an Inverse Increase Additive Decrease congestion control algorithm that we had written for academic purposes (adapted from http://nms.lcs.mit.edu/papers/binomial-infocom01.pdf [mit.edu]) and com
  • Try using Wanem http://wanem.sourceforge.net/ [sourceforge.net] You can even download it as a vmware virtual appliance.

  • Quality reporting (Score:1, Flamebait)

    by timmarhy (659436)

    this is the kind of quality stories i've come to expect from kdawson/timothy.

    and you wonder why we all choke with laughter when you expect to be considered journalists.

    • by KiloByte (825081)

      and you wonder why we all choke with laughter when you expect to be considered journalists.

      Have you ever looked at the quality of regular journalists? If kdawson/timothy make an error, it is quickly pointed out by the readers. Traditional journalists? Same or worse error rate, no corrections.

  • Though not free (there is a trial), I played around with an appliance with a program called Lanforge installed. It's pretty sophisticated. You can setup a number of different "errors" (packet loss, jitter, delay, etc) and it can cycle between them - never constantly the same. It runs on Linux and Windows for sure, but I'm unsure about other OS's. It will also "learn" link statistics between two particular nodes and save that configuration for testing.

    Kind of neat, but I'm unsure about how much license costs

  • by K. S. Kyosuke (729550) on Friday April 10, 2009 @05:22AM (#27529193)
    ...as demonstrated by "VIM rocks" in his text.
  • Amazing, Linux can mess up my LAN. Next you will be telling me it can make me bald, fat and unattractive to women ...
  • These two queuing disciplines allow you to create a fairly complete WAN simulator.
    There are however few gotchas:
    • Precise Bandwidth limitation at high speed required lots of CPU, powerful bus and quality network adapters (read: server class hardware)
    • If you want to simulate a complex network and more than two nodes, you'll need IFB (or IMQ) in order to shape incoming traffic and yet some topologies would stay out of reach.
    • Keep in mind that there are two types of latencies: the "serialization" latency that
  • One of the great features of netem is that it isn't restricted to being used on a router. If you bridge two network interfaces together you can essentially use netem to make a device which looks like a faulty link. This can be plugged and unplugged [or routed using a VLAN infrastructure] into anywhere in your network without reconfiguration of any IP details on the machines under test.

"Right now I feel that I've got my feet on the ground as far as my head is concerned." -- Baseball pitcher Bo Belinsky

Working...