Attention!
THIS NAPP IS STILL EXPERIMENTAL AND IT'S EVENTS, METHODS AND STRUCTURES MAY CHANGE A LOT ON THE NEXT FEW DAYS/WEEKS, USE IT AT YOUR OWN DISCERNEMENT
The kytos/of_lldp application implements the Link Layer Discovery Protocol (LLDP).
In order to track connections between switches under the present SDN controller, this NAPP uses the LLDP protocol with the following procedure:
- Periodically this NApp builds and sends a PacketOut OpenFlow message containing an Ethernet Packet with LLDP data through all datapaths's interfaces. This LLDP packet is designed to the specific switch and port related to the PacketOut, by carrying the switch DPID and the Port that it will be forwarded through.
- The switches forward the packet throught the given Port and, if another
switch is connected to that port, it will have a flow (preinstalled by the
NApp) instructing it to send it back to the controller. So, it will generate
a
PacketIn
with that Ethernet packet to the controller. - This NApp will get all
PacketIn
messages and look for Ethernet packets with LLDP content. If it is one of the LLDP packets generated by the NApp itself, then it will get the information from thePacketIn
(switch/dpid and in_port). - At last but not least, the NApp will generate a KytosEvent with the 'source-destination' information, denoting those interfaces are NNIs.
This protocol is vendor free and used to discover network devices and all links between them. This protocol is implemented at layer 2 (L2) and defined in the IEEE 802.1ab. A network management system (NMS) can rapidly obtain the L2 network topology and topology changes over time using LLDP.
All of the Kytos Network Applications are located in the NApps online repository. To install this NApp, run:
$ kytos napps install kytos/of_lldp
- kytos/of_core
Listen to any OpenFlow PacketIn in versions 1.0 (v0x01) or 1.3 (v0x04).
{ 'message': <object> # instance of python-openflow PacketIn message
'source': <object>, # instance of kytos.core.switch.Connection class
}
buffer: message_out
Standard "message out" event with a PacketOut message to the switch containing a LLDP packet inside it.
{ 'message': <object>, # instance of a python-openflow PacketOut message
'destination': <object> # instance of kytos.core.switch.Connection class
}
buffer: app
An evento to notify that a link between two network-to-network interfaces (NNIs) was identified. This identification is possible due to the fact that a connection between two switches was identified. This does not mean that it is a new connection, it may be an already known connection between two switches. This event contains two attributes, interface_a and interface_b, and each one of them contains an attribute switch and another port, the first one contains the switch id and the second one the port number.
The content of an event will have the following format:
{
'interface_a': <interface_a>, # Object instance of Interface
'interface_b': <interface_b>
}
You can find a list of the available endpoints and example input/output in the 'REST API' tab in this NApp's webpage in the Kytos NApps Server.