代做web | Network代做 | 代写GUI | network作业 | Python | 作业lab – Activity: Module 1, Pass Task

Activity: Module 1, Pass Task

代做web | Network代做 | 代写GUI | network作业 | Python | 作业lab – 这是一个Network面向对象设计的practice, 考察Network的理解, 涵盖了web/Network/GUI/network/Python等方面, 这个项目是lab代写的代写题目

python代写 代写python

Activity: Module 1, Pass Task

Note: Queries should be forwarded to your respective tutor or unit chair via email only. Give at least 2 business days for us to reply or give feedback.

Aim of the Module: In this module, using network emulator tool (mininet) we design a network using real world topologies (AARNet topology and DFN topology). And measure the performance evaluation of the network. Later, we will extend this work to 5G test bed.

So, to accomplish this overall aim we have decomposed this big aim into many subtasks. Task 1.1P is one of the tasks in which we are installing required necessary softwares required in this unit.

Subtask 1

Step 1: Before we start installing the SDN applications we need to prepare our desktop/system/laptop or any lab computer with the followings:

  • Download and Install virtualization Software
  • Download and Install Ubuntu Linux on a VM
  • Test connectivity to the VM from your desktop or LAN

Download and Install virtualization Software

The recommended virtualization platform to run the various SDN applications is VirtualBox which can be installed on Windows / MacOS / Linux desktops. It can be downloaded from the following link: https://www.virtualbox.org/wiki/Downloads

Download and Install Ubuntu Linux on a VM

Go to https://ubuntu.com/download/desktop your computer’s web browser. You can download the Ubuntu disk image (also known as an ISO file) here.

Further instructions on installing Ubuntu in VirtualBox can be found in the below link:

https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine- usinghttps://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using- virtualboxvirtualbox

Test connectivity to the VM from your desktop or LAN

Using any tool, show that your host machine (Desktop) can connect to Virtual Machine (Ubuntu).

Step 2: Download and install "mininet" a network emulation tool. Create a small minimal network topology (one controller, 2 switches, and few hosts to each switch) http://mininet.org/

For documentation, please refer https://github.com/mininet/mininet/wiki/Documentation

To submit:

  1. Submit a word file, show your source code + screen shorts to show us the successful setup of the default topology, i.e., the minimal topology, which includes one OpenFlow kernel switch connected to two hosts, plus the OpenFlow reference controller. Example as below.
  2. Submit a word file, show your source code + screen shorts to show us the successful setup of the Custom Topology. Custom Topologies Mininet supports a simple Python API to create custom network topologies. You can create your custom topology by writing a few lines of Python code. Customize the topology as shown in the figure below.

Subtask 2

In this subtask, we are measuring the network performance of small-scale customised topology using Iperf tool.

Background

We understand that the basic commands in Mininet is the first step, previously we start a simple network topology by running the following command as shown in the following image.

Figure 1: Simple network topology.

The default topology is the minimal topology, which includes one OpenFlow kernel switch connected to two hosts, plus the OpenFlow reference controller. This topology could also be specified on the command line with –topo=minimal. Other topologies are also available (see mininet> sudo mn –custom C_Topology.py –topo C_Topology).

With the above command, all four entities (2 host processes, 1 switch process, 1 basic controller) run in the VM. The controller can be outside the VM. If no specific test is passed as a parameter, the Mininet CLI comes up. In the Wireshark window, you should see the kernel switch connect to the reference controller.

  • Display Mininet CLI commands: mininet> help
  • Display nodes: mininet> nodes
  • Display links: mininet> net
  • Dump information about all nodes: mininet> dump You should see the switch and two hosts listed.
  • Exit the CLI: mininet> exit Cleanup If Mininet crashes for some reason, clean it up: $ sudo mn -c

Custom Topologies- Mininet supports a simple Python API to create custom network topologies. You can create your custom topology by writing a few lines of Python code. For example, Figure 2 below shows a topology with two switches and four hosts. The code consists of a class, named C_Topology which extends the Topo class provided by the API. We suggest that you SSH into your mininet VM so that you can use a GUI text editor such as gedit or emacs (see instructions in the Mininet Introduction document). It is strongly recommended that you should save the source code in a file, named C_Topology.py in your (mounted) CSE home directory. You can copy the source code from here: C_Topology.py (see below). Change the working directory to your CSE home directory and type: from mininet.topo import Topo

class C_Topology ( Topo ): #
Simple topology example def
__init__( self ): # Create
custom topo.
# Initialize topology
Topo.__init__( self ) # Add
hosts and switches h1 =
self.addHost( 'h1' ) h2 =
self.addHost( 'h2' ) h3 =
self.addHost( 'h3' ) h4 =
self.addHost( 'h4' ) leftSwitch =
self.addSwitch( 's1' ) rightSwitch =
self.addSwitch( 's2' )
# Add links self.addLink( h1,
leftSwitch ) self.addLink( h2, leftSwitch
) self.addLink( leftSwitch, rightSwitch
) self.addLink( rightSwitch, h3 )
self.addLink( rightSwitch, h4 )
topos = { ' C_Topology ': ( lambda: C_Topology () ) }
Figure 2: Topology with two switches and four hosts.

Submission1:

The aim of the task is to conduct the performance evaluation of the network. Firstly, it is important to understand the various Network key performance indicators (KPIs). These are benchmarks by which optimal network performance is determined. Tracking performance against KPIs helps network managers make proactive decisions to ensure agreed service levels are met.

The most common KPIs are bandwidth, CPU and memory utilization (for device health), Latency and packet loss (indication of possible network problems).

In this task, we will measure the network performance using Iperf tool^1_._

Iperf is a tool to measure the bandwidth and the quality of a network link. Jperf can be associated with Iperf to provide a graphical frontend written in Java. The network link is delimited by two hosts running Iperf.

