author | Tom Henderson <tomh@tomh.org> |
Fri, 16 Oct 2009 07:13:05 -0700 | |
changeset 5426 | 7b36d173c490 |
parent 4755 | 04a9a7e9a624 |
child 5431 | 01a657b8d1ef |
permissions | -rw-r--r-- |
3978
e1e886e0edec
start of emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
1 |
@node Emulation |
e1e886e0edec
start of emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
2 |
@chapter Emulation |
e1e886e0edec
start of emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
3 |
|
3979
dee10444d76e
some words about emulation
Craig Dowell <craigdo@ee.washington.edu>
parents:
3978
diff
changeset
|
4 |
ns-3 has been designed for integration into testbed and virtual machine |
3987
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
5 |
environments. We have addressed this need by providing two kinds of |
4411 | 6 |
net devices. The first kind, which we call an @code{Emu} @code{NetDevice} |
3987
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
7 |
allows ns-3 simulations to send data on a ``real'' network. The second kind, |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
8 |
called a @code{Tap} @code{NetDevice} allows a ``real'' host to participate |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
9 |
in an ns-3 simulation as if it were one of the simulated nodes. An ns-3 |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
10 |
simulation may be constructed with any combination of simulated, @code{Emu}, |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
11 |
or @code{Tap} devices. |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
12 |
|
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
13 |
One of the use-cases we want to support is that of a testbed. A concrete |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
14 |
example of an environment of this kind is the ORBIT testbed. ORBIT is a |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
15 |
laboratory emulator/field trial network arranged as a two dimensional grid of |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
16 |
400 802.11 radio nodes. We integrate with ORBIT by using their ``imaging'' |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
17 |
process to load and run ns-3 simulations on the ORBIT array. We use our |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
18 |
@code{Emu} @code{NetDevice}s to drive the hardware in the testbed and we can |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
19 |
accumulate results either using the ns-3 tracing and logging functions, or the |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
20 |
native ORBIT data gathering techniques. See @uref{http://www.orbit-lab.org/} |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
21 |
for details on the ORBIT testbed. |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
22 |
|
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
23 |
A simulation of this kind is shown in the following figure: |
3978
e1e886e0edec
start of emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
24 |
|
e1e886e0edec
start of emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
25 |
@float Figure,fig:testbed |
3987
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
26 |
@center @caption{Example Implementation of Testbed Emulation.} |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
27 |
@center @image{figures/testbed, 5in} |
3978
e1e886e0edec
start of emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
28 |
@end float |
e1e886e0edec
start of emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
29 |
|
3987
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
30 |
You can see that there are separate hosts, each running a subset of a ``global'' |
3979
dee10444d76e
some words about emulation
Craig Dowell <craigdo@ee.washington.edu>
parents:
3978
diff
changeset
|
31 |
simulation. Instead of an ns-3 channel connecting the hosts, we use real |
dee10444d76e
some words about emulation
Craig Dowell <craigdo@ee.washington.edu>
parents:
3978
diff
changeset
|
32 |
hardware provided by the testbed. This allows ns-3 applications and protocol |
dee10444d76e
some words about emulation
Craig Dowell <craigdo@ee.washington.edu>
parents:
3978
diff
changeset
|
33 |
stacks attached to a simulation node to communicate over real hardware. |
dee10444d76e
some words about emulation
Craig Dowell <craigdo@ee.washington.edu>
parents:
3978
diff
changeset
|
34 |
|
3987
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
35 |
We expect the primary use for this configuration will be to generate repeatable |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
36 |
experimental results in a real-world network environment that includes all of |
4755
04a9a7e9a624
Manual spelling fixes from Johannes Buchner
Tom Henderson <tomh@tomh.org>
parents:
4568
diff
changeset
|
37 |
the ns-3 tracing, logging, visualization and statistics gathering tools. |
3979
dee10444d76e
some words about emulation
Craig Dowell <craigdo@ee.washington.edu>
parents:
3978
diff
changeset
|
38 |
|
3987
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
39 |
In what can be viewed as essentially an inverse configuration, we allow ``real'' |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
40 |
machines running native applications and protocol stacks to integrate with |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
41 |
an ns-3 simulation. This allows for the simulation of large networks connected |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
42 |
to a real mahince, and also enables virtualization. A simulation of this kind |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
43 |
is shown in the following figure: |
3979
dee10444d76e
some words about emulation
Craig Dowell <craigdo@ee.washington.edu>
parents:
3978
diff
changeset
|
44 |
|
3978
e1e886e0edec
start of emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
45 |
@float Figure,fig:emulated-channel |
e1e886e0edec
start of emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
46 |
@caption{Implementation overview of emulated channel.} |
3987
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
47 |
@image{figures/emulated-channel, 5in} |
3978
e1e886e0edec
start of emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
48 |
@end float |
e1e886e0edec
start of emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff
changeset
|
49 |
|
3987
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
50 |
Here, you will see that there is a single host with a number of virtual machines |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
51 |
running on it. An ns-3 simulation is shown running in the virtual machine shown |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
52 |
in the center of the figure. This simulation has a number of nodes with associated |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
53 |
ns-3 applications and protocol stacks that are talking to an ns-3 channel through |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
54 |
native simulated ns-3 net devices. |
3979
dee10444d76e
some words about emulation
Craig Dowell <craigdo@ee.washington.edu>
parents:
3978
diff
changeset
|
55 |
|
dee10444d76e
some words about emulation
Craig Dowell <craigdo@ee.washington.edu>
parents:
3978
diff
changeset
|
56 |
There are also two virtual machines shown at the far left and far right of the |
3987
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
57 |
figure. These VMs are running native (Linux) applications and protocol stacks. |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
58 |
The VM is connected into the simulation by a Linux Tap net device. The user-mode |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
59 |
handler for the Tap device is instantiated in the simulation and attached to a |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
60 |
proxy node that represents the native VM in the simulation. These handlers allow |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
61 |
the Tap devices on the native VMs to behave as if they were ns-3 net devices in |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
62 |
the simulation VM. This, in turn, allows the native software and protocol suites |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
63 |
in the native VMs to believe that they are connected to the simulated ns-3 |
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
64 |
channel. |
3979
dee10444d76e
some words about emulation
Craig Dowell <craigdo@ee.washington.edu>
parents:
3978
diff
changeset
|
65 |
|
dee10444d76e
some words about emulation
Craig Dowell <craigdo@ee.washington.edu>
parents:
3978
diff
changeset
|
66 |
We expect the typical use case for this environment will be to analyze the |
dee10444d76e
some words about emulation
Craig Dowell <craigdo@ee.washington.edu>
parents:
3978
diff
changeset
|
67 |
behavior of native applications and protocol suites in the presence of large |
3987
cfafbc337dbb
finish up a decent emulation chapter in manual
Craig Dowell <craigdo@ee.washington.edu>
parents:
3979
diff
changeset
|
68 |
simulated ns-3 networks. |
3979
dee10444d76e
some words about emulation
Craig Dowell <craigdo@ee.washington.edu>
parents:
3978
diff
changeset
|
69 |