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


Get list of hosts connected to Switch through helium API

asked 2015-03-31 05:40:05 -0700

anonymous user


HI I am using OpenDayLight Helium karaf distribution. I have switches and hosts simulated through mininet. How could I get the list of hosts connected to switches through API ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-03-31 07:26:19 -0700

Nuno gravatar image

You can use odl northbound Rest apis to fetch the topology of the network, the switches the hosts and the links between tem. You need to install l2switch module, restconf and openflowplugin. You can also check it through dlux ui, for that you need to install the dlux core module on odl using karaf

edit flag offensive delete publish link more


btw, here is a quick example REST call you can use to get a list of nodes: curl -u "admin:admin" http://localhost:8181/restconf/operational/opendaylight-inventory:nodes/

jamoluhrsen ( 2015-03-31 10:16:15 -0700 )edit

thanks. I have the above modules installed and used the same API call mentioned in the previous comment. But I could see only switches in the response and not the hosts. I also cant see the hosts in dlux UI. Even after did pingall I could not see any host in dlux UI or in the API response.

Tommy ( 2015-04-01 02:08:32 -0700 )edit

Sometimes it bugs. Try to restantes mininet topology, check it all switches are Well connected in the interface then ping each host ( by hand its faster you only need 1 arp) and then check again topology too See If the hosts are there too. I do it myself and it works

Nuno ( 2015-04-01 02:47:47 -0700 )edit

thanks Nuno. I tried restarting mininet many times. still the same result. I am not sure if I am missing something else. Here is the mininet command that I used - 'mn --topo=tree,1 --switch=ovsk,protocols=OpenFlow13 --mac --arp --controller=remote,ip=' . When I simulate this I cant ping h1 to h2 unless I add flows in switch s1. But it was not the case in Hydrogen release. However even after adding flows and making the hosts pingable they do not get diplayed in the UI

Tommy ( 2015-04-01 03:50:18 -0700 )edit

You need to have a flow that punts the ARP packet to the controller, and you need to make sure you have the host tracker (or Address tracker, or both) installed, these come from the L2 project that Nuno pointed out.

Chris O'Shea ( 2015-04-01 04:41:10 -0700 )edit
Login/Signup to Answer


Asked: 2015-03-31 05:40:05 -0700

Seen: 651 times

Last updated: Mar 31 '15