Discovery - noxrepo/nox-classic GitHub Wiki

Overview

Discovery is LLDP discovery application for topology inference. It sends LLDP packets out of every switch interface and then uses received LLDP packets to detect switch links, at which time it generates Link_events.

This application handles generation and parsing/interpreting LLDP packets for all switches on the network. The bulk of the functionality is performed in the following handlers:

    * lldp_input_handler() : packet_in handler called on receipt of an LLDP packet. This infers the link-level connectivity by querying the LLDP packets. The network links are stored in the instance variable adjacency_list
    
    * timeout_links() : periodically iterates over the discovered links on the network and detects timeouts. Timeouts update the global view and generate a node changed event

Each LLDP packet contains the sending port and datapath ID. The datapath is currently encoded as a 48bit MAC in the chassis ID TLV, hence the lower 16bits are always 0.

Discovery times out links when no LLDP packets have been received over a timeout period. Timer values are documented within discovery.py.

The fundamental problem with a centralized approach to topology discovery is that all ports must be scanned linearly which greatly reduces response time. This should really be implemented on the switch. Also, it has been noted that in case of saturated links, probing LLDP packets can be dropped leading to false positives for a link failures. (Such loss of control packets could be avoided by use of priority cues in the future)

Discovery Events

Link_event

Discovery raises Link_events upon link detection (when NOX receives LLDP packets sent out by this component) or link changes (identified when an periodically sent LLDP packet isn't received through previously probed a link).

This event is defined in the file src/nox/apps/discovery/link-event.hh

⚠️ **GitHub.com Fallback** ⚠️