Coder Social home page Coder Social logo

cpqd / routeflow Goto Github PK

View Code? Open in Web Editor NEW
113.0 42.0 142.0 22.75 MB

CPqD's version of RouteFlow. For the community version (more frequently updated) see: http://routeflow.github.io/RouteFlow/

License: Apache License 2.0

Shell 1.26% Python 63.38% C++ 7.14% JavaScript 27.29% C 0.70% CSS 0.23%

routeflow's Introduction

Notice

This is the CPqD version of RouteFlow, which is and older and stable.

For new features and versions, head to the community repository.

The development is being continued in the community repository.

CPqD's repository will be periodically updated with versions from it.

Welcome

This version of RouteFlow is a beta developers' release intended to evaluate RouteFlow for providing virtualized IP routing services on one or more OpenFlow switches.

You can learn more about RouteFlow in our main page in GitHub and in our website.

Please be aware of POX, OpenFlow, Open vSwitch, Quagga, MongoDB, jQuery, JIT and RouteFlow licenses and terms.

Distribution overview

RouteFlow is a distribution composed by three basic applications: RFClient, RFServer and RFProxy.

  • RFClient runs as a daemon in the Virtual Machine (VM), detecting changes in the Linux ARP and routing tables. Routing information is sent to the RFServer when there's an update.

  • RFServer is a standalone application that manages the VMs running the RFClient daemons. The RFServer keeps the mapping between the RFClient VM instances and interfaces and the corresponding switches and ports. It connects to RFProxy to instruct it about when to configure flows and also to configure the Open vSwitch to maintain the connectivity in the virtual environment formed by the set of VMs.

  • RFProxy is an application (for POX and other controllers) responsible for the interactions with the OpenFlow switches (identified by datapaths) via the OpenFlow protocol. It listens to instructions from the RFServer and notifies it about events in the network. We recommend running POX when you are experimenting and testing your network. Other implementations in different controllers will be available soon.

There is also a library of common functions (rflib). It has implementations of the IPC, utilities like custom types for IP and MAC addresses manipulation and OpenFlow message creation.

Additionally, there's rfweb, an extra module that provides an web interface for RouteFlow.

The RouteFlow Architecture

+--------VM---------+
| Quagga | RFClient |
+-------------------+
         \
M:1      \ RFProtocol
         \
+-------------------+
|     RFServer      |
+-------------------+
         \
1:1      \ RFProtocol
         \
+-------------------+
|      RFProxy      |
|-------------------|
|    Controller     |
+-------------------+
         \
1:N      \ OpenFlow Protocol
         \
+-------------------+
|  OpenFlow Switch  |
+-------------------+

Building

RouteFlow runs on Ubuntu 12.04.

  1. Install the dependencies:
sudo apt-get install build-essential git libboost-dev \
  libboost-program-options-dev libboost-thread-dev \
  libboost-filesystem-dev iproute-dev openvswitch-switch \
  mongodb python-pymongo
  1. Clone RouteFlow's repository on GitHub:
$ git clone git://github.com/CPqD/RouteFlow.git
  1. Build rfclient
cd RouteFlow
make rfclient

That's it! Now you can run tests 1 and 2. The setup to run them is described in the "Running" section.

Running

The folder rftest contains all that is needed to create and run two test cases.

Virtual environment

First, create the default LXC containers that will run as virtual machines:

$ cd rftest
$ sudo ./create

The containers will have a default ubuntu/ubuntu user/password combination. You should change that if you plan to deploy RouteFlow.

By default, the tests below will use the LXC containers created by the create script. You can use other virtualization technologies. If you have experience with or questions about setting up RouteFlow on a particular technology, contact us! See the "Support" section.

Test cases

