首页
编程语言
数据库
网络开发
Algorithm算法
移动开发
系统相关
金融统计
人工智能
其他
首页
>
> 详细
CS5229讲解、辅导SDN留学生、Python程序语言调试、Python讲解 辅导Database|辅导R语言程序
CS5229 - Advanced Computer
Networks - HW 2
Due : Sep 9, 2020 2359 Hrs
Total: 50 points (10% of Grade)
Overview
This HW exposes you to Software Defined Networking (SDN) concepts and the related toolsets. The
SDN architecture decouples network control and forwarding functions such that the network
control is programmable and also abstracting the network infrastructure. You can further refer to
the following references on SDNand OpenFlow.
Software Tools
1) You will be using a Virtual Machine for the assignment. The VM (LUbuntu 16.04) comes
with all the necessary software installed. Download the VM from
comp.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. VirtualBox
supportsWindows/Linux/MacOS.
Running the Programs
2) Goto VirtualBox UI, and do “Import Appliance”, and specify the location of the downloaded
“cs5229.ova” file in order to import the VM.
3) Start the VM once it is imported.
4) You can login to the vm using :
username :cs5229
password: cs5229
1 https://floodlight.atlassian.net/wiki/spaces/floodlightcontroller/overview
2 http://mininet.org/overview/
3 https://floodlight.atlassian.net/wiki/spaces/floodlightcontroller/pages/1343657/Cbench+New
4 https://www.virtualbox.org/wiki/Downloads
Getting System to work:
1. We will be using Mininet to emulate the network uses OpenvSwitch to emulate the
switches, and containers for the hosts connecting to the network. Start your mininet
topology specify in the file Topology1.py. Open a terminal (LXTerminal) and run the
following:
sudo ~/CS5229/Topology1.py
The 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 the
following:
i. cd ~/CS5229/floodlight-1.2
ii. java -Dlogback.configurationFile=logback.xml -jar target/floodlight.jar
Verify 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 Switch
S2.
Part I: Validating your mininet Setup
1. Verify the static routing using the ping program. Start a terminal on host h1 by running the
command “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.3”
a. Note down the ping latency between h1 and h2
b. 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 throughput
achievable between host h2 and h3 using the iperf3 program. You need to restart mininet
with 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 ”quit”
b. cd ~/CS5229/oflops/cbench
c. run “./cbench –c localhost –p 5229 –m 10000 –l 5 –S 8 –M 1000 –D 600 -t” and observe the
throughput
d. You can find explanations of each argument by run ./cbench –h
Write 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 your
observations?
d. What is the throughput achieved from h3 to h2 using iperf3 in (2b)? Explain your
observations?
e. What is the throughput achieved from h3 to h2 using iperf in (3)? when the link
bandwidth is set to 100Gbps? Explain your observations?
f. What is the throughput of the controller in (4)?
Part II: Setting SDN Policies
You have recently joined as a Network engineer at an Organization. The organization has three
internal departments, namely, Sales, Marketing and R&D as shown in Figure 1. They are
interconnected 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 departments
should be maintained. As a network engineer, you have to ensure that the networking policies meet
the 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 abstracted
to optimize various resources, and 4) Usage of Open Standards (E.g. OpenFlow). Now, in order to
implement the policies, you plan to write an application on top of a standard SDN Controller which
talks to each of the edge switches(S1/S2/S3) as shown in Figure 1. Consider just 3 hosts operating
in the respective departments (Sales, Marketing and R&D) namely, H1, H2 and H3.
Figure 2: Network Topology
Setting up the Environment
1. The network topology, policy scripts needed for Part II can be found in “~/CS5229/Topology2.py”.
Run
sudo ./Topology2.py
2. Start the SDN Controller, Floodlight(a java based SDN controller). Open a new terminal, run the
following:
o cd ~/CS5229/floodlight-1.2
o java -Dlogback.configurationFile=logback.xml -jar target/floodlight.jar
3. Now, we will be running our policies as an application over the floodlight controller. Before
anything, we first setup static forwarding in our policy, so that communication happens via the
shortest path. To run this policy file, open a new terminal, run the following:
• ~/CS5229/Policy.py
The 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 are
implemented in the switches in terms of
rules, where a rule matches on
certain 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 a
policy . 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.py”
Please refer to
https://floodlight.atlassian.net/wiki/display/floodlightcontroller/Static+Entry+Pusher+AP I
for 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 Header
components like eth_type/ipv4_src/ip_proto, etc, 5) actions.
Other resources:
https://www.opennetworking.org/sdn-resources/sdn-definition
https://www.opennetworking.org/images/stories/downloads/sdn-resources/onfspecifications/openflow/openflow-spec-v1.3.0.pdf
Some Hints:
a) Make sure you add in your policies with a higher priority than the default static
forwarding 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 and3
d) 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 are
added to apply the policy by executing the below command, which lists the flows in the
switch :
Curl http://localhost:8080/wm/core/switch/all/flow/json | python -m json.tool
Alternatively, you can open the firefox browser, and type url as “localhost:8080/ui/index.html” to view
all 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 h1
b. xterm h2
c. xterm h3
3. Generating TCP/ UDP Packets :
a. You can use iperf3 tool to generate TCP/UDP packets between a pair of nodes, and measure the
link bandwidth.
b. TCP session between h1 and h2 for example :
i. First, start server on h2 by running “iperf3 -s -p
”
ii. Next, start the client on h1 to connect to h2 by running “iperf3 -c 10.0.0.2 –p
”
c. UDP session between h1 and h2 for example :
i. First, start server on h2 by running “iperf3 -s -p
”
ii. Next, start the client on h1 to connect to h2 by running “iperf3 -c 10.0.0.2 –p
-u”
Submission Instruction
Please zip your completed
1) “PartI.pdf” a PDF file for your answers to Part I,
2) “Policy.py” your policy file
3) “README” file, which explains how you configured the policies and iperf3 logs which
show your solution actually working. Please note that we will be running the code to make sure, the
iperf3 reflects the logs.
Make sure, Policy.py and README also have your NAME/Student No. filled in. Please name your zip
file as
_HW2.zip and submit to LumiNUS “Student Submission-HW2”.
联系我们
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-21:00
微信:codinghelp
热点文章
更多
辅导 cs1b spring 2024 tth hw...
2024-04-19
讲解 managing financial risk...
2024-04-19
辅导 cs 0449 – project 5: /...
2024-04-19
辅导 elec 2141 digital circu...
2024-04-19
讲解 csc171 — videogame pro...
2024-04-19
讲解 comp3411 artificial int...
2024-04-19
讲解 stat3061: random proces...
2024-04-19
辅导 accounting 452, spring ...
2024-04-19
辅导 finc5001 foundations in...
2024-04-19
辅导 7ssmm712 – topics in a...
2024-04-19
讲解 com 337 - film studies ...
2024-04-19
辅导 mes202tc - digital vlsi...
2024-04-19
辅导 geography 2041b distanc...
2024-04-19
辅导 ecos3006 international ...
2024-04-19
讲解 fit5225 2024 sm1 creati...
2024-04-19
讲解 cit 593: introduction t...
2024-04-19
讲解 math 4931: take home ex...
2024-04-19
辅导 csci 547|info 533: syst...
2024-04-19
辅导 cs536-s24 intro to pls ...
2024-04-19
讲解 fit5212 - assignment 1辅...
2024-04-19
热点标签
comm1190
elec9764
acfi3308
acct7101
fin6035
comp2048
geog0163
comp2013
coen 146
dts101tc
sehh2042
comp282
csc1002
comp10002
comp30023
comp27112
comp4880/8880
cs 455
07
stat0045.
fil-30023
celen085
psyc40005
math40082
are271
comp9311
ee5311
imse2113
comp 2322
acct2102
fnd109
int102
is3s664
is6153
data4000
accfin5034
fit5212
cs536-s24
fit5225
ecos3006
mes202tc
finc5001
stat3061
csc171
cs1b
7ssmm712
bu.450.760
comp3411
cs170
swen90004
cpt206
comp5313/comp4313—large
bl5611
kxo206
comp532
elec207
kxo151
cs 2820
cpt108
math2319
dts204tc
qm222
comp2511
ccs599
infs1001
mat2355
eeee4123
25721
ifn647
pols0010
hpm 573
comp9417
stat0023
csci 1100
qbus6860
comp2003j
cse340
cs 2550
cs 61b
cs360
fin 3080
ierg 4080
cs6238
cit 594
finm7406
hw6
elec9713
asb-2522
mso3610
lit301
mcd4540
geog0030
125.330
biol0006
125.320
cs3334
fit2093
acct1101
110.309
masy1-gc
cs314
elec0048
gds104
mg5637
fit2096
math5905
eel4837
sehs4515
cpt s 321
asb2522 investment
ma214
co2104
mgmt2015
32516
math32051
econ1012
mark2052
comp3310
econ0019
dsci 525
abmf3184
aps106
antc27
finm7401
itp122
tech2300
math3026
comp9024
cao107
36318
is2022
cs 211
fit1047
ics4u
2xc3
en.540.635
4qqmn506
finn3081
phys10362
sta601
ec481e
math5165
csi 2120
el1205
comp7250
ecos3013
beam065
info1113
comp2051
csc325
mne 6130
ai6126
ecs150
is61x6
cse115
seng6110
bus265
cpts260
mphy0009
csc306
eco2011
ee3004
inu1111
st332
idepg001
info6001
cpt106
finm7409
fit3152
fins5516
qbus2820
isom3028
eece 6083
ceg5304
mcd4700
eecs 493
eg25h4
38173
elc5216
infs6071
lubs5996m
7ssmm803
glbh0031
phys1120
comp52715
eeb240
math3836
cmns3490
iy5610/4610
cpt304
ac6105
psyc3241
fin570
218.323
lng310
rim3352
bio206
comp3334
soci3403
ac.f633
联系我们
- QQ: 99515681 微信:codinghelp
© 2024
www.7daixie.com
站长地图
程序辅导网!