The quality of a link can be tested as follows:

  • Latency (response time or RTT): can be measured with the Ping command.
  • Jitter (latency variation): can be measured with an Iperf UDP test. – Datagram loss: can be measured with an Iperf UDP test.

The bandwidth is measured through TCP tests.

To be clear, the difference between TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) is that TCP use processes to check that the packets are correctly sent to the receiver whereas with UDP the packets are sent without any checks but with the advantage of being quicker than TCP.

Iperf uses the different capacities of TCP and UDP to provide statistics about network links.

Finally, Iperf can be installed very easily on any UNIX/Linux or Microsoft Windows system. One host must be set as client, the other one as server. Please read the documentation from the footnote provided below.

1https://iperf.fr/ To do list: –

  1. Compile from source: git clone https://github.com/esnet/iperf.git
  2. Start mininet (sudo mn –custom C_Topology.py –topo C_Topology)
  3. Use xterm to open windows for h1 and h2 (use any two hosts) and check there IP configuration.
  4. Basic TCP transmission evaluation. Start the TCP server (-s) at h1 with port 5566 (-p). Also, monitor the results every one second (-i). Note: the default setting is using TCP. [Double check the port number and enter the correct ones only]
  5. Start the TCP client (-c) at h3. Also, set the transmission duration (-t) to 15 seconds. Note: after -c, you need to specify the server ip address.
  6. iperf -c 10.0.0.3 -p 5566 -t 15 [Double check the server and client ip addresses and enter the correct ones only]
  7. Get Results at h3 (any other host but please specify). (From 0~15 seconds, the average throughput is 14.2 Gbps, in our case.)
  8. Results at h1. (The following figure, as an example for you, shows the throughput every second). The outputs will look like Figure 3 and 4.
Figure 3: An illustration of (start of) the TCP server (-s) at h1 with port 5566 (-p).
Figure 4: Throughput of the customised network topology.
  • You are required to repeat the experiment at your end and submit the codes and images to show complete implementation of all steps and final outcome (as shown in Figure 3 and 4).
  • You are also required to calculate the average latency and explain the outcome in maximum 250 words to let the reader know your observation.
Submit all requirements in one pdf file.
NOTE: MAC users please follow the link https://mac.getutm.app/gallery/ubuntu- 20 - 04

The above link contains UTM build, ubuntu build, all relevant instructions.

Also try, if things do not work, to install the GNOME Desktop for the server (sudo apt install
ubuntu-desktop).

For gnuplot, some users might face the problem that the gnuplot appears and then disappears after 2, 3 seconds. This can be resolved by gnuplot-x11 (sudo apt-get install gnuplot-x11)

[Highly] Recommended Study material for this task: -
  1. https://github.com/esnet/iperf
  2. http://openmaniak.com/iperf.php
  3. https://iperf.fr/iperf-doc.php
  4. https://www.youtube.com/watch?v=zQYu2HH5s6U
  5. Zhu, Liehuang, Md Monjurul Karim, Kashif Sharif, Fan Li, Xiaojiang Du, and Mohsen Guizani. "SDN controllers: Benchmarking & performance evaluation." arXiv preprint arXiv:1902.04491 (2019). [pdf is uploaded in TALIS and Teams under Files tab]
  6. https://stackoverflow.com/questions/38040156/xterm-not-working-in-mininet

Subtask 3:

This subtask in which we are measuring the network performance of small-scale customised
topology using Iperf tool. We will view the output in a graphical form.
Submission1:
Please repeat the Subtask 2 and extend that in following ways.
  1. In Subtask 2 we have conducted TCP evaluation. This subtask requires you to also conduct the basic UDP transmission evaluation as well.
  2. After both TCP and UDP evaluation, draw the throughput graph using gnuplot. So, we need to do the evaluation again but this time, we need to save the result into a file to do some post-processing. After that, use gnuplot to draw the graph (install gnuplot if needed).
Start the iperf server again, (use > to redirect the results to "result" file). Do the
postprocessing to get the data for plotting. (| grep sec: reserve the line containing
"sec"; head -15: from beginning, get the first 15 lines (1~15 seconds); tr - " ": using " "
to replace "-"; awk '{print $4, $8}: get the 4th and 8th columns). Example figure is
shown below.
  • You are required to repeat the experiment (for both TCP and UDP evaluation) at your end and submit the codes and images to show complete implementation of all steps and final outcome (as shown in the above figures).
  • You are also required to explain the outcome in maximum 250 words to let the reader know your observation.
Submit all requirements in one pdf file.

NOTE: MAC users please follow the link https://mac.getutm.app/gallery/ubuntu- 20 – 04

The above link contains UTM build, ubuntu build, all relevant instructions.

Also try, if things do not work, to install the GNOME Desktop for the server (sudo apt install ubuntu-desktop).

For gnuplot, some users might face the problem that the gnuplot appears and then disappears after 2, 3 seconds. This can be resolved by gnuplot-x11 (sudo apt-get install gnuplot-x11) [Highly] Recommended Study material for this task: –

  1. https://github.com/esnet/iperf
  2. http://openmaniak.com/iperf.php
  3. https://iperf.fr/iperf-doc.php
  4. https://www.youtube.com/watch?v=zQYu2HH5s6U
  5. Zhu, Liehuang, Md Monjurul Karim, Kashif Sharif, Fan Li, Xiaojiang Du, and Mohsen Guizani. "SDN controllers: Benchmarking & performance evaluation." arXiv preprint arXiv:1902.04491 (2019). [pdf is uploaded in TALIS and Teams under Files tab]
  6. https://stackoverflow.com/questions/38040156/xterm-not-working-in-mininet