Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleSample Config
{
    "links" : {
        "of:0000000000000001/1-of:0000000000000191/1" : {
            "basic" : {}
        },
        "of:0000000000000001/3-of:0000000000000192/1" : {
            "basic" : {}
        },
        "of:0000000000000002/1-of:0000000000000191/3" : {
            "basic" : {}
        },
        "of:0000000000000002/3-of:0000000000000192/3" : {
            "basic" : {}
        },
        "of:0000000000000191/1-of:0000000000000001/1" : {
            "basic" : {}
        },
        "of:0000000000000192/1-of:0000000000000001/3" : {
            "basic" : {}
        },
        "of:0000000000000191/3-of:0000000000000002/1" : {
            "basic" : {}
        },
        "of:0000000000000192/3-of:0000000000000002/3" : {
            "basic" : {}
        }
    },
    "apps" : {
        "org.onosproject.core" : {
            "core" : {
                "linkDiscoveryMode" : "STRICT"
            }    
        }
    }
}

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.