Default configuration files are provided for these tests in the rftest directory (you don't need to change anything). You can stops them at any time by pressing CTRL+C.

rftest1

  1. Run:
$ sudo ./rftest1
  1. You can then log in to the LXC container b1 and try to ping b2:
$ sudo lxc-console -n b1
  1. Inside b1, run:
# ping 172.31.2.2

For more details on this test, see its tutorial.

rftest2

This test should be run with a Mininet simulated network. In the steps below, replace [guest address] with the IP address you use to access your Mininet VM. The same applies to [host address], that should be the address to access the host from inside the VM.

  1. Run:
$ sudo ./rftest2
  1. Once you have a Mininet VM up and running, copy the network topology files in rftest to the VM:
$ scp topo-4sw-4host.py mininet@[guest address]:/home/mininet/mininet/custom
$ scp ipconf mininet@[guest address]:/home/mininet
  1. Then start the network:
$ sudo mn --custom mininet/custom/topo-4sw-4host.py --topo=rftest2 --controller=remote,ip=[host address],port=6633 --pre=ipconf

Wait for the network to converge (it should take a few seconds), and try to ping:

mininet> pingall
...
mininet> h2 ping h3

For more details on this test, see its tutorial.

Now what?

If you want to use the web interface to inspect RouteFlow behavior, see the wiki page on rfweb.

If you want to create your custom configurations schemes for a given setup, check out the configuration section of the first tutorial and the guide on how to create your virtual environment.

If you're developing for RouteFlow, there are more advanced options and components that can be installed through the build.sh script. See its source for more information.

Support

If you want to know more or need to contact us regarding the project for anything (questions, suggestions, bug reports, discussions about RouteFlow and SDN in general) you can use the following resources:

RouteFlow - Copyright (c) 2012 CPqD

routeflow's People

Contributors

alnvdl avatar castroflaviojr avatar clorier avatar cnacorrea avatar danankers avatar fabianomathilde avatar joestringer avatar marcelon avatar ofisher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

routeflow's Issues

Limit traffic to the controller IP

As part of my previous work with RouteFlow, it was deemed a security concern that any traffic could be routed to the controller IP by default, regardless of protocol. On the old RF branch, I put together a patch which allowed you to specify an interface to which traffic would be blocked. It works by creating a rule on the switch, specifying that packets destined for particular IPs should be dropped. Those IPs were retrieved from the specified interface's configuration.

I'd just like to open this issue up for discussion, by all means the previous solution could be ported across to the new version, but is there a more elegant approach that the RouteFlow community would prefer? Should this behaviour be default? Should we ask for an interface, or specific IPs, or should we attempt to gather all local IP addresses and create rules for all of them automatically (ie, without user intervention)?

Below is a link to the patch in question, with my original issue summary.


joestringer@fbb6f15

Add "-s INTERFACE" option to specify whether to have traffic dropped if it is destined for the IPs on the given interface

  • When running rf-server, specify "-s *interface*" to create rules on connected datapaths, such that the default action is to drop packets that are destined for the specified controller interface.
  • This action has low priority, so other rules will overwrite, eg forwarding BGP/RIP/etc
  • This code assumes rf-server is running on the same box as rf-controller. rf-server has code to search through local interfaces to find the IP address that it should use for the DROP rule. If this is undesirable, then this code will need to be implemented in rf-controller. In such a case, rf-server could acquire the IP address via IPC, or rf-controller could create the rules for dropping traffic.

Drop rule appears as an empty line in rfweb interface

The Drop rule has no matches or actions, so those fields are empty in the web interface when viewing the rules on switches. Perhaps this should be changed to show that it matches "*" or "ALL", and that the action is to "DROP".

Can't run in ubuntu 16.04

i was downloaded Routeflow in my ubuntu 16, but it can't, i don't know the problem
what routeflow can running in ubuntu 16? thx

Repository with temporary issues

Hello everyone,

I've accepted pull request #17, but it added quite a lot of weight to the repository (it's now around 20 MB). I was able to revert the changes, but the old files remain in the history. I don't know how to erase the commits AND their files.

I asked a question on StackOverflow, and I'm still trying to solve this issue:
http://stackoverflow.com/questions/14264719/how-to-completely-remove-a-merged-pull-request

For now, I will not accept any pull requests to avoid increasing the mess. And please, try not to base new pull requests on this code. I'm trying to solve this ASAP. Sorry for the inconvenience...

For users, feel free to clone and use RouteFlow. It doesn't affect the functionality.

If anyone has any tips, they're more than welcome :)

Can't open web view

hello... i have some problem when opening web view
i was started the controller and it's working, but when i will open the web view (ip:port) it not working (warning:openflow.of_01:bad openflow version (0x47) on connection [None 5]
INFO:openflow.of_01:[None 5] Closed )
thx

Dead Link in Readme

In the README under 'Known Bugs', it links to the OpenFlowHub RouteFlow page which is a dead link. Are RF bugs still tracked there?

Separate RFProxy implementations

From now on, we will keep the different implementations of RFProxy should live in separate repositories.

RouteFlow will only have POX by default. NOX, Floodlight and other supported controllers will be available forked from their original repositories and with RFProxy added to them.

