首页
编程语言
数据库
网络开发
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
热点文章
更多
辅导 comm2000 creating socia...
2026-01-08
讲解 isen1000 – introductio...
2026-01-08
讲解 cme213 radix sort讲解 c...
2026-01-08
辅导 csc370 database讲解 迭代
2026-01-08
讲解 ca2401 a list of colleg...
2026-01-08
讲解 nfe2140 midi scale play...
2026-01-08
讲解 ca2401 the universal li...
2026-01-08
辅导 engg7302 advanced compu...
2026-01-08
辅导 comp331/557 – class te...
2026-01-08
讲解 soft2412 comp9412 exam辅...
2026-01-08
讲解 scenario # 1 honesty讲解...
2026-01-08
讲解 002499 accounting infor...
2026-01-08
讲解 comp9313 2021t3 project...
2026-01-08
讲解 stat1201 analysis of sc...
2026-01-08
辅导 stat5611: statistical m...
2026-01-08
辅导 mth2010-mth2015 - multi...
2026-01-08
辅导 eeet2387 switched mode ...
2026-01-08
讲解 an online payment servi...
2026-01-08
讲解 textfilter辅导 r语言
2026-01-08
讲解 rutgers ece 434 linux o...
2026-01-08
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 99515681 微信:codinghelp
© 2024
www.7daixie.com
站长地图
程序辅导网!