http://bering-uclibc.zetam.org/index.php?title=Bering-uClibc_4.x_-_User_Guide_-_Advanced_Topics_-_Setting_Up_a_Network_Emulator&feed=atom&action=history
Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up a Network Emulator - Revision history
2024-03-28T20:04:40Z
Revision history for this page on the wiki
MediaWiki 1.26.0
http://bering-uclibc.zetam.org/index.php?title=Bering-uClibc_4.x_-_User_Guide_-_Advanced_Topics_-_Setting_Up_a_Network_Emulator&diff=523&oldid=prev
Davidmbrooke: Changed navigation links for new Bridge chapter
2011-02-20T16:37:32Z
<p>Changed navigation links for new Bridge chapter</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 16:37, 20 February 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l2" >Line 2:</td>
<td colspan="2" class="diff-lineno">Line 2:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>! colspan="3" align="center" | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up a Network Emulator|Advanced Topics - Setting Up a Network Emulator]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>! colspan="3" align="center" | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up a Network Emulator|Advanced Topics - Setting Up a Network Emulator]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>|-</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| width="20%" align="left"  | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up a <del class="diffchange diffchange-inline">File Server</del>|Prev]]</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| width="20%" align="left"  | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up a <ins class="diffchange diffchange-inline">Bridge</ins>|Prev]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>! width="60%" align="center" | [[Bering-uClibc 4.x - User Guide]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>! width="60%" align="center" | [[Bering-uClibc 4.x - User Guide]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| width="20%" align="right"  | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up Zeroconf Networking|Next]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| width="20%" align="right"  | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up Zeroconf Networking|Next]]</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l45" >Line 45:</td>
<td colspan="2" class="diff-lineno">Line 45:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>----</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>----</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>{| summary="Navigation footer" width="100%"</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>{| summary="Navigation footer" width="100%"</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>| width="40%" align="left"  | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up a <del class="diffchange diffchange-inline">File Server</del>|Prev]]</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>| width="40%" align="left"  | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up a <ins class="diffchange diffchange-inline">Bridge</ins>|Prev]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| width="20%" align="center" | [[Bering-uClibc 4.x - User Guide - Advanced Topics|Up]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| width="20%" align="center" | [[Bering-uClibc 4.x - User Guide - Advanced Topics|Up]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| width="40%" align="right"  | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up Zeroconf Networking|Next]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>| width="40%" align="right"  | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up Zeroconf Networking|Next]]</div></td></tr>
</table>
Davidmbrooke
http://bering-uclibc.zetam.org/index.php?title=Bering-uClibc_4.x_-_User_Guide_-_Advanced_Topics_-_Setting_Up_a_Network_Emulator&diff=449&oldid=prev
Davidmbrooke: Created (partial page)
2011-01-30T18:06:49Z
<p>Created (partial page)</p>
<p><b>New page</b></p><div>{| summary="Navigation header" width="100%"<br />
! colspan="3" align="center" | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up a Network Emulator|Advanced Topics - Setting Up a Network Emulator]]<br />
|-<br />
| width="20%" align="left" | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up a File Server|Prev]]<br />
! width="60%" align="center" | [[Bering-uClibc 4.x - User Guide]]<br />
| width="20%" align="right" | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up Zeroconf Networking|Next]]<br />
|}<br />
----<br />
<br />
<br />
==Introduction==<br />
Following the upgrade to version 2.6 of the Linux kernel, [[Bering-uClibc 4.x]] now includes the "netem" kernel Module which can be used in a test environment to simulate the effect of wide-area network characteristics such as high latency and packet loss.<br />
<br />
The netem project page is [http://www.linuxfoundation.org/collaborate/workgroups/networking/netem here] and contains simple usage instructions and FAQs.<br />
There is also a PDF file with a useful conference paper from 2005 [http://developer.osdl.org/shemminger/netem/LCA2005_paper.pdf here].<br />
<br />
In summary, <tt>netem</tt> is an advanced network traffic Queueing Discipline (<tt>qdisc</tt>) for the Linux kernel, just like <tt>pfifo_fast</tt> or <tt>tbf</tt>. Like the other qdiscs it acts on packets ''sent'' by a particular network interface, in this case providing options to:<br />
* Delay packets, to simulate network latency<br />
** In addition to a simple fixed delay there are advanced options to apply a variable delay to better emulate real-world network conditions<br />
* Drop packets, to simulate packet loss<br />
* Duplicate and re-order packets<br />
* Corrupt packets<br />
While netem itself does not apply rate control (e.g. to simulate a low-bandwidth link) it can be used in conjunction with other qdiscs which do that.<br />
<br />
Since netem is implemented as a qdisc, a [[LEAF]] machine with netem installed can be deployed in a variety of different network topologies. For example:<br />
* As a transparent Bridge, connected between a client PC and its upstream network connection, where it has the effect of emulating a Wide Area Network link between the client PC and the rest of the network<br />
* As part of a Router / Firewall installation<br />
<br />
This guide uses the Bridge deployment model as an example, using netem along with tbf to emulate a high-latency and low-bandwidth WAN link.<br />
<br />
==Software Installation==<br />
===Packages===<br />
There is currently (as of Bering-uClibc 4.0-beta2, 2011-01-31) no specific Package for netem, although consideration is being given to creating one which includes the "distribution" <code class="filename">.dist</code> data files from the <code class="filename">iproute2</code> source Package.<br />
<br />
Use of netem does however require installation of the <code class="filename">tc.lrp</code> Package, for the '''tc''' command, and deployment of a Bridge requires <code class="filename">bridge.lrp</code>.<br />
<br />
===Kernel Module===<br />
Use of netem requires that kernel module file <code class="filename">sch_netem.ko</code> is available in directory <code class="filename">/lib/modules/</code>.<br />
This file should be extracted from <code class="filename">modules.tgz</code> (its full path within that tar archive is <code class="filename">kernel/net/sched/sch_netem.ko</code>).<br />
<br />
<br />
'''To be continued...'''<br />
<br />
<br />
----<br />
{| summary="Navigation footer" width="100%"<br />
| width="40%" align="left" | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up a File Server|Prev]]<br />
| width="20%" align="center" | [[Bering-uClibc 4.x - User Guide - Advanced Topics|Up]]<br />
| width="40%" align="right" | [[Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up Zeroconf Networking|Next]]<br />
|}<br />
<br />
[[Category:Bering-uClibc 4.x]]<br />
[[Category:User Guide]]</div>
Davidmbrooke