The make command will automatically clone these repositories and build everything. This will simplify the deployment of new ports, the update of the controllers and as a bonus, make the main repository smaller.

This will be implemented over the next few weeks, and after we solve issue #18.

Improve README

The README contains too much content that should be in the wiki.
We need to move stuff around, add more content to the wiki and make the README as simple as possible, pointing to the pages.

Separate ISL from RFServer

RFServer is bundled with support for ISL. Separate the code and move it to another file (e.g: RFServerISL.py) to keep RFServer as lean as possible.

unable to ping from b1 to b2 while performing rftest1

Hi,
I ran rftest1 in the ubuntu version 11.04.
The test file rftest1 seems to be running successfully but i am unable to ping from b1 to b2 from "b1 console".

FYI b1 eth0 ip address is 172.31.1.2/16 and b2 ip address is 172.31.2.2/16

Also i'm giving the log output of "sudo ./rftest1 --pox"

-> Starting OVS daemons...
ovsdb-server: /usr/local/var/run/openvswitch/ovsdb-server.pid: already running as pid 27423, aborting
ovs-vswitchd: /usr/local/var/run/openvswitch/ovs-vswitchd.pid: already running as pid 27425, aborting
-> Stopping and resetting LXC VMs...
-> Deleting data from previous runs...
-> Starting MongoDB...
.all output going to: /dev/null
-> Starting the rfvm1 virtual machine...
-> Starting the management network (br0)...
-> Starting the controller (POX) and RFPRoxy...
.POX 0.0.0 / Copyright 2011 James McCauley
INFO:rfproxy:RFProxy running.
INFO:core:POX 0.0.0 is up.
-> Starting RFServer...
-> Starting the control plane network (dp0 VS)...
INFO:openflow.of_01:[Con 1/None] closing connection
INFO:openflow.of_01:[Con 2/8243406406160905843] Connected to 76-73-72-66-76-73|29286
INFO:openflow.topology:Switch 76-73-72-66-76-73|29286 connected
INFO:rfproxy:Registering datapath port (dp_id=0x7266767372667673, dp_port=1)
INFO:rfproxy:Registering datapath port (dp_id=0x7266767372667673, dp_port=2)
INFO:rfserver:Configuring RFVS (dp_id=0x7266767372667673)
INFO:rfproxy:ofp_flow_mod(config) was sent to datapath (dp_id=0x7266767372667673)

-> Starting the sample network...

This test is up and running.
Try pinging host b2 from host b1:
$ sudo lxc-console -n b1
Login and run:
$ ping 172.31.2.2

You can stop this test by pressing Ctrl+C.

WARNING:openflow.of_01:<class 'pox.openflow.PacketIn'> raised on dummy OpenFlow nexus
INFO:openflow.of_01:[Con 3/153] Connected to 00-00-00-00-00-99
INFO:openflow.topology:Switch 00-00-00-00-00-99 connected
INFO:rfproxy:Registering datapath port (dp_id=0x99, dp_port=1)
INFO:rfserver:Registering datapath port as idle (dp_id=0x99, dp_port=1)
INFO:rfproxy:Registering datapath port (dp_id=0x99, dp_port=2)
INFO:rfserver:Configuring datapath (dp_id=0x99)
INFO:rfproxy:ofp_flow_mod(config) was sent to datapath (dp_id=0x99)
INFO:rfproxy:ofp_flow_mod(config) was sent to datapath (dp_id=0x99)
INFO:rfproxy:ofp_flow_mod(config) was sent to datapath (dp_id=0x99)
INFO:rfproxy:ofp_flow_mod(config) was sent to datapath (dp_id=0x99)
INFO:rfproxy:ofp_flow_mod(config) was sent to datapath (dp_id=0x99)
INFO:rfproxy:ofp_flow_mod(config) was sent to datapath (dp_id=0x99)
INFO:rfproxy:ofp_flow_mod(config) was sent to datapath (dp_id=0x99)
INFO:rfproxy:ofp_flow_mod(config) was sent to datapath (dp_id=0x99)
INFO:rfproxy:ofp_flow_mod(config) was sent to datapath (dp_id=0x99)
INFO:rfserver:Registering datapath port as idle (dp_id=0x99, dp_port=2)

INFO:rfproxy:ofp_flow_mod(config) was sent to datapath (dp_id=0x99)

kindly help me to solve this issue.

Regards,
Subash Gandhi

Consolidate RFClient logging

