architecture sections
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 20 Aug 2009 15:13:18 +0200
changeset 10 d0f044eab8db
parent 9 5b06ada693db
child 11 7af694bc6b1e
architecture sections
Makefile
architecture.dia
architecture.tex
beamerthemelocal.sty
device-channel.dia
introduction.tex
topology-basics.dia
tutorial.tex
--- a/Makefile	Thu Aug 20 14:09:11 2009 +0200
+++ b/Makefile	Thu Aug 20 15:13:18 2009 +0200
@@ -1,8 +1,12 @@
 MAIN_SOURCE=tutorial.tex
 SECOND_SOURCES=\
 beamerthemelocal.sty \
-introduction.tex
-DIA_SOURCES=circle.dia
+introduction.tex \
+architecture.tex
+DIA_SOURCES=\
+architecture.dia \
+topology-basics.dia \
+device-channel.dia
 PDF_SOURCES=\
 nsc-architecture.pdf \
 nsc-accuracy.pdf
Binary file architecture.dia has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/architecture.tex	Thu Aug 20 15:13:18 2009 +0200
@@ -0,0 +1,288 @@
+\begin{section}{Introduction}
+
+\begin{frame}[fragile]{Environment setup}
+
+Install all needed tools:
+\begin{block}{Ubuntu}
+\begin{verbatim}
+sudo apt-get install build-essential g++ python mercurial 
+\end{verbatim}
+\end{block}
+
+\begin{block}{Windows}
+\begin{itemize}
+\item cygwin
+\item python
+\item mercurial
+\end{itemize}
+\end{block}
+
+\end{frame}
+
+\begin{frame}[fragile]{Getting ns-3}
+
+Availability (linux, osx, cygwin, mingw):
+\begin{itemize}
+\item Released tarballs: \url{http://www.nsnam.org/releases}
+\item Development version: \url{http://code.nsnam.org/ns-3-dev}
+\end{itemize}
+\vspace{0.5cm}
+The development version is usually stable: a lot of people use
+it for daily work:
+\begin{block}{}
+\begin{verbatim}
+hg clone http://code.nsnam.org/ns-3-dev
+\end{verbatim}
+\end{block}
+
+\end{frame}
+
+\begin{frame}[fragile]{Running ns-3}
+
+Use waf to build it (similar to make):
+\begin{block}{}
+\begin{verbatim}
+./waf
+./waf shell
+./build/debug/examples/csma-broadcast
+\end{verbatim}
+\end{block}
+
+\end{frame}
+
+\begin{frame}{Exploring the source code}
+
+\includegraphics[width=11cm]{architecture}
+
+\end{frame}
+
+\begin{frame}[fragile]{A typical simulation}
+
+\begin{itemize}
+\item Create a bunch of C++ objects
+\item Configure and interconnect them
+\item Each object creates events with \texttt{Simulator::Schedule}
+\item Call \texttt{Simulator::Run} to execute all events
+\end{itemize}
+
+\begin{block}{A (fictional) simulation}
+\begin{verbatim}
+Node *a = new Node ();
+Node *b = new Node ();
+Link *link = new Link (a,b);
+Simulator::Schedule (Seconds (0.5),                 // in 0.5s from now
+                                   &Node::StartCbr, a,        // call StartCbr on 'a'
+                                   "100bytes", "0.2ms", b);  // pass these arguments
+Simulator::Run ();
+\end{verbatim}
+\end{block}
+
+\end{frame}
+
+\end{section}
+
+\begin{section}{Fundamental network model structure}
+
+\begin{frame}{The basic model}
+
+\includegraphics[width=10cm]{topology-basics}
+
+\end{frame}
+
+\begin{frame}{The fundamental objects}
+
+\begin{itemize}
+\item Node: the motherboard of a computer with RAM, CPU, and, IO interfaces
+\item Application: a packet generator and consumer which can run on a Node and
+talk to a set of network \emph{stacks}
+\item Socket: the interface between an application and a network stack
+\item NetDevice: a network card which can be plugged in an IO interface of a Node
+\item Channel: a physical connector between a set of NetDevice objects
+\end{itemize}
+
+\end{frame}
+
+\begin{frame}{Important remark}
+
+NetDevices are strongly bound to Channels
+of a matching type:
+\begin{block}{}
+\includegraphics[width=10cm]{device-channel}
+\end{block}
+\end{frame}
+
+\begin{frame}{Existing models}
+
+\begin{itemize}
+\item Network stacks: arp, ipv4, icmpv4, udp, tcp (ipv6 under review)
+\item Devices: wifi, csma, point-to-point, bridge
+\item Error models and queues
+\item Applications: udp echo, on/off, sink
+\item Mobility models: random walk, etc.
+\item Routing: olsr, static global
+\end{itemize}
+
+\end{frame}
+
+\begin{frame}{For example, the wifi models}
+
+\begin{itemize}
+\item New model, written from 802.11 specification
+\item Accurate model of the MAC
+\item DCF, beacon generation, probing, association
+\item A set of rate control algorithms (ARF, ideal, AARF, Minstrel, etc.)
+\item Not-so-slow models of the 802.11a PHY
+\end{itemize}
+\end{frame}
+
+\begin{frame}{Development of wifi models}
+
+New contributions from many developers:
+\begin{itemize}
+\item University of Florence: 802.11n, EDCA, frame aggregation, block ack
+\item Russian Academy of Sciences: 802.11s, HWMP routing protocol
+\item Boeing: 802.11b channel models, validation
+\item Deutsche Telekom Laboratories: PHY modelization, validation
+\item Karlsruhe Institute of Technology: PHY modelization (Rayleigh, Nakagami)
+\end{itemize}
+
+\end{frame}
+
+\end{section}
+
+\begin{section}{Topology construction}
+
+\begin{frame}{The Helper/Container API}
+
+We want to:
+\begin{itemize}
+\item Make it easy to build topologies with repeating patterns
+\item Make the topology description more high-level (and less verbose)
+to make it easier to read and understand
+\end{itemize}
+The idea is simple:
+\begin{itemize}
+\item Sets of objects are stored in \code{Container}s
+\item One operation is encoded in a \code{Helper} object
+and applies on a \code{Container}
+\end{itemize}
+
+Helper operations:
+\begin{itemize}
+\item Are not generic: different helpers provide different operations
+\item Do not try to allow code reuse: just try to minimize the amount of code written
+\item Provide \emph{syntactical sugar}: make the code easier to read
+\end{itemize}
+
+\end{frame}
+
+\begin{frame}{Typical containers and helpers}
+
+Example containers:
+\begin{itemize}
+\item \code{NodeContainer}
+\item \code{NetDeviceContainer}
+\item \code{Ipv4AddressContainer}
+\end{itemize}
+
+Example helper classes:
+\begin{itemize}
+\item \code{InternetStackHelper}
+\item \code{WifiHelper}
+\item \code{MobilityHelper}
+\item \code{OlsrHelper}
+\item etc. Each model provides a helper class
+\end{itemize}
+
+\end{frame}
+
+\begin{frame}[fragile]{Create a couple of nodes}
+
+\begin{columns}
+\begin{column}[c]{0.5\textwidth}
+\begin{block}{}
+\begin{verbatim}
+NodeContainer csmaNodes;
+csmaNodes.Create (2);
+NodeContainer wifiNodes;
+wifiNodes.Add (csmaNodes.Get (1));
+wifiNodes.Create (3);
+\end{verbatim}
+\end{block}
+\end{column}
+\begin{column}[c]{0.5\textwidth}
+\begin{block}{}
+Create empty node container \\
+Create two nodes \\
+Create empty node container \\
+Add existing node to it \\
+And then create some more nodes \\
+\end{block}
+\end{column}
+\end{columns}
+
+\end{frame}
+
+\begin{frame}[fragile]{Then, the csma network}
+
+
+\begin{columns}[t]
+\begin{column}{0.54\textwidth}
+\begin{block}{}
+\begin{verbatim}
+NetDeviceContainer csmaDevices;
+CsmaHelper csma;
+csma.SetChannelAttribute ("DataRate", 
+              StringValue ("5Mbps"));
+csma.SetChannelAttribute ("Delay", 
+              StringValue ("2ms"));
+csmaDevices = csma.Install (csmaNodes);
+\end{verbatim}
+\end{block}
+\end{column}
+\begin{column}{0.45\textwidth}
+\begin{block}{}
+Create empty device container \\
+Create csma helper \\
+Set data rate \\
+\hspace{1cm}\\
+Set delay \\
+\hspace{1cm}\\
+Create csma devices and channel \\
+\end{block}
+\end{column}
+\end{columns}
+
+\end{frame}
+
+\begin{frame}[fragile]{And a couple of wifi interfaces}
+
+Finally, setup the wifi channel:
+{\footnotesize
+\begin{block}{}
+\begin{verbatim}
+YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();
+YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
+wifiPhy.SetChannel (wifiChannel.Create ());
+\end{verbatim}
+\end{block}
+}
+
+And create adhoc devices on this channel:
+{\footnotesize
+\begin{block}{}
+\begin{verbatim}
+NetDeviceContainer wifiDevices;
+WifiHelper wifi = WifiHelper::Default ();
+wifiDevices = wifi.Install (wifiPhy, wifiNodes);
+\end{verbatim}
+\end{block}
+}
+
+\end{frame}
+
+\end{section}
+
+\begin{section}{The underlying object model}
+
+\end{section}
--- a/beamerthemelocal.sty	Thu Aug 20 14:09:11 2009 +0200
+++ b/beamerthemelocal.sty	Thu Aug 20 15:13:18 2009 +0200
@@ -17,7 +17,7 @@
 
 \usetheme{default}
 \useoutertheme{infolines}  
-\setbeamersize{text margin left=3em,text margin right=2em}
+\setbeamersize{text margin left=2em,text margin right=2em}
 \setbeamercolor{author in head/foot}{bg=black,fg=white}
 \setbeamercolor{title in head/foot}{bg=middlecolor,fg=white}
 \setbeamercolor{date in head/foot}{bg=gray,fg=white}
Binary file device-channel.dia has changed
--- a/introduction.tex	Thu Aug 20 14:09:11 2009 +0200
+++ b/introduction.tex	Thu Aug 20 15:13:18 2009 +0200
@@ -21,14 +21,14 @@
 \vspace{1cm}
 \begin{tabular}{|c|c|c|c|}
 \hline
-Simulators & ns-2 & OPNET & QualNet/Glomosim \\
+ & ns-2 & OPNET & QualNet/Glomosim \\
 \hline
 \hline
-Transport layer and above & 123 (75\%) & 30 (18\%) & 11 (7\%) \\
+$\ge$ layer 4 & 123 (75\%) & 30 (18\%) & 11 (7\%) \\
 \hline
-Network layer & 186 (70\%) & 48 (18\%) & 31 (12\%) \\
+$=$ layer 3 & 186 (70\%) & 48 (18\%) & 31 (12\%) \\
 \hline
-MAC and PHY layers & 114 (43\%) & 96 (36\%) & 55 (21\%) \\
+$\le$ layer 2 & 114 (43\%) & 96 (36\%) & 55 (21\%) \\
 \hline
 \end{tabular}
 
@@ -237,12 +237,6 @@
 
 \end{frame}
 
-\begin{frame}{Simulation parameter configuration}
-
-XXX: need to talk about parameter configuration
-
-\end{frame}
-
 \begin{frame}{Low cost of model validation}
 
 Make models close to the real world:
Binary file topology-basics.dia has changed
--- a/tutorial.tex	Thu Aug 20 14:09:11 2009 +0200
+++ b/tutorial.tex	Thu Aug 20 15:13:18 2009 +0200
@@ -40,11 +40,13 @@
 \begin{frame}{Tutorial schedule}
 \begin{enumerate}
 \item 14h00-15h00: Introduction
-\item 15h0-16h00: 
-\item 16h0-17h00: XXX
+\item 15h00-16h00: The ns-3 architecture
+\item 16h00-17h00: XXX
 \end{enumerate}
 \end{frame}
 
+
+%% introduction part
 \begin{part}{Introduction}
 
 \begin{frame}
@@ -59,6 +61,24 @@
 
 \end{part}
 
+
+%% architecture part
+\begin{part}{The ns-3 architecture}
+
+\begin{frame}
+\partpage
+\end{frame}
+
+\begin{frame}{Outline}
+\tableofcontents[part=2]
+\end{frame}
+
+\include{architecture}
+
+\end{part}
+
+%% finished !
+
 \begin{frame}[fragile]{Resources}
 
 \begin{itemize}