Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


How can connect my ODL project to Mininet?

asked 2017-09-06 02:30:57 -0800

DanielRomero gravatar image

updated 2017-09-12 00:16:50 -0800


I'm building my own ODL project (following this tutorial) and now I want to check if it works connecting it to mininet but after initializing the ODL controller, when I create my topology in mininet with the command sudo mn --switch=ovs --controller=remote,ip= --topo tree,3 , I get this:

*** Creating network
*** Adding controller
Unable to contact the remote controller at
Unable to contact the remote controller at
Setting remote controller to
*** Adding hosts:
h1 h2 h3 h4 h5 h6 h7 h8 
*** Adding switches:
s1 s2 s3 s4 s5 s6 s7 
*** Adding links:
(s1, s2) (s1, s5) (s2, s3) (s2, s4) (s3, h1) (s3, h2) (s4, h3) (s4, h4) (s5, s6) (s5, s7) (s6, h5) (s6, h6) (s7, h7) (s7, h8) 
*** Configuring hosts
h1 h2 h3 h4 h5 h6 h7 h8 
*** Starting controller
*** Starting 7 switches
s1 s2 s3 s4 s5 s6 s7 ...
*** Starting CLI:

I don't know if it would be helpful but I created the project with the following command:

mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeRepository= -DarchetypeCatalog=remote -DarchetypeVersion=1.3.0-Carbon

I have to say that I checked the connection with the Carbon distribution previously (downloaded from the official website) and it worked fine after installing some features, for example odl-l2switch-switch so I think it can't be a problem of IP address. I'm not sure if the reason why my project doesn't connect to mininet is that I haven't installed odl-l2switch feature but the point is that it's not listed when I type feature:install so I can't install that feature.

I'd appreciate your help to solve this problem.


I added the l2switch dependency to my feature pom.xml and finally it showed up in feature:install list to be installed. This is what I added in the pom.xml:


(Note that I'm using Carbon version for l2switch because the version of the project is Carbon as well).

The problem now is when I type feature:install odl-l2switch-switch I get this large amount of exceptions but I paste the last lines:

Exception in thread "config-blank-txn-34" java.lang.IllegalArgumentException: Module name is not unique. Found two conflicting factories with same name 'shutdown': 'org.opendaylight.controller.config.yang.shutdown.impl.ShutdownModuleFactory@4a14a98c' 'org.opendaylight.controller.config.yang.shutdown.impl.ShutdownModuleFactory@6dc62640'
    at org.opendaylight.controller.config.manager.impl.osgi.BundleContextBackedModuleFactoriesResolver.getAllFactories(
    at org.opendaylight.controller.config.manager.impl.ConfigRegistryImpl.beginConfigSafe(
    at org.opendaylight.controller.config.manager.impl.ConfigRegistryImpl.beginConfig(
    at org.opendaylight.controller.config.manager.impl.osgi.BlankTransactionServiceTracker.lambda$new$0(
    at org.opendaylight.controller.config.manager ...
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-09-06 08:49:47 -0800

VincentJahjah gravatar image

updated 2017-09-06 08:52:35 -0800

First thing, your actual question:

I find it more pleasant to run the mininet topology inside a python script. Here is a copy of the script I currently use:

Replace the IP address by the IP address of your own controller. Run the script with

sudo python

This should launch mininet, setup the topology, and initiate a ping from host1 to host2. Note that you should be running this within a separate OS (usually a mininet-dedicated vagrant box).

Second, making l2switch show up in your plugins list inside ODL:

I am unsure how your project is structured, but I use the exact same structure as the current l2switch project (that is, the parent project is imported by every plugin-project, there is a karaf4 features project which bundles all feature projects, and there is one feature project for each plugin. Finally, there is the distribution/karaf project which generates the controller distribution).

For l2switch to show up in the ODL controller distribution generated inside distribution/karaf, you will need to refer to the l2switch imports inside the karaf4 features project.

Here is the pom.xml of my karaf4 project (usually under features/features-[project-name], or features/features4-[project-name] if you want to distinguish between karaf3 feature projects). Note that my versions may not be the same as yours. I use version 0.6.0-SNAPSHOT of l2switch because this is the most recent version that works for me (0.7.0-SNAPSHOT breaks for me, for no reason I understand) :

Here is what my distribution/karaf project pom.xml looks like:

Note the presence of the property "local feature". I am not 100% I understand what it does, but my impression is that it causes those plugins to be installed during distribution (saving some installation time afterwards).

I hope this helps.

edit flag offensive delete publish link more


@VincentJahjah I edited que question with new information. Could you help me?

DanielRomero ( 2017-09-08 03:04:21 -0800 )edit

Two things: 1 I can't see everything you typed because it's hidden under the "more" tag and the "more" tag doesn't work. That's why it's better to use pastebin here. 2: Try changing the versions of l2switch (I use 0.6.0-SNAPSHOT), sometimes that solves problems. Are you importing l2switch etc twice?

VincentJahjah ( 2017-09-09 05:33:11 -0800 )edit

As far as I know, it should be no problem to upgrade all your dependencies to the newer version (post Carbon) so that your project works with l2switch 0.6.0-SNAPSHOT. Then again, I'm not even sure that's the issue here.

VincentJahjah ( 2017-09-14 04:52:35 -0800 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-09-06 02:30:57 -0800

Seen: 1,106 times

Last updated: Sep 12 '17