-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathoflearningswitch.html
More file actions
302 lines (280 loc) · 18.5 KB
/
oflearningswitch.html
File metadata and controls
302 lines (280 loc) · 18.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>VCNL | Three Node Routing</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="free html5, free template, free bootstrap, html5, css3, mobile first, responsive" />
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="shortcut icon" href="favicon.ico">
<link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,300,700|Roboto:300,400' rel='stylesheet' type='text/css'>
<!-- Animate.css -->
<link rel="stylesheet" href="css/animate.css">
<!-- Icomoon Icon Fonts-->
<link rel="stylesheet" href="css/icomoon.css">
<!-- Bootstrap -->
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css">
<!-- Modernizr JS -->
<script src="js/modernizr-2.6.2.min.js"></script>
<!-- FOR IE9 below -->
<!--[if lt IE 9]>
<script src="js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="overlay">
<div class="wrapper">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
</div>
<div class="box-wrap">
<header role="banner" id="fh5co-header">
<div class="container">
<nav class="navbar navbar-default">
<div class="row">
<div class="geni-logo col-md-3">
<div class="fh5co-navbar-brand">
<a class="fh5co-logo" href="index.html"><img src="images/geni_logo.png" alt="Closest Logo"></a>
</div>
</div>
<div class="col-md-7">
<ul class="nav text-center">
<li ><a href="index.html"><span>Home</span></a></li>
<li class="active"><a href="modules.html">Modules</a></li>
<li><a href="aboutUs.html">About Us</a></li>
<li><a href="faq.html">FAQ</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
</div>
<div class="col-md-2">
<ul class="social">
<li><a href="http://facebook.com/vcnl" target="_blank"><i class="icon-facebook"></i></a></li>
<li><a href="http://twitter.com/vcnl" target="_blank"><i class="icon-twitter"></i></a></li>
<li><a href="#"><i class="icon-linkedin"></i></a></li>
</ul>
</div>
</div>
</nav>
</div>
</header>
<!-- END: header -->
<section id="product">
<div class="container">
<div class="row animate-box">
<div class="col-md-12 section-heading text-center">
<h2><u>E2: OpenFlow Learning Switch</u></h2>
</div>
</div>
<div class="row">
<div class="post-entry">
<div class="col-md-8 col-md-offset-2">
<div class="post animate-box">
<div class="col-md-12"><a href="#link1"><img class="vidFrame" width="300px" src="images/video-thumbnail.png"></a></div>
</div>
</div>
</div>
<a href="#_" class="lightbox" id="link1">
<iframe id="autoplayvideoframe" class="vidFrame" width="700" height="500" src="https://www.youtube.com/embed/4jv2VT7JH6A" frameborder="0" allowfullscreen></iframe>
</a>
</div>
<div class="row">
<div class="col-md-8 col-md-offset-2 animate-box">
<h2>Overview</h2>
<p>In this first module of the tutorial you will learn how to quikly design and execute a lab exercise on a GENI testbed using LabWiki. In the second module, you will learn how to easily scale up the first experiment to include more hosts and switches. The working of the experiment is similar to that of the previous experiment.</p>
</div>
</div>
<div class="row">
<div class="col-md-8 col-md-offset-2 animate-box">
<h2>Preparation</h2>
<p>The goal of this assignment is to implement the learning switch capability that is used by Ethernet switches by using a software-based OpenFlow switch. In the topology shown in the figure (Simple Learning Switch), this software switch is to be implemented in the node “switch”. All the other nodes represent regular hosts. To realize this implementation of a learning switch, Trema based Openflow controller written in Ruby has to be designed and implemented.</p>
<p>The correct functionality of the learning switch can be verified by creating an experiment script in which a node A pings node B – node D in LabWiki. In the topology shown in the figure, the switch node is the learning switch, which connects nodes A-D with each other. When any of these nodes ping each other for the first time, the switch does not know the destination address of the node. To populate it's route table, the switch node floods the packet to all the nodes it is connected to. When it receives a reply to the flood, this information is used to populate its switching table. Hereafter, when any node wants to ping any other nodes, the switch node does a lookup from the table.
<br/>To know more about learning-switch, check out this <a href="https://www.opennetworking.org/images/stories/downloads/sdn-resources/white-papers/wp-sdn-newnorm.pdf"><i>link</i></a>.
<br/>To know more about the POX controller, check out this <a href="https://openflow.stanford.edu/display/ONL/POX+Wiki"><i>link</i></a>.</p>
<div class="col-md-12 animate-box">
<div class="service col-md-6">
<div class="service-icon">
<img style="width: 400px; margin-bottom: 5px;" src="http://groups.geni.net/geni/raw-attachment/wiki/GEC20Agenda/LabWiki/ModuleA/GEC20_simple_topo.png">
</div>
<h3>Simple Learning Switch</h3>
</div>
<div class="service col-md-6">
<div class="service-icon">
<img style="width: 400px; margin-bottom: 5px;" src="http://groups.geni.net/geni/raw-attachment/wiki/GEC20Agenda/LabWiki/ModuleC/GEC20_extended_topo.png">
</div>
<h3> Extended Learning Switch</h3>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-8 col-md-offset-2 animate-box">
<h2>Experiment</h2>
<p>For this experiment you can use the following RSpecs made available on the <a href="https://portal.geni.net"><i>GENI Portal</i></a>.<br/>
<br>- Simple Learning Switch - IG-learning-switch
<br>- Extended Learning Switch - IG-learning-switch-extended
</p>
<h3>Testing with Mininet</h3>
<p>
To test the working of your controller before deploying it in GENI, you can use <a href="http://mininet.org/">Mininet</a>. The steps are as follows:
<br>1. Download and install the Mininet VM using the instructions <a href="http://mininet.org/download/#option-1-mininet-vm-installation-easy-recommended">here</a>.
<br>2. Download and install PoX inside the Mininet VM using the following <a href="https://openflow.stanford.edu/display/ONL/POX+Wiki#POXWiki-InstallingPOX">link</a>.
<br>3. Start the PoX controller from inside the PoX directory using the command: <br><i>./pox.py openflow.of_01 --port=6653 {name of controller file}</i>
<div class="col-md-12 animate-box">
<div class="service col-md-6">
<div class="service-icon">
<img style="width: 800px; margin-bottom: 5px;" src="images/runl2.png">
</div>
</div>
</div>
</p><p>
<br>4. Initialize the Mininet topology and controller connection using the command: <br><i>sudo mn --topo single,4 --mac --switch ovsk --controller remote</i><br>This command is used to start a MAC learning OVS switch connected to three hosts as shown in the learning switch topology.
<div class="col-md-12 animate-box">
<div class="service col-md-6">
<div class="service-icon">
<img style="width: 800px; margin-bottom: 5px;" src="images/mininetstart.png">
</div>
</div>
</div>
</p><p>
<br>5. Login to host h1 and run pings to hosts h2, h3 and h4 to test the working of your learning switch controller.
<div class="col-md-12 animate-box">
<div class="service col-md-6">
<div class="service-icon"> <img style="width: 800px; margin-bottom: 5px;" src="images/pingtest.png">
</div>
</div>
</div>
</p><p>
As we can see from the above output, all pings go through successfully and this verifies the correct working of the learning switch controller.
<br>To try the <a href="https://www.ansible.com/">Ansible</a> version of this tutorial, click <a href="http://emmy10.casa.umass.edu/oflearningswitch_ansible.html">here</a>. To use the LabWiki version, continue here.
</p>
</div>
</div>
<div class="row">
<div class="col-md-8 col-md-offset-2 animate-box">
<h2>Verification</h2>
<p>To get started with LabWiki point your browser <a href="http://labwiki.casa.umass.edu"><i>here</i></a></p>
<p>Labwiki has three main window panes.</p>
<h3><i>The "Plan" Window</i></h3>
<p>We will focus on the leftmost pane first. This is the "Plan" window in which you document your experiment. (This is somewhat the equivalent of an electronic lab journal.) Documents are written in <a href="http://daringfireball.net/projects/markdown/"><i>Markdown.</i></a><br/>
<p>At the top of that window is a text field which you can use to search for existing MD scripts. Type "GEC22-learningswitch" in the field and then select "GEC22-learningswitch.md" from the list of files that are offered. This document has some information on the experiment that will be performed in Module A of the tutorial.</p>
<p>To edit Markdown scripts use the Prepare window by selecting the option "Wiki" from the menu shown.</p>
<h3><i>The "Prepare" Window</i></h3>
<p>The "Prepare" (middle) window allows you to define your experiment through an OMF experiment script specified in OMF Experiment Description Language (OEDL). At the top of that window is a text field which you can use to search for existing OEDL scripts. Type "GEC22" in the field and then select "GEC22-learningswitch.oedl" (If you are running the extended learning switch, type "GEC22learningswitchextend.oedl") from the list of files that are offered. This shows the experiment script in the field below.<br/>
<h3><i>The "Execute" Window</i></h3>
<p>To start your experiment, simply drag the icon that is to the left of the file name (see figure below) from the middle (Prepare) to the right (Execute) window. That will automatically fill out the experiment relevant information in this window
Explanation of the fields in the Execute window:
<br> <div class="col-md-12 animate-box">
<div class="service">
<div class="service-icon">
<img class="vidFrame" style="width: 800px; margin-bottom: 5px;" src="http://groups.geni.net/geni/raw-attachment/wiki/GEC22Agenda/LabWiki/ModuleA/Execute/LW-execute.png">
</div>
</div><br/>
</div><p>
<br>1. <u>Name:</u> In this field you specify the name of your experiment.
<br>2. <u>Project:</u> This pull-down menu list all the projects you are currently a member of. Select the project that contains the slice you want to run your experiment on.
<br>3. <u>Experiment Context:</u> With the context you can specify a certain set of experiments. E.g., a series of experiments you run under a certain set of startup parameters. This field is not mandatory and only necessary if you would like to save your experiment data to view later.
<br>4. <u>Slice:</u> This pull down menu lists all slice that have been created under "project". Select the slice you would like to run your experiment on.</br>
</p>
<p>Change source1 and source2 fields to include your slice name similar to nodea- Then, start the actual experiment by clicking on the "Start Experiment" button.</p>
<!--- <br><div class="col-md-12 animate-box">
<div class="service">
<div class="service-icon">
<img class="vidFrame" style="width: 800px; margin-bottom: 5px;" src="http://groups.geni.net/geni/raw-attachment/wiki/GEC22Agenda/LabWiki/ModuleA/Execute/LW-execute.png">
</div>
</div><br/>
</div> --->
<p>After pressing the "Start" button, the Execute window will change and start showing status information about your experiment. The figure below gives an example for the Execute window during experiment execution.</p>
<div class="col-md-12 animate-box">
<div class="service">
<div class="service-icon">
<img class="vidFrame" style="width: 800px; margin-bottom: 5px;" src="http://groups.geni.net/geni/raw-attachment/wiki/GEC22Agenda/LabWiki/ModuleA/Execute/LW-executing.png"><br>
</div></br>
</div>
</div>
<br><p>Now the window lists experiment properties, one or several live graphs (if they have been specified in the OEDL script), and logging information. The latter would be a good starting point for trouble shooting, should your experiment not run as expected. Depending on the status of your resources and experiments, you will see one of the following statuses at the top of the Execute window: </br>
<br>1. <u>Pending</u> - This is the first state of your experiment where the job scheduler adds it to the run queue. This status would remain for the first few seconds before it changes to Running or Failed
<br>2. <u>Running</u> - This status appears when your experiment starts running. If it fails for one or more reasons, a Failed status will appear instead
<br>3. <u>Aborted</u> - When you click on "Stop Experiment" at the top-left corner of the Execute window, the status changes to aborted
<br>4. <u>Finished</u> - When your experiment is done, you will see this status.</br>
</p>
<h3><br>Note to Students</h3>
<p>
- Once the experiment is complete, students have to create a new Markdown file for submission. You can create your own Markdown from scratch or copy the contents of the sample Markdown created by the instructor. Then can drag the graphs of the experiment into the file and and include necessary details about the experiment. When you are ready to submit the file, you can click "share page" icon in the leftmost-corner of plan panel of Labwiki.</br>
<br>- The "Share Page" creates a submission file with the student's user name in the submission repository</br>
</p>
<div class="col-md-12 animate-box">
<div class="service">
<div class="service-icon">
<img class="vidFrame" style="width: 800px; margin-bottom: 5px;" src="images/studentsubmit.png"><br>
</div></br>
</div>
</div>
<h3>Note to Instructors</h3>
<p>
- Students can be asked to implement a particular functionality of the OpenFlow controller. A template should be given to them.<br>
<br>- LabWiki has a new feature that enables the instructor to auto-grade the students' experiments. LabWiki allows graders to write a user-defined event, which is triggered when an experiment-generated measurement reaches a specific value. In the script below, MY_EVENT is the user-defined event. The function will be called every 0.5 seconds. It queries the specified stats and checks if Node A is able to ping all other nodes. The event will be triggered once that condition is satisfied. Then, ping application to itself is started on Node A. If a ping to the IP address of Node A is also seen on the graph, the experiment ran successfully.</br>
<br>- To view students' submissions open a Markdown called "submission.md" in the Plan window. This file contains links to all student submissions. Click on the link you wish to grade.</br>
</p>
<div class="col-md-12 animate-box">
<div class="service col-md-6">
<div class="service-icon">
<img style="width: 400px; margin-bottom: 5px;" src="images/submission.png">
</div>
<h3>Select submission</h3>
</div>
<div class="service col-md-6">
<div class="service-icon">
<img style="width: 400px; margin-bottom: 5px;" src="images/studentsubmission.png">
</div>
<h3>View Submission</h3>
</div>
</div>
</div>
</div>
</div>
</section>
<footer id="footer" role="contentinfo">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="footer-widget border">
<div class="col-md-4">
<p class="pull-left" class="col-md-4"><small>Contact Us<br/>Email: geni-users@googlegroups.com</small></p>
<ul class="social social-footer">
<li><a href="http://facebook.com/vcnl" target="_blank"><i class="icon-facebook"></i></a></li>
<li><a href="http://twitter.com/vcnl" target="_blank"><i class="icon-twitter"></i></a></li>
<li><a href="#"><i class="icon-linkedin"></i></a></li>
</ul>
</div>
<div class="col-md-4">
<img class="col-md-4 col-md-offset-5" width="90" height="90" align="left" alt="Logo2" src="images/umass-logo400.png">
</div>
<div class="col-md-4">
<p class="pull-left" class="col-md-4"><small>Related Links<br/><a href="www.geni.net">www.geni.net</a></small></p></div>
</div>
</div>
</div>
</div>
</footer>
</div>
<!-- END: box-wrap -->
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<!-- jQuery Easing -->
<script src="js/jquery.easing.1.3.js"></script>
<!-- Bootstrap -->
<script src="js/bootstrap.min.js"></script>
<!-- Waypoints -->
<script src="js/jquery.waypoints.min.js"></script>
<!-- Main JS (Do not remove) -->
<script src="js/main.js"></script>
</body>
</html>