The interface configuration allows users to configure information about ports of devices connected to the system. The information can be used by ONOS and its applications to drive certain behaviors.
Basic definitions
- Ports represent physical ports of devices connected to ONOS. They act as containers of one or more interfaces that actually hold the real configuration
- Interfaces are subset of physical ports distinguished by different parameters, such as i.e. VLANs, IPs, MAC addresses
Configuration structure
Following is reported a typical interface configuration used for SDN-IP
{ "ports" : { "of:0000000000000001/1" : { "interfaces" : [ { "name" : "Interface 1 sw 1", "ips" : [ "1.1.1.1/24", "10.10.10.1/24" ], "mac" : "00:00:00:00:00:01" } ] }, "of:0000000000000002/1" : { "interfaces" : [ { "name" : "Interface 1 sw 2", "ips" : [ "2.2.2.2/24" ], "vlan" : "100", "mac" : "00:00:00:00:00:02" }, { "name" : "Interface 2 sw 2", "ips" : [ "3.3.3.3/24" ], "vlan": "150", "mac" : "00:00:00:00:00:03" } ] } }
Configuration semantic and best-practices:
What's reported above is a very generic configuration example, used for an SDN-IP demo. Indeed, the configuration is very specific to the application that parses it.
While the configuration syntax and general structure is globally prescribed by the interface configuration subsystem itself, It's up to each ONOS application how to interpret the values provided. For example, some applications might request just one parameter per interface (it might be the case of some L2 applications with VLAN); some others might request to have also IPs, interface name and other parameters (for example L3 applications).
Given this model it's really difficult
1 to 1 mapping between an interface and a port
Configurations attributes written directly under a physical port won't be parsed. In case you like to apply a specific configuration to an entire physical port, just add one interface to it and specify inside its parameters.