Commit 071af813 authored by Martín Ferrari's avatar Martín Ferrari

Template for the lightning talk at DC12.

parent 223ef2ea
IMGS = openlogo.svg
PDF_IMGS := $(patsubst %.svg,%.pdf,$(patsubst %.dia,%.pdf,$(IMGS)))
DVI_IMGS := $(patsubst %.svg,%.eps,$(patsubst %.dia,%.eps,$(IMGS)))
ALL = nemu.pdf
all: $(ALL)
%.eps: %.dia
inkscape -E $@ $<
%.pdf: %.dia
inkscape -A $@ $<
%.eps: %.svg
inkscape -E $@ $<
%.pdf: %.svg
inkscape -A $@ $<
%.ps: %.dvi
dvips $<
nemu.dvi: nemu.tex $(DVI_IMGS)
latex $<
latex $<
nemu.pdf: nemu.tex $(PDF_IMGS)
pdflatex $<
pdflatex $<
clean:
rm -f $(PDF_IMGS) $(DVI_IMGS) *.aux *.out *.log *.dvi *.nav *.snm \
*.toc *.vrb *.bak $(ALL)
% vim:ts=2:sw=2:et:ai:sts=2
\documentclass{beamer}
\mode<presentation>
{
\usetheme{Boadilla} % simple
\usecolortheme{seahorse}
\useinnertheme{rectangles}
}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[normalem]{ulem}
\DeclareRobustCommand{\hsout}[1]{\texorpdfstring{\sout{#1}}{#1}}
\pgfdeclareimage[height=0.5cm]{debian-logo}{openlogo}
\pgfdeclareimage[height=2cm]{debian-logo-big}{openlogo}
\title{Introducing Nemu}
\subtitle{Network EMUlator in a \hsout{box} Python library}
\author{Martín Ferrari}
\institute[DebConf 12]{\pgfuseimage{debian-logo-big}}
\date{July 14, 2012}
\subject{Talks}
\logo{\pgfuseimage{debian-logo}}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}{What is Nemu?}
\begin{itemize}
\item A \alert{python} library,
\item to create \alert{emulated networks},
\item and run \alert{tests and experiments}
\item that can be \alert{repeated}.
\item[]{}
\item[] \em{A by-product of research that found a practical use.}
\end{itemize}
\end{frame}
\begin{frame}{What can I use it for?}
\begin{itemize}
\item Test your new peer-to-peer application.
\item[] \small{\em{Run 50 instances in your machine!}}
\vfill
\item Observe behaviour on unreliable networks.
\item[] \small{\em{Configure packet loss, delay, throughput...}}
\vfill
\item Justify your changes with experimental data.
\item[] \small{\em{Make your script output nice GNUPlot graphs!}}
\vfill
\item Verify configuration changes before applying to the production network.
\item[] \small{\em{Change iptables and routing configuration with
confidence!}}
\vfill
\item Distribute your experiment/test easily, no configuration needed!
\item[] \small{\em{Here, execute this and see for yourself!}}
\end{itemize}
\end{frame}
\begin{frame}{Resources}
Related projects:\\
\begin{itemize}
\item NEPI: original project that spawned the development of Nemu.\\
High-level network description, GUI, multiple back-ends.
\item Mininet: similar project from Stanford, developed at the same time.
\end{itemize}
\hfill
Links:\\
\begin{itemize}
\item Nemu homepage: http://code.google.com/p/nemu/
\item NEPI homepage: http://nepi.pl.sophia.inria.fr/
\item Mailing list: http://groups.google.com/group/nemu-devel
\end{itemize}
\end{frame}
\end{document}
This diff is collapsed.
#!/usr/bin/env python
# vim:ts=4:sw=4:et:ai:sts=4
import os, nemu, subprocess, time
xterm = nemu.environ.find_bin("xterm")
X = "DISPLAY" in os.environ and xterm
# each Node is a netns
node = []
switch = []
iface = {}
SIZE = 5
for i in range(SIZE):
node.append(nemu.Node(forward_X11 = X))
next_pair = (i, i + 1)
prev_pair = (i, i - 1)
if i < SIZE - 1:
iface[(i, i + 1)] = nemu.NodeInterface(node[i])
iface[(i, i + 1)].up = True
iface[(i, i + 1)].add_v4_address(address='10.0.%d.1' % i, prefix_len=24)
if i > 0:
iface[(i, i - 1)] = nemu.NodeInterface(node[i])
iface[(i, i - 1)].up = True
iface[(i, i - 1)].add_v4_address(address='10.0.%d.2' % (i - 1),
prefix_len=24)
switch.append(nemu.Switch())
switch[-1].connect(iface[(i, i - 1)], iface[(i - 1, i)])
switch[-1].up = True
# Configure routing
if i < SIZE - 2:
node[i].add_route(prefix='10.0.%d.0' % (SIZE - 2), prefix_len=24,
nexthop='10.0.%d.2' % i)
if i > 1:
node[i].add_route(prefix='10.0.0.0', prefix_len=24,
nexthop='10.0.%d.1' % i - 1)
print "Nodes started with pids: %s" % str([n.pid for n in nodes])
#switch0 = nemu.Switch(
# bandwidth = 100 * 1024 * 1024,
# delay = 0.1, # 100 ms
# delay_jitter = 0.01, # 10ms
# delay_correlation = 0.25, # 25% correlation
# loss = 0.005)
# Test connectivity first. Run process, hide output and check
# return code
null = file("/dev/null", "w")
app0 = node[0].Popen("ping -c 1 10.0.%d.2" % (SIZE - 2), shell=True,
stdout=null)
ret = app0.wait()
assert ret == 0
app1 = node[-1].Popen("ping -c 1 10.0.0.1", shell = True, stdout = null)
ret = app1.wait()
assert ret == 0
print "Connectivity IPv4 OK!"
if X:
app1 = node1.Popen("%s -geometry -0+0 -e %s -ni %s" %
(xterm, nemu.environ.TCPDUMP_PATH, if1b.name), shell = True)
time.sleep(3)
app0 = node0.Popen("%s -geometry +0+0 -e ping -c 10 10.0.1.2" % xterm,
shell = True)
app0.wait()
app1.signal()
app1.wait()
# Now test the network conditions
# When using a args list, the shell is not needed
app2 = node2.Popen(["ping", "-q", "-c100000", "-f", "10.0.1.2"],
stdout = subprocess.PIPE)
out, err = app2.communicate()
print "Ping outout:"
print out
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment