The segment routing use case is built on an older internal release of ONOS (v0.3.0). The following instructions do not apply to ONOS 1.0.0 (Avocet), and are meant only for the SPRING-OPEN project.
There is no IP network in the world that can run without configuration. In SPRING-OPEN, instead of configuring each switch individually (with IP addresses, subnets, labels etc.) we configure the controller. Such configuration should be possible via the controller CLI. However we have limited configuration capabilities currently in the controller CLI (just tunnels and policies). Thus all startup-configuration happens via a configuration file loaded at controller startup. Please note that without this config file (or with the wrong config file) the network will not work correctly.
Edit ~/ONOS/conf/onos.properties
If you create a new network configuration file, you need to specify the file in net.onrc.onos.core.configmanager.NetworkConfigManager.networkConfigFile field. In the example below, conf/sr-3node.conf file was specified.
Edit network configuration file
The following example (sr-3node.conf) shows the network configuration for the topology with three switches and three links (refer to figure below).
restrictSwitches : If true, any switch not configured in the config file is rejected by the controller.
restrictLinks: If true, any link not configured in the config file is rejected by the controller.
- swtichConfig: Switch configuration part
- nodeDpid: Node DPID(Datapath ID)
- name: name of the router
- type: router type. It needs to be Router-SR
- allowed: if true, the controller accepts the router
- latitude, longitude: location of the router
- params: Segment Routing application specific parameters
- routerIp: loopback IP address of the router
- routerMac: MAC address of the router
- nodeSid: Node SID
- isEdgeRouter: the flag to determine the edge router. If true, subnet information must be specified. If false, subnet information must NOT specified.
- subnets (optional): subnet information (can be specified only if isEdgeRouter is true.
- linkConfig: link configuration part
- type: link type
- allowed: if true, the controller accepts the link
- nodeDpid1, nodeDpid2: DPID of the two end point routers of the link
- params: link parameter
- port1, port2: port number of the two end point routers in the corresponding order
(NOTE: if the port numbers do not match the actual port number of the link, then the link is disregarded by the controller)
- port1, port2: port number of the two end point routers in the corresponding order