×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Simulating Network Latency?

Cliff posted more than 9 years ago | from the network-testbed-technology dept.

Hardware Hacking 76

ixmo asks: "I've just come around an interesting problem: to simulate low-bandwidth network links without buying expensive WAN simulators, I can connect two old Cisco routers back to back with serial cables, and control the bandwidth via the 'clock rate' IOS command, but how can I simulate network latency? Is there some OS tool or patch (for Linux/OpenBSD) that allows for tuning of network delay? Any hints?"

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

76 comments

FreeBSD Dummynet (3, Insightful)

Inominate (412637) | more than 9 years ago | (#10028319)

FreeBSD's dummynet can quite easily do it. I suspect the same of openbsd and linux.

What kind of question is this for ask slashdot?

Re:FreeBSD Dummynet (0)

Anonymous Coward | more than 9 years ago | (#10028404)

Indeed...sounds like a pretty simple kernel patch to me.

Re:FreeBSD Dummynet (1)

MrWa (144753) | more than 9 years ago | (#10029488)

What kind of question is this for ask slashdot?

The typical kind of question that involves some topic already explored indepth somewhere else on the web and has a potential solution.

Re:FreeBSD Dummynet (2, Interesting)

Drakon (414580) | more than 9 years ago | (#10030633)

What also may work is lowering the granularity of the timer in the kernel,
ie HERTZ=1

Re:FreeBSD Dummynet (4, Informative)

jesup (8690) | more than 9 years ago | (#10030790)

Dummynet can absolutely do it. Put a PC with BSD & Dummynet and two ethernet interfaces in to simulate delay/loss/BW restrictions/etc. Very configurable. You can chose which packets are affected.

Worst problem: fixed delay, not bell-curve/whatever. You can roughly approximate delay variance by several rules of varying probabilities. Also, loss is random not bursty. For most testing, this is fine.

It can take a little while to get used to configuring it. Don't forget to make it act like a network in both directions!

Re:FreeBSD Dummynet (4, Informative)

Piquan (49943) | more than 8 years ago | (#10031301)

Dummynet can absolutely do it. Put a PC with BSD & Dummynet and two ethernet interfaces in to simulate delay/loss/BW restrictions/etc. Very configurable. You can chose which packets are affected.

You betcha. At a job I previously had, supporting TCP/IP for a large Unix producer, I had a FreeBSD box set up for just this purpose. It only had one ether interface, and was in a different part of the building from the test lab, but that didn't matter; I'd use PPP over TCP to connect to the test machines.

I'd use it to test how different OSs (including our own) would handle different bandwidth*delay products, packet loss, etc. For instance, one I found out that a customer was having problems with a lossy WAN connection to an NT server. I experimented with high packet loss percentages, and changed the rules to narrow down the problem. Turns out that NT won't retransmit a FIN packet, at least not back then.

When I left that job, my coworkers insisted that I show them how to set up that box to run those kinds of experiments.

Quite an educational experience, too. It's one thing to read Richard Stevens describing congestion avoidance algorithms; it's something else to watch them in action.

Re:FreeBSD Dummynet (0)

Anonymous Coward | more than 8 years ago | (#10034901)

I have a freebsd 4.8 box for this exact purpose at work. It works very very well.

Some things to look out for:

You can create bursty traffic loss eumlation by scripting it. ie, changing latency, loss and available bw every few seconds to create a "jittery" pipe.

If you have to re-create a large pipe, ie emulating a t3 with 100ms latency, be sure to use a large queue and watch the stats for drops. This needs to be tuned. Sane is true with the dummynet driver, nmbufs, etc.

Re:FreeBSD Dummynet (0)

Anonymous Coward | more than 9 years ago | (#10036639)

FreeBSD's Dummynet is crude in comparison to the Linux kernels QoS faclilities. To mention a few- CBQ, HTB, RED etc. Funny that I don't see much mention of these here though.

Take a look at the Linux advanced routing and traffic control howto. [lartc.org]

Re:FreeBSD Dummynet (0)

Anonymous Coward | more than 9 years ago | (#10054297)

FreeBSD's Dummynet is crude in comparison to the Linux kernels QoS faclilities. To mention a few- CBQ, HTB, RED etc. Funny that I don't see much mention of these here though.

Please pay attention - Dummynet is a tool that make a job done. Original poster asked for tool which can simulate low bandwith network. It is not task for QoS facilities.

BTW, Dummynet can do RED - please RTFM.

The solution is obvious. (5, Funny)

mayoff (29924) | more than 9 years ago | (#10028323)

Use a longer cable.

Re:The solution is obvious. (4, Funny)

BrynM (217883) | more than 9 years ago | (#10028423)

Use a longer cable.
Or do what my last job did: Use CAT-3! Oh, you're just testing... Too bad they weren't.

In related news (4, Funny)

WasterDave (20047) | more than 9 years ago | (#10028716)

It's good fun telling people who come down here to visit (New Zealand) that the twists in our cat 5 go the other way - because the earth's magnetic field is reversed.

Made all the better when they discover that southern hemisphere monitors actually *are* different for exactly the same reason.

Dave

Re:In related news (2, Insightful)

menscher (597856) | more than 9 years ago | (#10028967)

Made all the better when they discover that southern hemisphere monitors actually *are* different for exactly the same reason.

I call bull. The Earth's magnetic field is far too weak to have an effect on anything like that. Besides, don't you think someone might notice if it mattered whether your monitor was facing north or south? You really shouldn't believe everything your BOFH tells you.

Re:In related news (0)

Anonymous Coward | more than 9 years ago | (#10029237)

This is true. If the earth's magnetic field is strong enough to move a compass needle, don't you think it is strong enough to move electrons? In fact, I have had several monitors that warned me that moving the monitor while it is on will affect the geometry. So of course I tested it with varying degrees of success.

Links:

Northern vs. Southern Hemisphere Monitors [webopedia.com]
Google Search: CRT southern hemisphere [google.com]

!bull (2, Informative)

jamesh (87723) | more than 8 years ago | (#10031241)

I don't know the science behind it, but I did used to work in a manufacturing plant for a certain very large computer manufacturer (whose name has 3 letters in it), and the part numbers for monitors for southern and northern (and in at least 1 case, equatorial) units was in fact different for precisely this reason.

To be fair though, I did try out a nothern hemisphere monitor once (I am in Australia) and don't remember noticing any difference.

There are variations between the magnetic lines of the earth all over the place though (look at a map of variations between 'true north' and 'magnetic north'), maybe a northern hemisphere monitor in the southern hemisphere would start to show discoloration at the extremes of these.

I think the degauss function of a monitor is to neutralise any magnetic field built up in the grid or mesh of the monitor, rather than do anything about the magnetic field of the earth itself.

Re:!bull (1)

kormoc (122955) | more than 9 years ago | (#10039077)

I think the degauss function of a monitor is to neutralise any magnetic field built up in the grid or mesh of the monitor, rather than do anything about the magnetic field of the earth itself.

Damn, I thought it actually floped the field around, hence why everyone has to degause every few seconds cause those assholes in the other side have the nerve to flip it to them!

Re:In related news (1)

lhaeh (463179) | more than 8 years ago | (#10032765)

My monitor has in its OSD controls a utility for setting up your monitor based on the direction its faceing. Its a large professional monitor so I assume thats why.

Re:In related news (2, Informative)

FireFury03 (653718) | more than 9 years ago | (#10042945)

One of the reasons you have to calibrate your own monitor's picture rotation is because it is affected by the local geomagnetic field.

He's right about the monitors (1)

Craig Ringer (302899) | more than 9 years ago | (#10053664)

It's for that reason that many ultra-high-end CRTs are unavailible in the southern hemisphere. It's just not worth makign the variant. I understand they can be converted after manufacture at some expense, however.

I work for a newspaper and we need _good_ monitors for colour correction. I'm all too familiar with this issue (and the issue of not having the money for the monitors we need anyway... *sigh*).

Re:In related news (1)

Myself (57572) | more than 9 years ago | (#10030801)

I call bull too. After changing my monitor's orientation, the colors are skewed, until I hit the degauss button. Problem solved. Turning it umop apisdn causes the same problem, until I hit the degauss button.

In the past, monitors weren't large enough to be affected much by shadow mask magnification, so they didn't include their own degaussing coils. It was easy to screw one up with a magnetic field back then, and it might take the user a while to find someone with the tool to fix it. (Video arcades usually have hand-held degaussers, that they might let you borrow.)

There may have been a difference in the past, but I assure you there's none now.

Re:In related news (1)

SagSaw (219314) | more than 9 years ago | (#10035946)

Made all the better when they discover that southern hemisphere monitors actually *are* different for exactly the same reason.

A bit off-topic, but can somebody elaborate a bit on this? I know monitors use coils to bend the electron beams in order to scan the beams accross the surface of the monitor, but I don't think this would be affected by the northern vs. southern hemisphere (anymore than turning your monitor to face south instead of north).

Re:The solution is obvious. (1)

sleepypants (599905) | more than 8 years ago | (#10033603)

Use a longer cable.

And of course, make sure the cable is coiled up like hell rather than straight...

Download a copy of SP2 (3, Interesting)

Marxist Hacker 42 (638312) | more than 9 years ago | (#10028324)

This may be the oddest use for this yet- but any large file would work >200MB. Set up your Serial port for a slow connection, say 110 baud, then start an ftp transfer in the background of SP2 from one machine to the other. That ought to simulate latency errors just fine.

We use Dummynet (4, Informative)

jshare (6557) | more than 9 years ago | (#10028365)

We use FreeBSD and its "dummynet" capabilites. (Perhaps other BSDs have this as well?)

You can get m0n0wall and stick it on random hardware. I think you then have to recompile the kernel to enable dummynet.

We use a Soekris 4501. It'll only bridge upto about 50mbit of traffic, but if you want to simulate T1 speeds it'll be fine. Beefier hardware (the soekris box is roughly a 133MHz 486) will probably let you max out at wire speed.

Stand next to the router and... (4, Funny)

stefanlasiewski (63134) | more than 9 years ago | (#10028366)

Stand next to the router and simulate rough conditions... ... yank out the wire a couple times. ... play kick the router. ... simulate lightening by plugging a network cable into a 220V plug ... paint sunspots on your face and spew out some EMF pulses like the sun.

Re:Stand next to the router and... (1)

whee (36911) | more than 9 years ago | (#10029091)

[snip]. paint sunspots on your face and spew out some EMF pulses like the sun.
I'm imagining some pimply geek popping zits next to the router. Solar flares.

Re:Stand next to the router and... (4, Funny)

Piquan (49943) | more than 8 years ago | (#10031309)

Don't forget the most fun part of cable simulation: the backhoe!

Re:Stand next to the router and... (2, Informative)

Piquan (49943) | more than 8 years ago | (#10031321)

simulate lightening by plugging a network cable into a 220V plug

Enter the Etherkiller [fiftythree.org].

Re:Stand next to the router and... (0)

Anonymous Coward | more than 9 years ago | (#10085673)

Haha, I was about to link to that too.

Porn (-1, Flamebait)

Anonymous Coward | more than 9 years ago | (#10028386)

Go to a couple of machines in your office and start downloading as much porn as you possibly can. Use p2p services or USENET so you can download some full-length features. When you've got five machines chewing away at stuff like "Jenna Loves Brianna", "Cum Buttered Cornholes -- The Director's Cut", and "Yank My Doodle Dandy" you'll get some nice latency in the network.

FreeBSD (-1, Redundant)

psyconaut (228947) | more than 9 years ago | (#10028399)

Use "DUMMYNET".

BTW....wouldn't have taken more than 2 minutes to Google that!

-psy

Re:FreeBSD (0, Redundant)

NanoGator (522640) | more than 9 years ago | (#10029691)

"BTW....wouldn't have taken more than 2 minutes to Google that!"

The point is to discuss it, not to be a human Google. Read some of the other posts that were modded up.

Dummynet is great, but... (1)

Bri3D (584578) | more than 9 years ago | (#10028561)

What if you want to simulate two multiplatform networks connected? I think this guy is looking for hardware because the commercial latency simulators are ~$2000.

Dumbass (1)

b00m3rang (682108) | more than 9 years ago | (#10028790)

If the poster was looking for hardware, they wouldn't have posted:
"Is there some OS tool or patch (for Linux/OpenBSD)"
I know people don't like to RTFA, but at least read the fucking post you're replying to.

Re:Dumbass (1)

Bri3D (584578) | more than 9 years ago | (#10029830)

He still may want a hardware solution, seeing as how he mentioned one. And people should RTFC(comments) before posting "Try Dummynet!" toplevel 10 times.

$2000 will also buy you... (1)

tepples (727027) | more than 8 years ago | (#10032587)

I think this guy is looking for hardware because the commercial latency simulators are ~$2000.

So is a pair of good PCs running free latency simulation software.

Simple (5, Funny)

Anonymous Coward | more than 9 years ago | (#10028807)

Sign up with Comcast.

Re:Simple (2, Informative)

cfallin (596080) | more than 9 years ago | (#10029780)

AMEN TO THAT. All my friends in the area and I are on Comcast (still better than DSL, considering price), and a few in particular seem to have outages every week or so. There are random incidents of packet loss every few days that cause Trillian to drop my AIM connection. It's really quite annoying, but for the price (compared to a quality T1) you can't complain much.

Re:Simple (2, Informative)

michael_cain (66650) | more than 9 years ago | (#10045163)

Oddly enough, Comcast has a Linux-based program named NETSIM that does exactly what the original article was looking for. It emulates queueing delays for a variety of access technologies (dial-up, DSL, etc) including custom settings. It emulates network impairments like delay, jitter and loss. It has been used to test a variety of commercial IP-based services under a broad range of impairment conditions. The usability group made extensive use of NETSIM while evaluating different upstream/downstream speed limits for possible tiered service. It has the useful attribute that it runs entirely in user space, although it does need root privileges. It ran on every version of Linux that I ever tried it on. There's a nice Tcl/Tk control interface that works well for certain kinds of demonstrations.

I know they have it because I wrote it and conducted many of the studies while I was at USWest Advanced Technologies. Ownership transferred to MediaOne Labs when USWest split itself in two. At that time, we licensed it to a variety of other groups under the best terms I could get out of our big-company lawyers: use for whatever you want internally, modify as desired, but no redistribution. There's a patent for it, one that's quite broad and that dummynet probably infringes. MediaOne didn't care, the patent was applied for so that no one else could get one and force us to stop using our own program. For those who care about prior art arguments, TTBOMK NETSIM predates both dummynet and NIST's nistnet software. When AT&T bought MediaOne, the Labs survived but in reduced form. Licensing of NETSIM stopped, although we continued to use it internally. When Comcast bought AT&T Broadband, most of the staff at the Labs were laid off. I turned over the complete documentation, source code, and an operating NETSIM installation on my way out the door. However, I would be surprised if any of that made the trip from Denver to Philadelphia, so in all probability, the program is no longer available.

Some days I hate big corporations.

Linux QoS (5, Informative)

Phacka (144710) | more than 9 years ago | (#10028988)

Network emulator
CONFIG_NET_SCH_NETEM:
Say Y if you want to emulate network delay, loss, and packet re-ordering. This is often useful to simulate networks when testing applications or protocols.

To add to that a little... (1)

ReKleSS (749007) | more than 9 years ago | (#10029148)

AFAIK that option is only available in the latest kernels, 2.6.7 or 2.6.8 I think. I recall seeing it recently in make oldconfig...
-ReK

single-shot delays (2, Interesting)

isj (453011) | more than 9 years ago | (#10029219)

I have found kill -s SIGSTOP and kill -s SIGCONT on the server process useful for simulating a temporary network congestion / single packet-drop on a TCP connection.

OpenBSD (3, Informative)

macx666 (194150) | more than 9 years ago | (#10029388)

For openbsd you can throttle bandwidth right in PF [openbsd.org].

Just cap whichever queue you want at whatever rate you want.

My Thesis (3, Interesting)

Xetrov (267777) | more than 9 years ago | (#10029559)

My thesis (which I am only just starting) deals with networking, and one major part of it is in simulating different network conditions.

I was planning to write my own wrapper around the standard socket operations which will add things like latency, unreliability etc etc (for testing the robustness of a protocol).

However I am looking forward to seeing some of the answers here as maybe I wont have to do as much work as I previously thought ;)

Re:My Thesis (1)

Karpe (1147) | more than 8 years ago | (#10034875)

My thesis seems to be similar to yours. Write me if you want to exchange some ideas.

NIST ATM simulator (3, Informative)

Anonymous Coward | more than 9 years ago | (#10029845)

The NIST ATM simulator [nist.gov] (public domain) might be useful. You need to provide some personal info to download it, but that isn't verified.

nistnet (4, Informative)

j1m+5n0w (749199) | more than 9 years ago | (#10029945)

Nistnet [nist.gov] is another tool that simulates delay.

-jim

Re:nistnet (1)

Samrobb (12731) | more than 9 years ago | (#10030024)

I'll second this. Last job I had, we used it to simulate telcom provider's networks. Very cool software.

Re:nistnet (1)

JohnQPublic (158027) | more than 9 years ago | (#10088983)

NIST Net absolutely rocks. We build network appliances, so we use it a lot here. It's intended to suimulate low-bandwidth or high-latency networks across LANs, but you can directly control packet-drop rates, arrange for packets to be delivered out of order, etc.

An excellent example of Your Tax Dollars At Work.

Shaper (2, Informative)

russ_allegro (444120) | more than 9 years ago | (#10030304)

Howabout using a traffic shaper I should do what you want.

Shaper is a traffic shaper and a packet filter for a server and for a gateway. With only limited configuration information, that are to be supplied, this script can control which and how information flow through the box.

http://www.chronox.de/

There are other ones as well type shapper at freshmeat.

use a traffic limiter (shaper) (3, Interesting)

wotevah (620758) | more than 9 years ago | (#10030319)

Use a bandwidth limiter that throttles your send rate. Someone else mentioned PF for BSD. On linux you can use the shaper module. My old notes go something like this, it might still work. Assuming eth0 is your output interface (the limiter works only on outgoing traffic, so you need the other end to do the same):
modprobe shaper
shapecfg attach shaper0 eth0
shapecfg speed shaper0 9600 # in baud
ifconfig shaper0 <eth0-address> netmask <eth0-netmask>
# remote automatic route added by above
route del -net <eth0-network> netmask <eth0-netmask> dev shaper0
# add routes to be choked
route add -host <otherhost> dev shaper0
# or if going through a router
route add -net <othernet> gw <router> dev shaper0
...you get the idea. I wonder if iptools makes this a bit less hacky.

Re:use a traffic limiter (shaper) (1)

MarcQuadra (129430) | more than 9 years ago | (#10042963)

I don't think this is what the person asking wants though. This might limit BANDWIDTH, but it doesn't do anything to the real latency.

What the submitter wants is to simulate a line that already exists, and already has it's own bandwidth and latency.

Several people have answered this without understanding what the problem is. Some people say "just hose your connection with other traffic!" but that will cause packet-loss where a dedicated serial line (like a WAN) generally won't have any if it's not overloaded. Others say "Limit bandwidth!" but that will only do just that, it will limit the amount of data you can fling, but it will not properly give you the end-user experience of a true high-latency connection.

SMB is a great example, I can dial into my work and browse the LAN quite painlessly, it's a low-band low-latency connection. When I do dial in I can authenticate and browse directories very well, but downloading a file takes forever. When I VPN-in over a cable connection to the same network from a far-away ISP (high-band, high-latency) I find it painful to browse and authenticate, but pulling files is super-quick.

SMB works fine on low-band connections, but it will choke-and-die if you drop packets, so you can't get a good feel for how your dialup users will feel if you simulate a connection with the wrong properties. Many database programs and web-based applications are the same way.

Re:use a traffic limiter (shaper) (1)

wotevah (620758) | more than 9 years ago | (#10045405)

True, the shaper obviously cannot simulate all low-latency networks and I may have misinterpreted from the parent post that he was working on "low-bandwidth networks". But not knowing his purpose, listing even remote possibilities might be a good idea.

I use PFY for rate limiting. (1)

Gordonjcp (186804) | more than 9 years ago | (#10043110)

That is, you get the PFY to stand there and if someone's traffic light stays on a bit too much, unplug them from the switch for a few seconds.

Use Google? (2, Informative)

Anonymous Coward | more than 9 years ago | (#10030738)

Google is sometimes a very good tool for finding things like this out, without having to submit a question to Slashdot. A Google for simulating network latency [google.com] and a click on the first link turns up a thread on a FreeBSD mailing list that provides the answer: Dummynet.

Found a hardware solution for $10, Ricochet. :) (3, Informative)

Myself (57572) | more than 9 years ago | (#10030820)

Connect the machines using PPP over a pair of Ricochet modems, available on eBay for a song. They include a neat little command for developers:

AT~I13 -- WAN Simulation Command and Information Display
This command enables the Ricochet modem's WAN simulation feature.
Syntax:
AT~I13
You can use this function to test various transport protocols in the presence of network delay and packet loss. This simulation only affects the modem's transport modes, i.e., LIGHT/PPP/SLIP/STREAM. If you are going to reset the WAN simulation values, then you should reboot the modem because it is not built to reset and process incoming packets at the same time. WAN simulation affects the processing of received packet, therefore, when testing the simulation needs to be set at both ends of the connection.

The incoming packets are processed in the following order. First, the drop percentage value is checked and the modem drops that N% immediately. Second, the base delay is added to a random percentage of the variable delay. Then the packet is inserted on a time ordered delivery queue. If the variable delay component is great enough, a large number of incoming packets will be reordered.

Note:
In WAN simulation, there are fewer (Time to Live) TTL expirations than in an real network because packets ending up on the delivery queue is not expiring based on the TTL value.

Two Modems... (1)

TibbonZero (571809) | more than 9 years ago | (#10030878)

Two Modems, Two phone lines, dial them either straight to each other, or better yet... into an ISP.. that will give a great simulation. Perhaps even dial up one of them to an East Coast number, and another to a West Coast access number.. Should do the trick

config NET_SCH_DELAY (5, Informative)

Kevin Burtch (13372) | more than 8 years ago | (#10032744)


I'm shocked no-one has posted this!

It's been in the kernel for while, though I don't know much about using it. I never bothered even looking at it (had no need) until a coworker wanted to use it (on Thursday) to do some testing and asked me about it.

Here's the chunk of Kconfig:

config NET_SCH_DELAY
tristate "Delay simulator"
depends on NET_SCHED
help
Say Y if you want to delay packets by a fixed amount of
time. This is often useful to simulate network delay when
testing applications or protocols.

To compile this driver as a module, choose M here: the module
will be called sch_delay.

Please reply to this if you have been able to get this working... the tuning parameters to tc we found give errors (and yes, we built installed the latest iproute2 tarball).
Then again, we only spent a few minutes playing with it (he had to leave).

Re:config NET_SCH_DELAY (1)

IPV6Probs (808928) | more than 9 years ago | (#10118298)

Hi, Have you gotten this to work? I was also interested in using this module, but for IPV6. If you have any more information on how this works, please let me know. Thanks.

VPN out and back in (2, Informative)

sparty (63226) | more than 8 years ago | (#10033904)

If you've got an offsite broadband connection you can stick a PPTP server on (I use PopTop, http://www.poptop.org or http://poptop.sf.net ), try making a VPN connection out to that server and then back in. I've found that operating stuff over VPN at work tends to introduce significant latency (more than running over an 802.11b wireless bridge, which is also quite noticable compared to a hardwired Ethernet connection), so if you can VPN out and back in, you should have a fair amount of latency involved. If out-and-back-in doesn't work, just in (i.e. test machine A offsite, operating via VPN, talks to test machine B which is onsite) should still introduce noticable latency.

(This does, of course, assuming that you're testing with routable protocols)

Do what I do (3, Funny)

laejoh (648921) | more than 9 years ago | (#10042295)

1. I put a linux box acting as router, firewall, apache server and internet connection on the network.

2. Then I post a story on slashdot with a link to the apache server.

3. ???

4. Instant latency!

(And by carefully choosing the size of the documents/jpegs/mpegs I can actually simulate different kinds of latency!!!)

hub (1)

WhiteDragon (4556) | more than 9 years ago | (#10049082)

My idea is this: put the server and the client on a hub (not a switch), and put another couple computers on the hub ping flooding each other. The collisions will make the average latency increase.

I don't know if a bunch of collision will affect the latency, or just the bandwidth though.

Cisco Routers can do this too... but... (2, Informative)

agristin (750854) | more than 9 years ago | (#10050111)

It is kind of a pain. You need to adjust QoS settings to cause congestion or delay. 2 ways: One mark the traffic you want to be delayed and then pump a bunch of traffic through the pipe at the same time. Apply QoS to the unmatched traffic (say a ttcp stream is good). This will provide a real world latency and will be hard to predict how much latency. The second way is to manually mess with the low latency queing settings for an interface (decrease queue size is one way), beware this will foobar your performace so keep a backup config or don't accidentally put the router into production. This will let you do more predictable latency tests, but you still may need a stream of data to really bork up the latency. You can always do the bandwidth command on an interface and introduce pinhole congestion as well (may add latency), but that may not be what you are looking for... and I'm sure occured to you already. -Andrew more info available on www.cisco.com http://www.cisco.com/en/US/tech/tk39/tk824/technol ogies_configuration_example09186a008009461f.shtml and search for QoS as well, and then use the techniques in an inverse manner.

Re:Cisco Routers can do this too... but... (0)

Anonymous Coward | more than 9 years ago | (#10053075)

Probably CBWFQ or LLQ will be difficult to use with predictable results.

WRED with one single queue, and different tresholds for traffic may work better.

use low tresholds for non interesting traffic and high tresholds for the traffic you want to analize.

Saturate the interface with non interesting traffic, and cross your preffered traffic in top of that.

Changing the output queue lenght you can control the delay.

IPTables + Userland Queuing (1)

tincho_uy (566438) | more than 9 years ago | (#10066480)

Depending on the precision you need, you could use this combination to create latency and generate losses. I've written a quick hack like this for some tests I had to do, and it works (I did it a bit hastily, and it's sure to to be buggy, but, oh well..)

Does CONFIG_NET_SCH_NETEM work for IPV6? (1)

IPV6Probs (808928) | more than 9 years ago | (#10092027)

I am also looking to simulate a network delay (satellite link) and was interested by the CONFIG_NET_SCH_NETEM for linux. Does anyone know if this works for IPV6? If so, is there documentation for it anywhere on how to use it? Or is there any other free network delay simulator for linux/freeBSD/or solaris that will work for IPV6?????

User land manipulation (0)

Anonymous Coward | more than 9 years ago | (#10095217)

I didnt read through all the comments , but userland manipulation of packets can be useful for introducing latency etc. This application can be an example. http://michael.toren.net/code/countertrace/
Check for New Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...