SDN Practical
SDN Practical
python
core.getLogger()
class Firewall(object):
That's it! You have created an SDN environment on Mininet and configured aswitch to
provide firewall functionality using POX controller.
Configuration Files
The default IP_CONFIG and rtable should look like the following:
> cd ~/krish/
> ./config.sh
> cd ~/krish/
> ./run_mininet.sh
Keep this terminal open, as you will need the mininet command line for debugging. Now,
useanother terminal to continue the next step. (Do not press ctrl-z.)
> cd ~/krish/
> ln -s ../pox
> ./run_pox.sh
INFO:.home.ubuntu.krish.pox_module.cs144.srhandler:created server
DEBUG:.home.ubuntu.krish.pox_module.cs144.srhandler:SRServerListener listening on 8888
DEBUG:core:POX 0.0.0 going up...
DEBUG:core:Running on CPython (2.7.3/Aug 1 2012 05:14:39)
INFO:core:POX 0.0.0 is up.
This program comes with ABSOLUTELY NO WARRANTY. This program is freesoftware,
and you are welcome to redistribute it under certain conditions.Type
'help(pox.license)' for details.
DEBUG:openflow.of_01:Listening for connections on 0.0.0.0:6633Ready.
POX>
Please note that you have to wait for Mininet to connect to the POX controller before
you continue to the next step. Once Mininet has connected, you will see the following
output:
Now you are ready to test out the connectivity of the environment setup. To do so, run the
binary file of the solution, sr_solution:
> cd ~/krish/
> ./sr_solution
Loading routing table from server, clear local routing table.Loading routing
table
Destination Gateway Mask Iface
10.0.1.100 10.0.1.100 255.255.255.255 eth3
192.168.2.2 192.168.2.2 255.255.255.255 eth1
172.64.3.10 172.64.3.10 255.255.255.255 eth2
Router interfaces:
eth3 HWaddr86:05:70:7e:eb:56
inet addr 10.0.1.1
eth2 HWaddrb2:9e:54:d8:9d:cd
inet addr 172.64.3.1
eth1 HWaddr36:61:7c:4f:b6:7b
inet addr 192.168.2.1
<-- Ready to process packets -->
In this particular setup, 192.168.2.2 is the IP for server1, and 172.64.3.10 is the IP for
server2. You can find the IP addresses in your IP_CONFIG file.
Now, back to the terminal where Mininet is running. To issue an command on the
emulatedhost, type the host name followed by the command in the Mininet console. For
example, thefollowing command issues 3 pings from the client to server1.
You can also use traceroute to see the route between client to server1.
Finally, to test the web server is properly working at the server1 and server2, issue an
HTTPrequest by using wget or curl.
0K
100% 17.2M=0s