In a datacenter environment, network administrators may want to lock down the topology of their network and not allow traffic to flow over links that they are not expecting. Also, cabling errors are common, and can lead to a topology being configured that was not intended. The network config link provider allows specifying the link topology via the netcfg mechanism, and disallows any links that are not in the defined configuration.
How to Use
Enable Network Config Link Provider
The openflow meta application contains openflow-base, hostprovider and lldpprovider.
You can set the following into ONOS_APPS environment variable to replace lldpprovider with netcfglinksprovider.
Alternatively, since Network Config Link Provider is an application, it can also be enabled/disabled dynamically through ONOS CLI
Provide Link Information in Network Config
You can upload hosts network config by POSTing a JSON file to:
Here is an example of a configuration that defines a set of links in a topology:
In the links section of the config, each entry specifies a link that will be allowed in the topology. The format of the link name is devid1/port1-devid2/port2, and this defines the two end points of the link. Setting the link discovery mode to STRICT will prevent unconfigured links from being added to the topology.
Method of Operation
On startup, the provider reads in the preconfigured links, adds them to the system, and sets their state to INACTIVE. LLDP packets are sent out to determine if the links are active. When an LLDP packet comes back to the controller, if the source and destination match a predefined link, the link is marked ACTIVE and is available for traffic. If the source and destination does not match, a link is created with an error indication, which allows the GUI to display an error indication to the user. These error links are not available for traffic. If the link configuration changes, the provider reads in the changes and adjusts the topology accordingly.