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 does the openflow plugin create a link

asked 2014-06-19 23:57:30 -0700

anonymous user


updated 2014-06-20 11:30:33 -0700

(1). When connect the openflow controller with mininet. (For example, Create 2 switches and four hosts) For MD-SAL openflow plugin, there is a new node created in SalRegistrationManager, and then relevant NodeConnectors will be created.

When I look into the code, I found that the overrided onPop() method in LLDPSpeakerPopListener will be called when there is a NodeConnected created, but I am not sure which statement publishes the notification and invokes this function?

(2). In onPop() function, it will call addNodeConnector at last. And transmitPacket() is called in the end of addNodeConnector function.

    ModelDrivenSwitch md = nodeMap.get(nodeInstanceId);

How does transmitPacket() work here? What does it mean?

(3). Moreover, I found that onPacketReceived() method in LLDPDiscoveryListener is called when a link is created. But I am not sure which statement publishes the notification and invokes this function?

In onPacketReceived() function, it will call publish() at last, which invokes onLinkDiscovered() in FlowCapableTopologyExporter.

public synchronized void onLinkDiscovered(final LinkDiscovered notification) {
    Link link = toTopologyLink(notification);
    InstanceIdentifier<Link> path = linkPath(link);
    DataModificationTransaction tx = dataService.beginTransaction();
    tx.putOperationalData(path, link);


(4). In the end of function, it will call listenOnTransactionState(). How does this function work here?

(5). In above questions, one is for creating a NodeConnector and another one is for creating a Link. However, once the NodeConnectors have been created, how is the link between two NodeConnectors formed?

(6). By the way, are there any details for how does openflow plugin work with those network service functions? Any detailed specifications for topology-manager, hosttracker, swtich-mananger, FRM and stats-manager ....?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-08-28 00:57:19 -0700

michal.rehak gravatar image


1) there are 2 listeners for NodeConnectorUpdated message - one of them is publishing this message to md-sal and the other (LLDPSpeakerPopListener) notifies LLDPSpeaker about add or removal of node.

2) LLDPSpeaker is notified upon new nodeConnector added (see 1) and sends out down to device an lldp packet in order to discover neighborhood (transmitPacket is method for sending packetOut message to device - see OFP spec.). This is periodically repeated until nodeConnector removed notification arrives.

3) device responds to lldp packed (sent out in 2)) and this packet arrives to controller as general packetIn message which is published to md-sal (as PacketReceived notification via NotificationPopListener). This happens with some delay after nodeConnector appears (because of this additional request-response communication). LLDPDiscoveryListener listens on PacketReceived and if there is payload of type LLDP then it will be processed in order to update topology.

4) this method has been rewritten - I guess this was previously supposed to chain some processing.

5) as soon as topologyExporter gets the knowledge about link it is supposed to be visible in "topology" - in GUI or restconf response. Link is just a record in datastore containing 2 nodeConnectors.

6) well - openflowplugin is simple (almost stateless) piece of puzzle, the only logic there is handshake and all NSF components act as applications on the other side of md-sal. I guess there is some NSF description on wiki.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-06-19 23:57:30 -0700

Seen: 1,099 times

Last updated: Aug 28 '14