noise-lab / coursera-sdn Goto Github PK
View Code? Open in Web Editor NEWSDN Coursera Coursework
Home Page: https://www.coursera.org/course/sdn
SDN Coursera Coursework
Home Page: https://www.coursera.org/course/sdn
It seems that answers to questions 7, 8 and 9 are given here: https://www.youtube.com/watch?v=EWW1pw1lhP0
But this lecture is not included in current lecture set.
On the slides of Module 3.1: The Control Plane, we are given a URL that we can access to gain more info about the OpenFlow specification at:
https://www.opennetworking.org/sdnresources/onf-specifications/openflow
However, when I try to access this URL, I get a 404 error. Is there any other URL that we can use to check an up-to-date specification of OpenFlow?
The specification(s) seem to be available on:
https://www.opennetworking.org/technical-communities/areas/specification
I tried to access the github to clone the SDN course repository but received the following error messages:
Cloning into 'courserta-SDN'...
Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
What should I do to correct this so I could clone the course repository?
Thanks!
I've recently enrolled in the course, and tried setting up the VM - running the provisioning scripts removes mininet which is required for the first programming assignment.
Does the Vagrantfile on master, run provisioning scripts required only for final assignment?
Video 4.3 (on controllers) has some discussion of "examples" that don't exist because the old 4.4 moved to 2.0 (intro to mininet). Add video with more examples.
I don't find any answer file of quiz in this course, please kindly upload that or else give me the link of quiz answers
Couple of minor changes in Pyretic's DynamicPolicy class, etc. Redo 6.4 video to reflect.
Add a version of simple_firewall_buggy.py that works with the new version of Pyretic (DynamicClass).
Hi, I was editing only the file /home/vagrant/netasm/netasm/examples/learning_switch_acl/learning_switch_acl_netasm.py , and got the following error trace back which does not make sense to me, and I did not change the line "return Policy(decls, code)".
P.S. anyone know how to use P for communication, it showed up to me as "Homework
This resource section is not public for this course." .
vagrant@coursera-sdn:~$ sudopy python /home/vagrant/pox/pox.py --no-openflow netasm.back_ends.soft_switch.datapath --address=127.0.0.1 --port=6633 --dpid=0000000000000001 --policy= --ports=s1-eth1,s1-eth2 --ctl_port=7791
POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al.
INFO:dp.00-00-00-00-00-01:Connecting to 127.0.0.1:6633
INFO:core:POX 0.2.0 (carp) is up.
INFO:dp.00-00-00-00-00-01:Connecting to 127.0.0.1:6633
INFO:dp.00-00-00-00-00-01:Connecting to 127.0.0.1:6633
INFO:dp.00-00-00-00-00-01:Connecting to 127.0.0.1:6633
INFO:dp.00-00-00-00-00-01:Connecting to 127.0.0.1:6633
INFO:dp.00-00-00-00-00-01:Connecting to 127.0.0.1:6633
INFO:dp.00-00-00-00-00-01:Connected to controller
ERROR:ControllerConnection(id=1):Exception handling SyntaxError
Traceback (most recent call last):
File "/home/vagrant/pox/pox/datapaths/switch.py", line 1167, in read
self.on_message_received(self, msg_obj)
File "/home/vagrant/pox/pox/datapaths/switch.py", line 245, in rx_message
h(msg, connection=connection)
File "/home/vagrant/netasm/netasm/back_ends/soft_switch/datapath.py", line 472, in _rx_vendor
self._handle_out_message(message, connection)
File "/home/vagrant/netasm/netasm/back_ends/soft_switch/datapath.py", line 485, in _handle_out_message
load_policy(self, policy_name)
File "/home/vagrant/netasm/netasm/back_ends/soft_switch/datapath.py", line 173, in load_policy
module = import_module(policy_name)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/home/vagrant/netasm/netasm/examples/learning_switch_acl/learning_switch_acl_netasm.py", line 487
return Policy(decls, code)
^
SyntaxError: invalid syntax
In the following issue, the text snippets in cursive are comments from students in Piazza.
Question 1: "Which of the following constituted advantages to AT&T's elimination of in-band signaling from the phone network in the 1980s?"
Current correct answers:
Current wrong answers:
Ambiguity about answers marked as wrong:
We can fix this by being clearer on questions to avoid misunderstandings.
Question 4, one of the possible answers: "Ethane's initial goal was to support authentication of hosts in enterprise networks."
"The word authentication does not make it into the lecture, and it doesn't make it into the interview with the inventor of Ethane, even when he ventures to describe what led him to create it."
"What I was addressing was the support of the question idea. Why be vague, or misleading? Complexity awaits us only a short way down the road."
Definitely, on lectures, this project isn't associated explicitly with authentication. And some hints, such as access control policies and security, seem have not been enough to expose its idea. We can fix this by providing more information about Ethane.
Question 5. Which three artifacts and lessons that active networks affected the development of software-defined networks? Select all that apply.
Confusion about the words used in this question. Maybe, the following is more understandable: "Which three artifacts and lessons used by Active Networks affected the development of Software-Defined Networks?"
There are a few things which could be worded better in HW7.
"First, you will configure the topology as shown in the figure. You will need two files:"
There are more than "two files" which need to be edited. Saying there are only two files of interest is misleading. Also you might want to say "you will need to edit" not just "you will need"
$ sudo sh clean.sh
The instructions don't mention where to find it, it is not in the path, nor is it in the working directories in the home directory. Perhaps change it to:
sudo sh /vagrant/assignments/sdn-ixp/clean.sh
Hi,
When I followed the instruction and run "vagrant up" command to setup the environment, it output the error below:
default: Setting up python-openvswitch (2.3.0-1) ...
default: Setting up openvswitch-pki (2.3.0-1) ...
default: Setting up openvswitch-switch (2.3.0-1) ...
default: * Saving flows
default: * Killing ovsdb-server (18256)
default: * Starting ovsdb-server
default: * Configuring Open vSwitch system IDs
default: * Killing ovs-vswitchd (18268)
default: * Starting ovs-vswitchd
default: * Enabling remote OVSDB managers
default: Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
default: Processing triggers for ureadahead (0.100.0-16) ...
default: ln:
default: failed to create symbolic link ‘/usr/bin/ovs-controller’
default: : File exists
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
I think my setup failed and that's why mn command is not found
Any ideas or help will be greatly appreciated. Thanks
![Screenshot (57)](https://user-images.githubusercontent.com/65692068/82520310-7bc66300-9b41-11ea-8f94-76a367b45176.png)
Guys this is very sloppy. I have re-clone and rebuild vagrant. There is no ~/p4factory and all the corresponding make files that comes with it.
vagrant@coursera-sdn:~/p4factory/targets/simple_router_acl$ make
Makefile:23: ../../init.mk: No such file or directory
Makefile:34: /home/vagrant/p4factory/targets/simple_router_acl/../../makefiles/common.mk: No such fi
le or directory
make: *** No rule to make target `/home/vagrant/p4factory/targets/simple_router_acl/../../makefiles/
common.mk'. Stop.
Docker is not pre installed on course VM.
If you try to install Docker on course VM (Ubuntu 14.04), you can follow these instructions:
https://docs.docker.com/installation/ubuntulinux/
But this updates the kernel, and after words the shared folders no longer work; to fix, you need to reinstall guest additions, and do:
vagrant up
vagrant reload
This should be verified.
Suggestions for improvements:
I've not edited anyting. Just using existing files run (a) mininet with Enter prompt (b) launch NetASM data path (c) once I started POX, NetASM datapath start throwing errors. Is this supposed to do that.
vagrant@coursera-sdn:~$ sudopy python /home/vagrant/pox/pox.py --no-openflownetasm.back_ends.soft_switch.datapath --address=127.0.0.1 --port=6633 -dpid=0000000000000001 --policy= --ports=s1-eth1,s
1-eth2 --ctl_port=7791
POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al.
INFO:dp.00-00-00-00-00-01:Connecting to 127.0.0.1:6633
INFO:core:POX 0.2.0 (carp) is up.
INFO:dp.00-00-00-00-00-01:Connecting to 127.0.0.1:6633
INFO:dp.00-00-00-00-00-01:Connected to controller
Policy [netasm.examples.learning_switch_acl.learning_switch_acl_netasm](type check): passed!
policy [netasm.examples.learning_switch_acl.learning_switch_acl_netasm](original cost): Area=4704,
Latency=44
Policy [netasm.examples.learning_switch_acl.learning_switch_acl_netasm](optimize cost): Area=4080,
Latency=39
ERROR:ControllerConnection(id=1):Exception handling KeyError
Traceback (most recent call last):
File "/home/vagrant/pox/pox/datapaths/switch.py", line 1167, in read
self.on_message_received(self, msg_obj)
File "/home/vagrant/pox/pox/datapaths/switch.py", line 245, in rx_message
h(msg, connection=connection)
File "/home/vagrant/netasm/netasm/back_ends/soft_switch/datapath.py", line 472, in _rx_vendor
self._handle_out_message(message, connection)
File "/home/vagrant/netasm/netasm/back_ends/soft_switch/datapath.py", line 497, in _handle_out_mes
sage
self.policy.add_table_entry(t_id, t_index, t_entry)
File "/home/vagrant/netasm/netasm/netasm/core/execute/multi_process.py", line 810, in add_table_en
try
self._tables[id].input_interface.put(('add_entry', (index, entry)))
KeyError: TableId('acl_match_table')
ERROR:ControllerConnection(id=1):Exception handling KeyError
Traceback (most recent call last):
File "/home/vagrant/pox/pox/datapaths/switch.py", line 1167, in read
self.on_message_received(self, msg_obj)
File "/home/vagrant/pox/pox/datapaths/switch.py", line 245, in rx_message
h(msg, connection=connection)
File "/home/vagrant/netasm/netasm/back_ends/soft_switch/datapath.py", line 472, in _rx_vendor
self._handle_out_message(message, connection)
File "/home/vagrant/netasm/netasm/back_ends/soft_switch/datapath.py", line 497, in _handle_out_mes
sage
self.policy.add_table_entry(t_id, t_index, t_entry)
File "/home/vagrant/netasm/netasm/netasm/core/execute/multi_process.py", line 810, in add_table_en
try
self._tables[id].input_interface.put(('add_entry', (index, entry)))
KeyError: TableId('acl_match_table')
♥INFO:core:Going down...
INFO:core:Down.
After running 'vagrant up' and ssh'ing into the box 'sudo mn' results in the following:
vagrant@coursera-sdn:~$ sudo mn
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2
*** Adding switches:
s1
*** Adding links:
(h1, s1) (h2, s1)
*** Configuring hosts
h1 h2
*** Starting controller
Cannot find required executable ovs-controller.
Please make sure that it is installed and available in your $PATH:
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
vagrant@coursera-sdn:~$
A 'sudo apt-get install openvswitch-controller' then results in:
vagrant@coursera-sdn:~$ sudo apt-get install openvswitch-controller
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
openvswitch-controller : Depends: openvswitch-common (= 2.0.2-0ubuntu0.14.04.1) but 2.3.0-1 is to be installed
Depends: openvswitch-pki (= 2.0.2-0ubuntu0.14.04.1) but 2.3.0-1 is to be installed
E: Unable to correct problems, you have held broken packages.
It is considered as a wrong answer with the following explanation: "As long as the controllers are running a protocol to maintain consistent state across multiple replicas, the failure of a single controller should not affect the consistency of the others.”
Do you see that you start with an hypothesis in order to make that answer wrong? IMHO, to make that answer wrong you should have stated in the question that the controller replicas were running a protocol to maintain consistent state among the multiple replicas.
vagrant@coursera-sdn:$ sudo mn$
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2
*** Adding switches:
s1
*** Adding links:
(h1, s1) (h2, s1)
*** Configuring hosts
h1 h2
*** Starting controller
Cannot find required executable ovs-controller.
Please make sure that it is installed and available in your $PATH:
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
vagrant@coursera-sdn:
*** Creating network
*** Adding controller
Cannot find required executable ifconfig.
Please make sure that Mininet is installed and available in your $PATH:
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin)
From here:
https://piazza.com/class/ia0ls6utsea535?cid=33
It may be helpful to include teardown commands for vagrant: http://docs.vagrantup.com/v2/getting-started/teardown.html
general docs http://docs.vagrantup.com/v2/getting-started/index.html
Add a lecture on ONOS, possibly also covering this:
https://wiki.onosproject.org/display/ONOS/Tutorials+and+Walkthroughs
If I try to run basics command from README get the following error
> Coursera-SDN $ vagrant up
Bringing machine 'default' up with 'libvirt' provider...
==> default: Box 'coursera-sdn-2015.box' could not be found. Attempting to find and install...
default: Box Provider: libvirt
default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'coursera-sdn-2015.box' (v0) for provider: libvirt
default: Downloading: https://d396qusza40orc.cloudfront.net/sdn1/srcs/Vagrant%20Box/coursera-sdn-2015_32bit.box
The box you attempted to add doesn't match the provider you specified.
Provider expected: libvirt
Provider of box: virtualbox
virtualbox 6.1 is already installed on my OS "fedora release 31 (Thirty One)"
Oracle VM VirtualBox VM Runner v6.1.16_RPMFusion
(C) 2005-2020 Oracle Corporation
All rights reserved.
the software run at:
uname -a
Linux xxx.xxx.xxx 5.8.18-100.fc31.x86_64 #1 SMP Mon Nov 2 20:32:55 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
tried the same with 64 bit Vagrant Box but get same issue , have you any idea how to fix it ?
kinetic_gardenwall.py's NuSMV properties are written assuming that the policies will be named by NuSMV this way:
policy_1: redirect
policy_2: drop
policy_3 identity
In practice, I wasn't able to make it name them like that. It consistently detects them like this:
policy_1: identity
policy_2: redirect
Drop is detected as just drop.
MODULE main
VAR
policy : {policy_1,policy_2,drop};
infected : boolean;
exempt : boolean;
It doesn't appear among the other policies, though.
-- =====================================================================
-- PolicyName (used in NuSMV) to ActualPolicy (used in Pyretic) Mapping
-- =====================================================================
-- ---------------------------------------------
-- policy_1: (shown below)
-- ---------------------------------------------
-- identity
-- ---------------------------------------------
--
-- ---------------------------------------------
-- policy_2: (shown below)
-- ---------------------------------------------
-- parallel:
-- intersection:
-- sequential:
(...)
-- else
-- drop
-- ---------------------------------------------
Maybe this is intentional, but if it isn't you can change clarify kinetic_gardenwall.py to use the correct policy names in its properties by just translating (policy_1 => policy_2, policy_2 => drop, policy_3 => policy_2).
Thanks.
in week 1 we set up vagrant, a VM, ssh'ed into the vm, ran mininet, etc etc.
There was a lot of missing info there - no discussion of how this invoked virtualbox (no GUI, I guess command-line headless in the background) also no mention of the fact that it keeps running, even after exiting mininet and doing vagrant halt. But that's OK, I figured that out, even managed to discern the IP address of the VM, and managed to SSH into it with username 'vagrant'
Through error message when
Type command > xterm __
Error: cannot connect to display
In case dhclient ...
xterm: No absolute path found for shell : eth1
How to fix this??
In week2 video "3 - 1 - Module 2.0- Mininet Topologies and Mininet Python API [16-35].mp4" there is an error with the code in the example at 10:30 min where 'from mininet.util import createLink' should be replaced by 'from mininet.topo import Topo'.
I think the vagrant file does not support Virtual Box version 5.0
Downloaded version 4.3.X.X and it worked!!
I don't know if this issue is already fixed, but I'm going to expose it.
After completely downloading and starting the 32bit VM, I got the following error in the end:
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
cat /tmp/vagrant-network-interfaces.pre /tmp/vagrant-network-entry /tmp/vagrant-network-interfaces.post > /etc/network/interfaces
Stdout from the command:
Stderr from the command:
stdin: is not a tty
cat: write error: No space left on device
I fixed it with the following steps:
Shutdown the VM:
youruser@yourpc:~$ vagrant halt
Run VM from VirtualBox GUI and log as:
User: vagrant Password: vagrant
Check disk space usage. Look that it shows 100% of Use% for /dev/sda1
vagrant@coursera-sdn:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 40G 40G 0 100% /
...
...
vagrant 290G 47G 243G 17% /vagrant/
Remove an EMPTY file created (I'm still wondering why?)
vagrant@coursera-sdn:~$ sudo rm /EMPTY
Check disk space usage again. Loos that Use% for /dev/sda1 is not 100%.
vagrant@coursera-sdn:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 40G 1.7G 37G 5% /
...
...
vagrant 290G 47G 243G 17% /vagrant/
Set network interfaces. As the root user, edit /etc/network/interfaces file and save it.
vagrant@coursera-sdn:~$ sudo nano /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
# Host-only interface
auto eth1
iface eth1 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
Shutdown the VM.
vagrant@coursera-sdn:~$ sudo shutdown -h now
Start VM again with vagrant in the Coursera-SDN directory. Check SSH and shared folder.
youruser@yourpc:~/git/Coursera-SDN$ vagrant up
youruser@yourpc:~/git/Coursera-SDN$ vagrant ssh
vagrant@coursera-sdn:~$ ls /vagrant/
README.md README.md~ Vagrantfile Vagrantfile~ assignments setup
Things pass without proper completion of the assignment.
I don't see the programming assignment which is talked about in the weeks two, three and so forth.
I tried to contact the help center but I can't.
Thanks.
Please help I'm getting the following error:
jmitchell@home-pc:/dropbox/Dropbox/SDN_class/Coursera-SDN$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 6633 => 6635 (adapter 1)
default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.
If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.
Any suggestions you can give me would be greatly appreciated!
Thanks,
Jamal Mitchell
Hello Nick,
First of all, thank you for the incredible course you have done. Even though much of the research and practices in SDN may have changed, many of the concepts and values have not.
I want to help update the course and keep up to date (at least in terms of being able to follow it), but I have encountered several problems with the VirtualBox machine. In my particular case, I can still run the machine in VirtualBox 6.1 using a Macbook Pro 2015 but not using Virtualbox 7.
The main problem is that the original virtual machine uses Ubuntu 14 LTS, and I am afraid that more and more laptops in the future (mainly ARM machines) will not be able to run this machine. I want to contribute at least by updating the virtual machine, and hopefully, everyone who wants to do the course can do the labs as well. Is it possible to list the software needed to run the virtual machine?
Thanks,
Enric.
P.D: I did a similar post in the course, but I explained how to set it up just in case someone has problems.
When attempting to run the pulled CustomTopo.py I get the following:
vagrant@coursera-sdn:~/Coursera-SDN/assignments/mininet-topology$ sudo ./CustomTopo.py
Traceback (most recent call last):
File "./CustomTopo.py", line 13, in
from mininet.link import Link
File "build/bdist.linux-x86_64/egg/mininet/link.py", line 29, in
File "build/bdist.linux-x86_64/egg/mininet/node.py", line 67, in
ImportError: cannot import name Link
I've attempted to write a basic program that imports the TCLink class and I get the same issue.
In the Quiz 2.1: Control and Data Separation, I think the answer to question 8 is wrong
The question asks for the approaches to coping with inconsistency across controller replicas.
I think the "hot spare" approach is to solve the reliability problem, and keeping a subset of the network state in memory at any time is to solve the scalability problem.
Can someone explain the answers?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.