added son-emu project website
[osm/vim-emu.git] / docs / _site / index.html
1 <!DOCTYPE html>
2 <html lang="en-US">
3 <head>
4 <meta charset="UTF-8">
5
6 <!-- Begin Jekyll SEO tag v2.3.0 -->
7 <title>Containernet | Use Docker containers as hosts in Mininet emulations.</title>
8 <meta property="og:title" content="Containernet" />
9 <meta property="og:locale" content="en_US" />
10 <meta name="description" content="Use Docker containers as hosts in Mininet emulations." />
11 <meta property="og:description" content="Use Docker containers as hosts in Mininet emulations." />
12 <link rel="canonical" href="http://localhost:4000/" />
13 <meta property="og:url" content="http://localhost:4000/" />
14 <meta property="og:site_name" content="Containernet" />
15 <script type="application/ld+json">
16 {"name":"Containernet","description":"Use Docker containers as hosts in Mininet emulations.","author":null,"@type":"WebSite","url":"http://localhost:4000/","publisher":null,"image":null,"headline":"Containernet","dateModified":null,"datePublished":null,"sameAs":null,"mainEntityOfPage":null,"@context":"http://schema.org"}</script>
17 <!-- End Jekyll SEO tag -->
18
19 <meta name="description" content="Use Docker containers as hosts in Mininet emulations."/>
20 <meta name="viewport" content="width=device-width, initial-scale=1">
21 <meta name="theme-color" content="#157878">
22 <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
23 <link rel="stylesheet" href="/assets/css/style.css?v=">
24 </head>
25 <body>
26 <section class="page-header">
27 <h1 class="project-name">Containernet</h1>
28 <h2 class="project-tagline">Use Docker containers as hosts in Mininet emulations.</h2>
29 <a href="#overview" class="btn">Overview</a>
30 <a href="#get-started" class="btn">Get started</a>
31 <a href="#installation" class="btn">Installation</a>
32 <a href="#references" class="btn">References</a>
33 <a href="#contact" class="btn">Contact</a>
34 <a href="https://github.com/containernet/containernet" class="btn">GitHub</a>
35 <!--
36
37
38 <a href="" class="btn">Download .zip</a>
39 <a href="" class="btn">Download .tar.gz</a>
40
41 -->
42 </section>
43
44 <section class="main-content">
45 <h1 id="overview"><a href="#overview"></a>Overview</h1>
46
47 <p>Containernet is a fork of the famous <a href="http://mininet.org">Mininet</a> network emulator and allows to use <a href="https://www.docker.com">Docker</a> containers as hosts in the emulated network topologies. This enables interesting functionalities to build networking/cloud emulators and testbeds. One example for this is the <a href="https://github.com/sonata-nfv/son-emu">NFV multi-PoP infrastructure emulator</a> created by the <a href="http://sonata-nfv.eu">SONATA</a> project.</p>
48
49 <h2 id="containernet-in-action">Containernet in action</h2>
50
51 <script type="text/javascript" src="https://asciinema.org/a/4eSesgrJL8t2VikiDnHoD9qRF.js" id="asciicast-4eSesgrJL8t2VikiDnHoD9qRF" async="" data-autoplay="true" data-size="medium" data-loop="true" data-rows="12"></script>
52
53 <h2 id="cite-this-work">Cite this work</h2>
54
55 <p>If you use <a href="containernet.github.io">Containernet</a> for your work, please cite the following publication:</p>
56
57 <ul>
58 <li>M. Peuster, H. Karl, and S. v. Rossem: <a href="http://ieeexplore.ieee.org/document/7919490/">MeDICINE: Rapid Prototyping of Production-Ready Network Services in Multi-PoP Environments</a>. IEEE Conference on Network Function Virtualization and Software Defined Networks (NFV-SDN), Palo Alto, CA, USA, pp. 148-153. doi: 10.1109/NFV-SDN.2016.7919490. (2016)</li>
59 </ul>
60
61 <h1 id="get-started"><a href="#get-started"></a>Get started</h1>
62
63 <p>Using Containernet is very similar to using Mininet with <a href="http://mininet.org/walkthrough/#custom-topologies">custom topologies</a>.</p>
64
65 <h2 id="create-a-custom-topology">Create a custom topology</h2>
66
67 <p>First, a Python-based topology has to be created as shown in the following example.</p>
68
69 <div class="language-python highlighter-rouge"><pre class="highlight"><code><span class="s">"""
70 Example topology with two containers (d1, d2),
71 two switches, and one controller:
72
73 - (c)-
74 | |
75 (d1) - (s1) - (s2) - (d2)
76 """</span>
77 <span class="kn">from</span> <span class="nn">mininet.net</span> <span class="kn">import</span> <span class="n">Containernet</span>
78 <span class="kn">from</span> <span class="nn">mininet.node</span> <span class="kn">import</span> <span class="n">Controller</span>
79 <span class="kn">from</span> <span class="nn">mininet.cli</span> <span class="kn">import</span> <span class="n">CLI</span>
80 <span class="kn">from</span> <span class="nn">mininet.link</span> <span class="kn">import</span> <span class="n">TCLink</span>
81 <span class="kn">from</span> <span class="nn">mininet.log</span> <span class="kn">import</span> <span class="n">info</span><span class="p">,</span> <span class="n">setLogLevel</span>
82 <span class="n">setLogLevel</span><span class="p">(</span><span class="s">'info'</span><span class="p">)</span>
83
84 <span class="n">net</span> <span class="o">=</span> <span class="n">Containernet</span><span class="p">(</span><span class="n">controller</span><span class="o">=</span><span class="n">Controller</span><span class="p">)</span>
85 <span class="n">info</span><span class="p">(</span><span class="s">'*** Adding controller</span><span class="se">\n</span><span class="s">'</span><span class="p">)</span>
86 <span class="n">net</span><span class="o">.</span><span class="n">addController</span><span class="p">(</span><span class="s">'c0'</span><span class="p">)</span>
87 <span class="n">info</span><span class="p">(</span><span class="s">'*** Adding docker containers using ubuntu:trusty images</span><span class="se">\n</span><span class="s">'</span><span class="p">)</span>
88 <span class="n">d1</span> <span class="o">=</span> <span class="n">net</span><span class="o">.</span><span class="n">addDocker</span><span class="p">(</span><span class="s">'d1'</span><span class="p">,</span> <span class="n">ip</span><span class="o">=</span><span class="s">'10.0.0.251'</span><span class="p">,</span> <span class="n">dimage</span><span class="o">=</span><span class="s">"ubuntu:trusty"</span><span class="p">)</span>
89 <span class="n">d2</span> <span class="o">=</span> <span class="n">net</span><span class="o">.</span><span class="n">addDocker</span><span class="p">(</span><span class="s">'d2'</span><span class="p">,</span> <span class="n">ip</span><span class="o">=</span><span class="s">'10.0.0.252'</span><span class="p">,</span> <span class="n">dimage</span><span class="o">=</span><span class="s">"ubuntu:trusty"</span><span class="p">)</span>
90 <span class="n">info</span><span class="p">(</span><span class="s">'*** Adding switches</span><span class="se">\n</span><span class="s">'</span><span class="p">)</span>
91 <span class="n">s1</span> <span class="o">=</span> <span class="n">net</span><span class="o">.</span><span class="n">addSwitch</span><span class="p">(</span><span class="s">'s1'</span><span class="p">)</span>
92 <span class="n">s2</span> <span class="o">=</span> <span class="n">net</span><span class="o">.</span><span class="n">addSwitch</span><span class="p">(</span><span class="s">'s2'</span><span class="p">)</span>
93 <span class="n">info</span><span class="p">(</span><span class="s">'*** Creating links</span><span class="se">\n</span><span class="s">'</span><span class="p">)</span>
94 <span class="n">net</span><span class="o">.</span><span class="n">addLink</span><span class="p">(</span><span class="n">d1</span><span class="p">,</span> <span class="n">s1</span><span class="p">)</span>
95 <span class="n">net</span><span class="o">.</span><span class="n">addLink</span><span class="p">(</span><span class="n">s1</span><span class="p">,</span> <span class="n">s2</span><span class="p">,</span> <span class="n">cls</span><span class="o">=</span><span class="n">TCLink</span><span class="p">,</span> <span class="n">delay</span><span class="o">=</span><span class="s">'100ms'</span><span class="p">,</span> <span class="n">bw</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
96 <span class="n">net</span><span class="o">.</span><span class="n">addLink</span><span class="p">(</span><span class="n">s2</span><span class="p">,</span> <span class="n">d2</span><span class="p">)</span>
97 <span class="n">info</span><span class="p">(</span><span class="s">'*** Starting network</span><span class="se">\n</span><span class="s">'</span><span class="p">)</span>
98 <span class="n">net</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
99 <span class="n">info</span><span class="p">(</span><span class="s">'*** Testing connectivity</span><span class="se">\n</span><span class="s">'</span><span class="p">)</span>
100 <span class="n">net</span><span class="o">.</span><span class="n">ping</span><span class="p">([</span><span class="n">d1</span><span class="p">,</span> <span class="n">d2</span><span class="p">])</span>
101 <span class="n">info</span><span class="p">(</span><span class="s">'*** Running CLI</span><span class="se">\n</span><span class="s">'</span><span class="p">)</span>
102 <span class="n">CLI</span><span class="p">(</span><span class="n">net</span><span class="p">)</span>
103 <span class="n">info</span><span class="p">(</span><span class="s">'*** Stopping network'</span><span class="p">)</span>
104 <span class="n">net</span><span class="o">.</span><span class="n">stop</span><span class="p">()</span>
105 </code></pre>
106 </div>
107
108 <p>You can find this topology in <a href="https://github.com/containernet/containernet/tree/master/examples/containernet_example.py"><code class="highlighter-rouge">containernet/examples/containernet_example.py</code></a>.</p>
109
110 <h2 id="run-emulation-and-interact-with-containers">Run emulation and interact with containers</h2>
111
112 <p>Containernet requires root access to configure the emulated network described by the topology script:</p>
113
114 <div class="language-bash highlighter-rouge"><pre class="highlight"><code>sudo python containernet_example.py
115 </code></pre>
116 </div>
117
118 <p>After launching the emulated network, you can interact with the involved containers through Mininet’s interactive CLI as shown with the <code class="highlighter-rouge">ping</code> command in the following example:</p>
119
120 <div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">containernet&gt; </span>d1 ping -c3 d2
121 PING 10.0.0.252 <span class="o">(</span>10.0.0.252<span class="o">)</span> 56<span class="o">(</span>84<span class="o">)</span> bytes of data.
122 64 bytes from 10.0.0.252: <span class="nv">icmp_seq</span><span class="o">=</span>1 <span class="nv">ttl</span><span class="o">=</span>64 <span class="nb">time</span><span class="o">=</span>200 ms
123 64 bytes from 10.0.0.252: <span class="nv">icmp_seq</span><span class="o">=</span>2 <span class="nv">ttl</span><span class="o">=</span>64 <span class="nb">time</span><span class="o">=</span>200 ms
124 64 bytes from 10.0.0.252: <span class="nv">icmp_seq</span><span class="o">=</span>3 <span class="nv">ttl</span><span class="o">=</span>64 <span class="nb">time</span><span class="o">=</span>200 ms
125
126 --- 10.0.0.252 ping statistics ---
127 3 packets transmitted, 3 received, 0% packet loss, <span class="nb">time </span>2002ms
128 rtt min/avg/max/mdev <span class="o">=</span> 200.162/200.316/200.621/0.424 ms
129 containernet&gt;
130 </code></pre>
131 </div>
132
133 <p>To stop the emulation, do:</p>
134
135 <div class="highlighter-rouge"><pre class="highlight"><code>containernet&gt; exit
136 </code></pre>
137 </div>
138
139 <h1 id="installation"><a href="#installation"></a>Installation</h1>
140
141 <p>Automatic installation is provided using an Ansible playbook. Requires a bare-metal machine or VM with Ubuntu <strong>16.04 LTS</strong>.</p>
142
143 <div class="language-bash highlighter-rouge"><pre class="highlight"><code>sudo apt-get install ansible git aptitude
144 git clone https://github.com/containernet/containernet.git
145 <span class="nb">cd </span>containernet/ansible
146 sudo ansible-playbook -i <span class="s2">"localhost,"</span> -c <span class="nb">local </span>install.yml
147 </code></pre>
148 </div>
149
150 <h1 id="references"><a href="#references"></a>References</h1>
151
152 <p>Containernet has been used for a variety of research tasks and networking projects. If you use Containernet, let us <a href="mailto:containernet@peuster.de">know</a>.</p>
153
154 <h2 id="publications">Publications</h2>
155
156 <ul>
157 <li>
158 <p>S. v. Rossem, W. Tavernier, M. Peuster, D. Colle, M. Pickavet and P. Demeester: <a href="https://biblio.ugent.be/publication/8521281/file/8521284.pdf">Monitoring and debugging using an SDK for NFV-powered telecom applications</a>. IEEE Conference on Network Function Virtualization and Software Defined Networks (NFV-SDN), Palo Alto, CA, USA, Demo Session. (2016)</p>
159 </li>
160 <li>
161 <p>M. Peuster, H. Karl: <a href="http://ieeexplore.ieee.org/document/7956044/">Understand Your Chains: Towards Performance Profile-based Network Service Management.</a> Accepted in Fifth European Workshop on Software Defined Networks (EWSDN). IEEE. (2016)</p>
162 </li>
163 <li>
164 <p>Qiao, Yuansong, et al. <a href="http://ieeexplore.ieee.org/document/7543832/">Doopnet: An emulator for network performance analysis of Hadoop clusters using Docker and Mininet.</a> Computers and Communication (ISCC), 2016 IEEE Symposium on. IEEE, 2016.</p>
165 </li>
166 <li>
167 <p>M. Peuster, S. Dräxler, H. Razzaghi, S. v. Rossem, W. Tavernier and H. Karl: <a href="https://cs.uni-paderborn.de/fileadmin/informatik/fg/cn/Publications_Conference_Paper/Publications_Conference_Paper_2017/peuster_netsoft_demo_paper_2017.pdf">A Flexible Multi-PoP Infrastructure Emulator for Carrier-grade MANO Systems</a>. In IEEE 3rd Conference on Network Softwarization (NetSoft) Demo Track . (2017) <strong>Best demo award!</strong></p>
168 </li>
169 <li>
170 <p>M. Peuster and H. Karl: Profile Your Chains, Not Functions: Automated Network Service Profiling in DevOps Environments. IEEE Conference on Network Function Virtualization and Software Defined Networks (NFV-SDN), Berlin, Germany. (2017) (accepted)</p>
171 </li>
172 </ul>
173
174 <h2 id="links">Links</h2>
175
176 <ul>
177 <li><a href="http://mininet.org">Mininet website</a></li>
178 <li><a href="http://maxinet.github.io">Maxinet website</a></li>
179 <li><a href="https://www.docker.com">Docker</a></li>
180 </ul>
181
182 <h1 id="contact"><a href="#contact"></a>Contact</h1>
183
184 <h2 id="support">Support</h2>
185 <p>If you have any questions, please use GitHub’s <a href="https://github.com/containernet/containernet/issues">issue system</a> or Containernet’s <a href="https://gitter.im/containernet/">Gitter channel</a> to get in touch.</p>
186
187 <h2 id="contribute">Contribute</h2>
188 <p>Your contributions are very welcome! Please fork the GitHub repository and create a pull request. We use <a href="https://travis-ci.org/containernet/containernet">Travis-CI</a> to automatically test new commits.</p>
189
190 <h2 id="lead-developer">Lead developer</h2>
191
192 <p>Manuel Peuster</p>
193 <ul>
194 <li>Mail: &lt;manuel (dot) peuster (at) upb (dot) de&gt;</li>
195 <li>GitHub: <a href="https://github.com/mpeuster">@mpeuster</a></li>
196 <li>Website: <a href="https://cs.uni-paderborn.de/cn/person/?tx_upbperson_personsite%5BpersonId%5D=13271&amp;tx_upbperson_personsite%5Bcontroller%5D=Person&amp;cHash=bafec92c0ada0bdfe8af6e2ed99efb4e">Paderborn University</a></li>
197 </ul>
198
199
200 <footer class="site-footer">
201
202 <span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.</span>
203 </footer>
204 </section>
205
206
207 <script type="text/javascript">
208 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
209 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
210 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
211 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
212
213 ga('create', 'UA-105785493-1', 'auto');
214 ga('send', 'pageview');
215 </script>
216
217 </body>
218 </html>