Skip to content
/ of_lldp Public

Kytos LLDP Openflow Network Application (NApp)

License

Notifications You must be signed in to change notification settings

kytos/of_lldp

Repository files navigation

Overview

WARNING: As previously announced on our communication channels, the Kytos project will enter the "shutdown" phase on May 31, 2021. After this date, only critical patches (security and core bug fixes) will be accepted, and the project will be in "critical-only" mode for another six months (until November 30, 2021). For more information visit the FAQ at <https://kytos.io/faq>. We'll have eternal gratitude to the entire community of developers and users that made the project so far.

License Build status Code coverage Code-quality score

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).

How it Works

In order to track connections between switches under the present SDN controller, this NAPP uses the LLDP protocol with the following procedure:

  1. 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.
  2. 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.
  3. 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 the PacketIn (switch/dpid and in_port).
  4. 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.

Installing

All of the Kytos Network Applications are located in the NApps online repository. To install this NApp, run:

$ kytos napps install kytos/of_lldp

Requirements

  • kytos/of_core
  • kytos/flow_manager
  • kytos/topology

Events

Listen

kytos/of_core.v0x0[14].messages.in.ofpt_packet_in

Listen to any OpenFlow PacketIn in versions 1.0 (v0x01) or 1.3 (v0x04).

Content
{ 'message': <object> # instance of python-openflow PacketIn message
  'source': <object>, # instance of kytos.core.switch.Connection class
}

kytos/topology.switch.enabled

Listen when a switch was enabled. This event is used to indicate when to install LLDP flows through kytos/flow_manager.

Content
{
  'dpid': <switch.id>
}

kytos/topology.switch.disabled

Listen when a switch was disabled. This event is used to indicate when to remove LLDP flows through kytos/flow_manager.

Content
{
  'dpid': <switch.id>
}
Generate

kytos/of_lldp.messages.out.ofpt_packet_out

buffer: message_out

Standard "message out" event with a PacketOut message to the switch containing a LLDP packet inside it.

Content
{ 'message': <object>, # instance of a python-openflow PacketOut message
  'destination': <object> # instance of kytos.core.switch.Connection class
}

kytos/of_lldp.interface.is.nni

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.

Content

The content of an event will have the following format:

{
  'interface_a': <interface_a>, # Object instance of Interface
  'interface_b': <interface_b>
}

Rest API

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.

About

Kytos LLDP Openflow Network Application (NApp)

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages