Warning |
---|
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.
Code Block language text title onos.properties collapse true floodlight.modules = net.floodlightcontroller.core.FloodlightProvider,\ net.floodlightcontroller.threadpool.ThreadPool,\ net.onrc.onos.core.topology.TopologyPublisher, \ net.onrc.onos.core.datagrid.HazelcastDatagrid,\ net.onrc.onos.core.flowprogrammer.FlowProgrammer,\ net.onrc.onos.core.intent.runtime.PathCalcRuntimeModule,\ net.onrc.onos.core.intent.runtime.PlanInstallModule,\ net.onrc.onos.core.registry.ZookeeperRegistry, \ net.onrc.onos.core.metrics.OnosMetricsModule, \ net.onrc.onos.apps.websocket.WebSocketModule, \ net.onrc.onos.core.main.config.DefaultConfiguration, \ net.onrc.onos.apps.segmentrouting.SegmentRoutingManager net.floodlightcontroller.restserver.RestApiServer.port = 8080 net.floodlightcontroller.core.FloodlightProvider.openflowport = 6633 net.floodlightcontroller.core.FloodlightProvider.workerthreads = 16 net.floodlightcontroller.core.FloodlightProvider.cpqdUsePipeline13 = true net.floodlightcontroller.forwarding.Forwarding.idletimeout = 5 net.floodlightcontroller.forwarding.Forwarding.hardtimeout = 0 net.onrc.onos.apps.websocket.WebSocketModule.port = 8081 net.floodlightcontroller.core.FloodlightProvider.cpqdUsePipeline13 = true # NOTE: Do NOT modify or remove the line below. This value will be overwritten by onos.sh script. net.onrc.onos.core.datagrid.HazelcastDatagrid.datagridConfig = # Uncomment and list all the ZooKeeper instances after localhost on multi-instance deployment. #net.onrc.onos.core.registry.ZookeeperRegistry.connectionString = localhost:2181,otherhost:2181 # Specify a network configuration file to be used by the NetworkConfigManager net.onrc.onos.core.configmanager.NetworkConfigManager.networkConfigFile = conf/sr-3node.conf
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).
Code Block language text title sr-3node.conf collapse true { "comment": " Segment routing topology description and configuration", "restrictSwitches": true, "restrictLinks": true, "switchConfig": [ { "nodeDpid": "00:01", "name": "Dallas-R1", "type": "Router_SR", "allowed": true, "latitude": 80.80, "longitude": 90.10, "params": { "routerIp": "192.168.0.1/32", "routerMac": "00:00:01:01:01:80", "nodeSid": 101, "isEdgeRouter" : true, "subnets": [ { "portNo": 1, "subnetIp": "10.0.1.128/24" }, { "portNo": 2, "subnetIp": "10.0.1.128/24" }, { "portNo": 3, "subnetIp": "10.0.1.128/24" }, { "portNo": 4, "subnetIp": "10.0.2.128/24" }, { "portNo": 5, "subnetIp": "10.0.3.128/24" } ] } }, { "nodeDpid": "00:02", "name": "Dallas-R2", "type": "Router_SR", "allowed": true, "latitude": 80.80, "longitude": 90.10, "params": { "routerIp": "192.168.0.2/32", "routerMac": "00:00:02:02:02:80", "nodeSid": 102, "isEdgeRouter" : false } }, { "nodeDpid": "00:03", "name": "Dallas-R3", "type": "Router_SR", "allowed": true, "latitude": 80.80, "longitude": 90.10, "params": { "routerIp": "192.168.0.3/32", "routerMac": "00:00:07:07:07:80", "nodeSid": 103, "isEdgeRouter" : true, "subnets": [ { "portNo": 1, "subnetIp": "7.7.7.128/24" } ] } } ], "linkConfig":[ { "type": "pktLink", "allowed": true, "nodeDpid1": "01", "nodeDpid2": "02", "params": { "port1": 6, "port2": 1 } }, { "type": "pktLink", "allowed": true, "nodeDpid1": "01", "nodeDpid2": "02", "params": { "port1": 7, "port2": 3 } }, { "type": "pktLink", "allowed": true, "nodeDpid1": "02", "nodeDpid2": "03", "params": { "port1": 2, "port2": 2 } } ] }
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