The segment routing use case is built on ONOS v0.3.0, and the following instructions do not apply to ONOS 1.0.0.
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