-
Notifications
You must be signed in to change notification settings - Fork 192
Frequently Asked Questions
1. How do I change the number of tables?
2. How do I change the maximum number of flow entries in a Flow Table?
3. Does the switch supports in-band connections?
4. Why I cannot compile for OpenWRT?
5. Why I cannot use queues with Mininet?
6. How do I connect the switch to a physical interface?
7. What is the difference between punix/unix and tcp/ptcp for the ofdatapath and ofprotocol commands?
8. How can I use the switch in Mininet?
N+1. Wait, BOFUSS? The repository name says ofsofswitch13...
The current number of tables is 64. If you need more change the definition of PIPELINE_TABLES in openflow.h Example:
#define PIPELINE_TABLES <your magic number>
The current defined number is 4096. If you need more change the definition of FLOW_TABLE_MAX_ENTRIES in flow_table.h
#define FLOW_TABLE_MAX_ENTRIES <your magic number>
The switch currently does not have full working support for in-band connections. Even though it is the default operating mode, it only works if:
- You use use manual discovery of the controller
- The controller is running locally.
- You connect ofdatapath to ofprotocol using an Unix socket.
Do not expect it will work if you want to have a connection across multiple switches if you do not use the above setup. The code needs to be updated to reflect OpenFlow 1.3 changes.
For more detailed information consult the ofprotocol manual page.
A recurrent topic, specially for newer versions. The support for OpenWRT is outdated and was only tested in a single wifi router (TP-LINK TL-WR1043ND) with an specific OpenWRT version (Backfire)
You may find online resources for newer OpenWRT versions. I will list some here. I never tried any of them (I do not even own an OpenWRT router at the moment...) Use for your own account and risk. Links in chronological order:
By default, Mininet starts the switch with the option --no-slicing. A way to change it is to remove the switch options when adding a new switch on Mininet. Example:
self.addSwitch( 's3', cls=UserSwitch, dpopts='')
Simply add the interfaces you would like to the --interfaces argument from ofdatapath command.
sudo ofdatapath --datapath-id=0000000000000001--interfaces=real_if1,real_if2 punix:/tmp/s1
7. What is the difference between punix/unix and tcp/ptcp for the ofdatapath and ofprotocol commands?
The "p" stands for passive. It means the switch/secure channel will listen instead of actively trying to connect to a controller. The ofdatapath has only punix and ptcp as options. It means it will always listen for a connection.
In the case of the secure channel, it can actively start a connection with a controller, using unix and tcp sockets. Let's clarify with two examples:
Connect the switch to the secure channel using linux sockets
$ sudo ofdatapath --datapath-id=0000000000000001 --interfaces=eth1 punix:/tmp/s1
$ sudo ofprotocol unix:/tmp/s1 tcp:127.0.01:6653
In the example above /tmp/s1 is the Unix domain socket file name. The ofprotocol connects to the switch through the unix socket and to the controller listening in the localhost port 6653.
Connect the switch to the secure channel using TCP sockets
If for some reason the control channel needs to run in a machine different than the datapath, you can use TCP sockets. Suppose the switch is running in a machine with IP 192.168.0.1.
$ sudo ofdapath --datapath-id=0000000000000001--interfaces=eth1 ptcp:6654
$ sudo ofprotocol tcp:192.168.0.1:6654 tcp:127.0.0.1:6653
In the example, the switch listens in the TCP port 6654. The secure channel will then actively connect to the ofdapath at tcp:192.168.0.1:6654. Again, it connect to a controller running locally at port 6653.
Mininet support the OpenFlow 1.0 userspace switch from Stanford. Since BOFUSS is basically an upgraded version of that switch, to use it in Mininet you just need to have the switch installed and use the --switch user option.
Moreover, you can also install the switch along with Mininet. If you follow the commands below, the installation should be quick, clean and painless :-)
cd $HOME/
git clone git://github.com/mininet/mininet
mininet/util/install.sh -n3f
One example of how to start a topology:
sudo mn --topo single,2 --mac --switch user --controller remote
The switch was never called ofsofswitch13. By a lack of imagination, first thing I did when porting OF 1.2 to 1.3 was to create a new repository and that was the quick name I came up. As ofsoftswitch13 is not the nicest name, the switch is commonly called CPqD switch.
The problem to only refer to it as CPqD switch, it is not fair to the other entities that have developed the base of the code. As it is true that version 1.2 and 1.3 of OpenFLow were implemented by me during my time at CPqD, the switch started in Stanford as the OpenFlow reference switch. Later it was upgraded by the work of Zoltán, from Ericsson's Traffic Lab, to support OpenFlow 1.1.
So, after talking to Zoltán and other collaborators we came up with the name BOFUSS which stands for:
Basic OpenFlow User Space Software Switch.