This tutorial document describes what |dce_cradle| is, how we can use it, how we extend it.
Hajime Tazaki, Frederic Urbani, Thierry Turletti
TCP goodput performance in |dce_cradle| shows similar results with real network configuration and software on Linux.
The paper describing this text was submitted to Workshop on ns-3 2013 (under review).
Hajime Tazaki (tazaki at nict.go.jp)
|dce_cradle| allows us to use ns-3 native application with Linux kerne as a network stack. The key question is: how different/similar |dce_cradle| behaves ? This tutorial tries to answer this question with showing TCP goodput performance.
We need to prepare the following simulation codes to conduct the experiment.
- ns-3-dev
- ns-3-dce
- ns-3-linux
- Network Simulation Cradle (NSC)
- |dce_cradle| patch
- iperf
- Linux TC (packet loss and delay injection)
While the experimentation with ns-3 native TCP stack shows about 83% less bandwidth than with the real environment, NSC and |dce_cradle| obtain more realistic performance (only 25-30% less bandwidth than with the real environment) under the simple dumbbel topology scenario.
(News) If we changed the default variables of |ns3| TCP stack as follows, the result of goodput has improved.
Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue (1448)); Config::SetDefault ("ns3::TcpSocket::DelAckCount", UintegerValue (1));
Experiment on ns-3
Setup ns-3-dce
% mkdir dce-cradle-test % cd dce-cradle-test % hg clone -r 327 http://code.nsnam.org/furbani/ns-3-dce % ./utils/clone_and_compile_ns3_dce.sh
for more information, see the DCE documentation.
patch |dce_cradle| extension
% cd dce-cradle-test % wget https://codereview.appspot.com/download/issue6856090_7001.diff % cd ns-3-dce % patch -p1 < ../issue6856090_7001.diff % ./waf % ./waf install
prepare Network Simulation Cradle
% cd dce-cradle-test % wget http://research.wand.net.nz/software/nsc/nsc-0.5.3.tar.bz2 % tar xfj nsc-0.5.3.tar.bz2 % mv nsc-0.5.3 nsc % cd nsc % ./scons.py % cp lib/liblinux2.6.26.so ../build/lib/ % cd .. % cd ns-3-dev % /waf configure --prefix=`pwd`/../build --with-nsc=../nsc % ./waf % ./waf install
run a script
.. literalinclude:: dce-cradle-test.sh :emphasize-lines: 20 :linenos: :lines: 1-24, 40-
Experiment on Linux real network
prepare dumbbell topology
node1 node5 \ / node3 ======== node4 / \ node2 node6
configure bottleneck link
at node3, packet loss and delay are configured with tc.
sudo tc qdisc add dev eth0 root handle 1:0 tbf limit 15Kb buffer 10Kb/8 rate 2Mbit sudo tc qdisc add dev eth0 parent 1:0 handle 10: netem delay 100ms loss 5% sudo sysctl -w net.ipv4.ip_forward=1
at node4, packet loss and delay are configured with tc as well.
sudo tc qdisc add dev eth0 root handle 1:0 tbf limit 15Kb buffer 10Kb/8 rate 2Mbit sudo tc qdisc add dev eth0 parent 1:0 handle 10: netem delay 100ms loss 5% sudo sysctl -w net.ipv4.ip_forward=1
run a script at node1
.. literalinclude:: iperf-dumbbell.sh :linenos: :lines: 1-5,9-16,26-37,43-
Plot the results of above experiment
run a script
You can gather the text outputs from the above experiments and plot the figure with gnuplot.
.. literalinclude:: dce-cradle-gnuplot.sh :linenos: :lines: 1-38