RFClient.cc currently uses a mix of syslog, printf, fprintf and perror.
FlowTable.cc uses a mix of fprintf, perror, and std::cout.

All of this should be consolidated into a single, thread-safe logging facility so we can capture all logging output.

Clean up the Makefile

There's way too much stuff in there that's no longer necessary. Make it simple, just to compile RFClient.

In the future, commands like:

make floodlight

Will clone the RFProxy repository for the controller and prepare everything so that the tests can be run. For now, we just need a solution for RFClient.

Support Ubuntu 12.04

Make sure everything works under Ubuntu 12.04 and make it the recommended distro. NOX won't have to work right away, as it will be moved to a separate repository.

Update POX

Update the POX version that is bundled with RouteFlow.

Outdated ./create script for the rftests in ubuntu 12.04

Hi,

Issue: While running the scripts, apt cannot find the libboost*1.46.1 packages.

Reason: The libboost*1.46.1 libraries is no longer in the ubuntu 12.04 repositories.

Solution: Remove the libboost_1.46.1 packages from installations and add the new version of them (In this moment: libboost_1.49.0). An alternative solution to avoind future problems is add the libboost_-dev libraries instead, since they always depend on the default version of libboost_ of ubuntu.

Scenario: I get this issues in a new default installation of ubuntu 12.04 and following exactly the same steps described in the tutorial of execution of the rftests.

Cheers,

Update fields in rfweb

New fields, such as ct_id are not in rfweb.
Support for the new RouteMod messages is also necessary.

Incorrect drop flow

RouteFlow currently installs a flow to drop everything that does not match any of its supported routing traffic. Or at least that's what it should be doing.

However, there's a bug in RFProxy (from a long, long time ago) that prevents this from happening.

In the NOX implementation, the buffer ID for the DC_CLEAR_FLOW_TABLE and DC_DROP_ALL configurations is specifying buffer 0, which might not exist. This prevents the flow from being installed.

In the POX implementation, an if/else condition caused the flow to redirect all traffic to the controller.

These two bugs, combined, made it so that this configuration never truly worked. Since it sounds a little too harsh, we will remove that in favor of the default OpenFlow behavior: redirect 128 bytes to the controller in case of a table miss.

Doing this, other applications can run at the same time. However, all traffic from the physical environment will be redirected to the virtual environment. A solution would be to redirect only packets with a packet-in reason different than OFPR_NO_MATCH.

On a side note, if this drop flow is correctly installed it seems to cause a bug in the OpenFlow NetFPGA implementation, making all traffic match, regardless of other flows and priority (thus dropping everything).

Unable to do chroot for Routeflow tutorial1- rftest1

Hi,
I wish to do routeflow tutorial rftest1 in my ubuntu machine which is 12.04 version. I have done the following steps as per in the site- https://github.com/CPqD/RouteFlow/blob/master/README.md

  1. Installed openvswitch
    2)installed dependcies MongoDB
    3)Then I installed routeflow dependencies
  2. Then I did sudo ./create
    then the following error has occurred

