Network Config Host Provider is a host provider that learns host information from network config subsystem rather than packet-in.
There are two main benefit that Network Config Host Provider can offer:
Network config subsystem already provides Java API and REST API. Which makes Network Config Host Provider very easy to use.
The openflow meta application contains openflow-base, hostprovider and lldpprovider.
You can set the following into ONOS_APPS environment variable to replace hostprovider with netcfghostprovider.
export ONOS_APPS=drivers,openflow-base,netcfghostprovider,lldpprovider |
Network Config Host Provider is an application, which means it can also be enabled/disabled dynamically through ONOS CLI
app deactivate org.onosproject.openflow app activate org.onosproject.openflow-base org.onosproject.netcfghostprovider org.onosproject.lldpprovider |
You can upload hosts network config by POSTing a JSON file to:
http://<ip>:8181/onos/v1/network/configuration/hosts |
Here is an JSON example:
{ "00:02:c9:1e:b1:20/None": { "basic": { "ips": ["10.0.1.1", "10.0.1.2"], "location": "of:0000000000000001/5" } }, "00:02:c9:1e:b1:21/None": { "basic": { "ips": [], "location": "of:0000000000000001/13" } } } |