Difference between revisions of "Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up a Network Emulator"
(Created page with '{| summary="Navigation header" width="100%" ! colspan="3" align="center" | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up Universal Plug and Play|Advanced Topics…') |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{| summary="Navigation header" width="100%" | {| summary="Navigation header" width="100%" | ||
− | ! colspan="3" align="center" | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up | + | ! colspan="3" align="center" | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up a Network Emulator|Advanced Topics - Setting Up a Network Emulator]] |
|- | |- | ||
− | | width="20%" align="left" | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up | + | | width="20%" align="left" | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up a Bridge|Prev]] |
! width="60%" align="center" | [[Bering-uClibc 5.x - User Guide]] | ! width="60%" align="center" | [[Bering-uClibc 5.x - User Guide]] | ||
− | | width="20%" align="right" | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up | + | | width="20%" align="right" | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up Zeroconf Networking|Next]] |
|} | |} | ||
---- | ---- | ||
− | + | ==Introduction== | |
+ | [[Bering-uClibc 5.x]] 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. | ||
− | + | The netem project page is [http://www.linuxfoundation.org/collaborate/workgroups/networking/netem here] and contains simple usage instructions and FAQs. | |
− | + | There is also a PDF file with a useful conference paper from 2005 [http://developer.osdl.org/shemminger/netem/LCA2005_paper.pdf here]. | |
− | + | 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: | |
+ | * Delay packets, to simulate network latency | ||
+ | ** In addition to a simple fixed delay there are advanced options to apply a variable delay to better emulate real-world network conditions | ||
+ | * Drop packets, to simulate packet loss | ||
+ | * Duplicate and re-order packets | ||
+ | * Corrupt packets | ||
+ | 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. | ||
− | + | 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: | |
+ | * 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 | ||
+ | * As part of a Router / Firewall installation | ||
− | + | 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. | |
− | + | ==Software Installation== | |
+ | ===Packages=== | ||
+ | There is currently (as of Bering-uClibc 5.0-alpha) 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. | ||
− | + | 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>. | |
− | == | + | ===Kernel Module=== |
− | + | Use of netem requires that kernel module file <code class="filename">sch_netem.ko.gz</code> is available in directory <code class="filename">/lib/modules/</code>. | |
+ | 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.gz</code>). | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | '''To be continued...''' | |
− | + | ||
− | + | ||
---- | ---- | ||
{| summary="Navigation footer" width="100%" | {| summary="Navigation footer" width="100%" | ||
− | | width="40%" align="left" | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up | + | | width="40%" align="left" | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up a Bridge|Prev]] |
| width="20%" align="center" | [[Bering-uClibc 5.x - User Guide - Advanced Topics|Up]] | | width="20%" align="center" | [[Bering-uClibc 5.x - User Guide - Advanced Topics|Up]] | ||
− | | width="40%" align="right" | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up | + | | width="40%" align="right" | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up Zeroconf Networking|Next]] |
|} | |} | ||
[[Category:Bering-uClibc 5.x]] | [[Category:Bering-uClibc 5.x]] | ||
[[Category:User Guide]] | [[Category:User Guide]] |
Latest revision as of 12:04, 27 October 2012
Advanced Topics - Setting Up a Network Emulator | ||
---|---|---|
Prev | Bering-uClibc 5.x - User Guide | Next |
Introduction
Bering-uClibc 5.x 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.
The netem project page is here and contains simple usage instructions and FAQs. There is also a PDF file with a useful conference paper from 2005 here.
In summary, netem is an advanced network traffic Queueing Discipline (qdisc) for the Linux kernel, just like pfifo_fast or tbf. Like the other qdiscs it acts on packets sent by a particular network interface, in this case providing options to:
- Delay packets, to simulate network latency
- In addition to a simple fixed delay there are advanced options to apply a variable delay to better emulate real-world network conditions
- Drop packets, to simulate packet loss
- Duplicate and re-order packets
- Corrupt packets
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.
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:
- 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
- As part of a Router / Firewall installation
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.
Software Installation
Packages
There is currently (as of Bering-uClibc 5.0-alpha) no specific Package for netem, although consideration is being given to creating one which includes the "distribution" .dist
data files from the iproute2
source Package.
Use of netem does however require installation of the tc.lrp
Package, for the tc command, and deployment of a Bridge requires bridge.lrp
.
Kernel Module
Use of netem requires that kernel module file sch_netem.ko.gz
is available in directory /lib/modules/
.
This file should be extracted from modules.tgz
(its full path within that tar archive is kernel/net/sched/sch_netem.ko.gz
).
To be continued...
Prev | Up | Next |