mkdir: cannot create directory /var/lib/lxc': File exists mkdir: cannot create directory/cgroup': File exists
Reading package lists... Done
Building dependency tree
Reading state information... Done
debootstrap is already the newest version.
lxc is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 109 not upgraded.
mkdir: cannot create directory /var/lib/lxc/base': File exists debootstrap is /usr/sbin/debootstrap Checking cache download in /var/cache/lxc/natty/rootfs-i386 ... installing packages: vim,ssh Downloading ubuntu natty minimal ... I: Retrieving Release E: Invalid Release file, no valid components chroot: cannot change root directory to /var/lib/lxc/base/rootfs: No such file or directory 'b1' already exists chmod: cannot access/var/lib/lxc/b1/rootfs/var/log/quagga': No such file or directory
chmod: cannot access /var/lib/lxc/b1/rootfs/var/run/quagga': No such file or directory 'b2' already exists chmod: cannot access/var/lib/lxc/b2/rootfs/var/log/quagga': No such file or directory
chmod: cannot access /var/lib/lxc/b2/rootfs/var/run/quagga': No such file or directory 'rfvm1' already exists chmod: cannot access/var/lib/lxc/rfvm1/rootfs/var/log/quagga': No such file or directory
chmod: cannot access /var/lib/lxc/rfvm1/rootfs/var/run/quagga': No such file or directory 'rfvmA' already exists chmod: cannot access/var/lib/lxc/rfvmA/rootfs/var/log/quagga': No such file or directory
chmod: cannot access /var/lib/lxc/rfvmA/rootfs/var/run/quagga': No such file or directory 'rfvmB' already exists chmod: cannot access/var/lib/lxc/rfvmB/rootfs/var/log/quagga': No such file or directory
chmod: cannot access /var/lib/lxc/rfvmB/rootfs/var/run/quagga': No such file or directory 'rfvmC' already exists chmod: cannot access/var/lib/lxc/rfvmC/rootfs/var/log/quagga': No such file or directory
chmod: cannot access /var/lib/lxc/rfvmC/rootfs/var/run/quagga': No such file or directory 'rfvmD' already exists chmod: cannot access/var/lib/lxc/rfvmD/rootfs/var/log/quagga': No such file or directory
chmod: cannot access `/var/lib/lxc/rfvmD/rootfs/var/run/quagga': No such file or directory

Here My problem is , once i run the script rootfs dir is created but unfortunately to do "chroot".

Can anyone help me how to overcome this issue?

Regards,
Subash

[Implementation] Detected on server but not routing

I am already configured and already detected on the server but still not routing
the files I have configured are rftest2config.csv, rftes2, config-> rfvmX-> roofts-> etc-> quagga-> zebra and ospf, but still can not get routing
and i use mikrotik as nodes, and i have configured on my mikrotik (port datapath)
is there any other configuration I missed?
thanks

OverflowError: MongoDB can only handle up to 8-byte ints

Hi,

I have followed the steps given in the ReadMe.md to install and run the RouteFlow.
When run either rftest1 or rftest2, i get this error on the console:

ERROR:core:Exception while handling OpenFlowNexus!AggregateFlowStatsReceived...
Traceback (most recent call last):
File "/home/controller/RouteFlow/pox/pox/lib/revent/revent.py", line 234, in raiseEventNoErrors
return self.raiseEvent(event, _args, *_kw)
File "/home/controller/RouteFlow/pox/pox/lib/revent/revent.py", line 281, in raiseEvent
rv = event._invoke(handler, _args, *_kw)
File "/home/controller/RouteFlow/pox/pox/lib/revent/revent.py", line 159, in _invoke
return handler(self, _args, *kw)
File "/home/controller/RouteFlow/pox/ext/rfstats.py", line 148, in handle_aggregate_flow_stats
db.update(dp_id, "switch", aggregate=StatsDB.create_aggregate_stats_dict(event.stats))
File "/home/controller/RouteFlow/pox/ext/rfstats.py", line 44, in update
self.collection.update({"id": id}, self.db[id
], upsert=True)
File "/usr/lib/python2.7/dist-packages/pymongo/collection.py", line 409, in update
_check_keys, self.__uuid_subtype), safe)
OverflowError: MongoDB can only handle up to 8-byte ints

In spite of this error, it works as expected but few times it doesn't [Especially when i run RIP and OSPF].

It would be highly appreciated if you could you please tell me more about this error and steps to fix it?

Thanks in advance.

Sincerely,
Adarsh KR

Issue in the rftest/create script

Update 2:

I removed the LXC installed with apt-get and installed a new version from http://lxc.sourceforge.net/download/lxc . There is an ubuntu template in this version.

Solved.

Update:
I solved this issue changing the script ~/RouteFlow/rftest/create line 14 to:
...
lxc-create -t natty -n base
...

Other installation tips:
Install the package "debootstrap" before running the "create" script. I suggest include this package in the "apt-get install" list.
Include the openvswitch-datapath module: sudo apt-get install openvswitch-datapath-source
and install the module: sudo module-assistant auto-install openvswitch-datapath


I got an error running the ~/RouteFlow/rftest/create because there is no "lxc-ubuntu" template in /usr/lib/lxc/templates/ directory. I tried to user another template (debian) to continue the installation but I received a lot of error messages after that.

I've installed the LXC using the command sudo apt-get install lxc

core@ubuntu:/RouteFlow/rftest$ sudo lxc-create -t ubuntu -n test
/usr/bin/lxc-create: line 132: type: /usr/lib/lxc/templates/lxc-ubuntu: not found
unknown template 'ubuntu'
core@ubuntu:
/RouteFlow/rftest$ ls /usr/lib/lxc/templates/
lxc-busybox lxc-debian lxc-fedora lxc-lenny lxc-lucid lxc-maverick lxc-natty lxc-sshd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.