Report on mininet by Ryu controller

  • Writing a report ONLY 3000word(exclude appendices and reference)

  • No coding required( coding completed by myself) – Only 2 files changed

  • Tutor just need to write the report according to below direction.

  • Reference(video clips, 10mins for each)  very helpful to understand this assignment

  1. https://www.coursera.org/learn/cloud-networking/lecture/8LGvU/programming-assignment-2-explanation

  2. https://www.coursera.org/learn/cloud-networking/lecture/LJL5J/programming-assignment-3-explanation

  3. https://www.coursera.org/learn/cloud-networking/lecture/0GtnK/programming-assignment-4-explanation

  • Source code : full source attached. 8 python files, only 2 files are changed

    • Minidc\controller\policy.py

    • Minidc\controller\bwmon.py

  • Other direction: refer below description.

  • Testing environment: Y

    • You can use below VM image. All of setting is ready with below image. you just need to change policy.py and bwmon.py files from attached source code.

    • Virtual box image : https://drive.google.com/file/d/0B6V_ocic9uueN1lkUEsxLXFJbFk/view?usp=sharing

Due date : 9 June, 2017(Friday)

Word length(body) : 3000 words(exclude appendices and reference)

Software Defined Networking (SDN) is more flexible and agile, which are based on the separation of data and control planes. The separation of control plane from actual hardware allows an easy deployment of network applications and provides a central view of the network. A controller or the network operating system, that is the software inside the network controller, provides a simple programming interface and a topological view of the network, which simplifies the tasks of managing the network. In this research project, you will be setting up a small data centre in the mininet emulator using Software defined network. To control the SDN, Ryu controller will be used that is already installed in the provided VM. You will be implementing static routing and dynamic routing for two different network setups.

Part A: Written report

In the topology diagram given below, the routing policy sent all traffic from edge switches through one core switch. You should improve the policy by distributing the traffic from edge switches across all core switches. Each core switch should have a set of one or more tenants assigned to it. Edge switches should then route traffic to the appropriate core switch based on the tenant association of the source and destination. In the topology diagram below, each core switch handles traffic for one tenant as per the naïve policy.

Report on mininet by Ryu controller 1

In this assignment, you should add code to the file ~/cloudnetmooc/minidc/controller/policy.py. Specifically, you should extend the function build() in the class StaticRouting. Your code should install a rule in each edge switch. If the destination host is a neighbour – i.e., if the host is directly connected to the switch via a port – output the packet out to that port. If not, send the packet "up" to the core switch that is associated with the destination host's VLAN. You may use the "upward" rules in DefaultPolicy.build() as a rough guide. Useful API functions are also detailed in the source file and comments. If coded correctly, you should see an improvement in the video quality compared to naïve routing policy. The video may not play entirely in high quality, but you should notice an improvement from the policy in Assignment 1. Instruction for Part A is given in Appendix A

Part B: Written report

Statistically assigning core switches to route traffic for each VLAN can be problematic. Not all tenants use the same amount of bandwidth, so the load on the core switches may not be evenly distributed. As a result, one core switch may handle traffic for many tenants using large amounts of bandwidth while the other core switches are underutilized. In this part of the assignment, you should observe this scenario and update your routing policy to account for different traffic demands between tenants.

You will use a larger topology for this part of the assignment assignment, shown below, with 3 core switches, 4 edge switches, and 5 hosts per edge switch. There will be 3 different types of tenants, each with 4 hosts: Iperf, Inactive, and Memcached. The 2 Iperf tenants consist of hosts running iperf to simulate bulk transfers. Hosts that are members of the 2 Inactive tenants will not transfer any data. The Memcached tenant will consist of one client retrieving memcached objects, in parallel, from 3 different memcached servers. This will simulate a client loading a web page of multiple objects.

Report on mininet by Ryu controller 2

Rather than pre-assigning VLANs to particular core switches, your new routing policy should create a flow scheduling policy that balances flows across core switches, regardless of their VLAN/tenant association. You should implement this improved policy in the file ~/cloudmooc/minidc/controller/policy.py. Specifically, you will add code to the functionminUtilization() in the class AdaptivePolicy. Your code should use the dictionaryself.utilization to find the least utilized core switch. This dictionary stores switch names as keys and utilization (in bytes) as the value. Note: since you would be balancing the utilization among core switches, the dictionary self.utilization will only contain keys for core switches. Your code should not need to reference any other modules or objects aside fromself.utilization. Instruction for Part B is given in Appendix B

Report structure

  1. Introduction

  2. Part A : Static routing

  3. Part B : Dynamic routing

  4. Conclusion and Future work

Appendix A:

Instructions for Part A To validate your code, open two terminals in the VM and perform the following steps:

1. In terminal 1, cd to ~/cloudnetmooc and run: sudo ./mdc –vid

2. In terminal 2, cd to ~/cloudnetmooc/minidc/controller.

 Start Ryu: ryu-manager controller.py.

 The default (naive) routing policy will be loaded automatically.

3. Now that Ryu has started, press in terminal 1.

 A Chrome window will pop up, press play to start the video. Observe the video quality is poor and plays only in low quality. The video may even pause to buffer

4. Open a new, different instance of Chrome from the menu bar or Desktop.

1. Load the improved routing policy by selecting the radio button labeled "Static" and pressing the "Update Policy" button. Observe the video plays almost entirely in high quality.

5. End the experiment:

Expected Result

If your code is working properly, you should see an improvement in the video quality compared to Assignment 1. Note that the video may not play entirely in high quality but should play in high quality for some portion.

Appendix B:

Instructions for Part B In this scenario would be using memcached, a caching system commonly used for caching objects in a web page. A client will issue requests to memcached servers and record the response time to load all the objects. The client will perform 20 page loads and record the median and 95th percentile from these 20 trials. The results will be reported at the bottom of the dashboard at http://127.0.0.1.

To validate your code, perform the following steps:

1. In terminal 1, cd to ~/cloudnetmooc and run: sudo ./mdc --adp. Note: use the parameter --adp for this assignment, not --vid.

2. In terminal 2, cd to ~/cloudnetmooc/minidc/controller.

 Start Ryu: ryu-manager controller.py.

 The default (naive) routing policy will be loaded automatically.

3. Now that Ryu has started, press in terminal 1

4. Open a Chrome instance from the menu bar and navigate to http://127.0.0.1.

 Wait several seconds and observe the graph of memcached response times updates.

 Load the routing policy from Assignment 2 by selecting the radio button labeled Static and pressing the Update Policy button.

 Observe that the response time does not significantly decrease.

 Load the newest routing policy by selecting the radio button labelled Adaptive and pressing the Update Policy button.

 If coded correctly, your newest routing policy should significantly decrease the response time.

  1. End the experiment:


Expected Result

If your code is working properly, you should see the memcached response time improve when the adaptive policy is loaded. In particular, you should see a noticeable improvement in the 95th percentile compared to the default and static policies