CS5229课程程序 写作、 辅导SDN留学生、Python程序

” CS5229课程程序 写作、 辅导SDN留学生、Python程序CS5229 – Advanced ComputerNetworks – HW 2Due : Sep 9, 2020 2359 HrsTotal: 50 points (10% of Grade)OverviewThis HW exposes you to Software Defined Networking (SDN) concepts and the related toolsets. TheSDN architecture decouples network control and forwarding functions such that the networkcontrol is programmable and also abstracting the network infrastructure. You can further refer tothe following references On SDNand OpenFlow.Software Tools1) You will be using a Virtual Machine for the assignment. The VM (LUbuntu 16.04) comeswith all the necessary software installed. Download the VM fromcomp.nus.edu.sg/~ghadi/CS5229/CS5229.ova (Size: 2.82 GB).1) The software you will be using are: Floodlight SDN Controller 1 Mininet 2 network emulator CBench 3 benchmarking Program for OpenFlow Controller Network utilities such as iperf3 and ping.2) To run the VM, you will to download a hypervisor. Install VirtualBox4 in your PC. VirtualBoxsupportsWindows/Linux/MacOS.Running the Programs2) Goto VirtualBox UI, and do Import Appliance, and specify the location of the downloadedcs5229.ova file in order to import the VM.3) Start the VM once it is imported.4) You can login to the vm using :CS5229课程作业 写作、 辅导SDN留学生作业、Python程序1 httpss://floodlight.atlassian.net/wiki/spaces/floodlightcontroller/overview2 https://mininet.org/overview/3 httpss://floodlight.atlassian.net/wiki/spaces/floodlightcontroller/pages/1343657/Cbench+New4 httpss://www.virtualbox.org/wiki/DownloadsGetting System to work:1. We will be using Mininet to emulate The network uses OpenvSwitch to emulate theswitches, and containers for the hosts connecting to the network. Start your mininettopology specify in the file Topology1.py. Open a terminal (LXTerminal) and run thefollowing: sudo ~/CS5229/Topology1.pyThe topology described in the Topology1.py file is shown below.2. Start the SDN Controller, Floodlight(a java based SDN controller). Open a new terminal, run thefollowing:i. cd ~/CS5229/floodlight-1.2ii. java -Dlogback.configurationFile=logback.xml -jar target/floodlight.jarVerify the switches are connected to the floodlight controller. You must see the below logs in your floodlight console:WARN [n.f.c.i.C.s.notification:main] Switch 00:00:00:00:00:00:00:01 connected. WARN [n.f.c.i.C.s.notification:main]Switch 00:00:00:00:00:00:00:02 connected.Where, 00:00:00:00:00:00:00:01 is the fixed Datapath ID of Switch S1 and 00:00:00:00:00:00:00:02 is the ID of SwitchS2.Part I: Validating your mininet Setup1. Verify the static routing using the ping program. Start a terminal on host h1 by running thecommand xterm h1 in the mininet console. Similarly, start a terminal for host h2 and h3.Note that the IP addresses of h1, h2 and h3 are 10.0.0.1, 10.0.0.2 and 10.0.0.3 respectively.From terminal h1, run ping 10.0.02 and from terminal h2, run ping 10.0.0.3a. Note down the ping latency between h1 and h2b. Note down the ping latency between h2 and h3.2. Measure the throughput achievable using the iperf3 program. On h2, run iperf3 -s.a. On h1, run iperf3 c 10.0.0.2. Observe the throughput achievable on server h2.b. On h3, run iperf3 c 10.0.0.2. Observe the throughput achievable on server h2.3. Increase the link bandwidth between switch S1 to S2 to 100Gbps. Measure the throughputachievable between host h2 and h3 using the iperf3 program. You need to restart mininetwith the new Topology1.py configuration.4. Measure the performance of the OpenFlow controller using the CBench program.a. Terminate the mininet Console to avoid conflicts by typing quitb. cd ~/CS5229/oflops/cbenchc. run ./cbench c localhost p 5229 m 10000 l 5 S 8 M 1000 D 600 -t and observe thethroughputd. You can find explanations of each argument by run ./cbench hWrite down the answers for the following: (15pts)a. What is the ping latency between h1 and h2 in (1a)?b. What is the ping latency between h2 and h3 in (1b)?c. What is the throughput achieved from h1 to h2 using iperf3 in (2a)? Explain yourobservations?d. What is the throughput achieved from h3 to h2 using iperf3 in (2b)? Explain yourobservations?e. What is the throughput achieved from h3 to h2 using iperf in (3)? when the linkbandwidth is set to 100Gbps? Explain your observations?f. What is the throughput of the controller in (4)?Part II: Setting SDN PoliciesYou have recently joined as a Network engineer at an Organization. The organization has threeinternal departments, namely, Sales, Marketing and RD as shown in Figure 1. They areinterconnected by a network where the Edge switches S1, S2 and S3 respectively are SDN Switches.The Organization has a specific policy on how the communication between the three departmentsshould be maintained. As a Network engineer, you have to ensure that the networking policies meetthe overall company policy. Being adventurous, you wanted to implement the network using SDN(Software Defined Networking) . The advantage of using SDN to implement the network is that : 1)Networks are easily programmable, 2) Centrally Controlled, 3) Network entities can be abstractedto optimize various resources, and 4) Usage of Open Standards (E.g. OpenFlow). Now, in order toimplement the policies, you plan to write an application on top of a standard SDN Controller whichtalks to each of the edge switches(S1/S2/S3) as shown in Figure 1. Consider just 3 hosts operatingin the respective departments (Sales, Marketing and RD) namely, H1, H2 and H3.Figure 2: Network TopologySetting up the Environment1. The network topology, policy scripts needed for Part II can be found in ~/CS5229/Topology2.py.Run sudo ./Topology2.py2. Start the SDN Controller, Floodlight(a java based SDN controller). Open a new terminal, run thefollowing:o cd ~/CS5229/floodlight-1.2o java -Dlogback.configurationFile=logback.xml -jar target/floodlight.jar3. Now, we will be running our policies as an application over the floodlight controller. Beforeanything, we first setup static forwarding in our policy, so that communication happens via theshortest path. To run this policy file, open a new terminal, run the following: ~/CS5229/Policy.pyThe Organizational Network Policies to be implemented by you are:1) Communication between H2 to H3 and vice-versa: (10 points)Block all traffic using destination UDP ports from 1000-1100.2) Communication from H1 to H2: (10 points)Rate limit traffic to 1 Mbps.3) Communication from H1 to H3: (15 points) Regulate HTTP traffic using the below logic: When the total transfer is less than 20Mb, rate limit Traffic to 1Mbps If total transfer is between 20Mb to 30Mb, rate limit to 512Kbps If total transfer is more than 30Mb, drop packets.1. Now, it is your turn to implement the company policies in Policy.py. Generally, policies areimplemented in the switches in terms of Match, Action rules, where a rule matches oncertain header entries of a packet, and takes the corresponding action based on the rule(eg.Output to a certain port/drop, etc) This file contains basic things/layout needed to write apolicy . You will need to fill(code) in the functions for the appropriatepolicies:S1toS2()S2toS3()S1toS3()The file is well-commented for you to figure out what is happening in Policy.pyPlease refer to httpss://floodlight.atlassian.net/wiki/Display/floodlightcontroller/Static+Entry+Pusher+AP Ifor the components and their pre-requisite matches. Typically, a policy string should contain :1) Switch DPID, 2) Unique Policy Name, 2) Optional Cookie id, 3) Priority, 4) Matching Headercomponents like eth_type/ipv4_src/ip_proto, etc, 5) actions.Other resources: httpss://www.opennetworking.org/sdn-resources/sdn-definition httpss://www.opennetworking.org/images/stories/downloads/sdn-resources/onfspecifications/openflow/openflow-spec-v1.3.0.pdfSome Hints:a) Make sure you add in your policies with a higher priority than the default staticforwarding rules.b) For Policy 2, and 3, Make sure you read the Topology2.py completely to get an idea.c) You need to use queues defined using Topology2.py to implement policy 2 and3d) You are supposed to use the keys supported for OpenFlow 1.3.2. Once, you write in your functions in Policy.py, you can run it, and verify if the flows areadded to apply the policy by executing the below command, which lists the flows in theswitch :Curl https://localhost:8080/wm/core/switch/all/flow/json | python -m json.toolAlternatively, you can open the firefox browser, and type url as localhost:8080/ui/index.html to viewall controller information regarding the topology.How to Test your policies?1. You will have to generate traffic from the hosts (h1,h2,h3) in order to test the policies.2. Initially, you can run a terminal on h1,h2 or h3. Run the following in mininet console :a. xterm h1b. xterm h2c. xterm h33. Generating TCP/ UDP Packets :a. You can use iperf3 tool to generate TCP/UDP packets between a pair of nodes, and measure thelink bandwidth.b. TCP session between h1 and h2 for example :i. First, start server on h2 by running iperf3 -s -p port no.ii. Next, start the client on h1 to connect to h2 by running iperf3 -c 10.0.0.2 p port no.c. UDP session between h1 and h2 for example :i. First, start server on h2 by running iperf3 -s -p port no.ii. Next, start the client on h1 to connect to h2 by running iperf3 -c 10.0.0.2 p port no. -uSubmission InstructionPlease zip your completed1) PartI.pdf a PDF file for your answers to Part I,2) Policy.py your policy File3) README file, which explains how you configured the policies and iperf3 logs whichshow your solution actually working. Please note that we will be running the code to make sure, theiperf3 reflects the logs.Make sure, Policy.py and README also have your NAME/Student No. filled in. Please name your zipfile as StudentNumber_HW2.zip and submit to LumiNUS Student Submission-HW2.如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导