Difference between revisions of "Latency Simulation"
(→Kernel scheduler) |
|||
Line 14: | Line 14: | ||
Here's the chunk of Kconfig: | Here's the chunk of Kconfig: | ||
− | config NET_SCH_DELAY | + | config NET_SCH_DELAY |
− | tristate "Delay simulator" | + | tristate "Delay simulator" |
− | depends on NET_SCHED | + | depends on NET_SCHED |
− | help | + | help |
− | Say Y if you want to delay packets by a fixed amount of | + | Say Y if you want to delay packets by a fixed amount of |
− | time. This is often useful to simulate network delay when | + | time. This is often useful to simulate network delay when |
− | testing applications or protocols. | + | testing applications or protocols. |
To compile this driver as a module, choose M here: the module | To compile this driver as a module, choose M here: the module | ||
Line 27: | Line 27: | ||
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). | 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). | Then again, we only spent a few minutes playing with it (he had to leave). | ||
− | |||
=Båndbredde= | =Båndbredde= |
Revision as of 15:13, 3 January 2007
I forbindelse med udviklingen af et overvågningssystem til Grundfos havde jeg brug for at kunne undersøge hvordan at klienten opførte sig over en langsom linie med høj latency, selv om jeg sad direkte på firmaets LAN.
Til linux er der mest udbredte værktøj NIST.
Man kan også overveje at bruge en FreeBSD og dennes dummynet
Kernel scheduler
Fra: http://ask.slashdot.org/askslashdot/04/08/20/2035211.shtml?tid=222&tid=185&tid=95&tid=4&tid=218
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).
Båndbredde
Hvis at man vil simulere begrænset båndbredde lan man på linux bruge shaper
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