-
Run a simple learning switch controller:
cd /tmp/pox; ./pox.py --verbose forwarding.l2_learning
- Verify simple connectivity by logging into host1 ping host2
ping 10.10.1.2
Notice that there is still no connectivity between host1, host2 and host3 because the rules to send packets between networks to the kernel IP router are not there. Our Firewall controller will take care of this.
-
Stop your controller by Ctrl-c and remove all your flows from your ovs switch:
sudo ovs-ofctl del-flows fw
- Make your switch into a firewall by downloading and running the appropriate Ryu controller at the controller node:
cd /tmp/ryu
wget https://raw.githubusercontent.com/GENI-NSF/geni-tutorials/master/NFVApps/ryu-firewall.tar.gz
tar xvfz ryu-firewall.tar.gz
cd ryu-firewall/
/tmp/ryu/bin/ryu-manager simple_firewall.py
- Log into host3 and run a nc server:
nc -l 5001
- Log into host1 and run nc clients:
nc 128.128.128.128 5001
- Type some text in host1 and it should appear in host3 and vise versa.
- In the terminal for controller you should see messages about the flow being passed or not:
Extracted rule {'sport': '39515', 'dport': '5002', 'sip': '10.10.1.2', 'dip': '128.128.128.128'}
Allow Connection rule {'dport': '5002', 'dip': '128.128.128.0/24', 'sip': '10.10.1.0/24', 'sport': 'any'}
- CTRL-C to kill nc in each terminal.
- Run a nc server on port 5002, then 5003. What if you start clients at host2? Or try and send traffic between host1 and host2?
- Compare the observed behavior to the contents of ryu-firewall/fw.conf. Does the behavior match the configuration file?
- Stop the Firewall controller and run a simple switch controller. Is there any traffic being blocked now? Don't forget to delete the flows after you stop the controller
- Feel free to modify the configuration file to allow more traffic.
}}}
'''Make sure to delete the bridges especially if you are using the same topology for another tutorial.'''
{{{
sudo ovs-vsctl del-br fw
}}}
[[BR]]
{{{
#!html
|
4. Cleanup
After you are done with the exercise and you have captured everything requested for the writeup, you should release your resources so that other experimenters can use
them. In order to cleanup your slice :
- In the Portal, press the Delete button in the bottom of your canvas
- Select Delete at used managers and confirm your selection.
Wait and after a few moments all the resources will have been released and you will have an empty canvas again. Notice that your slice is still there. There is no way to delete a slice, it will be removed automatically after its expiration date, but remember that a slice is just an empty container so it doesn't take up any resources.
|
}}}
----
[[Image(GENIExperimenter/Tutorials/Graphics:tip.png, 40, left)]]
= Tips =
* Remember that you can use “ifconfig” to determine which Ethernet interface (e.g., eth0) is bound to what IP address at each of the nodes.
* In order to enable IP forwarding of packets on a node you have to execute the following command:
{{{
sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
}}}
|